Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Data Structures | Macros | Functions
surface_collision.h File Reference

Go to the source code of this file.

Data Structures

struct  WallCollisionData
 
struct  FloorGeometry
 

Macros

#define LEVEL_BOUNDARY_MAX   0x2000
 
#define CELL_SIZE   0x400
 

Functions

s32 f32_find_wall_collision (f32 *xPtr, f32 *yPtr, f32 *zPtr, f32 offsetY, f32 radius)
 Formats the position and wall search for find_wall_collisions. More...
 
s32 find_wall_collisions (struct WallCollisionData *colData)
 Find wall collisions and receive their push. More...
 
f32 find_ceil (f32 posX, f32 posY, f32 posZ, struct Surface **pceil)
 Find the lowest ceiling above a given position and return the height. More...
 
f32 find_floor_height_and_data (f32 xPos, f32 yPos, f32 zPos, struct FloorGeometry **floorGeo)
 Return the floor height underneath (xPos, yPos, zPos) and populate floorGeo with data about the floor's normal vector and origin offset. More...
 
f32 find_floor_height (f32 x, f32 y, f32 z)
 Find the height of the highest floor below a point. More...
 
f32 find_floor (f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor)
 Find the highest floor under a given position and return the height. More...
 
f32 find_water_level (f32 x, f32 z)
 Finds the height of water at a given location. More...
 
f32 find_poison_gas_level (f32 x, f32 z)
 Finds the height of the poison gas (used only in HMC) at a given location. More...
 
void debug_surface_list_info (f32 xPos, f32 zPos)
 Print the area,number of walls, how many times they were called, and some allocation information. More...
 

Macro Definition Documentation

◆ CELL_SIZE

#define CELL_SIZE   0x400

◆ LEVEL_BOUNDARY_MAX

#define LEVEL_BOUNDARY_MAX   0x2000

Function Documentation

◆ debug_surface_list_info()

void debug_surface_list_info ( f32  xPos,
f32  zPos 
)

Print the area,number of walls, how many times they were called, and some allocation information.

◆ f32_find_wall_collision()

s32 f32_find_wall_collision ( f32 xPtr,
f32 yPtr,
f32 zPtr,
f32  offsetY,
f32  radius 
)

Formats the position and wall search for find_wall_collisions.

◆ find_ceil()

f32 find_ceil ( f32  posX,
f32  posY,
f32  posZ,
struct Surface **  pceil 
)

Find the lowest ceiling above a given position and return the height.

(Parallel Universes) Because position is casted to an s16, reaching higher

◆ find_floor()

f32 find_floor ( f32  xPos,
f32  yPos,
f32  zPos,
struct Surface **  pfloor 
)

Find the highest floor under a given position and return the height.

(Parallel Universes) Because position is casted to an s16, reaching higher

(BBH Crash) Most NULL checking is done by checking the height of the floor returned

◆ find_floor_height()

f32 find_floor_height ( f32  x,
f32  y,
f32  z 
)

Find the height of the highest floor below a point.

◆ find_floor_height_and_data()

f32 find_floor_height_and_data ( f32  xPos,
f32  yPos,
f32  zPos,
struct FloorGeometry **  floorGeo 
)

Return the floor height underneath (xPos, yPos, zPos) and populate floorGeo with data about the floor's normal vector and origin offset.

Also update sFloorGeo.

◆ find_poison_gas_level()

f32 find_poison_gas_level ( f32  x,
f32  z 
)

Finds the height of the poison gas (used only in HMC) at a given location.

◆ find_wall_collisions()

s32 find_wall_collisions ( struct WallCollisionData colData)

Find wall collisions and receive their push.

◆ find_water_level()

f32 find_water_level ( f32  x,
f32  z 
)

Finds the height of water at a given location.