SSBM Decomp
Loading...
Searching...
No Matches
mnsnap.c File Reference

Data Structures

struct  mnSnap_State

Macros

#define UNINITIALIZED_RETURN(x)

Functions

void mnSnap_80253184 (void)
 Recursively loads snapshot thumbnails from memory card.
static s32mnSnap_GetLoadIdx (mnSnap_State *snap)
static void * mnSnap_GetThumbImage (const s32 *load_idx)
static HSD_DObjmnSnap_GetDObj (HSD_JObj *jobj)
static HSD_JObjmnSnap_GetThumbJObj (const s32 *load_idx, mnSnap_State *snap)
static HSD_ImageDescmnSnap_GetImageDesc (HSD_JObj *jobj)
static s32 mnSnap_GetLoadPhotoIdx (mnSnap_State *snap, const s32 *load_idx)
static void mnSnap_8025329C (void)
static void * mnSnap_GetBlankImg (mnSnap_State *snap)
void mnSnap_80253640 (s32 page)
 Loads a page of snapshot thumbnails and updates navigation arrows.
void mnSnap_80253964 (void)
 Updates the SIS text labels showing thumbnail numbers and page info.
void mnSnap_80253AE4 (s32 mode)
 Animates the 5 sub-menu option buttons. mode=0 for enter, mode=1 for exit.
s32 mnSnap_80253BE0 (u64 buttons, s32 *cursor, s32 count)
 Processes D-pad/trigger inputs to navigate a 2D grid of snapshots.
void fn_80253DB4 (HSD_GObj *gobj, s32 rendermode)
 Renders the main content GObj only when in photo-browsing states (>= 4).
void fn_80253DE8 (HSD_GObj *gobj, s32 rendermode)
 Renders the arrow/slot selector GObj only during slot selection (state 2).
void fn_80253E1C (HSD_GObj *gobj, s32 rendermode)
 Renders the cursor GObj during menu (state 6) or full-screen view (10-11).
void fn_80253E5C (HSD_GObj *gobj, s32 rendermode)
 Renders the warning/dialog GObj only when a dialog is active.
void mnSnap_80253E90 (s32 idx)
 Queries memory card status for slot idx and stores the photo count/error.
void mnSnap_80253F60 (void)
 Animates the memory card slot selector highlights.
void mnSnap_80254014 (void)
 Resets the sub-menu view and shows all 5 option buttons.
void mnSnap_8025409C (s32 dlg_type)
 Configures the Yes/No dialog button positions based on language setting.
static void mnSnap_RefreshSlotSelection (mnSnap_State *snap, const s32 *p50, s32 *p51)
static void mnSnap_ShowSubmenu (mnSnap_State *snap)
static void mnSnap_HideSubmenu (mnSnap_State *snap)
void mnSnap_80254298 (void)
 Resets to slot selection state after a card error or empty card.
static UNINITIALIZED_RETURN (s32)
 Handles Yes/No dialog button inputs.
static void mnSnap_InitDialogText (void)
static s32 mnSnap_GetCursorIdx (void)
static HSD_JObjmnSnap_GetMoveJObj (void)
static s32 mnSnap_GetActivePhotoCount (void)
static void * mnSnap_GetCurrentThumbImage (mnSnap_State *snap)
static void mnSnap_AnimateCardSlots (const s32 *active_slot)
static void mnSnap_UpdateSlotStatus (s32 slot)
static s32 mnSnap_CheckCopy (s32 source_slot, s32 cursor)
static void mnSnap_UpdateSelectionCursor (mnSnap_State *snap_state)
static void mnSnap_RefreshSlotAnimations (int i, s32 *byte_off, const s32 *active_slot)
static s32 mnSnap_ReadCardStatus (s32 slot)
void fn_802545C4 (void)
 Main per-frame update for the Snap menu.
void fn_80257D7C (void)
 Handles the Back button to exit the Snap menu and cleans up GObjs/text.
