![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
#include <ultra64.h>
#include "sm64.h"
#include "game/level_update.h"
#include "game/debug.h"
#include "game/camera.h"
#include "game/mario.h"
#include "behavior_script.h"
#include "surface_collision.h"
#include "surface_load.h"
#include "game/object_list_processor.h"
#include "game/room.h"
Functions | |
static s32 | find_wall_collisions_from_list (struct SurfaceNode *surfaceNode, struct WallCollisionData *data) |
Iterate through the list of walls until all walls are checked and have given their wall push. More... | |
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... | |
static struct Surface * | find_ceil_from_list (struct SurfaceNode *surfaceNode, s32 x, s32 y, s32 z, f32 *pheight) |
Iterate through the list of ceilings and find the first ceiling over a given point. 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... | |
static f32 | unused_obj_find_floor_height (struct Object *obj) |
Find the height of the highest floor below an object. 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... | |
static struct Surface * | find_floor_from_list (struct SurfaceNode *surfaceNode, s32 x, s32 y, s32 z, f32 *pheight) |
Iterate through the list of floors and find the first floor under a given point. More... | |
f32 | find_floor_height (f32 x, f32 y, f32 z) |
Find the height of the highest floor below a point. More... | |
static f32 | unused_find_dynamic_floor (f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) |
Find the highest dynamic floor under a given position. 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... | |
static s32 | surface_list_length (struct SurfaceNode *list) |
Finds the length of a surface list for debug purposes. 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... | |
static s32 | unused_resolve_floor_or_ceil_collisions (s32 checkCeil, f32 *px, f32 *py, f32 *pz, f32 radius, struct Surface **psurface, f32 *surfaceHeight) |
An unused function that finds and interacts with any type of surface. More... | |
Variables | |
struct FloorGeometry | sFloorGeo |
Basically a local variable that passes through floor geo info. More... | |
static u8 | unused8038BE50 [0x40] |
Print the area,number of walls, how many times they were called, and some allocation information.
Formats the position and wall search for find_wall_collisions.
Find the lowest ceiling above a given position and return the height.
(Parallel Universes) Because position is casted to an s16, reaching higher
|
static |
Iterate through the list of ceilings and find the first ceiling over a given point.
(Exposed Ceilings) Because any point above a ceiling counts
(Surface Cucking) Since only the first ceil is returned and not the lowest,
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
|
static |
Iterate through the list of floors and find the first floor under a given point.
(Surface Cucking) Since only the first floor is returned and not the highest,
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.
Finds the height of the poison gas (used only in HMC) at a given location.
s32 find_wall_collisions | ( | struct WallCollisionData * | colData | ) |
Find wall collisions and receive their push.
|
static |
Iterate through the list of walls until all walls are checked and have given their wall push.
(Quantum Tunneling) Due to issues with the vertices walls choose and
(Wall Overlaps) Because this doesn't update the x and z local variables,
(Unreferenced Walls) Since this only returns the first four walls,
|
static |
Finds the length of a surface list for debug purposes.
|
static |
Find the highest dynamic floor under a given position.
Perhaps originally static and and dynamic floors were checked separately.
Find the height of the highest floor below an object.
|
static |
An unused function that finds and interacts with any type of surface.
Perhaps an original implementation of surfaces before they were more specialized.
struct FloorGeometry sFloorGeo |
Basically a local variable that passes through floor geo info.
|
static |