SSBM Decomp
Loading...
Searching...
No Matches
gmadventure.c File Reference
#include "gmadventure.h"
#include "forward.h"
#include "gm_unsplit.h"
#include "gmmain_lib.h"
#include "gmregcommon.h"
#include <melee/gr/ground.h>
#include <melee/lb/lb_00B0.h>
#include <melee/lb/lbaudio_ax.h>
#include <sysdolphin/baselib/random.h>

Data Structures

struct  CutsceneData
struct  IntroData

Macros

#define NEXT_SCENEBLOCK_AFTER(x)
 The scenes are divided up into "blocks" for each stage of adventure mode, in multiples of 8.

Enumerations

enum  ADVENTURE {
  ADVENTURE_INTRO = 0x00 ,
  ADVENTURE_MUSHROOM_KINGDOM ,
  ADVENTURE_LUIGI_CUTSCENE ,
  ADVENTURE_MARIO_PEACH_FIGHT ,
  ADVENTURE_KONGO_INTRO = 0x08 ,
  ADVENTURE_TINYDK_FIGHT ,
  ADVENTURE_GIANTDK_FIGHT ,
  ADVENTURE_MAZE_INTRO = 0x10 ,
  ADVENTURE_UNDERGROUND_MAZE ,
  ADVENTURE_ZELDA_FIGHT ,
  ADVENTURE_BRINSTAR_INTRO = 0x18 ,
  ADVENTURE_SAMUS_FIGHT ,
  ADVENTURE_BRINSTAR_CUTSCENE ,
  ADVENTURE_ESCAPE_FROM_BRINSTAR ,
  ADVENTURE_EXPLOSION_CUTSCENE ,
  ADVENTURE_KIRBY_INTRO = 0x20 ,
  ADVENTURE_KIRBY_FIGHT ,
  ADVENTURE_TEAMKIRBY_INTRO ,
  ADVENTURE_TEAMKIRBY_FIGHT ,
  ADVENTURE_GIANTKIRBY_INTRO ,
  ADVENTURE_GIANTKIRBY_FIGHT ,
  ADVENTURE_CORNERIA_INTRO = 0x28 ,
  ADVENTURE_FOX_FIGHT ,
  ADVENTURE_STARFOX_CUTSCENE ,
  ADVENTURE_FOX_FALCO_FIGHT ,
  ADVENTURE_POKEMON_INTRO = 0x30 ,
  ADVENTURE_POKEMON_FIGHT ,
  ADVENTURE_FZERO_CUTSCENE = 0x38 ,
  ADVENTURE_FZERO_INTRO ,
  ADVENTURE_FZERO_GRAND_PRIX ,
  ADVENTURE_CAPTAIN_FALCON_FIGHT ,
  ADVENTURE_ONETT_INTRO = 0x40 ,
  ADVENTURE_NESS_FIGHT ,
  ADVENTURE_ICICLE_INTRO = 0x48 ,
  ADVENTURE_ICICLE_MOUNTAIN ,
  ADVENTURE_BATTLEFIELD_INTRO = 0x50 ,
  ADVENTURE_WIREFRAME_FIGHT ,
  ADVENTURE_METAL_CUTSCENE ,
  ADVENTURE_METAL_MARIO_FIGHT ,
  ADVENTURE_FINAL_DESTINATION_INTRO = 0x58 ,
  ADVENTURE_BOWSER_FIGHT ,
  ADVENTURE_BOWSERTOY_CUTSCENE ,
  ADVENTURE_GIGATRANSFORM_CUTSCENE ,
  ADVENTURE_GIGABOWSER_FIGHT ,
  ADVENTURE_GIGADEFEATED_CUTSCENE ,
  ADVENTURE_COMING_SOON = 0x68 ,
  ADVENTURE_GAME_OVER ,
  ADVENTURE_BACK_TO_CSS = 0x70
}
 Scene IDs for gm_Mode_Adventure_States and gm_803DE650. More...

Functions

