SSBM Decomp
Loading...
Searching...
No Matches
gmvs.c File Reference
#include "gmvs.h"
#include <Runtime/platform.h>
#include <string.h>
#include "forward.h"
#include "gm_1884.h"
#include "gm_18A1.h"
#include "gm_unsplit.h"
#include "gmmain_lib.h"
#include "gmmultiman.h"
#include "gmpause.h"
#include "types.h"
#include <dolphin/pad.h>
#include <melee/cm/camera.h>
#include <melee/db/db.h>
#include <melee/ef/efasync.h>
#include <melee/ef/eflib.h>
#include <melee/ft/ftdevice.h>
#include <melee/ft/ftlib.h>
#include <melee/gr/ground.h>
#include <melee/gr/grpstadium.h>
#include <melee/gr/stage.h>
#include <melee/if/if_2F6E.h>
#include <melee/if/ifall.h>
#include <melee/if/ifhazard.h>
#include <melee/if/ifnametag.h>
#include <melee/if/ifstatus.h>
#include <melee/if/ifstock.h>
#include <melee/if/iftime.h>
#include <melee/it/item.h>
#include <melee/it/itspawn.h>
#include <melee/lb/lb_00B0.h>
#include <melee/lb/lb_00F9.h>
#include <melee/lb/lb_0195.h>
#include <melee/lb/lb_0219.h>
#include <melee/lb/lbaudio_ax.h>
#include <melee/lb/lbrefract.h>
#include <melee/lb/lbtime.h>
#include <melee/mn/types.h>
#include <melee/mp/mpcoll.h>
#include <melee/pl/player.h>
#include <melee/pl/plbonus.h>
#include <melee/pl/plbonuslib.h>
#include <melee/sfx/crowdsfx.h>
#include <sysdolphin/baselib/controller.h>
#include <sysdolphin/baselib/gobjproc.h>

Data Structures

struct  EndMeleeData

Functions

VsSceneControllergmVs_GetSceneController (void)
VsSceneStategmVs_GetSceneState (void)
struct StartMeleeRulesgm_GetStartMeleeRules (void)
struct lbl_8046B488_tfn_8016AE60 (void)
bool gm_8016AE80 (void)
f32 gm_8016AE94 (void)
u64 gm_8016AEA4 (void)
s32 gm_8016AEB8 (void)
bool gm_8016AEC8 (void)
u32 gm_GetFrameCount (void)
u32 gm_8016AEEC (void)
u16 gm_8016AEFC (void)
u16 gm_8016AF0C (void)
bool GetMatchTimer (int *arg0)
u16 gm_GetStKind (void)
bool gm_8016B014 (void)
bool gm_8016B094 (void)
bool gm_8016B0B4 (void)
bool gm_8016B0D4 (void)
 friendly fire enabled
bool gm_8016B0E8 (void)
bool gm_8016B0FC (void)
 single-button mode enabled
