20,500
edits
m (wording) |
m (wording) |
||
| Line 105: | Line 105: | ||
*Valid palette indices start at 1. Palettes are stored per-level in level#_palette.pal files in a pal/ subdirectory of GameDataFolder, corresponding to how .raw and .sep files are stored in raw/ and sep/ subdirectories. Each palette consists of 256 32-bit colors and takes up 1024 bytes. | *Valid palette indices start at 1. Palettes are stored per-level in level#_palette.pal files in a pal/ subdirectory of GameDataFolder, corresponding to how .raw and .sep files are stored in raw/ and sep/ subdirectories. Each palette consists of 256 32-bit colors and takes up 1024 bytes. | ||
*Each level#_palette.pal file contains between 85 and 179 palettes, not counting the first palette (index 0) at the start of each .pal file which is always blank. | *Each level#_palette.pal file contains between 85 and 179 palettes, not counting the first palette (index 0) at the start of each .pal file which is always blank. | ||
*Two new pixel formats were added, and are the only formats used on PS2: type 16 for opaque textures, meaning 32-bit RGB with ignored alpha, and type 17 for transparent textures. | *Two new pixel formats were added, and are the only formats used on PS2: type 16 for opaque textures, meaning 32-bit RGB with ignored alpha byte (always set to 0x80), and type 17 for transparent textures. | ||
*The pixel data (color indices) can be stored either in the .raw file (pointer field at 0xA0) or in the .sep file (pointer at 0xA4). | *The pixel data (color indices) can be stored either in the .raw file (pointer field at 0xA0) or in the .sep file (pointer at 0xA4). | ||
*Each pixel is stored as a 1-byte index into the image's chosen color palette. | |||
Here is how the end of TXMPrl_1 looks in level3_Final.dat of the English retail PS2 version. | Here is how the end of TXMPrl_1 looks in level3_Final.dat of the English retail PS2 version. | ||
| Line 113: | Line 114: | ||
|- ALIGN=CENTER VALIGN=TOP | |- ALIGN=CENTER VALIGN=TOP | ||
{{OBDtr| 0x90 | int32 |C8FFC8| 56 00 00 00 | 86 | index of the 256-color palette used by this texture (starts at 0x15800 in level3_palette.pal) }} | {{OBDtr| 0x90 | int32 |C8FFC8| 56 00 00 00 | 86 | index of the 256-color palette used by this texture (starts at 0x15800 in level3_palette.pal) }} | ||
{{OBDtr| 0x94 | int32 |C8FFFF| 10 00 00 00 | 16 | | {{OBDtr| 0x94 | int32 |C8FFFF| 10 00 00 00 | 16 | pixel format 16 (indexed 32-bit RGB with inactive alpha) }} | ||
{{OBDtr| 0x98 | link |FFC8FF| 00 00 00 00 | 0 | link to a [[OBD:TXAN|TXAN]] file; used if this texture is animated }} | {{OBDtr| 0x98 | link |FFC8FF| 00 00 00 00 | 0 | link to a [[OBD:TXAN|TXAN]] file; used if this texture is animated }} | ||
{{OBDtr| 0x9C | link |FFC800| 00 00 00 00 | 0 | link to a TXMP file that contains the environment map }} | {{OBDtr| 0x9C | link |FFC800| 00 00 00 00 | 0 | link to a TXMP file that contains the environment map }} | ||
{{OBDtr| 0xA0 | offset |C800C8| C0 05 00 00 |00 00 05 C0| offset of pixel data in the .raw file }} | {{OBDtr| 0xA0 | offset |C800C8| C0 05 00 00 |00 00 05 C0| offset of pixel data in the .raw file }} | ||
{{OBDtr| 0xA4 | offset |C87C64| 00 00 00 00 | 0 | offset of pixel data in the .sep file }} | {{OBDtr| 0xA4 | offset |C87C64| 00 00 00 00 | 0 | offset of pixel data in the .sep file }} | ||
{{OBDtr| 0xA8 | int32 |B0C3D4| 00 00 00 00 | 0 | always 0; | {{OBDtr| 0xA8 | int32 |B0C3D4| 00 00 00 00 | 0 | always 0; presumably the same "material type" (set at runtime) as for Windows demo and Mac }} | ||
{{OBDtr| 0xAC | char[4] |B0C3D4| AD DE AD DE | dead | | {{OBDtr| 0xAC | char[4] |B0C3D4| AD DE AD DE | dead | presumably the same texture name pointer (set at runtime) as for Windows demo and Mac }} | ||
{{OBDtr| 0xB0 | char[4] |B0C3D4| AD DE AD DE | dead | | {{OBDtr| 0xB0 | char[4] |B0C3D4| AD DE AD DE | dead | presumably the same rendering optimization flags (runtime) as for Windows demo and Mac }} | ||
{{OBDtr| 0xB4 | char[12] |B0C3D4| AD DE | dead | completely unused bytes (not part of the template) }} | {{OBDtr| 0xB4 | char[12] |B0C3D4| AD DE | dead | completely unused bytes (not part of the template) }} | ||
|} | |} | ||