EvilEngine/SHRP: Difference between revisions
Content added Content deleted
m (Seil moved page SHRP to EvilEngine/SHRP) |
EnergyDrink (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
==Format (Headers)== |
==Format (Headers)== |
||
===zShrapnelAsset=== |
===zShrapnelAsset=== |
||
<source lang=cpp> |
|||
struct zShrapnelAsset |
|||
{ |
|||
int fassetCount; |
|||
unsigned int shrapnelID; |
|||
void(*initCB)(zShrapnelAsset*, xModelInstance*, xVec3*, xVec3*, void(*)(zFrag*, zFragAsset*)); |
|||
}; |
|||
</source> |
|||
The asset data starts with a 0xC byte header: |
The asset data starts with a 0xC byte header: |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x00 || |
| 0x00 || s32 || '''fassetCount''' || Amount of frag entries |
||
|- |
|- |
||
| 0x04 || [[AssetID]] || '''sharpnelID''' || This asset |
| 0x04 || [[AssetID]] || '''sharpnelID''' || This asset |
||
|- |
|- |
||
| 0x08 || |
| 0x08 || p32 || - || Always 0 |
||
|} |
|} |
||
After that, there's an array of shrapnel entries, as defined in the header. Each entry is of variable size: |
After that, there's an array of shrapnel entries, as defined in the header. Each entry is of variable size: |
||
* |
* Type 1 '''(Group)''' |
||
* |
* Type 2 '''(Shrapnel)''' |
||
* |
* Type 3 '''(Particle)''' |
||
** BFBB - 0x1D4 |
** BFBB - 0x1D4 |
||
** TSSM |
** TSSM-RatProto - 0x1F4 |
||
* |
* Type 4 '''(Projectile)''' |
||
** BFBB - 0x90 |
** BFBB - 0x90 |
||
** TSSM - 0x110 |
** TSSM/Incredibles - 0x110 |
||
** ROTU/RatProto - 0x158 |
|||
* '''Type 5 (Lightning)''' |
|||
* Type 5 '''(Lightning)''' |
|||
** BFBB - 0x68 |
** BFBB - 0x68 |
||
** TSSM - 0x70 |
** TSSM-RatProto - 0x70 |
||
* |
* Type 6 '''(Sound)''' |
||
** BFBB - 0x4C |
** BFBB - 0x4C |
||
** TSSM - 0x44 |
** TSSM-RatProto - 0x44 |
||
* |
* Type 7 '''(Shockwave)''' |
||
** |
** BFBB-RatProto - 0x54 |
||
* |
* Type 8 '''(Explosion)''' |
||
** TSSM - 0x48 |
** TSSM-RatProto - 0x48 |
||
* |
* Type 9 '''(Distortion)''' |
||
** TSSM - 0x5C |
** TSSM-RatProto - 0x5C |
||
* |
* Type 10 '''(Fire)''' |
||
** TSSM - 0x5C |
** TSSM/Incredibles - 0x5C |
||
** ROTU/RatProto - 0xB4 |
|||
* Type 11 '''(Light)''' |
|||
===zFragAsset=== |
|||
** ROTU/RatProto - 0x60 |
|||
The entries have the following structure: |
|||
* Type 12 '''(Smoke)''' |
|||
{| class="wikitable" |
|||
** ROTU/RatProto - 0x50 |
|||
! Offset !! Type !! Variable !! Description |
|||
* Type 13 '''(Goo)''' |
|||
|- |
|||
** ROTU/RatProto - 0x88 |
|||
| 0x00 || int || '''type''' || |
|||
* 0 = eFragInactive |
|||
* 1 = eFragGroup |
|||
* 2 = eFragShrapnel |
|||
* 3 = eFragParticle |
|||
* 4 = eFragProjectile |
|||
* 5 = eFragLightning |
|||
* 6 = eFragSound |
|||
* 7 = eFragShockwave |
|||
* 8 = eFragExplosion |
|||
* 9 = eFragDistortion |
|||
* 10 = eFragFire |
|||
|- |
|||
| 0x04 || [[AssetID]] || '''id''' || |
|||
|- |
|||
| 0x08 || [[AssetID]] || '''parentID''' || |
|||
|- |
|||
| 0x0C || [[AssetID]] || '''parentID2''' || |
|||
|- |
|||
| 0x10 || float || '''lifetime''' || |
|||
|- |
|||
| 0x14 || float || '''delay''' || |
|||
|} |
|||
===zFragLocation=== |
===zFragLocation=== |
||
Every entry/frag (except shockwave) has this header at a different position.<br> |
Every entry/frag (except shockwave) has this header at a different position.<br> |
||
Sometimes it only has 0xCD padding bytes. |
Sometimes it only has 0xCD padding bytes. |
||
<source lang=cpp> |
|||
struct zFragLocation |
|||
{ |
|||
zFragLocType type; |
|||
zFragLocInfo info; |
|||
float rand_radius; // Not present in BFBB |
|||
}; |
|||
</source> |
|||
<source lang=cpp> |
|||
enum zFragLocType |
|||
{ |
|||
eFragLocBone, |
|||
eFragLocBoneUpdated, |
|||
eFragLocBoneLocal, |
|||
eFragLocBoneLocalUpdated, |
|||
eFragLocTag, |
|||
eFragLocTagUpdated, |
|||
eFragLocCount, |
|||
eFragLocForceSize = 2147483647 |
|||
}; |
|||
</source> |
|||
<source lang=cpp> |
|||
union zFragLocInfo |
|||
{ |
|||
zFragBone bone; |
|||
xModelTag tag; |
|||
}; |
|||
struct zFragBone |
|||
{ |
|||
int index; |
|||
xVec3 offset; |
|||
}; |
|||
struct xModelTag |
|||
{ |
|||
xVec3 v; |
|||
unsigned int matidx; |
|||
float wt[4]; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x00 || |
| 0x00 || zFragLocType[u32] || '''type''' || |
||
* 0 = eFragLocBone |
* 0 = eFragLocBone |
||
* 1 = eFragLocBoneUpdated |
* 1 = eFragLocBoneUpdated |
||
Line 94: | Line 122: | ||
* 5 = eFragLocTagUpdated |
* 5 = eFragLocTagUpdated |
||
|- |
|- |
||
! colspan="4" | |
! colspan="4" | zFragBone |
||
|- |
|- |
||
| 0x04 || |
| 0x04 || s32 || '''index''' || |
||
|- |
|- |
||
| 0x08 || [[Vector3]] || '''offset''' || |
| 0x08 || [[Vector3]] || '''offset''' || |
||
|- |
|- |
||
| 0x0C || |
| 0x0C || u32[4] || colspan="2" | Padding 0xCD bytes |
||
|- |
|- |
||
! colspan="4" | |
! colspan="4" | xModelTag |
||
|- |
|- |
||
| 0x04 || [[Vector3]] || '''v''' || |
| 0x04 || [[Vector3]] || '''v''' || |
||
|- |
|- |
||
| 0x10 || |
| 0x10 || u32 || '''matidx''' || |
||
|- |
|- |
||
| 0x14 || |
| 0x14 || f32[4] || '''wt''' || Always 0xCD padding bytes? |
||
|- |
|- |
||
! colspan="4" | |
! colspan="4" | |
||
|- |
|- |
||
| 0x24 || |
| 0x24 || f32 || '''rand_radius''' || '''Not present in BFBB''' |
||
|} |
|} |
||
===zFragLightInfo=== |
|||
Sometimes used in The Incredibles:ROTU and Ratatouille Prototype |
|||
<source lang=cpp> |
|||
struct zFragLightInfo |
|||
{ |
|||
_xFColor lightColor; |
|||
float radius; |
|||
float fadeUpTime; |
|||
float fadeDownTime; |
|||
float duration; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|||
| 0x00 || [[Vector4]] || '''lightColor''' || |
|||
|- |
|||
| 0x10 || f32 || '''radius''' || |
|||
|- |
|||
| 0x14 || f32 || '''fadeUpTime''' || |
|||
|- |
|||
| 0x18 || f32 || '''fadeDownTime''' || |
|||
|- |
|||
| 0x1C || f32 || '''duration''' || |
|||
|} |
|||
==Format (Frags)== |
==Format (Frags)== |
||
=== |
===zFragAsset=== |
||
Every frag inherits from following structure: |
|||
====BFBB==== |
|||
<source lang=cpp> |
|||
struct zFragAsset |
|||
{ |
|||
zFragType type; |
|||
unsigned int id; |
|||
unsigned int parentID[2]; |
|||
float lifetime; |
|||
float delay; |
|||
}; |
|||
enum zFragType |
|||
{ |
|||
eFragInactive, |
|||
eFragGroup, |
|||
eFragShrapnel, |
|||
eFragParticle, |
|||
eFragProjectile, |
|||
eFragLightning, |
|||
eFragSound, |
|||
eFragShockwave, |
|||
eFragExplosion, // Not present in BFBB |
|||
eFragDistortion, // Not present in BFBB |
|||
eFragFire, // Not present in BFBB |
|||
eFragLight, // Only present in ROTU and RatProto |
|||
eFragSmoke, // Only present in ROTU and RatProto |
|||
eFragGoo, // Only present in ROTU and RatProto |
|||
eFragCount, |
|||
eFragForceSize = 2147483647 |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x00 || zFragType[u32] || '''type''' || |
|||
! 0x18 || colspan="3" | [[#zFragLocation|zFragLocation]] source |
|||
* 0 = Inactive |
|||
* 1 = Group |
|||
* 2 = Shrapnel |
|||
* 3 = Particle |
|||
* 4 = Projectile |
|||
* 5 = Lightning |
|||
* 6 = Sound |
|||
* 7 = Shockwave |
|||
* 8 = Explosion |
|||
* 9 = Distortion |
|||
* 10 = Fire |
|||
* 11 = Light |
|||
* 12 = Smoke |
|||
* 13 = Goo |
|||
|- |
|- |
||
| 0x04 || [[AssetID]] || '''id''' || |
|||
! 0x3C || colspan="3" | [[#zFragLocation|zFragLocation]] vel |
|||
|- |
|- |
||
| 0x08 || [[AssetID]][2] || '''parentID''' || |
|||
| 0x60 || uint[91] || colspan="2" | Padding - 0xCD bytes, 4-byte alignment |
|||
|- |
|||
| 0x10 || f32 || '''lifetime''' || |
|||
|- |
|||
| 0x14 || f32 || '''delay''' || |
|||
|} |
|||
====Type 3 (Particle)==== |
|||
=====BFBB===== |
|||
<source lang=cpp> |
|||
class zFragParticleAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
zFragLocation source; |
|||
zFragLocation vel; |
|||
xParEmitterCustomSettings emit; |
|||
unsigned int parEmitterID; |
|||
zParEmitter* parEmitter; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|||
| 0x18 || [[#zFragLocation|zFragLocation]] || '''source ''' || |
|||
|- |
|||
| 0x3C || [[#zFragLocation|zFragLocation]] || '''vel''' || |
|||
|- |
|||
| 0x60 || xParEmitterCustomSettings || '''emit''' || Padding - 0xCD bytes |
|||
|- |
|- |
||
| 0x1CC || [[AssetID]] || '''parEmitterID''' || |
| 0x1CC || [[AssetID]] || '''parEmitterID''' || |
||
|- |
|- |
||
| 0x1D0 || |
| 0x1D0 || p32 || '''parEmitter''' || Always 0 |
||
|} |
|} |
||
==== |
=====TSSM-RatProto===== |
||
<source lang=cpp> |
|||
class zFragParticleAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
zFragLocation source; |
|||
zFragLocation vel; |
|||
xParEmitterCustomSettings emit; |
|||
unsigned int flags; // Only present in TSSM |
|||
unsigned int parEmitterID; |
|||
zParEmitter* parEmitter; |
|||
} |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x18 || [[#zFragLocation|zFragLocation]] || '''source''' || |
|||
|- |
|- |
||
| 0x40 || [[#zFragLocation|zFragLocation]] || '''vel''' || |
|||
|- |
|- |
||
| 0x68 || |
| 0x68 || xParEmitterCustomSettings || '''emit''' || |
||
|- |
|- |
||
| 0x1EC || |
| 0x1EC || u32 || '''flags''' || '''Only present in TSSM''' |
||
|- |
|- |
||
| 0x1F0 || |
| 0x1F0 || u32 || '''parEmitterID''' || |
||
|- |
|- |
||
| 0x1F4 || |
| 0x1F4 || p32 || '''parEmitter''' || Always null |
||
|} |
|} |
||
---- |
|||
===Type 4 (Projectile)=== |
|||
====BFBB==== |
|||
====Type 4 (Projectile)==== |
|||
=====BFBB===== |
|||
<source lang=cpp> |
|||
class zFragProjectileAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int modelInfoID; |
|||
RpAtomic* modelFile; |
|||
zFragLocation launch; |
|||
zFragLocation vel; |
|||
float bounce; |
|||
signed int maxBounces; |
|||
unsigned int flags; |
|||
unsigned int childID; |
|||
zShrapnelAsset* child; |
|||
float minScale; |
|||
float maxScale; |
|||
unsigned int scaleCurveID; |
|||
xCurveAsset* scaleCurve; |
|||
float gravity; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
Line 156: | Line 316: | ||
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]] |
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]] |
||
|- |
|- |
||
| 0x1C || |
| 0x1C || p32 || '''modelFile''' || Always 0 |
||
|- |
|- |
||
| 0x20 || [[#zFragLocation|zFragLocation]] || '''launch''' || |
|||
|- |
|- |
||
| 0x44 || [[#zFragLocation|zFragLocation]] || '''vel''' || |
|||
|- |
|- |
||
| 0x68 || |
| 0x68 || f32 || '''bounce''' || |
||
|- |
|- |
||
| 0x6C || |
| 0x6C || s32 || '''maxBounces''' || |
||
|- |
|- |
||
| 0x70 || |
| 0x70 || u32 || '''flags''' || |
||
|- |
|- |
||
| 0x74 || [[AssetID]] || '''childID''' || [[SHRP]] - Child shrapnel ID |
| 0x74 || [[AssetID]] || '''childID''' || [[SHRP]] - Child shrapnel ID |
||
|- |
|- |
||
| 0x78 || |
| 0x78 || p32 || '''child''' || Always 0 |
||
|- |
|- |
||
| 0x7C || |
| 0x7C || f32 || '''minScale''' || |
||
|- |
|- |
||
| 0x80 || |
| 0x80 || f32 || '''maxScale''' || |
||
|- |
|- |
||
| 0x84 || [[AssetID]] || '''scaleCurveID''' || |
| 0x84 || [[AssetID]] || '''scaleCurveID''' || |
||
|- |
|- |
||
| 0x88 || |
| 0x88 || p32 || '''scaleCurve''' || Always 0 |
||
|- |
|- |
||
| 0x8C || |
| 0x8C || f32 || '''gravity''' || |
||
|} |
|} |
||
==== |
=====TSSM-RatProto===== |
||
<source lang=cpp> |
|||
class zFragProjectileAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int modelInfoID; |
|||
RpAtomic* modelFile; |
|||
zFragLocation launch; |
|||
zFragLocation vel; |
|||
zFragLocation velPlusMinus; |
|||
zFragLocation rot; |
|||
zFragLocation rotPlusMinus; |
|||
zFragLocation initRot; // Only present in ROTU and RatProto |
|||
float bounce; |
|||
signed int maxBounces; |
|||
unsigned int flags; |
|||
unsigned int childID; |
|||
zShrapnelAsset* child; |
|||
float minScale; |
|||
float maxScale; |
|||
unsigned int scaleCurveID; |
|||
xCurveAsset* scaleCurve; |
|||
float gravity; |
|||
zFragLightInfo lightInfo // Only present in ROTU and RatProto |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Offset (ROTU) !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]] |
| 0x18 || 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]] |
||
|- |
|- |
||
| 0x1C || |
| 0x1C || 0x1C || p32 || '''modelFile''' || Always 0 |
||
|- |
|- |
||
| 0x20 || 0x20 || [[#zFragLocation|zFragLocation]] || '''launch''' || |
|||
|- |
|- |
||
| 0x48 || 0x48 || [[#zFragLocation|zFragLocation]] || '''vel''' || |
|||
|- |
|- |
||
| 0x70 || 0x70 || [[#zFragLocation|zFragLocation]] || '''velPlusMinus''' || |
|||
|- |
|- |
||
| 0x98 || 0x98 || [[#zFragLocation|zFragLocation]] || '''rot''' || |
|||
|- |
|- |
||
| 0xC0 || 0xC0 || [[#zFragLocation|zFragLocation]] || '''rotPlusMinus''' || |
|||
|- |
|- |
||
| 0xE8 || |
| - || 0xE8 || [[#zFragLocation|zFragLocation]] || '''initRot''' || '''Only present in ROTU/RatRroto''' |
||
|- |
|- |
||
| |
| 0xE8 || 0x110 || f32 || '''bounce''' || |
||
|- |
|- |
||
| |
| 0xEC || 0x114 || s32 || '''maxBounces''' || |
||
|- |
|- |
||
| |
| 0xF0 || 0x118 || u32 || '''flags''' || |
||
|- |
|- |
||
| |
| 0xF4 || 0x11C || [[AssetID]] || '''childID''' || [[SHRP]] - Child shrapnel ID |
||
|- |
|- |
||
| |
| 0xF8 || 0x120 || p32 || '''child''' || Always 0 |
||
|- |
|- |
||
| |
| 0xFC || 0x124 || f32 || '''minScale''' || |
||
|- |
|- |
||
| |
| 0x100 || 0x128 || f32 || '''maxScale''' || |
||
|- |
|- |
||
| |
| 0x104 || 0x12C || [[AssetID]] || '''scaleCurveID''' || |
||
|- |
|- |
||
| |
| 0x108 || 0x130 || p32 || '''scaleCurve''' || Always 0 |
||
|} |
|||
===Type 5 (Lightning)=== |
|||
====BFBB==== |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|||
! 0x18 || colspan="3" | [[#zFragLocation|zFragLocation]] start |
|||
|- |
|||
! 0x3C || colspan="3" | [[#zFragLocation|zFragLocation]] end |
|||
|- |
|- |
||
| |
| 0x10C || 0x134 || f32 || '''gravity''' || |
||
|- |
|- |
||
| |
| - || 0x138 || [[#zFragLightInfo|zFragLightInfo]] || '''lightInfo''' || '''Only present in ROTU/RatRroto''' |
||
|} |
|} |
||
---- |
|||
====Movie==== |
|||
====Type 5 (Lightning)==== |
|||
<source lang=cpp> |
|||
class zFragLightningAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
zFragLocation start; |
|||
zFragLocation end; |
|||
unsigned int startParentID; |
|||
unsigned int endParentID; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset (BFBB) !! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x18 || 0x18 || [[#zFragLocation|zFragLocation]] || '''start''' || |
|||
|- |
|- |
||
| 0x3C || 0x40 || [[#zFragLocation|zFragLocation]] || '''end''' || |
|||
|- |
|- |
||
| 0x68 || |
| 0x60 || 0x68 || [[AssetID]] || '''startParentID''' || all bytes are 0xCD? |
||
|- |
|- |
||
| 0x6C || |
| 0x64 || 0x6C || [[AssetID]] || '''endParentID''' || all bytes are 0xCD? |
||
|} |
|} |
||
---- |
|||
===Type 6 (Sound)=== |
|||
====BFBB==== |
|||
====Type 6 (Sound)==== |
|||
=====BFBB===== |
|||
<source lang=cpp> |
|||
class zFragSoundAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int assetID; |
|||
zFragLocation source; |
|||
float volume; |
|||
float innerRadius; |
|||
float outerRadius; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
Line 256: | Line 456: | ||
| 0x18 || [[AssetID]] || '''assetID''' || [[SND]]/[[SNDS]] |
| 0x18 || [[AssetID]] || '''assetID''' || [[SND]]/[[SNDS]] |
||
|- |
|- |
||
| 0x1C || [[#zFragLocation|zFragLocation]] || '''source''' || |
|||
|- |
|- |
||
| 0x40 || |
| 0x40 || f32 || '''volume''' || |
||
|- |
|- |
||
| 0x44 || |
| 0x44 || f32 || '''innerRadius''' || |
||
|- |
|- |
||
| 0x48 || |
| 0x48 || f32 || '''outerRadius''' || |
||
|} |
|} |
||
==== |
=====TSSM-RatProto===== |
||
<source lang=cpp> |
|||
class zFragSoundAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int assetID; |
|||
zFragLocation source; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
Line 271: | Line 479: | ||
| 0x18 || [[AssetID]] || '''assetID''' || [[SGRP]] |
| 0x18 || [[AssetID]] || '''assetID''' || [[SGRP]] |
||
|- |
|- |
||
| 0x1C || [[#zFragLocation|zFragLocation]] || '''source''' || |
|||
|} |
|} |
||
---- |
|||
===Type 7 (Shockwave)=== |
|||
====Type 7 (Shockwave)==== |
|||
<source lang=cpp> |
|||
class zFragShockwaveAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int modelInfoID; |
|||
float birthRadius; |
|||
float deathRadius; |
|||
float birthVelocity; |
|||
float deathVelocity; |
|||
float birthSpin; |
|||
float deathSpin; |
|||
float birthColor[4]; |
|||
float deathColor[4]; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
Line 280: | Line 505: | ||
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]] |
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]] |
||
|- |
|- |
||
| 0x1C || |
| 0x1C || f32 || '''birthRadius''' || |
||
|- |
|- |
||
| 0x20 || |
| 0x20 || f32 || '''deathRadius''' || |
||
|- |
|- |
||
| 0x24 || |
| 0x24 || f32 || '''birthVelocity''' || |
||
|- |
|- |
||
| 0x28 || |
| 0x28 || f32 || '''deathVelocity''' || |
||
|- |
|- |
||
| 0x2C || |
| 0x2C || f32 || '''birthSpin''' || |
||
|- |
|- |
||
| 0x30 || |
| 0x30 || f32 || '''deathSpin''' || |
||
|- |
|- |
||
| 0x34 || [[Vector4]] || '''birthColor''' || |
| 0x34 || [[Vector4]] || '''birthColor''' || |
||
Line 297: | Line 522: | ||
|} |
|} |
||
---- |
|||
===Type 8 (Explosion)=== |
|||
====Type 8 (Explosion)==== |
|||
<source lang=cpp> |
|||
class zFragExplosionAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int type; |
|||
zFragLocation loc; |
|||
unsigned int flags; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x18 || |
| 0x18 || u32 || '''type''' || Unknown |
||
|- |
|- |
||
| 0x1C || [[#zFragLocation|zFragLocation]] || '''loc''' || |
|||
|- |
|- |
||
| 0x44 || |
| 0x44 || u32 || '''flags''' || |
||
|} |
|} |
||
---- |
|||
===Type 9 (Distortion)=== |
|||
====Type 9 (Distortion)==== |
|||
<source lang=cpp> |
|||
class zFragDistortionAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
unsigned int type; |
|||
zFragLocation loc; |
|||
unsigned int flags; |
|||
float radius; |
|||
float duration; |
|||
float intensity; |
|||
float freq; |
|||
float repeat_delay; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x18 || |
| 0x18 || u32 || '''type''' || |
||
|- |
|- |
||
| 0x1C || [[#zFragLocation|zFragLocation]] || '''loc''' || |
|||
|- |
|- |
||
| 0x44 || |
| 0x44 || u32 || '''flags''' || |
||
|- |
|- |
||
| 0x48 || |
| 0x48 || f32 || '''radius''' || |
||
|- |
|- |
||
| 0x4C || |
| 0x4C || f32 || '''duration''' || |
||
|- |
|- |
||
| 0x50 || |
| 0x50 || f32 || '''intensity''' || |
||
|- |
|- |
||
| 0x54 || |
| 0x54 || f32 || '''freq''' || |
||
|- |
|- |
||
| 0x58 || |
| 0x58 || f32 || '''repeat_delay''' || |
||
|} |
|} |
||
---- |
|||
===Type 10 (Fire)=== |
|||
====Type 10 (Fire)==== |
|||
=====TSSM/The Incredibles===== |
|||
<source lang=cpp> |
|||
class zFragFireAsset : public zFragAsset |
|||
{ |
|||
public: |
|||
zFragLocation loc; |
|||
unsigned int flags; |
|||
float radius; |
|||
float scale; |
|||
float fuel; |
|||
float heat; |
|||
float damage; |
|||
float knockback; |
|||
}; |
|||
</source> |
|||
=====ROTU/RatProto===== |
|||
<source lang=cpp> |
|||
struct zFragFireAsset : zFragAsset |
|||
{ |
|||
zFragLocation loc; |
|||
unsigned int flags; |
|||
float radius; |
|||
float scale; |
|||
float fuel; |
|||
float heat; |
|||
property_set props; |
|||
}; |
|||
struct property_set |
|||
{ |
|||
float damage; |
|||
float knockback; |
|||
float heat_magnify; |
|||
float height; |
|||
xEnt* driver; |
|||
xBound damageBound; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x18 || [[#zFragLocation|zFragLocation]] || '''loc''' |
|||
|- |
|||
| 0x40 || u32 || '''flags''' || |
|||
|- |
|||
| 0x44 || f32 || '''radius''' || |
|||
|- |
|||
| 0x48 || f32 || '''scale''' || |
|||
|- |
|||
| 0x4C || f32 || '''fuel''' || |
|||
|- |
|||
| 0x50 || f32 || '''heat''' || |
|||
|- |
|||
| 0x54 || f32 || '''damage''' || |
|||
|- |
|||
| 0x58 || f32 || '''knockback''' || |
|||
|- |
|||
! colspan="4" | ROTU/RatProto only |
|||
|- |
|||
| 0x5C || f32 || '''heat_magnify''' || |
|||
|- |
|||
| 0x60 || f32 || '''height''' || |
|||
|- |
|||
| 0x64 || p32 || '''driver''' || |
|||
|- |
|||
| 0x68 || xBound || '''damageBound''' || <!--TODO--> |
|||
|} |
|||
---- |
|||
====Type 11 (Light)==== |
|||
<source lang=cpp> |
|||
struct zFragLightAsset : zFragAsset |
|||
{ |
|||
zFragLocation loc; |
|||
zFragLightInfo lightInfo; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|||
| 0x18 || [[#zFragLocation|zFragLocation]] || '''loc''' || |
|||
|- |
|||
| 0x40 || [[#zFragLightInfo|zFragLightInfo]] || '''lightInfo''' || |
|||
|} |
|||
---- |
|||
====Type 12 (Smoke)==== |
|||
<source lang=cpp> |
|||
struct zFragSmokeAsset : zFragAsset |
|||
{ |
|||
unsigned int parEmitterID; |
|||
zFragLocation loc; |
|||
float rate; |
|||
float radius; |
|||
zSmokeEmitter* parEmitter; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|||
| 0x18 || [[AssetID]] || '''parEmitterID''' || |
|||
|- |
|||
| 0x1C || [[#zFragLocation|zFragLocation]] || '''loc''' || |
|||
|- |
|||
| 0x44 || f32 || '''rate''' || |
|||
|- |
|||
| 0x48 || f32 || '''radius''' || |
|||
|- |
|||
| 0x4C || p32 || '''parEmitter''' || Always 0 |
|||
|} |
|||
---- |
|||
====Type 13 (Goo)==== |
|||
<source lang=cpp> |
|||
struct zFragGooAsset : zFragAsset |
|||
{ |
|||
unsigned int dropModelInfoID; |
|||
RpAtomic* dropModelFile; |
|||
unsigned int splatModelInfoID; |
|||
RpAtomic* splatModelFile; |
|||
unsigned int splatSndID; |
|||
zShrapnelAsset* splatSnd; |
|||
zFragLocation loc; |
|||
zFragLocation vel; |
|||
float minScale; |
|||
float maxScale; |
|||
}; |
|||
</source> |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|||
| 0x18 || [[AssetID]] || '''dropModelInfoID''' || |
|||
|- |
|||
| 0x1C || p32 || '''dropModelFile''' || Always 0 |
|||
|- |
|||
| 0x20 || [[AssetID]] || '''splatModelInfoID''' || |
|||
|- |
|- |
||
| |
| 0x24 || p32 || '''splatModelFile''' || Always 0 |
||
|- |
|- |
||
| |
| 0x28 || [[AssetID]] || '''splatSndID''' || |
||
|- |
|- |
||
| |
| 0x2C || p32 || '''splatSnd''' || Always 0 |
||
|- |
|- |
||
| |
| 0x30 || [[#zFragLocation|zFragLocation]] || '''loc''' || |
||
|- |
|- |
||
| |
| 0x58 || [[#zFragLocation|zFragLocation]] || '''vel''' || |
||
|- |
|- |
||
| |
| 0x80 || f32 || '''minScale''' || |
||
|- |
|- |
||
| |
| 0x84 || f32 || '''maxScale''' || |
||
|} |
|} |
||