bool gm_8016B110 (void)
bool gm_8016B124 (void)
void fn_8016B138 (void)
bool gm_8016B14C (void)
bool gm_8016B168 (void)
bool gm_8016B184 (void)
bool gm_8016B1A8 (void)
bool gm_8016B1C4 (void)
bool gm_8016B1D8 (void)
bool gm_8016B1EC (void)
bool gm_8016B204 (void)
bool gm_8016B238 (void)
f32 gm_8016B248 (void)
bool gm_8016B258 (int arg0)
void gm_SetGameSpeed (float speed)
void gm_ResetGameSpeed (void)
void gm_8016B328 (void)
void gm_8016B33C (int arg0)
void gm_8016B350 (int arg0)
void gm_8016B364 (int arg0)
void gm_8016B378 (s8 arg0)
void fn_8016B388 (int arg0, int arg1)
bool gm_8016B3A0 (void)
bool gm_8016B3D8 (void)
bool gm_IsCurrently1PMode_inline (void)
static float get_unk_float (void)
bool gm_IsCurrently1PMode (void)
bool fn_8016B4BC (void)
bool fn_8016B510 (void)
int gm_8016B558 (void)
float fn_8016B5B0 (void)
void gm_8016B6E8 (int arg0, int arg1)
u8 fn_8016B728 (void)
void fn_8016B738 (int arg0)
MatchEndgm_8016B774 (void)
void fn_8016B784 (void)
void fn_8016B7B4 (int arg0)
void fn_8016B7F8 (void)
void fn_8016B88C (int arg0)
void gm_8016B8D4 (s32 arg0, u8 slot_type)
static int fn_8016B918_inline (int var_r31)
void fn_8016B918 (void)
bool gm_AnyControllerPressedStart (void)
bool gm_AnyControllerPressedZ (void)
int gm_DefaultVSGetPauser (void)
int gm_CameraModeVSGetPauser (void)
MatchOutcome gm_GetFFAOutcome (void)
MatchOutcome gm_GetTeamBattleOutcome (void)
MatchOutcome gm_GetMatchOutcome (void)
void fn_8016C46C (int arg0)
static void fn_8016C46C_dontinline (int arg0)
void fn_8016C4F4 (MatchEnd *arg0)
int gm_8016C5C0 (int pl_slot)
int gm_GetMatchEndPlayerScore (int pl_slot)
s32 gm_8016C6C0 (HSD_GObj *arg0)
int gm_8016C75C (HSD_GObj *player)
void fn_8016C7D0 (HSD_GObj *gobj)
void fn_8016C7F0 (void)
static s8 gm_GetSlotByPlayerId (int pauserId)
void gm_DoPauseChecksAndRoutine (VsSceneController *arg0, int arg1)
 Checks for pause input and runs the pause routine when unpaused.
static int gm_GetPlayerPressingUnpause (void)
 Returns the player id pressing unpause, or -1 if none.
void gm_DoUnpauseChecksAndRoutine (VsSceneController *arg0, int arg1)
 Checks for unpause input and runs the unpause routine when paused.
void fn_8016CD98 (VsSceneController *scene)
void fn_8016CF4C (int slot, MatchOutcome matchResult)
static void fn_8016CF4C_dontinline (int slot, MatchOutcome matchResult)
static void fn_8016CFE0_inline (void)
void fn_8016CFE0 (void)
static int fn_8016CBE8_inline (void)
void gm_Scene_Training_OnFrame (void)
bool fn_8016D538 (void)
void fn_8016D634 (void)
void gm_Scene_Vs_OnFrame (void)
void fn_8016D8AC (int arg0, struct PlayerInitData *arg1)
void fn_8016DCC0 (StartMeleeData *arg0)
static float direction (float x)
static void getSpawnPoint (int i, Vec3 *v)
static void setPlayerUnk45 (int i)
void fn_8016DEEC (void)
void fn_8016E124 (void)
void fn_8016E2BC (void)
bool fn_8016E5C0 (StartMeleeData *arg0)
void fn_8016E730 (StartMeleeData *arg0)
void gm_Scene_Vs_OnEnter (void *arg0)
static bool gm_8016E9C8_inline (void)
void gm_Scene_Vs_OnExit (void *user_data)
void gm_Scene_SuddenDeath_OnEnter (void *user_data)
void gm_Scene_Training_OnEnter (void *user_data)
float gm_8016ECE8 (void)
bool gm_8016EDDC (int arg0, PlayerInitData *arg1)
bool fn_8016EF98 (int arg0)
void gm_8016F00C (int arg0)
void fn_8016F030 (StartMeleeData *arg0)
int getPort (PlayerInitData *player, int i)
void gm_LoadRumbleEnabled (StartMeleeData *start)
int gm_8016F120 (int arg0)
 Checks rumble?
void fn_8016F140 (int arg0)
int fn_8016F160 (int arg0, int arg1)

Variables

static u32 lbl_803D5620 []
static u32 lbl_803D5630 []
static VsSceneController controller

Function Documentation

◆ gmVs_GetSceneController()

VsSceneController * gmVs_GetSceneController ( void )

◆ gmVs_GetSceneState()

VsSceneState * gmVs_GetSceneState ( void )

◆ gm_GetStartMeleeRules()

