EvilEngine/SURF: Difference between revisions
Content added Content deleted
Battlepedia>Seil (→Format) |
m (Seil moved page SURF to EvilEngine/SURF) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> |
|||
{{AssetInfobox |
|||
{{#vardefine:typeid|SURF}}<nowiki/> |
|||
|subtitle=Surface |
|||
{{#vardefine:name|Surface}}<nowiki/> |
|||
|type=[[Object]] |
|||
{{#vardefine:type|[[Base]]}}<nowiki/> |
|||
|objectid=0x1A |
|||
{{#vardefine:basetype|0x1A}}<nowiki/> |
|||
|games=Night of 100 Frights<br>Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer}} |
|||
{{#vardefine:games|Scooby BFBB TSSM Incredibles ROTU RatProto}}<nowiki/> |
|||
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zSurface.h zSurface.h]}}<nowiki/> |
|||
{{#vardefine:image|}}<nowiki/> |
|||
</onlyinclude> |
|||
{{AutoAssetInfobox}} |
|||
This asset defines an entry for a surface, which can be applied to other assets such as [[PLAT]], [[SIMP]], [[BOUL]] or even parts of [[JSP]] through the [[MAPR]] asset. The surface can have properties such as special materials, texture animations or patterns, and properties such as hurt, wall jump, out of bounds, prevent standing on. |
This asset defines an entry for a surface, which can be applied to other assets such as [[PLAT]], [[SIMP]], [[BOUL]] or even parts of [[JSP]] through the [[MAPR]] asset. The surface can have properties such as special materials, texture animations or patterns, and properties such as hurt, wall jump, out of bounds, prevent standing on. |
||
==Format== |
==Format== |
||
Surfaces are [[ |
Surfaces are [[Base|base assets]], so they start with their 0x54 byte header, then are followed by: |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Variable !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x08 || |
| 0x08 || char || '''game_damage_type''' || |
||
* 0x00 = ? |
* 0x00 = ? |
||
* 0x01 = ? |
* 0x01 = ? |
||
Line 19: | Line 24: | ||
* 0x06 = Hazard? |
* 0x06 = Hazard? |
||
|- |
|- |
||
| 0x09 || |
| 0x09 || char || '''game_sticky''' || always 0 |
||
|- |
|- |
||
| 0x0A || |
| 0x0A || char || '''game_damage_flags''' || |
||
* 0x00 = ? |
* 0x00 = ? |
||
* 0x01 = ? |
* 0x01 = ? |
||
|- |
|- |
||
| 0x0B || |
| 0x0B || char || '''surf_type''' || always 0 |
||
|- |
|- |
||
| 0x0C || |
| 0x0C || char || '''phys_pad''' || padding (always null) |
||
|- |
|- |
||
| 0x0D || |
| 0x0D || char || '''sld_start''' || probably in degrees |
||
|- |
|- |
||
| 0x0E || |
| 0x0E || char || '''sld_stop''' || probably in degrees |
||
|- |
|- |
||
| 0x0F || |
| 0x0F || char || '''phys_flags''' || |
||
* 0x00 = |
* 0x00 = Slide Off Player |
||
* 0x02 = |
* 0x02 = Angle Player |
||
* 0x03 = ? |
* 0x03 = ? |
||
* 0x04 = |
* 0x04 = No Stand |
||
* 0x08 = |
* 0x08 = Out Of Bounds |
||
* 0x10 = |
* 0x10 = Wall Jump |
||
* 0x20 = |
* 0x20 = Ledge Grab |
||
* 0x48 = ? |
* 0x48 = ? |
||
|- |
|- |
||
| 0x10 || float || '''friction''' || range = 0 to 1? |
| 0x10 || float || '''friction''' || range = 0 to 1? |
||
|- |
|- |
||
| 0x14 || [[#zSurfMatFX|zSurfMatFX]] || '''matfx''' || |
|||
|- |
|- |
||
| |
| 0x2C || [[#zSurfColorFX|zSurfColorFX]] || '''colorfx''' || |
||
⚫ | |||
⚫ | |||
⚫ | |||
|- |
|- |
||
| |
| 0x34 || uint || '''texture_anim_flags''' || 0 or 1? |
||
|- |
|- |
||
| |
| 0x38 || [[#zSurfTextureAnim|zSurfTextureAnim]][2] || '''texture_anim''' || |
||
|- |
|- |
||
| |
| 0x50 || uint || '''uvfx_flags''' || related to UV anim? 0 or 1? |
||
|- |
|- |
||
| |
| 0x54 || [[#zSurfUVFX|zSurfUVFX]][2] || '''uvfx''' || |
||
|- |
|- |
||
| |
| 0x114 || char || '''on''' || 0 or 1 |
||
|- |
|- |
||
| 0x115 || char[3] || '''pad''' || padding |
|||
|- |
|- |
||
| |
| 0x118 || float || '''oob_delay''' || |
||
|- |
|- |
||
| |
| 0x11C || float || '''walljump_scale_xz''' || |
||
|- |
|- |
||
| |
| 0x120 || float || '''walljump_scale_y''' || |
||
|- |
|- |
||
⚫ | |||
! !! !! !! |
|||
|- |
|- |
||
| |
| 0x128 || float || '''damage_bounce''' || little endian |
||
|- |
|- |
||
⚫ | |||
! 0x38 !! struct (size: 0x18) !! '''texture_anim''' !! |
|||
|- |
|- |
||
| |
| 0x12C || Event[numberOfEvents] || '''[[Events]]''' || |
||
⚫ | |||
===zSurfMatFX=== |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
⚫ | |||
⚫ | |||
* 0 = ? |
* 0 = ? |
||
* |
* 1 = ? |
||
⚫ | |||
|- |
|- |
||
| |
| 0x04 || [[AssetID]] || '''bumpmapID''' || usually null |
||
|- |
|- |
||
| |
| 0x08 || [[AssetID]] || '''envmapID''' || |
||
|- |
|- |
||
| |
| 0x0C || float || '''shininess''' || |
||
|- |
|- |
||
| |
| 0x10 || float || '''bumpiness''' || usually 0 |
||
|- |
|- |
||
| |
| 0x14 || [[AssetID]] || '''dualmapID''' || usually null |
||
⚫ | |||
===zSurfColorFX=== |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|- |
||
⚫ | |||
! !! !! !! |
|||
|- |
|- |
||
| |
| 0x02 || ushort || '''mode''' || always 0 |
||
|- |
|- |
||
| 0x04 || float || '''speed''' || |
|||
⚫ | |||
===zSurfTextureAnim=== |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|- |
||
| |
| 0x00 || ushort || '''pad''' || padding (always null) |
||
|- |
|- |
||
| |
| 0x02 || ushort || '''mode''' || |
||
⚫ | |||
⚫ | |||
|- |
|- |
||
| |
| 0x04 || [[AssetID]] || '''group''' || |
||
|- |
|- |
||
| |
| 0x08 || float || '''speed''' || |
||
⚫ | |||
===zSurfUVFX=== |
|||
{| class="wikitable" |
|||
! Offset !! Type !! Variable !! Description |
|||
|- |
|- |
||
| |
| 0x54 || int || '''mode''' || always 0 |
||
|- |
|- |
||
| |
| 0x58 || float || '''rot''' || always 0 |
||
|- |
|- |
||
| |
| 0x5C || float || '''rot_spd''' || |
||
|- |
|- |
||
| |
| 0x60 || [[Vector3]] || '''trans''' || Z is always 0 |
||
|- |
|- |
||
| |
| 0x6C || [[Vector3]] || '''trans_spd''' || Z is always 0 |
||
|- |
|- |
||
| 0x78 || |
| 0x78 || [[Vector3]] || '''scale''' || Z is always 0 |
||
|- |
|- |
||
| |
| 0x84 || [[Vector3]] || '''scale_spd''' || usually (0, 0, 0) |
||
|- |
|- |
||
| |
| 0x90 || [[Vector3]] || '''min''' || usually (0, 0, 0) |
||
|- |
|- |
||
| |
| 0x9C || [[Vector3]] || '''max''' || usually (0, 0, 0) |
||
|- |
|- |
||
| |
| 0xA8 || [[Vector3]] || '''minmax_spd''' || usually (0, 0, 0) |
||
⚫ | |||
| 0xE0 || ?[13] || '''Unknown''' || null |
|||
⚫ | |||
! !! !! !! |
|||
⚫ | |||
⚫ | |||
⚫ | |||
| 0x115 || byte[3] || '''pad''' || padding |
|||
⚫ | |||
⚫ | |||
|- |
|||
| 0x11C || float || '''walljump_scale_xz''' || |
|||
|- |
|||
| 0x120 || float || '''walljump_scale_y''' || |
|||
|- |
|||
⚫ | |||
|- |
|||
| 0x128 || float || '''damage_bounce''' || little endian |
|||
|- |
|||
⚫ | |||
|- |
|||
| 0x12C || Event[numberOfEvents] || '''[[Events]]''' || |
|||
|} |
|} |
||
{{Assets}} |
|||
{{AutoGameNavs}} |
|||
[[Category:Asset]] |
[[Category:Asset]] |
Latest revision as of 22:55, 15 September 2022
SURF | |
---|---|
Surface | |
Type | Base |
Base Type | 0x1A |
Games used | Night of 100 Frights Battle for Bikini Bottom |
Source code | zSurface.h |
This asset defines an entry for a surface, which can be applied to other assets such as PLAT, SIMP, BOUL or even parts of JSP through the MAPR asset. The surface can have properties such as special materials, texture animations or patterns, and properties such as hurt, wall jump, out of bounds, prevent standing on.
Format
Surfaces are base assets, so they start with their 0x54 byte header, then are followed by:
Offset | Type | Variable | Description |
---|---|---|---|
0x08 | char | game_damage_type |
|
0x09 | char | game_sticky | always 0 |
0x0A | char | game_damage_flags |
|
0x0B | char | surf_type | always 0 |
0x0C | char | phys_pad | padding (always null) |
0x0D | char | sld_start | probably in degrees |
0x0E | char | sld_stop | probably in degrees |
0x0F | char | phys_flags |
|
0x10 | float | friction | range = 0 to 1? |
0x14 | zSurfMatFX | matfx | |
0x2C | zSurfColorFX | colorfx | |
0x34 | uint | texture_anim_flags | 0 or 1? |
0x38 | zSurfTextureAnim[2] | texture_anim | |
0x50 | uint | uvfx_flags | related to UV anim? 0 or 1? |
0x54 | zSurfUVFX[2] | uvfx | |
0x114 | char | on | 0 or 1 |
0x115 | char[3] | pad | padding |
0x118 | float | oob_delay | |
0x11C | float | walljump_scale_xz | |
0x120 | float | walljump_scale_y | |
0x124 | float | damage_timer | little endian |
0x128 | float | damage_bounce | little endian |
Events | |||
0x12C | Event[numberOfEvents] | Events |
zSurfMatFX
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | uint | flags |
|
0x04 | AssetID | bumpmapID | usually null |
0x08 | AssetID | envmapID | |
0x0C | float | shininess | |
0x10 | float | bumpiness | usually 0 |
0x14 | AssetID | dualmapID | usually null |
zSurfColorFX
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | ushort | flags | always 0x000E |
0x02 | ushort | mode | always 0 |
0x04 | float | speed |
zSurfTextureAnim
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | ushort | pad | padding (always null) |
0x02 | ushort | mode |
|
0x04 | AssetID | group | |
0x08 | float | speed |
zSurfUVFX
Offset | Type | Variable | Description |
---|---|---|---|
0x54 | int | mode | always 0 |
0x58 | float | rot | always 0 |
0x5C | float | rot_spd | |
0x60 | Vector3 | trans | Z is always 0 |
0x6C | Vector3 | trans_spd | Z is always 0 |
0x78 | Vector3 | scale | Z is always 0 |
0x84 | Vector3 | scale_spd | usually (0, 0, 0) |
0x90 | Vector3 | min | usually (0, 0, 0) |
0x9C | Vector3 | max | usually (0, 0, 0) |
0xA8 | Vector3 | minmax_spd | usually (0, 0, 0) |