This commit is contained in:
Ryan Dwyer
2020-09-11 16:19:24 +10:00
parent d8baa5c276
commit 1b999547d8
24 changed files with 902 additions and 813 deletions
+8 -5
View File
@@ -410,7 +410,7 @@ glabel cheatMenuHandleCheatCheckbox
// return 0;
//}
s32 cheatMenuHandleBuddyCheckbox(s32 operation, struct menuitem *item, s32 arg2)
s32 cheatMenuHandleBuddyCheckbox(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -582,10 +582,13 @@ char *cheatGetMarquee(struct menuitem *arg0)
char difficultyname[256];
char cheatname[256];
if (g_Menus[g_MpPlayerNum].curframe && g_Menus[g_MpPlayerNum].curframe->item && g_Menus[g_MpPlayerNum].curframe->item->type == MENUITEMTYPE_CHECKBOX) {
cheat_id = g_Menus[g_MpPlayerNum].curframe->item->param;
if (g_Menus[g_MpPlayerNum].curframe
&& g_Menus[g_MpPlayerNum].curframe->focuseditem
&& g_Menus[g_MpPlayerNum].curframe->focuseditem->type == MENUITEMTYPE_CHECKBOX) {
cheat_id = g_Menus[g_MpPlayerNum].curframe->focuseditem->param;
if (g_Menus[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog && g_Menus[g_MpPlayerNum].curframe->item == &g_CheatsBuddiesMenuItems[0]) {
if (g_Menus[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog
&& g_Menus[g_MpPlayerNum].curframe->focuseditem == &g_CheatsBuddiesMenuItems[0]) {
// Velvet
sprintf(g_CheatMarqueeString, "%s: %s", langGet(L_MPWEAPONS(143)), langGet(L_MPWEAPONS(117))); // "Buddy Available", "Velvet Dark"
return g_CheatMarqueeString;
@@ -656,7 +659,7 @@ char *cheatGetMarquee(struct menuitem *arg0)
return langGet(L_MPWEAPONS(142)); // "Select cheat for information"
}
bool cheatMenuHandleTurnOffAllCheats(u32 operation, u32 arg1, u32 *arg2)
s32 cheatMenuHandleTurnOffAllCheats(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_CheatsEnabledBank0 = 0;
+15 -15
View File
@@ -34,7 +34,7 @@
#include "lib/lib_13130.h"
#include "types.h"
s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -44,7 +44,7 @@ s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
void menudialogRetryMission(u32 operation, struct menudialog *dialog, struct menuthing **thingptr)
s32 menudialogRetryMission(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
switch (operation) {
case MENUOP_TICK:
@@ -60,7 +60,7 @@ void menudialogRetryMission(u32 operation, struct menudialog *dialog, struct men
if (dialog == g_Menus[g_MpPlayerNum].curframe->dialog
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
#endif
struct menuthing *thing = *thingptr;
struct menuthing *thing = data->ptrs[0];
bool pass = false;
if (thing->unk03) {
@@ -85,8 +85,8 @@ void menudialogRetryMission(u32 operation, struct menudialog *dialog, struct men
}
if (pass) {
s32 values[4];
menuhandlerAcceptMission(MENUOP_SET, &dialog->items[1], values);
union handlerdata data2;
menuhandlerAcceptMission(MENUOP_SET, &dialog->items[1], &data2);
}
#if VERSION >= VERSION_NTSC_FINAL
}
@@ -95,7 +95,7 @@ void menudialogRetryMission(u32 operation, struct menudialog *dialog, struct men
}
}
menudialog00103608(operation, dialog, thingptr);
menudialog00103608(operation, dialog, data);
}
char *menuDialogTitleRetryStageName(struct menudialog *dialog)
@@ -132,14 +132,14 @@ char *menuDialogTitleNextMissionStageName(struct menudialog *dialog)
return g_StringPointer;
}
s32 menuhandlerReplayPreviousMission(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerReplayPreviousMission(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.stageindex--;
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
}
return menuhandlerAcceptMission(operation, NULL, value);
return menuhandlerAcceptMission(operation, NULL, data);
}
struct menuitem g_MenuItemsRetryMission[] = {
@@ -374,11 +374,11 @@ void func0f10d770(void)
g_Menus[3].unk844 = func0f09ddec() + func0f0e4fe0();
}
s32 menuhandlerReplayLastLevel(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerReplayLastLevel(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
return menuhandlerAcceptMission(operation, NULL, value);
return menuhandlerAcceptMission(operation, NULL, data);
}
return 0;
@@ -438,7 +438,7 @@ struct menudialog g_MenuDialogObjectivesCompletedNarrow = {
/**
* Displayed after Defense and Skedar Ruins completion screens.
*/
s32 menuhandlerContinueMission(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerContinueMission(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
endscreenHandleContinue(2);
@@ -869,7 +869,7 @@ struct menuitem g_MenuItemsSoloEndscreenWide[] = {
* 5 = timed cheat name
* 6 = limb shots
*/
s32 menuhandlerEndscreenCheats(u32 operation, struct menuitem *item, u32 *values)
s32 menuhandlerEndscreenCheats(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_GETCOLOUR
&& ((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x200) || item->param == 5)) {
@@ -883,14 +883,14 @@ s32 menuhandlerEndscreenCheats(u32 operation, struct menuitem *item, u32 *values
return 0;
}
values[1] = colourBlend(values[1], g_CheatColour, weight);
data->words[1] = colourBlend(data->words[1], g_CheatColour, weight);
if (item->param == 3) { // completion cheat name
values[0] = colourBlend(values[0], g_CheatColour, weight);
data->words[0] = colourBlend(data->words[0], g_CheatColour, weight);
}
if (item->param == 5) { // timed cheat name
values[0] = colourBlend(values[0], g_CheatColour, weight);
data->words[0] = colourBlend(data->words[0], g_CheatColour, weight);
}
}
+1 -1
View File
@@ -15713,7 +15713,7 @@ glabel func0f0f057c
Gfx *menuRenderItem(Gfx *gdl, struct menuframe *frame)
{
switch (frame->item->type) {
switch (frame->focuseditem->type) {
case MENUITEMTYPE_CUSTOM: return menuRenderItemCustom(gdl);
case MENUITEMTYPE_SELECTABLE: return menuRenderItemSelectable(gdl);
case MENUITEMTYPE_SLIDER: return menuRenderItemSlider(gdl);
+249 -169
View File
@@ -2796,172 +2796,252 @@ glabel func0f0f2c44
/* f0f2cf0: 00000000 */ nop
);
GLOBAL_ASM(
glabel func0f0f2cf4
.late_rodata
glabel var7f1b2928
.word 0x40c90fdb
.text
/* f0f2cf4: 27bdff98 */ addiu $sp,$sp,-104
/* f0f2cf8: afbf0024 */ sw $ra,0x24($sp)
/* f0f2cfc: afb30020 */ sw $s3,0x20($sp)
/* f0f2d00: afb2001c */ sw $s2,0x1c($sp)
/* f0f2d04: afb10018 */ sw $s1,0x18($sp)
/* f0f2d08: afb00014 */ sw $s0,0x14($sp)
/* f0f2d0c: afa60070 */ sw $a2,0x70($sp)
/* f0f2d10: aca40000 */ sw $a0,0x0($a1)
/* f0f2d14: 3c02800a */ lui $v0,%hi(g_MenuData+0x4)
/* f0f2d18: 8c4219c4 */ lw $v0,%lo(g_MenuData+0x4)($v0)
/* f0f2d1c: 00a08825 */ or $s1,$a1,$zero
/* f0f2d20: 24010002 */ addiu $at,$zero,0x2
/* f0f2d24: 1041000d */ beq $v0,$at,.L0f0f2d5c
/* f0f2d28: 02202825 */ or $a1,$s1,$zero
/* f0f2d2c: 24010003 */ addiu $at,$zero,0x3
/* f0f2d30: 10410008 */ beq $v0,$at,.L0f0f2d54
/* f0f2d34: 240e0001 */ addiu $t6,$zero,0x1
/* f0f2d38: 2401000b */ addiu $at,$zero,0xb
/* f0f2d3c: 10410005 */ beq $v0,$at,.L0f0f2d54
/* f0f2d40: 2401000d */ addiu $at,$zero,0xd
/* f0f2d44: 50410006 */ beql $v0,$at,.L0f0f2d60
/* f0f2d48: a220006e */ sb $zero,0x6e($s1)
/* f0f2d4c: 10000004 */ b .L0f0f2d60
/* f0f2d50: a220006e */ sb $zero,0x6e($s1)
.L0f0f2d54:
/* f0f2d54: 10000002 */ b .L0f0f2d60
/* f0f2d58: a22e006e */ sb $t6,0x6e($s1)
.L0f0f2d5c:
/* f0f2d5c: a220006e */ sb $zero,0x6e($s1)
.L0f0f2d60:
/* f0f2d60: 8fa60070 */ lw $a2,0x70($sp)
/* f0f2d64: 0fc3c75b */ jal func0f0f1d6c
/* f0f2d68: afa40068 */ sw $a0,0x68($sp)
/* f0f2d6c: 0fc3e95d */ jal func0f0fa574
/* f0f2d70: 02202025 */ or $a0,$s1,$zero
/* f0f2d74: 8faf0068 */ lw $t7,0x68($sp)
/* f0f2d78: 3c01bf80 */ lui $at,0xbf80
/* f0f2d7c: 44812000 */ mtc1 $at,$f4
/* f0f2d80: 44803000 */ mtc1 $zero,$f6
/* f0f2d84: 91f80000 */ lbu $t8,0x0($t7)
/* f0f2d88: e6240040 */ swc1 $f4,0x40($s1)
/* f0f2d8c: e6260048 */ swc1 $f6,0x48($s1)
/* f0f2d90: 0c004b70 */ jal random
/* f0f2d94: a238003c */ sb $t8,0x3c($s1)
/* f0f2d98: 44824000 */ mtc1 $v0,$f8
/* f0f2d9c: 3c03800a */ lui $v1,%hi(g_Menus)
/* f0f2da0: 3c058007 */ lui $a1,%hi(g_MpPlayerNum)
/* f0f2da4: 24a51448 */ addiu $a1,$a1,%lo(g_MpPlayerNum)
/* f0f2da8: 2463e000 */ addiu $v1,$v1,%lo(g_Menus)
/* f0f2dac: 24060e70 */ addiu $a2,$zero,0xe70
/* f0f2db0: 04410005 */ bgez $v0,.L0f0f2dc8
/* f0f2db4: 468042a0 */ cvt.s.w $f10,$f8
/* f0f2db8: 3c014f80 */ lui $at,0x4f80
/* f0f2dbc: 44818000 */ mtc1 $at,$f16
/* f0f2dc0: 00000000 */ nop
/* f0f2dc4: 46105280 */ add.s $f10,$f10,$f16
.L0f0f2dc8:
/* f0f2dc8: 3c012f80 */ lui $at,0x2f80
/* f0f2dcc: 44819000 */ mtc1 $at,$f18
/* f0f2dd0: 3c017f1b */ lui $at,%hi(var7f1b2928)
/* f0f2dd4: c4262928 */ lwc1 $f6,%lo(var7f1b2928)($at)
/* f0f2dd8: 46125102 */ mul.s $f4,$f10,$f18
/* f0f2ddc: 44808000 */ mtc1 $zero,$f16
/* f0f2de0: 02202025 */ or $a0,$s1,$zero
/* f0f2de4: 46062202 */ mul.s $f8,$f4,$f6
/* f0f2de8: e628004c */ swc1 $f8,0x4c($s1)
/* f0f2dec: 8cb90000 */ lw $t9,0x0($a1)
/* f0f2df0: 03260019 */ multu $t9,$a2
/* f0f2df4: 00004012 */ mflo $t0
/* f0f2df8: 00684821 */ addu $t1,$v1,$t0
/* f0f2dfc: 8d2a04f8 */ lw $t2,0x4f8($t1)
/* f0f2e00: a1400060 */ sb $zero,0x60($t2)
/* f0f2e04: 8cab0000 */ lw $t3,0x0($a1)
/* f0f2e08: 01660019 */ multu $t3,$a2
/* f0f2e0c: 00006012 */ mflo $t4
/* f0f2e10: 006c6821 */ addu $t5,$v1,$t4
/* f0f2e14: 8dae04f8 */ lw $t6,0x4f8($t5)
/* f0f2e18: e5d00050 */ swc1 $f16,0x50($t6)
/* f0f2e1c: ae200054 */ sw $zero,0x54($s1)
/* f0f2e20: ae200058 */ sw $zero,0x58($s1)
/* f0f2e24: 0fc3ca23 */ jal func0f0f288c
/* f0f2e28: ae20005c */ sw $zero,0x5c($s1)
/* f0f2e2c: 8e2f0000 */ lw $t7,0x0($s1)
/* f0f2e30: ae220008 */ sw $v0,0x8($s1)
/* f0f2e34: 2412001a */ addiu $s2,$zero,0x1a
/* f0f2e38: 8df00008 */ lw $s0,0x8($t7)
/* f0f2e3c: 27b30044 */ addiu $s3,$sp,0x44
/* f0f2e40: 92180000 */ lbu $t8,0x0($s0)
/* f0f2e44: 52580014 */ beql $s2,$t8,.L0f0f2e98
/* f0f2e48: 8e250008 */ lw $a1,0x8($s1)
/* f0f2e4c: 8e020010 */ lw $v0,0x10($s0)
.L0f0f2e50:
/* f0f2e50: 5040000d */ beqzl $v0,.L0f0f2e88
/* f0f2e54: 92090014 */ lbu $t1,0x14($s0)
/* f0f2e58: 8e190004 */ lw $t9,0x4($s0)
/* f0f2e5c: 2404000f */ addiu $a0,$zero,0xf
/* f0f2e60: 02002825 */ or $a1,$s0,$zero
/* f0f2e64: 33280004 */ andi $t0,$t9,0x4
/* f0f2e68: 55000007 */ bnezl $t0,.L0f0f2e88
/* f0f2e6c: 92090014 */ lbu $t1,0x14($s0)
/* f0f2e70: 0040f809 */ jalr $v0
/* f0f2e74: 02603025 */ or $a2,$s3,$zero
/* f0f2e78: 50400003 */ beqzl $v0,.L0f0f2e88
/* f0f2e7c: 92090014 */ lbu $t1,0x14($s0)
/* f0f2e80: ae300008 */ sw $s0,0x8($s1)
/* f0f2e84: 92090014 */ lbu $t1,0x14($s0)
.L0f0f2e88:
/* f0f2e88: 26100014 */ addiu $s0,$s0,0x14
/* f0f2e8c: 5649fff0 */ bnel $s2,$t1,.L0f0f2e50
/* f0f2e90: 8e020010 */ lw $v0,0x10($s0)
/* f0f2e94: 8e250008 */ lw $a1,0x8($s1)
.L0f0f2e98:
/* f0f2e98: 50a0000c */ beqzl $a1,.L0f0f2ecc
/* f0f2e9c: 8fa70068 */ lw $a3,0x68($sp)
/* f0f2ea0: 8ca20010 */ lw $v0,0x10($a1)
/* f0f2ea4: 50400009 */ beqzl $v0,.L0f0f2ecc
/* f0f2ea8: 8fa70068 */ lw $a3,0x68($sp)
/* f0f2eac: 8caa0004 */ lw $t2,0x4($a1)
/* f0f2eb0: 2404000d */ addiu $a0,$zero,0xd
/* f0f2eb4: 314b0004 */ andi $t3,$t2,0x4
/* f0f2eb8: 55600004 */ bnezl $t3,.L0f0f2ecc
/* f0f2ebc: 8fa70068 */ lw $a3,0x68($sp)
/* f0f2ec0: 0040f809 */ jalr $v0
/* f0f2ec4: 27a60034 */ addiu $a2,$sp,0x34
/* f0f2ec8: 8fa70068 */ lw $a3,0x68($sp)
.L0f0f2ecc:
/* f0f2ecc: ae20000c */ sw $zero,0xc($s1)
/* f0f2ed0: ae200064 */ sw $zero,0x64($s1)
/* f0f2ed4: ae200068 */ sw $zero,0x68($s1)
/* f0f2ed8: 8ce2000c */ lw $v0,0xc($a3)
/* f0f2edc: 24040064 */ addiu $a0,$zero,0x64
/* f0f2ee0: 00e02825 */ or $a1,$a3,$zero
/* f0f2ee4: 50400005 */ beqzl $v0,.L0f0f2efc
/* f0f2ee8: 00e02025 */ or $a0,$a3,$zero
/* f0f2eec: 0040f809 */ jalr $v0
/* f0f2ef0: 27a60058 */ addiu $a2,$sp,0x58
/* f0f2ef4: 8fa70068 */ lw $a3,0x68($sp)
/* f0f2ef8: 00e02025 */ or $a0,$a3,$zero
.L0f0f2efc:
/* f0f2efc: 02202825 */ or $a1,$s1,$zero
/* f0f2f00: 0fc3c84d */ jal func0f0f2134
/* f0f2f04: 8fa60070 */ lw $a2,0x70($sp)
/* f0f2f08: 0fc3dfa6 */ jal func0f0f7e98
/* f0f2f0c: 02202025 */ or $a0,$s1,$zero
/* f0f2f10: 8e2c002c */ lw $t4,0x2c($s1)
/* f0f2f14: 8e2d0030 */ lw $t5,0x30($s1)
/* f0f2f18: 8e2e0034 */ lw $t6,0x34($s1)
/* f0f2f1c: 8e2f0038 */ lw $t7,0x38($s1)
/* f0f2f20: ae2c0014 */ sw $t4,0x14($s1)
/* f0f2f24: ae2d0018 */ sw $t5,0x18($s1)
/* f0f2f28: ae2e001c */ sw $t6,0x1c($s1)
/* f0f2f2c: ae2f0020 */ sw $t7,0x20($s1)
/* f0f2f30: 8fbf0024 */ lw $ra,0x24($sp)
/* f0f2f34: 8fb30020 */ lw $s3,0x20($sp)
/* f0f2f38: 8fb2001c */ lw $s2,0x1c($sp)
/* f0f2f3c: 8fb10018 */ lw $s1,0x18($sp)
/* f0f2f40: 8fb00014 */ lw $s0,0x14($sp)
/* f0f2f44: 03e00008 */ jr $ra
/* f0f2f48: 27bd0068 */ addiu $sp,$sp,0x68
);
//GLOBAL_ASM(
//glabel func0f0f2cf4
//.late_rodata
//glabel var7f1b2928
//.word 0x40c90fdb
//.text
///* f0f2cf4: 27bdff98 */ addiu $sp,$sp,-104
///* f0f2cf8: afbf0024 */ sw $ra,0x24($sp)
///* f0f2cfc: afb30020 */ sw $s3,0x20($sp)
///* f0f2d00: afb2001c */ sw $s2,0x1c($sp)
///* f0f2d04: afb10018 */ sw $s1,0x18($sp)
///* f0f2d08: afb00014 */ sw $s0,0x14($sp)
///* f0f2d0c: afa60070 */ sw $a2,0x70($sp)
///* f0f2d10: aca40000 */ sw $a0,0x0($a1)
///* f0f2d14: 3c02800a */ lui $v0,%hi(g_MenuData+0x4)
///* f0f2d18: 8c4219c4 */ lw $v0,%lo(g_MenuData+0x4)($v0)
///* f0f2d1c: 00a08825 */ or $s1,$a1,$zero
///* f0f2d20: 24010002 */ addiu $at,$zero,0x2
///* f0f2d24: 1041000d */ beq $v0,$at,.L0f0f2d5c
///* f0f2d28: 02202825 */ or $a1,$s1,$zero
///* f0f2d2c: 24010003 */ addiu $at,$zero,0x3
///* f0f2d30: 10410008 */ beq $v0,$at,.L0f0f2d54
///* f0f2d34: 240e0001 */ addiu $t6,$zero,0x1
///* f0f2d38: 2401000b */ addiu $at,$zero,0xb
///* f0f2d3c: 10410005 */ beq $v0,$at,.L0f0f2d54
///* f0f2d40: 2401000d */ addiu $at,$zero,0xd
///* f0f2d44: 50410006 */ beql $v0,$at,.L0f0f2d60
///* f0f2d48: a220006e */ sb $zero,0x6e($s1)
///* f0f2d4c: 10000004 */ b .L0f0f2d60
///* f0f2d50: a220006e */ sb $zero,0x6e($s1)
//.L0f0f2d54:
///* f0f2d54: 10000002 */ b .L0f0f2d60
///* f0f2d58: a22e006e */ sb $t6,0x6e($s1)
//.L0f0f2d5c:
///* f0f2d5c: a220006e */ sb $zero,0x6e($s1)
//.L0f0f2d60:
///* f0f2d60: 8fa60070 */ lw $a2,0x70($sp)
///* f0f2d64: 0fc3c75b */ jal func0f0f1d6c
///* f0f2d68: afa40068 */ sw $a0,0x68($sp)
///* f0f2d6c: 0fc3e95d */ jal func0f0fa574
///* f0f2d70: 02202025 */ or $a0,$s1,$zero
///* f0f2d74: 8faf0068 */ lw $t7,0x68($sp)
///* f0f2d78: 3c01bf80 */ lui $at,0xbf80
///* f0f2d7c: 44812000 */ mtc1 $at,$f4
///* f0f2d80: 44803000 */ mtc1 $zero,$f6
///* f0f2d84: 91f80000 */ lbu $t8,0x0($t7)
///* f0f2d88: e6240040 */ swc1 $f4,0x40($s1)
///* f0f2d8c: e6260048 */ swc1 $f6,0x48($s1)
///* f0f2d90: 0c004b70 */ jal random
///* f0f2d94: a238003c */ sb $t8,0x3c($s1)
///* f0f2d98: 44824000 */ mtc1 $v0,$f8
///* f0f2d9c: 3c03800a */ lui $v1,%hi(g_Menus)
///* f0f2da0: 3c058007 */ lui $a1,%hi(g_MpPlayerNum)
///* f0f2da4: 24a51448 */ addiu $a1,$a1,%lo(g_MpPlayerNum)
///* f0f2da8: 2463e000 */ addiu $v1,$v1,%lo(g_Menus)
///* f0f2dac: 24060e70 */ addiu $a2,$zero,0xe70
///* f0f2db0: 04410005 */ bgez $v0,.L0f0f2dc8
///* f0f2db4: 468042a0 */ cvt.s.w $f10,$f8
///* f0f2db8: 3c014f80 */ lui $at,0x4f80
///* f0f2dbc: 44818000 */ mtc1 $at,$f16
///* f0f2dc0: 00000000 */ nop
///* f0f2dc4: 46105280 */ add.s $f10,$f10,$f16
//.L0f0f2dc8:
///* f0f2dc8: 3c012f80 */ lui $at,0x2f80
///* f0f2dcc: 44819000 */ mtc1 $at,$f18
///* f0f2dd0: 3c017f1b */ lui $at,%hi(var7f1b2928)
///* f0f2dd4: c4262928 */ lwc1 $f6,%lo(var7f1b2928)($at)
///* f0f2dd8: 46125102 */ mul.s $f4,$f10,$f18
///* f0f2ddc: 44808000 */ mtc1 $zero,$f16
///* f0f2de0: 02202025 */ or $a0,$s1,$zero
///* f0f2de4: 46062202 */ mul.s $f8,$f4,$f6
///* f0f2de8: e628004c */ swc1 $f8,0x4c($s1)
///* f0f2dec: 8cb90000 */ lw $t9,0x0($a1)
///* f0f2df0: 03260019 */ multu $t9,$a2
///* f0f2df4: 00004012 */ mflo $t0
///* f0f2df8: 00684821 */ addu $t1,$v1,$t0
///* f0f2dfc: 8d2a04f8 */ lw $t2,0x4f8($t1)
///* f0f2e00: a1400060 */ sb $zero,0x60($t2)
///* f0f2e04: 8cab0000 */ lw $t3,0x0($a1)
///* f0f2e08: 01660019 */ multu $t3,$a2
///* f0f2e0c: 00006012 */ mflo $t4
///* f0f2e10: 006c6821 */ addu $t5,$v1,$t4
///* f0f2e14: 8dae04f8 */ lw $t6,0x4f8($t5)
///* f0f2e18: e5d00050 */ swc1 $f16,0x50($t6)
///* f0f2e1c: ae200054 */ sw $zero,0x54($s1)
///* f0f2e20: ae200058 */ sw $zero,0x58($s1)
///* f0f2e24: 0fc3ca23 */ jal func0f0f288c
///* f0f2e28: ae20005c */ sw $zero,0x5c($s1)
///* f0f2e2c: 8e2f0000 */ lw $t7,0x0($s1)
///* f0f2e30: ae220008 */ sw $v0,0x8($s1)
///* f0f2e34: 2412001a */ addiu $s2,$zero,0x1a
///* f0f2e38: 8df00008 */ lw $s0,0x8($t7)
///* f0f2e3c: 27b30044 */ addiu $s3,$sp,0x44
///* f0f2e40: 92180000 */ lbu $t8,0x0($s0)
///* f0f2e44: 52580014 */ beql $s2,$t8,.L0f0f2e98
///* f0f2e48: 8e250008 */ lw $a1,0x8($s1)
///* f0f2e4c: 8e020010 */ lw $v0,0x10($s0)
//.L0f0f2e50:
///* f0f2e50: 5040000d */ beqzl $v0,.L0f0f2e88
///* f0f2e54: 92090014 */ lbu $t1,0x14($s0)
///* f0f2e58: 8e190004 */ lw $t9,0x4($s0)
///* f0f2e5c: 2404000f */ addiu $a0,$zero,0xf
///* f0f2e60: 02002825 */ or $a1,$s0,$zero
///* f0f2e64: 33280004 */ andi $t0,$t9,0x4
///* f0f2e68: 55000007 */ bnezl $t0,.L0f0f2e88
///* f0f2e6c: 92090014 */ lbu $t1,0x14($s0)
///* f0f2e70: 0040f809 */ jalr $v0
///* f0f2e74: 02603025 */ or $a2,$s3,$zero
///* f0f2e78: 50400003 */ beqzl $v0,.L0f0f2e88
///* f0f2e7c: 92090014 */ lbu $t1,0x14($s0)
///* f0f2e80: ae300008 */ sw $s0,0x8($s1)
///* f0f2e84: 92090014 */ lbu $t1,0x14($s0)
//.L0f0f2e88:
///* f0f2e88: 26100014 */ addiu $s0,$s0,0x14
///* f0f2e8c: 5649fff0 */ bnel $s2,$t1,.L0f0f2e50
///* f0f2e90: 8e020010 */ lw $v0,0x10($s0)
///* f0f2e94: 8e250008 */ lw $a1,0x8($s1)
//.L0f0f2e98:
///* f0f2e98: 50a0000c */ beqzl $a1,.L0f0f2ecc
///* f0f2e9c: 8fa70068 */ lw $a3,0x68($sp)
///* f0f2ea0: 8ca20010 */ lw $v0,0x10($a1)
///* f0f2ea4: 50400009 */ beqzl $v0,.L0f0f2ecc
///* f0f2ea8: 8fa70068 */ lw $a3,0x68($sp)
///* f0f2eac: 8caa0004 */ lw $t2,0x4($a1)
///* f0f2eb0: 2404000d */ addiu $a0,$zero,0xd
///* f0f2eb4: 314b0004 */ andi $t3,$t2,0x4
///* f0f2eb8: 55600004 */ bnezl $t3,.L0f0f2ecc
///* f0f2ebc: 8fa70068 */ lw $a3,0x68($sp)
///* f0f2ec0: 0040f809 */ jalr $v0
///* f0f2ec4: 27a60034 */ addiu $a2,$sp,0x34
///* f0f2ec8: 8fa70068 */ lw $a3,0x68($sp)
//.L0f0f2ecc:
///* f0f2ecc: ae20000c */ sw $zero,0xc($s1)
///* f0f2ed0: ae200064 */ sw $zero,0x64($s1)
///* f0f2ed4: ae200068 */ sw $zero,0x68($s1)
///* f0f2ed8: 8ce2000c */ lw $v0,0xc($a3)
///* f0f2edc: 24040064 */ addiu $a0,$zero,0x64
///* f0f2ee0: 00e02825 */ or $a1,$a3,$zero
///* f0f2ee4: 50400005 */ beqzl $v0,.L0f0f2efc
///* f0f2ee8: 00e02025 */ or $a0,$a3,$zero
///* f0f2eec: 0040f809 */ jalr $v0
///* f0f2ef0: 27a60058 */ addiu $a2,$sp,0x58
///* f0f2ef4: 8fa70068 */ lw $a3,0x68($sp)
///* f0f2ef8: 00e02025 */ or $a0,$a3,$zero
//.L0f0f2efc:
///* f0f2efc: 02202825 */ or $a1,$s1,$zero
///* f0f2f00: 0fc3c84d */ jal func0f0f2134
///* f0f2f04: 8fa60070 */ lw $a2,0x70($sp)
///* f0f2f08: 0fc3dfa6 */ jal func0f0f7e98
///* f0f2f0c: 02202025 */ or $a0,$s1,$zero
///* f0f2f10: 8e2c002c */ lw $t4,0x2c($s1)
///* f0f2f14: 8e2d0030 */ lw $t5,0x30($s1)
///* f0f2f18: 8e2e0034 */ lw $t6,0x34($s1)
///* f0f2f1c: 8e2f0038 */ lw $t7,0x38($s1)
///* f0f2f20: ae2c0014 */ sw $t4,0x14($s1)
///* f0f2f24: ae2d0018 */ sw $t5,0x18($s1)
///* f0f2f28: ae2e001c */ sw $t6,0x1c($s1)
///* f0f2f2c: ae2f0020 */ sw $t7,0x20($s1)
///* f0f2f30: 8fbf0024 */ lw $ra,0x24($sp)
///* f0f2f34: 8fb30020 */ lw $s3,0x20($sp)
///* f0f2f38: 8fb2001c */ lw $s2,0x1c($sp)
///* f0f2f3c: 8fb10018 */ lw $s1,0x18($sp)
///* f0f2f40: 8fb00014 */ lw $s0,0x14($sp)
///* f0f2f44: 03e00008 */ jr $ra
///* f0f2f48: 27bd0068 */ addiu $sp,$sp,0x68
//);
void func0f0f2cf4(struct menudialog *dialog, struct menuframe *frame, struct menu *menu)
{
union handlerdata buffer3;
struct menuitem *item;
union handlerdata buffer1;
union handlerdata buffer2;
s32 (*handler)(u32 operation, struct menuitem *item, union handlerdata *data);
frame->dialog = dialog;
switch (g_MenuData.root) {
case MENUROOT_MPSETUP:
case MENUROOT_4MBMAINMENU:
frame->unk6e = 1;
break;
case MENUROOT_MAINMENU:
case MENUROOT_TRAINING:
default:
frame->unk6e = 0;
break;
}
func0f0f1d6c(dialog, frame, menu);
func0f0fa574(frame);
// d74
frame->dialogtype = dialog->type;
frame->unk40 = -1;
frame->unk48 = 0;
frame->unk4c = random() * (1.0f / U32_MAX) * M_TAU;
g_Menus[g_MpPlayerNum].curframe->unk60 = 0;
g_Menus[g_MpPlayerNum].curframe->unk50 = 0;
frame->unk54 = 0;
frame->unk58 = 0;
frame->unk5c = 0;
// e24
frame->focuseditem = func0f0f288c(frame);
// Check if any items should be focused automatically
item = frame->dialog->items;
while (item->type != MENUITEMTYPE_END) {
handler = item->ptr.handler;
if (handler
&& (item->param1 & 0x04) == 0
&& handler(MENUOP_CHECKPREFOCUSED, item, &buffer1)) {
frame->focuseditem = item;
}
item++;
}
// Run onfocus handler?
if (frame->focuseditem) {
handler = frame->focuseditem->ptr.handler;
if (handler && (frame->focuseditem->param1 & 0x04) == 0) {
handler(MENUOP_13, frame->focuseditem, &buffer2);
}
}
frame->unk0c = 0;
frame->unk64 = 0;
frame->unk68 = 0;
if (dialog->handler) {
dialog->handler(MENUOP_OPEN, dialog, &buffer3);
}
func0f0f2134(dialog, frame, menu);
func0f0f7e98(frame);
frame->unk14 = frame->unk2c;
frame->unk18 = frame->unk30;
frame->unk1c = frame->unk34;
frame->unk20 = frame->unk38;
}
GLOBAL_ASM(
glabel menuPushDialog
@@ -14143,7 +14223,7 @@ glabel menudialog000fcd48
/* f0fce04: 00000000 */ nop
);
s32 menuhandlerRepairPak(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerRepairPak(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (pakRepair(g_Menus[g_MpPlayerNum].savedevice)) {
@@ -14326,7 +14406,7 @@ char *menuTextSaveDeviceName(struct menuitem *item)
return NULL;
}
s32 menuhandlerRetrySavePak(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerRetrySavePak(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -14338,7 +14418,7 @@ s32 menuhandlerRetrySavePak(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerWarnRepairPak(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerWarnRepairPak(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPushDialog(&g_PakAttemptRepairMenuDialog);
+1 -1
View File
@@ -488,7 +488,7 @@ glabel var7f1b2cd8
/* f0fdc70: 00000000 */ nop
);
bool menudialogMpPickTarget(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpPickTarget(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
+139 -139
View File
@@ -74,7 +74,7 @@ u16 g_ControlStyleOptions[] = {
L_OPTIONS(246), // "2.4"
};
char *menuhandlerControlStyleImpl(u32 operation, struct menuitem *item, s32 *value, s32 mpindex)
s32 menuhandlerControlStyleImpl(u32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex)
{
u16 categories[] = {
L_OPTIONS(237), // "Single"
@@ -87,51 +87,51 @@ char *menuhandlerControlStyleImpl(u32 operation, struct menuitem *item, s32 *val
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 8;
data->word = 8;
break;
case MENUOP_GETOPTGROUPCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(g_ControlStyleOptions[*value]);
return (s32) langGet(g_ControlStyleOptions[data->word]);
case MENUOP_GETOPTGROUPTEXT:
return langGet(categories[*value]);
return (s32) langGet(categories[data->word]);
case MENUOP_GETGROUPSTARTINDEX:
if (*value == 0) {
value[2] = 0;
if (data->words[0] == 0) {
data->words[2] = 0;
} else {
value[2] = 4;
data->words[2] = 4;
}
break;
case MENUOP_SET:
optionsSetControlMode(mpindex, *value);
optionsSetControlMode(mpindex, data->word);
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetControlMode(mpindex);
data->word = optionsGetControlMode(mpindex);
g_Menus[g_MpPlayerNum].data.main.mpindex = mpindex;
break;
case MENUOP_16:
if (g_MenuData.root == MENUROOT_MAINMENU) {
g_Menus[g_MpPlayerNum].data.main.unke20 = *value;
g_Menus[g_MpPlayerNum].data.main.unke20 = data->word;
}
break;
}
return NULL;
return 0;
}
char *menuhandler001024dc(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler001024dc(u32 operation, struct menuitem *item, union handlerdata *data)
{
return menuhandlerControlStyleImpl(operation, item, value, 4);
return menuhandlerControlStyleImpl(operation, item, data, 4);
}
char *menuhandler001024fc(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler001024fc(u32 operation, struct menuitem *item, union handlerdata *data)
{
return menuhandlerControlStyleImpl(operation, item, value, 5);
return menuhandlerControlStyleImpl(operation, item, data, 5);
}
s32 menuhandlerReversePitch(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerReversePitch(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -145,14 +145,14 @@ s32 menuhandlerReversePitch(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return !optionsGetForwardPitch(mpchrnum);
case MENUOP_SET:
optionsSetForwardPitch(mpchrnum, *enable == false);
optionsSetForwardPitch(mpchrnum, data->word == 0);
g_Vars.unk000458 |= 1;
}
return 0;
}
char *menuhandlerAimControl(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerAimControl(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 playernum = (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0)
? g_Vars.currentplayerstats->mpindex : item->param3;
@@ -164,22 +164,22 @@ char *menuhandlerAimControl(u32 operation, struct menuitem *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(options[*value]);
return (s32) langGet(options[data->word]);
case MENUOP_SET:
optionsSetAimControl(playernum, *value);
optionsSetAimControl(playernum, data->word);
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetAimControl(playernum);
data->word = optionsGetAimControl(playernum);
}
return NULL;
return 0;
}
char *menuhandlerSoundMode(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerSoundMode(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS(232), // "Mono"
@@ -190,22 +190,22 @@ char *menuhandlerSoundMode(u32 operation, struct menuitem *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 4;
data->word = 4;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(options[*value]);
return (s32) langGet(options[data->word]);
case MENUOP_SET:
audioSetSoundMode(*value);
audioSetSoundMode(data->word);
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = g_SoundMode;
data->word = g_SoundMode;
}
return NULL;
return 0;
}
char *menuhandlerScreenSize(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerScreenSize(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS(220), // "Full"
@@ -215,22 +215,22 @@ char *menuhandlerScreenSize(u32 operation, struct menuitem *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 3;
data->word = 3;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(options[*value]);
return (s32) langGet(options[data->word]);
case MENUOP_SET:
optionsSetScreenSize(*value);
optionsSetScreenSize(data->word);
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetEffectiveScreenSize();
data->word = optionsGetEffectiveScreenSize();
}
return NULL;
return 0;
}
char *menuhandlerScreenRatio(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerScreenRatio(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS(223), // "Normal"
@@ -239,22 +239,22 @@ char *menuhandlerScreenRatio(u32 operation, struct menuitem *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(options[*value]);
return (s32) langGet(options[data->word]);
case MENUOP_SET:
optionsSetScreenRatio(*value);
optionsSetScreenRatio(data->word);
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetScreenRatio();
data->word = optionsGetScreenRatio();
}
return NULL;
return 0;
}
char *menuhandlerScreenSplit(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerScreenSplit(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS(225), // "Horizontal"
@@ -263,13 +263,13 @@ char *menuhandlerScreenSplit(u32 operation, struct menuitem *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(options[*value]);
return (s32) langGet(options[data->word]);
case MENUOP_SET:
if (optionsGetScreenSplit() != *value) {
optionsSetScreenSplit(*value);
if (optionsGetScreenSplit() != data->word) {
optionsSetScreenSplit(data->word);
g_Vars.unk000458 |= 1;
@@ -284,14 +284,14 @@ char *menuhandlerScreenSplit(u32 operation, struct menuitem *item, s32 *value)
}
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetScreenSplit();
data->word = optionsGetScreenSplit();
break;
}
return NULL;
return 0;
}
s32 menuhandlerLookAhead(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerLookAhead(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -305,14 +305,14 @@ s32 menuhandlerLookAhead(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetLookAhead(mpchrnum);
case MENUOP_SET:
optionsSetLookAhead(mpchrnum, *enable);
optionsSetLookAhead(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerHeadRoll(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerHeadRoll(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -326,40 +326,40 @@ s32 menuhandlerHeadRoll(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetHeadRoll(mpchrnum);
case MENUOP_SET:
optionsSetHeadRoll(mpchrnum, *enable);
optionsSetHeadRoll(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerInGameSubtitles(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerInGameSubtitles(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return optionsGetInGameSubtitles();
case MENUOP_SET:
optionsSetInGameSubtitles(*enable);
optionsSetInGameSubtitles(data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerCutsceneSubtitles(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerCutsceneSubtitles(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return optionsGetCutsceneSubtitles();
case MENUOP_SET:
optionsSetCutsceneSubtitles(*enable);
optionsSetCutsceneSubtitles(data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerAlternativeTitle(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerAlternativeTitle(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
@@ -370,14 +370,14 @@ s32 menuhandlerAlternativeTitle(u32 operation, struct menuitem *item, bool *enab
case MENUOP_GET:
return g_AltTitle;
case MENUOP_SET:
g_AltTitle = *enable;
g_AltTitle = data->word;
g_Vars.unk000458 |= 4;
}
return 0;
}
s32 menuhandlerHiRes(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerHiRes(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
@@ -393,14 +393,14 @@ s32 menuhandlerHiRes(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return g_HiResEnabled == true;
case MENUOP_SET:
optionsSetHiRes(*enable ? 1 : 0);
optionsSetHiRes(data->word ? 1 : 0);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerAmmoOnScreen(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerAmmoOnScreen(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -414,14 +414,14 @@ s32 menuhandlerAmmoOnScreen(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetAmmoOnScreen(mpchrnum);
case MENUOP_SET:
optionsSetAmmoOnScreen(mpchrnum, *enable);
optionsSetAmmoOnScreen(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerShowGunFunction(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerShowGunFunction(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -440,14 +440,14 @@ s32 menuhandlerShowGunFunction(u32 operation, struct menuitem *item, bool *enabl
case MENUOP_GET:
return optionsGetShowGunFunction(mpchrnum);
case MENUOP_SET:
optionsSetShowGunFunction(mpchrnum, *enable);
optionsSetShowGunFunction(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerShowMissionTime(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerShowMissionTime(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -461,14 +461,14 @@ s32 menuhandlerShowMissionTime(u32 operation, struct menuitem *item, bool *enabl
case MENUOP_GET:
return optionsGetShowMissionTime(mpchrnum);
case MENUOP_SET:
optionsSetShowMissionTime(mpchrnum, *enable);
optionsSetShowMissionTime(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerAlwaysShowTarget(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerAlwaysShowTarget(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -487,14 +487,14 @@ s32 menuhandlerAlwaysShowTarget(u32 operation, struct menuitem *item, bool *enab
case MENUOP_GET:
return optionsGetAlwaysShowTarget(mpchrnum);
case MENUOP_SET:
optionsSetAlwaysShowTarget(mpchrnum, *enable);
optionsSetAlwaysShowTarget(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerShowZoomRange(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerShowZoomRange(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -513,14 +513,14 @@ s32 menuhandlerShowZoomRange(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetShowZoomRange(mpchrnum);
case MENUOP_SET:
optionsSetShowZoomRange(mpchrnum, *enable);
optionsSetShowZoomRange(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerPaintball(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerPaintball(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -534,14 +534,14 @@ s32 menuhandlerPaintball(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetPaintball(mpchrnum);
case MENUOP_SET:
optionsSetPaintball(mpchrnum, *enable);
optionsSetPaintball(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerSightOnScreen(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerSightOnScreen(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -555,14 +555,14 @@ s32 menuhandlerSightOnScreen(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetSightOnScreen(mpchrnum);
case MENUOP_SET:
optionsSetSightOnScreen(mpchrnum, *enable);
optionsSetSightOnScreen(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerAutoAim(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerAutoAim(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -576,39 +576,39 @@ s32 menuhandlerAutoAim(u32 operation, struct menuitem *item, bool *enable)
case MENUOP_GET:
return optionsGetAutoAim(mpchrnum);
case MENUOP_SET:
optionsSetAutoAim(mpchrnum, *enable);
optionsSetAutoAim(mpchrnum, data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerMusicVolume(u32 operation, struct menuitem *item, u32 *volume)
s32 menuhandlerMusicVolume(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
*volume = optionsGetMusicVolume();
data->word = optionsGetMusicVolume();
break;
case MENUOP_SET:
optionsSetMusicVolume(*volume);
optionsSetMusicVolume(data->word);
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerSfxVolume(u32 operation, struct menuitem *item, u32 *volume)
s32 menuhandlerSfxVolume(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
if (g_SfxVolume > 0x5000) {
*volume = 0x5000;
data->word = 0x5000;
} else {
*volume = g_SfxVolume;
data->word = g_SfxVolume;
}
break;
case MENUOP_SET:
audioSetSfxVolume(*volume);
audioSetSfxVolume(data->word);
g_Vars.unk000458 |= 1;
}
@@ -840,7 +840,7 @@ char *soloMenuTitleStageOverview(struct menudialog *dialog)
return g_StringPointer;
}
s32 menudialog00103608(u32 operation, struct menudialog *dialog, struct menuthing **thingptr)
s32 menudialog00103608(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -883,7 +883,7 @@ f32 func0f1036ac(u8 value, s32 prop)
return func0f187770(value);
}
s32 menuhandlerPdModeSetting(u32 operation, struct menuitem *item, struct numandtext *value)
s32 menuhandlerPdModeSetting(u32 operation, struct menuitem *item, union handlerdata *data)
{
u8 *property;
f32 fvalue;
@@ -898,24 +898,24 @@ s32 menuhandlerPdModeSetting(u32 operation, struct menuitem *item, struct numand
switch (operation) {
case MENUOP_GETSLIDER:
value->num = *property;
data->word = *property;
break;
case MENUOP_SET:
*property = (u16)value->num;
*property = (u16)data->word;
break;
case MENUOP_GETSLIDERLABEL:
fvalue = func0f1036ac(*property, item->param);
if (item->param == 0) {
fvalue = fvalue * 4 + 1.0f;
}
sprintf(value->text, "%s%s%.00f%%\n", "", "", fvalue * 100.0f);
sprintf(data->ptrs[1], "%s%s%.00f%%\n", "", "", fvalue * 100.0f);
break;
}
return 0;
}
s32 menuhandlerAcceptPdModeSettings(s32 operation, struct menuitem *item, bool *value)
s32 menuhandlerAcceptPdModeSettings(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.pdmode = true;
@@ -1252,7 +1252,7 @@ glabel isStageDifficultyUnlocked
/* f103cec: 00000000 */ nop
);
s32 menuhandlerSoloDifficulty(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerSoloDifficulty(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKPREFOCUSED:
@@ -1281,7 +1281,7 @@ s32 menuhandlerSoloDifficulty(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerPdMode(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPdMode(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -1344,7 +1344,7 @@ const u32 var7f1b2d40[] = {0x57055706};
const u32 var7f1b2d44[] = {0x57075708};
const u32 var7f1b2d48[] = {0x57090000};
s32 menuhandlerBuddyOptionsContinue(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerBuddyOptionsContinue(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -1471,26 +1471,26 @@ glabel menudialogCoopAntiOptions
// return 0;
//}
s32 menuhandlerCoopRadar(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerCoopRadar(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return g_Vars.coopradaron;
case MENUOP_SET:
g_Vars.coopradaron = *enable ? 1 : 0;
g_Vars.coopradaron = data->word ? 1 : 0;
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerCoopFriendlyFire(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerCoopFriendlyFire(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return g_Vars.coopfriendlyfire;
case MENUOP_SET:
g_Vars.coopfriendlyfire = *enable ? 1 : 0;
g_Vars.coopfriendlyfire = data->word ? 1 : 0;
g_Vars.unk000458 |= 1;
}
@@ -1629,39 +1629,39 @@ struct menudialog g_CoopOptionsMenuDialog = {
NULL,
};
s32 menuhandlerAntiRadar(u32 operation, struct menuitem *item, bool *enable)
s32 menuhandlerAntiRadar(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return g_Vars.antiradaron;
case MENUOP_SET:
g_Vars.antiradaron = *enable ? 1 : 0;
g_Vars.antiradaron = data->word ? 1 : 0;
g_Vars.unk000458 |= 1;
}
return 0;
}
char *menuhandlerAntiPlayer(u32 operation, struct menudialog *dialog, s32 *value)
s32 menuhandlerAntiPlayer(u32 operation, struct menuitem *item, union handlerdata *data)
{
const u16 labels[] = {L_OPTIONS(271), L_OPTIONS(272)};
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(labels[*value]);
return (s32) langGet(labels[data->word]);
case MENUOP_SET:
g_Vars.pendingantiplayernum = *value;
g_Vars.pendingantiplayernum = data->word;
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = g_Vars.pendingantiplayernum;
data->word = g_Vars.pendingantiplayernum;
break;
}
return NULL;
return 0;
}
struct menuitem menuitems_counteroperativeoptions[] = {
@@ -1684,7 +1684,7 @@ struct menudialog g_AntiOptionsMenuDialog = {
const char var7f1b2d50[] = "\n";
s32 menuhandlerCoopDifficulty(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerCoopDifficulty(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -1721,7 +1721,7 @@ struct menudialog menudialog_selectdifficulty2 = {
NULL,
};
s32 menuhandlerAntiDifficulty(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerAntiDifficulty(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -2838,7 +2838,7 @@ glabel var7f1b2dfc
/* f105598: 00000000 */ nop
);
s32 menudialog0010559c(u32 operation, struct menudialog *dialog, s32 *arg2)
s32 menudialog0010559c(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -2846,7 +2846,7 @@ s32 menudialog0010559c(u32 operation, struct menudialog *dialog, s32 *arg2)
case MENUOP_CLOSE:
if ((g_Vars.unk000458 & 1) && g_Vars.coopplayernum < 0 && g_Vars.antiplayernum < 0) {
if (func0f1094e4(&var800a22c0, 1, 0) == 0) {
*arg2 = 1;
data->word = 1;
}
g_Vars.unk000458 &= ~0x00000001;
@@ -2901,36 +2901,36 @@ struct menudialog menudialog_18058 = {
char *func0f105664(struct menuitem *item)
{
s32 stack[4];
union handlerdata data;
menuhandler001024dc(MENUOP_GETOPTIONVALUE, item, stack);
menuhandler001024dc(MENUOP_GETOPTIONVALUE, item, &data);
return menuhandler001024dc(MENUOP_GETOPTIONTEXT, item, stack);
return (char *)menuhandler001024dc(MENUOP_GETOPTIONTEXT, item, &data);
}
char *func0f1056a0(struct menuitem *item)
{
s32 stack[4];
union handlerdata data;
menuhandler001024fc(MENUOP_GETOPTIONVALUE, item, stack);
menuhandler001024fc(MENUOP_GETOPTIONVALUE, item, &data);
return menuhandler001024fc(MENUOP_GETOPTIONTEXT, item, stack);
return (char *)menuhandler001024fc(MENUOP_GETOPTIONTEXT, item, &data);
}
s32 menuhandlerLangFilter(u32 operation, struct menuitem *item, u32 *enable)
s32 menuhandlerLangFilter(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return g_Vars.langfilteron;
case MENUOP_SET:
g_Vars.langfilteron = *enable;
g_Vars.langfilteron = data->word;
g_Vars.unk000458 |= 1;
}
return 0;
}
s32 menuhandlerControlStyle(s32 operation, struct menuitem *item, u32 *value)
s32 menuhandlerControlStyle(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (PLAYERCOUNT() >= 2) {
@@ -2943,7 +2943,7 @@ s32 menuhandlerControlStyle(s32 operation, struct menuitem *item, u32 *value)
return 0;
}
s32 menuhandler001057ec(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler001057ec(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f1094e4(&var800a22c0, 2, 0);
@@ -2952,7 +2952,7 @@ s32 menuhandler001057ec(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerChangeAgent(s32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerChangeAgent(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f820c(NULL, -7);
@@ -4097,7 +4097,7 @@ u32 var80073544 = 0;
// @dialog SoloAbort ----------------------------------------------------------/
//----------------------------------------------------------------------------/
s32 menuhandlerAbortMission(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerAbortMission(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.currentplayer->aborted = true;
@@ -4151,7 +4151,7 @@ struct menudialog g_SoloAbortShortMenuDialog = {
// @dialog SoloPauseStatus ----------------------------------------------------/
//----------------------------------------------------------------------------/
s32 soloMenuDialogPauseStatus(u32 operation, s32 arg1, s32 arg2)
s32 soloMenuDialogPauseStatus(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
struct objectivething *thing = var8009d0b4;
@@ -4342,7 +4342,7 @@ struct cutscenegroup {
u16 name;
};
char *menuhandlerCinema(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerCinema(u32 operation, struct menuitem *item, union handlerdata *data)
{
struct cutscenegroup groups[] = {
{ /* 0*/ 0, L_OPTIONS(436) }, // "Special"
@@ -4360,42 +4360,42 @@ char *menuhandlerCinema(u32 operation, struct menuitem *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = g_CutsceneIndexes[getNumCompletedMissions()] + 1;
data->word = g_CutsceneIndexes[getNumCompletedMissions()] + 1;
break;
case MENUOP_GETOPTIONTEXT:
if (*value == 0) {
if (data->word == 0) {
sprintf(g_StringPointer, langGet(L_OPTIONS(448))); // "Play All"
return g_StringPointer;
return (s32) g_StringPointer;
}
return langGet(g_Cutscenes[*value - 1].name);
return (s32) langGet(g_Cutscenes[data->word - 1].name);
case MENUOP_SET:
if (*value == 0) {
if (data->word == 0) {
s32 index = getNumCompletedMissions();
g_Vars.unk0004d4 = 0;
g_Vars.unk0004d5 = g_CutsceneIndexes[index];
menuPopDialog();
func0f01bea0();
} else {
g_Vars.unk0004d4 = *value - 1;
g_Vars.unk0004d4 = data->word - 1;
g_Vars.unk0004d5 = 1;
menuPopDialog();
func0f01bea0();
}
break;
case MENUOP_GETOPTIONVALUE:
*value = 0xfffff;
data->word = 0xfffff;
break;
case MENUOP_GETOPTGROUPCOUNT:
*value = ARRAYCOUNT(groups);
data->word = ARRAYCOUNT(groups);
break;
case MENUOP_GETOPTGROUPTEXT:
return langGet(groups[*value].name);
return (s32) langGet(groups[data->word].name);
case MENUOP_GETGROUPSTARTINDEX:
value[2] = groups[*value].first_cutscene_index;
data->words[2] = groups[data->words[0]].first_cutscene_index;
break;
}
return NULL;
return 0;
}
struct menuitem g_CinemaMenuItems[] = {
@@ -4434,7 +4434,7 @@ struct menudialog g_SelectMissionMenuDialog = {
// @dialog MainMenu -----------------------------------------------------------/
//----------------------------------------------------------------------------/
s32 menuhandlerMainMenuSoloMissions(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMainMenuSoloMissions(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.iscoop = false;
@@ -4451,7 +4451,7 @@ s32 menuhandlerMainMenuSoloMissions(u32 operation, struct menuitem *item, s32 *v
return 0;
}
s32 menuhandlerMainMenuCombatSimulator(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMainMenuCombatSimulator(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.bondplayernum = 0;
@@ -4466,7 +4466,7 @@ s32 menuhandlerMainMenuCombatSimulator(u32 operation, struct menuitem *item, s32
return 0;
}
s32 menuhandlerMainMenuCooperative(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMainMenuCooperative(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.iscoop = true;
@@ -4477,7 +4477,7 @@ s32 menuhandlerMainMenuCooperative(u32 operation, struct menuitem *item, s32 *va
return 0;
}
s32 menuhandlerMainMenuCounterOperative(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMainMenuCounterOperative(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if ((getConnectedControllers() & 2) == 0) {
@@ -4494,7 +4494,7 @@ s32 menuhandlerMainMenuCounterOperative(u32 operation, struct menuitem *item, s3
return 0;
}
bool menudialogMainMenu(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMainMenu(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
+23 -23
View File
@@ -102,7 +102,7 @@ char *getSaveLocationName(s32 index)
return NULL;
}
s32 menuhandler00108014(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler00108014(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if ((g_Menus[g_MpPlayerNum].unke3c & 0x7f) > 4) {
@@ -228,7 +228,7 @@ glabel func0f1080d0
/* f108250: 00000000 */ nop
);
s32 menuhandler00108254(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler00108254(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_Menus[g_MpPlayerNum].unke38 == 0) {
@@ -987,7 +987,7 @@ glabel var7f1b3664
/* f108bec: 00000000 */ nop
);
s32 menuhandlerPakErrorTryAgain(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakErrorTryAgain(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f109038(2);
@@ -1065,7 +1065,7 @@ glabel var7f1b3688
/* f108ccc: 00000000 */ nop
);
s32 menuhandlerPakCancelSave2(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakCancelSave2(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f33bc();
@@ -1094,7 +1094,7 @@ glabel func0f108d14
/* f108d44: 00000000 */ nop
);
s32 menuhandlerAcknowledgePakFileLost(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerAcknowledgePakFileLost(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f33bc();
@@ -1163,7 +1163,7 @@ glabel func0f108d8c
/* f108e54: 00000000 */ nop
);
bool menudialog00108e58(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialog00108e58(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curframe &&
@@ -1175,7 +1175,7 @@ bool menudialog00108e58(u32 operation, struct menudialog *dialog, struct menu *m
return false;
}
s32 menuhandler00108ecc(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler00108ecc(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f11c7a0();
@@ -1185,7 +1185,7 @@ s32 menuhandler00108ecc(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandler00108f08(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler00108f08(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_Menus[g_MpPlayerNum].unke42 < 100 && g_Menus[g_MpPlayerNum].unke42 != 1) {
@@ -2482,9 +2482,9 @@ glabel func0f109ec4
/* f10a0ac: 00000000 */ nop
);
s32 menuhandlerRenameFile(u32 operation, struct menuitem *item, char **value)
s32 menuhandlerRenameFile(u32 operation, struct menuitem *item, union handlerdata *data)
{
char *name = *value;
char *name = data->ptrs[0];
switch (operation) {
case MENUOP_GETTEXT:
@@ -2501,7 +2501,7 @@ s32 menuhandlerRenameFile(u32 operation, struct menuitem *item, char **value)
return 0;
}
s32 menuhandlerPakRenameDuplicateSave(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakRenameDuplicateSave(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -2511,7 +2511,7 @@ s32 menuhandlerPakRenameDuplicateSave(u32 operation, struct menuitem *item, s32
return 0;
}
s32 menuhandlerPakCancelDuplicateSave(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakCancelDuplicateSave(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -2676,7 +2676,7 @@ glabel func0f10a2ec
/* f10a3a0: 00000000 */ nop
);
s32 menuhandlerSaveLocation(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerSaveLocation(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (g_SaveLocations[g_Menus[g_MpPlayerNum].unke3f] == NULL) {
return 0;
@@ -2696,7 +2696,7 @@ s32 menuhandlerSaveLocation(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerPakCancelSave(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakCancelSave(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -2705,7 +2705,7 @@ s32 menuhandlerPakCancelSave(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerDeleteFiles(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerDeleteFiles(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f10b0c4(g_Menus[g_MpPlayerNum].unke3f);
@@ -2755,7 +2755,7 @@ glabel func0f10a51c
/* f10a5a8: 00000000 */ nop
);
s32 menuhandlerPakConfirmDelete(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakConfirmDelete(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -4214,7 +4214,7 @@ glabel func0f10b924
/* f10b970: 00000000 */ nop
);
s32 menuhandlerPakSelection(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerPakSelection(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if (pakIsConnected((s8)item->param) == 0) {
@@ -4316,7 +4316,7 @@ glabel menudialog0010ba10
/* f10bb34: 00000000 */ nop
);
s32 menuhandlerOpenCopyFile(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerOpenCopyFile(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Menus[g_MpPlayerNum].data.filesel.slotindex = item->param + 1;
@@ -4329,7 +4329,7 @@ s32 menuhandlerOpenCopyFile(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerOpenDeleteFile(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerOpenDeleteFile(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Menus[g_MpPlayerNum].data.filesel.slotindex = item->param + 1;
@@ -4341,9 +4341,9 @@ s32 menuhandlerOpenDeleteFile(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerAgentName(u32 operation, struct menuitem *item, char **value)
s32 menuhandlerAgentName(u32 operation, struct menuitem *item, union handlerdata *data)
{
char *ptr = *value;
char *name = data->ptrs[0];
if (!g_SaveLocations[0]) {
return 0;
@@ -4351,10 +4351,10 @@ s32 menuhandlerAgentName(u32 operation, struct menuitem *item, char **value)
switch (operation) {
case MENUOP_GETTEXT:
strcpy(ptr, g_SoloSaveFile.name);
strcpy(name, g_SoloSaveFile.name);
break;
case MENUOP_SETTEXT:
strcpy(g_SoloSaveFile.name, ptr);
strcpy(g_SoloSaveFile.name, name);
break;
case MENUOP_SET:
func0f10a51c(0, 0);
+5 -5
View File
@@ -14,7 +14,7 @@
#include "gvars/gvars.h"
#include "types.h"
s32 menuhandler4MbDropOut(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler4MbDropOut(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -28,7 +28,7 @@ s32 menuhandler4MbDropOut(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandler0010ca1c(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler0010ca1c(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_Vars.stagenum == STAGE_4MBMENU) {
@@ -41,7 +41,7 @@ s32 menuhandler0010ca1c(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandler4MbAdvancedSetup(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler4MbAdvancedSetup(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f820c(&g_4MbAdvancedSetupMenuDialog, MENUROOT_4MBMAINMENU);
@@ -50,7 +50,7 @@ s32 menuhandler4MbAdvancedSetup(u32 operation, struct menuitem *item, s32 *value
return 0;
}
s32 menuhandler0010cabc(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler0010cabc(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
mpSetCurrentChallenge(g_Menus[g_MpPlayerNum].data.main4mb.slotindex);
@@ -90,7 +90,7 @@ void func0f10cb2c(void)
g_MpPlayerNum = prevplayernum;
}
bool menudialog4MbMainMenu(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialog4MbMainMenu(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Vars.unk000494[0] = 0;
+1 -1
View File
@@ -222,7 +222,7 @@ s32 menuhandlerMpInGameLimitLabel(u32 operation, struct menuitem *item, s32 *val
return 0;
}
s32 menuhandlerMpPause(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpPause(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (mpIsPaused()) {
+143 -143
View File
@@ -85,7 +85,7 @@ const char var7f1b8030[] = "";
const char var7f1b8034[] = "";
const char var7f1b8038[] = "%d:\n";
s32 menuhandlerMpDropOut(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpDropOut(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -109,7 +109,7 @@ glabel mpGetCurrentPlayerName
/* f1790c0: 01f81021 */ addu $v0,$t7,$t8
);
s32 menuhandlerMpTeamsLabel(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpTeamsLabel(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if ((g_MpSetup.options & MPOPTION_TEAMSENABLED) == 0) {
@@ -378,40 +378,40 @@ glabel var7f1b8074
/* f1794b0: 27bd0058 */ addiu $sp,$sp,0x58
);
char *menuhandlerMpControlStyle(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpControlStyle(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 labels[4] = g_MpControlStyleLabels;
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 4;
data->word = 4;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(labels[*value]);
return (s32) langGet(labels[data->word]);
case MENUOP_SET:
optionsSetControlMode(g_MpPlayerNum, *value);
optionsSetControlMode(g_MpPlayerNum, data->word);
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetControlMode(g_MpPlayerNum);
data->word = optionsGetControlMode(g_MpPlayerNum);
break;
}
return NULL;
return 0;
}
char *menuhandlerMpWeaponSlot(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpWeaponSlot(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = mpGetNumWeaponOptions();
data->word = mpGetNumWeaponOptions();
break;
case MENUOP_GETOPTIONTEXT:
return mpGetWeaponLabel(*value);
return (s32) mpGetWeaponLabel(data->word);
case MENUOP_SET:
mpSetWeaponSlot(item->param3, *value);
mpSetWeaponSlot(item->param3, data->word);
break;
case MENUOP_GETOPTIONVALUE:
*value = mpGetWeaponSlot(item->param3);
data->word = mpGetWeaponSlot(item->param3);
}
return 0;
@@ -422,26 +422,26 @@ char *mpMenuTextWeaponNameForSlot(struct menuitem *item)
return mpGetWeaponLabel(mpGetWeaponSlot(item->param));
}
char *menuhandlerMpWeaponSetDropdown(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpWeaponSetDropdown(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = func0f189058(item->param);
data->word = func0f189058(item->param);
break;
case MENUOP_GETOPTIONTEXT:
return mpGetWeaponSetName(*value);
return (s32) mpGetWeaponSetName(data->word);
case MENUOP_SET:
mpSetWeaponSet(*value);
mpSetWeaponSet(data->word);
break;
case MENUOP_GETOPTIONVALUE:
*value = mpGetWeaponSet();
data->word = mpGetWeaponSet();
break;
}
return NULL;
return 0;
}
s32 menuhandlerMpControlCheckbox(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpControlCheckbox(u32 operation, struct menuitem *item, union handlerdata *data)
{
u32 val;
@@ -461,16 +461,16 @@ s32 menuhandlerMpControlCheckbox(u32 operation, struct menuitem *item, s32 *valu
val = OPTION_FORWARDPITCH;
if (item->param3 == val) {
if (*value == 0) {
*value = val;
if (data->word == 0) {
data->word = val;
} else {
*value = 0;
data->word = 0;
}
}
g_MpPlayers[g_MpPlayerNum].options &= ~item->param3;
if (*value) {
if (data->word) {
g_MpPlayers[g_MpPlayerNum].options |= item->param3;
}
}
@@ -478,28 +478,28 @@ s32 menuhandlerMpControlCheckbox(u32 operation, struct menuitem *item, s32 *valu
return 0;
}
char *menuhandlerMpAimControl(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpAimControl(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 labels[2] = g_MpAimModeLabels;
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
return langGet(labels[*value]);
return (s32) langGet(labels[data->word]);
case MENUOP_SET:
optionsSetAimControl(g_MpPlayerNum, *value);
optionsSetAimControl(g_MpPlayerNum, data->word);
break;
case MENUOP_GETOPTIONVALUE:
*value = optionsGetAimControl(g_MpPlayerNum);
data->word = optionsGetAimControl(g_MpPlayerNum);
break;
}
return NULL;
return 0;
}
s32 menuhandlerMpCheckboxOption(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpCheckboxOption(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -509,7 +509,7 @@ s32 menuhandlerMpCheckboxOption(u32 operation, struct menuitem *item, s32 *value
return true;
case MENUOP_SET:
g_MpSetup.options = g_MpSetup.options & ~item->param3;
if (*value) {
if (data->word) {
g_MpSetup.options = g_MpSetup.options | item->param3;
}
}
@@ -517,7 +517,7 @@ s32 menuhandlerMpCheckboxOption(u32 operation, struct menuitem *item, s32 *value
return 0;
}
s32 menuhandlerMpTeamsEnabled(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpTeamsEnabled(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if (g_MpSetup.scenario == MPSCENARIO_CAPTURETHECASE ||
@@ -528,10 +528,10 @@ s32 menuhandlerMpTeamsEnabled(u32 operation, struct menuitem *item, s32 *value)
return false;
}
return menuhandlerMpCheckboxOption(operation, item, value);
return menuhandlerMpCheckboxOption(operation, item, data);
}
s32 menuhandlerMpDisplayOptionCheckbox(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpDisplayOptionCheckbox(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -542,7 +542,7 @@ s32 menuhandlerMpDisplayOptionCheckbox(u32 operation, struct menuitem *item, s32
case MENUOP_SET:
g_MpPlayers[g_MpPlayerNum].base.displayoptions &= ~(u8)item->param3;
if (*value) {
if (data->word) {
g_MpPlayers[g_MpPlayerNum].base.displayoptions |= (u8)item->param3;
}
break;
@@ -551,7 +551,7 @@ s32 menuhandlerMpDisplayOptionCheckbox(u32 operation, struct menuitem *item, s32
return 0;
}
s32 menuhandlerMpConfirmSaveChr(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpConfirmSaveChr(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -561,16 +561,16 @@ s32 menuhandlerMpConfirmSaveChr(u32 operation, struct menuitem *item, s32 *value
return 0;
}
s32 menuhandlerMpPlayerName(u32 operation, struct menuitem *item, char **value)
s32 menuhandlerMpPlayerName(u32 operation, struct menuitem *item, union handlerdata *data)
{
char *ptr = *value;
char *name = data->ptrs[0];
switch (operation) {
case MENUOP_GETTEXT:
strcpy(ptr, g_MpSetup.name);
strcpy(name, g_MpSetup.name);
break;
case MENUOP_SETTEXT:
strcpy(g_MpSetup.name, ptr);
strcpy(g_MpSetup.name, name);
break;
case MENUOP_SET:
func0f10a51c(7, 1);
@@ -580,7 +580,7 @@ s32 menuhandlerMpPlayerName(u32 operation, struct menuitem *item, char **value)
return 0;
}
s32 menuhandlerMpSaveSetupOverwrite(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSaveSetupOverwrite(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -590,7 +590,7 @@ s32 menuhandlerMpSaveSetupOverwrite(u32 operation, struct menuitem *item, s32 *v
return 0;
}
s32 menuhandlerMpSaveSetupCopy(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSaveSetupCopy(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -992,26 +992,26 @@ glabel var7f1b80dc
/* f17a024: 00000000 */ nop
);
s32 menuhandlerMpCharacterBody(u32 operation, struct menuitem *item, struct numandtext *value)
s32 menuhandlerMpCharacterBody(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
if (g_MpPlayers[g_MpPlayerNum].base.headnum < mpGetNumHeads()) {
if (!value->text) {
g_MpPlayers[g_MpPlayerNum].base.headnum = mpBodyGetMpHeadIndex(value->num);
if (!data->words[1]) {
g_MpPlayers[g_MpPlayerNum].base.headnum = mpBodyGetMpHeadIndex(data->word);
}
}
g_MpPlayers[g_MpPlayerNum].base.bodynum = value->num;
g_MpPlayers[g_MpPlayerNum].base.bodynum = data->word;
func0f17b8f0();
break;
case MENUOP_CHECKPREFOCUSED:
func0f179da4(operation, item, &value->num,
func0f179da4(operation, item, data,
g_MpPlayers[g_MpPlayerNum].base.bodynum,
g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
return true;
}
return func0f179da4(operation, item, &value->num,
return func0f179da4(operation, item, data,
g_MpPlayers[g_MpPlayerNum].base.bodynum,
g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
}
@@ -2335,7 +2335,7 @@ glabel func0f17b360
/* f17b3b4: 27bd0018 */ addiu $sp,$sp,0x18
);
s32 menuhandlerMpUsernamePassword(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpUsernamePassword(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpPlayers[g_MpPlayerNum].title != MPPLAYERTITLE_PERFECT) {
@@ -2682,13 +2682,13 @@ glabel var7f1b814c
/* f17b83c: 00000000 */ nop
);
s32 menuhandlerMpCharacterHead(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpCharacterHead(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MpPlayers[g_MpPlayerNum].base.headnum = *value;
g_MpPlayers[g_MpPlayerNum].base.headnum = data->word;
}
return func0f17b4f8(operation, item, value, g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
return func0f17b4f8(operation, item, data, g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
}
char *mpMenuTextBodyName(struct menuitem *item)
@@ -3357,66 +3357,66 @@ glabel var7f1b81a8
/* f17c1a0: 27bd0050 */ addiu $sp,$sp,0x50
);
s32 menuhandlerMpTimeLimitSlider(u32 operation, struct menuitem *item, struct numandtext *value)
s32 menuhandlerMpTimeLimitSlider(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
value->num = g_MpSetup.timelimit;
data->word = g_MpSetup.timelimit;
break;
case MENUOP_SET:
g_MpSetup.timelimit = value->num;
g_MpSetup.timelimit = data->word;
break;
case MENUOP_GETSLIDERLABEL:
if (value->num == 60) {
sprintf(value->text, langGet(L_MPMENU(112))); // "No Limit"
if (data->word == 60) {
sprintf(data->ptrs[1], langGet(L_MPMENU(112))); // "No Limit"
} else {
sprintf(value->text, langGet(L_MPMENU(114)), value->num + 1); // "%d Min"
sprintf(data->ptrs[1], langGet(L_MPMENU(114)), data->word + 1); // "%d Min"
}
}
return 0;
}
s32 menuhandlerMpScoreLimitSlider(u32 operation, struct menuitem *item, struct numandtext *value)
s32 menuhandlerMpScoreLimitSlider(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
value->num = g_MpSetup.scorelimit;
data->word = g_MpSetup.scorelimit;
break;
case MENUOP_SET:
g_MpSetup.scorelimit = value->num;
g_MpSetup.scorelimit = data->word;
break;
case MENUOP_GETSLIDERLABEL:
if (value->num == 100) {
sprintf(value->text, langGet(L_MPMENU(112))); // "No Limit"
if (data->word == 100) {
sprintf(data->ptrs[1], langGet(L_MPMENU(112))); // "No Limit"
} else {
sprintf(value->text, langGet(L_MPMENU(113)), value->num + 1); // "%d"
sprintf(data->ptrs[1], langGet(L_MPMENU(113)), data->word + 1); // "%d"
}
}
return 0;
}
s32 menuhandlerMpTeamScoreLimitSlider(u32 operation, struct menuitem *item, struct numandtext *value)
s32 menuhandlerMpTeamScoreLimitSlider(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
value->num = func0f18844c();
data->word = func0f18844c();
break;
case MENUOP_SET:
g_MpSetup.teamscorelimit = value->num;
g_MpSetup.teamscorelimit = data->word;
break;
case MENUOP_GETSLIDERLABEL:
if (value->num == 400) {
sprintf(value->text, langGet(L_MPMENU(112))); // "No Limit"
if (data->word == 400) {
sprintf(data->ptrs[1], langGet(L_MPMENU(112))); // "No Limit"
} else {
sprintf(value->text, langGet(L_MPMENU(113)), value->num + 1); // "%d"
sprintf(data->ptrs[1], langGet(L_MPMENU(113)), data->word + 1); // "%d"
}
}
return 0;
}
s32 menuhandlerMpRestoreScoreDefaults(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpRestoreScoreDefaults(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f187fec();
@@ -3523,7 +3523,7 @@ glabel func0f17c524
/* f17c568: 00000000 */ nop
);
s32 menuhandlerMpRestoreHandicapDefaults(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpRestoreHandicapDefaults(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
s32 i;
@@ -3536,7 +3536,7 @@ s32 menuhandlerMpRestoreHandicapDefaults(u32 operation, struct menuitem *item, s
return 0;
}
bool menudialogMpReady(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpReady(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
if (g_MpPlayers[g_MpPlayerNum].saved && g_MpPlayers[g_MpPlayerNum].unk50) {
@@ -3547,7 +3547,7 @@ bool menudialogMpReady(u32 operation, struct menudialog *dialog, struct menu *me
return false;
}
bool menudialogMpSimulant(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpSimulant(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if ((u8)g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.name[0] == '\0') {
@@ -3852,7 +3852,7 @@ char *mpMenuTextSimulantDescription(struct menuitem *item)
return langGet(L_MISC(106) + g_Menus[g_MpPlayerNum].data.mpsetup.unke24);
}
s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, union handlerdata *data)
{
s32 start = 0;
@@ -3867,7 +3867,7 @@ s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, s32 *value)
*/
switch (operation) {
case MENUOP_SET:
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum = start + *value;
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum = start + data->word;
case MENUOP_13:
if (operation == MENUOP_13 && item->param2 == 1 && g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum < start) {
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum = start;
@@ -3875,16 +3875,16 @@ s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, s32 *value)
break;
}
return func0f17b4f8(operation, item, value, g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum, 0);
return func0f17b4f8(operation, item, data, g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum, 0);
}
s32 menuhandlerMpSimulantBody(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSimulantBody(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.bodynum = *value;
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.bodynum = data->word;
}
return func0f179da4(operation, item, value,
return func0f179da4(operation, item, data,
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.bodynum,
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum,
0);
@@ -4064,7 +4064,7 @@ glabel menuhandlerMpSimulantDifficulty
/* f17cf54: 27bd0030 */ addiu $sp,$sp,0x30
);
s32 menuhandlerMpDeleteSimulant(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpDeleteSimulant(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
mpRemoveSimulant(g_Menus[g_MpPlayerNum].data.mpsetup.slotindex);
@@ -4111,7 +4111,7 @@ glabel func0f17cfc0
/* f17d040: 27bd0018 */ addiu $sp,$sp,0x18
);
s32 menuhandlerMpChangeSimulantType(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpChangeSimulantType(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
s32 i;
@@ -4134,7 +4134,7 @@ s32 menuhandlerMpChangeSimulantType(u32 operation, struct menuitem *item, s32 *v
return 0;
}
s32 menuhandlerMpClearAllSimulants(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpClearAllSimulants(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
s32 i;
@@ -4146,7 +4146,7 @@ s32 menuhandlerMpClearAllSimulants(u32 operation, struct menuitem *item, s32 *va
return 0;
}
s32 menuhandlerMpAddSimulant(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpAddSimulant(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -4162,7 +4162,7 @@ s32 menuhandlerMpAddSimulant(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerMpSimulantSlot(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSimulantSlot(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -4259,7 +4259,7 @@ glabel func0f17d378
/* f17d464: 00000000 */ nop
);
bool menudialogMpSimulants(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpSimulants(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Menus[g_MpPlayerNum].data.mpsetup.slotcount = 0;
@@ -4468,22 +4468,22 @@ glabel func0f17d4b0
/* f17d75c: 27bd0078 */ addiu $sp,$sp,0x78
);
s32 menuhandlerMpTwoTeams(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpTwoTeams(u32 operation, struct menuitem *item, union handlerdata *data)
{
return func0f17d4b0(operation, item, value, 2);
return func0f17d4b0(operation, item, data, 2);
}
s32 menuhandlerMpThreeTeams(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpThreeTeams(u32 operation, struct menuitem *item, union handlerdata *data)
{
return func0f17d4b0(operation, item, value, 3);
return func0f17d4b0(operation, item, data, 3);
}
s32 menuhandlerMpFourTeams(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpFourTeams(u32 operation, struct menuitem *item, union handlerdata *data)
{
return func0f17d4b0(operation, item, value, 4);
return func0f17d4b0(operation, item, data, 4);
}
s32 menuhandlerMpMaximumTeams(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpMaximumTeams(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
s32 i;
@@ -4513,7 +4513,7 @@ s32 menuhandlerMpMaximumTeams(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerMpHumansVsSimulants(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpHumansVsSimulants(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
s32 i;
@@ -4538,7 +4538,7 @@ s32 menuhandlerMpHumansVsSimulants(u32 operation, struct menuitem *item, s32 *va
return 0;
}
s32 menuhandlerMpHumanSimulantPairs(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpHumanSimulantPairs(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
u8 team_ids[4] = g_TeamIdsForPairing; // literally {0, 1, 2, 3}
@@ -4634,22 +4634,22 @@ glabel func0f17dac4
/* f17db58: 00000000 */ nop
);
char *menuhandlerMpTeamSlot(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpTeamSlot(u32 operation, struct menuitem *item, union handlerdata *data)
{
struct mpchr *mpchr;
switch (operation) {
case MENUOP_SET:
mpchr = func0f18c794(item->param);
mpchr->team = *value;
mpchr->team = data->word;
break;
case MENUOP_GETOPTIONVALUE:
mpchr = func0f18c794(item->param);
if (!mpchr) {
*value = 0xff;
data->word = 0xff;
} else {
*value = mpchr->team;
data->word = mpchr->team;
}
break;
@@ -4657,13 +4657,13 @@ char *menuhandlerMpTeamSlot(u32 operation, struct menuitem *item, s32 *value)
mpchr = func0f18c794(item->param);
if (!mpchr) {
return (char *)true;
return 1;
}
return (char *)menuhandlerMpTeamsLabel(operation, item, value);
return menuhandlerMpTeamsLabel(operation, item, data);
}
return func0f17dac4(operation, item, value);
return func0f17dac4(operation, item, data);
}
char *mpMenuTextSelectTuneOrTunes(struct menuitem *item)
@@ -4915,7 +4915,7 @@ glabel var7f1b8228
/* f17df70: 00000000 */ nop
);
bool menudialogMpSelectTune(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpSelectTune(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
var800840e0 = 80;
@@ -4945,13 +4945,13 @@ char *mpMenuTextCurrentTrack(struct menuitem *item)
return langGet(L_MPMENU(67)); // "Random"
}
s32 menuhandlerMpMultipleTunes(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpMultipleTunes(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
return mpGetUsingMultipleTunes();
case MENUOP_SET:
mpSetUsingMultipleTunes(*value);
mpSetUsingMultipleTunes(data->word);
g_Vars.unk000458 |= 2;
}
@@ -5121,7 +5121,7 @@ glabel func0f17e288
/* f17e2a8: 01cf1021 */ addu $v0,$t6,$t7
);
s32 menuhandlerMpTeamNameSlot(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpTeamNameSlot(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Menus[g_MpPlayerNum].data.mpsetup.slotindex = item->param2 - 0x5608;
@@ -5167,7 +5167,7 @@ glabel func0f17e318
/**
* An "Accept" item somewhere. Probably accepting a challenge.
*/
s32 menuhandler0017e38c(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler0017e38c(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
mpClearCurrentChallenge();
@@ -5631,7 +5631,7 @@ glabel var7f1b8288
* This is for a separator and fixed height thing in the dialog at:
* Combat Simulator > Advanced Setup > Challenges > pick one > Accept
*/
s32 menuhandler0017e9d8(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler0017e9d8(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupSaveFile.locktype != MPLOCKTYPE_CHALLENGE) {
@@ -5642,7 +5642,7 @@ s32 menuhandler0017e9d8(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerMpAbortChallenge(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpAbortChallenge(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupSaveFile.locktype != MPLOCKTYPE_CHALLENGE) {
@@ -5657,7 +5657,7 @@ s32 menuhandlerMpAbortChallenge(u32 operation, struct menuitem *item, s32 *value
return 0;
}
s32 menuhandlerMpStartChallenge(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpStartChallenge(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupSaveFile.locktype != MPLOCKTYPE_CHALLENGE) {
@@ -5764,7 +5764,7 @@ glabel menudialog0017eb34
/* f17ec60: 00000000 */ nop
);
s32 menuhandler0017ec64(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler0017ec64(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
mpSetCurrentChallenge(g_Menus[g_MpPlayerNum].data.mpsetup.slotindex);
@@ -5774,48 +5774,48 @@ s32 menuhandler0017ec64(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
char *menuhandlerMpLock(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpLock(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 labels[4] = mplockoptions;
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
if (mpGetLockType() == MPLOCKTYPE_CHALLENGE) {
*value = 1;
data->word = 1;
} else {
*value = 5;
data->word = 5;
}
break;
case MENUOP_GETOPTIONTEXT:
if (mpGetLockType() == MPLOCKTYPE_CHALLENGE) {
return langGet(L_MPMENU(49)); // "Challenge"
return (s32) langGet(L_MPMENU(49)); // "Challenge"
}
if ((u32)*value <= 3) {
return langGet(labels[*value]);
if ((u32)data->word <= 3) {
return (s32) langGet(labels[data->word]);
}
if (mpGetLockType() == MPLOCKTYPE_PLAYER) {
return g_MpPlayers[mpGetLockPlayerNum()].base.name;
return (s32) g_MpPlayers[mpGetLockPlayerNum()].base.name;
}
return mpGetCurrentPlayerName(item);
return (s32) mpGetCurrentPlayerName(item);
case MENUOP_SET:
if (mpGetLockType() != MPLOCKTYPE_CHALLENGE) {
mpSetLock(*value, g_MpPlayerNum);
mpSetLock(data->word, g_MpPlayerNum);
}
g_Vars.unk000458 |= 2;
break;
case MENUOP_GETOPTIONVALUE:
if (mpGetLockType() == MPLOCKTYPE_CHALLENGE) {
*value = 0;
data->word = 0;
} else {
*value = mpGetLockType();
data->word = mpGetLockType();
}
break;
}
return NULL;
return 0;
}
s32 menuhandlerMpSavePlayer(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSavePlayer(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_MpPlayers[g_MpPlayerNum].saved == false) {
@@ -5837,7 +5837,7 @@ char *mpMenuTextSavePlayerOrCopy(struct menuitem *item)
return langGet(L_MPMENU(39)); // "Save Copy of Player"
}
s32 menuhandler0017ef30(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler0017ef30(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_Vars.stagenum == STAGE_CITRAINING) {
@@ -5854,7 +5854,7 @@ s32 menuhandler0017ef30(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerMpSaveSettings(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSaveSettings(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_MpSetup.saved == false) {
@@ -5886,7 +5886,7 @@ char *mpMenuTextWeaponSetName(struct menuitem *item)
return mpGetWeaponSetName(mpGetWeaponSet());
}
bool menudialogMpGameSetup(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpGameSetup(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Vars.unk000490 = 1;
@@ -5896,7 +5896,7 @@ bool menudialogMpGameSetup(u32 operation, struct menudialog *dialog, struct menu
return false;
}
bool menudialogMpQuickGo(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogMpQuickGo(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Vars.unk000490 = 3;
@@ -6210,7 +6210,7 @@ glabel func0f17f428
/* f17f47c: 00000000 */ nop
);
s32 menuhandlerMpFinishedSetup(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpFinishedSetup(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKPREFOCUSED) {
return true;
@@ -6223,7 +6223,7 @@ s32 menuhandlerMpFinishedSetup(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandlerQuickTeamSeparator(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerQuickTeamSeparator(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_Vars.mpquickteam == MPQUICKTEAM_PLAYERSONLY) {
@@ -6336,24 +6336,24 @@ glabel var7f1b8310
// return 0;
//}
u32 menuhandlerMpNumberOfSimulants(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpNumberOfSimulants(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
if (!mpIsChallengeComplete(CHALLENGE_UNK64)) {
*value = 4;
data->word = 4;
} else {
*value = 8;
data->word = 8;
}
break;
case MENUOP_GETOPTIONTEXT:
sprintf(g_StringPointer, "%d\n", *value + 1);
sprintf(g_StringPointer, "%d\n", data->word + 1);
return (u32)g_StringPointer;
case MENUOP_SET:
g_Vars.mpquickteamnumsims = *value + 1;
g_Vars.mpquickteamnumsims = data->word + 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = g_Vars.mpquickteamnumsims - 1;
data->word = g_Vars.mpquickteamnumsims - 1;
break;
case MENUOP_CHECKHIDDEN:
if (g_Vars.mpquickteam != MPQUICKTEAM_PLAYERSANDSIMS && g_Vars.mpquickteam != MPQUICKTEAM_PLAYERSVSSIMS) {
@@ -6365,20 +6365,20 @@ u32 menuhandlerMpNumberOfSimulants(u32 operation, struct menuitem *item, s32 *va
return 0;
}
u32 menuhandlerMpSimulantsPerTeam(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpSimulantsPerTeam(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTIONTEXT:
sprintf(g_StringPointer, "%d\n", *value + 1);
sprintf(g_StringPointer, "%d\n", data->word + 1);
return (u32)g_StringPointer;
case MENUOP_SET:
g_Vars.unk0004a0 = *value + 1;
g_Vars.unk0004a0 = data->word + 1;
break;
case MENUOP_GETOPTIONVALUE:
*value = g_Vars.unk0004a0 - 1;
data->word = g_Vars.unk0004a0 - 1;
break;
case MENUOP_CHECKHIDDEN:
if (g_Vars.mpquickteam != MPQUICKTEAM_PLAYERSIMTEAMS) {
@@ -6533,7 +6533,7 @@ glabel var7f1b8430
/* f17f88c: 27bd0030 */ addiu $sp,$sp,0x30
);
s32 menuhandlerMpQuickTeamOption(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpQuickTeamOption(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.mpquickteam = item->param;
+11 -11
View File
@@ -73,7 +73,7 @@ const char var7f1b8878[] = "PopACapReset -> Done\n";
const char var7f1b8890[] = "PopACapTick : Current Victim = %d (Player %d)\n";
const char var7f1b88c0[] = "%d:%02d";
bool menudialogCombatSimulator(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogCombatSimulator(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Vars.unk000494[0] = 0;
@@ -95,7 +95,7 @@ bool menudialogCombatSimulator(u32 operation, struct menudialog *dialog, struct
return false;
}
s32 menuhandlerMpAdvancedSetup(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpAdvancedSetup(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f820c(&menudialog_mpgamesetup3, 3);
@@ -312,7 +312,7 @@ void func0f17fcb0(s32 silent)
}
}
s32 menuhandlerMpDisplayTeam(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpDisplayTeam(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if (g_MpSetup.options & MPOPTION_TEAMSENABLED) {
@@ -322,10 +322,10 @@ s32 menuhandlerMpDisplayTeam(u32 operation, struct menuitem *item, s32 *value)
return true;
}
return menuhandlerMpCheckboxOption(operation, item, value);
return menuhandlerMpCheckboxOption(operation, item, data);
}
s32 menuhandlerMpOneHitKills(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpOneHitKills(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED || operation == MENUOP_CHECKHIDDEN) {
if (mpIsChallengeComplete(CHALLENGE_7)) {
@@ -335,7 +335,7 @@ s32 menuhandlerMpOneHitKills(u32 operation, struct menuitem *item, s32 *value)
return true;
}
return menuhandlerMpCheckboxOption(operation, item, value);
return menuhandlerMpCheckboxOption(operation, item, data);
}
GLOBAL_ASM(
@@ -1769,17 +1769,17 @@ glabel scenarioCtcCallback38
/* f181a94: 00000000 */ nop
);
s32 menuhandlerMpHillTime(u32 operation, struct menuitem *item, struct numandtext *value)
s32 menuhandlerMpHillTime(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
value->num = g_Vars.mphilltime;
data->word = g_Vars.mphilltime;
break;
case MENUOP_SET:
g_Vars.mphilltime = (u8)value->num;
g_Vars.mphilltime = (u8)data->word;
break;
case MENUOP_GETSLIDERLABEL:
sprintf(value->text, langGet(L_MPWEAPONS(23)), value->num + 10); // "%ds/Point"
sprintf(data->ptrs[1], langGet(L_MPWEAPONS(23)), data->word + 10); // "%ds/Point"
break;
}
@@ -5437,7 +5437,7 @@ glabel var7f1b897c
/* f18537c: 27bd0050 */ addiu $sp,$sp,0x50
);
s32 menuhandlerMpOpenOptions(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerMpOpenOptions(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPushDialog(g_MpScenarios[g_MpSetup.scenario].optionsdialog);
+61 -61
View File
@@ -33,7 +33,7 @@
#include "lib/lib_1a500.h"
#include "types.h"
s32 frDetailsOkMenuHandler(u32 operation, struct menuitem *item, s32 *value)
s32 frDetailsOkMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
s32 i;
@@ -75,7 +75,7 @@ s32 frDetailsOkMenuHandler(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 frAbortMenuHandler(u32 operation, struct menuitem *item, s32 *value)
s32 frAbortMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (frIsInTraining()) {
@@ -567,7 +567,7 @@ glabel var7f1b9944
/* f1a3af0: 00000000 */ nop
);
s32 frTrainingStatsMenuDialog(u32 operation, u32 arg1, u32 *arg2)
s32 frTrainingStatsMenuDialog(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
if (frIsInTraining() == false) {
@@ -582,7 +582,7 @@ s32 frTrainingStatsMenuDialog(u32 operation, u32 arg1, u32 *arg2)
* This is an unused menu handler which implements the difficulty selection
* using a dropdown.
*/
char *frDifficultyDropdownMenuHandler(u32 operation, struct menuitem *item, u32 *value)
s32 frDifficultyDropdownMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
u16 names[] = {
L_MPMENU(439), // "Bronze"
@@ -592,27 +592,27 @@ char *frDifficultyDropdownMenuHandler(u32 operation, struct menuitem *item, u32
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = ciGetFiringRangeScore(frGetSlot()) + 1;
data->word = ciGetFiringRangeScore(frGetSlot()) + 1;
if (*value > 3) {
*value = 3;
if ((u32)data->word > 3) {
data->word = 3;
}
break;
case MENUOP_GETOPTIONTEXT:
return langGet(names[*value]);
return (s32) langGet(names[data->word]);
case MENUOP_SET:
frSetDifficulty(*value);
frSetDifficulty(data->word);
menuPushDialog(&menudialog_frtraininginfo2);
break;
case MENUOP_GETOPTIONVALUE:
*value = frGetDifficulty();
data->word = frGetDifficulty();
break;
}
return NULL;
return 0;
}
s32 frDifficultyMenuHandler(u32 operation, struct menuitem *item, s32 *value)
s32 frDifficultyMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
@@ -2500,7 +2500,7 @@ glabel menuhandler001a44c0
/* f1a5d58: 00000000 */ nop
);
s32 menuhandlerFrFailedContinue(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerFrFailedContinue(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_Vars.currentplayer->prop->rooms[0] == 0xa) {
@@ -2642,7 +2642,7 @@ struct menudialog g_MenuDialogFrTrainingStatsFailed = {
NULL,
};
char *ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, u32 *value)
s32 ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
struct optiongroup groups[2] = {
{ 0, L_MPMENU(421) }, // "Character Profiles"
@@ -2658,19 +2658,19 @@ char *ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, u32 *
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = numunlockedchrbios + numunlockedmiscbios;
data->word = numunlockedchrbios + numunlockedmiscbios;
break;
case MENUOP_GETOPTIONTEXT:
if (*value < numunlockedchrbios) {
chrbio = ciGetChrBioByBodynum(ciGetChrBioIndexBySlot(*value));
return langGet(chrbio->name);
if ((u32)data->words[0] < numunlockedchrbios) {
chrbio = ciGetChrBioByBodynum(ciGetChrBioIndexBySlot((u32)data->words[0]));
return (s32) langGet(chrbio->name);
} else {
miscbio = ciGetMiscBio(ciGetMiscBioIndexBySlot(*value - numunlockedchrbios));
return langGet(miscbio->name);
miscbio = ciGetMiscBio(ciGetMiscBioIndexBySlot((u32)data->words[0] - numunlockedchrbios));
return (s32) langGet(miscbio->name);
}
break;
case MENUOP_SET:
var800888a0 = *value;
var800888a0 = data->word;
if (var800888a0 < numunlockedchrbios) {
menuPushDialog(&menudialog_characterprofile);
} else {
@@ -2678,19 +2678,19 @@ char *ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, u32 *
}
break;
case MENUOP_GETOPTIONVALUE:
*value = var800888a0;
data->word = var800888a0;
break;
case MENUOP_GETOPTGROUPCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTGROUPTEXT:
return langGet(groups[*value].name);
return (s32) langGet(groups[data->word].name);
case MENUOP_GETGROUPSTARTINDEX:
value[2] = *value == 0 ? 0 : numunlockedchrbios;
data->words[2] = data->word == 0 ? 0 : numunlockedchrbios;
break;
}
return NULL;
return 0;
}
GLOBAL_ASM(
@@ -2984,32 +2984,32 @@ char *ciMenuTextMiscBioName(struct menuitem *item)
return g_StringPointer;
}
char *dtDeviceListMenuHandler(u32 operation, struct menuitem *item, s32 *value)
s32 dtDeviceListMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = dtGetNumAvailable();
data->word = dtGetNumAvailable();
break;
case MENUOP_GETOPTIONTEXT:
return weaponGetName(dtGetWeaponByDeviceIndex(dtGetIndexBySlot(*value)));
return (s32) weaponGetName(dtGetWeaponByDeviceIndex(dtGetIndexBySlot(data->word)));
case MENUOP_SET:
g_DtSlot = *value;
g_DtSlot = data->word;
menuPushDialog(&g_DeviceTrainingDetailsMenuDialog);
break;
case MENUOP_GETOPTIONVALUE:
*value = g_DtSlot;
data->word = g_DtSlot;
break;
case MENUOP_GETOPTGROUPCOUNT:
*value = 0;
data->word = 0;
break;
case MENUOP_GETOPTGROUPTEXT:
return NULL;
return 0;
case MENUOP_GETGROUPSTARTINDEX:
value[2] = 0;
data->words[2] = 0;
break;
}
return NULL;
return 0;
}
char *dtMenuTextName(struct menuitem *item)
@@ -3019,7 +3019,7 @@ char *dtMenuTextName(struct menuitem *item)
return weaponGetName(weaponnum);
}
s32 menuhandlerDtOkOrResume(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandlerDtOkOrResume(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
// @bug: dtBegin() should not be called if training is already in
@@ -3031,7 +3031,7 @@ s32 menuhandlerDtOkOrResume(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandler001a6514(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler001a6514(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
dtEnd();
@@ -3253,7 +3253,7 @@ char *dtMenuTextTimeTakenValue(struct menuitem *item)
return g_StringPointer;
}
bool menudialogDeviceTrainingResults(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogDeviceTrainingResults(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
chrSetStageFlag(NULL, 0x08000000);
@@ -3262,32 +3262,32 @@ bool menudialogDeviceTrainingResults(u32 operation, struct menudialog *dialog, s
return false;
}
char *htHoloListMenuHandler(u32 operation, struct menuitem *item, s32 *value)
s32 htHoloListMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = htGetNumUnlocked();
data->word = htGetNumUnlocked();
break;
case MENUOP_GETOPTIONTEXT:
return htGetName(htGetIndexBySlot(*value));
return (s32) htGetName(htGetIndexBySlot(data->word));
case MENUOP_SET:
var80088bb4 = *value;
var80088bb4 = data->word;
menuPushDialog(&g_HoloTrainingDetailsMenuDialog);
break;
case MENUOP_GETOPTIONVALUE:
*value = var80088bb4;
data->word = var80088bb4;
break;
case MENUOP_GETOPTGROUPCOUNT:
*value = 0;
data->word = 0;
break;
case MENUOP_GETOPTGROUPTEXT:
return NULL;
return 0;
case MENUOP_GETGROUPSTARTINDEX:
value[2] = 0;
data->words[2] = 0;
break;
}
return NULL;
return 0;
}
char *htMenuTextName(struct menuitem *item)
@@ -3295,7 +3295,7 @@ char *htMenuTextName(struct menuitem *item)
return htGetName(htGetIndexBySlot(var80088bb4));
}
s32 menuhandler001a6a34(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler001a6a34(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
htBegin();
@@ -3305,7 +3305,7 @@ s32 menuhandler001a6a34(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
s32 menuhandler001a6a70(u32 operation, struct menuitem *item, s32 *value)
s32 menuhandler001a6a70(u32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
htEnd();
@@ -3314,7 +3314,7 @@ s32 menuhandler001a6a70(u32 operation, struct menuitem *item, s32 *value)
return 0;
}
bool menudialog001a6aa4(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialog001a6aa4(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -3371,7 +3371,7 @@ char *htMenuTextTimeTakenValue(struct menuitem *item)
return g_StringPointer;
}
bool menudialogFiringRangeResults(u32 operation, struct menudialog *dialog, struct menu *menu)
s32 menudialogFiringRangeResults(u32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
chrSetStageFlag(NULL, 0x08000000);
@@ -3621,7 +3621,7 @@ struct menudialog g_HoloTrainingStatsCompletedMenuDialog = {
&g_HoloTrainingListMenuDialog,
};
char *ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, s32 *value)
s32 ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data)
{
struct optiongroup groups[2] = {
{ 0, L_MPMENU(419) }, // "Locations"
@@ -3635,13 +3635,13 @@ char *ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, s32 *
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
*value = ciGetNumUnlockedHangarBios();
data->word = ciGetNumUnlockedHangarBios();
break;
case MENUOP_GETOPTIONTEXT:
bio = ciGetHangarBio(ciGetHangarBioIndexBySlot(*value));
return langGet(bio->name);
bio = ciGetHangarBio(ciGetHangarBioIndexBySlot(data->word));
return (s32) langGet(bio->name);
case MENUOP_SET:
g_HangarBioSlot = *value;
g_HangarBioSlot = data->word;
bioindex = ciGetHangarBioIndexBySlot(g_HangarBioSlot);
if (bioindex <= HANGARBIO_SKEDARRUINS) {
@@ -3651,19 +3651,19 @@ char *ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, s32 *
}
break;
case MENUOP_GETOPTIONVALUE:
*value = g_HangarBioSlot;
data->word = g_HangarBioSlot;
break;
case MENUOP_GETOPTGROUPCOUNT:
*value = 2;
data->word = 2;
break;
case MENUOP_GETOPTGROUPTEXT:
return langGet(groups[*value].name);
return (s32) langGet(groups[data->word].name);
case MENUOP_GETGROUPSTARTINDEX:
value[2] = *value == 0 ? 0 : groups[1].offset;
data->words[2] = data->words[0] == 0 ? 0 : groups[1].offset;
break;
}
return NULL;
return 0;
}
u32 var800897b4 = 0x1b0d0e10;
+4 -4
View File
@@ -17,9 +17,9 @@ s32 cheatGetByTimedStageIndex(s32 stage_index, s32 difficulty);
s32 cheatGetByCompletedStageIndex(s32 stage_index);
s32 cheatGetTime(s32 cheat_id);
char *cheatGetName(s32 cheat_id);
bool cheatMenuHandleDialog(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 cheatMenuHandleCheatCheckbox(u32 arg0, struct menuitem *item, s32 arg2);
s32 cheatMenuHandleBuddyCheckbox(s32 arg0, struct menuitem *item, s32 arg2);
bool cheatMenuHandleTurnOffAllCheats(u32 arg0, u32 arg1, u32 *arg2);
s32 cheatMenuHandleDialog(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 cheatMenuHandleCheatCheckbox(u32 operation, struct menuitem *item, union handlerdata *data);
s32 cheatMenuHandleBuddyCheckbox(u32 operation, struct menuitem *item, union handlerdata *data);
s32 cheatMenuHandleTurnOffAllCheats(u32 operation, struct menuitem *item, union handlerdata *data);
#endif
+8 -8
View File
@@ -3,14 +3,14 @@
#include <ultra64.h>
#include "types.h"
void menudialogRetryMission(u32 operation, struct menudialog *dialog, struct menuthing **thingptr);
s32 menudialogSolo2PEndscreenCompleted(u32, u32, u32 *);
s32 menudialogSolo2PEndscreenFailed(u32, u32, u32 *);
s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerEndscreenCheats(u32 operation, struct menuitem *item, u32 *values);
s32 menuhandlerContinueMission(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerReplayLastLevel(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerReplayPreviousMission(u32 operation, struct menuitem *item, s32 *value);
s32 menudialogRetryMission(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogSolo2PEndscreenCompleted(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogSolo2PEndscreenFailed(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerEndscreenCheats(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerContinueMission(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerReplayLastLevel(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerReplayPreviousMission(u32 operation, struct menuitem *item, union handlerdata *data);
char *menuDialogTitleRetryStageName(struct menudialog *dialog);
char *menuDialogTitleNextMissionStageName(struct menudialog *dialog);
char *soloMenuTextNumKills(struct menuitem *item);
+5 -5
View File
@@ -19,15 +19,15 @@ char *menuResolveParam2Text(struct menuitem *item);
char *menuResolveParam1Text(struct menuitem *item);
void func0f0f15a4(u8 *arg0, u32 *arg1);
u32 func0f0f1618(void);
u32 func0f0f1d6c(void);
void func0f0f1d6c(struct menudialog *dialog, struct menuframe *frame, struct menu *menu);
u32 func0f0f1ef4(void);
u32 func0f0f2134(void);
void func0f0f2134(struct menudialog *dialog, struct menuframe *frame, struct menu *menu);
void func0f0f2354(u32 arg0, u8 *arg1, u32 *arg2, u32 *arg3);
u32 func0f0f2534(void);
bool func0f0f2588(u8 *arg0, u32 arg1);
bool func0f0f2674(u8 *arg0, u32 arg1, u32 arg2);
u32 func0f0f26fc(void);
u32 func0f0f288c(void);
struct menuitem *func0f0f288c(struct menuframe *frame);
u32 func0f0f2928(void);
u32 func0f0f29cc(void);
u32 func0f0f2b2c(void);
@@ -48,7 +48,7 @@ u32 func0f0f5360(void);
u32 func0f0f74a8(void);
u32 func0f0f7594(void);
u32 func0f0f7728(void);
u32 func0f0f7e98(void);
void func0f0f7e98(struct menuframe *frame);
void func0f0f8040(void);
void func0f0f8120(void);
void func0f0f820c(struct menudialog *dialog, s32 arg1);
@@ -62,7 +62,7 @@ void func0f0f8bb4(u8 *arg0, u32 arg1, u32 arg2);
void func0f0f8c98(void);
u32 func0f0f9030(void);
u32 func0f0f935c(void);
u32 func0f0fa574(void);
void func0f0fa574(struct menuframe *frame);
void func0f0fa6ac(void);
void func0f0fa704(void);
u32 func0f0fb488(void);
+7 -7
View File
@@ -21,12 +21,12 @@ u32 func0f0ff6f4(void);
u32 func0f0ff7bc(void);
u32 func0f100128(void);
u32 func0f100ad0(void);
s32 menudialog000fcd48(u32, u32, u32 *);
bool menudialogMpPickTarget(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandler000fcc34(u32, u32, u32 *);
s32 menuhandler000fd6f0(u32, u32, u32 *);
s32 menuhandlerRepairPak(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerRetrySavePak(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerWarnRepairPak(u32 operation, struct menuitem *item, s32 *value);
s32 menudialog000fcd48(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogMpPickTarget(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandler000fcc34(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler000fd6f0(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerRepairPak(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerRetrySavePak(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerWarnRepairPak(u32 operation, struct menuitem *item, union handlerdata *data);
#endif
+53 -53
View File
@@ -5,7 +5,7 @@
char *menuTextCurrentStageName(struct menuitem *item);
char *soloMenuTextDifficulty(struct menuitem *item);
char *menuhandlerControlStyleImpl(u32 operation, struct menuitem *item, s32 *value, s32 arg3);
s32 menuhandlerControlStyleImpl(u32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex);
char *soloMenuTitleStageOverview(struct menudialog *dialog);
f32 func0f1036ac(u8 value, s32 prop);
bool isStageDifficultyUnlocked(s32 stageindex, s32 difficulty);
@@ -22,57 +22,57 @@ char *invMenuTextWeaponName(struct menuitem *item);
char *invMenuTextWeaponManufacturer(struct menuitem *item);
char *invMenuTextWeaponDescription(struct menuitem *item);
bool soloChoosePauseDialog(void);
s32 menudialog00103368(u32, u32, u32 *);
s32 menudialog00103608(u32 operation, struct menudialog *dialog, struct menuthing **thingptr);
bool menudialogCoopAntiOptions(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menudialog0010559c(u32 operation, struct menudialog *dialog, s32 *arg2);
s32 menudialog00105c54(u32, u32, u32 *);
s32 menudialog001063d4(u32, u32, u32 *);
s32 soloMenuDialogPauseStatus(u32 operation, s32 arg1, s32 arg2);
char *menuhandler001024dc(u32 operation, struct menuitem *item, s32 *value);
char *menuhandler001024fc(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerAcceptMission(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerAcceptPdModeSettings(s32 operation, struct menuitem *item, bool *value);
s32 menuhandlerBuddyOptionsContinue(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerCoopDifficulty(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerAntiDifficulty(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0010476c(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerControlStyle(s32 operation, struct menuitem *item, u32 *value);
s32 menuhandler00106028(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandler00106178(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerAbortMission(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerCinema(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerAimControl(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerAlternativeTitle(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerAlwaysShowTarget(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerAmmoOnScreen(u32 operation, struct menuitem *item, bool *enable);
char *menuhandlerAntiPlayer(u32 operation, struct menudialog *dialog, s32 *value);
s32 menuhandlerAntiRadar(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerAutoAim(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerChangeAgent(s32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerCoopBuddy(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerCoopFriendlyFire(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerCoopRadar(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerCutsceneSubtitles(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerHeadRoll(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerHiRes(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerInGameSubtitles(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerLangFilter(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerLookAhead(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerMusicVolume(u32 operation, struct menuitem *item, u32 *volume);
s32 menuhandlerPaintball(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerPdMode(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerPdModeSetting(u32 operation, struct menuitem *item, struct numandtext *value);
s32 menuhandlerReversePitch(u32 operation, struct menuitem *item, bool *enable);
char *menuhandlerScreenRatio(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerScreenSize(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerScreenSplit(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerSfxVolume(u32 operation, struct menuitem *item, u32 *volume);
s32 menuhandlerShowGunFunction(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerShowMissionTime(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerShowZoomRange(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerSightOnScreen(u32 operation, struct menuitem *item, bool *enable);
s32 menuhandlerSoloDifficulty(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerSoundMode(u32 operation, struct menuitem *item, s32 *value);
s32 menudialog00103368(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog00103608(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogCoopAntiOptions(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog0010559c(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog00105c54(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog001063d4(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 soloMenuDialogPauseStatus(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandler001024dc(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001024fc(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAcceptMission(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAcceptPdModeSettings(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerBuddyOptionsContinue(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopDifficulty(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAntiDifficulty(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0010476c(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerControlStyle(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler00106028(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler00106178(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAbortMission(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCinema(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAimControl(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAlternativeTitle(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAlwaysShowTarget(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAmmoOnScreen(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAntiPlayer(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAntiRadar(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAutoAim(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerChangeAgent(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopBuddy(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopFriendlyFire(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopRadar(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCutsceneSubtitles(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerHeadRoll(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerHiRes(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerInGameSubtitles(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerLangFilter(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerLookAhead(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMusicVolume(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPaintball(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPdMode(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPdModeSetting(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerReversePitch(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerScreenRatio(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerScreenSize(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerScreenSplit(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSfxVolume(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerShowGunFunction(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerShowMissionTime(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerShowZoomRange(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSightOnScreen(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSoloDifficulty(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSoundMode(u32 operation, struct menuitem *item, union handlerdata *data);
#endif
+30 -30
View File
@@ -47,36 +47,36 @@ u32 func0f10b83c(void);
u32 func0f10b924(void);
u32 func0f10c900(void);
void func0f10c970(void);
void menucustomChooseAgent(void);
void menucustomDeleteGameNote(void);
void menucustomFileToCopy(void);
void menucustomFileToDelete(void);
bool menudialog00108e58(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menudialog0010b014(u32, u32, u32 *);
s32 menudialog0010b674(u32, u32, u32 *);
s32 menudialog0010ba10(u32, u32, u32 *);
s32 menudialog0010c804(u32, u32, u32 *);
s32 menuhandler00108014(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler00108254(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler001084b8(u32, u32, u32 *);
s32 menuhandlerPakErrorTryAgain(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerPakCancelSave2(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerAcknowledgePakFileLost(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler00108ecc(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler00108f08(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerPakRenameDuplicateSave(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerPakCancelDuplicateSave(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerPakCancelSave(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerDeleteFiles(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerPakConfirmDelete(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0010b14c(u32, u32, u32 *);
s32 menuhandlerPakSelection(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerAgentName(u32 operation, struct menuitem *item, char **value);
s32 menuhandlerOpenCopyFile(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerOpenDeleteFile(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerRenameFile(u32 operation, struct menuitem *item, char **value);
s32 menuhandlerSaveElsewhere(u32, u32, u32 *);
s32 menuhandlerSaveLocation(u32 operation, struct menuitem *item, s32 *value);
s32 menucustomChooseAgent(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menucustomDeleteGameNote(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menucustomFileToCopy(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menucustomFileToDelete(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialog00108e58(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog0010b014(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog0010b674(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog0010ba10(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog0010c804(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandler00108014(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler00108254(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001084b8(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakErrorTryAgain(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakCancelSave2(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAcknowledgePakFileLost(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler00108ecc(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler00108f08(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakRenameDuplicateSave(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakCancelDuplicateSave(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakCancelSave(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerDeleteFiles(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakConfirmDelete(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0010b14c(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPakSelection(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAgentName(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerOpenCopyFile(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerOpenDeleteFile(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerRenameFile(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSaveElsewhere(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSaveLocation(u32 operation, struct menuitem *item, union handlerdata *data);
extern const char var7f1b3214[];
extern const char var7f1b3218[];
+5 -5
View File
@@ -4,10 +4,10 @@
#include "types.h"
void func0f10cb2c(void);
s32 menuhandler4MbDropOut(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0010ca1c(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler4MbAdvancedSetup(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0010cabc(u32 operation, struct menuitem *item, s32 *value);
bool menudialog4MbMainMenu(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandler4MbDropOut(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0010ca1c(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler4MbAdvancedSetup(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0010cabc(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialog4MbMainMenu(u32 operation, struct menudialog *dialog, union handlerdata *data);
#endif
+1 -1
View File
@@ -23,6 +23,6 @@ void mpPushEndscreenDialog(u32 arg0, u32 playernum);
s32 menuhandlerMpEndGame(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler00178018(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpInGameLimitLabel(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpPause(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpPause(u32 operation, struct menuitem *item, union handlerdata *data);
#endif
+83 -83
View File
@@ -5,12 +5,12 @@
char *mpGetCurrentPlayerName(struct menuitem *item);
s16 mpChooseRandomStage(void);
s32 menuhandler001791c8(u32, u32, u32 *);
s32 menuhandler001791c8(u32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextWeaponNameForSlot(struct menuitem *item);
char *mpMenuTextSetupName(struct menuitem *item);
s32 func0f179da4(u32 operation, struct menuitem *item, s32 *value, s32 arg3, s32 arg4, s32 arg5);
s32 menudialog0017a174(u32, u32, u32 *);
s32 menuhandler0017a20c(u32, u32, u32 *);
s32 func0f179da4(u32 operation, struct menuitem *item, union handlerdata *data, s32 arg3, s32 arg4, s32 arg5);
s32 menudialog0017a174(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandler0017a20c(u32 operation, struct menuitem *item, union handlerdata *data);
u32 mpMenuTextKills(void);
u32 mpMenuTextDeaths(void);
u32 mpMenuTextGamesPlayed(void);
@@ -28,50 +28,50 @@ u32 mpMenuTextAccuracy(void);
u32 func0f17ad80(void);
u32 mpMenuTextPainReceived(void);
u32 mpMenuTextDamageDealt(void);
s32 menuhandlerMpMedal(u32, u32, u32 *);
s32 menuhandlerMpMedal(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17b360(void);
u32 mpMenuTextUsernamePassword(void);
s32 func0f17b4f8(u32 operation, struct menuitem *item, s32 *value, s32 arg3, s32 arg4);
s32 func0f17b4f8(u32 operation, struct menuitem *item, union handlerdata *data, s32 arg3, s32 arg4);
char *mpMenuTextBodyName(struct menuitem *item);
u32 func0f17b8f0(void);
s32 menuhandler0017b91c(u32, u32, u32 *);
s32 menuhandler0017bab4(u32, u32, u32 *);
s32 menuhandler0017b91c(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017bab4(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17be2c(void);
s32 menuhandler0017bfc0(u32, u32, u32 *);
s32 menuhandlerMpHandicapPlayer(u32, u32, u32 *);
s32 menuhandler0017bfc0(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpHandicapPlayer(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17c524(void);
s32 menuhandler0017c6a4(u32, u32, u32 *);
s32 menuhandler0017c6a4(u32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextSimulantDescription(struct menuitem *item);
s32 menudialog0017ccfc(u32, u32, u32 *);
s32 menuhandlerMpSimulantDifficulty(u32, u32, u32 *);
s32 menudialog0017ccfc(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerMpSimulantDifficulty(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17cfc0(void);
u32 func0f17d378(void);
s32 func0f17d4b0(u32 operation, struct menuitem *item, s32 *value, s32 numteams);
s32 func0f17d4b0(u32 operation, struct menuitem *item, union handlerdata *data, s32 numteams);
char *mpMenuTextChrNameForTeamSetup(struct menuitem *item);
char *func0f17dac4(u32 operation, struct menuitem *item, s32 *value);
s32 func0f17dac4(u32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextSelectTuneOrTunes(struct menuitem *item);
s32 menuhandler0017dc84(u32, u32, u32 *);
s32 menuhandler0017dc84(u32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextCurrentTrack(struct menuitem *item);
s32 menuhandler0017e06c(u32, u32, u32 *);
s32 menuhandler0017e06c(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17e288(void);
u32 func0f17e318(void);
s32 menudialog0017e3fc(u32, u32, u32 *);
s32 menuhandler0017e4d4(u32, u32, u32 *);
s32 menudialog0017e3fc(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandler0017e4d4(u32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextChallengeName(struct menuitem *item);
s32 menudialog0017eb34(u32, u32, u32 *);
s32 menudialog0017eb34(u32 operation, struct menudialog *dialog, union handlerdata *data);
char *mpMenuTextSavePlayerOrCopy(struct menuitem *item);
char *mpMenuTextArenaName(struct menuitem *item);
char *mpMenuTextWeaponSetName(struct menuitem *item);
u32 func0f17f100(void);
void func0f17f260(void);
u32 func0f17f428(void);
s32 menuhandlerPlayerTeam(u32 operation, struct menuitem *item, s32 *value);
u32 menuhandlerMpNumberOfSimulants(u32 operation, struct menuitem *item, s32 *value);
u32 menuhandlerMpSimulantsPerTeam(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0017f74c(u32, u32, u32 *);
s32 menuhandlerPlayerTeam(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpNumberOfSimulants(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSimulantsPerTeam(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017f74c(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17fa28(void);
void func0f17fcb0(s32 silent);
s32 menuhandlerMpSlowMotion(u32, u32, u32 *);
s32 menuhandlerMpSlowMotion(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f17ff8c(void);
u32 func0f17ffe4(void);
u32 func0f180078(void);
@@ -99,10 +99,10 @@ u32 func0f1847b8(void);
void scenarioPacCallback10(void);
u32 scenarioPacCallback18(void);
bool scenarioPacRadar2(Gfx **gdl, struct prop *prop);
s32 menudialog00184ec0(u32, u32, u32 *);
s32 menudialog00184ec0(u32 operation, struct menudialog *dialog, union handlerdata *data);
char *mpMenuTextScenarioShortName(struct menuitem *item);
char *mpMenuTextScenarioName(struct menuitem *item);
s32 menuhandler00185068(u32, u32, u32 *);
s32 menuhandler00185068(u32 operation, struct menuitem *item, union handlerdata *data);
void func0f185568(void);
u32 func0f185774(void);
u32 func0f185c14(void);
@@ -115,62 +115,62 @@ u32 chrGiveBriefcase(struct chrdata *chr, struct prop *prop);
u32 func0f187288(void);
bool chrGiveUplink(struct chrdata *chr, struct prop *prop);
void scenarioHtmActivateUplink(struct chrdata *chr, struct prop *prop);
s32 menuhandlerMpDropOut(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpTeamsLabel(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpDropOut(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamsLabel(u32 operation, struct menuitem *item, union handlerdata *data);
u32 func0f1790fc(void);
char *menuhandlerMpControlStyle(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerMpWeaponSlot(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerMpWeaponSetDropdown(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpControlCheckbox(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerMpAimControl(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpCheckboxOption(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpTeamsEnabled(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpDisplayOptionCheckbox(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpConfirmSaveChr(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpPlayerName(u32 operation, struct menuitem *item, char **value);
s32 menuhandlerMpSaveSetupOverwrite(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpSaveSetupCopy(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpCharacterBody(u32 operation, struct menuitem *item, struct numandtext *value);
s32 menuhandlerMpUsernamePassword(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpCharacterHead(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpTimeLimitSlider(u32 operation, struct menuitem *item, struct numandtext *value);
s32 menuhandlerMpScoreLimitSlider(u32 operation, struct menuitem *item, struct numandtext *value);
s32 menuhandlerMpTeamScoreLimitSlider(u32 operation, struct menuitem *item, struct numandtext *value);
s32 menuhandlerMpRestoreScoreDefaults(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpRestoreHandicapDefaults(u32 operation, struct menuitem *item, s32 *value);
bool menudialogMpReady(u32 operation, struct menudialog *dialog, struct menu *menu);
bool menudialogMpSimulant(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpSimulantBody(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpDeleteSimulant(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpChangeSimulantType(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpClearAllSimulants(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpAddSimulant(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpSimulantSlot(u32 operation, struct menuitem *item, s32 *value);
bool menudialogMpSimulants(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandlerMpTwoTeams(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpThreeTeams(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpFourTeams(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpMaximumTeams(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpHumansVsSimulants(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpHumanSimulantPairs(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerMpTeamSlot(u32 operation, struct menuitem *item, s32 *value);
bool menudialogMpSelectTune(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandlerMpMultipleTunes(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpTeamNameSlot(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0017e38c(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0017e9d8(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpAbortChallenge(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpStartChallenge(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0017ec64(u32 operation, struct menuitem *item, s32 *value);
char *menuhandlerMpLock(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpSavePlayer(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler0017ef30(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpSaveSettings(u32 operation, struct menuitem *item, s32 *value);
bool menudialogMpGameSetup(u32 operation, struct menudialog *dialog, struct menu *menu);
bool menudialogMpQuickGo(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandlerMpFinishedSetup(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerQuickTeamSeparator(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpQuickTeamOption(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpControlStyle(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpWeaponSlot(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpWeaponSetDropdown(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpControlCheckbox(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpAimControl(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpCheckboxOption(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamsEnabled(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpDisplayOptionCheckbox(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpConfirmSaveChr(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpPlayerName(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSaveSetupOverwrite(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSaveSetupCopy(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpCharacterBody(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpUsernamePassword(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpCharacterHead(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTimeLimitSlider(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpScoreLimitSlider(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamScoreLimitSlider(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpRestoreScoreDefaults(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpRestoreHandicapDefaults(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpReady(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogMpSimulant(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSimulantBody(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpDeleteSimulant(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpChangeSimulantType(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpClearAllSimulants(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpAddSimulant(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSimulantSlot(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpSimulants(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerMpTwoTeams(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpThreeTeams(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpFourTeams(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpMaximumTeams(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpHumansVsSimulants(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpHumanSimulantPairs(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamSlot(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpSelectTune(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerMpMultipleTunes(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamNameSlot(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017e38c(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017e9d8(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpAbortChallenge(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpStartChallenge(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017ec64(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpLock(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSavePlayer(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017ef30(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSaveSettings(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpGameSetup(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogMpQuickGo(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerMpFinishedSetup(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerQuickTeamSeparator(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpQuickTeamOption(u32 operation, struct menuitem *item, union handlerdata *data);
#endif
+6 -6
View File
@@ -3,10 +3,10 @@
#include <ultra64.h>
#include "types.h"
bool menudialogCombatSimulator(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menuhandlerMpAdvancedSetup(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpDisplayTeam(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpOneHitKills(u32 operation, struct menuitem *item, s32 *value);
s32 menudialogCombatSimulator(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menuhandlerMpAdvancedSetup(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpDisplayTeam(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpOneHitKills(u32 operation, struct menuitem *item, union handlerdata *data);
void scenarioHtbInit(void);
s32 scenarioHtbCallback08(void);
void scenarioHtbReset(void);
@@ -26,7 +26,7 @@ bool scenarioCtcRadar2(Gfx **gdl, struct prop *prop);
bool scenarioCtcCallback2c(f32 arg0, struct coord *pos, s16 *rooms, struct prop *prop, f32 *arg4);
s32 scenarioCtcGetMaxTeams(void);
bool scenarioCtcIsRoomHighlighted(s16 room);
s32 menuhandlerMpHillTime(u32 operation, struct menuitem *item, struct numandtext *value);
s32 menuhandlerMpHillTime(u32 operation, struct menuitem *item, union handlerdata *data);
void scenarioKohCallback40(s32 *arg0);
void scenarioKohCallback44(s32 *arg0);
void scenarioKohInit(void);
@@ -44,7 +44,7 @@ void scenarioPacInit(void);
void scenarioPacReset(void);
void scenarioPacKill(struct mpchr *mpchr, s32 arg1, s32 *score, s32 *arg3);
Gfx *scenarioPacRadar(Gfx *gdl);
s32 menuhandlerMpOpenOptions(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerMpOpenOptions(u32 operation, struct menuitem *item, union handlerdata *data);
void scenarioCallback40(s32 *arg0);
void scenarioCallback44(s32 *arg0);
void scenarioInit(void);
+23 -23
View File
@@ -37,28 +37,28 @@ void func0f1a7560(void *ptr, u16 fileid, u32 arg2, void *arg3, s32 arg4, bool ar
void func0f1a7730(void *ptr);
void *func0f1a7794(u16 fileid, u8 *arg1, s32 arg2, s32 arg3);
void *fileLoad(u16 fileid);
s32 menudialog001a39a8(u32, u32, u32 *);
s32 frTrainingStatsMenuDialog(u32 operation, u32 arg1, u32 *arg2);
s32 menudialog001a5f48(u32, u32, u32 *);
s32 menudialog001a6548(u32, u32, u32 *);
bool menudialogDeviceTrainingResults(u32 operation, struct menudialog *dialog, struct menu *menu);
bool menudialog001a6aa4(u32 operation, struct menudialog *dialog, struct menu *menu);
bool menudialogFiringRangeResults(u32 operation, struct menudialog *dialog, struct menu *menu);
s32 menudialog001a737c(u32, u32, u32 *);
s32 frDetailsOkMenuHandler(u32 operation, struct menuitem *item, s32 *value);
s32 frAbortMenuHandler(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler001a348c(u32, u32, u32 *);
s32 menuhandler001a44c0(u32, u32, u32 *);
s32 menuhandlerFrFailedContinue(u32 operation, struct menuitem *item, s32 *value);
char *ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, u32 *value);
char *dtDeviceListMenuHandler(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandlerDtOkOrResume(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler001a6514(u32 operation, struct menuitem *item, s32 *value);
char *htHoloListMenuHandler(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler001a6a34(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler001a6a70(u32 operation, struct menuitem *item, s32 *value);
char *ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, s32 *value);
s32 menuhandler001a6ea4(u32, u32, u32 *);
s32 frDifficultyMenuHandler(u32 operation, struct menuitem *item, s32 *value);
s32 menudialog001a39a8(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 frTrainingStatsMenuDialog(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog001a5f48(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog001a6548(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogDeviceTrainingResults(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog001a6aa4(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialogFiringRangeResults(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 menudialog001a737c(u32 operation, struct menudialog *dialog, union handlerdata *data);
s32 frDetailsOkMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
s32 frAbortMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a348c(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a44c0(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerFrFailedContinue(u32 operation, struct menuitem *item, union handlerdata *data);
s32 ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
s32 dtDeviceListMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerDtOkOrResume(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6514(u32 operation, struct menuitem *item, union handlerdata *data);
s32 htHoloListMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6a34(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6a70(u32 operation, struct menuitem *item, union handlerdata *data);
s32 ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6ea4(u32 operation, struct menuitem *item, union handlerdata *data);
s32 frDifficultyMenuHandler(u32 operation, struct menuitem *item, union handlerdata *data);
#endif
+20 -14
View File
@@ -3245,20 +3245,31 @@ struct hoverprop {
u16 size;
};
union handlerdata {
s32 words[4];
s32 word;
void *ptrs[4];
};
struct menuitem {
u8 type;
u8 param;
u32 param1;
u32 param2;
u32 param3;
void *handler;
union {
void *handler;
//struct menudialog *dialog;
//s32 (*handler)(u32 operation, struct menuitem *item, union handlerdata *data);
} ptr;
};
struct menudialog {
u8 type;
u32 title;
struct menuitem *items;
void *unk0c;
s32 (*handler)(u32 operation, struct menudialog *dialog, union handlerdata *data);
u32 unk10;
struct menudialog *nextsibling;
};
@@ -3453,7 +3464,7 @@ struct menulayer {
struct menuframe {
struct menudialog *dialog;
u32 unk04;
struct menuitem *item;
struct menuitem *focuseditem;
/*0x0c*/ u32 unk0c;
/*0x10*/ u32 unk10;
/*0x14*/ s32 unk14;
@@ -3466,12 +3477,12 @@ struct menuframe {
/*0x30*/ u32 unk30;
/*0x34*/ u32 unk34;
/*0x38*/ u32 unk38;
/*0x3c*/ u8 unk3c;
/*0x40*/ u32 unk40;
/*0x3c*/ u8 dialogtype;
/*0x40*/ f32 unk40;
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
/*0x4c*/ u32 unk4c;
/*0x50*/ u32 unk50;
/*0x48*/ f32 unk48;
/*0x4c*/ f32 unk4c;
/*0x50*/ f32 unk50;
/*0x54*/ u32 unk54;
/*0x58*/ u32 unk58;
/*0x5c*/ u32 unk5c;
@@ -3480,6 +3491,7 @@ struct menuframe {
/*0x68*/ u32 unk68;
/*0x6c*/ u8 unk6c;
/*0x6d*/ s8 unk6d;
/*0x6e*/ s8 unk6e;
};
struct menudfc {
@@ -4362,12 +4374,6 @@ struct mparena {
u16 name;
};
// Throwaway struct for passing two values to menu handlers
struct numandtext {
s32 num;
char *text;
};
struct savelocation {
/*0x000*/ struct savelocation00 *unk000;
/*0x004*/ u32 unk004;