static void mnSnap_LoadPageIndicator (void **page_joint, mnSnap_State *snap, HSD_JObj **parent, HSD_JObj **jobj)
static s16mnSnap_GetCardStatus (mnSnap_State *snap)
static void mnSnap_InitPageText (HSD_Text **text)
static void ** mnSnap_GetMainJoint (mnSnap_State *snap)
static void ** mnSnap_GetMainShapeAnim (mnSnap_State *snap)
static void mnSnap_CreateThumbnails (mnSnap_State *snap, HSD_JObj **thumb_root_ptr, void **photo_joint, void **sub_animjoint, void **sub_matanim, void **sub_shapeanim)
 Creates five thumbnail joints using the spacing between two markers.
void mnSnap_80257F24 (void)
 Entry point: initializes the Snap menu scene.

Variables

static mnSnap_State mnSnap_804A0A10
struct mnSnap_804A0B90_tmnSnap_804A0B90 [4]

Macro Definition Documentation

◆ UNINITIALIZED_RETURN

#define UNINITIALIZED_RETURN ( x)
Value:
void

Function Documentation

◆ mnSnap_80253184()

void mnSnap_80253184 ( void )

Recursively loads snapshot thumbnails from memory card.

◆ mnSnap_GetLoadIdx()

s32 * mnSnap_GetLoadIdx ( mnSnap_State * snap)
inlinestatic
Todo
The HSD_ASSERT chain (lines 193-199) is an inline from tobj.h. Polls card read result and updates thumbnail display.

◆ mnSnap_GetThumbImage()

void * mnSnap_GetThumbImage ( const s32 * load_idx)
inlinestatic

◆ mnSnap_GetDObj()

HSD_DObj * mnSnap_GetDObj ( HSD_JObj * jobj)
inlinestatic

◆ mnSnap_GetThumbJObj()

HSD_JObj * mnSnap_GetThumbJObj ( const s32 * load_idx,
mnSnap_State * snap )
inlinestatic

◆ mnSnap_GetImageDesc()

HSD_ImageDesc * mnSnap_GetImageDesc ( HSD_JObj * jobj)
inlinestatic

◆ mnSnap_GetLoadPhotoIdx()

s32 mnSnap_GetLoadPhotoIdx ( mnSnap_State * snap,
const s32 * load_idx )
inlinestatic

◆ mnSnap_8025329C()

void mnSnap_8025329C ( void )
static
Todo
data order hack
Todo
sdata order hack

◆ mnSnap_GetBlankImg()

void * mnSnap_GetBlankImg ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_80253640()

void mnSnap_80253640 ( s32 page)

Loads a page of snapshot thumbnails and updates navigation arrows.

◆ mnSnap_80253964()

void mnSnap_80253964 ( void )

Updates the SIS text labels showing thumbnail numbers and page info.

◆ mnSnap_80253AE4()

void mnSnap_80253AE4 ( s32 mode)

Animates the 5 sub-menu option buttons. mode=0 for enter, mode=1 for exit.

◆ mnSnap_80253BE0()

s32 mnSnap_80253BE0 ( u64 buttons,
s32 * cursor,
s32 count )

Processes D-pad/trigger inputs to navigate a 2D grid of snapshots.

Returns
0 if no movement, 1 if moved within page, 2 if page changed.

◆ fn_80253DB4()

void fn_80253DB4 ( HSD_GObj * gobj,
s32 rendermode )

Renders the main content GObj only when in photo-browsing states (>= 4).

◆ fn_80253DE8()

void fn_80253DE8 ( HSD_GObj * gobj,
s32 rendermode )

Renders the arrow/slot selector GObj only during slot selection (state 2).

◆ fn_80253E1C()

void fn_80253E1C ( HSD_GObj * gobj,
s32 rendermode )

Renders the cursor GObj during menu (state 6) or full-screen view (10-11).

◆ fn_80253E5C()

void fn_80253E5C ( HSD_GObj * gobj,
s32 rendermode )

Renders the warning/dialog GObj only when a dialog is active.

◆ mnSnap_80253E90()

void mnSnap_80253E90 ( s32 idx)

Queries memory card status for slot idx and stores the photo count/error.

◆ mnSnap_80253F60()

void mnSnap_80253F60 ( void )

Animates the memory card slot selector highlights.

The walk advances through card_status, while byte_off selects the slot animation pointers from the interleaved slot fields.

◆ mnSnap_80254014()

void mnSnap_80254014 ( void )

Resets the sub-menu view and shows all 5 option buttons.

◆ mnSnap_8025409C()

