mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-28 07:47:02 -05:00
patterns: Added Radcore Cement v1.2 file pattern (#382)
* Add Radcore Cement file pattern * Update pattern list in README.md
This commit is contained in:
49
patterns/rcf_v1_2.hexpat
Normal file
49
patterns/rcf_v1_2.hexpat
Normal file
@@ -0,0 +1,49 @@
|
||||
// Ported from LRCFB @ https://donutteam.com/@lucasc190/releases
|
||||
// Tested with files from:
|
||||
// - Hulk (PS2)
|
||||
// - Tetris Worlds (Gamecube)
|
||||
// - The Simpsons Hit and Run (PC)
|
||||
|
||||
#pragma author blu
|
||||
#pragma description Radcore Cement Library file header (.rcf) v1.2
|
||||
|
||||
import std.core;
|
||||
import type.time;
|
||||
|
||||
struct DataEntry {
|
||||
u32 hash;
|
||||
u32 position;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct NameEntry {
|
||||
le u32 length;
|
||||
char name[length];
|
||||
le type::time32_t time;
|
||||
};
|
||||
|
||||
struct Header {
|
||||
char signature[32];
|
||||
u8 version_major;
|
||||
u8 version_minor;
|
||||
bool is_bigendian; // true for gamecube
|
||||
u8 unk_0; //always "1" according to LRCFB
|
||||
if (is_bigendian) {
|
||||
std::core::set_endian(std::mem::Endian::Big);
|
||||
}
|
||||
u32 alignment;
|
||||
u32 unk_1;
|
||||
u32 directory_position;
|
||||
$ = directory_position;
|
||||
s32 data_count;
|
||||
u32 names_position;
|
||||
u32 data_position;
|
||||
le u32 data_pointer;
|
||||
DataEntry data_entries[data_count];
|
||||
$ = names_position;
|
||||
le u32 names_count;
|
||||
le u32 names_pointer;
|
||||
NameEntry name_entries[names_count];
|
||||
};
|
||||
|
||||
Header header @ 0x00;
|
||||
Reference in New Issue
Block a user