Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
trs:file_formats [2019/08/08 12:31]
popov72 TR4 format: added the 3 TEX bytes and the 6 separator bytes info
trs:file_formats [2019/08/09 08:08] (current)
stohrendorf
Line 14: Line 14:
 <code cpp> <code cpp>
 uint32_t Version; // version (4 bytes) uint32_t Version; // version (4 bytes)
-uint32_t ​NumTextiles; // number of texture ​tiles (4 bytes) +uint32_t ​NumImages; // number of texture ​images ​(4 bytes) 
-tr_textile8 Textile8[NumTextiles]; // 8-bit (palettized) ​textiles ​(NumTextiles ​* 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; // 32-bit unused value (4 bytes)
 uint16_t NumRooms; // number of rooms (2 bytes) uint16_t NumRooms; // number of rooms (2 bytes)
Line 92: Line 92:
 tr_colour Palette[256];​ // 8-bit palette (768 bytes) tr_colour Palette[256];​ // 8-bit palette (768 bytes)
 tr_colour4 Palette16[256];​ //  (1024 bytes) tr_colour4 Palette16[256];​ //  (1024 bytes)
-uint32_t ​NumTextiles; // number of texture ​tiles (4 bytes) +uint32_t ​NumImages; // number of texture ​images ​(4 bytes) 
-tr_textile8 Textile8[NumTextiles]; // 8-bit (palettized) ​textiles ​(NumTextiles ​* 65536 bytes) +tr_teximage8 Images8[NumImages]; // 8-bit (palettized) ​images ​(NumImages ​* 65536 bytes) 
-tr_textile16 Textile16[NumTextiles]; // 16-bit (ARGB) ​textiles ​(NumTextiles ​* 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; // 32-bit unused value (4 bytes)
 uint16_t NumRooms; // number of rooms (2 bytes) uint16_t NumRooms; // number of rooms (2 bytes)
Line 163: Line 163:
 tr_colour Palette[256];​ // 8-bit palette (768 bytes) tr_colour Palette[256];​ // 8-bit palette (768 bytes)
 tr_colour4 Palette16[256];​ //  (1024 bytes) tr_colour4 Palette16[256];​ //  (1024 bytes)
-uint32_t ​NumTextiles; // number of texture ​tiles (4 bytes) +uint32_t ​NumImages; // number of texture ​images ​(4 bytes) 
-tr_textile8 Textile8[NumTextiles]; // 8-bit (palettized) ​textiles ​(NumTextiles ​* 65536 bytes) +tr_image8 Images8[NumImages]; // 8-bit (palettized) ​images ​(NumImages ​* 65536 bytes) 
-tr_textile16 Textile16[NumTextiles]; // 16-bit (ARGB) ​textiles ​(NumTextiles ​* 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; // 32-bit unused value (4 bytes)
Line 233: Line 233:
 <code cpp> <code cpp>
 uint32_t Version; // version (4 bytes) uint32_t Version; // version (4 bytes)
-uint16_t ​NumRoomTextiles; // number of non bumped ​room tiles (2 bytes) +uint16_t ​NumRoomImages; // number of non.bumpmapped ​room images ​(2 bytes) 
-uint16_t ​NumObjTextiles; // number of object ​tiles (2 bytes) +uint16_t ​NumObjImages; // number of object ​images ​(2 bytes) 
-uint16_t ​NumBumpTextiles; // number of bumped ​room tiles (2 bytes) +uint16_t ​NumBumpmaps; // number of bump-mapped ​room images ​(2 bytes) 
-uint32_t ​Textile32_UncompSize; // uncompressed size (in bytes) of the 32-bit textures chunk (4 bytes) +uint32_t ​Image32_UncompSize; // uncompressed size (in bytes) of the 32-bit textures chunk (4 bytes) 
-uint32_t ​Textile32_CompSize; // compressed size (in bytes) of the 32-bit textures chunk (4 bytes) +uint32_t ​Image32_CompSize; // compressed size (in bytes) of the 32-bit textures chunk (4 bytes) 
-uint8_t ​Textile32_Compressed[Textile32_CompSize]; // zlib-compressed 32-bit textures chunk (Textile32_CompSize ​bytes)+uint8_t ​Image32_Compressed[Image32_CompSize]; // zlib-compressed 32-bit textures chunk (Image32_CompSize ​bytes)
 { {
-    ​tr4_textile32 Textile32[NumRoomTextiles ​NumObjTextiles ​NumBumpTextiles];+    ​tr4_image32 Image32[NumRoomImages ​NumObjImages ​NumBumpmaps];
 } }
