123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
-
- TR4:
- * amount_cinematic_frames is bitu32, not bitu16
- * object_texture last 2 longs are xsize and ysize of texture
- * object_texture::
- I gess that in TR4 files the object textures Id used for the movables are the same used in the WAD file.
- The object texture is interpreted some different,
-
-
- First word in the texture ID:
-
- for rectangles in model:
-
- Bits 0-11 texture Id (signed) if negative the texture is fliped.
- Bits 12-15 unused, (0000 if Id is positive, 1111 if negative)
-
- for Triangles in model:
-
- Bits 0-11 texture Id (always positive)
- Bits 12-14 Triangle kind.
- Bits 15 normal/flip
-
- for secound word:
-
- 0= texture opaque
- 1=texture semi-transparent
- 2=transparent.
-
- TR5:
- * object_textures are now 40 bytes
- * after "SPR" is an unknown byte
- * before "TEX" is an unknown byte
- * moveable after each is unknown int
- * object_texture last 2 longs are xsize and ysize of texture
-
-
- /////////////////////////////////////
- // TR5 Format
- /////////////////////////////////////
-
-
- unsigned long Version
- unsigned char Unknown[6]
-
-
- // 32 bits textures
- unsigned long UCompSize
- unsigned long CompSize
- unsigned char *CompData
-
- // 16 bits textures
- unsigned long UCompSize
- unsigned long CompSize
- unsigned char *CompData
-
- // Sprite textures
- unsigned long UCompSize
- unsigned long CompSize
- unsigned char *CompData
-
- unsigned char Unknown[44]
- unsigned int NumRooms
-
-
- // Rooms
- // All rooms start with the following header:
-
- unsigned int Unknown
- unsigned long RoomCode (0x0414C4558)
- unsigned char Unknowm[24]
-
- // After the header comes the following format:
-
- unsigned long RoomX
- unsigned long Unknown (Maybe RoomY?)
- unsigned long RoomZ
- unsigned long Unknown[2]
- unsigned int XSize
- unsigned int ZSize
-
- // The room color. It uses 4 bytes and it's in RGB format (I don't know what byte 4 is)
- TR_Color4 RoomColor
-
- // After here comes a unknown format that contains the number of static meshes, vertices,
- // rectangles and more. They uses 30 bytes, but 28 are unknown for me. There is maybe a
- // pointer to the 'real' structure, or maybe a special code like the RoomCode. (It looks
- // like TR5 uses come sort of chunks)
-
-
- // Static Meshes
- unsigned int Unknown
- unsigned int NumStaticMeshes
- unsigned char Unknown[26]
-
- // Vertices
- unsigned int Unknown
- unsigned int NumVertices
- unsigned char Unknown[26]
-
- // Unknown, but format looks the same. Sometimes 0 and sometimes very large (Maybe the
- // value is signed?).
- unsigned int Unknown
- unsigned int Unknown
- unsigned char Unknown[26]
-
- // Rectangles
- unsigned int Unknown
- unsigned int NumVertices
- unsigned char Unknown[26]
-
-
- // This is all I know! I can see the sectors, but there are many unknown before it. A way
- // to search for the sectors is searching for a value of 129 (A wall). The sectors uses
- // 8 bytes for each sector. Use XSize and ZSize to read it and remember that the four
- // corners must be a wall (129, 5th byte). If you search for the 4 corners with a value of
- // 129 (byte 7 is 129 too), the change that you find it is very large.
|