Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Data Structures | Macros | Enumerations | Functions | Variables
level_update.h File Reference
#include "types.h"

Go to the source code of this file.

Data Structures

struct  CreditsEntry
 
struct  WarpDest
 
struct  HudDisplay
 

Macros

#define TIMER_CONTROL_SHOW   0
 
#define TIMER_CONTROL_START   1
 
#define TIMER_CONTROL_STOP   2
 
#define TIMER_CONTROL_HIDE   3
 
#define WARP_OP_NONE   0x00
 
#define WARP_OP_UNKNOWN_01   0x01
 
#define WARP_OP_UNKNOWN_02   0x02
 
#define WARP_OP_WARP_DOOR   0x03
 
#define WARP_OP_WARP_OBJECT   0x04
 
#define WARP_OP_TELEPORT   0x05
 
#define WARP_OP_STAR_EXIT   0x11
 
#define WARP_OP_DEATH   0x12
 
#define WARP_OP_WARP_FLOOR   0x13
 
#define WARP_OP_GAME_OVER   0x14
 
#define WARP_OP_CREDITS_END   0x15
 
#define WARP_OP_DEMO_NEXT   0x16
 
#define WARP_OP_CREDITS_START   0x17
 
#define WARP_OP_CREDITS_NEXT   0x18
 
#define WARP_OP_DEMO_END   0x19
 
#define WARP_OP_TRIGGERS_LEVEL_SELECT   0x10
 
#define MARIO_SPAWN_UNKNOWN_01   0x01
 
#define MARIO_SPAWN_UNKNOWN_02   0x02
 
#define MARIO_SPAWN_UNKNOWN_03   0x03
 
#define MARIO_SPAWN_UNKNOWN_04   0x04
 
#define MARIO_SPAWN_UNKNOWN_10   0x10
 
#define MARIO_SPAWN_UNKNOWN_11   0x11
 
#define MARIO_SPAWN_UNKNOWN_12   0x12
 
#define MARIO_SPAWN_UNKNOWN_13   0x13
 
#define MARIO_SPAWN_UNKNOWN_14   0x14
 
#define MARIO_SPAWN_UNKNOWN_15   0x15
 
#define MARIO_SPAWN_UNKNOWN_16   0x16
 
#define MARIO_SPAWN_UNKNOWN_17   0x17
 
#define MARIO_SPAWN_UNKNOWN_20   0x20
 
#define MARIO_SPAWN_UNKNOWN_21   0x21
 
#define MARIO_SPAWN_UNKNOWN_22   0x22
 
#define MARIO_SPAWN_UNKNOWN_23   0x23
 
#define MARIO_SPAWN_UNKNOWN_24   0x24
 
#define MARIO_SPAWN_UNKNOWN_25   0x25
 
#define MARIO_SPAWN_UNKNOWN_27   0x27
 

Enumerations

enum  HUDDisplayFlag {
  HUD_DISPLAY_FLAG_LIVES = 0x0001, HUD_DISPLAY_FLAG_COIN_COUNT = 0x0002, HUD_DISPLAY_FLAG_STAR_COUNT = 0x0004, HUD_DISPLAY_FLAG_CAMERA_AND_POWER = 0x0008,
  HUD_DISPLAY_FLAG_UNKNOWN_0010 = 0x0010, HUD_DISPLAY_FLAG_UNKNOWN_0020 = 0x0020, HUD_DISPLAY_FLAG_TIMER = 0x0040, HUD_DISPLAY_FLAG_EMPHASIZE_POWER = 0x8000,
  HUD_DISPLAY_NONE = 0x0000, HUD_DISPLAY_DEFAULT = HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_UNKNOWN_0010 | HUD_DISPLAY_FLAG_UNKNOWN_0020
}
 

Functions

u16 level_control_timer (s32 timerOp)
 
void func_80249788 (u32 arg, u32 color)
 
void func_8024980C (u32 arg)
 
s16 level_trigger_warp (struct MarioState *m, s32 warpOp)
 If there is not already a delayed warp, schedule one. More...
 
void level_set_transition (s16 length, void(*updateFunction)(s16 *))
 Set the transition, which is a period of time after the warp is initiated but before it actually occurs. More...
 
s32 lvl_init_or_update (s16 initOrUpdate, s32)
 
