mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
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:
@@ -29,6 +29,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
|
||||
| AFE2 | | [`patterns/afe2.hexpat`](patterns/afe2.hexpat) | Nintendo Switch Atmosphère CFW Fatal Error log |
|
||||
| ANI | `application/x-navi-animation` | [`patterns/ani.hexpat`](patterns/ani.hexpat) | Windows Animated Cursor file |
|
||||
| AR | `application/x-archive` | [`patterns/ar.hexpat`](patterns/ar.hexpat) | Static library archive files |
|
||||
| ARC | | [`patterns/arc.hexpat`(patterns/arc.hexpat) | Minecraft Legacy Console Edition ARC files |
|
||||
| ARIA2 | | [`patterns/aria2.hexpat`](patterns/aria2.hexpat) | ARIA2 Download Manager Control files |
|
||||
| ARM VTOR | | [`patterns/arm_cm_vtor.hexpat`](patterns/arm_cm_vtor.hexpat) | ARM Cortex M Vector Table Layout |
|
||||
| Bastion | | [`patterns/bastion/*`](https://gitlab.com/EvelynTSMG/imhex-bastion-pats) | Various [Bastion](https://en.wikipedia.org/wiki/Bastion_(video_game)) files |
|
||||
|
||||
26
patterns/arc.hexpat
Normal file
26
patterns/arc.hexpat
Normal 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;
|
||||
BIN
tests/patterns/test_data/arc.hexpat.arc
Normal file
BIN
tests/patterns/test_data/arc.hexpat.arc
Normal file
Binary file not shown.
Reference in New Issue
Block a user