static int getIndex (int scene_id)
static void setValUnk (int scene_id, bool temp_r30)
void gm_801B3F40 (GameModeState *arg0)
void gm_801B4064 (GameModeState *arg0)
void gm_801B4170 (GameModeState *arg0)
void gm_801B4254 (GameModeState *scene)
void gm_801B4294 (GameModeState *scene)
void gm_801B42E8 (GameModeState *scene)
void gm_801B4350 (GameModeState *scene)
void gm_801B4408 (GameModeState *scene)
void gm_801B4430 (GameModeState *scene)
void gm_801B44A0 (GameModeState *scene)
void gm_801B45A4 (GameModeState *scene)
void gm_801B461C (GameModeState *scene)
void gm_801B4684 (GameModeState *scene)
void gm_801B4768 (GameModeState *scene)
void gm_801B47FC (GameModeState *scene)
static void gm_801B4860_inline0 (GameModeState *scene)
static void gm_801B4860_inline1 (GameModeState *scene)
void gm_801B4860 (GameModeState *scene)
static void gm_8016A22C_inline (GameModeState *arg0, UnkAdventureData *temp_r29)
void gm_801B4974 (GameModeState *arg0)
static void inline0 (GameModeState *scene)
void gm_801B4B28 (GameModeState *scene)
void gm_801B4C5C (GameModeState *scene)
void gm_801B4D34 (GameModeState *scene)
void gm_801B4DAC (GameModeState *scene)
void gm_801B4E58 (GameModeState *scene)
void gm_801B4EB8 (GameModeState *scene)
void gm_801B4F44 (GameModeState *scene)
void gm_801B4FCC (GameModeState *scene)
void gm_801B5078 (GameModeState *scene)
void gm_801B50C4 (GameModeState *scene)
void gm_801B518C (GameModeState *scene)
void gm_Mode_Adventure_OnInit (void)
void gm_Mode_Adventure_OnLoad (void)

Variables

UNK_T gmClassic_80470708 []
DebugGameOverData gmClassic_80470850
MatchExitInfo gmClassic_8047086C
StartMeleeData gmClassic_80472AF8
static CutsceneData gm_804D68D8
static IntroData gm_804D68E0
GameModeState gm_Mode_Adventure_States []
struct gm_803DE650_t gm_803DE650 []
static u8 gm_80490910 [ARRAY_SIZE(gm_803DE650)]

Macro Definition Documentation

◆ NEXT_SCENEBLOCK_AFTER

#define NEXT_SCENEBLOCK_AFTER ( x)
Value:
(((x) + 8) & ~(8 - 1))
int x
Definition types.h:0

The scenes are divided up into "blocks" for each stage of adventure mode, in multiples of 8.

Skipping to the next block goes on to the next stage.

Enumeration Type Documentation

◆ ADVENTURE

enum ADVENTURE

Scene IDs for gm_Mode_Adventure_States and gm_803DE650.

Each stage of Adventure Mode owns one block of eight IDs; gm_8017BE84 turns an ID back into its stage number.

Enumerator
ADVENTURE_INTRO 
ADVENTURE_MUSHROOM_KINGDOM 

Yoshi team.

ADVENTURE_LUIGI_CUTSCENE 
ADVENTURE_MARIO_PEACH_FIGHT 

Princess Peach's Castle.

ADVENTURE_KONGO_INTRO 
ADVENTURE_TINYDK_FIGHT 

two half-size Donkey Kongs

ADVENTURE_GIANTDK_FIGHT 

Jungle Japes.

ADVENTURE_MAZE_INTRO 
ADVENTURE_UNDERGROUND_MAZE 

Link.

ADVENTURE_ZELDA_FIGHT 

Hyrule Temple.

ADVENTURE_BRINSTAR_INTRO 
ADVENTURE_SAMUS_FIGHT 
ADVENTURE_BRINSTAR_CUTSCENE 
ADVENTURE_ESCAPE_FROM_BRINSTAR 
ADVENTURE_EXPLOSION_CUTSCENE 
ADVENTURE_KIRBY_INTRO 
ADVENTURE_KIRBY_FIGHT 
ADVENTURE_TEAMKIRBY_INTRO 
ADVENTURE_TEAMKIRBY_FIGHT 
ADVENTURE_GIANTKIRBY_INTRO 
ADVENTURE_GIANTKIRBY_FIGHT 
ADVENTURE_CORNERIA_INTRO 
ADVENTURE_FOX_FIGHT 
ADVENTURE_STARFOX_CUTSCENE 
ADVENTURE_FOX_FALCO_FIGHT 

Fox again, or Falco if unlocked.

ADVENTURE_POKEMON_INTRO 
ADVENTURE_POKEMON_FIGHT 

Pikachu, Pichu and Jigglypuff team.

ADVENTURE_FZERO_CUTSCENE 
ADVENTURE_FZERO_INTRO 
ADVENTURE_FZERO_GRAND_PRIX 
ADVENTURE_CAPTAIN_FALCON_FIGHT 

Mute City.

ADVENTURE_ONETT_INTRO 
ADVENTURE_NESS_FIGHT 

three Nesses

ADVENTURE_ICICLE_INTRO 
ADVENTURE_ICICLE_MOUNTAIN 

Ice Climbers.

ADVENTURE_BATTLEFIELD_INTRO 
ADVENTURE_WIREFRAME_FIGHT 

Fighting Wire Frame team.

ADVENTURE_METAL_CUTSCENE 
ADVENTURE_METAL_MARIO_FIGHT 

plus Metal Luigi if unlocked

