Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
trs:file_formats [2019/08/09 06:08] stohrendorftrs:file_formats [2021/04/29 21:53] (current) – [TR1 Level Format] zdimension
Line 16: Line 16:
 uint32_t NumImages; // number of texture images (4 bytes) uint32_t NumImages; // number of texture images (4 bytes)
 tr_image8 Images8[NumImages]; // 8-bit (palettized) images (NumImages * 65536 bytes) tr_image8 Images8[NumImages]; // 8-bit (palettized) images (NumImages * 65536 bytes)
-uint32_t Unused; // 32-bit unused value (4 bytes)+uint32_t Unused; // supposed to be the level number but TOM2PC didn't allow changing it, always 0 (4 bytes)
 uint16_t NumRooms; // number of rooms (2 bytes) uint16_t NumRooms; // number of rooms (2 bytes)
 tr_room Rooms[NumRooms]; // room list (variable length) tr_room Rooms[NumRooms]; // room list (variable length)
Line 95: Line 95:
 tr_teximage8 Images8[NumImages]; // 8-bit (palettized) images (NumImages * 65536 bytes) tr_teximage8 Images8[NumImages]; // 8-bit (palettized) images (NumImages * 65536 bytes)
 tr_teximage16 Images16[NumImages]; // 16-bit (ARGB) images (NumImages * 131072 bytes) tr_teximage16 Images16[NumImages]; // 16-bit (ARGB) images (NumImages * 131072 bytes)
-uint32_t Unused; // 32-bit unused value (4 bytes)+uint32_t Unused; // supposed to be the level number but TOM2PC didn't allow changing it, always 0 (4 bytes)
 uint16_t NumRooms; // number of rooms (2 bytes) uint16_t NumRooms; // number of rooms (2 bytes)
 tr2_room Rooms[NumRooms]; // room list (variable length) tr2_room Rooms[NumRooms]; // room list (variable length)
Line 167: Line 167:
 tr_image16 Images16[NumImages]; // 16-bit (ARGB) images (NumImages * 131072 bytes) (absent from TR1) tr_image16 Images16[NumImages]; // 16-bit (ARGB) images (NumImages * 131072 bytes) (absent from TR1)
 // "VICT.TR2" stops here, nothing after // "VICT.TR2" stops here, nothing after
-uint32_t Unused; // 32-bit unused value (4 bytes)+uint32_t Unused; // supposed to be the level number but TOM2PC didn't allow changing it, always 0 (4 bytes)
 uint16_t NumRooms; // number of rooms (2 bytes) uint16_t NumRooms; // number of rooms (2 bytes)
 tr3_room Rooms[NumRooms]; // room list (variable length) tr3_room Rooms[NumRooms]; // room list (variable length)
Line 258: Line 258:
 uint8_t LevelData_Compressed[LevelData_CompSize]; // zlib-compressed level data chunk (LevelData_CompSize bytes) uint8_t LevelData_Compressed[LevelData_CompSize]; // zlib-compressed level data chunk (LevelData_CompSize bytes)
 { {
-    uint32_t Unused; // 32-bit unused value, always 0 (4 bytes)+    uint32_t Unused; // supposed to be the level number but TOM2PC didn't allow changing it, always 0 (4 bytes)
     uint16_t NumRooms; // number of rooms (2 bytes)     uint16_t NumRooms; // number of rooms (2 bytes)
     tr4_room Rooms[NumRooms]; // room list (variable length)     tr4_room Rooms[NumRooms]; // room list (variable length)
Line 316: Line 316:
     uint32_t NumSampleIndices; // number of sample indices to follow (4 bytes)  +     uint32_t NumSampleIndices; // number of sample indices to follow (4 bytes)  +
     uint32_t SampleIndices[NumSampleIndices]; // sample indices (NumSampleIndices * 4 bytes)     uint32_t SampleIndices[NumSampleIndices]; // sample indices (NumSampleIndices * 4 bytes)
 +    uint8_t Separator[6]; // 6 0x00 bytes
 } }
-uint8_t Separator[6]; // 6 0x00 bytes 
 uint32_t NumSamples; // number of sound samples (4 bytes) uint32_t NumSamples; // number of sound samples (4 bytes)
 tr4_sample Samples[NumSamples]; // sound samples (this is the last part, so you can simply read until EOF) tr4_sample Samples[NumSamples]; // sound samples (this is the last part, so you can simply read until EOF)
Line 359: Line 359:
 uint32_t LevelData_CompSize; // compressed size (in bytes) of the level data chunk, equal to LevelData_UncompSize (4 bytes) uint32_t LevelData_CompSize; // compressed size (in bytes) of the level data chunk, equal to LevelData_UncompSize (4 bytes)
 // NOT COMPRESSED // NOT COMPRESSED
-uint32_t Unused; // 32-bit unused value, always 0 (4 bytes)+uint32_t LevelNumber; // supposed to be the level number but TOM2PC didn't allow changing it, always 0 (4 bytes)
 uint16_t NumRooms; // number of rooms (2 bytes) uint16_t NumRooms; // number of rooms (2 bytes)
 tr5_room Rooms[NumRooms]; // room list (variable length) tr5_room Rooms[NumRooms]; // room list (variable length)
trs/file_formats.1565330897.txt.gz · Last modified: by stohrendorf
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0