Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Functions | Variables
spiny.inc.c File Reference

Functions

static s32 spiny_check_active (void)
 If the spiny was spawned by lakitu and mario is far away, despawn. More...
 
static void spiny_act_walk (void)
 Walk around randomly, and dick around with oFlags, oMoveFlags, and oInteractType. More...
 
static void spiny_act_held_by_lakitu (void)
 Wait for the lakitu to throw the spiny. More...
 
static void spiny_act_thrown_by_lakitu (void)
 Spin around. More...
 
void bhv_spiny_update (void)
 Update function for bhvSpiny. More...
 

Variables

static struct ObjectHitbox sSpinyHitbox
 Behavior for bhvSpiny. More...
 
static u8 sSpinyWalkAttackHandlers []
 Attack handlers for spiny while walking. More...
 

Function Documentation

◆ bhv_spiny_update()

void bhv_spiny_update ( void  )

Update function for bhvSpiny.

◆ spiny_act_held_by_lakitu()

static void spiny_act_held_by_lakitu ( void  )
static

Wait for the lakitu to throw the spiny.

The spiny is placed in this action after being spawned by a lakitu.

◆ spiny_act_thrown_by_lakitu()

static void spiny_act_thrown_by_lakitu ( void  )
static

Spin around.

After landing, enter the walk action.

◆ spiny_act_walk()

static void spiny_act_walk ( void  )
static

Walk around randomly, and dick around with oFlags, oMoveFlags, and oInteractType.

◆ spiny_check_active()

static s32 spiny_check_active ( void  )
static

If the spiny was spawned by lakitu and mario is far away, despawn.

It's possible for the lakitu to despawn while the spiny still

Variable Documentation

◆ sSpinyHitbox

struct ObjectHitbox sSpinyHitbox
static
Initial value:
= {
0,
2,
0,
0,
80,
50,
40,
40,
}
#define INTERACT_MR_BLIZZARD
Definition: interaction.h:27

Behavior for bhvSpiny.

When spawned by lakitu, its parent object is the lakitu. Lakitu comes before it spawned spinies in processing order. Hitbox for spiny both while thrown and walking. The interaction type is changed to INTERACT_UNKNOWN_08 while walking.

◆ sSpinyWalkAttackHandlers

u8 sSpinyWalkAttackHandlers[]
static
Initial value:
= {
}
#define ATTACK_HANDLER_NOP
Definition: obj_behaviors_2.h:6
#define ATTACK_HANDLER_KNOCKBACK
Definition: obj_behaviors_2.h:8

Attack handlers for spiny while walking.