void mnSnap_8025409C ( s32 dlg_type)

Configures the Yes/No dialog button positions based on language setting.

Todo
.sdata2 order hack
Remarks
Matching tactic: the self-assign keeps p5E live so MWCC re-uses its register instead of rematerializing the address below.

◆ mnSnap_RefreshSlotSelection()

void mnSnap_RefreshSlotSelection ( mnSnap_State * snap,
const s32 * p50,
s32 * p51 )
inlinestatic

◆ mnSnap_ShowSubmenu()

void mnSnap_ShowSubmenu ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_HideSubmenu()

void mnSnap_HideSubmenu ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_80254298()

void mnSnap_80254298 ( void )

Resets to slot selection state after a card error or empty card.

◆ UNINITIALIZED_RETURN()

UNINITIALIZED_RETURN ( s32 )
static

Handles Yes/No dialog button inputs.

Sets snap->dlg_result to the selection result.

◆ mnSnap_InitDialogText()

void mnSnap_InitDialogText ( void )
static

◆ mnSnap_GetCursorIdx()

s32 mnSnap_GetCursorIdx ( void )
inlinestatic

◆ mnSnap_GetMoveJObj()

HSD_JObj * mnSnap_GetMoveJObj ( void )
inlinestatic

◆ mnSnap_GetActivePhotoCount()

s32 mnSnap_GetActivePhotoCount ( void )
inlinestatic

◆ mnSnap_GetCurrentThumbImage()

void * mnSnap_GetCurrentThumbImage ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_AnimateCardSlots()

void mnSnap_AnimateCardSlots ( const s32 * active_slot)
inlinestatic

◆ mnSnap_UpdateSlotStatus()

void mnSnap_UpdateSlotStatus ( s32 slot)
inlinestatic

◆ mnSnap_CheckCopy()

s32 mnSnap_CheckCopy ( s32 source_slot,
s32 cursor )
inlinestatic

◆ mnSnap_UpdateSelectionCursor()

void mnSnap_UpdateSelectionCursor ( mnSnap_State * snap_state)
inlinestatic

◆ mnSnap_RefreshSlotAnimations()

void mnSnap_RefreshSlotAnimations ( int i,
s32 * byte_off,
const s32 * active_slot )
inlinestatic

◆ mnSnap_ReadCardStatus()

s32 mnSnap_ReadCardStatus ( s32 slot)
inlinestatic

◆ fn_802545C4()

void fn_802545C4 ( void )

Main per-frame update for the Snap menu.

Handles all state transitions including slot selection, photo browsing, copy/move/delete operations, and dialog confirmations via a large switch on snap->state.

◆ fn_80257D7C()

void fn_80257D7C ( void )

Handles the Back button to exit the Snap menu and cleans up GObjs/text.

◆ mnSnap_LoadPageIndicator()

void mnSnap_LoadPageIndicator ( void ** page_joint,
mnSnap_State * snap,
HSD_JObj ** parent,
HSD_JObj ** jobj )
inlinestatic

◆ mnSnap_GetCardStatus()

s16 * mnSnap_GetCardStatus ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_InitPageText()

void mnSnap_InitPageText ( HSD_Text ** text)
inlinestatic

◆ mnSnap_GetMainJoint()

void ** mnSnap_GetMainJoint ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_GetMainShapeAnim()

void ** mnSnap_GetMainShapeAnim ( mnSnap_State * snap)
inlinestatic

◆ mnSnap_CreateThumbnails()

void mnSnap_CreateThumbnails ( mnSnap_State * snap,
HSD_JObj ** thumb_root_ptr,
void ** photo_joint,
void ** sub_animjoint,
void ** sub_matanim,
void ** sub_shapeanim )
inlinestatic

Creates five thumbnail joints using the spacing between two markers.

◆ mnSnap_80257F24()

void mnSnap_80257F24 ( void )

Entry point: initializes the Snap menu scene.

Loads assets, creates GObjs, sets up thumbnail grid positions, SIS text labels, and dialog widgets.

Variable Documentation

◆ mnSnap_804A0A10

mnSnap_State mnSnap_804A0A10
static

◆ mnSnap_804A0B90

struct mnSnap_804A0B90_t* mnSnap_804A0B90[4]