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

Functions

void bhv_pokey_body_part_update (void)
 Update function for pokey body part. More...
 
static void pokey_act_uninitialized (void)
 When mario gets within range, spawn the 5 body parts and enter the wander action. More...
 
static void pokey_act_wander (void)
 Wander around, replenishing body parts if they are killed. More...
 
static void pokey_act_unload_parts (void)
 Move back to home and enter the uninitialized action. More...
 
void bhv_pokey_update (void)
 Update function for pokey. More...
 

Variables

static struct ObjectHitbox sPokeyBodyPartHitbox
 Behavior for bhvPokey and bhvPokeyBodyPart. More...
 
static u8 sPokeyBodyPartAttackHandlers []
 Attack handlers for pokey body part. More...
 

Function Documentation

◆ bhv_pokey_body_part_update()

void bhv_pokey_body_part_update ( void  )

Update function for pokey body part.

The behavior parameter is the body part's index from 0 to 4, with 0 at the top.

It is possible to briefly get two body parts to have the same

This "else if" means that if a body part above the expanding

If you kill a body part as it's expanding, the body part that

Pausing causes jumps in offset angle

◆ bhv_pokey_update()

void bhv_pokey_update ( void  )

Update function for pokey.

◆ pokey_act_uninitialized()

static void pokey_act_uninitialized ( void  )
static

When mario gets within range, spawn the 5 body parts and enter the wander action.

◆ pokey_act_unload_parts()

static void pokey_act_unload_parts ( void  )
static

Move back to home and enter the uninitialized action.

The pokey body parts check to see if pokey is in this action, and if so, unload themselves.

◆ pokey_act_wander()

static void pokey_act_wander ( void  )
static

Wander around, replenishing body parts if they are killed.

When mario moves far away, enter the unload parts action. While wandering, if mario is within 2000 units, try to move toward him. But if mario gets too close, then shy away from him.

Variable Documentation

◆ sPokeyBodyPartAttackHandlers

u8 sPokeyBodyPartAttackHandlers[]
static
Initial value:
= {
}
#define ATTACK_HANDLER_KNOCKBACK
Definition: obj_behaviors_2.h:8
#define ATTACK_HANDLER_SQUISHED
Definition: obj_behaviors_2.h:9

Attack handlers for pokey body part.

◆ sPokeyBodyPartHitbox

struct ObjectHitbox sPokeyBodyPartHitbox
static
Initial value:
= {
10,
2,
0,
0,
40,
20,
20,
20,
}
#define INTERACT_BOUNCE_TOP
Definition: interaction.h:21

Behavior for bhvPokey and bhvPokeyBodyPart.

bhvPokey is responsible for the behavior of the pokey itself, as well as spawning the body parts. Pokey comes before its body parts in processing order, and the body parts are processed top to bottom. Hitbox for a single pokey body part.