|
SSBM Decomp
|
#include "mndiagram.static.h"#include "mndiagram2.static.h"#include "baselib/gobj.h"#include "baselib/gobjgxlink.h"#include "baselib/gobjobject.h"#include "baselib/gobjplink.h"#include "baselib/gobjproc.h"#include "baselib/gobjuserdata.h"#include "baselib/jobj.h"#include "baselib/memory.h"#include "dolphin/types.h"#include "gm/gm_1601.h"#include "gm/gmmain_lib.h"#include "gm/types.h"#include "lb/lb_00B0.h"#include "lb/lb_00CE.h"#include "lb/lb_00F9.h"#include "lb/lbarchive.h"#include "lb/lbaudio_ax.h"#include "mn/inlines.h"#include "mn/mndiagram2.h"#include "mn/mndiagram3.h"#include "mn/mnmain.h"#include "mn/mnname.h"Data Structures | |
| struct | mnDiagram_804A0750_t |
| Sorted fighter indices array (25 fighters + padding) More... | |
| struct | mnDiagram_804A076C_t |
| Sorted name indices array (120 names) More... | |
| struct | mnDiagram_Assets |
| Archive asset pointers struct (for mnDiagram_802437E8) Cast from &mnDiagram_804A0750 to access asset arrays. More... | |
| struct | mnDiagram_CleanupData |
| User data structure for mnDiagram_PopupCleanup callback. More... | |
| struct | mnDiagram_AnimData |
| User data structure for mnDiagram_ExitAnimProc callback. More... | |
| struct | RankEntry |
| struct | mnDiagram_PopupData |
Functions | |
| STATIC_ASSERT (sizeof(mnDiagram_804A0750_t)==0x1C) | |
| STATIC_ASSERT (sizeof(mnDiagram_804A076C_t)==0x78) | |
| STATIC_ASSERT (sizeof(mnDiagram_Assets)==0x108) | |
| 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 (u8 is_name_mode, u8 player_index) |
| s32 | mnDiagram_GetPlayPercentage (u8 is_name_mode, u8 player_index) |
| s32 | mnDiagram_GetAveragePlayerCount (u8 is_name_mode, u8 player_index) |
| int | mnDiagram_GetNameTotalKOs (u8 field_index) |
| Gets total KOs scored by a name against all other names. | |
| static int | mnDiagram_SumNameFalls (u8 field_index) |
| Gets total falls (deaths) of 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. | |
| static int | mnDiagram_SumFighterFalls (u8 field_index) |
| Gets total falls (deaths) of a fighter against all other fighters. | |
| int | mnDiagram_GetFighterTotalFalls (u8 field_index) |
| void | mnDiagram_FormatDecimalNumber (char *buf, u32 val, int decimal_places) |
| 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. | |
| static int | CountTiedFighters (int name, int min_fighter, u32 min_time) |
| static int | CheckAllZeroPlayTime (int name_idx) |
| 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 *gobj) |
| void | mnDiagram_InputProc (HSD_GObj *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) |
| static void * | mnDiagram_GetUserData (HSD_GObj *gobj) |
| static HSD_JObj * | mnDiagram_GetJObjChild (HSD_JObj *jobj) |
| 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_JObj * | mnDiagram_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. | |
Variables | |
| mnDiagram_804A0750_t | mnDiagram_804A0750 |
| BSS variables - sorted player arrays. | |
| mnDiagram_804A076C_t | mnDiagram_804A076C |
| static AnimLoopSettings | mnDiagram_803EE768 = { 0.0f, 9.0f, -0.1f } |
| static u8 | mnDiagram_803EE74C [0x1C] |
| static Point3d | mnDiagram_803EE728 [3] |
| static s32 | mnDiagram_804D4FA0 = 0xFF |
| STATIC_ASSERT | ( | sizeof(mnDiagram_804A0750_t) | = =0x1C | ) |
| STATIC_ASSERT | ( | sizeof(mnDiagram_804A076C_t) | = =0x78 | ) |
| STATIC_ASSERT | ( | sizeof(mnDiagram_Assets) | = =0x108 | ) |
| u8 mnDiagram_GetFighterByIndex | ( | int | idx | ) |
Gets the fighter ID at the given sorted index.
| idx | Index into the sorted fighter list |
| u8 mnDiagram_GetNameByIndex | ( | int | idx | ) |
Gets the name ID at the given sorted index.
| idx | Index into the sorted name list |
| 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.
| distance | The distance value in internal game units. |
160,934 internal units / 30.5 = ~5,276 ft = 1 mile
100,000 internal units / 30.5 = ~3,278 meters
| 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).
| distance | Distance in internal game units. |
| int mnDiagram_GetNameTotalKOs | ( | u8 | field_index | ) |
Gets total KOs scored by a name against all other names.
| field_index | Index of the name tag to query. |
|
inlinestatic |
Gets total falls (deaths) of a name against all other names.
Iterates through all names and sums how many times each name KO'd the target name. This is the column sum of the KO matrix. Accesses vs_kos[field_index] in each name's data.
| field_index | Index of the name tag to query. |
| int mnDiagram_GetNameTotalFalls | ( | u8 | field_index | ) |
| 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.
| field_index | Index of the fighter to query (0-24). |
|
inlinestatic |
Gets total falls (deaths) of a fighter against all other fighters.
Iterates through all unlocked fighters and sums how many times each fighter KO'd the target fighter. This is the column sum of the fighter KO matrix.
| field_index | Index of the fighter to query (0-24). |
| int mnDiagram_GetFighterTotalFalls | ( | u8 | field_index | ) |
| void mnDiagram_FormatDecimalNumber | ( | char * | buf, |
| u32 | val, | ||
| int | decimal_places | ||
| ) |
Formats a number with optional decimal places.
| buf | Output buffer for the string. |
| val | The value to format (treat last decimal_places digits as decimal). |
| decimal_places | Number of decimal places (0 = integer only). |
| void mnDiagram_FormatTime | ( | char * | buf, |
| s32 | seconds | ||
| ) |
Formats seconds as MM:SS string.
| buf | Output buffer for the string. |
| seconds | Time in seconds. |
| void mnDiagram_IntToStr | ( | char * | buf, |
| u32 | val | ||
| ) |
Converts a number to a null-terminated string.
| buf | Output buffer for the string. |
| val | The number to convert. |
Gets the previous valid name index.
| idx | Current name index. |
Gets the previous valid fighter index.
| idx | Current fighter index. |
| u32 mnDiagram_GetNamePlayTimeByFighter | ( | int | name_idx, |
| int | fighter_idx | ||
| ) |
Gets play time for a specific fighter under a name tag.
| name_idx | Name tag index. |
| fighter_idx | Fighter index (0-24). |
|
inlinestatic |
|
inlinestatic |
| int mnDiagram_GetRankedFighterForName | ( | int | rank, |
| int | name_idx, | ||
| u32(*)(int, int) | func | ||
| ) |
| void mnDiagram_8023FA6C | ( | void | ) |
| void mnDiagram_8023FC28 | ( | void | ) |
| int mnDiagram_CountUnlockedFighters | ( | void | ) |
Counts the number of unlocked fighters.
| void mnDiagram_PopupInputProc | ( | HSD_GObj * | gobj | ) |
| void mnDiagram_InputProc | ( | HSD_GObj * | gobj | ) |
| void mnDiagram_PopupCleanup | ( | void * | arg0 | ) |
| void mnDiagram_PopupAnimProc | ( | void * | arg0 | ) |
|
inlinestatic |
| 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.
Hides vertical arrows if count <= 7 (fits in visible rows). Hides horizontal arrows if count <= 10 (fits in visible columns).
| gobj | The diagram GObj containing arrow JObjs in user_data. |
| count | Number of entries (fighters or names) to display. |
| void mnDiagram_OnFrame | ( | HSD_GObj * | gobj | ) |
| HSD_JObj * mnDiagram_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 | ) |
Initialize VS Records diagram screen.
| arg0 | If non-zero, load DAT archive symbols |
| arg1 | Initial mode (passed to mnDiagram_80243434) |
| mnDiagram_804A0750_t mnDiagram_804A0750 |
BSS variables - sorted player arrays.
| mnDiagram_804A076C_t mnDiagram_804A076C |
|
static |
|
static |
|
static |
|
static |