Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
| NTFS | | [`patterns/fs/ntfs.hexpat`](patterns/fs/ntfs.hexpat) | NTFS (NT File System) |
| OGG | `audio/ogg` | [`patterns/ogg.hexpat`](patterns/ogg.hexpat) | OGG Audio format |
| ORP / ORS | | [`patterns/orp.hexpat`](patterns/orp.hexpat) | OpenRGB profile format |
| PACK | | [`patterns/roblox_pack.hexpat`](patterns/roblox_pack.hexpat) | Roblox shader archive format |
| PAK | | [`patterns/xgspak.hexpat`](patterns/xgspak.hexpat) | Exient XGS Engine Pak files |
| PCAP | `application/vnd.tcpdump.pcap` | [`patterns/pcap.hexpat`](patterns/pcap.hexpat) | pcap header and packets |
| PcapNG | `application/vnd.tcpdump.pcap` | [`patterns/pcapng.hexpat`](patterns/pcapng.hexpat) | pcapng header and packets |
Expand Down
33 changes: 33 additions & 0 deletions patterns/roblox_pack.hexpat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma author marduk.ru
#pragma description Roblox .pack shader archive format
#pragma magic [ 52 42 58 53 ] @ 0x00

import std.string;
import hex.core;
import type.magic;

struct Header {
type::Magic<"RBXS"> magic;
u32 fileCount;
};

struct FileIndex {
char name[0x40];
u128 md5Hash;
u32 offset;
u32 size;
u64 reserved;

u8 file[size] @ offset;

#ifdef __IMHEX__
hex::core::add_virtual_file(name, file);
#endif
} [[name(name)]];

struct RBXPack {
Header header;
FileIndex files[header.fileCount];
};

RBXPack pack @ 0x0;
Binary file added tests/patterns/test_data/roblox_pack.hexpat.pack
Binary file not shown.