From 7a0f4b583506240e3164c35960fa19a6feed43bb Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 16 Sep 2021 23:42:06 +1000 Subject: [PATCH] Rename game_0d4690.c to savebuffer.c, game_102240.c to mainmenu.c, game_107fb0.c to filemgr.c and split game_110680.c into bossfile.c and filelist.c --- ld/gamefiles.ntsc-beta.inc | 9 +- ld/gamefiles.ntsc-final.inc | 9 +- ld/gamefiles.pal-final.inc | 9 +- src/game/activemenu/activemenu.c | 2 +- src/game/bondview.c | 2 +- src/game/bossfile.c | 225 ++++++++++++++++++ src/game/credits.c | 2 +- src/game/data/data_020df0.c | 4 +- src/game/endscreen.c | 6 +- src/game/{game_110680.c => filelist.c} | 211 +--------------- src/game/{game_107fb0.c => filemgr.c} | 7 +- src/game/game_006bd0.c | 2 +- src/game/game_01bea0.c | 2 +- src/game/game_0b63b0.c | 4 +- src/game/game_0b69d0.c | 4 +- src/game/game_0e0770.c | 2 +- src/game/game_0f09f0.c | 4 +- src/game/game_10c9c0.c | 4 +- src/game/game_1531a0.c | 2 +- src/game/game_1577f0.c | 2 +- src/game/game_1a7560.c | 2 +- src/game/gamefile.c | 2 +- src/game/hudmsg.c | 2 +- src/game/lv.c | 4 +- src/game/{game_102240.c => mainmenu.c} | 4 +- src/game/menu/items.c | 2 +- src/game/mplayer/ingame.c | 6 +- src/game/mplayer/mplayer.c | 2 +- src/game/mplayer/scenarios.c | 2 +- src/game/mplayer/setup.c | 6 +- src/game/nbomb.c | 2 +- src/game/{game_0d4690.c => savebuffer.c} | 2 +- src/game/sight.c | 2 +- src/game/training/menus.c | 2 +- src/game/training/training.c | 2 +- src/include/game/bossfile.h | 13 + .../game/{game_110680.h => filelist.h} | 9 +- src/include/game/{game_107fb0.h => filemgr.h} | 4 +- .../game/{game_102240.h => mainmenu.h} | 4 +- .../game/{game_0d4690.h => savebuffer.h} | 4 +- 40 files changed, 309 insertions(+), 279 deletions(-) create mode 100644 src/game/bossfile.c rename src/game/{game_110680.c => filelist.c} (77%) rename src/game/{game_107fb0.c => filemgr.c} (99%) rename src/game/{game_102240.c => mainmenu.c} (99%) rename src/game/{game_0d4690.c => savebuffer.c} (99%) create mode 100644 src/include/game/bossfile.h rename src/include/game/{game_110680.h => filelist.h} (60%) rename src/include/game/{game_107fb0.h => filemgr.h} (98%) rename src/include/game/{game_102240.h => mainmenu.h} (98%) rename src/include/game/{game_0d4690.h => savebuffer.h} (94%) diff --git a/ld/gamefiles.ntsc-beta.inc b/ld/gamefiles.ntsc-beta.inc index 42385b986..1b9cb5476 100644 --- a/ld/gamefiles.ntsc-beta.inc +++ b/ld/gamefiles.ntsc-beta.inc @@ -113,7 +113,7 @@ build/ROMID/game/bondgrab.o (section); \ build/ROMID/game/bondeyespy.o (section); \ build/ROMID/game/bondbike.o (section); \ - build/ROMID/game/game_0d4690.o (section); \ + build/ROMID/game/savebuffer.o (section); \ build/ROMID/game/healthbar.o (section); \ build/ROMID/game/sight.o (section); \ build/ROMID/game/hudmsg.o (section); \ @@ -122,13 +122,14 @@ build/ROMID/game/game_0f09f0.o (section); \ build/ROMID/game/activemenu/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ - build/ROMID/game/game_102240.o (section); \ + build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ - build/ROMID/game/game_107fb0.o (section); \ + build/ROMID/game/filemgr.o (section); \ build/ROMID/game/game_10c9c0.o (section); \ build/ROMID/game/endscreen.o (section); \ build/ROMID/game/gamefile.o (section); \ - build/ROMID/game/game_110680.o (section); \ + build/ROMID/game/bossfile.o (section); \ + build/ROMID/game/filelist.o (section); \ build/ROMID/game/inventory/inventory.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ diff --git a/ld/gamefiles.ntsc-final.inc b/ld/gamefiles.ntsc-final.inc index 10b95406b..cd4ad0b6f 100644 --- a/ld/gamefiles.ntsc-final.inc +++ b/ld/gamefiles.ntsc-final.inc @@ -113,7 +113,7 @@ build/ROMID/game/bondgrab.o (section); \ build/ROMID/game/bondeyespy.o (section); \ build/ROMID/game/bondbike.o (section); \ - build/ROMID/game/game_0d4690.o (section); \ + build/ROMID/game/savebuffer.o (section); \ build/ROMID/game/healthbar.o (section); \ build/ROMID/game/sight.o (section); \ build/ROMID/game/hudmsg.o (section); \ @@ -122,13 +122,14 @@ build/ROMID/game/game_0f09f0.o (section); \ build/ROMID/game/activemenu/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ - build/ROMID/game/game_102240.o (section); \ + build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ - build/ROMID/game/game_107fb0.o (section); \ + build/ROMID/game/filemgr.o (section); \ build/ROMID/game/game_10c9c0.o (section); \ build/ROMID/game/endscreen.o (section); \ build/ROMID/game/gamefile.o (section); \ - build/ROMID/game/game_110680.o (section); \ + build/ROMID/game/bossfile.o (section); \ + build/ROMID/game/filelist.o (section); \ build/ROMID/game/inventory/inventory.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ diff --git a/ld/gamefiles.pal-final.inc b/ld/gamefiles.pal-final.inc index 10b95406b..cd4ad0b6f 100644 --- a/ld/gamefiles.pal-final.inc +++ b/ld/gamefiles.pal-final.inc @@ -113,7 +113,7 @@ build/ROMID/game/bondgrab.o (section); \ build/ROMID/game/bondeyespy.o (section); \ build/ROMID/game/bondbike.o (section); \ - build/ROMID/game/game_0d4690.o (section); \ + build/ROMID/game/savebuffer.o (section); \ build/ROMID/game/healthbar.o (section); \ build/ROMID/game/sight.o (section); \ build/ROMID/game/hudmsg.o (section); \ @@ -122,13 +122,14 @@ build/ROMID/game/game_0f09f0.o (section); \ build/ROMID/game/activemenu/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ - build/ROMID/game/game_102240.o (section); \ + build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ - build/ROMID/game/game_107fb0.o (section); \ + build/ROMID/game/filemgr.o (section); \ build/ROMID/game/game_10c9c0.o (section); \ build/ROMID/game/endscreen.o (section); \ build/ROMID/game/gamefile.o (section); \ - build/ROMID/game/game_110680.o (section); \ + build/ROMID/game/bossfile.o (section); \ + build/ROMID/game/filelist.o (section); \ build/ROMID/game/inventory/inventory.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ diff --git a/src/game/activemenu/activemenu.c b/src/game/activemenu/activemenu.c index 748b7bb9a..66a19ee08 100644 --- a/src/game/activemenu/activemenu.c +++ b/src/game/activemenu/activemenu.c @@ -5,7 +5,7 @@ #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0f09f0.h" #include "game/inventory/inventory.h" #include "game/game_1531a0.h" diff --git a/src/game/bondview.c b/src/game/bondview.c index 067c48759..cffb28b40 100644 --- a/src/game/bondview.c +++ b/src/game/bondview.c @@ -3,7 +3,7 @@ #include "game/dlights.h" #include "game/game_006900.h" #include "game/atan2f.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_11f000.h" #include "game/bondview.h" #include "game/game_1531a0.h" diff --git a/src/game/bossfile.c b/src/game/bossfile.c new file mode 100644 index 000000000..a0f69434c --- /dev/null +++ b/src/game/bossfile.c @@ -0,0 +1,225 @@ +#include +#include "constants.h" +#include "constants.h" +#include "game/camdraw.h" +#include "game/cheats.h" +#include "game/game_0b69d0.h" +#include "game/savebuffer.h" +#include "game/bossfile.h" +#include "game/bg.h" +#include "game/game_19aa80.h" +#include "game/training/training.h" +#include "game/gamefile.h" +#include "game/mplayer/mplayer.h" +#include "game/pak/pak.h" +#include "game/options.h" +#include "game/utils.h" +#include "bss.h" +#include "lib/lib_0bfb0.h" +#include "lib/snd.h" +#include "lib/lib_126b0.h" +#include "lib/lib_4b170.h" +#include "data.h" +#include "types.h" + +u8 var800a22d0[0x5b]; +s8 g_AltTitleUnlocked; +u8 g_AltTitleEnabled; + +void bossfileSetDefaults2(void) +{ + bossfileSetDefaults(); +} + +void bossfileSetAndSaveDefaults(void) +{ + bossfileSetDefaults(); + bossfileSave(); +} + +bool bossfileLoadFull(void) +{ + bossfileLoad(); + +#if PAL + func0f16f75c(g_Vars.unk000482); +#endif + + return true; +} + +void func0f1106ec(void) +{ + // empty +} + +void func0f1106f4(u8 *dst) +{ + bcopy(var800a22d0, dst, sizeof(var800a22d0)); +} + +u32 func0f110720(void) +{ + struct pakthing16 sp840; + u32 sp3c[513]; + u32 sp38 = 0; + s32 i; + + if (func0f1167b0(SAVEDEVICE_GAMEPAK, 0x10, sp3c) == 0) { + for (i = 0; sp3c[i] != 0; i++) { + func0f119368(SAVEDEVICE_GAMEPAK, sp3c[i], &sp840); + + if (sp840.unk0c_22 == 0) { + sp38 = sp3c[i]; + break; + } + } + + for (i = 0; sp3c[i] != 0; i++) { + func0f119368(SAVEDEVICE_GAMEPAK, sp3c[i], &sp840); + + if (sp840.unk0c_22) { + sp38 = sp3c[i]; + break; + } + } + } + + return sp38; +} + +void bossfileLoad(void) +{ + bool failed = false; + struct savebuffer buffer; + s32 i; + s32 tmp; + struct fileguid guid; + + tmp = func0f110720(); + + if (tmp == 0) { + failed = true; + } else { + savebufferClear(&buffer); + + if (func0f116800(SAVEDEVICE_GAMEPAK, tmp, buffer.bytes, 0)) { + failed = true; + } + } + + if (!failed) { + u8 tracknum; + + savebufferReadGuid(&buffer, &guid); + + g_Vars.bossfilenum = guid.filenum; + g_Vars.bossdeviceserial = guid.deviceserial; + + g_BossFile.unk89 = savebufferReadBits(&buffer, 1); + + g_Vars.unk000482 = savebufferReadBits(&buffer, 4); + + for (i = 0; i < 8; i++) { + savebufferReadString(&buffer, g_BossFile.teamnames[i], 1); + } + + tracknum = savebufferReadBits(&buffer, 8); + + if (tracknum == 0xff) { + g_BossFile.tracknum = -1; + } else { + g_BossFile.tracknum = tracknum; + } + + for (i = 0; i < 6; i++) { + g_BossFile.multipletracknums[i] = savebufferReadBits(&buffer, 8); + } + + g_BossFile.usingmultipletunes = savebufferReadBits(&buffer, 1); + g_AltTitleUnlocked = savebufferReadBits(&buffer, 1); + g_AltTitleEnabled = savebufferReadBits(&buffer, 1); + + func0f0d54c4(&buffer); + } + + if (failed) { + bossfileSetDefaults(); + bossfileSave(); + } +} + +void bossfileSave(void) +{ + volatile bool sp12c = false; + struct savebuffer buffer; + struct fileguid guid; + u32 stack; + s32 i; + s32 tmp; + + savebufferClear(&buffer); + + guid.filenum = g_Vars.bossfilenum; + guid.deviceserial = g_Vars.bossdeviceserial; + + savebufferWriteGuid(&buffer, &guid); + + savebufferOr(&buffer, g_BossFile.unk89, 1); + savebufferOr(&buffer, g_Vars.unk000482, 4); + + for (i = 0; i < 8; i++) { + func0f0d55a4(&buffer, g_BossFile.teamnames[i]); + } + + if (g_BossFile.tracknum == -1) { + savebufferOr(&buffer, 0xff, 8); + } else { + savebufferOr(&buffer, g_BossFile.tracknum, 8); + } + + for (i = 0; i < 6; i++) { + savebufferOr(&buffer, g_BossFile.multipletracknums[i], 8); + } + + savebufferOr(&buffer, g_BossFile.usingmultipletunes, 1); + savebufferOr(&buffer, (u8)g_AltTitleUnlocked, 1); + savebufferOr(&buffer, g_AltTitleEnabled, 1); + + func0f0d54c4(&buffer); + + tmp = func0f110720(); + + if (tmp == 0) { + faultAssert("fileGuid", "bossfile.c", PAL ? 377 : 375); + } + + if (func0f116828(SAVEDEVICE_GAMEPAK, tmp, 0x10, buffer.bytes, NULL, 0)) { + sp12c = true; + } +} + +void bossfileSetDefaults(void) +{ + 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_BossFile.tracknum = -1; + mpEnableAllMultiTracks(); + g_BossFile.usingmultipletunes = false; + g_BossFile.unk89 = 0; + g_BossFile.locktype = MPLOCKTYPE_NONE; + g_Vars.bossfilenum = 0; + g_Vars.bossdeviceserial = 0; + g_Vars.unk000482 = (PAL ? 7 : 0); + g_AltTitleUnlocked = 0; + g_AltTitleEnabled = false; + + bossfileSave(); +} diff --git a/src/game/credits.c b/src/game/credits.c index 8c42ecc26..2a060d808 100644 --- a/src/game/credits.c +++ b/src/game/credits.c @@ -4,7 +4,7 @@ #include "game/title.h" #include "game/game_0b3350.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0e0770.h" #include "game/game_0f09f0.h" #include "game/credits.h" diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index cfc51c4e3..15d347d3e 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -1,9 +1,9 @@ #include #include "game/chr/chraicommands.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" +#include "game/mainmenu.h" #include "game/cheats.h" -#include "game/game_107fb0.h" +#include "game/filemgr.h" #include "game/endscreen.h" #include "game/camdraw.h" #include "game/timing.h" diff --git a/src/game/endscreen.c b/src/game/endscreen.c index 6e965e21d..b7dff0bde 100644 --- a/src/game/endscreen.c +++ b/src/game/endscreen.c @@ -8,11 +8,11 @@ #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0e0770.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" -#include "game/game_107fb0.h" +#include "game/mainmenu.h" +#include "game/filemgr.h" #include "game/endscreen.h" #include "game/game_1655c0.h" #include "game/lv.h" diff --git a/src/game/game_110680.c b/src/game/filelist.c similarity index 77% rename from src/game/game_110680.c rename to src/game/filelist.c index 687c62cc5..a0f445125 100644 --- a/src/game/game_110680.c +++ b/src/game/filelist.c @@ -4,8 +4,8 @@ #include "game/camdraw.h" #include "game/cheats.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" -#include "game/game_110680.h" +#include "game/savebuffer.h" +#include "game/filelist.h" #include "game/bg.h" #include "game/game_19aa80.h" #include "game/training/training.h" @@ -22,217 +22,13 @@ #include "data.h" #include "types.h" -u8 var800a22d0[0x5b]; -s8 g_AltTitleUnlocked; -u8 g_AltTitleEnabled; s32 var800a2330[5]; -u32 var800a2344; -u32 var800a2348; -u32 var800a234c; struct filelist *g_FileLists[] = { NULL, NULL, NULL, NULL }; bool var80075bd0[] = { true, true, true, true }; bool var80075be0[] = { false, false, false, false }; u32 var80075bf0 = false; -void bossfileSetDefaults2(void) -{ - bossfileSetDefaults(); -} - -void bossfileSetAndSaveDefaults(void) -{ - bossfileSetDefaults(); - bossfileSave(); -} - -bool bossfileLoadFull(void) -{ - bossfileLoad(); - -#if PAL - func0f16f75c(g_Vars.unk000482); -#endif - - return true; -} - -void func0f1106ec(void) -{ - // empty -} - -void func0f1106f4(u8 *dst) -{ - bcopy(var800a22d0, dst, sizeof(var800a22d0)); -} - -u32 func0f110720(void) -{ - struct pakthing16 sp840; - u32 sp3c[513]; - u32 sp38 = 0; - s32 i; - - if (func0f1167b0(SAVEDEVICE_GAMEPAK, 0x10, sp3c) == 0) { - for (i = 0; sp3c[i] != 0; i++) { - func0f119368(SAVEDEVICE_GAMEPAK, sp3c[i], &sp840); - - if (sp840.unk0c_22 == 0) { - sp38 = sp3c[i]; - break; - } - } - - for (i = 0; sp3c[i] != 0; i++) { - func0f119368(SAVEDEVICE_GAMEPAK, sp3c[i], &sp840); - - if (sp840.unk0c_22) { - sp38 = sp3c[i]; - break; - } - } - } - - return sp38; -} - -void bossfileLoad(void) -{ - bool failed = false; - struct savebuffer buffer; - s32 i; - s32 tmp; - struct fileguid guid; - - tmp = func0f110720(); - - if (tmp == 0) { - failed = true; - } else { - savebufferClear(&buffer); - - if (func0f116800(SAVEDEVICE_GAMEPAK, tmp, buffer.bytes, 0)) { - failed = true; - } - } - - if (!failed) { - u8 tracknum; - - savebufferReadGuid(&buffer, &guid); - - g_Vars.bossfilenum = guid.filenum; - g_Vars.bossdeviceserial = guid.deviceserial; - - g_BossFile.unk89 = savebufferReadBits(&buffer, 1); - - g_Vars.unk000482 = savebufferReadBits(&buffer, 4); - - for (i = 0; i < 8; i++) { - savebufferReadString(&buffer, g_BossFile.teamnames[i], 1); - } - - tracknum = savebufferReadBits(&buffer, 8); - - if (tracknum == 0xff) { - g_BossFile.tracknum = -1; - } else { - g_BossFile.tracknum = tracknum; - } - - for (i = 0; i < 6; i++) { - g_BossFile.multipletracknums[i] = savebufferReadBits(&buffer, 8); - } - - g_BossFile.usingmultipletunes = savebufferReadBits(&buffer, 1); - g_AltTitleUnlocked = savebufferReadBits(&buffer, 1); - g_AltTitleEnabled = savebufferReadBits(&buffer, 1); - - func0f0d54c4(&buffer); - } - - if (failed) { - bossfileSetDefaults(); - bossfileSave(); - } -} - -void bossfileSave(void) -{ - volatile bool sp12c = false; - struct savebuffer buffer; - struct fileguid guid; - u32 stack; - s32 i; - s32 tmp; - - savebufferClear(&buffer); - - guid.filenum = g_Vars.bossfilenum; - guid.deviceserial = g_Vars.bossdeviceserial; - - savebufferWriteGuid(&buffer, &guid); - - savebufferOr(&buffer, g_BossFile.unk89, 1); - savebufferOr(&buffer, g_Vars.unk000482, 4); - - for (i = 0; i < 8; i++) { - func0f0d55a4(&buffer, g_BossFile.teamnames[i]); - } - - if (g_BossFile.tracknum == -1) { - savebufferOr(&buffer, 0xff, 8); - } else { - savebufferOr(&buffer, g_BossFile.tracknum, 8); - } - - for (i = 0; i < 6; i++) { - savebufferOr(&buffer, g_BossFile.multipletracknums[i], 8); - } - - savebufferOr(&buffer, g_BossFile.usingmultipletunes, 1); - savebufferOr(&buffer, (u8)g_AltTitleUnlocked, 1); - savebufferOr(&buffer, g_AltTitleEnabled, 1); - - func0f0d54c4(&buffer); - - tmp = func0f110720(); - - if (tmp == 0) { - faultAssert("fileGuid", "bossfile.c", PAL ? 377 : 375); - } - - if (func0f116828(SAVEDEVICE_GAMEPAK, tmp, 0x10, buffer.bytes, NULL, 0)) { - sp12c = true; - } -} - -void bossfileSetDefaults(void) -{ - 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_BossFile.tracknum = -1; - mpEnableAllMultiTracks(); - g_BossFile.usingmultipletunes = false; - g_BossFile.unk89 = 0; - g_BossFile.locktype = MPLOCKTYPE_NONE; - g_Vars.bossfilenum = 0; - g_Vars.bossdeviceserial = 0; - g_Vars.unk000482 = (PAL ? 7 : 0); - g_AltTitleUnlocked = 0; - g_AltTitleEnabled = false; - - bossfileSave(); -} - void func0f110bf0(void) { // empty @@ -302,9 +98,6 @@ void func0f110d90(s32 index) } #endif -const char var7f1b39c8[] = ""; -const char var7f1b39cc[] = ""; - void filelistsTick(void) { u32 updateall; diff --git a/src/game/game_107fb0.c b/src/game/filemgr.c similarity index 99% rename from src/game/game_107fb0.c rename to src/game/filemgr.c index 45e003da0..0bcaa9379 100644 --- a/src/game/game_107fb0.c +++ b/src/game/filemgr.c @@ -1,10 +1,11 @@ #include #include "constants.h" +#include "game/filelist.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0f09f0.h" -#include "game/game_107fb0.h" -#include "game/game_110680.h" +#include "game/filemgr.h" +#include "game/bossfile.h" #include "game/game_1531a0.h" #include "game/gamefile.h" #include "game/lang.h" diff --git a/src/game/game_006bd0.c b/src/game/game_006bd0.c index f12c32433..1503fbfe9 100644 --- a/src/game/game_006bd0.c +++ b/src/game/game_006bd0.c @@ -10,7 +10,7 @@ #include "game/game_095320.h" #include "game/atan2f.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/bg.h" #include "game/file.h" #include "game/gfxmemory.h" diff --git a/src/game/game_01bea0.c b/src/game/game_01bea0.c index 53a5b6965..2389c15c4 100644 --- a/src/game/game_01bea0.c +++ b/src/game/game_01bea0.c @@ -8,7 +8,7 @@ #include "game/game_0b69d0.h" #include "game/game_0e0770.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" +#include "game/mainmenu.h" #include "game/endscreen.h" #include "game/game_127910.h" #include "game/lv.h" diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 6a8144044..391b04f39 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -23,8 +23,8 @@ #include "game/healthbar.h" #include "game/hudmsg.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" -#include "game/game_107fb0.h" +#include "game/mainmenu.h" +#include "game/filemgr.h" #include "game/inventory/inventory.h" #include "game/game_127910.h" #include "game/explosions/explosions.h" diff --git a/src/game/game_0b69d0.c b/src/game/game_0b69d0.c index 3f7e8710a..5b860206e 100644 --- a/src/game/game_0b69d0.c +++ b/src/game/game_0b69d0.c @@ -25,8 +25,8 @@ #include "game/healthbar.h" #include "game/hudmsg.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" -#include "game/game_107fb0.h" +#include "game/mainmenu.h" +#include "game/filemgr.h" #include "game/inventory/inventory.h" #include "game/game_127910.h" #include "game/explosions/explosions.h" diff --git a/src/game/game_0e0770.c b/src/game/game_0e0770.c index b6747e6de..e65e4ccf7 100644 --- a/src/game/game_0e0770.c +++ b/src/game/game_0e0770.c @@ -3,7 +3,7 @@ #include "game/game_006900.h" #include "game/bondgun.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0e0770.h" #include "game/game_1531a0.h" #include "game/file.h" diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index c4288d249..9561e3493 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -10,11 +10,11 @@ #include "game/game_0b3350.h" #include "game/game_0b4950.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0e0770.h" #include "game/menu/items.h" #include "game/game_0f09f0.h" -#include "game/game_107fb0.h" +#include "game/filemgr.h" #include "game/credits.h" #include "game/game_1531a0.h" #include "game/file.h" diff --git a/src/game/game_10c9c0.c b/src/game/game_10c9c0.c index e65a8bf03..8cd2e890f 100644 --- a/src/game/game_10c9c0.c +++ b/src/game/game_10c9c0.c @@ -1,9 +1,9 @@ #include #include "constants.h" #include "game/game_0f09f0.h" -#include "game/game_107fb0.h" +#include "game/filemgr.h" #include "game/game_10c9c0.h" -#include "game/game_102240.h" +#include "game/mainmenu.h" #include "game/game_19aa80.h" #include "game/mplayer/mplayer.h" #include "game/mplayer/scenarios.h" diff --git a/src/game/game_1531a0.c b/src/game/game_1531a0.c index d2f3648f8..3dfdff03d 100644 --- a/src/game/game_1531a0.c +++ b/src/game/game_1531a0.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/game_006900.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_1531a0.h" #include "game/file.h" #include "game/lang.h" diff --git a/src/game/game_1577f0.c b/src/game/game_1577f0.c index e25fa9d1b..e3b7c682d 100644 --- a/src/game/game_1577f0.c +++ b/src/game/game_1577f0.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/game_006900.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_1531a0.h" #include "game/file.h" #include "game/lang.h" diff --git a/src/game/game_1a7560.c b/src/game/game_1a7560.c index e95fd7aa1..64e6c8b14 100644 --- a/src/game/game_1a7560.c +++ b/src/game/game_1a7560.c @@ -7,7 +7,7 @@ #include "game/game_0b3350.h" #include "game/game_0e0770.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" +#include "game/mainmenu.h" #include "game/inventory/inventory.h" #include "game/game_1531a0.h" #include "game/file.h" diff --git a/src/game/gamefile.c b/src/game/gamefile.c index 4cba0a3bf..5e9bb9e25 100644 --- a/src/game/gamefile.c +++ b/src/game/gamefile.c @@ -4,7 +4,7 @@ #include "game/camdraw.h" #include "game/cheats.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/bg.h" #include "game/game_19aa80.h" #include "game/training/training.h" diff --git a/src/game/hudmsg.c b/src/game/hudmsg.c index ac4156fc4..1b37d3146 100644 --- a/src/game/hudmsg.c +++ b/src/game/hudmsg.c @@ -4,7 +4,7 @@ #include "game/game_092610.h" #include "game/game_0b0fd0.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/hudmsg.h" #include "game/game_0e0770.h" #include "game/game_127910.h" diff --git a/src/game/lv.c b/src/game/lv.c index 32cb4bcd5..82ac1d34d 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -56,10 +56,10 @@ #include "game/game_0b28d0.h" #include "game/game_0b63b0.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/hudmsg.h" #include "game/game_0f09f0.h" -#include "game/game_107fb0.h" +#include "game/filemgr.h" #include "game/game_10c9c0.h" #include "game/game_11f000.h" #include "game/game_127910.h" diff --git a/src/game/game_102240.c b/src/game/mainmenu.c similarity index 99% rename from src/game/game_102240.c rename to src/game/mainmenu.c index e85986620..4c8cadbfe 100644 --- a/src/game/game_102240.c +++ b/src/game/mainmenu.c @@ -11,8 +11,8 @@ #include "game/game_0b3350.h" #include "game/game_0b69d0.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" -#include "game/game_107fb0.h" +#include "game/mainmenu.h" +#include "game/filemgr.h" #include "game/inventory/inventory.h" #include "game/game_1531a0.h" #include "game/lv.h" diff --git a/src/game/menu/items.c b/src/game/menu/items.c index 4ebdfee99..459e52902 100644 --- a/src/game/menu/items.c +++ b/src/game/menu/items.c @@ -7,7 +7,7 @@ #include "game/game_0e0770.h" #include "game/menu/items.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" +#include "game/mainmenu.h" #include "game/game_1531a0.h" #include "game/lv.h" #include "game/game_19aa80.h" diff --git a/src/game/mplayer/ingame.c b/src/game/mplayer/ingame.c index 2692562ab..38c0561eb 100644 --- a/src/game/mplayer/ingame.c +++ b/src/game/mplayer/ingame.c @@ -4,10 +4,10 @@ #include "game/title.h" #include "game/game_0b0fd0.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" -#include "game/game_107fb0.h" +#include "game/mainmenu.h" +#include "game/filemgr.h" #include "game/lv.h" #include "game/mplayer/ingame.h" #include "game/game_19aa80.h" diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index 661545237..404c35ae3 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -6,7 +6,7 @@ #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0f09f0.h" #include "game/game_127910.h" #include "game/game_1531a0.h" diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index 8250f2baa..94cee49fd 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -9,7 +9,7 @@ #include "game/atan2f.h" #include "game/bondgun.h" #include "game/game_0b69d0.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/hudmsg.h" #include "game/game_0f09f0.h" #include "game/inventory/inventory.h" diff --git a/src/game/mplayer/setup.c b/src/game/mplayer/setup.c index f4f40711c..9e9923319 100644 --- a/src/game/mplayer/setup.c +++ b/src/game/mplayer/setup.c @@ -2,10 +2,10 @@ #include "constants.h" #include "game/camdraw.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" -#include "game/game_107fb0.h" +#include "game/mainmenu.h" +#include "game/filemgr.h" #include "game/game_1531a0.h" #include "game/music.h" #include "game/mplayer/ingame.h" diff --git a/src/game/nbomb.c b/src/game/nbomb.c index 80d3626b8..c64e40d2c 100644 --- a/src/game/nbomb.c +++ b/src/game/nbomb.c @@ -11,7 +11,7 @@ #include "game/atan2f.h" #include "game/game_0b3350.h" #include "game/game_0b4950.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/bg.h" #include "game/file.h" #include "game/gfxmemory.h" diff --git a/src/game/game_0d4690.c b/src/game/savebuffer.c similarity index 99% rename from src/game/game_0d4690.c rename to src/game/savebuffer.c index 9575b202e..0ddb120b9 100644 --- a/src/game/game_0d4690.c +++ b/src/game/savebuffer.c @@ -2,7 +2,7 @@ #include "constants.h" #include "game/game_0b3350.h" #include "game/game_0b4950.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/gfxmemory.h" #include "game/file.h" #include "game/utils.h" diff --git a/src/game/sight.c b/src/game/sight.c index 929665d15..b3fdf8852 100644 --- a/src/game/sight.c +++ b/src/game/sight.c @@ -5,7 +5,7 @@ #include "game/game_0b0fd0.h" #include "game/game_0b2150.h" #include "game/game_0b3350.h" -#include "game/game_0d4690.h" +#include "game/savebuffer.h" #include "game/sight.h" #include "game/game_1531a0.h" #include "game/file.h" diff --git a/src/game/training/menus.c b/src/game/training/menus.c index 1e5ba2d4f..9ec645b26 100644 --- a/src/game/training/menus.c +++ b/src/game/training/menus.c @@ -7,7 +7,7 @@ #include "game/game_0b3350.h" #include "game/game_0e0770.h" #include "game/game_0f09f0.h" -#include "game/game_102240.h" +#include "game/mainmenu.h" #include "game/inventory/inventory.h" #include "game/game_1531a0.h" #include "game/file.h" diff --git a/src/game/training/training.c b/src/game/training/training.c index 2e7944524..df1a0b935 100644 --- a/src/game/training/training.c +++ b/src/game/training/training.c @@ -11,7 +11,7 @@ #include "game/game_0b69d0.h" #include "game/hudmsg.h" #include "game/game_0f09f0.h" -#include "game/game_107fb0.h" +#include "game/filemgr.h" #include "game/inventory/inventory.h" #include "game/explosions/explosions.h" #include "game/game_1531a0.h" diff --git a/src/include/game/bossfile.h b/src/include/game/bossfile.h new file mode 100644 index 000000000..d88226de9 --- /dev/null +++ b/src/include/game/bossfile.h @@ -0,0 +1,13 @@ +#ifndef IN_GAME_BOSSFILE_H +#define IN_GAME_BOSSFILE_H +#include +#include "data.h" +#include "types.h" + +bool bossfileLoadFull(void); +u32 func0f110720(void); +void bossfileLoad(void); +void bossfileSave(void); +void bossfileSetDefaults(void); + +#endif diff --git a/src/include/game/game_110680.h b/src/include/game/filelist.h similarity index 60% rename from src/include/game/game_110680.h rename to src/include/game/filelist.h index 612303af8..aec3de326 100644 --- a/src/include/game/game_110680.h +++ b/src/include/game/filelist.h @@ -1,14 +1,9 @@ -#ifndef IN_GAME_GAME_110680_H -#define IN_GAME_GAME_110680_H +#ifndef IN_GAME_FILELIST_H +#define IN_GAME_FILELIST_H #include #include "data.h" #include "types.h" -bool bossfileLoadFull(void); -u32 func0f110720(void); -void bossfileLoad(void); -void bossfileSave(void); -void bossfileSetDefaults(void); void func0f110bf0(void); void func0f110bf8(void); void filelistCreate(s32 listnum, u8 filetype); diff --git a/src/include/game/game_107fb0.h b/src/include/game/filemgr.h similarity index 98% rename from src/include/game/game_107fb0.h rename to src/include/game/filemgr.h index 07fd9bfb6..1076dfbca 100644 --- a/src/include/game/game_107fb0.h +++ b/src/include/game/filemgr.h @@ -1,5 +1,5 @@ -#ifndef IN_GAME_GAME_107FB0_H -#define IN_GAME_GAME_107FB0_H +#ifndef IN_GAME_FILEMGR_H +#define IN_GAME_FILEMGR_H #include #include "data.h" #include "types.h" diff --git a/src/include/game/game_102240.h b/src/include/game/mainmenu.h similarity index 98% rename from src/include/game/game_102240.h rename to src/include/game/mainmenu.h index 9875a4d8b..fc9fd5352 100644 --- a/src/include/game/game_102240.h +++ b/src/include/game/mainmenu.h @@ -1,5 +1,5 @@ -#ifndef IN_GAME_GAME_102240_H -#define IN_GAME_GAME_102240_H +#ifndef IN_GAME_MAINMENU_H +#define IN_GAME_MAINMENU_H #include #include "data.h" #include "types.h" diff --git a/src/include/game/game_0d4690.h b/src/include/game/savebuffer.h similarity index 94% rename from src/include/game/game_0d4690.h rename to src/include/game/savebuffer.h index 5d5a1f6c1..058fd4c63 100644 --- a/src/include/game/game_0d4690.h +++ b/src/include/game/savebuffer.h @@ -1,5 +1,5 @@ -#ifndef IN_GAME_GAME_0D4690_H -#define IN_GAME_GAME_0D4690_H +#ifndef IN_GAME_SAVEBUFFER_H +#define IN_GAME_SAVEBUFFER_H #include #include "data.h" #include "types.h"