ADVENTURE_FINAL_DESTINATION_INTRO 
ADVENTURE_BOWSER_FIGHT 
ADVENTURE_BOWSERTOY_CUTSCENE 
ADVENTURE_GIGATRANSFORM_CUTSCENE 
ADVENTURE_GIGABOWSER_FIGHT 
ADVENTURE_GIGADEFEATED_CUTSCENE 
ADVENTURE_COMING_SOON 
ADVENTURE_GAME_OVER 
ADVENTURE_BACK_TO_CSS 

Function Documentation

◆ getIndex()

int getIndex ( int scene_id)
inlinestatic

◆ setValUnk()

void setValUnk ( int scene_id,
bool temp_r30 )
inlinestatic

◆ gm_801B3F40()

void gm_801B3F40 ( GameModeState * arg0)

◆ gm_801B4064()

void gm_801B4064 ( GameModeState * arg0)

◆ gm_801B4170()

void gm_801B4170 ( GameModeState * arg0)

◆ gm_801B4254()

void gm_801B4254 ( GameModeState * scene)

◆ gm_801B4294()

void gm_801B4294 ( GameModeState * scene)

◆ gm_801B42E8()

void gm_801B42E8 ( GameModeState * scene)

◆ gm_801B4350()

void gm_801B4350 ( GameModeState * scene)

◆ gm_801B4408()

void gm_801B4408 ( GameModeState * scene)

◆ gm_801B4430()

void gm_801B4430 ( GameModeState * scene)

◆ gm_801B44A0()

void gm_801B44A0 ( GameModeState * scene)

Luigi challenger approaching condition: Reach the flagpole with 2 in the seconds place

◆ gm_801B45A4()

void gm_801B45A4 ( GameModeState * scene)

◆ gm_801B461C()

void gm_801B461C ( GameModeState * scene)

If we got here from the Luigi cutscene, change Mario to Luigi.

◆ gm_801B4684()

void gm_801B4684 ( GameModeState * scene)

Unlock conditions for Luigi (match completed in under 1 minute)

◆ gm_801B4768()

void gm_801B4768 ( GameModeState * scene)

◆ gm_801B47FC()

void gm_801B47FC ( GameModeState * scene)

Continuing after a game over here resumes at Green Greens.

◆ gm_801B4860_inline0()

void gm_801B4860_inline0 ( GameModeState * scene)
inlinestatic

◆ gm_801B4860_inline1()

void gm_801B4860_inline1 ( GameModeState * scene)
inlinestatic

◆ gm_801B4860()

void gm_801B4860 ( GameModeState * scene)

◆ gm_8016A22C_inline()

void gm_8016A22C_inline ( GameModeState * arg0,
UnkAdventureData * temp_r29 )
static

◆ gm_801B4974()

void gm_801B4974 ( GameModeState * arg0)

◆ inline0()

void inline0 ( GameModeState * scene)
inlinestatic

◆ gm_801B4B28()

void gm_801B4B28 ( GameModeState * scene)

◆ gm_801B4C5C()

void gm_801B4C5C ( GameModeState * scene)

If the player took longer than 30 seconds, skip the Giant Kirby battle.

◆ gm_801B4D34()

void gm_801B4D34 ( GameModeState * scene)

If Falco is unlocked, the player will fight him instead about 1/3 of the time.

◆ gm_801B4DAC()

void gm_801B4DAC ( GameModeState * scene)

◆ gm_801B4E58()

void gm_801B4E58 ( GameModeState * scene)

< enabling an item, which one?

◆ gm_801B4EB8()

void gm_801B4EB8 ( GameModeState * scene)

If Luigi isn't unlocked, don't spawn him for this match.

◆ gm_801B4F44()

void gm_801B4F44 ( GameModeState * scene)

◆ gm_801B4FCC()

void gm_801B4FCC ( GameModeState * scene)

◆ gm_801B5078()

void gm_801B5078 ( GameModeState * scene)

◆ gm_801B50C4()

void gm_801B50C4 ( GameModeState * scene)

◆ gm_801B518C()

void gm_801B518C ( GameModeState * scene)

◆ gm_Mode_Adventure_OnInit()

void gm_Mode_Adventure_OnInit ( void )

◆ gm_Mode_Adventure_OnLoad()

void gm_Mode_Adventure_OnLoad ( void )

Variable Documentation

◆ gmClassic_80470708

UNK_T gmClassic_80470708[]
extern

◆ gmClassic_80470850

DebugGameOverData gmClassic_80470850
extern

◆ gmClassic_8047086C

MatchExitInfo gmClassic_8047086C
extern

◆ gmClassic_80472AF8

StartMeleeData gmClassic_80472AF8
extern

◆ gm_804D68D8

CutsceneData gm_804D68D8
static

◆ gm_804D68E0

IntroData gm_804D68E0
static

◆ gm_Mode_Adventure_States

GameModeState gm_Mode_Adventure_States[]

◆ gm_803DE650

struct gm_803DE650_t gm_803DE650[]

◆ gm_80490910

u8 gm_80490910[ARRAY_SIZE(gm_803DE650)]
static