diff --git a/src/game/cheats.c b/src/game/cheats.c index 7beaf6cd0..c707aa43f 100644 --- a/src/game/cheats.c +++ b/src/game/cheats.c @@ -581,10 +581,10 @@ char *cheatGetMarquee(struct menu_item *arg0) char difficultyname[256]; char cheatname[256]; - if (g_MenuStack[g_MpPlayerNum].unk4f8 && g_MenuStack[g_MpPlayerNum].unk4f8->item && g_MenuStack[g_MpPlayerNum].unk4f8->item->type == MENUITEMTYPE_CHECKBOX) { - cheat_id = g_MenuStack[g_MpPlayerNum].unk4f8->item->param; + if (g_MenuStack[g_MpPlayerNum].curframe && g_MenuStack[g_MpPlayerNum].curframe->item && g_MenuStack[g_MpPlayerNum].curframe->item->type == MENUITEMTYPE_CHECKBOX) { + cheat_id = g_MenuStack[g_MpPlayerNum].curframe->item->param; - if (g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &g_CheatsBuddiesMenuDialog && g_MenuStack[g_MpPlayerNum].unk4f8->item == &g_CheatsBuddiesMenuItems[0]) { + if (g_MenuStack[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog && g_MenuStack[g_MpPlayerNum].curframe->item == &g_CheatsBuddiesMenuItems[0]) { // Velvet sprintf(g_CheatMarqueeString, "%s: %s", langGet(L_MPWEAPONS(143)), langGet(L_MPWEAPONS(117))); // "Buddy Available", "Velvet Dark" return g_CheatMarqueeString; @@ -593,7 +593,7 @@ char *cheatGetMarquee(struct menu_item *arg0) if (cheatIsUnlocked(cheat_id)) { // Show cheat name sprintf(g_CheatMarqueeString, "%s: %s\n", - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &g_CheatsBuddiesMenuDialog ? langGet(L_MPWEAPONS(143)) : langGet(L_MPWEAPONS(136)), // "Buddy Available", "Cheat available" + g_MenuStack[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog ? langGet(L_MPWEAPONS(143)) : langGet(L_MPWEAPONS(136)), // "Buddy Available", "Cheat available" langGet(g_Cheats[cheat_id].nametextid) ); return g_CheatMarqueeString; diff --git a/src/game/game_01bea0.c b/src/game/game_01bea0.c index d840571e5..84f1f5d97 100644 --- a/src/game/game_01bea0.c +++ b/src/game/game_01bea0.c @@ -68,7 +68,7 @@ void menuCountDialogs(void) g_MenuData.count = 0; for (i = 0; i < 4; i++) { - if (g_MenuStack[i].unk4f8) { + if (g_MenuStack[i].curframe) { g_MenuData.count++; } } diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index 33c8881d0..2720a01f6 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -3281,6 +3281,73 @@ glabel menuPushDialog /* f0f321c: 27bd0040 */ addiu $sp,$sp,0x40 ); +// regalloc: s1 (layer) and s2 (sibling) are swapped +//void menuPushDialog(struct menu_dialog *dialog) +//{ +// if (dialog) { +// func0f0f37a4(&g_MenuStack[g_MpPlayerNum].unk840); +// +// if (g_MenuStack[g_MpPlayerNum].depth < 6 && g_MenuStack[g_MpPlayerNum].numframes < 10) { +// struct menulayer *layer = &g_MenuStack[g_MpPlayerNum].layers[g_MenuStack[g_MpPlayerNum].depth]; +// struct menu_dialog *sibling; +// struct menuframe *frame; +// +// g_MenuStack[g_MpPlayerNum].depth++; +// +// layer->numsiblings = 1; +// layer->cursibling = 0; +// +// frame = &g_MenuStack[g_MpPlayerNum].frames[g_MenuStack[g_MpPlayerNum].numframes]; +// g_MenuStack[g_MpPlayerNum].numframes++; +// layer->siblings[0] = frame; +// g_MenuStack[g_MpPlayerNum].curframe = frame; +// frame->unk6d = 0; +// +// func0f0f2cf4(dialog, frame, &g_MenuStack[g_MpPlayerNum]); +// +// frame->unk2c = (func0000bc08() - frame->unk1c) / 2; +// frame->unk30 = (func0000bc18() - frame->unk20) / 2; +// +// g_MenuStack[g_MpPlayerNum].unke40 |= 0x80; +// sibling = dialog->nextsibling; +// +// while (sibling && layer->numsiblings < 5) { +// // If this limit were to be reached, the game would soft lock +// // because sibling is incremented inside the if-statement block. +// if (g_MenuStack[g_MpPlayerNum].numframes < 10) { +// frame = &g_MenuStack[g_MpPlayerNum].frames[g_MenuStack[g_MpPlayerNum].numframes]; +// g_MenuStack[g_MpPlayerNum].numframes++; +// +// layer->siblings[layer->numsiblings] = frame; +// layer->numsiblings++; +// +// frame->unk6d = -1; +// +// func0f0f2cf4(sibling, frame, &g_MenuStack[g_MpPlayerNum]); +// +// frame->unk14 = -320; +// frame->unk2c = -320; +// frame->unk18 = (func0000bc18() - frame->unk20) / 2; +// frame->unk30 = frame->unk18; +// frame->unk3c = 0; +// +// sibling = sibling->nextsibling; +// } +// } +// +// func0f0f09f0(1); +// +// if (dialog->type == MENUDIALOGTYPE_DANGER) { +// func0f0f09f0(4); +// } +// +// if (dialog->type == MENUDIALOGTYPE_SUCCESS) { +// func0f0f09f0(14); +// } +// } +// } +//} + GLOBAL_ASM( glabel func0f0f3220 /* f0f3220: 3c03800a */ lui $v1,%hi(g_MenuData+0x669) diff --git a/src/game/game_102240.c b/src/game/game_102240.c index fc67e0fcd..bbdcf9d04 100644 --- a/src/game/game_102240.c +++ b/src/game/game_102240.c @@ -826,7 +826,7 @@ glabel menuhandlerAcceptMission char *soloMenuTitleStageOverview(struct menu_dialog *dialog) { - if (dialog != g_MenuStack[g_MpPlayerNum].unk4f8->dialog) { + if (dialog != g_MenuStack[g_MpPlayerNum].curframe->dialog) { return langGet(L_OPTIONS(273)); // "Overview" } @@ -1453,15 +1453,15 @@ glabel menudialogCoopAntiOptions // } // // if (operation == MENUOP_102) { -// if (g_MenuStack[g_MpPlayerNum].unk4f8 && -// g_MenuStack[g_MpPlayerNum].unk4f8->dialog == dialog) { -// struct menustackitem4f8 *unk4f8 = stackitem->unk4f8; +// if (g_MenuStack[g_MpPlayerNum].curframe && +// g_MenuStack[g_MpPlayerNum].curframe->dialog == dialog) { +// struct menuframe *curframe = stackitem->curframe; // -// if (unk4f8->unk0a) { +// if (curframe->unk0a) { // menuhandlerBuddyOptionsContinue(MENUOP_SET, NULL, NULL); // } // -// unk4f8->unk0a = 0; +// curframe->unk0a = 0; // } // } // @@ -2835,7 +2835,7 @@ glabel var7f1b2dfc /* f105598: 00000000 */ sll $zero,$zero,0x0 ); -s32 menudialog0010559c(u32 operation, struct menu_dialog *dialog, struct menustackitem *item) +s32 menudialog0010559c(u32 operation, struct menu_dialog *dialog, s32 *arg2) { switch (operation) { case MENUOP_100: @@ -2843,7 +2843,7 @@ s32 menudialog0010559c(u32 operation, struct menu_dialog *dialog, struct menusta case MENUOP_101: if ((g_Vars.unk000458 & 1) && g_Vars.coopplayernum < 0 && g_Vars.antiplayernum < 0) { if (func0f1094e4(&var800a22c0, 1, 0) == 0) { - item->unk000 = 1; + *arg2 = 1; } g_Vars.unk000458 &= ~0x00000001; @@ -4192,7 +4192,7 @@ s32 soloMenuDialogPauseStatus(u32 operation, s32 arg1, s32 arg2) char *soloMenuTitlePauseStatus(struct menu_dialog *dialog) { - if (dialog != g_MenuStack[g_MpPlayerNum].unk4f8->dialog) { + if (dialog != g_MenuStack[g_MpPlayerNum].curframe->dialog) { return langGet(L_OPTIONS(172)); // "Status" } @@ -4498,8 +4498,8 @@ bool menudialogMainMenu(u32 operation, struct menu_dialog *dialog, struct menust g_MenuStack[g_MpPlayerNum].unke2c = 0; break; case MENUOP_102: - if (g_MenuStack[g_MpPlayerNum].unk4f8 && - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == dialog) { + if (g_MenuStack[g_MpPlayerNum].curframe && + g_MenuStack[g_MpPlayerNum].curframe->dialog == dialog) { g_MissionConfig.iscoop = false; g_MissionConfig.isanti = false; } diff --git a/src/game/game_107fb0.c b/src/game/game_107fb0.c index 4e559a033..967895cc9 100644 --- a/src/game/game_107fb0.c +++ b/src/game/game_107fb0.c @@ -1165,8 +1165,8 @@ glabel func0f108d8c bool menudialog00108e58(u32 operation, struct menu_dialog *dialog, struct menustackitem *stackitem) { if (operation == MENUOP_102) { - if (g_MenuStack[g_MpPlayerNum].unk4f8 && - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == dialog) { + if (g_MenuStack[g_MpPlayerNum].curframe && + g_MenuStack[g_MpPlayerNum].curframe->dialog == dialog) { func0f109038(0); } } diff --git a/src/game/game_10c9c0.c b/src/game/game_10c9c0.c index 1f73a7505..1312c8917 100644 --- a/src/game/game_10c9c0.c +++ b/src/game/game_10c9c0.c @@ -131,8 +131,8 @@ bool menudialog4MbMainMenu(u32 operation, struct menu_dialog *dialog, struct men g_Vars.unk000497 = 0; } - if (g_MenuStack[g_MpPlayerNum].unk4f8 && - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &g_4MbMainMenu && + if (g_MenuStack[g_MpPlayerNum].curframe && + g_MenuStack[g_MpPlayerNum].curframe->dialog == &g_4MbMainMenu && operation == MENUOP_102) { g_Vars.unk000490 = 2; g_Vars.mpquickteam = MPQUICKTEAM_5; diff --git a/src/game/game_17f930.c b/src/game/game_17f930.c index b17065514..54dc74b0f 100644 --- a/src/game/game_17f930.c +++ b/src/game/game_17f930.c @@ -80,9 +80,9 @@ bool menudialogCombatSimulator(u32 operation, struct menu_dialog *dialog, struct g_Vars.unk000497 = 0; } - if (g_MenuStack[g_MpPlayerNum].unk4f8 && - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &g_CombatSimulatorMenuDialog && - operation == MENUOP_102) { + if (g_MenuStack[g_MpPlayerNum].curframe + && g_MenuStack[g_MpPlayerNum].curframe->dialog == &g_CombatSimulatorMenuDialog + && operation == MENUOP_102) { g_Vars.unk000490 = 2; g_Vars.mpquickteam = MPQUICKTEAM_5; g_Vars.unk00049c = 0; diff --git a/src/game/mplayer.c b/src/game/mplayer.c index 6d53da85b..ceb8e0147 100644 --- a/src/game/mplayer.c +++ b/src/game/mplayer.c @@ -2325,7 +2325,9 @@ glabel func0f18961c bool mpIsPaused(void) { - if (PLAYERCOUNT() == 1 && g_Vars.mplayerisrunning && g_MenuStack[g_Vars.currentplayerstats->mpindex].unk4f8) { + if (PLAYERCOUNT() == 1 + && g_Vars.mplayerisrunning + && g_MenuStack[g_Vars.currentplayerstats->mpindex].curframe) { return true; } diff --git a/src/game/pdoptions.c b/src/game/pdoptions.c index de7b573d2..504d3a7a0 100644 --- a/src/game/pdoptions.c +++ b/src/game/pdoptions.c @@ -228,15 +228,15 @@ s32 optionsGetEffectiveScreenSize(void) if (g_MenuData.root == MENUROOT_TRAINING) { g_MpPlayerNum = 0; - if (g_MenuStack[g_MpPlayerNum].unk4f8 && var8009dfc0) { + if (g_MenuStack[g_MpPlayerNum].curframe && var8009dfc0) { return SCREENSIZE_FULL; } } - if (g_MenuStack[g_MpPlayerNum].unk4f8 && ( - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &menudialog_control4 || - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &menudialog_control3 || - g_MenuStack[g_MpPlayerNum].unk4f8->dialog == &g_ControlStyleSingleMenuDialog)) { + if (g_MenuStack[g_MpPlayerNum].curframe && ( + g_MenuStack[g_MpPlayerNum].curframe->dialog == &menudialog_control4 || + g_MenuStack[g_MpPlayerNum].curframe->dialog == &menudialog_control3 || + g_MenuStack[g_MpPlayerNum].curframe->dialog == &g_ControlStyleSingleMenuDialog)) { return SCREENSIZE_FULL; } diff --git a/src/include/game/game_0f09f0.h b/src/include/game/game_0f09f0.h index ae8cd57f5..2f9ef8a8b 100644 --- a/src/include/game/game_0f09f0.h +++ b/src/include/game/game_0f09f0.h @@ -32,7 +32,7 @@ u32 func0f0f2928(void); u32 func0f0f29cc(void); u32 func0f0f2b2c(void); u32 func0f0f2c44(void); -u32 func0f0f2cf4(void); +void func0f0f2cf4(struct menu_dialog *dialog, struct menuframe *arg1, struct menustackitem *stackitem); void menuPushDialog(struct menu_dialog *dialog); u32 func0f0f3220(void); u32 func0f0f33bc(void); @@ -40,7 +40,7 @@ u32 func0f0f361c(void); void menuPopDialog(void); void func0f0f3704(struct menu_dialog *dialog); void func0f0f372c(u8 *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 arg8); -u32 func0f0f37a4(void); +void func0f0f37a4(u8 *arg0); u32 func0f0f38b0(void); u32 func0f0f5004(void); u32 func0f0f50fc(void); diff --git a/src/include/game/game_102240.h b/src/include/game/game_102240.h index ed5a6dfde..4880aa13e 100644 --- a/src/include/game/game_102240.h +++ b/src/include/game/game_102240.h @@ -25,7 +25,7 @@ bool soloChoosePauseDialog(void); s32 menudialog00103368(u32, u32, u32 *); s32 menudialog00103608(u32 operation, struct menu_dialog *dialog, struct menustackitem *item); bool menudialogCoopAntiOptions(u32 operation, struct menu_dialog *dialog, struct menustackitem *stackitem); -s32 menudialog0010559c(u32 operation, struct menu_dialog *dialog, struct menustackitem *item); +s32 menudialog0010559c(u32 operation, struct menu_dialog *dialog, s32 *arg2); s32 menudialog00105c54(u32, u32, u32 *); s32 menudialog001063d4(u32, u32, u32 *); s32 soloMenuDialogPauseStatus(u32 operation, s32 arg1, s32 arg2); diff --git a/src/include/lib/lib_09660.h b/src/include/lib/lib_09660.h index 36746c5ac..3e77be47e 100644 --- a/src/include/lib/lib_09660.h +++ b/src/include/lib/lib_09660.h @@ -39,8 +39,8 @@ u32 func0000bba0(void); u32 func0000bbc4(void); u32 func0000bbd4(void); u32 func0000bbe4(void); -u32 func0000bc08(void); -u32 func0000bc18(void); +s32 func0000bc08(void); +s32 func0000bc18(void); u32 func0000bc28(void); u32 func0000bc88(void); u32 func0000bc98(void); diff --git a/src/include/types.h b/src/include/types.h index 8630dd294..763d2a35f 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3360,10 +3360,42 @@ struct fireslot { /*0x2c*/ u32 unk2c; }; -struct menustackitem4f8 { +struct menulayer { + struct menuframe *siblings[5]; + s8 numsiblings; + s8 cursibling; +}; + +struct menuframe { struct menu_dialog *dialog; u32 unk04; struct menu_item *item; + /*0x0c*/ u32 unk0c; + /*0x10*/ u32 unk10; + /*0x14*/ s32 unk14; + /*0x18*/ u32 unk18; + /*0x1c*/ s32 unk1c; + /*0x20*/ s32 unk20; + /*0x24*/ u32 unk24; + /*0x28*/ u32 unk28; + /*0x2c*/ s32 unk2c; + /*0x30*/ u32 unk30; + /*0x34*/ u32 unk34; + /*0x38*/ u32 unk38; + /*0x3c*/ u8 unk3c; + /*0x40*/ u32 unk40; + /*0x44*/ u32 unk44; + /*0x48*/ u32 unk48; + /*0x4c*/ u32 unk4c; + /*0x50*/ u32 unk50; + /*0x54*/ u32 unk54; + /*0x58*/ u32 unk58; + /*0x5c*/ u32 unk5c; + /*0x60*/ u32 unk60; + /*0x64*/ u32 unk64; + /*0x68*/ u32 unk68; + /*0x6c*/ u8 unk6c; + /*0x6d*/ s8 unk6d; }; struct menustackdfc { @@ -3372,325 +3404,11 @@ struct menustackdfc { }; struct menustackitem { - /*0x000*/ u32 unk000; - /*0x004*/ u32 unk004; - /*0x008*/ u32 unk008; - /*0x00c*/ u32 unk00c; - /*0x010*/ u32 unk010; - /*0x014*/ u32 unk014; - /*0x018*/ u32 unk018; - /*0x01c*/ u32 unk01c; - /*0x020*/ u32 unk020; - /*0x024*/ u32 unk024; - /*0x028*/ u32 unk028; - /*0x02c*/ u32 unk02c; - /*0x030*/ u32 unk030; - /*0x034*/ u32 unk034; - /*0x038*/ u32 unk038; - /*0x03c*/ u32 unk03c; - /*0x040*/ u32 unk040; - /*0x044*/ u32 unk044; - /*0x048*/ u32 unk048; - /*0x04c*/ u32 unk04c; - /*0x050*/ u32 unk050; - /*0x054*/ u32 unk054; - /*0x058*/ u32 unk058; - /*0x05c*/ u32 unk05c; - /*0x060*/ u32 unk060; - /*0x064*/ u32 unk064; - /*0x068*/ u32 unk068; - /*0x06c*/ u32 unk06c; - /*0x070*/ u32 unk070; - /*0x074*/ u32 unk074; - /*0x078*/ u32 unk078; - /*0x07c*/ u32 unk07c; - /*0x080*/ u32 unk080; - /*0x084*/ u32 unk084; - /*0x088*/ u32 unk088; - /*0x08c*/ u32 unk08c; - /*0x090*/ u32 unk090; - /*0x094*/ u32 unk094; - /*0x098*/ u32 unk098; - /*0x09c*/ u32 unk09c; - /*0x0a0*/ u32 unk0a0; - /*0x0a4*/ u32 unk0a4; - /*0x0a8*/ u32 unk0a8; - /*0x0ac*/ u32 unk0ac; - /*0x0b0*/ u32 unk0b0; - /*0x0b4*/ u32 unk0b4; - /*0x0b8*/ u32 unk0b8; - /*0x0bc*/ u32 unk0bc; - /*0x0c0*/ u32 unk0c0; - /*0x0c4*/ u32 unk0c4; - /*0x0c8*/ u32 unk0c8; - /*0x0cc*/ u32 unk0cc; - /*0x0d0*/ u32 unk0d0; - /*0x0d4*/ u32 unk0d4; - /*0x0d8*/ u32 unk0d8; - /*0x0dc*/ u32 unk0dc; - /*0x0e0*/ u32 unk0e0; - /*0x0e4*/ u32 unk0e4; - /*0x0e8*/ u32 unk0e8; - /*0x0ec*/ u32 unk0ec; - /*0x0f0*/ u32 unk0f0; - /*0x0f4*/ u32 unk0f4; - /*0x0f8*/ u32 unk0f8; - /*0x0fc*/ u32 unk0fc; - /*0x100*/ u32 unk100; - /*0x104*/ u32 unk104; - /*0x108*/ u32 unk108; - /*0x10c*/ u32 unk10c; - /*0x110*/ u32 unk110; - /*0x114*/ u32 unk114; - /*0x118*/ u32 unk118; - /*0x11c*/ u32 unk11c; - /*0x120*/ u32 unk120; - /*0x124*/ u32 unk124; - /*0x128*/ u32 unk128; - /*0x12c*/ u32 unk12c; - /*0x130*/ u32 unk130; - /*0x134*/ u32 unk134; - /*0x138*/ u32 unk138; - /*0x13c*/ u32 unk13c; - /*0x140*/ u32 unk140; - /*0x144*/ u32 unk144; - /*0x148*/ u32 unk148; - /*0x14c*/ u32 unk14c; - /*0x150*/ u32 unk150; - /*0x154*/ u32 unk154; - /*0x158*/ u32 unk158; - /*0x15c*/ u32 unk15c; - /*0x160*/ u32 unk160; - /*0x164*/ u32 unk164; - /*0x168*/ u32 unk168; - /*0x16c*/ u32 unk16c; - /*0x170*/ u32 unk170; - /*0x174*/ u32 unk174; - /*0x178*/ u32 unk178; - /*0x17c*/ u32 unk17c; - /*0x180*/ u32 unk180; - /*0x184*/ u32 unk184; - /*0x188*/ u32 unk188; - /*0x18c*/ u32 unk18c; - /*0x190*/ u32 unk190; - /*0x194*/ u32 unk194; - /*0x198*/ u32 unk198; - /*0x19c*/ u32 unk19c; - /*0x1a0*/ u32 unk1a0; - /*0x1a4*/ u32 unk1a4; - /*0x1a8*/ u32 unk1a8; - /*0x1ac*/ u32 unk1ac; - /*0x1b0*/ u32 unk1b0; - /*0x1b4*/ u32 unk1b4; - /*0x1b8*/ u32 unk1b8; - /*0x1bc*/ u32 unk1bc; - /*0x1c0*/ u32 unk1c0; - /*0x1c4*/ u32 unk1c4; - /*0x1c8*/ u32 unk1c8; - /*0x1cc*/ u32 unk1cc; - /*0x1d0*/ u32 unk1d0; - /*0x1d4*/ u32 unk1d4; - /*0x1d8*/ u32 unk1d8; - /*0x1dc*/ u32 unk1dc; - /*0x1e0*/ u32 unk1e0; - /*0x1e4*/ u32 unk1e4; - /*0x1e8*/ u32 unk1e8; - /*0x1ec*/ u32 unk1ec; - /*0x1f0*/ u32 unk1f0; - /*0x1f4*/ u32 unk1f4; - /*0x1f8*/ u32 unk1f8; - /*0x1fc*/ u32 unk1fc; - /*0x200*/ u32 unk200; - /*0x204*/ u32 unk204; - /*0x208*/ u32 unk208; - /*0x20c*/ u32 unk20c; - /*0x210*/ u32 unk210; - /*0x214*/ u32 unk214; - /*0x218*/ u32 unk218; - /*0x21c*/ u32 unk21c; - /*0x220*/ u32 unk220; - /*0x224*/ u32 unk224; - /*0x228*/ u32 unk228; - /*0x22c*/ u32 unk22c; - /*0x230*/ u32 unk230; - /*0x234*/ u32 unk234; - /*0x238*/ u32 unk238; - /*0x23c*/ u32 unk23c; - /*0x240*/ u32 unk240; - /*0x244*/ u32 unk244; - /*0x248*/ u32 unk248; - /*0x24c*/ u32 unk24c; - /*0x250*/ u32 unk250; - /*0x254*/ u32 unk254; - /*0x258*/ u32 unk258; - /*0x25c*/ u32 unk25c; - /*0x260*/ u32 unk260; - /*0x264*/ u32 unk264; - /*0x268*/ u32 unk268; - /*0x26c*/ u32 unk26c; - /*0x270*/ u32 unk270; - /*0x274*/ u32 unk274; - /*0x278*/ u32 unk278; - /*0x27c*/ u32 unk27c; - /*0x280*/ u32 unk280; - /*0x284*/ u32 unk284; - /*0x288*/ u32 unk288; - /*0x28c*/ u32 unk28c; - /*0x290*/ u32 unk290; - /*0x294*/ u32 unk294; - /*0x298*/ u32 unk298; - /*0x29c*/ u32 unk29c; - /*0x2a0*/ u32 unk2a0; - /*0x2a4*/ u32 unk2a4; - /*0x2a8*/ u32 unk2a8; - /*0x2ac*/ u32 unk2ac; - /*0x2b0*/ u32 unk2b0; - /*0x2b4*/ u32 unk2b4; - /*0x2b8*/ u32 unk2b8; - /*0x2bc*/ u32 unk2bc; - /*0x2c0*/ u32 unk2c0; - /*0x2c4*/ u32 unk2c4; - /*0x2c8*/ u32 unk2c8; - /*0x2cc*/ u32 unk2cc; - /*0x2d0*/ u32 unk2d0; - /*0x2d4*/ u32 unk2d4; - /*0x2d8*/ u32 unk2d8; - /*0x2dc*/ u32 unk2dc; - /*0x2e0*/ u32 unk2e0; - /*0x2e4*/ u32 unk2e4; - /*0x2e8*/ u32 unk2e8; - /*0x2ec*/ u32 unk2ec; - /*0x2f0*/ u32 unk2f0; - /*0x2f4*/ u32 unk2f4; - /*0x2f8*/ u32 unk2f8; - /*0x2fc*/ u32 unk2fc; - /*0x300*/ u32 unk300; - /*0x304*/ u32 unk304; - /*0x308*/ u32 unk308; - /*0x30c*/ u32 unk30c; - /*0x310*/ u32 unk310; - /*0x314*/ u32 unk314; - /*0x318*/ u32 unk318; - /*0x31c*/ u32 unk31c; - /*0x320*/ u32 unk320; - /*0x324*/ u32 unk324; - /*0x328*/ u32 unk328; - /*0x32c*/ u32 unk32c; - /*0x330*/ u32 unk330; - /*0x334*/ u32 unk334; - /*0x338*/ u32 unk338; - /*0x33c*/ u32 unk33c; - /*0x340*/ u32 unk340; - /*0x344*/ u32 unk344; - /*0x348*/ u32 unk348; - /*0x34c*/ u32 unk34c; - /*0x350*/ u32 unk350; - /*0x354*/ u32 unk354; - /*0x358*/ u32 unk358; - /*0x35c*/ u32 unk35c; - /*0x360*/ u32 unk360; - /*0x364*/ u32 unk364; - /*0x368*/ u32 unk368; - /*0x36c*/ u32 unk36c; - /*0x370*/ u32 unk370; - /*0x374*/ u32 unk374; - /*0x378*/ u32 unk378; - /*0x37c*/ u32 unk37c; - /*0x380*/ u32 unk380; - /*0x384*/ u32 unk384; - /*0x388*/ u32 unk388; - /*0x38c*/ u32 unk38c; - /*0x390*/ u32 unk390; - /*0x394*/ u32 unk394; - /*0x398*/ u32 unk398; - /*0x39c*/ u32 unk39c; - /*0x3a0*/ u32 unk3a0; - /*0x3a4*/ u32 unk3a4; - /*0x3a8*/ u32 unk3a8; - /*0x3ac*/ u32 unk3ac; - /*0x3b0*/ u32 unk3b0; - /*0x3b4*/ u32 unk3b4; - /*0x3b8*/ u32 unk3b8; - /*0x3bc*/ u32 unk3bc; - /*0x3c0*/ u32 unk3c0; - /*0x3c4*/ u32 unk3c4; - /*0x3c8*/ u32 unk3c8; - /*0x3cc*/ u32 unk3cc; - /*0x3d0*/ u32 unk3d0; - /*0x3d4*/ u32 unk3d4; - /*0x3d8*/ u32 unk3d8; - /*0x3dc*/ u32 unk3dc; - /*0x3e0*/ u32 unk3e0; - /*0x3e4*/ u32 unk3e4; - /*0x3e8*/ u32 unk3e8; - /*0x3ec*/ u32 unk3ec; - /*0x3f0*/ u32 unk3f0; - /*0x3f4*/ u32 unk3f4; - /*0x3f8*/ u32 unk3f8; - /*0x3fc*/ u32 unk3fc; - /*0x400*/ u32 unk400; - /*0x404*/ u32 unk404; - /*0x408*/ u32 unk408; - /*0x40c*/ u32 unk40c; - /*0x410*/ u32 unk410; - /*0x414*/ u32 unk414; - /*0x418*/ u32 unk418; - /*0x41c*/ u32 unk41c; - /*0x420*/ u32 unk420; - /*0x424*/ u32 unk424; - /*0x428*/ u32 unk428; - /*0x42c*/ u32 unk42c; - /*0x430*/ u32 unk430; - /*0x434*/ u32 unk434; - /*0x438*/ u32 unk438; - /*0x43c*/ u32 unk43c; - /*0x440*/ u32 unk440; - /*0x444*/ u32 unk444; - /*0x448*/ u32 unk448; - /*0x44c*/ u32 unk44c; - /*0x450*/ u32 unk450; - /*0x454*/ u32 unk454; - /*0x458*/ u32 unk458; - /*0x45c*/ u32 unk45c; - /*0x460*/ u32 unk460; - /*0x464*/ u32 unk464; - /*0x468*/ u32 unk468; - /*0x46c*/ u32 unk46c; - /*0x470*/ u32 unk470; - /*0x474*/ u32 unk474; - /*0x478*/ u32 unk478; - /*0x47c*/ u32 unk47c; - /*0x480*/ u32 unk480; - /*0x484*/ u32 unk484; - /*0x488*/ u32 unk488; - /*0x48c*/ u32 unk48c; - /*0x490*/ u32 unk490; - /*0x494*/ u32 unk494; - /*0x498*/ u32 unk498; - /*0x49c*/ u32 unk49c; - /*0x4a0*/ u32 unk4a0; - /*0x4a4*/ u32 unk4a4; - /*0x4a8*/ u32 unk4a8; - /*0x4ac*/ u32 unk4ac; - /*0x4b0*/ u32 unk4b0; - /*0x4b4*/ u32 unk4b4; - /*0x4b8*/ u32 unk4b8; - /*0x4bc*/ u32 unk4bc; - /*0x4c0*/ u32 unk4c0; - /*0x4c4*/ u32 unk4c4; - /*0x4c8*/ u32 unk4c8; - /*0x4cc*/ u32 unk4cc; - /*0x4d0*/ u32 unk4d0; - /*0x4d4*/ u32 unk4d4; - /*0x4d8*/ u32 unk4d8; - /*0x4dc*/ u32 unk4dc; - /*0x4e0*/ u32 unk4e0; - /*0x4e4*/ u32 unk4e4; - /*0x4e8*/ u32 unk4e8; - /*0x4ec*/ u32 unk4ec; - /*0x4f0*/ u32 unk4f0; - /*0x4f4*/ u32 unk4f4; - /*0x4f8*/ struct menustackitem4f8 *unk4f8; + struct menuframe frames[10]; + /*0x460*/ s16 numframes; + /*0x464*/ struct menulayer layers[6]; + /*0x4f4*/ s16 depth; // index into layers. 1-indexed? + /*0x4f8*/ struct menuframe *curframe; /*0x4fc*/ u32 unk4fc; /*0x500*/ u32 unk500; /*0x504*/ u32 unk504; diff --git a/src/lib/lib_50090.c b/src/lib/lib_50090.c index 398f7aae2..f3ef842af 100644 --- a/src/lib/lib_50090.c +++ b/src/lib/lib_50090.c @@ -57,4 +57,4 @@ glabel func000500e4 /* 50124: 03e00008 */ jr $ra /* 50128: 00000000 */ sll $zero,$zero,0x0 /* 5012c: 00000000 */ sll $zero,$zero,0x0 -); \ No newline at end of file +);