mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-28 07:47:02 -05:00
24 lines
413 B
Rust
24 lines
413 B
Rust
#include <type/magic.pat>
|
|
#include <type/size.pat>
|
|
|
|
enum WADType : char {
|
|
Internal = 'I',
|
|
Patch = 'P'
|
|
};
|
|
|
|
struct FileLump {
|
|
u32 filePos;
|
|
type::Size<u32> size;
|
|
char name[8];
|
|
|
|
u8 data[size] @ filePos [[sealed]];
|
|
};
|
|
|
|
struct WAD {
|
|
WADType type;
|
|
type::Magic<"WAD"> identification;
|
|
u32 numLumps;
|
|
FileLump *infoTable[numLumps] : u32;
|
|
};
|
|
|
|
WAD wad @ 0x00; |