-uint32_t ​Textile16_UncompSize; // uncompressed size (in bytes) of the 16-bit textures chunk (4 bytes) +uint32_t ​Image16_UncompSize; // uncompressed size (in bytes) of the 16-bit textures chunk (4 bytes) 
-uint32_t ​Textile16_CompSize; // compressed size (in bytes) of the 16-bit textures chunk (4 bytes) +uint32_t ​Image16_CompSize; // compressed size (in bytes) of the 16-bit textures chunk (4 bytes) 
-uint8_t ​Textile16_Compressed[Textile32_CompSize]; // zlib-compressed 16-bit textures chunk (Textile16_CompSize ​bytes)+uint8_t ​Image16_Compressed[Image32_CompSize]; // zlib-compressed 16-bit textures chunk (Image16_CompSize ​bytes)
 { {
-    ​tr_textile16 Textile16[NumRoomTextiles ​NumObjTextiles ​NumBumpTextiles];+    ​tr_image16 Image16[NumRoomImages ​NumObjImages ​NumBumpmaps];
 } }
-uint32_t ​Textile32Misc_UncompSize; // uncompressed size (in bytes) of the 32-bit misc textures chunk (4 bytes), should always be 524288 +uint32_t ​Image32Misc_UncompSize; // uncompressed size (in bytes) of the 32-bit misc textures chunk (4 bytes), should always be 524288 
-uint32_t ​Textile32Misc_CompSize; // compressed size (in bytes) of the 32-bit misc textures chunk (4 bytes) +uint32_t ​Image32Misc_CompSize; // compressed size (in bytes) of the 32-bit misc textures chunk (4 bytes) 
-uint8_t ​Textile32Misc_Compressed[Textile32Misc_CompSize]; // zlib-compressed 32-bit misc textures chunk (Textile32Misc_CompSize ​bytes)+uint8_t ​Image32Misc_Compressed[Image32Misc_CompSize]; // zlib-compressed 32-bit misc textures chunk (Image32Misc_CompSize ​bytes)
 { {
-    ​tr4_textile32 Textile32Misc[2];+    ​tr4_image32 Image32Misc[2];
 } }
 uint32_t LevelData_UncompSize;​ // uncompressed size (in bytes) of the level data chunk (4 bytes) uint32_t LevelData_UncompSize;​ // uncompressed size (in bytes) of the level data chunk (4 bytes)
Line 332: Line 332:
 <code cpp> <code cpp>
 uint32_t Version; // version (4 bytes) uint32_t Version; // version (4 bytes)
-uint16_t ​NumRoomTextiles; // number of non bumped ​room tiles (2 bytes) +uint16_t ​NumRoomImages; // number of non-bumpmapped ​room images ​(2 bytes) 
-uint16_t ​NumObjTextiles; // number of object ​tiles (2 bytes) +uint16_t ​NumObjImages; // number of object ​images ​(2 bytes) 
-uint16_t ​NumBumpTextiles; // number of bumped room tiles (2 bytes) +uint16_t ​NumBumpmaps; // number of bumpmaps ​(2 bytes) 
-uint32_t ​Textile32_UncompSize; // uncompressed size (in bytes) of the 32-bit textures chunk (4 bytes) +uint32_t ​Image32_UncompSize; // uncompressed size (in bytes) of the 32-bit textures chunk (4 bytes) 
-uint32_t ​Textile32_CompSize; // compressed size (in bytes) of the 32-bit textures chunk (4 bytes) +uint32_t ​Image32_CompSize; // compressed size (in bytes) of the 32-bit textures chunk (4 bytes) 
-uint8_t ​Textile32_Compressed[Textile32_CompSize]; // zlib-compressed 32-bit textures chunk (Textile32_CompSize ​bytes)+uint8_t ​Image32_Compressed[Image32_CompSize]; // zlib-compressed 32-bit textures chunk (Image32_CompSize ​bytes)
 { {
-    ​tr4_textile32 Textile32[NumRoomTextiles ​NumObjTextiles ​NumBumpTextiles];+    ​tr4_image32 Image32[NumRoomImages ​NumObjImages ​NumBumpmaps];
 } }
