OBD:TXMP: Difference between revisions

13 bytes added ,  8 December 2023
m
changed family
(→‎PS2 implementation: finishing/fixing up the PS2 TXMP writeup)
m (changed family)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{OBD_File_Header | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map | family=Generic | align=center}}
{{OBD_File_Header | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map | family=General | align=center}}


TXMP is the only known instance type that is interpreted differently by the three kinds of Oni engines on the three plaftorms (Windows, Mac and PS2).
TXMP is the only known instance type that is interpreted differently by the three kinds of Oni engines on the three plaftorms (Windows, Mac and PS2).
Line 105: Line 105:
*The extra 4 bytes come from a palette index (int32) inserted at 0x90, before the pixel format (which is shifted to 0x94 along with everything else that follows).
*The extra 4 bytes come from a palette index (int32) inserted at 0x90, before the pixel format (which is shifted to 0x94 along with everything else that follows).
*Valid palette indices start at 1. Palettes are stored per-level in level#_palette.pal files. 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. Each palette consists of 256 32-bit colors and takes up 1024 bytes.
*The level#_palette.pal files have between 85 and 179 palettes, not counting the first palette (index 0) at the start of each .pal file, which is always blank).  
*The level#_palette.pal files have between 85 and 179 palettes, not counting the first palette (index 0) at the start of each .pal file, which is always blank.  
*The pixel format (shifted to 0x94) has only two variants: 0x10 for opaque textures, meaning 32-bit RGB with ignored alpha, or 0x11 for transparent textures.
*The pixel format (shifted to 0x94) has only two variants: 0x10 for opaque textures, meaning 32-bit RGB with ignored alpha, or 0x11 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). See below for an overview.
*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). See below for an overview.
Line 113: Line 113:
{{OBD_Table_Header}}
{{OBD_Table_Header}}
|- ALIGN=CENTER VALIGN=TOP
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr| 0x90 | int32    |C8FFC8| 56 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        | palette pixel format #16 (32-bit RGB, with inactive alpha); the other recurrent format is #17 (32-bit RGBA) }}
{{OBDtr| 0x94 | int32    |C8FFFF| 10 00 00 00 | 16        | palette pixel format #16 (32-bit RGB, with inactive alpha); the other recurrent format is #17 (32-bit RGBA) }}
{{OBDtr| 0x98 | link    |FFC8FF| 00 00 00 00 | unused    | link to a [[OBD:TXAN|TXAN]] file; used if this texture is animated }}
{{OBDtr| 0x98 | link    |FFC8FF| 00 00 00 00 | unused    | link to a [[OBD:TXAN|TXAN]] file; used if this texture is animated }}
Line 124: Line 124:
{{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) }}
|}
|}
;Textures using .raw storage
;Alternative use of .raw or .sep storage
Unlike for PC or Mac game data (where pixel data is stored exclusively in .raw or exclusively in .sep for all TXMPs), PS2 TXMPs use .raw and .sep storage alternatively, depending on the TXMP. The engine apparently uses the .sep pointer only if there is no .raw pointer (or vice-versa).
Unlike for PC or Mac game data (where pixel data is stored exclusively in .raw or exclusively in .sep for all TXMPs), PS2 TXMPs use .raw and .sep storage alternatively, depending on the TXMP. The engine apparently uses the .sep pointer only if there is no .raw pointer (or vice-versa).


Examples of textures using .sep storage are: all [[:Category:Fly-in_portraits|fly-in portraits]]; all [[:Category:Splashscreens|splashscreen]] components; some illustrations in Konoko's "data comlink" (namely, [[:File:TXMPLevel02move.png|combat move illustrations]] and [[:File:TXMPhypo.png|item illustrations]] (objectives and weapon illustrations use .raw storage).
Examples of textures using .sep storage are: all [[:Category:Fly-in_portraits|fly-in portraits]]; all [[:Category:Splashscreens|splashscreen]] components; some illustrations in Konoko's [[Data Comlink]] (namely, [[:File:TXMPLevel02move.png|combat move illustrations]] and [[:File:TXMPhypo.png|item illustrations]]; objectives and weapon illustrations use .raw storage).


Environment/character/particle TXMPs seem to be using .raw storage consistently (not checked beyond level1_Final). As a notable anomaly, .sep storage is used for the following three textures (console screens) in level0_Final: _CON_SAVEGAME (main TXMP only; the animation frames use .raw storage), _CON_SAVEGAME_USED, _CON_USED.
Environment/character/particle TXMPs seem to be using .raw storage consistently (not checked beyond level1_Final). As a notable anomaly, .sep storage is used for the following three textures (console screens) in level0_Final: _CON_SAVEGAME (main TXMP only; the animation frames use .raw storage), _CON_SAVEGAME_USED, _CON_USED.
Line 483: Line 483:
<references/>
<references/>


{{OBD_File_Footer | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map | family=Generic}}
{{OBD_File_Footer | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map | family=General}}


{{OBD}}
{{OBD}}
2,112

edits