struct StartMeleeRules * gm_GetStartMeleeRules ( void )

◆ fn_8016AE60()

struct lbl_8046B488_t * fn_8016AE60 ( void )

◆ gm_8016AE80()

bool gm_8016AE80 ( void )

◆ gm_8016AE94()

f32 gm_8016AE94 ( void )

◆ gm_8016AEA4()

u64 gm_8016AEA4 ( void )

◆ gm_8016AEB8()

s32 gm_8016AEB8 ( void )

◆ gm_8016AEC8()

bool gm_8016AEC8 ( void )

◆ gm_GetFrameCount()

u32 gm_GetFrameCount ( void )

◆ gm_8016AEEC()

u32 gm_8016AEEC ( void )

◆ gm_8016AEFC()

u16 gm_8016AEFC ( void )

◆ gm_8016AF0C()

u16 gm_8016AF0C ( void )

◆ GetMatchTimer()

bool GetMatchTimer ( int * arg0)

◆ gm_GetStKind()

u16 gm_GetStKind ( void )

◆ gm_8016B014()

bool gm_8016B014 ( void )

◆ gm_8016B094()

bool gm_8016B094 ( void )

◆ gm_8016B0B4()

bool gm_8016B0B4 ( void )

◆ gm_8016B0D4()

bool gm_8016B0D4 ( void )

friendly fire enabled

◆ gm_8016B0E8()

bool gm_8016B0E8 ( void )

◆ gm_8016B0FC()

bool gm_8016B0FC ( void )

single-button mode enabled

◆ gm_8016B110()

bool gm_8016B110 ( void )

◆ gm_8016B124()

bool gm_8016B124 ( void )

◆ fn_8016B138()

void fn_8016B138 ( void )

◆ gm_8016B14C()

bool gm_8016B14C ( void )

◆ gm_8016B168()

bool gm_8016B168 ( void )

◆ gm_8016B184()

bool gm_8016B184 ( void )

◆ gm_8016B1A8()

bool gm_8016B1A8 ( void )

◆ gm_8016B1C4()

bool gm_8016B1C4 ( void )

◆ gm_8016B1D8()

bool gm_8016B1D8 ( void )

◆ gm_8016B1EC()

bool gm_8016B1EC ( void )

◆ gm_8016B204()

bool gm_8016B204 ( void )

◆ gm_8016B238()

bool gm_8016B238 ( void )

◆ gm_8016B248()

f32 gm_8016B248 ( void )

◆ gm_8016B258()

bool gm_8016B258 ( int arg0)

◆ gm_SetGameSpeed()

void gm_SetGameSpeed ( float speed)

◆ gm_ResetGameSpeed()

void gm_ResetGameSpeed ( void )

◆ gm_8016B328()

void gm_8016B328 ( void )

◆ gm_8016B33C()

void gm_8016B33C ( int arg0)

◆ gm_8016B350()

void gm_8016B350 ( int arg0)

◆ gm_8016B364()

void gm_8016B364 ( int arg0)

◆ gm_8016B378()

void gm_8016B378 ( s8 arg0)

◆ fn_8016B388()

void fn_8016B388 ( int arg0,
int arg1 )

◆ gm_8016B3A0()

bool gm_8016B3A0 ( void )

◆ gm_8016B3D8()

bool gm_8016B3D8 ( void )

◆ gm_IsCurrently1PMode_inline()

bool gm_IsCurrently1PMode_inline ( void )

◆ get_unk_float()

float get_unk_float ( void )
static

◆ gm_IsCurrently1PMode()

bool gm_IsCurrently1PMode ( void )

◆ fn_8016B4BC()

bool fn_8016B4BC ( void )

◆ fn_8016B510()

bool fn_8016B510 ( void )

◆ gm_8016B558()

int gm_8016B558 ( void )

◆ fn_8016B5B0()

float fn_8016B5B0 ( void )

◆ gm_8016B6E8()

void gm_8016B6E8 ( int arg0,
int arg1 )

◆ fn_8016B728()

u8 fn_8016B728 ( void )

◆ fn_8016B738()

