SSBM Decomp
Loading...
Searching...
No Matches
mndiagram.h File Reference
#include <placeholder.h>
#include <baselib/forward.h>

Go to the source code of this file.

Functions

u8 mnDiagram_GetFighterByIndex (int idx)
 Gets the fighter ID at the given sorted index.
u8 mnDiagram_GetNameByIndex (int idx)
 Gets the name ID at the given sorted index.
bool mnDiagram_IsDistanceOverflow (u32 distance)
 Checks if a distance stat exceeds 1 mile (display cap).
u32 mnDiagram_ConvertDistanceForDisplay (u32 distance)
 Converts internal distance units to display units.
s32 mnDiagram_GetHitPercentage (int is_name_mode, u8 player_index)
s32 mnDiagram_GetPlayPercentage (int is_name_mode, u8 player_index)
s32 mnDiagram_GetAveragePlayerCount (int is_name_mode, u8 player_index)
int mnDiagram_GetNameTotalKOs (u8 field_index)
 Gets total KOs scored by a name against all other names.
int mnDiagram_GetNameTotalFalls (u8 field_index)
int mnDiagram_GetFighterTotalKOs (u8 field_index)
 Gets total KOs scored by a fighter against all other fighters.
int mnDiagram_GetFighterTotalFalls (u8 field_index)
void mnDiagram_FormatDecimalNumber (char *buf, u32 val, int mode)
 Formats a number with optional decimal places.
void mnDiagram_FormatTime (char *buf, s32 seconds)
 Formats seconds as MM:SS string.
void mnDiagram_IntToStr (char *buf, u32 val)
 Converts a number to a null-terminated string.
u8 mnDiagram_GetPrevNameIndex (s32 idx)
 Gets the previous valid name index.
u8 mnDiagram_GetNextNameIndex (s32 idx)
u8 mnDiagram_GetPrevFighterIndex (s32 idx)
 Gets the previous valid fighter index.
u8 mnDiagram_GetNextFighterIndex (s32 idx)
u32 mnDiagram_GetNamePlayTimeByFighter (int name_idx, int fighter_idx)
 Gets play time for a specific fighter under a name tag.
int mnDiagram_GetRankedFighterForName (int rank, int name_idx, u32(*func)(int, int))
u8 mnDiagram_GetLeastPlayedFighter (u8 name_idx)
void mnDiagram_8023FA6C (void)
void mnDiagram_8023FC28 (void)
int mnDiagram_CountUnlockedFighters (void)
 Counts the number of unlocked fighters.
void mnDiagram_PopupInputProc (HSD_GObj *)
void mnDiagram_InputProc (HSD_GObj *)
void mnDiagram_PopupCleanup (void *arg0)
void mnDiagram_PopupAnimProc (void *arg0)
void mnDiagram_80240D94 (void *arg0, s32 arg1, s32 arg2, s32 arg3)
void mnDiagram_80241310 (s32 arg0, s32 arg1, s32 arg2)
void mnDiagram_80241668 (void *arg0)
void mnDiagram_80241730 (void *arg0, int arg1, int arg2)
void mnDiagram_802417D0 (HSD_GObj *gobj)
void mnDiagram_ExitAnimProc (HSD_GObj *gobj)
void mnDiagram_UpdateScrollArrowVisibility (void *gobj, int count)
 Updates scroll arrow visibility based on entry count.
void mnDiagram_OnFrame (HSD_GObj *gobj)
void mnDiagram_80241E78 (void *arg0, u8 arg1, u8 arg2, int arg3)
void mnDiagram_8024227C (void *arg0, s32 arg1, s32 arg2, u8 arg3)
void mnDiagram_802427B4 (void *arg0, s32 arg1, s32 arg2)
HSD_JObjmnDiagram_80242B38 (int idx, int arg1)
void mnDiagram_80242C0C (void *arg0, int arg1, int arg2)
void mnDiagram_CursorProc (HSD_GObj *gobj)
void mnDiagram_802433AC (void)
void mnDiagram_80243434 (u8 arg0)
void mnDiagram_802437E8 (s32 arg0, s32 arg1)
 Initialize VS Records diagram screen.

Function Documentation

◆ mnDiagram_GetFighterByIndex()

