EvilEngine/SURF

From Heavy Iron Modding

SURF
Surface
TypeBase
Base Type0x1A
Games usedNight of 100 Frights

Battle for Bikini Bottom
The SpongeBob SquarePants Movie
The Incredibles
Rise of the Underminer

Ratatouille Prototype
Source codezSurface.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
  • 0x00 = ?
  • 0x01 = ?
  • 0x05 = ?
  • 0x06 = Hazard?
0x09 char game_sticky always 0
0x0A char game_damage_flags
  • 0x00 = ?
  • 0x01 = ?
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
  • 0x00 = Slide Off Player
  • 0x02 = Angle Player
  • 0x03 = ?
  • 0x04 = No Stand
  • 0x08 = Out Of Bounds
  • 0x10 = Wall Jump
  • 0x20 = Ledge Grab
  • 0x48 = ?
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
  • 0 = ?
  • 1 = ?
  • 8 = ?
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
  • 0 = ?
  • 2 = ?
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)