s32 lvl_init_from_save_file (s16, s32 levelNum)
 
s32 lvl_set_current_level (s16, s32 levelNum)
 
s32 lvl_play_the_end_screen_sound (s16, s32)
 

Variables

struct CreditsEntrygCurrCreditsEntry
 
struct MarioState gMarioStates []
 
struct MarioStategMarioState
 
s16 sCurrPlayMode
 
u16 D_80339ECA
 
s16 sTransitionTimer
 
void(* sTransitionUpdate )(s16 *)
 
u8 unused3 [4]
 
struct WarpDest sWarpDest
 
s16 D_80339EE0
 
s16 sDelayedWarpOp
 
s16 sDelayedWarpTimer
 
s16 sSourceWarpNodeId
 
s32 sDelayedWarpArg
 
u8 unused4 [2]
 
s8 sTimerRunning
 
struct HudDisplay gHudDisplay
 
s8 gShouldNotPlayCastleMusic
 

Macro Definition Documentation

◆ MARIO_SPAWN_UNKNOWN_01

#define MARIO_SPAWN_UNKNOWN_01   0x01

◆ MARIO_SPAWN_UNKNOWN_02

#define MARIO_SPAWN_UNKNOWN_02   0x02

◆ MARIO_SPAWN_UNKNOWN_03

#define MARIO_SPAWN_UNKNOWN_03   0x03

◆ MARIO_SPAWN_UNKNOWN_04

#define MARIO_SPAWN_UNKNOWN_04   0x04

◆ MARIO_SPAWN_UNKNOWN_10

#define MARIO_SPAWN_UNKNOWN_10   0x10

◆ MARIO_SPAWN_UNKNOWN_11

#define MARIO_SPAWN_UNKNOWN_11   0x11

◆ MARIO_SPAWN_UNKNOWN_12

#define MARIO_SPAWN_UNKNOWN_12   0x12

◆ MARIO_SPAWN_UNKNOWN_13

#define MARIO_SPAWN_UNKNOWN_13   0x13

◆ MARIO_SPAWN_UNKNOWN_14

#define MARIO_SPAWN_UNKNOWN_14   0x14

◆ MARIO_SPAWN_UNKNOWN_15

#define MARIO_SPAWN_UNKNOWN_15   0x15

◆ MARIO_SPAWN_UNKNOWN_16

#define MARIO_SPAWN_UNKNOWN_16   0x16

◆ MARIO_SPAWN_UNKNOWN_17

#define MARIO_SPAWN_UNKNOWN_17   0x17

◆ MARIO_SPAWN_UNKNOWN_20

#define MARIO_SPAWN_UNKNOWN_20   0x20

◆ MARIO_SPAWN_UNKNOWN_21

#define MARIO_SPAWN_UNKNOWN_21   0x21

◆ MARIO_SPAWN_UNKNOWN_22

#define MARIO_SPAWN_UNKNOWN_22   0x22

◆ MARIO_SPAWN_UNKNOWN_23

#define MARIO_SPAWN_UNKNOWN_23   0x23

◆ MARIO_SPAWN_UNKNOWN_24

#define MARIO_SPAWN_UNKNOWN_24   0x24

◆ MARIO_SPAWN_UNKNOWN_25

#define MARIO_SPAWN_UNKNOWN_25   0x25

◆ MARIO_SPAWN_UNKNOWN_27

#define MARIO_SPAWN_UNKNOWN_27   0x27

◆ TIMER_CONTROL_HIDE

#define TIMER_CONTROL_HIDE   3

◆ TIMER_CONTROL_SHOW

#define TIMER_CONTROL_SHOW   0

◆ TIMER_CONTROL_START

#define TIMER_CONTROL_START   1

◆ TIMER_CONTROL_STOP

#define TIMER_CONTROL_STOP   2

◆ WARP_OP_CREDITS_END

#define WARP_OP_CREDITS_END   0x15

◆ WARP_OP_CREDITS_NEXT

#define WARP_OP_CREDITS_NEXT   0x18

◆ WARP_OP_CREDITS_START

#define WARP_OP_CREDITS_START   0x17

◆ WARP_OP_DEATH

#define WARP_OP_DEATH   0x12

◆ WARP_OP_DEMO_END

#define WARP_OP_DEMO_END   0x19

◆ WARP_OP_DEMO_NEXT

