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

This file contains miscellaneous geo_asm scripts. More...

#include <ultra64.h>
#include "sm64.h"
#include "geo_misc.h"
#include "area.h"
#include "engine/math_util.h"
#include "level_update.h"
#include "mario_actions_cutscene.h"
#include "mario.h"
#include "memory.h"
#include "rendering_graph_node.h"
#include "save_file.h"
#include "segment2.h"

Macros

#define NUM_FLYING_CARPET_VERTICES   21
 

Functions

void make_vertex (Vtx *vtx, s32 n, s16 x, s16 y, s16 z, s16 tx, s16 ty, u8 r, u8 g, u8 b, u8 a)
 Create a vertex with the given parameters and insert it into vtx at position n. More...
 
s16 round_float (f32 num)
 Round num to the nearest s16. More...
 
Gfxgeo_exec_inside_castle_light (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Create a display list for the light in the castle lobby that shows the player where to look to enter Tower of the Wing Cap. More...
 
Gfxgeo_exec_flying_carpet_timer_update (s32 callContext, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4])
 Update static timer variables that control the flying carpets' ripple effect. More...
 
Gfxgeo_exec_flying_carpet_create (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Create a display list for a flying carpet with dynamic ripples. More...
 
Gfxgeo_exec_cake_end_screen (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Create a display list for the end screen with Peach's delicious cake. More...
 

Variables

s16 flying_carpet_static_vertex_data [NUM_FLYING_CARPET_VERTICES]
 
Gfx dl_castle_lobby_wing_cap_light []
 
Gfx dl_flying_carpet_begin []
 
Gfx dl_flying_carpet_model_half []
 
Gfx dl_flying_carpet_end []
 
Gfx dl_cake_end_screen []
 
static s16 sCurAreaTimer = 1
 
static s16 sPrevAreaTimer = 0
 
static s16 sFlyingCarpetRippleTimer = 0
 
s8 gFlyingCarpetState
 

Detailed Description

This file contains miscellaneous geo_asm scripts.

In particular, it builds:

Macro Definition Documentation

◆ NUM_FLYING_CARPET_VERTICES

#define NUM_FLYING_CARPET_VERTICES   21

Function Documentation

◆ geo_exec_cake_end_screen()

Gfx* geo_exec_cake_end_screen ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Create a display list for the end screen with Peach's delicious cake.

◆ geo_exec_flying_carpet_create()

Gfx* geo_exec_flying_carpet_create ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Create a display list for a flying carpet with dynamic ripples.

◆ geo_exec_flying_carpet_timer_update()

Gfx* geo_exec_flying_carpet_timer_update ( s32  callContext,
UNUSED struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Update static timer variables that control the flying carpets' ripple effect.

◆ geo_exec_inside_castle_light()

Gfx* geo_exec_inside_castle_light ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Create a display list for the light in the castle lobby that shows the player where to look to enter Tower of the Wing Cap.

◆ make_vertex()

void make_vertex ( Vtx vtx,
s32  n,
s16  x,
s16  y,
s16  z,
s16  tx,
s16  ty,
u8  r,
u8  g,
u8  b,
u8  a 
)

Create a vertex with the given parameters and insert it into vtx at position n.

◆ round_float()

s16 round_float ( f32  num)

Round num to the nearest s16.

Variable Documentation

◆ dl_cake_end_screen

Gfx dl_cake_end_screen[]

◆ dl_castle_lobby_wing_cap_light

Gfx dl_castle_lobby_wing_cap_light[]

◆ dl_flying_carpet_begin

Gfx dl_flying_carpet_begin[]

◆ dl_flying_carpet_end

Gfx dl_flying_carpet_end[]

◆ dl_flying_carpet_model_half

Gfx dl_flying_carpet_model_half[]

◆ flying_carpet_static_vertex_data

s16 flying_carpet_static_vertex_data[NUM_FLYING_CARPET_VERTICES]

◆ gFlyingCarpetState

s8 gFlyingCarpetState

◆ sCurAreaTimer

s16 sCurAreaTimer = 1
static

◆ sFlyingCarpetRippleTimer

s16 sFlyingCarpetRippleTimer = 0
static

◆ sPrevAreaTimer

s16 sPrevAreaTimer = 0
static