Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Functions | Variables
mario_actions_submerged.c File Reference
#include <ultra64.h>
#include "sm64.h"
#include "level_update.h"
#include "memory.h"
#include "engine/math_util.h"
#include "area.h"
#include "save_file.h"
#include "sound_init.h"
#include "engine/surface_collision.h"
#include "interaction.h"
#include "mario.h"
#include "mario_step.h"
#include "camera.h"
#include "audio/external.h"
#include "behavior_data.h"

Functions

static void set_swimming_at_surface_particles (struct MarioState *m, u32 particleFlag)
 
static s32 swimming_near_surface (struct MarioState *m)
 
static f32 get_buoyancy (struct MarioState *m)
 
static u32 perform_water_full_step (struct MarioState *m, Vec3f nextPos)
 
static void apply_water_current (struct MarioState *m, Vec3f step)
 
static u32 perform_water_step (struct MarioState *m)
 
static void func_80270504 (struct MarioState *m)
 
static void stationary_slow_down (struct MarioState *m)
 
static void update_swimming_speed (struct MarioState *m, f32 decelThreshold)
 
static void update_swimming_yaw (struct MarioState *m)
 
static void update_swimming_pitch (struct MarioState *m)
 
static void common_idle_step (struct MarioState *m, s32 animation, s32 arg)
 
static s32 act_water_idle (struct MarioState *m)
 
static s32 act_hold_water_idle (struct MarioState *m)
 
static s32 act_water_action_end (struct MarioState *m)
 
static s32 act_hold_water_action_end (struct MarioState *m)
 
static void func_8027107C (struct MarioState *m)
 
static void func_802710CC (struct MarioState *m)
 
static void common_swimming_step (struct MarioState *m, s16 swimStrength)
 
static void func_802713A8 (struct MarioState *m)
 
static s32 check_water_jump (struct MarioState *m)
 
static s32 act_breaststroke (struct MarioState *m)
 
static s32 act_swimming_end (struct MarioState *m)
 
static s32 act_flutter_kick (struct MarioState *m)
 
static s32 act_hold_breaststroke (struct MarioState *m)
 
static s32 act_hold_swimming_end (struct MarioState *m)
 
static s32 act_hold_flutter_kick (struct MarioState *m)
 
static s32 act_water_shell_swimming (struct MarioState *m)
 
static s32 check_water_grab (struct MarioState *m)
 
static s32 act_water_throw (struct MarioState *m)
 
static s32 act_water_punch (struct MarioState *m)
 
static void common_water_knockback_step (struct MarioState *m, s32 animation, u32 endAction, s32 arg3)
 
static s32 act_backward_water_kb (struct MarioState *m)
 
static s32 act_forward_water_kb (struct MarioState *m)
 
static s32 act_water_shocked (struct MarioState *m)
 
static s32 act_drowning (struct MarioState *m)
 
static s32 act_water_death (struct MarioState *m)
 
static s32 act_water_plunge (struct MarioState *m)
 
static s32 act_caught_in_whirlpool (struct MarioState *m)
 
static void func_80272FA8 (struct MarioState *m, u32 arg)
 
static void play_metal_water_walking_sound (struct MarioState *m)
 
static void update_metal_water_walking_speed (struct MarioState *m)
 
static s32 update_metal_water_jump_speed (struct MarioState *m)
 
static s32 act_metal_water_standing (struct MarioState *m)
 
static s32 act_hold_metal_water_standing (struct MarioState *m)
 
static s32 act_metal_water_walking (struct MarioState *m)
 
static s32 act_hold_metal_water_walking (struct MarioState *m)
 
static s32 act_metal_water_jump (struct MarioState *m)
 
static s32 act_hold_metal_water_jump (struct MarioState *m)
 
static s32 act_metal_water_falling (struct MarioState *m)
 
static s32 act_hold_metal_water_falling (struct MarioState *m)
 
static s32 act_metal_water_jump_land (struct MarioState *m)
 
static s32 act_hold_metal_water_jump_land (struct MarioState *m)
 
static s32 act_metal_water_fall_land (struct MarioState *m)
 
static s32 act_hold_metal_water_fall_land (struct MarioState *m)
 
static s32 check_common_submerged_cancels (struct MarioState *m)
 
s32 mario_execute_submerged_action (struct MarioState *m)
 

Variables

static s16 sWasAtSurface = FALSE
 
static s16 D_8032CDD4 = 160
 
static s16 sWaterCurrentSpeeds [] = { 28, 12, 8, 4 }
 
static s16 D_80339FD0
 
static s16 D_80339FD2
 
static f32 D_80339FD4
 

Function Documentation

◆ act_backward_water_kb()

static s32 act_backward_water_kb ( struct MarioState m)
static

◆ act_breaststroke()

static s32 act_breaststroke ( struct MarioState m)
static

◆ act_caught_in_whirlpool()

static s32 act_caught_in_whirlpool ( struct MarioState m)
static

◆ act_drowning()

static s32 act_drowning ( struct MarioState m)
static

◆ act_flutter_kick()

static s32 act_flutter_kick ( struct MarioState m)
static

◆ act_forward_water_kb()

static s32 act_forward_water_kb ( struct MarioState m)
static

◆ act_hold_breaststroke()

static s32 act_hold_breaststroke ( struct MarioState m)
static

◆ act_hold_flutter_kick()

static s32 act_hold_flutter_kick ( struct MarioState m)
static

◆ act_hold_metal_water_fall_land()

static s32 act_hold_metal_water_fall_land ( struct MarioState m)
static