u8 mnDiagram_GetFighterByIndex ( int idx)

Gets the fighter ID at the given sorted index.

Parameters
idxIndex into the sorted fighter list
Returns
Fighter ID

◆ mnDiagram_GetNameByIndex()

u8 mnDiagram_GetNameByIndex ( int idx)

Gets the name ID at the given sorted index.

Parameters
idxIndex into the sorted name list
Returns
Name ID

◆ mnDiagram_IsDistanceOverflow()

bool mnDiagram_IsDistanceOverflow ( u32 distance)

Checks if a distance stat exceeds 1 mile (display cap).

Distance stats are stored in internal game units and converted for display by dividing by ~30.5 to get feet. When the distance exceeds these thresholds (~1 mile), the display caps at "1 mi." instead of showing larger values.

Parameters
distanceThe distance value in internal game units.
Returns
true if distance >= 1 mile, false otherwise.

160,934 internal units / 30.5 = ~5,276 ft = 1 mile

100,000 internal units / 30.5 = ~3,278 meters

◆ mnDiagram_ConvertDistanceForDisplay()

u32 mnDiagram_ConvertDistanceForDisplay ( u32 distance)

Converts internal distance units to display units.

For US locale: Returns feet (or miles if >= 1 mile). For other locales: Returns centimeters (or km if >= 1km).

Parameters
distanceDistance in internal game units.
Returns
Distance in display units (feet/cm or miles/km).

◆ mnDiagram_GetHitPercentage()

s32 mnDiagram_GetHitPercentage ( int is_name_mode,
u8 player_index )

◆ mnDiagram_GetPlayPercentage()

s32 mnDiagram_GetPlayPercentage ( int is_name_mode,
u8 player_index )

◆ mnDiagram_GetAveragePlayerCount()

s32 mnDiagram_GetAveragePlayerCount ( int is_name_mode,
u8 player_index )

◆ mnDiagram_GetNameTotalKOs()

int mnDiagram_GetNameTotalKOs ( u8 field_index)

Gets total KOs scored by a name against all other names.

Parameters
field_indexIndex of the name tag to query.
Returns
Sum of KOs scored by this name against all existing names.

◆ mnDiagram_GetNameTotalFalls()

int mnDiagram_GetNameTotalFalls ( u8 field_index)

◆ mnDiagram_GetFighterTotalKOs()

int mnDiagram_GetFighterTotalKOs ( u8 field_index)

Gets total KOs scored by a fighter against all other fighters.

Iterates through all unlocked fighters and sums how many times the target fighter KO'd each one. Fighter data uses a similar matrix layout to name data.

Parameters
field_indexIndex of the fighter to query (0-24).
Returns
Sum of KOs scored by this fighter against all unlocked fighters.

◆ mnDiagram_GetFighterTotalFalls()

int mnDiagram_GetFighterTotalFalls ( u8 field_index)

◆ mnDiagram_FormatDecimalNumber()

void mnDiagram_FormatDecimalNumber ( char * buf,
u32 val,
int decimal_places )

Formats a number with optional decimal places.

Parameters
bufOutput buffer for the string.
valThe value to format (treat last decimal_places digits as decimal).
decimal_placesNumber of decimal places (0 = integer only).

◆ mnDiagram_FormatTime()

void mnDiagram_FormatTime ( char * buf,
s32 seconds )

Formats seconds as MM:SS string.

Parameters
bufOutput buffer for the string.
secondsTime in seconds.

◆ mnDiagram_IntToStr()

void mnDiagram_IntToStr ( char * buf,
u32 val )

Converts a number to a null-terminated string.

Parameters
bufOutput buffer for the string.
valThe number to convert.

◆ mnDiagram_GetPrevNameIndex()

u8 mnDiagram_GetPrevNameIndex ( s32 idx)

Gets the previous valid name index.

Parameters
idxCurrent name index.
Returns
Previous name index with a valid name, or original if none found.

◆ mnDiagram_GetNextNameIndex()

u8 mnDiagram_GetNextNameIndex ( s32 idx)

◆ mnDiagram_GetPrevFighterIndex()

u8 mnDiagram_GetPrevFighterIndex ( s32 idx)

Gets the previous valid fighter index.

Parameters
idxCurrent fighter index.
Returns
Previous fighter index that's unlocked, or original if none found.

