|
SSBM Decomp
|
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, SelectableCharacterKind 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_SortFightersByKOs (void) |
| void | mnDiagram_SortNamesByKOs (void) |
| int | mnDiagram_CountUnlockedFighters (void) |
| Counts the number of unlocked fighters. | |
| void | mnDiagram_PopupInputProc (HSD_GObj *) |
| void | mnDiagram_InputProc (HSD_GObj *) |
| Per-frame input handler for the VS Records "diagram" grid screen. | |
| void | mnDiagram_PopupCleanup (void *arg0) |
| void | mnDiagram_PopupAnimProc (void *arg0) |
| void | mnDiagram_CreatePopupTexts (void *arg0, s32 arg1, s32 arg2, s32 arg3) |
| void | mnDiagram_CreatePopup (s32 arg0, s32 arg1, s32 arg2) |
| void | mnDiagram_ClearGrid (void *arg0) |
| void | mnDiagram_RefreshGrid (HSD_GObj *arg0, int arg1, int arg2) |
| void | mnDiagram_UpdateScrollArrows (HSD_GObj *gobj) |
| Updates scroll arrow visibility based on cursor position and available entries beyond the visible range. | |
| 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_DrawCellValue (void *arg0, u8 arg1, u8 arg2, int arg3) |
| void | mnDiagram_DrawGridValues (void *arg0, s32 arg1, s32 arg2, u8 arg3) |
| void | mnDiagram_DrawNameHeaders (void *arg0, s32 arg1, s32 arg2) |
| HSD_JObj * | mnDiagram_CreateFighterIcon (int idx, int arg1) |
| void | mnDiagram_DrawFighterHeaders (void *arg0, int arg1, int arg2) |
| void | mnDiagram_CursorProc (HSD_GObj *gobj) |
| void | mnDiagram_CreateCursor (void) |
| void | mnDiagram_CreateScreen (u8 arg0) |
| void | mnDiagram_Init (u8 arg0, u8 arg1) |
| Initialize VS Records diagram screen. | |
| 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 |
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
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. |
| 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). |
| 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, |
| SelectableCharacterKind | selkind ) |
Gets play time for a specific fighter under a name tag.
| name_idx | Name tag index. |
| fighter_idx | Fighter index (0-24). |
| int mnDiagram_GetRankedFighterForName | ( | int | rank, |
| int | name_idx, | ||
| u32(* | func )(int, int) ) |
| void mnDiagram_SortFightersByKOs | ( | void | ) |
| void mnDiagram_SortNamesByKOs | ( | void | ) |
| int mnDiagram_CountUnlockedFighters | ( | void | ) |
Counts the number of unlocked fighters.
| void mnDiagram_PopupInputProc | ( | HSD_GObj * | gobj | ) |
| void mnDiagram_InputProc | ( | HSD_GObj * | gobj | ) |
Per-frame input handler for the VS Records "diagram" grid screen.
Dispatches the current frame's menu input:
The "visible entry" scans skip locked fighters / empty name slots, and are factored into the mnDiagram_GetVisible*From / mnDiagram_Get{Prev,Next}*Index helpers shared with mndiagram2.
| void mnDiagram_PopupCleanup | ( | void * | arg0 | ) |
| void mnDiagram_PopupAnimProc | ( | void * | arg0 | ) |
| void mnDiagram_ClearGrid | ( | void * | arg0 | ) |
| void mnDiagram_RefreshGrid | ( | HSD_GObj * | arg0, |
| int | arg1, | ||
| int | arg2 ) |
| void mnDiagram_UpdateScrollArrows | ( | HSD_GObj * | gobj | ) |
Updates scroll arrow visibility based on cursor position and available entries beyond the visible range.
| [in] | gobj | The diagram GObj containing arrow JObjs in user_data. |
Checks 4 arrows: right (10 more cols?), left (cursor > 0?), up (cursor row > 0?), down (7 more rows?). Hides arrows when there's nothing to scroll to, shows them when there is.
| 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_CreateFighterIcon | ( | int | idx, |
| int | arg1 ) |
| void mnDiagram_DrawFighterHeaders | ( | void * | arg0, |
| int | arg1, | ||
| int | arg2 ) |
| void mnDiagram_CursorProc | ( | HSD_GObj * | gobj | ) |
| void mnDiagram_CreateCursor | ( | void | ) |
| void mnDiagram_CreateScreen | ( | u8 | arg0 | ) |