-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patterns: Added Minecraft LCE ARC file format (#307)
* Create arc.hexpat * add test file * mention arc * abide by contributing.md * use virtual filesystem * brainfart * ifdefs to fix github actions moment #2
- Loading branch information
1 parent
61d3e11
commit 85f5541
Showing
3 changed files
with
27 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
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,26 @@ | ||
#pragma author DexrnZacAttack | ||
#pragma description Minecraft LCE ARC File | ||
#pragma endian big | ||
|
||
import std.string; | ||
#ifdef __IMHEX__ | ||
import hex.core; | ||
#endif | ||
|
||
struct Table { | ||
u16 nameSize; | ||
char fileName[nameSize]; | ||
u32 offset; | ||
u32 size; | ||
u8 file[size] @ offset; | ||
#ifdef __IMHEX__ | ||
hex::core::add_virtual_file(fileName, file); | ||
#endif | ||
} [[name(std::string::to_string(fileName))]]; | ||
|
||
struct ARC { | ||
u32 count; | ||
Table table[count]; | ||
}; | ||
|
||
ARC arc @ 0x00; |
Binary file not shown.