void fn_8016B738 ( int arg0)

◆ gm_8016B774()

MatchEnd * gm_8016B774 ( void )

◆ fn_8016B784()

void fn_8016B784 ( void )

◆ fn_8016B7B4()

void fn_8016B7B4 ( int arg0)

◆ fn_8016B7F8()

void fn_8016B7F8 ( void )

◆ fn_8016B88C()

void fn_8016B88C ( int arg0)

◆ gm_8016B8D4()

void gm_8016B8D4 ( s32 arg0,
u8 slot_type )

◆ fn_8016B918_inline()

int fn_8016B918_inline ( int var_r31)
inlinestatic

◆ fn_8016B918()

void fn_8016B918 ( void )

◆ gm_AnyControllerPressedStart()

bool gm_AnyControllerPressedStart ( void )

◆ gm_AnyControllerPressedZ()

bool gm_AnyControllerPressedZ ( void )

◆ gm_DefaultVSGetPauser()

int gm_DefaultVSGetPauser ( void )

◆ gm_CameraModeVSGetPauser()

int gm_CameraModeVSGetPauser ( void )

◆ gm_GetFFAOutcome()

MatchOutcome gm_GetFFAOutcome ( void )

◆ gm_GetTeamBattleOutcome()

MatchOutcome gm_GetTeamBattleOutcome ( void )

◆ gm_GetMatchOutcome()

MatchOutcome gm_GetMatchOutcome ( void )

◆ fn_8016C46C()

void fn_8016C46C ( int arg0)

◆ fn_8016C46C_dontinline()

void fn_8016C46C_dontinline ( int arg0)
inlinestatic

◆ fn_8016C4F4()

void fn_8016C4F4 ( MatchEnd * arg0)

◆ gm_8016C5C0()

int gm_8016C5C0 ( int pl_slot)

◆ gm_GetMatchEndPlayerScore()

int gm_GetMatchEndPlayerScore ( int pl_slot)

◆ gm_8016C6C0()

s32 gm_8016C6C0 ( Item_GObj * arg0)
Todo
should take Fighter_GObj*? See ftCo_800A53DC

◆ gm_8016C75C()

int gm_8016C75C ( HSD_GObj * player)

◆ fn_8016C7D0()

void fn_8016C7D0 ( HSD_GObj * gobj)

◆ fn_8016C7F0()

void fn_8016C7F0 ( void )

◆ gm_GetSlotByPlayerId()

s8 gm_GetSlotByPlayerId ( int pauserId)
inlinestatic

◆ gm_DoPauseChecksAndRoutine()

void gm_DoPauseChecksAndRoutine ( VsSceneController * arg0,
int arg1 )

Checks for pause input and runs the pause routine when unpaused.

Runs when the match is not paused. Skipped while #VsSceneController::unpause_timer is non-zero, the HUD is disabled, or StartMeleeRules::disable_pausing is set. On a successful pause, sets #VsSceneController::pause_timer to 0xA and optionally invokes StartMeleeRules::on_pause_override or gm_EnablePlayerPauseCamera.

Parameters
[in]arg0Match state (VsSceneController).
[in]arg1Pause context id passed to gm_SetDbPauseFlag.

◆ gm_GetPlayerPressingUnpause()

int gm_GetPlayerPressingUnpause ( void )
inlinestatic

Returns the player id pressing unpause, or -1 if none.

In retail builds, checks for a newly pressed Start button. When DbLevel >= DbLKind_DebugRom, accepts D-Pad Up (HSD_PAD_DPADUP, 1 << 3) plus X instead.

◆ gm_DoUnpauseChecksAndRoutine()

void gm_DoUnpauseChecksAndRoutine ( VsSceneController * arg0,
int arg1 )

Checks for unpause input and runs the unpause routine when paused.

Runs when the match is paused. Skipped while #VsSceneController::pause_timer is non-zero, the HUD is disabled, or StartMeleeRules::disable_pausing is set. Only the original pauser may unpause. On success, sets #VsSceneController::unpause_timer to 0xA and optionally invokes StartMeleeRules::on_unpause_override or Ground_EnableMatchCamera.