◆ mnDiagram_GetNextFighterIndex()

u8 mnDiagram_GetNextFighterIndex ( s32 idx)

◆ mnDiagram_GetNamePlayTimeByFighter()

u32 mnDiagram_GetNamePlayTimeByFighter ( int name_idx,
int fighter_idx )

Gets play time for a specific fighter under a name tag.

Parameters
name_idxName tag index.
fighter_idxFighter index (0-24).
Returns
Play time in seconds for this fighter under this name.

◆ mnDiagram_GetRankedFighterForName()

int mnDiagram_GetRankedFighterForName ( int rank,
int name_idx,
u32(* func )(int, int) )

◆ mnDiagram_GetLeastPlayedFighter()

u8 mnDiagram_GetLeastPlayedFighter ( u8 name_idx)

◆ mnDiagram_8023FA6C()

void mnDiagram_8023FA6C ( void )

◆ mnDiagram_8023FC28()

void mnDiagram_8023FC28 ( void )

◆ mnDiagram_CountUnlockedFighters()

int mnDiagram_CountUnlockedFighters ( void )

Counts the number of unlocked fighters.

Returns
Number of unlocked fighters.

◆ mnDiagram_PopupInputProc()

void mnDiagram_PopupInputProc ( HSD_GObj * gobj)

◆ mnDiagram_InputProc()

void mnDiagram_InputProc ( HSD_GObj * gobj)

◆ mnDiagram_PopupCleanup()

void mnDiagram_PopupCleanup ( void * arg0)

◆ mnDiagram_PopupAnimProc()

void mnDiagram_PopupAnimProc ( void * arg0)

◆ mnDiagram_80240D94()

void mnDiagram_80240D94 ( void * arg0,
s32 arg1,
s32 arg2,
s32 arg3 )

◆ mnDiagram_80241310()

void mnDiagram_80241310 ( s32 arg0,
s32 arg1,
s32 arg2 )

◆ mnDiagram_80241668()

void mnDiagram_80241668 ( void * arg0)

◆ mnDiagram_80241730()

void mnDiagram_80241730 ( void * arg0,
int arg1,
int arg2 )

◆ mnDiagram_802417D0()

void mnDiagram_802417D0 ( HSD_GObj * gobj)

◆ mnDiagram_ExitAnimProc()

void mnDiagram_ExitAnimProc ( HSD_GObj * gobj)

◆ mnDiagram_UpdateScrollArrowVisibility()

void mnDiagram_UpdateScrollArrowVisibility ( void * gobj,
int count )

Updates scroll arrow visibility based on entry count.

Hides vertical arrows if count <= 7 (fits in visible rows). Hides horizontal arrows if count <= 10 (fits in visible columns).

Parameters
gobjThe diagram GObj containing arrow JObjs in user_data.
countNumber of entries (fighters or names) to display.

◆ mnDiagram_OnFrame()

void mnDiagram_OnFrame ( HSD_GObj * gobj)

◆ mnDiagram_80241E78()

void mnDiagram_80241E78 ( void * arg0,
u8 arg1,
u8 arg2,
int arg3 )

◆ mnDiagram_8024227C()

void mnDiagram_8024227C ( void * arg0,
s32 arg1,
s32 arg2,
u8 arg3 )

◆ mnDiagram_802427B4()

void mnDiagram_802427B4 ( void * arg0,
s32 arg1,
s32 arg2 )

◆ mnDiagram_80242B38()

HSD_JObj * mnDiagram_80242B38 ( int idx,
int arg1 )

◆ mnDiagram_80242C0C()

void mnDiagram_80242C0C ( void * arg0,
int arg1,
int arg2 )

◆ mnDiagram_CursorProc()

void mnDiagram_CursorProc ( HSD_GObj * gobj)

◆ mnDiagram_802433AC()

void mnDiagram_802433AC ( void )

◆ mnDiagram_80243434()

void mnDiagram_80243434 ( u8 arg0)

◆ mnDiagram_802437E8()

void mnDiagram_802437E8 ( s32 arg0,
s32 arg1 )

Initialize VS Records diagram screen.

Parameters
arg0If non-zero, load DAT archive symbols
arg1Initial mode (passed to mnDiagram_80243434)