Files
ImHex-Patterns/patterns/wad.hexpat
Mrmaxmeier c533017d0b git: Various style fixes everywhere, removing whitespaces (#321)
* repo-wide: trim trailing spaces

Note: This doesn't touch the .tbl files in encodings/ since they include
meaningful trailing spaces (`20= `)

* patterns: clean up duplicate semicolons

* ELF: add header magic check

* glTF: use type::Magic for magic value

* glTF: check that the file size in the header matches

* xgstexture: fix generics syntax for magic value

* JPEG: define hex enum with 0x00 instead of 0X00

* CI: update deprecated actions

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-11-24 11:41:26 +01:00

27 lines
433 B
Rust

#pragma author WerWolv
#pragma description DOOM WAD Archive
import type.magic;
import type.size;
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;