![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
Functions | |
void | bhv_wiggler_body_part_update (void) |
Update function for bhvWigglerBodyPart. More... | |
static void | wiggler_init_segments (void) |
Initialize the segment data and spawn the body part objects. More... | |
static void | wiggler_update_segments (void) |
Update the tail to reflect changes in the head's yaw and pitch, and ensure that the distance between parts is exactly the intended distance. More... | |
static void | wiggler_act_walk (void) |
Show text if necessary. More... | |
static void | wiggler_act_jumped_on (void) |
Squish and unsquish, then show text and enter either the walking or shrinking action. More... | |
static void | wiggler_act_knockback (void) |
Decelerate to a stop and then enter the walk action. More... | |
static void | wiggler_act_shrink (void) |
Shrink, then spawn the star and enter the fall through floor action. More... | |
static void | wiggler_act_fall_through_floor (void) |
Fall through floors until y < 1700, then enter the walking action. More... | |
void | wiggler_jumped_on_attack_handler (void) |
Attack handler for when wiggler is jumped or ground pounded on. More... | |
void | bhv_wiggler_update (void) |
Update function for bhvWiggler. More... | |
Variables | |
static struct ObjectHitbox | sWigglerBodyPartHitbox |
Behavior for bhvWiggler and bhvWigglerBodyPart. More... | |
static struct ObjectHitbox | sWigglerHitbox |
Hitbox for wiggler's head. More... | |
static u8 | sWigglerAttackHandlers [] |
Attack handler for wiggler while in the walking action. More... | |
static f32 | sWigglerSpeeds [] = { 2.0f, 40.0f, 30.0f, 16.0f } |
Target speed while walking when wiggler has health 1, 2, 3, and 4. More... | |
Update function for bhvWigglerBodyPart.
Set object position and angle based on wiggler segment data and avoid falling through the floor. Tangible if the wiggler is not in the shrinking action, but does nothing on attack.
Since position is recomputed each frame, tilting the wiggler up
Fall through floors until y < 1700, then enter the walking action.
Squish and unsquish, then show text and enter either the walking or shrinking action.
Decelerate to a stop and then enter the walk action.
Shrink, then spawn the star and enter the fall through floor action.
Show text if necessary.
Then walk toward mario if not at full health, and otherwise wander in random directions. If attacked by mario, enter either the jumped on or knockback action.
Every object's health is initially 2048, and wiggler's doesn't change
If the wiggler could self-intersect, or intersect a different
Initialize the segment data and spawn the body part objects.
Attack handler for when wiggler is jumped or ground pounded on.
Stop and enter the jumped on action.
Update the tail to reflect changes in the head's yaw and pitch, and ensure that the distance between parts is exactly the intended distance.
Since these positions are completely recomputed each frame, it is not possible for a body part to get stuck on geometry and separate from the rest of the body.
|
static |
Attack handler for wiggler while in the walking action.
|
static |
Behavior for bhvWiggler and bhvWigglerBodyPart.
The bhvWiggler object controls the wiggler's behavior, and physically manifests as the wiggler's head. The bhvWigglerBodyPart objects represent the 3 tail body parts, numbered 1 closest to the head, and 3 at the end of the tail. Processing order is bhvWiggler, then bhvWigglerBodyPart 1, 2, then 3. Hitbox for wiggler's non-head body parts.
|
static |
Hitbox for wiggler's head.
|
static |
Target speed while walking when wiggler has health 1, 2, 3, and 4.