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

Functions

void bhv_ttc_moving_bar_init (void)
 Init function for bhvTTCMovingBar. More...
 
static void ttc_moving_bar_act_wait (void)
 Wait a delay if necessary, then begin pulling back. More...
 
static void ttc_moving_bar_act_pull_back (void)
 Pull back, possibly stop for a bit, then begin extending. More...
 
static void ttc_moving_bar_reset (void)
 Reset and enter the wait action. More...
 
static void ttc_moving_bar_act_extend (void)
 With 25% probability on random setting, stop at 0 and reset. More...
 
static void ttc_moving_bar_act_retract (void)
 Wait a second, then retract back into the wall. More...
 
void bhv_ttc_moving_bar_update (void)
 Update function for bhvTTCMovingBar. More...
 

Variables

static s16 sTTCMovingBarDelays []
 Behavior for bhvTTCMovingBar. More...
 
static s8 sTTCMovingBarRandomDelays [] = { 1, 12, 55, 100 }
 The possible delays before each cycle while on random setting. More...
 

Function Documentation

◆ bhv_ttc_moving_bar_init()

void bhv_ttc_moving_bar_init ( void  )

Init function for bhvTTCMovingBar.

◆ bhv_ttc_moving_bar_update()

void bhv_ttc_moving_bar_update ( void  )

Update function for bhvTTCMovingBar.

◆ ttc_moving_bar_act_extend()

static void ttc_moving_bar_act_extend ( void  )
static

With 25% probability on random setting, stop at 0 and reset.

Otherwise, launch outward, oscillating and slowing down around 250, then begin retracting.

◆ ttc_moving_bar_act_pull_back()

static void ttc_moving_bar_act_pull_back ( void  )
static

Pull back, possibly stop for a bit, then begin extending.

◆ ttc_moving_bar_act_retract()

static void ttc_moving_bar_act_retract ( void  )
static

Wait a second, then retract back into the wall.

◆ ttc_moving_bar_act_wait()

static void ttc_moving_bar_act_wait ( void  )
static

Wait a delay if necessary, then begin pulling back.

◆ ttc_moving_bar_reset()

static void ttc_moving_bar_reset ( void  )
static

Reset and enter the wait action.

Variable Documentation

◆ sTTCMovingBarDelays

s16 sTTCMovingBarDelays[]
static
Initial value:
= {
55,
30,
55,
0,
}

Behavior for bhvTTCMovingBar.

The delay before each cycle on each setting. On random setting, this is overwritten with one of the below delays after the first cycle.

◆ sTTCMovingBarRandomDelays

s8 sTTCMovingBarRandomDelays[] = { 1, 12, 55, 100 }
static

The possible delays before each cycle while on random setting.