EvilEngine/TPIK: Difference between revisions
Content added Content deleted
EnergyDrink (talk | contribs) mNo edit summary |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
{{#vardefine:typeid|TPIK}}<nowiki/> |
{{#vardefine:typeid|TPIK}}<nowiki/> |
||
{{#vardefine:name|Pickup Types}}<nowiki/> |
{{#vardefine:name|Pickup Types}}<nowiki/> |
||
{{#vardefine:type|[[ |
{{#vardefine:type|[[Base]]}}<nowiki/> |
||
{{#vardefine:basetype|}}<nowiki/> |
{{#vardefine:basetype|0x00}}<nowiki/> |
||
{{#vardefine:games|Incredibles ROTU RatProto}}<nowiki/> |
{{#vardefine:games|Incredibles ROTU RatProto}}<nowiki/> |
||
{{#vardefine:sourcecode|}}<nowiki/> |
{{#vardefine:sourcecode|}}<nowiki/> |
||
Line 13: | Line 13: | ||
==Format== |
==Format== |
||
Pickup types are base assets, so they start with their 0x8 byte header, then are followed by: |
|||
===xTableAsset=== |
|||
<source lang=cpp> |
|||
class xTableAsset : public xBaseAsset |
|||
{ |
|||
public: |
|||
unsigned int version; |
|||
unsigned int numRows; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| |
| 0x08 || u32 || '''version''' || |
||
|- |
|- |
||
⚫ | |||
| 0x04 || int || unknown |
|||
⚫ | |||
| 0x08 || int || unknown |
|||
|- |
|||
⚫ | |||
|} |
|} |
||
After the header is the entries themselves. Each entry is 0x38 bytes long and has the following format: |
After the header is the entries themselves. Each entry is 0x38 bytes long and has the following format: |
||
===TableEntry=== |
|||
<source lang=cpp> |
|||
class TableEntry |
|||
{ |
|||
public: |
|||
unsigned int typeHash; |
|||
unsigned int modelID; |
|||
unsigned int pulseModelID; |
|||
float pulseTime; |
|||
float pulseAddScale; |
|||
float pulseMoveDown; |
|||
float red; |
|||
float green; |
|||
float blue; |
|||
unsigned int color; |
|||
union |
|||
{ |
|||
unsigned int flyingSoundGroupID; |
|||
iSndGroupHandle flyingSoundGroupHandle; |
|||
}; |
|||
union |
|||
{ |
|||
unsigned int usedSoundGroupID; |
|||
iSndGroupHandle usedSoundGroupHandle; |
|||
}; |
|||
union |
|||
{ |
|||
unsigned int cantUseSoundGroupID; |
|||
iSndGroupHandle cantUseSoundGroupHandle; |
|||
}; |
|||
unsigned char healthGain; |
|||
unsigned char powerGain; |
|||
unsigned char saveFlag; |
|||
signed char bInitialized; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Description |
! Offset !! Type !! Variable !! Description |
||
⚫ | |||
| 0x00 || [[AssetID]] || '''typeHash''' || Used by [[DYNA]] pickup assets to define pickup type. |
|||
|- |
|- |
||
| |
| 0x04 || [[AssetID]] || '''modelID''' || |
||
|- |
|- |
||
| |
| 0x08 || [[AssetID]] || '''pulseModelID''' || |
||
|- |
|- |
||
| 0x0C || f32 || '''pulseTime''' || |
|||
| 0x08 || [[AssetID]] ([[MODL|Model]]) || ring model |
|||
|- |
|- |
||
| 0x10 || f32 || '''pulseAddScale''' || |
|||
| 0x0C || [[Vector3]] || unknown. possibly pickup or ring model scale |
|||
|- |
|- |
||
| 0x14 || f32 || '''pulseMoveDown''' || |
|||
| 0x18 || [[Vector3]] || ring color (R, G, B) (0-1) |
|||
|- |
|- |
||
| |
| 0x18 || [[Vector3]] || '''red/green/blue''' || |
||
|- |
|- |
||
| |
| 0x24 || u32 || '''color''' || |
||
|- |
|- |
||
| |
| 0x28 || [[AssetID]] || '''flyingSoundGroupID''' || [[SGRP]] |
||
|- |
|- |
||
| |
| 0x2C || [[AssetID]] || '''usedSoundGroupID''' || [[SGRP]] |
||
|- |
|- |
||
| 0x30 || [[AssetID]] || '''cantUseSoundGroupID''' || [[SGRP]] |
|||
| 0x34 || byte || unknown |
|||
|- |
|- |
||
| |
| 0x34 || u8 || '''healthGain''' || |
||
|- |
|- |
||
| |
| 0x35 || u8 || '''powerGain''' || |
||
|- |
|- |
||
| |
| 0x36 || u8|| '''saveFlag''' || |
||
|- |
|- |
||
| 0x37 || s8 || '''bInitialized''' || |
|||
|} |
|} |
||
Latest revision as of 19:21, 23 March 2024
TPIK | |
---|---|
Pickup Types | |
Type | Base |
Base Type | 0x00 |
Games used | The Incredibles Ratatouille Prototype |
A pickup types is an asset which usually has only one instance in the entire game (in boot.hip) and defines information regarding DYNA pickups used in Incredibles and ROTU.
Format
Pickup types are base assets, so they start with their 0x8 byte header, then are followed by:
xTableAsset
class xTableAsset : public xBaseAsset
{
public:
unsigned int version;
unsigned int numRows;
};
Offset | Type | Variable | Description |
---|---|---|---|
0x08 | u32 | version | |
0x0C | u32 | numRows | Number of entries. |
After the header is the entries themselves. Each entry is 0x38 bytes long and has the following format:
TableEntry
class TableEntry
{
public:
unsigned int typeHash;
unsigned int modelID;
unsigned int pulseModelID;
float pulseTime;
float pulseAddScale;
float pulseMoveDown;
float red;
float green;
float blue;
unsigned int color;
union
{
unsigned int flyingSoundGroupID;
iSndGroupHandle flyingSoundGroupHandle;
};
union
{
unsigned int usedSoundGroupID;
iSndGroupHandle usedSoundGroupHandle;
};
union
{
unsigned int cantUseSoundGroupID;
iSndGroupHandle cantUseSoundGroupHandle;
};
unsigned char healthGain;
unsigned char powerGain;
unsigned char saveFlag;
signed char bInitialized;
};
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | AssetID | typeHash | Used by DYNA pickup assets to define pickup type. |
0x04 | AssetID | modelID | |
0x08 | AssetID | pulseModelID | |
0x0C | f32 | pulseTime | |
0x10 | f32 | pulseAddScale | |
0x14 | f32 | pulseMoveDown | |
0x18 | Vector3 | red/green/blue | |
0x24 | u32 | color | |
0x28 | AssetID | flyingSoundGroupID | SGRP |
0x2C | AssetID | usedSoundGroupID | SGRP |
0x30 | AssetID | cantUseSoundGroupID | SGRP |
0x34 | u8 | healthGain | |
0x35 | u8 | powerGain | |
0x36 | u8 | saveFlag | |
0x37 | s8 | bInitialized |