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

Functions

static void cloud_act_spawn_parts (void)
 Spawn the visual parts of the cloud, including fwoosh's face. More...
 
static void cloud_act_fwoosh_hidden (void)
 Wait for mario to approach, then unhide and enter the spawn parts action. More...
 
static void cloud_fwoosh_update (void)
 Move in a circle. More...
 
static void cloud_act_main (void)
 Main update function for bhvCloud. More...
 
static void cloud_act_unload (void)
 If fwoosh, return to home and hide. More...
 
void bhv_cloud_update (void)
 Update function for bhvCloud. More...
 
void bhv_cloud_part_update (void)
 Update function for bhvCloudPart. More...
 

Variables

static s8 sCloudPartHeights [] = { 11, 8, 12, 8, 9, 9 }
 Behavior for bhvCloud and bhvCloudPart. More...
 

Function Documentation

◆ bhv_cloud_part_update()

void bhv_cloud_part_update ( void  )

Update function for bhvCloudPart.

Follow the parent cloud with some oscillation.

◆ bhv_cloud_update()

void bhv_cloud_update ( void  )

Update function for bhvCloud.

◆ cloud_act_fwoosh_hidden()

static void cloud_act_fwoosh_hidden ( void  )
static

Wait for mario to approach, then unhide and enter the spawn parts action.

◆ cloud_act_main()

static void cloud_act_main ( void  )
static

Main update function for bhvCloud.

This controls the cloud's movement, when it unloads, and when fwoosh blows wind.

◆ cloud_act_spawn_parts()

static void cloud_act_spawn_parts ( void  )
static

Spawn the visual parts of the cloud, including fwoosh's face.

◆ cloud_act_unload()

static void cloud_act_unload ( void  )
static

If fwoosh, return to home and hide.

If lakitu cloud, despawn. This action informs the cloud parts to despawn.

◆ cloud_fwoosh_update()

static void cloud_fwoosh_update ( void  )
static

Move in a circle.

Unload if mario moves far away. If mario stays close for long enough, blow wind at him.

Variable Documentation

◆ sCloudPartHeights

s8 sCloudPartHeights[] = { 11, 8, 12, 8, 9, 9 }
static

Behavior for bhvCloud and bhvCloudPart.

bhvCloud includes both fwoosh and the cloud that lakitu rides (both nice and evil). bhvCloudPart is spawned by bhvCloud and is either a "chunk" of cloud, or fwoosh's face. It is purely visual. If spawned by a lakitu, its parent will be the lakitu. Processing order is lakitu -> cloud -> its cloud parts. The relative heights of each cloud part.