-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfolder.hexpat
More file actions
28 lines (23 loc) · 812 Bytes
/
folder.hexpat
File metadata and controls
28 lines (23 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <std/mem>
#include <hex/core>
#pragma author MarkusMaal
#pragma description Flipnic/Virtual filesystem subfolders
#pragma endian little
struct Data {
u8 Section[parent.Size];
};
struct MemEntry {
char Filename[while(std::mem::read_unsigned($, 1) != 0x0)];
padding[while(std::mem::read_unsigned($, 1) == 0x0 && ($ % 0x40 != 0x3C))];
u32 Offset;
const u32 Size = std::mem::read_unsigned($+0x3C, 4) - Offset;
Data Data @ Offset;
hex::core::add_virtual_file(Filename, Data);
} [[single_color]];
struct TOCMarker {
char Marker[while(std::mem::read_unsigned($, 1) != 0x0)];
padding[while(std::mem::read_unsigned($, 1) == 0x0)];
u32 Offset;
} [[single_color]];
MemEntry TOC[while(std::mem::read_unsigned($, 4) != 0x646E452A)] @ 0x00;
TOCMarker StreamEndPointer @ $;