-uint32_t ​Textile16_UncompSize; // uncompressed size (in bytes) of the 16-bit textures chunk (4 bytes) +uint32_t ​Image16_UncompSize; // uncompressed size (in bytes) of the 16-bit textures chunk (4 bytes) 
-uint32_t ​Textile16_CompSize; // compressed size (in bytes) of the 16-bit textures chunk (4 bytes) +uint32_t ​Image16_CompSize; // compressed size (in bytes) of the 16-bit textures chunk (4 bytes) 
-uint8_t ​Textile16_Compressed[Textile32_CompSize]; // zlib-compressed 16-bit textures chunk (Textile16_CompSize ​bytes)+uint8_t ​Image16_Compressed[Image32_CompSize]; // zlib-compressed 16-bit textures chunk (Image16_CompSize ​bytes)
 { {
-    ​tr_textile16 Textile16[NumRoomTextiles ​NumObjTextiles ​NumBumpTextiles];+    ​tr_image16 Image16[NumRoomImages ​NumObjImages ​NumBumpmaps];
 } }
-uint32_t ​Textile32Misc_UncompSize; // uncompressed size (in bytes) of the 32-bit misc textures chunk (4 bytes), should always be 786432 +uint32_t ​Image32Misc_UncompSize; // uncompressed size (in bytes) of the 32-bit misc textures chunk (4 bytes), should always be 786432 
-uint32_t ​Textile32Misc_CompSize; // compressed size (in bytes) of the 32-bit misc textures chunk (4 bytes) +uint32_t ​Image32Misc_CompSize; // compressed size (in bytes) of the 32-bit misc textures chunk (4 bytes) 
-uint8_t ​Textile32Misc_Compressed[Textile32Misc_CompSize]; // zlib-compressed 32-bit misc textures chunk (Textile32Misc_CompSize ​bytes)+uint8_t ​Image32Misc_Compressed[Image32Misc_CompSize]; // zlib-compressed 32-bit misc textures chunk (Image32Misc_CompSize ​bytes)
 { {
-    ​tr4_textile32 Textile32Misc[3];+    ​tr4_image32 Image32Misc[3];
 } }
 uint16_t LaraType; uint16_t LaraType;
Line 463: Line 463:
   * There are no more 8-bit textures.   * There are no more 8-bit textures.
   * There are now 32-bit textures.   * There are now 32-bit textures.
-  * Texture ​tiles are now divided into three parts: //non-bumped ​room texture ​tiles//, //model texture ​tiles// and //bumped ​room texture ​tiles//.+  * Texture ​atlases ​are now divided into three parts: //non-bumpmapped ​room texture ​atlases//, //model texture ​atlases// and //bumpmapped ​room texture ​atlases//.
   * Level file divided in several chunks, with each chunk compressed using //zlib//:   * Level file divided in several chunks, with each chunk compressed using //zlib//:
-    * Chunk 1: 32-bit texture ​tiles+    * Chunk 1: 32-bit texture ​atlases
-    * Chunk 2: 16-bit texture ​tiles.+    * Chunk 2: 16-bit texture ​atlases.
     * Chunk 3: 32-bit //sky and font graphics//.     * Chunk 3: 32-bit //sky and font graphics//.
     * Chunk 4: Level data.     * Chunk 4: Level data.
Line 501: Line 501:
 ===== Changes in TR4 vs. TR5 ===== ===== Changes in TR4 vs. TR5 =====
  
-  * There is no more //bumped ​room texture ​tiles// block.+  * There is no more //bump-mapped ​room texture ​atlases// block.
   * There are now two extra ''​%%uint16_t%%''​ values after last texture block specifying [[trs:​file_formats#​LaraType|Lara type]] and [[trs:​file_formats#​WeatherType|weather type]].   * There are now two extra ''​%%uint16_t%%''​ values after last texture block specifying [[trs:​file_formats#​LaraType|Lara type]] and [[trs:​file_formats#​WeatherType|weather type]].
   * Also, it is followed by 28 bytes zero padding.   * Also, it is followed by 28 bytes zero padding.
trs/file_formats.txt · Last modified: 2019/08/09 08:08 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0