![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
#include "types.h"
Go to the source code of this file.
Functions | |
s32 | is_anim_at_end (struct MarioState *m) |
Checks if Mario's animation has reached its end point. More... | |
s32 | is_anim_past_end (struct MarioState *m) |
Checks if Mario's animation has surpassed 2 frames before its end point. More... | |
s16 | set_mario_animation (struct MarioState *m, s32 targetAnimID) |
Sets Mario's animation without any acceleration, running at its default rate. More... | |
s16 | set_mario_anim_with_accel (struct MarioState *m, s32 targetAnimID, s32 accel) |
Sets Mario's animation where the animation is sped up or slowed down via acceleration. More... | |
void | set_anim_to_frame (struct MarioState *m, s16 animFrame) |
Sets the animation to a specific "next" frame from the frame given. More... | |
s32 | is_anim_past_frame (struct MarioState *m, s16 animFrame) |
s16 | find_mario_anim_flags_and_translation (struct Object *o, s32 yaw, Vec3s translation) |
Rotates the animation's translation into the global coordinate system and returns the animation's flags. More... | |
void | update_mario_pos_for_anim (struct MarioState *m) |
Updates Mario's position from his animation's translation. More... | |
s16 | return_mario_anim_y_translation (struct MarioState *m) |
Finds the vertical translation from Mario's animation. More... | |
void | play_sound_if_no_flag (struct MarioState *m, u32 soundBits, u32 flags) |
Plays a sound if if Mario doesn't have the flag being checked. More... | |
void | play_mario_action_sound (struct MarioState *m) |
Plays an action sound if one has not been played since the last action change. More... | |
void | adjust_sound_for_speed (struct MarioState *m) |
Adjusts the volume/pitch of sounds from Mario's speed. More... | |
void | play_sound_and_spawn_particles (struct MarioState *m, u32 soundBits, u32 waveParticleType) |
Spawns particles if the step sound says to, then either plays a step sound or relevant other sound. More... | |
void | play_mario_environment_sound (struct MarioState *m, u32 soundBits, u32 waveParticleType) |
Plays an environmental sound if one has not been played since the last action change. More... | |
void | play_mario_step_sound (struct MarioState *m, u32 soundBits) |
Plays a step sound, accounting for metal cap. More... | |
void | play_mario_landing_sound (struct MarioState *m, u32 soundBits) |
Plays a landing sound, accounting for metal cap. More... | |
void | play_mario_heavy_landing_sound (struct MarioState *m, u32 soundBits) |
Plays a heavy landing (ground pound, etc.) sound, accounting for metal cap. More... | |
void | play_mario_knockback_sound (struct MarioState *m, u32 soundBits) |
Plays a knockback sound, accounting for metal cap. More... | |
void | play_mario_sound (struct MarioState *m, s32 primarySoundBits, s32 scondarySoundBits) |
Plays an environment and action noise relevant to what was passed into the function. More... | |
void | mario_set_forward_vel (struct MarioState *m, f32 speed) |
Sets Mario's other velocities from his forward speed. More... | |
s32 | mario_get_floor_class (struct MarioState *m) |
Returns the slipperines class of Mario's floor. More... | |
u32 | mario_get_step_noise (struct MarioState *m) |
Finds and returns Mario's step noise/type. More... | |
struct Surface * | resolve_and_return_wall_collisions (Vec3f pos, f32 offset, f32 radius) |
Collides with walls and returns the most recent wall. More... | |
f32 | vec3f_find_ceil (Vec3f pos, f32 height, struct Surface **ceil) |
Finds the ceiling from a vec3f horizontally and a height (with 80 vertical buffer). More... | |
s32 | mario_facing_downhill (struct MarioState *m, s32 turnYaw) |
Determines if Mario is facing "downhill.". More... | |
u32 | mario_floor_is_slippery (struct MarioState *m) |
Determines if a surface is slippery based on the surface class. More... | |
s32 | mario_floor_is_slope (struct MarioState *m) |
Determines if a surface is a slope based on the surface class. More... | |
s32 | mario_floor_is_steep (struct MarioState *m) |
Determines if a surface is steep based on the surface class. More... | |
f32 | find_floor_height_relative_polar (struct MarioState *m, s16 angleFromMario, f32 distFromMario) |
Finds the floor height relative from Mario given polar displacement. More... | |
s16 | find_floor_slope (struct MarioState *m, s16 yawOffset) |
Returns the slope of the floor based off points around Mario. More... | |
void | update_mario_sound_and_camera (struct MarioState *m) |
Adjusts Mario's camera and sound based on his action status. More... | |
void | set_steep_jump_action (struct MarioState *m) |
Transitions Mario to a steep jump action. More... | |
u32 | set_mario_action (struct MarioState *, u32 action, u32 actionArg) |
Puts Mario into a given action, putting Mario through the appropriate specific function if needed. More... | |
s32 | set_jump_from_landing (struct MarioState *m) |
Puts Mario into a specific jumping action from a landing action. More... | |
s32 | set_jumping_action (struct MarioState *m, u32 action, u32 actionArg) |
Puts Mario in a given action, as long as it is not overruled by either a quicksand or steep jump. More... | |
s32 | drop_and_set_mario_action (struct MarioState *m, u32 action, u32 actionArg) |
Drop anything Mario is holding and set a new action. More... | |
s32 | hurt_and_set_mario_action (struct MarioState *m, u32 action, u32 actionArg, s16 hurtCounter) |
Increment Mario's hurt counter and set a new action. More... | |
s32 | check_common_action_exits (struct MarioState *m) |
Checks a variety of inputs for common transitions between many different actions. More... | |
s32 | check_common_hold_action_exits (struct MarioState *m) |
Checks a variety of inputs for common transitions between many different object holding actions. More... | |
s32 | transition_submerged_to_walking (struct MarioState *m) |
Transitions Mario from a submerged action to a walking action. More... | |
s32 | set_water_plunge_action (struct MarioState *m) |
This is the transition function typically for entering a submerged action for a non-submerged action. More... | |
s32 | execute_mario_action (struct Object *o) |
void | init_mario (void) |
void | init_mario_from_save_file (void) |
Variables | |
u32 | D_80226EB8 |
struct Object * | gMarioObject |
The object representing mario. More... | |
struct Object * | gLuigiObject |
An object variable that may have been used to represent the planned second player. More... | |
void adjust_sound_for_speed | ( | struct MarioState * | m | ) |
Adjusts the volume/pitch of sounds from Mario's speed.
s32 check_common_action_exits | ( | struct MarioState * | m | ) |
Checks a variety of inputs for common transitions between many different actions.
A common variant of the below function.
s32 check_common_hold_action_exits | ( | struct MarioState * | m | ) |
Checks a variety of inputs for common transitions between many different object holding actions.
A holding variant of the above function.
s32 drop_and_set_mario_action | ( | struct MarioState * | m, |
u32 | action, | ||
u32 | actionArg | ||
) |
Drop anything Mario is holding and set a new action.
f32 find_floor_height_relative_polar | ( | struct MarioState * | m, |
s16 | angleFromMario, | ||
f32 | distFromMario | ||
) |
Finds the floor height relative from Mario given polar displacement.
s16 find_floor_slope | ( | struct MarioState * | m, |
s16 | yawOffset | ||
) |
Returns the slope of the floor based off points around Mario.
If Mario is near OOB, these floorY's can sometimes be -11000.
Rotates the animation's translation into the global coordinate system and returns the animation's flags.
Increment Mario's hurt counter and set a new action.
s32 is_anim_at_end | ( | struct MarioState * | m | ) |
Checks if Mario's animation has reached its end point.
s32 is_anim_past_end | ( | struct MarioState * | m | ) |
Checks if Mario's animation has surpassed 2 frames before its end point.
s32 is_anim_past_frame | ( | struct MarioState * | m, |
s16 | animFrame | ||
) |
s32 mario_facing_downhill | ( | struct MarioState * | m, |
s32 | turnYaw | ||
) |
Determines if Mario is facing "downhill.".
u32 mario_floor_is_slippery | ( | struct MarioState * | m | ) |
Determines if a surface is slippery based on the surface class.
s32 mario_floor_is_slope | ( | struct MarioState * | m | ) |
Determines if a surface is a slope based on the surface class.
s32 mario_floor_is_steep | ( | struct MarioState * | m | ) |
Determines if a surface is steep based on the surface class.
s32 mario_get_floor_class | ( | struct MarioState * | m | ) |
Returns the slipperines class of Mario's floor.
u32 mario_get_step_noise | ( | struct MarioState * | m | ) |
Finds and returns Mario's step noise/type.
Depends on surfaces and terrain.
void mario_set_forward_vel | ( | struct MarioState * | m, |
f32 | speed | ||
) |
Sets Mario's other velocities from his forward speed.
void play_mario_action_sound | ( | struct MarioState * | m | ) |
Plays an action sound if one has not been played since the last action change.
void play_mario_environment_sound | ( | struct MarioState * | m, |
u32 | soundBits, | ||
u32 | waveParticleType | ||
) |
Plays an environmental sound if one has not been played since the last action change.
void play_mario_heavy_landing_sound | ( | struct MarioState * | m, |
u32 | soundBits | ||
) |
Plays a heavy landing (ground pound, etc.) sound, accounting for metal cap.
void play_mario_knockback_sound | ( | struct MarioState * | m, |
u32 | soundBits | ||
) |
Plays a knockback sound, accounting for metal cap.
void play_mario_landing_sound | ( | struct MarioState * | m, |
u32 | soundBits | ||
) |
Plays a landing sound, accounting for metal cap.
void play_mario_sound | ( | struct MarioState * | m, |
s32 | primarySoundBits, | ||
s32 | scondarySoundBits | ||
) |
Plays an environment and action noise relevant to what was passed into the function.
void play_mario_step_sound | ( | struct MarioState * | m, |
u32 | soundBits | ||
) |
Plays a step sound, accounting for metal cap.
void play_sound_and_spawn_particles | ( | struct MarioState * | m, |
u32 | soundBits, | ||
u32 | waveParticleType | ||
) |
Spawns particles if the step sound says to, then either plays a step sound or relevant other sound.
void play_sound_if_no_flag | ( | struct MarioState * | m, |
u32 | soundBits, | ||
u32 | flags | ||
) |
Plays a sound if if Mario doesn't have the flag being checked.
Collides with walls and returns the most recent wall.
s16 return_mario_anim_y_translation | ( | struct MarioState * | m | ) |
Finds the vertical translation from Mario's animation.
void set_anim_to_frame | ( | struct MarioState * | m, |
s16 | animFrame | ||
) |
Sets the animation to a specific "next" frame from the frame given.
s32 set_jump_from_landing | ( | struct MarioState * | m | ) |
Puts Mario into a specific jumping action from a landing action.
s32 set_jumping_action | ( | struct MarioState * | m, |
u32 | action, | ||
u32 | actionArg | ||
) |
Puts Mario in a given action, as long as it is not overruled by either a quicksand or steep jump.
u32 set_mario_action | ( | struct MarioState * | , |
u32 | action, | ||
u32 | actionArg | ||
) |
Puts Mario into a given action, putting Mario through the appropriate specific function if needed.
s16 set_mario_anim_with_accel | ( | struct MarioState * | m, |
s32 | targetAnimID, | ||
s32 | accel | ||
) |
Sets Mario's animation where the animation is sped up or slowed down via acceleration.
s16 set_mario_animation | ( | struct MarioState * | m, |
s32 | targetAnimID | ||
) |
Sets Mario's animation without any acceleration, running at its default rate.
void set_steep_jump_action | ( | struct MarioState * | m | ) |
Transitions Mario to a steep jump action.
((s16)0x8000) has undefined behavior. Therefore, this downcast has
s32 set_water_plunge_action | ( | struct MarioState * | m | ) |
This is the transition function typically for entering a submerged action for a non-submerged action.
This also applies the water surface camera preset.
s32 transition_submerged_to_walking | ( | struct MarioState * | m | ) |
Transitions Mario from a submerged action to a walking action.
void update_mario_pos_for_anim | ( | struct MarioState * | m | ) |
Updates Mario's position from his animation's translation.
void update_mario_sound_and_camera | ( | struct MarioState * | m | ) |
Adjusts Mario's camera and sound based on his action status.
Finds the ceiling from a vec3f horizontally and a height (with 80 vertical buffer).
u32 D_80226EB8 |
An object variable that may have been used to represent the planned second player.
This is speculation, based on its position and its usage in shadow.c.