EvilEngine/HIP (File Format): Difference between revisions

Add various information
(Rewrite/reorganize HIP format spec)
(Add various information)
Line 42:
Layers are used by HIP archives to group assets of specific types together. For example, <code>TEXTURE</code> layers contain all of the [[RWTX]] assets in a HIP archive and <code>MODEL</code> layers contain all of the [[MODL]] assets. All assets in a HIP archive have their data grouped together by layer inside the [[#DPAK|DPAK]] block, with padding in between each asset's data as well as in between each layer. [[#DPAK|DPAK]] explains more about how padding and alignment of assets and layers works.
 
The following table lists all possible layer types, their corresponding IDs in each game, and what [[Asset#List of asset types|asset types]] they contain:
TODO: list all known type IDs
 
{| class="wikitable sortable"
|+
! Name !! [[:Category:Scooby|Scooby]] !! [[:Category:BFBB|BFBB]] !! [[:Category:TSSM|TSSM]] !! [[:Category:Incredibles|Incredibles]] !! [[:Category:ROTU|ROTU]] !! Asset Types
|-
| DEFAULT || 0 || 0 || 0 || 0 || 0 || [[ALST]], [[ANIM]] (Scooby), [[ATBL]], [[ATKT]], [[BOUL]], [[BUTN]], [[CAM]], [[CCRV]], [[CNTR]], [[COLL]], [[COND]], [[CSNM]], [[DEST]], [[DPAT]], [[DSCO]], [[DSTR]], [[DTRK]], [[DUPC]], [[DYNA]], [[EGEN]], [[ENV]], [[FLY]], [[FOG]], [[GRSM]], [[GRUP]], [[GUST]], [[HANG]], [[JAW]], [[LITE]], [[LKIT]], [[LOBM]], [[LODT]], [[MAPR]], [[MINF]], [[MPHT]], [[MRKR]], [[MVPT]], [[NGMS]], [[NPC]], [[NPCS]], [[ONEL]], [[PARE]], [[PARP]], [[PARS]], [[PEND]], [[PGRS]], [[PICK]], [[PIPT]], [[PKUP]], [[PLAT]], [[PLYR]], [[PORT]], [[PRJT]], [[RANM]], [[RAW]], [[SCRP]], [[SDFX]], [[SFX]], [[SGRP]], [[SHDW]], [[SHRP]], [[SIMP]], [[SLID]], [[SPLN]], [[SPLP]], [[SSET]], [[SUBT]], [[SURF]], [[TEXT]], [[TIMR]], [[TPIK]], [[TRIG]], [[TRWT]], [[UI]], [[UIFT]], [[UIM]], [[VIL]], [[VILP]], [[VOLU]], [[ZLIN]]
|-
| TEXTURE || 1 || 1 || 1 || 1 || 1 || [[RWTX]]
|-
| TEXTURE_STRM || || || 2 || 2 || 2 || [[BINK]], [[TEXS]], [[WIRE]]
|-
| BSP || 2 || 2 || 3 || 3 || 3 || [[BSP]], [[JSP]]
|-
| MODEL || 3 || 3 || 4 || 4 || 4 || [[MODL]]
|-
| ANIMATION || 4 || 4 || 5 || 5 || 5 || [[ANIM]] (BFBB/TSSM/Incredibles/ROTU)
|-
| VRAM || 5 || 5 || 6 || 6 || 6 ||
|-
| SRAM || 6 || 6 || 7 || 7 || 7 || [[CSSS]], [[SND]], [[SNDS]]
|-
| SNDTOC || 7 || 7 || 8 || 8 || 8 || [[CTOC]] (Scooby/BFBB), [[SNDI]]
|-
| CUTSCENE || 8 || 8 || 9 || 9 || 9 || [[CSN]], [[CTOC]] (TSSM/Incredibles/ROTU)
|-
| CUTSCENETOC || 9 || 9 || 10 || 10 || 10 ||
|-
| JSPINFO || || 10 || 11 || 11 || 11 ||
|}
 
===Strings===
Line 66 ⟶ 95:
int subVersion
int clientVersion
int compatiblecompatVersion
</pre>
 
'''subVersion''' is 2 in all games.
TODO: document all possible values
 
'''clientVersion''' is 0x00040006 (4.6) in Scooby, and 0x000A000F (10.15) in all other games.
 
'''compatVersion''' is 1 in all games.
 
===PFLG===
Line 108 ⟶ 141:
This block contains the creation date of the archive.
<pre>
time_tint createdDate
string createdDateString
</pre>
 
[https://en.cppreference.com/w/c/chrono/time_t <code>time_t</code>] is stored as a 4-byte int and originates from C/C++. In HIP archives, it'''createdDate''' is the number of seconds since 00:00, Jan 1 1970 UTC, with a timezone offset of UTC-7:00 (Pacific Time).
 
'''createdDateString''' alwaysis ends'''createdDate''' withas a newlinestring, characterin the format (<code>'\n'</code>,Www Mmm <code>'\x0A'dd hh:mm:ss yyyy</code>) in Scooby.
* Www - the day of the week (one of Mon, Tue, Wed, Thu, Fri, Sat, Sun).
* Mmm - the month (one of Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec).
* dd - the day of the month
* hh - hours
* mm - minutes
* ss - seconds
* yyyy - years
* Example: Thu Sep 02 06:15:46 2004
 
This is the same format returned by the C standard function [https://en.cppreference.com/w/c/chrono/ctime <code>ctime()</code>]. It always ends with a newline character (<code>'\n'</code>, <code>'\x0A'</code>) in Scooby.
 
===PMOD===
This block contains the latest modification date of the archive.
<pre>
time_tint modifiedDate
</pre>
 
See [[#PCRT|PCRT]] for a definition of <code>time_t</code>.
 
===PLAT===
Line 152 ⟶ 193:
'''language''' is the archive's target language.
 
'''gameName''' is the archive's target game. This is always "Sponge Bob" in BFBB and "Incredibles" in TSSM, Incredibles, and ROTU.
 
The following table lists all possible values for these variables:
 
{| class="wikitable sortable"
TODO: list all possible values for everything
|+
! Name !! [[:Category:BFBB|BFBB]] !! [[:Category:TSSM|TSSM]]/[[:Category:Incredibles|Incredibles]]/[[:Category:ROTU|ROTU]]
|-
| platformID || <code>'GC\0\0'</code>, <code>'P2\0\0'</code>, <code>'XB\0\0'</code> || <code>'GC\0\0'</code>, <code>'PS2\0'</code>, <code>'BX\0\0'</code>
|-
| platformName || GameCube, Xbox, PlayStation 2 ||
|-
| region || NTSC, PAL || NTSC, PAL
|-
| language || US Common, United Kingdom, French, German || US, BE, CH, CZ, DE, DK, ES, FI, FR, IT, JP, KR, NL, NO, PL, PT, RU, SE, SK, TW, UK
|-
| gameName || Sponge Bob, Incredibles, Jimmy Newtron || Incredibles
|}
 
===DICT===
Line 198 ⟶ 254:
 
===ADBG===
This block defines debug-specificdebugging info for its parent [[#AHDR|AHDR]] block. None of this is used by the release builds of any games, but Heavy Iron left it in anyways, and thank goodness for that.
<pre>
int alignment