diff options
| author | Alex Marshall <SquidMan72@gmail.com> | 2009-02-12 22:11:50 -0800 |
|---|---|---|
| committer | Alex Marshall <SquidMan72@gmail.com> | 2009-02-12 22:11:50 -0800 |
| commit | 1765efe7e1cdef59716aea343e1e6f06b336e785 (patch) | |
| tree | bfb5836b507788e57aeda4d851ac3ef9afd57c19 /brlan.h | |
| parent | 8c827306811e08a719cd3376d1cce6b3a96d3202 (diff) | |
Updated animtypes (a little bit) made brlan.c not spit out useless info, updated some info on pai1, and made code less RLPA biased (which is retarded). All changes were only on C files.
Diffstat (limited to '')
| -rwxr-xr-x | brlan.h | 55 |
1 files changed, 32 insertions, 23 deletions
@@ -3,27 +3,32 @@ #include "types.h" -typedef char fourcc[4]; - typedef enum { - RLPA_ENTRY = 0 -} entry_type; + RLPA_ENTRY = 0, + RLTS_ENTRY = 1, + RLVI_ENTRY = 2, + RLVC_ENTRY = 3, + RLMC_ENTRY = 4, + RLTP_ENTRY = 5 +} brlan_entry_type; typedef struct { - char magic[4]; // "pai1" in ASCII. + fourcc magic; // "pai1" in ASCII. u32 size; // Size of section, which is rest of the file. (header.file_size - header.offset_pai1) - u32 unk1; // Unknown? - u16 flags; // Flags? + u16 framesize; // Framesize + u8 flags; // Flags + u8 unk1; // Unknown + u16 num_timgs; // Number of timgs? u16 num_entries; // Number of tags in the brlan. u32 unk2; // Only if bit 25 of flags is set. u32 entry_offset; // Offset to entries. (Relative to start of pai1 header.) -} pai1_header_type2; +} brlan_pai1_header_type2; typedef struct { - char magic[4]; // "RLAN" in ASCII. + fourcc magic; // "RLAN" in ASCII. u32 unk1; // Always 0xFEFF 0x0008. Possibly a versioning string. u32 file_size; // Size of whole file, including the header. u16 pai1_offset; // The offset to the pai1 header from the start of file. @@ -32,22 +37,26 @@ typedef struct typedef struct { - char magic[4]; // "pai1" in ASCII. + fourcc magic; // "pai1" in ASCII. u32 size; // Size of section, which is rest of the file. (header.file_size - header.offset_pai1) - u32 unk1; // Unknown - u16 flags; // Flags + u16 framesize; // Framesize + u8 flags; // Flags + u8 unk1; // Unknown + u16 num_timgs; // Number of timgs? u16 num_entries; // Number of tags in the brlan. -} pai1_universal; +} brlan_pai1_universal; typedef struct { - char magic[4]; // "pai1" in ASCII. + fourcc magic; // "pai1" in ASCII. u32 size; // Size of section, which is rest of the file. (header.file_size - header.offset_pai1) - u32 unk1; // Unknown? - u16 flags; // Flags? + u16 framesize; // Framesize + u8 flags; // Flags + u8 unk1; // Unknown + u16 num_timgs; // Number of timgs? u16 num_entries; // Number of tags in the brlan. u32 entry_offset; // Offset to entries. (Relative to start of pai1 header.) -} pai1_header_type1; +} brlan_pai1_header_type1; typedef struct { @@ -58,18 +67,18 @@ typedef struct typedef struct { - char magic[4]; // "RLPA" in ASCII + fourcc magic; u8 entry_count; // How many entries in this chunk. u8 pad1; // All cases I've seen is zero. u8 pad2; // All cases I've seen is zero. u8 pad3; // All cases I've seen is zero. -} RLPA_header; +} tag_header; typedef struct { u32 offset; // Offset to the data pointed to by this entry. // Relative to the start of the RLPA header. -} RLPA_entry; +} tag_entry; typedef struct { @@ -77,17 +86,17 @@ typedef struct u16 coord_count; // How many coordinates. u16 pad1; // All cases I've seen is zero. u32 unk1; // ??? In every case I've seen, it is \x00\x00\x00\x0C. -} RLPA_entryinfo; +} tag_entryinfo; typedef struct { // Bits not listed here are currently unknown. u32 part1; // If Bit 9 is set in flags, this is an f32, with a coordinate. (Bit 17 seems to act the same) u32 part2; // If Bit 16 is set in flags, this is an f32, with another coordinate. (Bit 17 seems to act the same) u32 part3; // With Bit 16 set in flags, this seems to be yet another coordinate. (Bit 17 seems to act the same) -} RLPA_data; - +} tag_data; +void parse_brlan(char* filename); |
