SSBM Decomp
Loading...
Searching...
No Matches
gmresult.c File Reference
#include "gmresult.h"
#include "gm/gmresult.static.h"
#include "gm_unsplit.h"
#include "gmresultplayer.h"
#include "baselib/dobj.h"
#include "baselib/gobj.h"
#include "baselib/gobjgxlink.h"
#include "baselib/gobjobject.h"
#include "baselib/gobjproc.h"
#include "baselib/jobj.h"
#include "dolphin/gx/GXStruct.h"
#include "dolphin/types.h"
#include "gm/gm_1601.h"
#include "gm/types.h"
#include "if/ifcoget.h"
#include "lb/lb_00B0.h"
#include "lb/lb_00F9.h"
#include "lb/lbarchive.h"
#include "lb/lbaudio_ax.h"
#include "lb/lblanguage.h"
#include "lb/lbvector.h"
#include "mn/mnmain.h"
#include "pl/player.h"
#include "sc/types.h"

Data Structures

struct  StatsEntry
 
struct  StatsList
 
struct  ResultsStatsInfo
 

Functions

MatchEndfn_80174274 (void)
 
s32 fn_80174284 (u8 slot)
 
void fn_80174338 (void)
 
void fn_8017435C (void)
 
void fn_80174380 (void)
 
bool gm_801743A4 (u8 outcome)
 
bool fn_801743C4 (s32 slot, StatsEntry *entry)
 
static s32 find_nth_nonzero (u8 *arr, s32 n)
 Find the nth non-zero byte in array, returning its index 8x unrolled loop matching assembly pattern: lbz first, then lbzu for rest.
 
void fn_80174468 (u8 slot, HSD_Text *text1, HSD_Text *text2, HSD_Text *text3, StatsList *list, s32 entry_idx)
 
void * fn_801748EC (void *list_, s32 mode, s32 idx)
 
void fn_80174920 (struct ResultsPlayerData *data)
 
void fn_801749B8 (HSD_GObj *unused)
 
u8 fn_80174A60 (StatsList *list, s32 slot)
 
void fn_80174B4C (ResultsData *data, s32 slot)
 
void fn_80174FD0 (HSD_JObj *jobj, s32 arg1)
 
void fn_80175038 (HSD_GObj *gobj, int flag)
 
GXColor fn_8017507C (s32 slot)
 
void fn_80175240 (s32 slot)
 
void fn_8017556C (s32 slot)
 
void fn_801756E0 (s32 slot)
 
void fn_80175880 (s32 slot)
 
void fn_80175A94 (s32 slot, Vec3 *position)
 
void fn_80175C5C (void)
 
void fn_80175D34 (void)
 
void fn_80175DC8 (HSD_GObj *gobj)
 Initialize results screen panel and UI elements This is a very complex function (~800 lines) that:
 
void fn_80176A6C (void)
 
void fn_80176BCC (HSD_GObj *gobj)
 
static int fn_80176BF0_inline (u8 arg1)
 
HSD_JObjfn_80176BF0 (HSD_JObj *arg0, u8 arg1, int arg2)
 
void fn_80176D18 (HSD_GObj *gobj)
 
void fn_80176D3C (Vec3 *positions)
 
void fn_80176F60 (void)
 
void fn_801771C0 (ResultsData *data)
 
void gm_80177368_OnEnter (void *arg0_)
 
void gm_80177704_OnLeave (void *unused)
 

Variables

static ResultsStatsInfo lbl_8046E190 [4]
 
static StatsList lbl_803D6878 []
 Static data for stats lists.
 
static const u8 lbl_803B7B18 [40][2]
 
HSD_Archivelbl_804D65B8
 

Function Documentation

◆ fn_80174274()

MatchEnd * fn_80174274 ( void  )

◆ fn_80174284()

s32 fn_80174284 ( u8  slot)

◆ fn_80174338()

void fn_80174338 ( void  )

◆ fn_8017435C()

void fn_8017435C ( void  )

◆ fn_80174380()

void fn_80174380 ( void  )

◆ gm_801743A4()

bool gm_801743A4 ( u8  outcome)

◆ fn_801743C4()

bool fn_801743C4 ( s32  slot,
StatsEntry entry 
)

◆ find_nth_nonzero()

static s32 find_nth_nonzero ( u8 arr,
s32  n 
)
static

Find the nth non-zero byte in array, returning its index 8x unrolled loop matching assembly pattern: lbz first, then lbzu for rest.

◆ fn_80174468()

void fn_80174468 ( u8  slot,
HSD_Text text1,
HSD_Text text2,
HSD_Text text3,
StatsList list,
s32  entry_idx 
)

Mode 2: special handling for pairs