Parameters
[in]arg0Match state (VsSceneController).
[in]arg1Unpause context id passed to gm_ClearDbPauseFlag.

◆ fn_8016CD98()

void fn_8016CD98 ( VsSceneController * scene)

◆ fn_8016CF4C()

void fn_8016CF4C ( int slot,
MatchOutcome matchResult )

◆ fn_8016CF4C_dontinline()

void fn_8016CF4C_dontinline ( int slot,
MatchOutcome matchResult )
inlinestatic

◆ fn_8016CFE0_inline()

void fn_8016CFE0_inline ( void )
inlinestatic

◆ fn_8016CFE0()

void fn_8016CFE0 ( void )

◆ fn_8016CBE8_inline()

int fn_8016CBE8_inline ( void )
inlinestatic

◆ gm_Scene_Training_OnFrame()

void gm_Scene_Training_OnFrame ( void )

◆ fn_8016D538()

bool fn_8016D538 ( void )

◆ fn_8016D634()

void fn_8016D634 ( void )

◆ gm_Scene_Vs_OnFrame()

void gm_Scene_Vs_OnFrame ( void )

◆ fn_8016D8AC()

void fn_8016D8AC ( int arg0,
struct PlayerInitData * arg1 )

◆ fn_8016DCC0()

void fn_8016DCC0 ( StartMeleeData * arg0)

◆ direction()

float direction ( float x)
static

◆ getSpawnPoint()

void getSpawnPoint ( int i,
Vec3 * v )
inlinestatic

◆ setPlayerUnk45()

void setPlayerUnk45 ( int i)
inlinestatic

◆ fn_8016DEEC()

void fn_8016DEEC ( void )

◆ fn_8016E124()

void fn_8016E124 ( void )

◆ fn_8016E2BC()

void fn_8016E2BC ( void )
Todo
The loop's SFX flag load uses a different equivalent address form.

◆ fn_8016E5C0()

bool fn_8016E5C0 ( StartMeleeData * arg0)

◆ fn_8016E730()

void fn_8016E730 ( StartMeleeData * arg0)

◆ gm_Scene_Vs_OnEnter()

void gm_Scene_Vs_OnEnter ( void * arg0)

◆ gm_8016E9C8_inline()

bool gm_8016E9C8_inline ( void )
inlinestatic

◆ gm_Scene_Vs_OnExit()

void gm_Scene_Vs_OnExit ( void * user_data)

◆ gm_Scene_SuddenDeath_OnEnter()

void gm_Scene_SuddenDeath_OnEnter ( void * user_data)

◆ gm_Scene_Training_OnEnter()

void gm_Scene_Training_OnEnter ( void * user_data)

◆ gm_8016ECE8()

float gm_8016ECE8 ( void )

◆ gm_8016EDDC()

bool gm_8016EDDC ( int arg0,
PlayerInitData * arg1 )

◆ fn_8016EF98()

bool fn_8016EF98 ( int arg0)

◆ gm_8016F00C()

void gm_8016F00C ( int arg0)

◆ fn_8016F030()

void fn_8016F030 ( StartMeleeData * arg0)

◆ getPort()

int getPort ( PlayerInitData * player,
int i )

◆ gm_LoadRumbleEnabled()

void gm_LoadRumbleEnabled ( StartMeleeData * start)

◆ gm_8016F120()

int gm_8016F120 ( int arg0)

Checks rumble?

◆ fn_8016F140()

void fn_8016F140 ( int arg0)

◆ fn_8016F160()

int fn_8016F160 ( int arg0,
int arg1 )

Variable Documentation

◆ lbl_803D5620

u32 lbl_803D5620[]
static
Initial value:
= {
0x7C859,
0x7C85A,
0x7C85B,
0x7C85C,
}

◆ lbl_803D5630

u32 lbl_803D5630[]
static
Initial value:
= {
U32_MAX, 0x7C858, 0x7C862, 0x7C85F, 0x7C854, 0x7C853,
}
#define U32_MAX
Definition platform.h:129

◆ controller

VsSceneController controller
static