![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
Data Structures | |
struct | KoopaTheQuickProperties |
Data to control the behavior of each instance of Koopa the Quick. More... | |
Functions | |
void | bhv_koopa_init (void) |
Initialization function. More... | |
static void | koopa_play_footstep_sound (s8 animFrame1, s8 animFrame2) |
Play the appropriate footstep sound on the two provided animation frames. More... | |
static s32 | koopa_check_run_from_mario (void) |
If mario is close to koopa, and koopa is facing toward mario, then begin running away. More... | |
static void | koopa_shelled_act_stopped (void) |
Stay still for a while, then change target yaw by 45 degrees and begin walking. More... | |
static void | koopa_walk_start (void) |
Begin walking, then increment sub-action. More... | |
static void | koopa_walk (void) |
Walk until oKoopaCountdown hits zero, then increment sub-action. More... | |
static void | koopa_walk_stop (void) |
Stop walking, then enter action KOOPA_SHELLED_ACT_STOPPED. More... | |
static void | koopa_shelled_act_walk (void) |
Walk for a while, then come to a stop. More... | |
static void | koopa_shelled_act_run_from_mario (void) |
Run while turning away from mario. More... | |
static void | koopa_dive_update_speed (f32 decel) |
If on the ground, decelerate. More... | |
static void | koopa_shelled_act_lying (void) |
Slide on the ground and then come to a stop. More... | |
void | shelled_koopa_attack_handler (s32 attackType) |
Attack handler for regular-sized shelled koopa. More... | |
static void | koopa_shelled_update (void) |
Update function for both regular and tiny shelled koopa. More... | |
static void | koopa_unshelled_act_run (void) |
Attempt to run toward the shell if it exists while still running away from mario. More... | |
static void | koopa_unshelled_act_dive (void) |
Dive and slide along the ground. More... | |
static void | koopa_unshelled_act_unused3 (void) |
Unused action function. More... | |
static void | koopa_unshelled_update (void) |
Update function for koopa after losing his shell. More... | |
s32 | obj_begin_race (s32 noTimer) |
Wait 50 frames, then play the race starting sound, disable time stop, and optionally begin the timer. More... | |
static void | koopa_the_quick_act_wait_before_race (void) |
Wait for mario to approach, and then enter the show init text action. More... | |
static void | koopa_the_quick_act_show_init_text (void) |
Display the dialog asking mario if he wants to race. More... | |
static s32 | koopa_the_quick_detect_bowling_ball (void) |
If there is a bowling ball nearby, either slow down, or return +/-1 to indicate that the ball is likely to collide. More... | |
static void | koopa_the_quick_animate_footsteps (void) |
Play the running animation at a speed proportional to ktq's forward velocity. More... | |
static void | koopa_the_quick_act_race (void) |
Begin the race, then follow the race path. More... | |
static void | koopa_the_quick_act_decelerate (void) |
Decelerate and then enter the stop action. More... | |
static void | koopa_the_quick_act_stop (void) |
Stop and then enter the after race action. More... | |
static void | koopa_the_quick_act_after_race (void) |
Wait for mario to approach, then show text indicating the status of the race. More... | |
static void | koopa_the_quick_update (void) |
Update function for koopa the quick. More... | |
void | bhv_koopa_update (void) |
Update function. More... | |
void | bhv_koopa_race_endpoint_update (void) |
Update function for bhvKoopaRaceEndpoint. More... | |
Variables | |
static struct ObjectHitbox | sKoopaHitbox |
Behavior for bhvKoopa and bhvKoopaRaceEndpoint. More... | |
static u8 | sKoopaUnshelledAttackHandlers [] |
Attack handlers for unshelled koopa and tiny shelled koopa. More... | |
static u8 | sKoopaShelledAttackHandlers [] |
Attack handlers for regular sized shelled koopa. More... | |
static struct KoopaTheQuickProperties | sKoopaTheQuickProperties [] |
Properties for the BoB race and the THI race. More... | |
If mario is close to koopa, and koopa is facing toward mario, then begin running away.
If on the ground, decelerate.
Generate dust if moving fast enough.
Play the appropriate footstep sound on the two provided animation frames.
Run while turning away from mario.
Come to a stop once mario is far enough away.
Stay still for a while, then change target yaw by 45 degrees and begin walking.
Walk for a while, then come to a stop.
During this time, turn toward the target yaw.
Update function for both regular and tiny shelled koopa.
Wait for mario to approach, then show text indicating the status of the race.
If mario got to the finish line first and didn't use the cannon, then spawn the star.
Decelerate and then enter the stop action.
Begin the race, then follow the race path.
Avoid bowling balls by slowing down or jumping. After finishing the race, enter the decelerate action.
Display the dialog asking mario if he wants to race.
Begin the race or return to the waiting action.
Wait for mario to approach, and then enter the show init text action.
The next action doesn't execute until next frame, giving mario one
Play the running animation at a speed proportional to ktq's forward velocity.
If he is moving backward, then the animation will play backward.
With high negative speed (using the bowling ball deceleration), we can
If there is a bowling ball nearby, either slow down, or return +/-1 to indicate that the ball is likely to collide.
This can go negative and is unbounded. If placed next to
Dive and slide along the ground.
If close enough to the shell, pick it up, and otherwise enter the running action.
The shell comes after koopa in processing order, and the shell is
Attempt to run toward the shell if it exists while still running away from mario.
If the shell doesn't exist, run around randomly. When close enough to the shell and with good angle and speed, enter the dive action.
This overrides turning toward home
Update function for koopa after losing his shell.
Walk until oKoopaCountdown hits zero, then increment sub-action.
Stop walking, then enter action KOOPA_SHELLED_ACT_STOPPED.
Wait 50 frames, then play the race starting sound, disable time stop, and optionally begin the timer.
Attack handler for regular-sized shelled koopa.
Lose shell and enter lying action.
Because bob-ombs/corkboxes come after koopa in processing order,
|
static |
Behavior for bhvKoopa and bhvKoopaRaceEndpoint.
bhvKoopa includes normal, unshelled, tiny, and Koopa the Quick. When the race begins, koopa the quick sets his parent to bhvKoopaRaceEndpoint which assists in determining the state of the race. It is positioned at the flag. Hitbox for koopa - this is used for every form except Koopa the Quick, which uses a hardcoded soft hitbox.
|
static |
Attack handlers for regular sized shelled koopa.
|
static |
Properties for the BoB race and the THI race.
|
static |
Attack handlers for unshelled koopa and tiny shelled koopa.