#define WARP_OP_DEMO_NEXT   0x16

◆ WARP_OP_GAME_OVER

#define WARP_OP_GAME_OVER   0x14

◆ WARP_OP_NONE

#define WARP_OP_NONE   0x00

◆ WARP_OP_STAR_EXIT

#define WARP_OP_STAR_EXIT   0x11

◆ WARP_OP_TELEPORT

#define WARP_OP_TELEPORT   0x05

◆ WARP_OP_TRIGGERS_LEVEL_SELECT

#define WARP_OP_TRIGGERS_LEVEL_SELECT   0x10

◆ WARP_OP_UNKNOWN_01

#define WARP_OP_UNKNOWN_01   0x01

◆ WARP_OP_UNKNOWN_02

#define WARP_OP_UNKNOWN_02   0x02

◆ WARP_OP_WARP_DOOR

#define WARP_OP_WARP_DOOR   0x03

◆ WARP_OP_WARP_FLOOR

#define WARP_OP_WARP_FLOOR   0x13

◆ WARP_OP_WARP_OBJECT

#define WARP_OP_WARP_OBJECT   0x04

Enumeration Type Documentation

◆ HUDDisplayFlag

Enumerator
HUD_DISPLAY_FLAG_LIVES 
HUD_DISPLAY_FLAG_COIN_COUNT 
HUD_DISPLAY_FLAG_STAR_COUNT 
HUD_DISPLAY_FLAG_CAMERA_AND_POWER 
HUD_DISPLAY_FLAG_UNKNOWN_0010 
HUD_DISPLAY_FLAG_UNKNOWN_0020 
HUD_DISPLAY_FLAG_TIMER 
HUD_DISPLAY_FLAG_EMPHASIZE_POWER 
HUD_DISPLAY_NONE 
HUD_DISPLAY_DEFAULT 

Function Documentation

◆ func_80249788()

void func_80249788 ( u32  arg,
u32  color 
)

◆ func_8024980C()

void func_8024980C ( u32  arg)

◆ level_control_timer()

u16 level_control_timer ( s32  timerOp)

◆ level_set_transition()

void level_set_transition ( s16  length,
void(*)(s16 *)  updateFunction 
)

Set the transition, which is a period of time after the warp is initiated but before it actually occurs.

If updateFunction is not NULL, it will be called each frame during the transition.

◆ level_trigger_warp()

s16 level_trigger_warp ( struct MarioState m,
s32  warpOp 
)

If there is not already a delayed warp, schedule one.

The source node is based on the warp operation and sometimes mario's used object. Return the time left until the delayed warp is initiated.

◆ lvl_init_from_save_file()

s32 lvl_init_from_save_file ( s16  ,
s32  levelNum 
)

◆ lvl_init_or_update()

s32 lvl_init_or_update ( s16  initOrUpdate,
s32   
)

◆ lvl_play_the_end_screen_sound()

s32 lvl_play_the_end_screen_sound ( s16  ,
s32   
)

◆ lvl_set_current_level()

s32 lvl_set_current_level ( s16  ,
s32  levelNum 
)

Variable Documentation

◆ D_80339ECA

u16 D_80339ECA

◆ D_80339EE0

s16 D_80339EE0

◆ gCurrCreditsEntry

struct CreditsEntry* gCurrCreditsEntry

◆ gHudDisplay

struct HudDisplay gHudDisplay

◆ gMarioState

struct MarioState* gMarioState

◆ gMarioStates

struct MarioState gMarioStates[]

◆ gShouldNotPlayCastleMusic

s8 gShouldNotPlayCastleMusic

◆ sCurrPlayMode

s16 sCurrPlayMode

◆ sDelayedWarpArg

s32 sDelayedWarpArg

◆ sDelayedWarpOp

s16 sDelayedWarpOp

◆ sDelayedWarpTimer

s16 sDelayedWarpTimer

◆ sSourceWarpNodeId

s16 sSourceWarpNodeId

◆ sTimerRunning

s8 sTimerRunning

◆ sTransitionTimer

s16 sTransitionTimer

◆ sTransitionUpdate

void(* sTransitionUpdate) (s16 *)

◆ sWarpDest

struct WarpDest sWarpDest

◆ unused3

u8 unused3[4]

◆ unused4

u8 unused4[2]