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
This commit is contained in:
Dexrn ZacAttack
2024-11-17 04:58:02 -08:00
committed by GitHub
parent 61d3e110fb
commit 85f5541350
3 changed files with 27 additions and 0 deletions

26
patterns/arc.hexpat Normal file
View File

@@ -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;