Rename mpsetupfile functions to bossfile

This commit is contained in:
Ryan Dwyer
2021-09-14 17:11:16 +10:00
parent 011515bb8c
commit 7acf48f6d7
20 changed files with 192 additions and 192 deletions
+5 -5
View File
@@ -1357,10 +1357,10 @@ void endscreenPrepare(void)
mpDetermineUnlockedFeatures();
if (g_MissionConfig.stagenum == STAGE_SKEDARRUINS && (u8)g_SoloCompleted == false) {
g_SoloCompleted = true;
g_AltTitle = true;
mpsetupfileSave();
if (g_MissionConfig.stagenum == STAGE_SKEDARRUINS && (u8)g_AltTitleUnlocked == false) {
g_AltTitleUnlocked = true;
g_AltTitleEnabled = true;
bossfileSave();
}
}
}
@@ -1563,7 +1563,7 @@ glabel endscreenPrepare
/* f1091b4: 15a00004 */ bnez $t5,.NB0f1091c8
/* f1091b8: 00000000 */ sll $zero,$zero,0x0
/* f1091bc: a0620000 */ sb $v0,0x0($v1)
/* f1091c0: 0fc42b8c */ jal mpsetupfileSave
/* f1091c0: 0fc42b8c */ jal bossfileSave
/* f1091c4: a022681c */ sb $v0,0x681c($at)
.NB0f1091c8:
/* f1091c8: 3c04800a */ lui $a0,0x800a
+11 -11
View File
@@ -1081,7 +1081,7 @@ glabel var7f1a863c
/* f01cdc0: 31f80002 */ andi $t8,$t7,0x2
/* f01cdc4: 530000ca */ beqzl $t8,.PF0f01d0f0
/* f01cdc8: 240fffff */ li $t7,-1
/* f01cdcc: 0fc44527 */ jal mpsetupfileSave
/* f01cdcc: 0fc44527 */ jal bossfileSave
/* f01cdd0: 00000000 */ nop
/* f01cdd4: 8e6d0458 */ lw $t5,0x458($s3)
/* f01cdd8: 2401fffd */ li $at,-3
@@ -2431,7 +2431,7 @@ glabel var7f1a863c
/* f01c70c: 2401000b */ addiu $at,$zero,0xb
/* f01c710: 3050ffff */ andi $s0,$v0,0xffff
/* f01c714: 17010014 */ bne $t8,$at,.L0f01c768
/* f01c718: 3c0e800b */ lui $t6,%hi(g_MpSetupFile+0x60)
/* f01c718: 3c0e800b */ lui $t6,%hi(g_BossFile+0x60)
/* f01c71c: 8e790490 */ lw $t9,0x490($s3)
/* f01c720: 24010002 */ addiu $at,$zero,0x2
/* f01c724: 02c02025 */ or $a0,$s6,$zero
@@ -2457,7 +2457,7 @@ glabel var7f1a863c
.L0f01c768:
/* f01c768: 02c02025 */ or $a0,$s6,$zero
.L0f01c76c:
/* f01c76c: 91cecc10 */ lbu $t6,%lo(g_MpSetupFile+0x60)($t6)
/* f01c76c: 91cecc10 */ lbu $t6,%lo(g_BossFile+0x60)($t6)
/* f01c770: 24010005 */ addiu $at,$zero,0x5
/* f01c774: 0011c080 */ sll $t8,$s1,0x2
/* f01c778: 15c10005 */ bne $t6,$at,.L0f01c790
@@ -2858,7 +2858,7 @@ glabel var7f1a863c
/* f01ccf0: 332d0002 */ andi $t5,$t9,0x2
/* f01ccf4: 51a000ca */ beqzl $t5,.L0f01d020
/* f01ccf8: 2419ffff */ addiu $t9,$zero,-1
/* f01ccfc: 0fc44270 */ jal mpsetupfileSave
/* f01ccfc: 0fc44270 */ jal bossfileSave
/* f01cd00: 00000000 */ nop
/* f01cd04: 8e6f0458 */ lw $t7,0x458($s3)
/* f01cd08: 2401fffd */ addiu $at,$zero,-3
@@ -3264,8 +3264,8 @@ glabel var7f1a863c
.L0f01d2b8:
/* f01d2b8: 0fc625cb */ jal mpSetPaused
/* f01d2bc: 00002025 */ or $a0,$zero,$zero
/* f01d2c0: 3c02800b */ lui $v0,%hi(g_MpSetupFile)
/* f01d2c4: 2442cbb0 */ addiu $v0,$v0,%lo(g_MpSetupFile)
/* f01d2c0: 3c02800b */ lui $v0,%hi(g_BossFile)
/* f01d2c4: 2442cbb0 */ addiu $v0,$v0,%lo(g_BossFile)
/* f01d2c8: 904e0060 */ lbu $t6,0x60($v0)
/* f01d2cc: 24010005 */ addiu $at,$zero,0x5
/* f01d2d0: ae600314 */ sw $zero,0x314($s3)
@@ -4626,7 +4626,7 @@ glabel var7f1a863c
/* f01c9d0: 332d0002 */ andi $t5,$t9,0x2
/* f01c9d4: 51a000ca */ beqzl $t5,.NB0f01cd00
/* f01c9d8: 2419ffff */ addiu $t9,$zero,-1
/* f01c9dc: 0fc42b8c */ jal mpsetupfileSave
/* f01c9dc: 0fc42b8c */ jal bossfileSave
/* f01c9e0: 00000000 */ sll $zero,$zero,0x0
/* f01c9e4: 8e6f0458 */ lw $t7,0x458($s3)
/* f01c9e8: 2401fffd */ addiu $at,$zero,-3
@@ -5699,7 +5699,7 @@ glabel var7f1a863c
// }
//
// // c76c
// if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
// if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
// g_MpPlayers[i].base.team = 0;
// }
//
@@ -5858,7 +5858,7 @@ glabel var7f1a863c
// func0f01bea0();
//
// if (g_Vars.modifiedfiles & MODFILE_MPSETUP) {
// mpsetupfileSave();
// bossfileSave();
// g_Vars.modifiedfiles &= ~MODFILE_MPSETUP;
// }
// } else /*cd1c*/ if (g_MenuData.unk008 == -6) {
@@ -5994,8 +5994,8 @@ glabel var7f1a863c
// g_Vars.normmplayerisrunning = false;
// g_Vars.lvmpbotlevel = 0;
//
// if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
// g_MpSetupFile.locktype = MPLOCKTYPE_NONE;
// if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
// g_BossFile.locktype = MPLOCKTYPE_NONE;
// }
//
// // d2ec
+1 -1
View File
@@ -14284,7 +14284,7 @@ Gfx *currentPlayerRenderHud(Gfx *gdl)
numdeaths += g_Vars.playerstats[i].kills[playernum];
}
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_Vars.currentplayer->deadtimer < 0) {
g_Vars.currentplayer->deadtimer = PALDOWN(600);
}
+36 -36
View File
@@ -99,7 +99,7 @@ s32 menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union hand
break;
case MENUOP_SET:
optionsSetControlMode(mpindex, data->list.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
break;
case MENUOP_GETOPTIONVALUE:
data->list.value = optionsGetControlMode(mpindex);
@@ -140,7 +140,7 @@ s32 menuhandlerReversePitch(s32 operation, struct menuitem *item, union handlerd
return !optionsGetForwardPitch(mpchrnum);
case MENUOP_SET:
optionsSetForwardPitch(mpchrnum, data->checkbox.value == 0);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -181,7 +181,7 @@ s32 menuhandlerAimControl(s32 operation, struct menuitem *item, union handlerdat
#endif
case MENUOP_SET:
optionsSetAimControl(playernum, data->dropdown.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
break;
case MENUOP_GETOPTIONVALUE:
data->dropdown.value = optionsGetAimControl(playernum);
@@ -207,7 +207,7 @@ s32 menuhandlerSoundMode(s32 operation, struct menuitem *item, union handlerdata
return (s32) langGet(options[data->dropdown.value]);
case MENUOP_SET:
sndSetSoundMode(data->dropdown.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
break;
case MENUOP_GETOPTIONVALUE:
data->dropdown.value = g_SoundMode;
@@ -232,7 +232,7 @@ s32 menuhandlerScreenSize(s32 operation, struct menuitem *item, union handlerdat
return (s32) langGet(options[data->dropdown.value]);
case MENUOP_SET:
optionsSetScreenSize(data->dropdown.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
break;
case MENUOP_GETOPTIONVALUE:
data->dropdown.value = optionsGetEffectiveScreenSize();
@@ -256,7 +256,7 @@ s32 menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerda
return (s32) langGet(options[data->dropdown.value]);
case MENUOP_SET:
optionsSetScreenRatio(data->dropdown.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
break;
case MENUOP_GETOPTIONVALUE:
data->dropdown.value = optionsGetScreenRatio();
@@ -353,7 +353,7 @@ s32 menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerda
if (data->dropdown.value != (u32)optionsGetScreenSplit()) {
optionsSetScreenSplit(data->dropdown.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
if (PLAYERCOUNT() > 1) {
u32 prevplayernum = g_MpPlayerNum;
@@ -388,7 +388,7 @@ s32 menuhandlerLookAhead(s32 operation, struct menuitem *item, union handlerdata
return optionsGetLookAhead(mpchrnum);
case MENUOP_SET:
optionsSetLookAhead(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -409,7 +409,7 @@ s32 menuhandlerHeadRoll(s32 operation, struct menuitem *item, union handlerdata
return optionsGetHeadRoll(mpchrnum);
case MENUOP_SET:
optionsSetHeadRoll(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -422,7 +422,7 @@ s32 menuhandlerInGameSubtitles(s32 operation, struct menuitem *item, union handl
return optionsGetInGameSubtitles();
case MENUOP_SET:
optionsSetInGameSubtitles(data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -435,7 +435,7 @@ s32 menuhandlerCutsceneSubtitles(s32 operation, struct menuitem *item, union han
return optionsGetCutsceneSubtitles();
case MENUOP_SET:
optionsSetCutsceneSubtitles(data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -445,15 +445,15 @@ s32 menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union hand
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
if (g_Vars.stagenum != STAGE_CITRAINING || (u8)g_SoloCompleted == false) {
if (g_Vars.stagenum != STAGE_CITRAINING || (u8)g_AltTitleUnlocked == false) {
return true;
}
break;
case MENUOP_GET:
return g_AltTitle;
return g_AltTitleEnabled;
case MENUOP_SET:
g_AltTitle = data->checkbox.value;
g_Vars.modifiedfiles |= MODFILE_GLOBAL;
g_AltTitleEnabled = data->checkbox.value;
g_Vars.modifiedfiles |= MODFILE_BOSS;
}
return 0;
@@ -476,7 +476,7 @@ s32 menuhandlerHiRes(s32 operation, struct menuitem *item, union handlerdata *da
return g_HiResEnabled == true;
case MENUOP_SET:
optionsSetHiRes(data->checkbox.value ? 1 : 0);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -497,7 +497,7 @@ s32 menuhandlerAmmoOnScreen(s32 operation, struct menuitem *item, union handlerd
return optionsGetAmmoOnScreen(mpchrnum);
case MENUOP_SET:
optionsSetAmmoOnScreen(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -523,7 +523,7 @@ s32 menuhandlerShowGunFunction(s32 operation, struct menuitem *item, union handl
return optionsGetShowGunFunction(mpchrnum);
case MENUOP_SET:
optionsSetShowGunFunction(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -544,7 +544,7 @@ s32 menuhandlerShowMissionTime(s32 operation, struct menuitem *item, union handl
return optionsGetShowMissionTime(mpchrnum);
case MENUOP_SET:
optionsSetShowMissionTime(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -570,7 +570,7 @@ s32 menuhandlerAlwaysShowTarget(s32 operation, struct menuitem *item, union hand
return optionsGetAlwaysShowTarget(mpchrnum);
case MENUOP_SET:
optionsSetAlwaysShowTarget(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -596,7 +596,7 @@ s32 menuhandlerShowZoomRange(s32 operation, struct menuitem *item, union handler
return optionsGetShowZoomRange(mpchrnum);
case MENUOP_SET:
optionsSetShowZoomRange(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -617,7 +617,7 @@ s32 menuhandlerPaintball(s32 operation, struct menuitem *item, union handlerdata
return optionsGetPaintball(mpchrnum);
case MENUOP_SET:
optionsSetPaintball(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -638,7 +638,7 @@ s32 menuhandlerSightOnScreen(s32 operation, struct menuitem *item, union handler
return optionsGetSightOnScreen(mpchrnum);
case MENUOP_SET:
optionsSetSightOnScreen(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -659,7 +659,7 @@ s32 menuhandlerAutoAim(s32 operation, struct menuitem *item, union handlerdata *
return optionsGetAutoAim(mpchrnum);
case MENUOP_SET:
optionsSetAutoAim(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -673,7 +673,7 @@ s32 menuhandlerMusicVolume(s32 operation, struct menuitem *item, union handlerda
break;
case MENUOP_SET:
optionsSetMusicVolume(data->slider.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -687,7 +687,7 @@ s32 menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata
break;
case MENUOP_SET:
sndSetSfxVolume(data->slider.value);
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -1665,7 +1665,7 @@ s32 menuhandlerCoopRadar(s32 operation, struct menuitem *item, union handlerdata
return g_Vars.coopradaron;
case MENUOP_SET:
g_Vars.coopradaron = data->checkbox.value ? 1 : 0;
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -1678,7 +1678,7 @@ s32 menuhandlerCoopFriendlyFire(s32 operation, struct menuitem *item, union hand
return g_Vars.coopfriendlyfire;
case MENUOP_SET:
g_Vars.coopfriendlyfire = data->checkbox.value ? 1 : 0;
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -1977,7 +1977,7 @@ s32 menuhandlerAntiRadar(s32 operation, struct menuitem *item, union handlerdata
return g_Vars.antiradaron;
case MENUOP_SET:
g_Vars.antiradaron = data->checkbox.value ? 1 : 0;
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
@@ -1995,7 +1995,7 @@ s32 menuhandlerAntiPlayer(s32 operation, struct menuitem *item, union handlerdat
return (s32) langGet(labels[data->dropdown.value]);
case MENUOP_SET:
g_Vars.pendingantiplayernum = data->dropdown.value;
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
break;
case MENUOP_GETOPTIONVALUE:
data->dropdown.value = g_Vars.pendingantiplayernum;
@@ -4146,17 +4146,17 @@ s32 menudialog0010559c(s32 operation, struct menudialog *dialog, union handlerda
case MENUOP_OPEN:
break;
case MENUOP_CLOSE:
if ((g_Vars.modifiedfiles & MODFILE_SOLO) && g_Vars.coopplayernum < 0 && g_Vars.antiplayernum < 0) {
if ((g_Vars.modifiedfiles & MODFILE_GAME) && g_Vars.coopplayernum < 0 && g_Vars.antiplayernum < 0) {
if (func0f1094e4(&g_FilemgrLoadedMainFile, FILEOP_SAVE_GAME_001, 0) == 0) {
data->dialog1.preventclose = true;
}
g_Vars.modifiedfiles &= ~MODFILE_SOLO;
g_Vars.modifiedfiles &= ~MODFILE_GAME;
}
if (g_Vars.modifiedfiles & MODFILE_GLOBAL) {
mpsetupfileSave();
g_Vars.modifiedfiles &= ~MODFILE_GLOBAL;
if (g_Vars.modifiedfiles & MODFILE_BOSS) {
bossfileSave();
g_Vars.modifiedfiles &= ~MODFILE_BOSS;
}
break;
}
@@ -4226,7 +4226,7 @@ s32 menuhandlerLangFilter(s32 operation, struct menuitem *item, union handlerdat
return g_Vars.langfilteron;
case MENUOP_SET:
g_Vars.langfilteron = data->checkbox.value;
g_Vars.modifiedfiles |= MODFILE_SOLO;
g_Vars.modifiedfiles |= MODFILE_GAME;
}
return 0;
+13 -13
View File
@@ -149,7 +149,7 @@ void filemgrGetSelectName(char *buffer, struct filelistfile *file, u32 filetype)
break;
case FILETYPE_MPPLAYER:
// MP Player filenames have the play duration appended to the name
func0f18d9a4(file->unk06, namebuffer, &totalinseconds);
mpplayerfileGetOverview(file->unk06, namebuffer, &totalinseconds);
pos = sprintf(tmpbuffer1, "%s-", namebuffer);
if (totalinseconds >= 0x7ffffff) { // about 4.25 years
@@ -477,7 +477,7 @@ void filemgrHandleSuccess(void)
case FILEOP_LOAD_GAME:
g_Vars.unk00047c = g_Menus[g_MpPlayerNum].unke48;
g_Vars.unk000480 = g_Menus[g_MpPlayerNum].unke4c;
mpsetupfileSave();
bossfileSave();
if (IS4MB()) {
func0f0f820c(&g_MainMenu4MbMenuDialog, MENUROOT_4MBMAINMENU);
@@ -709,7 +709,7 @@ void filemgrRetrySave(s32 context)
}
#if VERSION >= VERSION_NTSC_1_0
bool filemgrAttemptOperation(s32 arg0, bool arg1)
bool filemgrAttemptOperation(s32 arg0, bool closeonsuccess)
{
s32 errno = 0;
bool showfilesaved = (g_Menus[g_MpPlayerNum].isretryingsave & 1) != 0;
@@ -728,13 +728,13 @@ bool filemgrAttemptOperation(s32 arg0, bool arg1)
g_Menus[g_MpPlayerNum].unke4c);
break;
case FILEOP_SAVE_MPPLAYER:
errno = func0f18d9fc(
errno = mpplayerfileSave(
g_Menus[g_MpPlayerNum].unke44, arg0,
g_Menus[g_MpPlayerNum].unke48,
g_Menus[g_MpPlayerNum].unke4c);
break;
case FILEOP_SAVE_MPSETUP:
errno = func0f18e420(arg0,
errno = mpsetupfileSave(arg0,
g_Menus[g_MpPlayerNum].unke48,
g_Menus[g_MpPlayerNum].unke4c);
showfilesaved = true;
@@ -754,14 +754,14 @@ bool filemgrAttemptOperation(s32 arg0, bool arg1)
errno = gamefileLoad(arg0);
break;
case FILEOP_LOAD_MPPLAYER:
errno = func0f18dac0(
errno = mpplayerfileLoad(
g_Menus[g_MpPlayerNum].unke44,
arg0,
g_Menus[g_MpPlayerNum].unke48,
g_Menus[g_MpPlayerNum].unke4c);
break;
case FILEOP_LOAD_MPSETUP:
errno = func0f18e4c8(arg0,
errno = mpsetupfileLoad(arg0,
g_Menus[g_MpPlayerNum].unke48,
g_Menus[g_MpPlayerNum].unke4c);
break;
@@ -774,7 +774,7 @@ bool filemgrAttemptOperation(s32 arg0, bool arg1)
break;
}
if (errno == 0 && arg1) {
if (errno == 0 && closeonsuccess) {
menuCloseDialog();
}
@@ -900,13 +900,13 @@ glabel var7f1ad424nb
/* f104b80: 8c440da0 */ lw $a0,0xda0($v0)
/* f104b84: 8fa50048 */ lw $a1,0x48($sp)
/* f104b88: 8c460da4 */ lw $a2,0xda4($v0)
/* f104b8c: 0fc61f00 */ jal func0f18d9fc
/* f104b8c: 0fc61f00 */ jal mpplayerfileSave
/* f104b90: 94470daa */ lhu $a3,0xdaa($v0)
/* f104b94: 10000041 */ beqz $zero,.NB0f104c9c
/* f104b98: 00403025 */ or $a2,$v0,$zero
/* f104b9c: 8fa40048 */ lw $a0,0x48($sp)
/* f104ba0: 8c450da4 */ lw $a1,0xda4($v0)
/* f104ba4: 0fc62178 */ jal func0f18e420
/* f104ba4: 0fc62178 */ jal mpsetupfileSave
/* f104ba8: 94460daa */ lhu $a2,0xdaa($v0)
/* f104bac: 240b0001 */ addiu $t3,$zero,0x1
/* f104bb0: 00403025 */ or $a2,$v0,$zero
@@ -949,13 +949,13 @@ glabel var7f1ad424nb
/* f104c44: 8c440da0 */ lw $a0,0xda0($v0)
/* f104c48: 8fa50048 */ lw $a1,0x48($sp)
/* f104c4c: 8c460da4 */ lw $a2,0xda4($v0)
/* f104c50: 0fc61f31 */ jal func0f18dac0
/* f104c50: 0fc61f31 */ jal mpplayerfileLoad
/* f104c54: 94470daa */ lhu $a3,0xdaa($v0)
/* f104c58: 10000010 */ beqz $zero,.NB0f104c9c
/* f104c5c: 00403025 */ or $a2,$v0,$zero
/* f104c60: 8fa40048 */ lw $a0,0x48($sp)
/* f104c64: 8c450da4 */ lw $a1,0xda4($v0)
/* f104c68: 0fc621a2 */ jal func0f18e4c8
/* f104c68: 0fc621a2 */ jal mpsetupfileLoad
/* f104c6c: 94460daa */ lhu $a2,0xdaa($v0)
/* f104c70: 1000000a */ beqz $zero,.NB0f104c9c
/* f104c74: 00403025 */ or $a2,$v0,$zero
@@ -1256,7 +1256,7 @@ void filemgrGetFileName(char *dst, struct filelistfile *file)
func0f0d564c(file->unk06, localbuffer, false);
break;
case FILETYPE_MPPLAYER:
func0f18d9a4(file->unk06, localbuffer, &sp20);
mpplayerfileGetOverview(file->unk06, localbuffer, &sp20);
break;
}
+52 -52
View File
@@ -47,8 +47,8 @@ u32 var800a2324;
u8 var800a2328;
u8 var800a2329;
u8 var800a232a;
s8 g_SoloCompleted;
u8 g_AltTitle;
s8 g_AltTitleUnlocked;
u8 g_AltTitleEnabled;
s32 var800a2330[1];
u32 var800a2334;
u32 var800a2338;
@@ -70,23 +70,23 @@ u32 var80075bf4 = 0;
u32 var80075bf8 = 0;
u32 var80075bfc = 0;
void func0f110680(void)
void bossfileSetDefaults2(void)
{
mpsetupfileLoadDefaults();
bossfileSetDefaults();
}
void func0f1106a0(void)
void bossfileSetAndSaveDefaults(void)
{
mpsetupfileLoadDefaults();
mpsetupfileSave();
bossfileSetDefaults();
bossfileSave();
}
#if VERSION >= VERSION_PAL_FINAL
GLOBAL_ASM(
glabel func0f1106c8
glabel bossfileLoadFull
/* f111198: 27bdffe8 */ addiu $sp,$sp,-24
/* f11119c: afbf0014 */ sw $ra,0x14($sp)
/* f1111a0: 0fc444ba */ jal mpsetupfileLoad
/* f1111a0: 0fc444ba */ jal bossfileLoad
/* f1111a4: 00000000 */ nop
/* f1111a8: 3c04800a */ lui $a0,0x800a
/* f1111ac: 0fc5bdd7 */ jal func0f16f75c
@@ -98,9 +98,9 @@ glabel func0f1106c8
/* f1111c4: 00000000 */ nop
);
#else
bool func0f1106c8(void)
bool bossfileLoadFull(void)
{
mpsetupfileLoad();
bossfileLoad();
return true;
}
#endif
@@ -195,9 +195,9 @@ glabel func0f110720
/* f110808: 27bd0850 */ addiu $sp,$sp,0x850
);
void mpsetupfileLoad(void)
void bossfileLoad(void)
{
bool sp124 = false;
bool failed = false;
struct savebuffer buffer;
s32 i;
s32 tmp;
@@ -206,16 +206,16 @@ void mpsetupfileLoad(void)
tmp = func0f110720();
if (tmp == 0) {
sp124 = true;
failed = true;
} else {
savebufferClear(&buffer);
if (func0f116800(4, tmp, buffer.bytes, 0)) {
sp124 = true;
failed = true;
}
}
if (!sp124) {
if (!failed) {
u8 tracknum;
func0f0d579c(&buffer, &thing);
@@ -223,40 +223,40 @@ void mpsetupfileLoad(void)
g_Vars.unk00047c = thing.unk00;
g_Vars.unk000480 = thing.unk04;
g_MpSetupFile.unk89 = savebufferReadBits(&buffer, 1);
g_BossFile.unk89 = savebufferReadBits(&buffer, 1);
g_Vars.unk000482 = savebufferReadBits(&buffer, 4);
for (i = 0; i < 8; i++) {
savebufferReadString(&buffer, g_MpSetupFile.teamnames[i], 1);
savebufferReadString(&buffer, g_BossFile.teamnames[i], 1);
}
tracknum = savebufferReadBits(&buffer, 8);
if (tracknum == 0xff) {
g_MpSetupFile.tracknum = -1;
g_BossFile.tracknum = -1;
} else {
g_MpSetupFile.tracknum = tracknum;
g_BossFile.tracknum = tracknum;
}
for (i = 0; i < 6; i++) {
g_MpSetupFile.multipletracknums[i] = savebufferReadBits(&buffer, 8);
g_BossFile.multipletracknums[i] = savebufferReadBits(&buffer, 8);
}
g_MpSetupFile.usingmultipletunes = savebufferReadBits(&buffer, 1);
g_SoloCompleted = savebufferReadBits(&buffer, 1);
g_AltTitle = savebufferReadBits(&buffer, 1);
g_BossFile.usingmultipletunes = savebufferReadBits(&buffer, 1);
g_AltTitleUnlocked = savebufferReadBits(&buffer, 1);
g_AltTitleEnabled = savebufferReadBits(&buffer, 1);
func0f0d54c4(&buffer);
}
if (sp124) {
mpsetupfileLoadDefaults();
mpsetupfileSave();
if (failed) {
bossfileSetDefaults();
bossfileSave();
}
}
void mpsetupfileSave(void)
void bossfileSave(void)
{
volatile bool sp12c = false;
struct savebuffer buffer;
@@ -272,26 +272,26 @@ void mpsetupfileSave(void)
func0f0d575c(&buffer, &thing);
savebufferOr(&buffer, g_MpSetupFile.unk89, 1);
savebufferOr(&buffer, g_BossFile.unk89, 1);
savebufferOr(&buffer, g_Vars.unk000482, 4);
for (i = 0; i < 8; i++) {
func0f0d55a4(&buffer, g_MpSetupFile.teamnames[i]);
func0f0d55a4(&buffer, g_BossFile.teamnames[i]);
}
if (g_MpSetupFile.tracknum == -1) {
if (g_BossFile.tracknum == -1) {
savebufferOr(&buffer, 0xff, 8);
} else {
savebufferOr(&buffer, g_MpSetupFile.tracknum, 8);
savebufferOr(&buffer, g_BossFile.tracknum, 8);
}
for (i = 0; i < 6; i++) {
savebufferOr(&buffer, g_MpSetupFile.multipletracknums[i], 8);
savebufferOr(&buffer, g_BossFile.multipletracknums[i], 8);
}
savebufferOr(&buffer, g_MpSetupFile.usingmultipletunes, 1);
savebufferOr(&buffer, (u8)g_SoloCompleted, 1);
savebufferOr(&buffer, g_AltTitle, 1);
savebufferOr(&buffer, g_BossFile.usingmultipletunes, 1);
savebufferOr(&buffer, (u8)g_AltTitleUnlocked, 1);
savebufferOr(&buffer, g_AltTitleEnabled, 1);
func0f0d54c4(&buffer);
@@ -306,29 +306,29 @@ void mpsetupfileSave(void)
}
}
void mpsetupfileLoadDefaults(void)
void bossfileSetDefaults(void)
{
g_MpSetupFile.teamnames[0][0] = '\0';
g_MpSetupFile.teamnames[1][0] = '\0';
g_MpSetupFile.teamnames[2][0] = '\0';
g_MpSetupFile.teamnames[3][0] = '\0';
g_MpSetupFile.teamnames[4][0] = '\0';
g_MpSetupFile.teamnames[5][0] = '\0';
g_MpSetupFile.teamnames[6][0] = '\0';
g_MpSetupFile.teamnames[7][0] = '\0';
g_BossFile.teamnames[0][0] = '\0';
g_BossFile.teamnames[1][0] = '\0';
g_BossFile.teamnames[2][0] = '\0';
g_BossFile.teamnames[3][0] = '\0';
g_BossFile.teamnames[4][0] = '\0';
g_BossFile.teamnames[5][0] = '\0';
g_BossFile.teamnames[6][0] = '\0';
g_BossFile.teamnames[7][0] = '\0';
g_MpSetupFile.tracknum = -1;
g_BossFile.tracknum = -1;
mpEnableAllMultiTracks();
g_MpSetupFile.usingmultipletunes = false;
g_MpSetupFile.unk89 = 0;
g_MpSetupFile.locktype = MPLOCKTYPE_NONE;
g_BossFile.usingmultipletunes = false;
g_BossFile.unk89 = 0;
g_BossFile.locktype = MPLOCKTYPE_NONE;
g_Vars.unk00047c = 0;
g_Vars.unk000480 = 0;
g_Vars.unk000482 = (PAL ? 7 : 0);
g_SoloCompleted = 0;
g_AltTitle = false;
g_AltTitleUnlocked = 0;
g_AltTitleEnabled = false;
mpsetupfileSave();
bossfileSave();
}
void func0f110bf0(void)
+1 -1
View File
@@ -999,7 +999,7 @@ glabel mpDetermineUnlockedFeatures
void mpPerformSanityChecks(void)
{
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
s32 numplayers = 0;
s32 i;
+1 -1
View File
@@ -9531,7 +9531,7 @@ Gfx *menuRenderItemRanking(Gfx *gdl, struct menurendercontext *context)
y = context->y + i * 10 - data->scrolloffset + 14;
if (team) {
gdl = textRenderProjected(gdl, &x, &y, g_MpSetupFile.teamnames[thisinfo->teamnum],
gdl = textRenderProjected(gdl, &x, &y, g_BossFile.teamnames[thisinfo->teamnum],
g_CharsHandelGothicSm, g_FontHandelGothicSm, textcolour, context->width, context->height, 0, 0);
} else {
gdl = textRenderProjected(gdl, &x, &y, thisinfo->mpchr->name,
+2 -2
View File
@@ -115,7 +115,7 @@ s32 menuhandlerMpEndGame(s32 operation, struct menuitem *item, union handlerdata
s32 menuhandler00178018(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupFile.locktype != MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -584,7 +584,7 @@ void mpPushEndscreenDialog(u32 arg0, u32 playernum)
g_Menus[g_MpPlayerNum].playernum = arg0;
if (g_MpSetup.options & MPOPTION_TEAMSENABLED) {
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_CheatsActiveBank0 || g_CheatsActiveBank1) {
menuPushRootDialog(&g_MpEndscreenChallengeCheatedMenuDialog, MENUROOT_MPENDSCREEN);
} else if (mpIsChallengeCompleteForEndscreen()) {
+35 -35
View File
@@ -38,7 +38,7 @@ u8 g_MpSimulantDifficultiesPerNumPlayers[32];
struct mpplayer g_MpPlayers[6];
u8 g_AmBotCommands[16];
struct mpsetup g_MpSetup;
struct mpsetupfile g_MpSetupFile;
struct bossfile g_BossFile;
u32 var800acc1c;
struct mplockinfo g_MpLockInfo;
struct modelfiledata *var800acc28[18];
@@ -621,8 +621,8 @@ void mpSetDefaultNamesIfEmpty(void)
// Team names
for (i = 0; i < 8; i++) {
if (g_MpSetupFile.teamnames[i][0] == '\0') {
strcpy(g_MpSetupFile.teamnames[i], langGet(L_OPTIONS_008 + i)); // "Red", "Yellow" etc
if (g_BossFile.teamnames[i][0] == '\0') {
strcpy(g_BossFile.teamnames[i], langGet(L_OPTIONS_008 + i)); // "Red", "Yellow" etc
}
}
@@ -639,7 +639,7 @@ s32 mpCalculateTeamScoreLimit(void)
s32 limit = g_MpSetup.teamscorelimit;
s32 i;
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE
&& g_MpSetup.teamscorelimit != 400
&& (g_MpSetup.scenario == MPSCENARIO_COMBAT || g_MpSetup.scenario == MPSCENARIO_KINGOFTHEHILL)) {
s32 numchrs = 0;
@@ -6941,7 +6941,7 @@ void mpEndMatch(void)
setCurrentPlayerNum(prevplayernum);
func0f18a56c();
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
mpConsiderMarkingCurrentChallengeComplete();
}
@@ -7205,9 +7205,9 @@ glabel mpChooseRandomLockPlayer
bool mpSetLock(s32 locktype, s32 playernum)
{
g_MpSetupFile.locktype = locktype;
g_BossFile.locktype = locktype;
if (g_MpSetupFile.locktype == MPLOCKTYPE_RANDOM) {
if (g_BossFile.locktype == MPLOCKTYPE_RANDOM) {
g_MpLockInfo.lockedplayernum = mpChooseRandomLockPlayer();
} else {
g_MpLockInfo.lockedplayernum = playernum;
@@ -7218,7 +7218,7 @@ bool mpSetLock(s32 locktype, s32 playernum)
s32 mpGetLockType(void)
{
return g_MpSetupFile.locktype;
return g_BossFile.locktype;
}
u32 mpGetLockPlayerNum(void)
@@ -7228,7 +7228,7 @@ u32 mpGetLockPlayerNum(void)
bool mpIsPlayerLockedOut(u32 playernum)
{
if (g_MpSetupFile.locktype == MPLOCKTYPE_NONE) {
if (g_BossFile.locktype == MPLOCKTYPE_NONE) {
return false;
}
@@ -7241,16 +7241,16 @@ bool mpIsPlayerLockedOut(u32 playernum)
void mpCalculateLockIfLastWinnerOrLoser(void)
{
if (g_MpSetupFile.locktype == MPLOCKTYPE_LASTWINNER && g_MpLockInfo.lastwinner >= 0) {
if (g_BossFile.locktype == MPLOCKTYPE_LASTWINNER && g_MpLockInfo.lastwinner >= 0) {
g_MpLockInfo.lockedplayernum = g_MpLockInfo.lastwinner;
}
if (g_MpSetupFile.locktype == MPLOCKTYPE_LASTLOSER && g_MpLockInfo.lastloser >= 0) {
if (g_BossFile.locktype == MPLOCKTYPE_LASTLOSER && g_MpLockInfo.lastloser >= 0) {
g_MpLockInfo.lockedplayernum = g_MpLockInfo.lastloser;
}
if (g_MpLockInfo.lockedplayernum >= 0
&& g_MpSetupFile.locktype != MPLOCKTYPE_CHALLENGE
&& g_BossFile.locktype != MPLOCKTYPE_CHALLENGE
&& (g_MpSetup.chrslots & (1 << g_MpLockInfo.lockedplayernum)) == 0) {
g_MpLockInfo.lastwinner = g_MpLockInfo.lastloser = -1;
g_MpLockInfo.lockedplayernum = mpChooseRandomLockPlayer();
@@ -7376,12 +7376,12 @@ char *mpGetTrackName(s32 slotindex)
void mpSetUsingMultipleTunes(bool enable)
{
g_MpSetupFile.usingmultipletunes = enable;
g_BossFile.usingmultipletunes = enable;
}
bool mpGetUsingMultipleTunes(void)
{
return g_MpSetupFile.usingmultipletunes;
return g_BossFile.usingmultipletunes;
}
bool mpIsMultiTrackSlotEnabled(s32 slot)
@@ -7390,7 +7390,7 @@ bool mpIsMultiTrackSlotEnabled(s32 slot)
u8 index = tracknum >> 3;
u8 value = 1 << (tracknum & 7);
if ((g_MpSetupFile.multipletracknums[index] & value) == 0) {
if ((g_BossFile.multipletracknums[index] & value) == 0) {
return false;
}
@@ -7404,9 +7404,9 @@ void mpSetMultiTrackSlotEnabled(s32 slot, bool enable)
u8 index = tracknum >> 3;
if (enable) {
g_MpSetupFile.multipletracknums[index] |= value;
g_BossFile.multipletracknums[index] |= value;
} else {
g_MpSetupFile.multipletracknums[index] &= ~value;
g_BossFile.multipletracknums[index] &= ~value;
}
}
@@ -7415,7 +7415,7 @@ void mpSetTrackSlotEnabled(s32 slot)
if (mpGetUsingMultipleTunes()) {
mpSetMultiTrackSlotEnabled(slot, 1 - mpIsMultiTrackSlotEnabled(slot));
} else {
g_MpSetupFile.tracknum = mpGetTrackNumAtSlotIndex(slot);
g_BossFile.tracknum = mpGetTrackNumAtSlotIndex(slot);
}
}
@@ -7424,7 +7424,7 @@ void mpEnableAllMultiTracks(void)
s32 i;
for (i = 0; i != 6; i++) {
g_MpSetupFile.multipletracknums[i] = 0xff;
g_BossFile.multipletracknums[i] = 0xff;
}
}
@@ -7433,7 +7433,7 @@ void mpDisableAllMultiTracks(void)
s32 i;
for (i = 0; i != 6; i++) {
g_MpSetupFile.multipletracknums[i] = 0;
g_BossFile.multipletracknums[i] = 0;
}
}
@@ -7442,22 +7442,22 @@ void mpRandomiseMultiTracks(void)
s32 i;
for (i = 0; i != 6; i++) {
g_MpSetupFile.multipletracknums[i] = random();
g_BossFile.multipletracknums[i] = random();
}
}
void mpSetTrackToRandom(void)
{
g_MpSetupFile.tracknum = -1;
g_BossFile.tracknum = -1;
}
s32 mpGetCurrentTrackSlotNum(void)
{
if (g_MpSetupFile.tracknum < 0) {
return g_MpSetupFile.tracknum;
if (g_BossFile.tracknum < 0) {
return g_BossFile.tracknum;
}
return mpGetTrackSlotIndex(g_MpSetupFile.tracknum);
return mpGetTrackSlotIndex(g_BossFile.tracknum);
}
#if VERSION >= VERSION_PAL_FINAL
@@ -9111,7 +9111,7 @@ glabel func0f18d5c4
);
GLOBAL_ASM(
glabel func0f18d9a4
glabel mpplayerfileGetOverview
/* f18d9a4: 27bdff08 */ addiu $sp,$sp,-248
/* f18d9a8: afa500fc */ sw $a1,0xfc($sp)
/* f18d9ac: 00802825 */ or $a1,$a0,$zero
@@ -9137,7 +9137,7 @@ glabel func0f18d9a4
);
GLOBAL_ASM(
glabel func0f18d9fc
glabel mpplayerfileSave
/* f18d9fc: 27bdfef8 */ addiu $sp,$sp,-264
/* f18da00: afbf001c */ sw $ra,0x1c($sp)
/* f18da04: afa40108 */ sw $a0,0x108($sp)
@@ -9193,7 +9193,7 @@ glabel func0f18d9fc
);
GLOBAL_ASM(
glabel func0f18dac0
glabel mpplayerfileLoad
/* f18dac0: 27bdff00 */ addiu $sp,$sp,-256
/* f18dac4: afbf0014 */ sw $ra,0x14($sp)
/* f18dac8: afa40100 */ sw $a0,0x100($sp)
@@ -9759,7 +9759,7 @@ glabel func0f18dec4
/* f18df58: 27bd0200 */ addiu $sp,$sp,0x200
);
void func0f18df5c(struct savebuffer *buffer)
void mpsetupfileLoadWad(struct savebuffer *buffer)
{
s32 i;
s32 j;
@@ -9814,7 +9814,7 @@ void func0f18df5c(struct savebuffer *buffer)
}
GLOBAL_ASM(
glabel func0f18e16c
glabel mpsetupfileSaveWad
/* f18e16c: 27bdffd8 */ addiu $sp,$sp,-40
/* f18e170: afb30020 */ sw $s3,0x20($sp)
/* f18e174: 3c13800b */ lui $s3,%hi(g_MpSetup)
@@ -9968,7 +9968,7 @@ glabel func0f18e16c
);
GLOBAL_ASM(
glabel func0f18e39c
glabel mpsetupfileGetOverview
/* f18e39c: 27bdff08 */ addiu $sp,$sp,-248
/* f18e3a0: afa500fc */ sw $a1,0xfc($sp)
/* f18e3a4: 00802825 */ or $a1,$a0,$zero
@@ -10005,7 +10005,7 @@ glabel func0f18e39c
);
GLOBAL_ASM(
glabel func0f18e420
glabel mpsetupfileSave
/* f18e420: 27bdfef8 */ addiu $sp,$sp,-264
/* f18e424: afbf001c */ sw $ra,0x1c($sp)
/* f18e428: afa40108 */ sw $a0,0x108($sp)
@@ -10014,7 +10014,7 @@ glabel func0f18e420
/* f18e434: afa60110 */ sw $a2,0x110($sp)
/* f18e438: 0fc35517 */ jal savebufferClear
/* f18e43c: 27a40020 */ addiu $a0,$sp,0x20
/* f18e440: 0fc6385b */ jal func0f18e16c
/* f18e440: 0fc6385b */ jal mpsetupfileSaveWad
/* f18e444: 27a40020 */ addiu $a0,$sp,0x20
/* f18e448: 0fc35531 */ jal func0f0d54c4
/* f18e44c: 27a40020 */ addiu $a0,$sp,0x20
@@ -10053,7 +10053,7 @@ glabel func0f18e420
/* f18e4c4: 00000000 */ nop
);
s32 func0f18e4c8(s32 arg0, s32 arg1, u16 arg2)
s32 mpsetupfileLoad(s32 arg0, s32 arg1, u16 arg2)
{
s32 tmp;
struct savebuffer buffer;
@@ -10066,7 +10066,7 @@ s32 func0f18e4c8(s32 arg0, s32 arg1, u16 arg2)
g_MpSetup.unk20.unk00 = arg1;
g_MpSetup.unk20.unk04 = arg2;
func0f18df5c(&buffer);
mpsetupfileLoadWad(&buffer);
func0f0d54c4(&buffer);
return 0;
+2 -2
View File
@@ -8894,7 +8894,7 @@ void mpCreateMatchStartHudmsgs(void)
char challengename[60];
char scenarioname[60];
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
sprintf(challengename, "%s:\n", mpGetChallengeNameBySlot(mpGetCurrentChallengeIndex()));
}
@@ -8904,7 +8904,7 @@ void mpCreateMatchStartHudmsgs(void)
if (g_MpPlayerChrs[i]->aibot == NULL) {
setCurrentPlayerNum(i);
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
hudmsgCreateWithFlags(challengename, HUDMSGTYPE_DEFAULT, HUDMSGFLAG_ONLYIFALIVE);
}
+11 -11
View File
@@ -4068,7 +4068,7 @@ char *mpMenuTextMpconfigMarquee(struct menuitem *item)
arenanum = 0;
#endif
func0f18e39c(g_FileLists[1]->files[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].unk06,
mpsetupfileGetOverview(g_FileLists[1]->files[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].unk06,
filename, &numsims, &stagenum, &scenarionum);
for (i = 0; i < ARRAYCOUNT(g_MpArenas); i++) {
@@ -5899,7 +5899,7 @@ s32 func0f17dac4(s32 operation, struct menuitem *item, union handlerdata *data)
return (s32) "\n";
}
return (s32) g_MpSetupFile.teamnames[data->list.value];
return (s32) g_BossFile.teamnames[data->list.value];
}
return menuhandlerMpTeamsLabel(operation, item, data);
@@ -6307,7 +6307,7 @@ char *mpMenuTextTeamName(struct menuitem *item)
s32 index = item->param2;
index -= L_OPTIONS_008;
return g_MpSetupFile.teamnames[index];
return g_BossFile.teamnames[index];
}
s32 menuhandlerMpTeamNameSlot(s32 operation, struct menuitem *item, union handlerdata *data)
@@ -6357,7 +6357,7 @@ s32 menudialog0017e3fc(s32 operation, struct menudialog *dialog, union handlerda
case MENUOP_CLOSE:
break;
case MENUOP_TICK:
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
menuPopDialog();
}
break;
@@ -7135,7 +7135,7 @@ glabel var7f1b2b7cnb
s32 menuhandler0017e9d8(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupFile.locktype != MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -7146,7 +7146,7 @@ s32 menuhandler0017e9d8(s32 operation, struct menuitem *item, union handlerdata
s32 menuhandlerMpAbortChallenge(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupFile.locktype != MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -7161,7 +7161,7 @@ s32 menuhandlerMpAbortChallenge(s32 operation, struct menuitem *item, union hand
s32 menuhandlerMpStartChallenge(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpSetupFile.locktype != MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -7175,7 +7175,7 @@ s32 menuhandlerMpStartChallenge(s32 operation, struct menuitem *item, union hand
char *mpMenuTextChallengeName(struct menuitem *item)
{
#if VERSION >= VERSION_NTSC_1_0
if (g_MpSetupFile.locktype != MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype != MPLOCKTYPE_CHALLENGE) {
return langGet(L_MPMENU_050); // "Combat Challenges"
}
#endif
@@ -7187,7 +7187,7 @@ char *mpMenuTextChallengeName(struct menuitem *item)
s32 mpCombatChallengesMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE
&& g_Menus[g_MpPlayerNum].curframe
&& g_Menus[g_MpPlayerNum].curframe->dialog == dialog
&& !mpIsChallengeLoaded()) {
@@ -7645,7 +7645,7 @@ s32 menuhandlerPlayerTeam(s32 operation, struct menuitem *item, union handlerdat
data->dropdown.value = 8;
break;
case MENUOP_GETOPTIONTEXT:
return (s32) &g_MpSetupFile.teamnames[data->dropdown.value];
return (s32) &g_BossFile.teamnames[data->dropdown.value];
case MENUOP_SET:
g_Vars.mpplayerteams[item->param] = data->dropdown.value;
break;
@@ -8206,7 +8206,7 @@ void func0f17fcb0(s32 silent)
menuPushRootDialog(&g_AdvancedSetup4MbMenuDialog, MENUROOT_4MBMAINMENU);
func0f0f8300();
} else {
if (g_MpSetupFile.locktype == MPLOCKTYPE_CHALLENGE) {
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
menuPushRootDialog(&g_MpChallengeListOrDetailsViaAdvChallengeMenuDialog, MENUROOT_MPSETUP);
} else {
menuPushRootDialog(&g_MpAdvancedSetupMenuDialog, MENUROOT_MPSETUP);
+2 -2
View File
@@ -3009,7 +3009,7 @@ void func0f1189d8(void)
g_Vars.paksconnected = 0x10;
func0f1169c8(SAVEDEVICE_GAMEPAK, 1);
func0f1106c8();
bossfileLoadFull();
gamefileLoadDefaults(&g_GameFile);
gamefileApplyOptions(&g_GameFile);
@@ -3083,7 +3083,7 @@ glabel func0f1189d8
/* f112e10: 240b0001 */ addiu $t3,$zero,0x1
/* f112e14: 0fc45920 */ jal pakExecuteDebugOperations
/* f112e18: 00000000 */ sll $zero,$zero,0x0
/* f112e1c: 0fc42ace */ jal func0f1106c8
/* f112e1c: 0fc42ace */ jal bossfileLoadFull
/* f112e20: 00000000 */ sll $zero,$zero,0x0
/* f112e24: 3c10800a */ lui $s0,0x800a
/* f112e28: 261066f0 */ addiu $s0,$s0,0x66f0
+1 -1
View File
@@ -1810,7 +1810,7 @@ void titleTickPdLogo(void)
var8009ccb8 = 1 - var8009ccb8;
if (var80062734) {
if (g_AltTitle && IS8MB()) {
if (g_AltTitleEnabled && IS8MB()) {
g_TitleMode = TITLEMODE_SKIP;
creditsRequestAltTitle();
g_TitleNextStage = STAGE_CREDITS; // for alt title screen
+3 -3
View File
@@ -200,8 +200,8 @@ extern u32 g_CheatsEnabledBank1;
extern struct savelocation_2d8 var800a21f8;
extern struct gamefile g_GameFile;
extern struct savelocation_2d8 g_FilemgrLoadedMainFile;
extern s8 g_SoloCompleted;
extern u8 g_AltTitle;
extern s8 g_AltTitleUnlocked;
extern u8 g_AltTitleEnabled;
extern struct padsfileheader *g_PadsFile;
extern u16 *g_PadOffsets;
extern u16 *g_CoverFlags;
@@ -302,7 +302,7 @@ extern u8 g_MpSimulantDifficultiesPerNumPlayers[32];
extern struct mpplayer g_MpPlayers[6];
extern u8 g_AmBotCommands[16];
extern struct mpsetup g_MpSetup;
extern struct mpsetupfile g_MpSetupFile;
extern struct bossfile g_BossFile;
extern struct chrdata *g_MpSimulantChrs[MAX_SIMULANTS];
#endif
+2 -2
View File
@@ -2267,9 +2267,9 @@
#define MODELTYPE_WIREFENCE 0xc8
#define MODELTYPE_HAND 0xfa
#define MODFILE_SOLO 1
#define MODFILE_GAME 1
#define MODFILE_MPSETUP 2
#define MODFILE_GLOBAL 4
#define MODFILE_BOSS 4
#define MOVEMODE_WALK 0
#define MOVEMODE_BIKE 3
+1 -1
View File
@@ -22,7 +22,7 @@ void filemgrHandleSuccess(void);
void filemgrEraseCorruptFile(void);
char *filemgrMenuTextInsertOriginalPak(struct menuitem *item);
void filemgrRetrySave(s32 arg0);
bool filemgrAttemptOperation(s32 arg0, bool arg1);
bool filemgrAttemptOperation(s32 arg0, bool closeonsuccess);
bool func0f1094e4(struct savelocation_2d8 *arg0, s32 fileop, void *arg2);
void filemgrDeleteCurrentFile(void);
void func0f1097d0(s32 device);
+4 -4
View File
@@ -4,11 +4,11 @@
#include "data.h"
#include "types.h"
bool func0f1106c8(void);
bool bossfileLoadFull(void);
u32 func0f110720(void);
void mpsetupfileLoad(void);
void mpsetupfileSave(void);
void mpsetupfileLoadDefaults(void);
void bossfileLoad(void);
void bossfileSave(void);
void bossfileSetDefaults(void);
void func0f110bf0(void);
void func0f110bf8(void);
void func0f110c5c(s32 listnum, u8 filetype);
+8 -8
View File
@@ -101,20 +101,20 @@ u32 func0f18d1b8(void);
u32 func0f18d238(void);
u32 func0f18d2b8(void);
u32 func0f18d5c4(void);
void func0f18d9a4(char *arg0, char *buffer, u32 *arg2);
s32 func0f18d9fc(void *arg0, s32 arg1, s32 arg2, u16 arg3);
s32 func0f18dac0(void *arg0, s32 arg1, s32 arg2, u16 arg3);
void mpplayerfileGetOverview(char *arg0, char *buffer, u32 *arg2);
s32 mpplayerfileSave(void *arg0, s32 arg1, s32 arg2, u16 arg3);
s32 mpplayerfileLoad(void *arg0, s32 arg1, s32 arg2, u16 arg3);
s32 mpGetNumPresets(void);
bool mpIsPresetUnlocked(s32 presetnum);
s32 mpGetNumUnlockedPresets(void);
char *mpGetPresetNameBySlot(s32 slot);
void func0f18dcec(struct mpconfigfull *mpconfig);
u32 func0f18dec4(void);
void func0f18df5c(struct savebuffer *buffer);
u32 func0f18e16c(void);
void func0f18e39c(char *arg0, char *filename, u16 *numsims, u16 *stagenum, u16 *scenarionum);
s32 func0f18e420(s32 arg0, s32 arg1, u16 arg2);
s32 func0f18e4c8(s32 arg0, s32 arg1, u16 arg2);
void mpsetupfileLoadWad(struct savebuffer *buffer);
u32 mpsetupfileSaveWad(void);
void mpsetupfileGetOverview(char *arg0, char *filename, u16 *numsims, u16 *stagenum, u16 *scenarionum);
s32 mpsetupfileSave(s32 arg0, s32 arg1, u16 arg2);
s32 mpsetupfileLoad(s32 arg0, s32 arg1, u16 arg2);
void func0f18e558(void);
struct modelfiledata *func0f18e57c(s32 index, s32 *headnum);
+1 -1
View File
@@ -4619,7 +4619,7 @@ struct mpsetup {
/*0x800acba8*/ struct savelocation_2d8 unk20;
};
struct mpsetupfile {
struct bossfile {
/*0x00*/ char teamnames[8][12];
/*0x60*/ u8 locktype;
/*0x61*/ u8 unk89;