Rename MENUOP dialog constants

This commit is contained in:
Ryan Dwyer 2020-08-14 18:57:29 +10:00
parent 6a4f4e7611
commit d7246b166c
10 changed files with 35 additions and 35 deletions

View File

@ -533,7 +533,7 @@ glabel cheatMenuHandleDialog
// It's calculating it as &func00002148 + 24 rather than ptr + 4.
//bool cheatMenuHandleDialog(u32 operation, struct menudialog *dialog, struct menu *menu)
//{
// if (operation == MENUOP_100) {
// if (operation == MENUOP_OPEN) {
// func0f14a52c();
//
// if (func0f11e78c()) {
@ -564,7 +564,7 @@ glabel cheatMenuHandleDialog
//#endif
// }
//
// if (operation == MENUOP_101) {
// if (operation == MENUOP_CLOSE) {
// if (func0f11e78c()) {
// savefileSetFlag(SAVEFILEFLAG_USED_TRANSFERPAK);
// }

View File

@ -47,7 +47,7 @@ s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, s32 *value)
void menudialogRetryMission(u32 operation, struct menudialog *dialog, struct menuthing **thingptr)
{
switch (operation) {
case MENUOP_102:
case MENUOP_TICK:
{
/**
* NTSC Final adds this check to make sure the given dialog is

View File

@ -491,13 +491,13 @@ glabel var7f1b2cd8
bool menudialogMpPickTarget(u32 operation, struct menudialog *dialog, struct menu *menu)
{
switch (operation) {
case MENUOP_100:
case MENUOP_OPEN:
g_PlayersWithControl[g_Vars.currentplayernum] = false;
break;
case MENUOP_102:
case MENUOP_TICK:
g_PlayersWithControl[g_Vars.currentplayernum] = false;
break;
case MENUOP_101:
case MENUOP_CLOSE:
g_PlayersWithControl[g_Vars.currentplayernum] = true;
break;
}

View File

@ -843,14 +843,14 @@ char *soloMenuTitleStageOverview(struct menudialog *dialog)
s32 menudialog00103608(u32 operation, struct menudialog *dialog, struct menuthing **thingptr)
{
switch (operation) {
case MENUOP_100:
case MENUOP_OPEN:
g_Menus[g_MpPlayerNum].unk850 = 0;
func0f00e980(g_MissionConfig.stagenum,
g_Menus[g_MpPlayerNum].unk844,
g_Menus[g_MpPlayerNum].unk848, &g_Briefing);
break;
case MENUOP_101:
case MENUOP_CLOSE:
langClearBank(var8009dfe0[1]);
break;
}
@ -1447,7 +1447,7 @@ glabel menudialogCoopAntiOptions
// It uses offset 0x0a, but 0x08 is a 4 byte pointer.
//bool menudialogCoopAntiOptions(u32 operation, struct menudialog *dialog, struct menu *menu)
//{
// if (operation == MENUOP_100) {
// if (operation == MENUOP_OPEN) {
// s32 max = getMaxAiBuddies();
//
// if (g_Vars.numaibuddies > max) {
@ -1455,7 +1455,7 @@ glabel menudialogCoopAntiOptions
// }
// }
//
// if (operation == MENUOP_102) {
// if (operation == MENUOP_TICK) {
// if (g_Menus[g_MpPlayerNum].curframe &&
// g_Menus[g_MpPlayerNum].curframe->dialog == dialog) {
// struct menuframe *curframe = menu->curframe;
@ -2841,9 +2841,9 @@ glabel var7f1b2dfc
s32 menudialog0010559c(u32 operation, struct menudialog *dialog, s32 *arg2)
{
switch (operation) {
case MENUOP_100:
case MENUOP_OPEN:
break;
case MENUOP_101:
case MENUOP_CLOSE:
if ((g_Vars.unk000458 & 1) && g_Vars.coopplayernum < 0 && g_Vars.antiplayernum < 0) {
if (func0f1094e4(&var800a22c0, 1, 0) == 0) {
*arg2 = 1;
@ -4153,7 +4153,7 @@ struct menudialog g_SoloAbortShortMenuDialog = {
s32 soloMenuDialogPauseStatus(u32 operation, s32 arg1, s32 arg2)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
struct objectivething *thing = var8009d0b4;
struct objective *objective;
s32 iVar3 = 1;
@ -4497,10 +4497,10 @@ s32 menuhandlerMainMenuCounterOperative(u32 operation, struct menuitem *item, s3
bool menudialogMainMenu(u32 operation, struct menudialog *dialog, struct menu *menu)
{
switch (operation) {
case MENUOP_100:
case MENUOP_OPEN:
g_Menus[g_MpPlayerNum].data.main.unke2c = 0;
break;
case MENUOP_102:
case MENUOP_TICK:
if (g_Menus[g_MpPlayerNum].curframe &&
g_Menus[g_MpPlayerNum].curframe->dialog == dialog) {
g_MissionConfig.iscoop = false;

View File

@ -1165,7 +1165,7 @@ glabel func0f108d8c
bool menudialog00108e58(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_102) {
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curframe &&
g_Menus[g_MpPlayerNum].curframe->dialog == dialog) {
func0f109038(0);

View File

@ -92,7 +92,7 @@ void func0f10cb2c(void)
bool menudialog4MbMainMenu(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
g_Vars.unk000494 = 0;
g_Vars.unk000495 = 0;
g_Vars.unk000496 = 0;
@ -101,7 +101,7 @@ bool menudialog4MbMainMenu(u32 operation, struct menudialog *dialog, struct menu
if (g_Menus[g_MpPlayerNum].curframe &&
g_Menus[g_MpPlayerNum].curframe->dialog == &g_4MbMainMenu &&
operation == MENUOP_102) {
operation == MENUOP_TICK) {
g_Vars.unk000490 = 2;
g_Vars.mpquickteam = MPQUICKTEAM_5;
g_Vars.unk00049c = 0;

View File

@ -3571,7 +3571,7 @@ s32 menuhandlerMpRestoreHandicapDefaults(u32 operation, struct menuitem *item, s
bool menudialogMpReady(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
if (g_MpPlayers[g_MpPlayerNum].saved && g_MpPlayers[g_MpPlayerNum].unk50) {
func0f1094e4(&g_MpPlayers[g_MpPlayerNum].saved, 3, g_MpPlayerNum);
}
@ -3582,7 +3582,7 @@ bool menudialogMpReady(u32 operation, struct menudialog *dialog, struct menu *me
bool menudialogMpSimulant(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_102) {
if (operation == MENUOP_TICK) {
if ((u8)g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.name[0] == '\0') {
menuPopDialog();
}
@ -4294,7 +4294,7 @@ glabel func0f17d378
bool menudialogMpSimulants(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
g_Menus[g_MpPlayerNum].data.mpsetup.slotcount = 0;
}
@ -4950,11 +4950,11 @@ glabel var7f1b8228
bool menudialogMpSelectTune(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
var800840e0 = 80;
}
if (operation == MENUOP_101) {
if (operation == MENUOP_CLOSE) {
var800840e0 = 15;
}
@ -5921,7 +5921,7 @@ char *mpMenuTextWeaponSetName(struct menuitem *item)
bool menudialogMpGameSetup(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
g_Vars.unk000490 = 1;
g_Vars.unk00049c = 1;
}
@ -5931,7 +5931,7 @@ bool menudialogMpGameSetup(u32 operation, struct menudialog *dialog, struct menu
bool menudialogMpQuickGo(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
g_Vars.unk000490 = 3;
}

View File

@ -75,7 +75,7 @@ const char var7f1b88c0[] = "%d:%02d";
bool menudialogCombatSimulator(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_100) {
if (operation == MENUOP_OPEN) {
g_Vars.unk000494 = 0;
g_Vars.unk000495 = 0;
g_Vars.unk000496 = 0;
@ -84,7 +84,7 @@ bool menudialogCombatSimulator(u32 operation, struct menudialog *dialog, struct
if (g_Menus[g_MpPlayerNum].curframe
&& g_Menus[g_MpPlayerNum].curframe->dialog == &g_CombatSimulatorMenuDialog
&& operation == MENUOP_102) {
&& operation == MENUOP_TICK) {
g_Vars.unk000490 = 2;
g_Vars.mpquickteam = MPQUICKTEAM_5;
g_Vars.unk00049c = 0;

View File

@ -569,7 +569,7 @@ glabel var7f1b9944
s32 frTrainingStatsMenuDialog(u32 operation, u32 arg1, u32 *arg2)
{
if (operation == MENUOP_101) {
if (operation == MENUOP_CLOSE) {
if (frIsInTraining() == false) {
frEndSession(true);
}
@ -3255,7 +3255,7 @@ char *dtMenuTextTimeTakenValue(struct menuitem *item)
bool menudialogDeviceTrainingResults(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_101) {
if (operation == MENUOP_CLOSE) {
chrSetStageFlag(NULL, 0x08000000);
}
@ -3317,10 +3317,10 @@ s32 menuhandler001a6a70(u32 operation, struct menuitem *item, s32 *value)
bool menudialog001a6aa4(u32 operation, struct menudialog *dialog, struct menu *menu)
{
switch (operation) {
case MENUOP_100:
case MENUOP_OPEN:
func0f1a2198();
break;
case MENUOP_101:
case MENUOP_CLOSE:
break;
}
@ -3373,7 +3373,7 @@ char *htMenuTextTimeTakenValue(struct menuitem *item)
bool menudialogFiringRangeResults(u32 operation, struct menudialog *dialog, struct menu *menu)
{
if (operation == MENUOP_101) {
if (operation == MENUOP_CLOSE) {
chrSetStageFlag(NULL, 0x08000000);
}

View File

@ -1064,9 +1064,9 @@
#define MENUOP_SETTEXT 18
#define MENUOP_GETCOLOUR 22
#define MENUOP_CHECKHIDDEN 24
#define MENUOP_100 100
#define MENUOP_101 101
#define MENUOP_102 102
#define MENUOP_OPEN 100
#define MENUOP_CLOSE 101
#define MENUOP_TICK 102
#define MENUROOT_ENDSCREEN 1
#define MENUROOT_MAINMENU 2