◆ fn_801748EC()

void * fn_801748EC ( void *  list_,
s32  mode,
s32  idx 
)

◆ fn_80174920()

void fn_80174920 ( struct ResultsPlayerData data)

◆ fn_801749B8()

void fn_801749B8 ( HSD_GObj unused)

◆ fn_80174A60()

u8 fn_80174A60 ( StatsList list,
s32  slot 
)

◆ fn_80174B4C()

void fn_80174B4C ( ResultsData data,
s32  slot 
)

Clear existing stats text

Look up stats list

Set flags

Count visible entries

Set more flags based on scroll position

Create text objects for visible entries

◆ fn_80174FD0()

void fn_80174FD0 ( HSD_JObj jobj,
s32  arg1 
)

◆ fn_80175038()

void fn_80175038 ( HSD_GObj gobj,
int  flag 
)

◆ fn_8017507C()

GXColor fn_8017507C ( s32  slot)

◆ fn_80175240()

void fn_80175240 ( s32  slot)

maybe x4C is an array of Vec2's

◆ fn_8017556C()

void fn_8017556C ( s32  slot)

◆ fn_801756E0()

void fn_801756E0 ( s32  slot)

◆ fn_80175880()

void fn_80175880 ( s32  slot)

◆ fn_80175A94()

void fn_80175A94 ( s32  slot,
Vec3 *  position 
)

◆ fn_80175C5C()

void fn_80175C5C ( void  )

◆ fn_80175D34()

void fn_80175D34 ( void  )

<

Todo:
:: why does this have so much stack space

◆ fn_80175DC8()

void fn_80175DC8 ( HSD_GObj gobj)

Initialize results screen panel and UI elements This is a very complex function (~800 lines) that:

  • Loads joint objects from scene data
  • Sets up GX link callbacks
  • Initializes player stats UI elements
  • Creates HSD_Text objects for scores/times NOTE: This implementation is a best-effort attempt, likely not matching

fn_80179F84 takes temp_jobj but is declared as UNK_PARAMS

The rest of the function has complex switch statements for each player slot (0-3) loading many joints and text objects This would require ~700 more lines of code to match exactly

◆ fn_80176A6C()

void fn_80176A6C ( void  )

◆ fn_80176BCC()

void fn_80176BCC ( HSD_GObj gobj)

◆ fn_80176BF0_inline()

static int fn_80176BF0_inline ( u8  arg1)
inlinestatic

◆ fn_80176BF0()

HSD_JObj * fn_80176BF0 ( HSD_JObj arg0,
u8  arg1,
int  arg2 
)

◆ fn_80176D18()

void fn_80176D18 ( HSD_GObj gobj)

◆ fn_80176D3C()

void fn_80176D3C ( Vec3 *  positions)

◆ fn_80176F60()

void fn_80176F60 ( void  )

◆ fn_801771C0()

void fn_801771C0 ( ResultsData data)

◆ gm_80177368_OnEnter()

void gm_80177368_OnEnter ( void *  arg0_)

◆ gm_80177704_OnLeave()

void gm_80177704_OnLeave ( void *  unused)

Variable Documentation

◆ lbl_8046E190

ResultsStatsInfo lbl_8046E190[4]
static

◆ lbl_803D6878

StatsList lbl_803D6878[]
static
Initial value:
= {
{ 0, 0x0D, NULL },
{ 1, 0x30, NULL },
{ 2, 0x02, NULL },
{ 3, 0x00, NULL },
}
#define NULL
Definition stddef.h:19

Static data for stats lists.

◆ lbl_803B7B18

const u8 lbl_803B7B18[40][2]
static
Initial value:
= {
{ 0x00, 0x0 }, { 0x01, 0x1 }, { 0x02, 0x2 }, { 0x03, 0x3 }, { 0x04, 0x5 },
{ 0x05, 0x6 }, { 0x06, 0xD }, { 0x07, 0x6 }, { 0x08, 0x6 }, { 0x09, 0x7 },
{ 0x0A, 0x9 }, { 0x0B, 0x8 }, { 0x0C, 0x6 }, { 0x0D, 0x9 }, { 0x0E, 0x4 },
{ 0x0F, 0x9 }, { 0x10, 0xA }, { 0x11, 0xC }, { 0x12, 0xD }, { 0x13, 0xD },
{ 0x14, 0x2 }, { 0x15, 0xD }, { 0x16, 0x6 }, { 0x17, 0x7 }, { 0x18, 0x9 },
{ 0x19, 0xD }, { 0 }, { 0 }, { 0 }, { 0 },
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 },
{ 0 }, { 0x40, 0x80 },
}

◆ lbl_804D65B8

HSD_Archive* lbl_804D65B8
extern