-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d66949
commit fcab507
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma author DexrnZacAttack | ||
#pragma description Minecraft LCE LOC file | ||
|
||
#pragma endian big | ||
#pragma array_limit 739845729834 | ||
#pragma pattern_limit 34893726894 | ||
|
||
import std.string; | ||
|
||
struct Keys { | ||
bool useUniqueIDs; | ||
u32 count; | ||
u32 key[count]; | ||
}; | ||
|
||
struct LangIds { | ||
u16 len; | ||
char id[len]; | ||
u32 unk; | ||
} [[name(id)]]; | ||
|
||
struct LocString { | ||
u16 keySize; | ||
char key[keySize]; | ||
} [[name(std::string::to_string(key))]]; | ||
|
||
struct Language { | ||
u32 read; | ||
if (read > 0) | ||
u8 unk; | ||
u16 len; | ||
char id[len]; | ||
u32 count; | ||
LocString strings[count]; | ||
} [[name(id)]]; | ||
|
||
struct Loc { | ||
u32 version; | ||
u32 count; | ||
if (version == 2) | ||
Keys keys; | ||
LangIds ids[count]; | ||
Language language[count]; | ||
}; | ||
|
||
Loc loc @ 0x00; |