◆ act_hold_metal_water_falling()

static s32 act_hold_metal_water_falling ( struct MarioState m)
static

◆ act_hold_metal_water_jump()

static s32 act_hold_metal_water_jump ( struct MarioState m)
static

◆ act_hold_metal_water_jump_land()

static s32 act_hold_metal_water_jump_land ( struct MarioState m)
static

◆ act_hold_metal_water_standing()

static s32 act_hold_metal_water_standing ( struct MarioState m)
static

◆ act_hold_metal_water_walking()

static s32 act_hold_metal_water_walking ( struct MarioState m)
static

◆ act_hold_swimming_end()

static s32 act_hold_swimming_end ( struct MarioState m)
static

◆ act_hold_water_action_end()

static s32 act_hold_water_action_end ( struct MarioState m)
static

◆ act_hold_water_idle()

static s32 act_hold_water_idle ( struct MarioState m)
static

◆ act_metal_water_fall_land()

static s32 act_metal_water_fall_land ( struct MarioState m)
static

◆ act_metal_water_falling()

static s32 act_metal_water_falling ( struct MarioState m)
static

◆ act_metal_water_jump()

static s32 act_metal_water_jump ( struct MarioState m)
static

◆ act_metal_water_jump_land()

static s32 act_metal_water_jump_land ( struct MarioState m)
static

◆ act_metal_water_standing()

static s32 act_metal_water_standing ( struct MarioState m)
static

◆ act_metal_water_walking()

static s32 act_metal_water_walking ( struct MarioState m)
static

◆ act_swimming_end()

static s32 act_swimming_end ( struct MarioState m)
static

◆ act_water_action_end()

static s32 act_water_action_end ( struct MarioState m)
static

◆ act_water_death()

static s32 act_water_death ( struct MarioState m)
static

◆ act_water_idle()

static s32 act_water_idle ( struct MarioState m)
static

◆ act_water_plunge()

static s32 act_water_plunge ( struct MarioState m)
static

◆ act_water_punch()

static s32 act_water_punch ( struct MarioState m)
static

◆ act_water_shell_swimming()

static s32 act_water_shell_swimming ( struct MarioState m)
static

◆ act_water_shocked()

static s32 act_water_shocked ( struct MarioState m)
static

◆ act_water_throw()

static s32 act_water_throw ( struct MarioState m)
static

◆ apply_water_current()

static void apply_water_current ( struct MarioState m,
Vec3f  step 
)
static

◆ check_common_submerged_cancels()

static s32 check_common_submerged_cancels ( struct MarioState m)
static

If you press B to throw the shell, there is a ~5 frame window

◆ check_water_grab()

static s32 check_water_grab ( struct MarioState m)
static

Heave hos have the grabbable interaction type but are not normally

◆ check_water_jump()

static s32 check_water_jump ( struct MarioState m)
static

◆ common_idle_step()

static void common_idle_step ( struct MarioState m,
s32  animation,
s32  arg 
)
static

◆ common_swimming_step()

static void common_swimming_step ( struct MarioState m,
s16  swimStrength 
)
static

◆ common_water_knockback_step()

static void common_water_knockback_step ( struct MarioState m,
s32  animation,
u32  endAction,
s32  arg3 
)
static

◆ func_80270504()

static void func_80270504 ( struct MarioState m)
static

◆ func_8027107C()

static void func_8027107C ( struct MarioState m)
static

◆ func_802710CC()

static void func_802710CC ( struct MarioState m)
static

◆ func_802713A8()

static void func_802713A8 ( struct MarioState m)
static

◆ func_80272FA8()

static void func_80272FA8 ( struct MarioState m,
u32  arg 
)
static

◆ get_buoyancy()

static f32 get_buoyancy ( struct MarioState m)
static

◆ mario_execute_submerged_action()

s32 mario_execute_submerged_action ( struct MarioState m)

◆ perform_water_full_step()

static u32 perform_water_full_step ( struct MarioState m,
Vec3f  nextPos 
)
static

Water ceiling downwarp

◆ perform_water_step()

static u32 perform_water_step ( struct MarioState m)
static

◆ play_metal_water_walking_sound()

static void play_metal_water_walking_sound ( struct MarioState m)
static

◆ set_swimming_at_surface_particles()

static void set_swimming_at_surface_particles ( struct MarioState m,
u32  particleFlag 
)
static

◆ stationary_slow_down()

static void stationary_slow_down ( struct MarioState m)
static

◆ swimming_near_surface()

static s32 swimming_near_surface ( struct MarioState m)
static

◆ update_metal_water_jump_speed()

static s32 update_metal_water_jump_speed ( struct MarioState m)
static

◆ update_metal_water_walking_speed()

static void update_metal_water_walking_speed ( struct MarioState m)
static

◆ update_swimming_pitch()

static void update_swimming_pitch ( struct MarioState m)
static

◆ update_swimming_speed()

static void update_swimming_speed ( struct MarioState m,
f32  decelThreshold 
)
static

◆ update_swimming_yaw()

static void update_swimming_yaw ( struct MarioState m)
static

Variable Documentation

◆ D_8032CDD4

s16 D_8032CDD4 = 160
static

◆ D_80339FD0

s16 D_80339FD0
static

◆ D_80339FD2

s16 D_80339FD2
static

◆ D_80339FD4

f32 D_80339FD4
static

◆ sWasAtSurface

s16 sWasAtSurface = FALSE
static

◆ sWaterCurrentSpeeds

s16 sWaterCurrentSpeeds[] = { 28, 12, 8, 4 }
static