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

Functions

void bhv_ttc_2d_rotator_init (void)
 Init function for bhvTTC2DRotator. More...
 
void bhv_ttc_2d_rotator_update (void)
 Update function for bhvTTC2DRotator. More...
 

Variables

static s16 sTTC2DRotatorSpeeds []
 Behavior for bhvTTC2DRotator. More...
 
static s16 sTTC2DRotatorTimeBetweenTurns [][4]
 The time between each increment to target yaw. More...
 

Function Documentation

◆ bhv_ttc_2d_rotator_init()

void bhv_ttc_2d_rotator_init ( void  )

Init function for bhvTTC2DRotator.

◆ bhv_ttc_2d_rotator_update()

void bhv_ttc_2d_rotator_update ( void  )

Update function for bhvTTC2DRotator.

Rotate to target yaw, and make sure we've waited long enough since the last turn, then increment the target yaw and possibly change direction.

Variable Documentation

◆ sTTC2DRotatorSpeeds

s16 sTTC2DRotatorSpeeds[]
static
Initial value:
= {
-0x444,
-0xCCC,
}

Behavior for bhvTTC2DRotator.

This includes the hand (in TTC, not the clock in the castle), as well as the purely visual 2D cogs in TTC. Speeds for the hand and the 2D cog, respectively. Negative because clockwise.

◆ sTTC2DRotatorTimeBetweenTurns

s16 sTTC2DRotatorTimeBetweenTurns[][4]
static
Initial value:
= {
{
40,
10,
10,
0,
},
{
20,
5,
5,
0,
},
}

The time between each increment to target yaw.

On random setting, this is only used for the first turn, after which it is chosen randomly. These values are for the hand and the 2D cog, respectively.