From e97273fb37a9ca0259becf4cb504e6d9018a8956 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 20 Mar 2022 13:27:27 +1000 Subject: [PATCH] Rename many lifecycle functions to use consistent names and rename many files --- docs/piracychecks.md | 14 +- ld/gamefiles.jpn-final.inc | 105 +++--- ld/gamefiles.ntsc-beta.inc | 105 +++--- ld/gamefiles.ntsc-final.inc | 105 +++--- ld/gamefiles.pal-beta.inc | 105 +++--- ld/gamefiles.pal-final.inc | 105 +++--- ld/libfiles.jpn-final.inc | 2 +- ld/libfiles.ntsc-beta.inc | 2 +- ld/libfiles.ntsc-final.inc | 2 +- ld/libfiles.pal-beta.inc | 2 +- ld/libfiles.pal-final.inc | 2 +- src/game/{activemenu => }/activemenu.c | 8 +- .../{activemenu/tick.c => activemenutick.c} | 4 +- src/game/bg.c | 10 +- src/game/bondbike.c | 4 +- src/game/bondeyespy.c | 8 +- src/game/bondgrab.c | 2 +- src/game/bondgun.c | 23 +- src/game/{bondguninit.c => bondgunreset.c} | 4 +- src/game/bondgunstop.c | 25 ++ src/game/{game_0125a0.c => bondheadreset.c} | 3 +- src/game/bondmove.c | 4 +- src/game/bondwalk.c | 8 +- src/game/bossfile.c | 4 +- src/game/bot.c | 6 +- src/game/botact.c | 6 +- src/game/botcmd.c | 4 +- src/game/botinv.c | 4 +- src/game/botmgr.c | 4 +- src/game/camdraw.c | 8 +- src/game/{casing/reset.c => casingreset.c} | 0 src/game/{casing/tick.c => casingtick.c} | 0 src/game/cheats.c | 16 +- src/game/{chr => }/chr.c | 22 +- src/game/{chr => }/chraction.c | 20 +- src/game/{chr => }/chrai.c | 6 +- src/game/{chr => }/chraicommands.c | 24 +- src/game/{game_00b480.c => chrmgr.c} | 24 +- src/game/{game_014f10.c => chrmgrstop.c} | 13 +- src/game/credits.c | 2 +- src/game/debug2.c | 6 +- src/game/dlights.c | 10 +- src/game/{game_1657c0.c => env.c} | 0 src/game/{explosions => }/explosions.c | 10 +- .../{explosions/init.c => explosionsreset.c} | 2 +- .../{explosions/reset.c => explosionsstop.c} | 2 +- src/game/file.c | 12 +- src/game/filelist.c | 4 +- src/game/filemgr.c | 6 +- src/game/gailists.c | 2 +- src/game/game_000100.c | 4 +- src/game/game_000130.c | 2 +- src/game/game_005fd0.c | 2 +- src/game/game_006900.c | 4 +- src/game/game_006bd0.c | 6 +- src/game/game_00b190.c | 2 +- src/game/game_00b210.c | 2 +- src/game/game_00b820.c | 8 +- src/game/game_00c490.c | 23 +- src/game/game_012aa0.c | 1 - src/game/game_013b80.c | 33 -- src/game/game_015010.c | 2 +- src/game/game_01b0a0.c | 2 +- src/game/game_02cde0.c | 6 +- src/game/game_096360.c | 2 +- src/game/game_0b0fd0.c | 2 +- src/game/game_0b63b0.c | 17 +- src/game/game_10c9c0.c | 2 +- src/game/game_11f000.c | 2 +- src/game/game_13b670.c | 2 +- src/game/game_1531a0.c | 4 +- src/game/game_175f90.c | 4 +- src/game/game_19aa80.c | 6 +- src/game/game_1a7560.c | 4 +- src/game/gamefile.c | 6 +- src/game/{game_015470.c => getitle.c} | 29 +- src/game/gfxmemory.c | 2 +- src/game/hudmsg.c | 6 +- src/game/{inventory/inventory.c => inv.c} | 4 +- src/game/{inventory/items.c => invitems.c} | 4 +- src/game/{inventory/init.c => invreset.c} | 5 +- src/game/{game_00b320.c => langreset.c} | 8 +- .../{game_0147d0.c => lasersightsreset.c} | 4 +- src/game/lv.c | 253 +++++++------- src/game/mainmenu.c | 11 +- src/game/menu.c | 6 +- src/game/menuitem.c | 2 +- src/game/menustop.c | 38 +++ src/game/{game_01bea0.c => menutick.c} | 21 +- src/game/mplayer/mpaicommands.c | 2 +- src/game/mplayer/mplayer.c | 6 +- src/game/mplayer/scenarios.c | 6 +- src/game/mpstats.c | 2 +- src/game/music.c | 4 +- src/game/nbomb.c | 6 +- src/game/{objectives => }/objectives.c | 8 +- .../{objectives/setup.c => objectivesreset.c} | 2 +- .../autocomplete.c => objectivesstop.c} | 2 +- src/game/{pak => }/pak.c | 12 +- src/game/player.c | 33 +- src/game/{playerinit.c => playerreset.c} | 10 +- src/game/prop.c | 16 +- src/game/propobj.c | 24 +- src/game/{game_092610.c => propsnd.c} | 4 +- src/game/{game_0108d0.c => propsndreset.c} | 2 +- src/game/{game_0150a0.c => propsndstop.c} | 2 +- src/game/propsstop.c | 14 + src/game/radar.c | 2 +- src/game/{shards => }/shards.c | 2 +- src/game/{shards/init.c => shardsreset.c} | 2 +- src/game/{shards/reset.c => shardsstop.c} | 2 +- src/game/{shards/tick.c => shardstick.c} | 0 src/game/sight.c | 2 +- src/game/sky.c | 2 +- src/game/{smoke => }/smoke.c | 2 +- src/game/{smoke/init.c => smokereset.c} | 2 +- src/game/{smoke/reset.c => smokestop.c} | 2 +- src/game/{sparks => }/sparks.c | 4 +- src/game/{sparks/init.c => sparksreset.c} | 2 +- src/game/{sparks/tick.c => sparkstick.c} | 0 src/game/splat.c | 4 +- src/game/{game_173520.c => texreset.c} | 2 +- src/game/{game_013cf0.c => tilesreset.c} | 6 +- src/game/title.c | 4 +- src/game/titlereset.c | 27 ++ src/game/{training => }/training.c | 14 +- .../{training/menus.c => trainingmenus.c} | 8 +- src/game/utils.c | 6 +- src/game/{game_00c240.c => varsreset.c} | 10 +- src/game/{game_129210.c => vtxstore.c} | 6 +- src/game/vtxstorereset.c | 39 +++ src/game/wallhit.c | 2 +- src/game/{weather => }/weather.c | 6 +- src/game/{weather/init.c => weatherreset.c} | 4 +- src/game/{weather/tick.c => weathertick.c} | 2 +- .../game/{activemenu => }/activemenu.h | 8 +- src/include/game/activemenu/tick.h | 9 - src/include/game/bg.h | 4 +- src/include/game/bondgun.h | 4 + src/include/game/bondguninit.h | 2 +- src/include/game/bondhead.h | 2 + src/include/game/botmgr.h | 10 + src/include/game/camdraw.h | 4 +- src/include/game/cheats.h | 4 +- src/include/game/{chr => }/chr.h | 2 +- src/include/game/{chr => }/chraction.h | 0 src/include/game/{chr => }/chrai.h | 0 src/include/game/{chr => }/chraicommands.h | 0 src/include/game/chrmgr.h | 12 + src/include/game/credits.h | 2 +- src/include/game/dlights.h | 4 +- src/include/game/{game_1657c0.h => env.h} | 4 +- .../game/{explosions => }/explosions.h | 8 +- src/include/game/explosions/init.h | 9 - src/include/game/explosions/reset.h | 9 - src/include/game/file.h | 4 +- src/include/game/filemgr.h | 2 +- src/include/game/game_000100.h | 2 +- src/include/game/game_000130.h | 2 +- src/include/game/game_00b190.h | 2 +- src/include/game/game_00b210.h | 2 +- src/include/game/game_00b320.h | 2 +- src/include/game/game_00b480.h | 11 - src/include/game/game_00b820.h | 2 +- src/include/game/game_00c240.h | 10 - src/include/game/game_00c490.h | 6 +- src/include/game/game_0108d0.h | 9 - src/include/game/game_0125a0.h | 10 - src/include/game/game_013b80.h | 4 +- src/include/game/game_013cf0.h | 10 - src/include/game/game_0147d0.h | 2 - src/include/game/game_014f10.h | 10 - src/include/game/game_015010.h | 2 +- src/include/game/game_0150a0.h | 9 - src/include/game/game_015470.h | 12 - src/include/game/game_01bea0.h | 11 - src/include/game/game_10c9c0.h | 2 +- src/include/game/game_1531a0.h | 2 +- src/include/game/getitle.h | 10 + src/include/game/gfxmemory.h | 2 +- src/include/game/hudmsg.h | 4 +- .../game/{inventory/inventory.h => inv.h} | 11 +- src/include/game/inventory/init.h | 10 - src/include/game/inventory/items.h | 9 - src/include/game/lasersights.h | 10 + src/include/game/lv.h | 10 +- src/include/game/menu.h | 6 +- src/include/game/mplayer/mplayer.h | 4 +- src/include/game/music.h | 4 +- src/include/game/objectives.h | 4 +- src/include/game/{pak => }/pak.h | 12 +- src/include/game/player.h | 2 +- .../game/{playerinit.h => playerreset.h} | 6 +- src/include/game/prop.h | 2 +- src/include/game/{game_092610.h => propsnd.h} | 8 +- src/include/game/shards.h | 4 +- src/include/game/sky.h | 2 +- src/include/game/{smoke => }/smoke.h | 8 +- src/include/game/smoke/init.h | 9 - src/include/game/smoke/reset.h | 9 - src/include/game/{sparks => }/sparks.h | 8 +- src/include/game/sparks/init.h | 9 - src/include/game/sparks/tick.h | 9 - src/include/game/splat.h | 4 +- src/include/game/texdecompress.h | 2 +- src/include/game/tiles.h | 9 + src/include/game/title.h | 2 + src/include/game/{training => }/training.h | 2 +- .../{training/menus.h => trainingmenus.h} | 0 src/include/game/utils.h | 4 +- .../game/{game_129210.h => vtxstore.h} | 2 + src/include/game/{weather => }/weather.h | 10 +- src/include/game/weather/init.h | 9 - src/include/game/weather/tick.h | 9 - src/include/lib/anim.h | 2 +- src/include/lib/audiomgr.h | 2 +- src/include/lib/debughud.h | 2 +- src/include/lib/fault.h | 2 +- src/include/lib/joy.h | 6 +- src/include/lib/mema.h | 2 +- src/include/lib/memp.h | 4 +- src/include/lib/{gvars.h => vars.h} | 4 +- src/include/lib/vi.h | 4 +- src/include/lib/videbug.h | 2 +- src/lib/anim.c | 2 +- src/lib/audiomgr.c | 2 +- src/lib/boot.c | 2 +- src/lib/debughud.c | 6 +- src/lib/fault.c | 2 +- src/lib/joy.c | 8 +- src/lib/main.c | 314 +++++++++--------- src/lib/mema.c | 4 +- src/lib/memp.c | 4 +- src/lib/profile.c | 2 +- src/lib/reset.c | 2 +- src/lib/{gvars.c => varsinit.c} | 2 +- src/lib/vi.c | 2 +- src/lib/videbug.c | 4 +- tools/mkrom/piracy.c | 8 +- 239 files changed, 1270 insertions(+), 1303 deletions(-) rename src/game/{activemenu => }/activemenu.c (99%) rename src/game/{activemenu/tick.c => activemenutick.c} (99%) rename src/game/{bondguninit.c => bondgunreset.c} (99%) create mode 100644 src/game/bondgunstop.c rename src/game/{game_0125a0.c => bondheadreset.c} (98%) rename src/game/{casing/reset.c => casingreset.c} (100%) rename src/game/{casing/tick.c => casingtick.c} (100%) rename src/game/{chr => }/chr.c (99%) rename src/game/{chr => }/chraction.c (99%) rename src/game/{chr => }/chrai.c (99%) rename src/game/{chr => }/chraicommands.c (99%) rename src/game/{game_00b480.c => chrmgr.c} (78%) rename src/game/{game_014f10.c => chrmgrstop.c} (69%) rename src/game/{game_1657c0.c => env.c} (100%) rename src/game/{explosions => }/explosions.c (99%) rename src/game/{explosions/init.c => explosionsreset.c} (96%) rename src/game/{explosions/reset.c => explosionsstop.c} (94%) rename src/game/{game_015470.c => getitle.c} (98%) rename src/game/{inventory/inventory.c => inv.c} (99%) rename src/game/{inventory/items.c => invitems.c} (99%) rename src/game/{inventory/init.c => invreset.c} (87%) rename src/game/{game_00b320.c => langreset.c} (98%) rename src/game/{game_0147d0.c => lasersightsreset.c} (89%) create mode 100644 src/game/menustop.c rename src/game/{game_01bea0.c => menutick.c} (98%) rename src/game/{objectives => }/objectives.c (99%) rename src/game/{objectives/setup.c => objectivesreset.c} (97%) rename src/game/{objectives/autocomplete.c => objectivesstop.c} (91%) rename src/game/{pak => }/pak.c (99%) rename src/game/{playerinit.c => playerreset.c} (99%) rename src/game/{game_092610.c => propsnd.c} (99%) rename src/game/{game_0108d0.c => propsndreset.c} (94%) rename src/game/{game_0150a0.c => propsndstop.c} (96%) create mode 100644 src/game/propsstop.c rename src/game/{shards => }/shards.c (99%) rename src/game/{shards/init.c => shardsreset.c} (95%) rename src/game/{shards/reset.c => shardsstop.c} (88%) rename src/game/{shards/tick.c => shardstick.c} (100%) rename src/game/{smoke => }/smoke.c (99%) rename src/game/{smoke/init.c => smokereset.c} (96%) rename src/game/{smoke/reset.c => smokestop.c} (94%) rename src/game/{sparks => }/sparks.c (99%) rename src/game/{sparks/init.c => sparksreset.c} (91%) rename src/game/{sparks/tick.c => sparkstick.c} (100%) rename src/game/{game_173520.c => texreset.c} (99%) rename src/game/{game_013cf0.c => tilesreset.c} (95%) create mode 100644 src/game/titlereset.c rename src/game/{training => }/training.c (99%) rename src/game/{training/menus.c => trainingmenus.c} (99%) rename src/game/{game_00c240.c => varsreset.c} (93%) rename src/game/{game_129210.c => vtxstore.c} (98%) create mode 100644 src/game/vtxstorereset.c rename src/game/{weather => }/weather.c (99%) rename src/game/{weather/init.c => weatherreset.c} (97%) rename src/game/{weather/tick.c => weathertick.c} (95%) rename src/include/game/{activemenu => }/activemenu.h (90%) delete mode 100644 src/include/game/activemenu/tick.h create mode 100644 src/include/game/botmgr.h rename src/include/game/{chr => }/chr.h (99%) rename src/include/game/{chr => }/chraction.h (100%) rename src/include/game/{chr => }/chrai.h (100%) rename src/include/game/{chr => }/chraicommands.h (100%) create mode 100644 src/include/game/chrmgr.h rename src/include/game/{game_1657c0.h => env.h} (90%) rename src/include/game/{explosions => }/explosions.h (91%) delete mode 100644 src/include/game/explosions/init.h delete mode 100644 src/include/game/explosions/reset.h delete mode 100644 src/include/game/game_00b480.h delete mode 100644 src/include/game/game_00c240.h delete mode 100644 src/include/game/game_0108d0.h delete mode 100644 src/include/game/game_0125a0.h delete mode 100644 src/include/game/game_013cf0.h delete mode 100644 src/include/game/game_014f10.h delete mode 100644 src/include/game/game_0150a0.h delete mode 100644 src/include/game/game_015470.h delete mode 100644 src/include/game/game_01bea0.h create mode 100644 src/include/game/getitle.h rename src/include/game/{inventory/inventory.h => inv.h} (88%) delete mode 100644 src/include/game/inventory/init.h delete mode 100644 src/include/game/inventory/items.h create mode 100644 src/include/game/lasersights.h rename src/include/game/{pak => }/pak.h (97%) rename src/include/game/{playerinit.h => playerreset.h} (74%) rename src/include/game/{game_092610.h => propsnd.h} (94%) rename src/include/game/{smoke => }/smoke.h (89%) delete mode 100644 src/include/game/smoke/init.h delete mode 100644 src/include/game/smoke/reset.h rename src/include/game/{sparks => }/sparks.h (74%) delete mode 100644 src/include/game/sparks/init.h delete mode 100644 src/include/game/sparks/tick.h create mode 100644 src/include/game/tiles.h rename src/include/game/{training => }/training.h (99%) rename src/include/game/{training/menus.h => trainingmenus.h} (100%) rename src/include/game/{game_129210.h => vtxstore.h} (92%) rename src/include/game/{weather => }/weather.h (88%) delete mode 100644 src/include/game/weather/init.h delete mode 100644 src/include/game/weather/tick.h rename src/include/lib/{gvars.h => vars.h} (72%) rename src/lib/{gvars.c => varsinit.c} (99%) diff --git a/docs/piracychecks.md b/docs/piracychecks.md index 7597e5100..7dacb8632 100644 --- a/docs/piracychecks.md +++ b/docs/piracychecks.md @@ -78,7 +78,7 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **Payload:** Corrupts the rspboot microcode, causing a crash. -### lvInit +### lvReset **When Called:** When loading any stage (including title screen). @@ -90,13 +90,13 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **When Called:** When loading any stage that uses the eyespy. -**What It Checks:** Checksums `lvInit` to make sure it hasn't been modified. +**What It Checks:** Checksums `lvReset` to make sure it hasn't been modified. **Payload:** Nops `_memaFree` entirely, so any time that function is called it'll flow into the following function, which just returns. The effect this has is that the system is unable to free individual mema allocations which makes it more likely to run out of memory. --- -### bgInit +### bgReset **When Called:** When loading a normal stage (eg. CI Training). @@ -108,7 +108,7 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **When Called:** When a chr decides to throw a grenade. -**What It Checks:** Checksums `bgInit` to make sure it hasn't been modified. +**What It Checks:** Checksums `bgReset` to make sure it hasn't been modified. **Payload:** Surrounds the player in infinite explosions. @@ -126,9 +126,9 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **When Called:** Unknown. -**What It Checks:** Checksums `tagsAllocatePtrs` to make sure it hasn't been modified. +**What It Checks:** Checksums `tagsReset` to make sure it hasn't been modified. -**Payload:** Corrupts `tagsAllocatePtrs` by writing 28 bytes of 0xff. +**Payload:** Corrupts `tagsReset` by writing 28 bytes of 0xff. --- @@ -138,7 +138,7 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **What It Checks:** Checksums `func00015fd0` to make sure it hasn't been modified. -**Payload:** Corrupts `bgInit` by writing 16 bytes of 0x12 to a random address within that function. +**Payload:** Corrupts `bgReset` by writing 16 bytes of 0x12 to a random address within that function. ### func0f15c920 diff --git a/ld/gamefiles.jpn-final.inc b/ld/gamefiles.jpn-final.inc index e5ed1c9a6..0229b6453 100644 --- a/ld/gamefiles.jpn-final.inc +++ b/ld/gamefiles.jpn-final.inc @@ -21,71 +21,76 @@ build/ROMID/game/game_00b190.o (section); \ build/ROMID/game/stubs/game_00b200.o (section); \ build/ROMID/game/game_00b210.o (section); \ - build/ROMID/game/game_00b320.o (section); \ + build/ROMID/game/langreset.o (section); \ build/ROMID/game/game_00b420.o (section); \ - build/ROMID/game/game_00b480.o (section); \ + build/ROMID/game/titlereset.o (section); \ + build/ROMID/game/chrmgr.o (section); \ build/ROMID/game/game_00b820.o (section); \ - build/ROMID/game/game_00c240.o (section); \ + build/ROMID/game/varsreset.o (section); \ build/ROMID/game/game_00c490.o (section); \ - build/ROMID/game/game_0108d0.o (section); \ - build/ROMID/game/objectives/setup.o (section); \ - build/ROMID/game/casing/reset.o (section); \ - build/ROMID/game/bondguninit.o (section); \ - build/ROMID/game/playerinit.o (section); \ - build/ROMID/game/inventory/init.o (section); \ - build/ROMID/game/game_0125a0.o (section); \ + build/ROMID/game/propsndreset.o (section); \ + build/ROMID/game/objectivesreset.o (section); \ + build/ROMID/game/casingreset.o (section); \ + build/ROMID/game/bondgunreset.o (section); \ + build/ROMID/game/playerreset.o (section); \ + build/ROMID/game/invreset.o (section); \ + build/ROMID/game/bondheadreset.o (section); \ build/ROMID/game/game_012aa0.o (section); \ build/ROMID/game/game_012d50.o (section); \ - build/ROMID/game/explosions/init.o (section); \ - build/ROMID/game/smoke/init.o (section); \ - build/ROMID/game/sparks/init.o (section); \ - build/ROMID/game/weather/init.o (section); \ + build/ROMID/game/explosionsreset.o (section); \ + build/ROMID/game/smokereset.o (section); \ + build/ROMID/game/sparksreset.o (section); \ + build/ROMID/game/weatherreset.o (section); \ build/ROMID/game/stubs/game_013540.o (section); \ build/ROMID/game/game_013550.o (section); \ - build/ROMID/game/shards/init.o (section); \ + build/ROMID/game/shardsreset.o (section); \ build/ROMID/game/game_013b80.o (section); \ - build/ROMID/game/game_013cf0.o (section); \ + build/ROMID/game/vtxstorereset.o (section); \ + build/ROMID/game/tilesreset.o (section); \ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ - build/ROMID/game/game_0147d0.o (section); \ + build/ROMID/game/lasersightsreset.o (section); \ build/ROMID/game/botmgr.o (section); \ build/ROMID/game/botinvinit.o (section); \ - build/ROMID/game/game_014f10.o (section); \ + build/ROMID/game/chrmgrstop.o (section); \ + build/ROMID/game/propsstop.o (section); \ build/ROMID/game/game_015010.o (section); \ - build/ROMID/game/game_0150a0.o (section); \ - build/ROMID/game/objectives/autocomplete.o (section); \ + build/ROMID/game/propsndstop.o (section); \ + build/ROMID/game/objectivesstop.o (section); \ build/ROMID/game/stubs/game_015260.o (section); \ build/ROMID/game/stubs/game_015270.o (section); \ - build/ROMID/game/explosions/reset.o (section); \ - build/ROMID/game/smoke/reset.o (section); \ + build/ROMID/game/explosionsstop.o (section); \ + build/ROMID/game/smokestop.o (section); \ build/ROMID/game/stubs/game_0153f0.o (section); \ build/ROMID/game/stubs/game_015400.o (section); \ build/ROMID/game/stubs/game_015410.o (section); \ - build/ROMID/game/shards/reset.o (section); \ - build/ROMID/game/game_015470.o (section); \ + build/ROMID/game/shardsstop.o (section); \ + build/ROMID/game/bondgunstop.o (section); \ + build/ROMID/game/getitle.o (section); \ build/ROMID/game/title.o (section); \ build/ROMID/game/game_01afc0.o (section); \ build/ROMID/game/game_01b0a0.o (section); \ - build/ROMID/game/activemenu/tick.o (section); \ - build/ROMID/game/game_01bea0.o (section); \ - build/ROMID/game/weather/tick.o (section); \ + build/ROMID/game/activemenutick.o (section); \ + build/ROMID/game/menustop.o (section); \ + build/ROMID/game/menutick.o (section); \ + build/ROMID/game/weathertick.o (section); \ build/ROMID/game/langtick.o (section); \ build/ROMID/game/game_01d8c0.o (section); \ build/ROMID/game/game_01d990.o (section); \ - build/ROMID/game/casing/tick.o (section); \ - build/ROMID/game/shards/tick.o (section); \ - build/ROMID/game/sparks/tick.o (section); \ - build/ROMID/game/chr/chr.o (section); \ + build/ROMID/game/casingtick.o (section); \ + build/ROMID/game/shardstick.o (section); \ + build/ROMID/game/sparkstick.o (section); \ + build/ROMID/game/chr.o (section); \ build/ROMID/game/game_02cde0.o (section); \ - build/ROMID/game/chr/chraction.o (section); \ - build/ROMID/game/chr/chrai.o (section); \ - build/ROMID/game/chr/chraicommands.o (section); \ + build/ROMID/game/chraction.o (section); \ + build/ROMID/game/chrai.o (section); \ + build/ROMID/game/chraicommands.o (section); \ build/ROMID/game/prop.o (section); \ build/ROMID/game/propobj.o (section); \ build/ROMID/game/propobjbss.o (section); \ build/ROMID/game/game_091e10.o (section); \ - build/ROMID/game/game_092610.o (section); \ - build/ROMID/game/objectives/objectives.o (section); \ + build/ROMID/game/propsnd.o (section); \ + build/ROMID/game/objectives.o (section); \ build/ROMID/game/game_096360.o (section); \ build/ROMID/game/game_096700.o (section); \ build/ROMID/game/atan2f.o (section); \ @@ -97,7 +102,7 @@ build/ROMID/game/ceil.o (section); \ build/ROMID/game/game_097a50.o (section); \ build/ROMID/game/game_097aa0.o (section); \ - build/ROMID/game/inventory/items.o (section); \ + build/ROMID/game/invitems.o (section); \ build/ROMID/game/bondgun.o (section); \ build/ROMID/game/game_0abe70.o (section); \ build/ROMID/game/mpstats.o (section); \ @@ -122,7 +127,7 @@ build/ROMID/game/menugfx.o (section); \ build/ROMID/game/menuitem.o (section); \ build/ROMID/game/menu.o (section); \ - build/ROMID/game/activemenu/activemenu.o (section); \ + build/ROMID/game/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ @@ -132,11 +137,11 @@ build/ROMID/game/gamefile.o (section); \ build/ROMID/game/bossfile.o (section); \ build/ROMID/game/filelist.o (section); \ - build/ROMID/game/inventory/inventory.o (section); \ + build/ROMID/game/inv.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ build/ROMID/game/pad.o (section); \ - build/ROMID/game/pak/pak.o (section); \ + build/ROMID/game/pak.o (section); \ build/ROMID/game/debug.o (section); \ build/ROMID/game/debug3.o (section); \ build/ROMID/game/stubs/game_11eff0.o (section); \ @@ -160,11 +165,11 @@ build/ROMID/game/playermgr.o (section); \ build/ROMID/game/crc.o (section); \ build/ROMID/game/rng2.o (section); \ - build/ROMID/game/game_129210.o (section); \ - build/ROMID/game/explosions/explosions.o (section); \ - build/ROMID/game/smoke/smoke.o (section); \ - build/ROMID/game/sparks/sparks.o (section); \ - build/ROMID/game/weather/weather.o (section); \ + build/ROMID/game/vtxstore.o (section); \ + build/ROMID/game/explosions.o (section); \ + build/ROMID/game/smoke.o (section); \ + build/ROMID/game/sparks.o (section); \ + build/ROMID/game/weather.o (section); \ build/ROMID/game/sky.o (section); \ build/ROMID/game/credits.o (section); \ build/ROMID/game/game_13b670.o (section); \ @@ -173,7 +178,7 @@ build/ROMID/game/bondview.o (section); \ build/ROMID/game/splat.o (section); \ build/ROMID/game/camdraw.o (section); \ - build/ROMID/game/shards/shards.o (section); \ + build/ROMID/game/shards.o (section); \ build/ROMID/game/options.o (section); \ build/ROMID/game/game_152fa0.o (section); \ build/ROMID/game/game_1531a0.o (section); \ @@ -183,7 +188,7 @@ build/ROMID/game/game_165360.o (section); \ build/ROMID/game/game_1655c0.o (section); \ build/ROMID/game/game_165670.o (section); \ - build/ROMID/game/game_1657c0.o (section); \ + build/ROMID/game/env.o (section); \ build/ROMID/game/game_1668e0.o (section); \ build/ROMID/game/file.o (section); \ build/ROMID/game/gfxmemory.o (section); \ @@ -192,7 +197,7 @@ build/ROMID/game/music.o (section); \ build/ROMID/game/lang.o (section); \ build/ROMID/game/texdecompress.o (section); \ - build/ROMID/game/game_173520.o (section); \ + build/ROMID/game/texreset.o (section); \ build/ROMID/game/game_173a00.o (section); \ build/ROMID/game/stubs/game_175f50.o (section); \ build/ROMID/game/game_175f90.o (section); \ @@ -211,7 +216,7 @@ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ - build/ROMID/game/training/training.o (section); \ - build/ROMID/game/training/menus.o (section); \ + build/ROMID/game/training.o (section); \ + build/ROMID/game/trainingmenus.o (section); \ build/ROMID/game/game_1a7560.o (section); \ build/ROMID/game/game_1a78b0.o (section); diff --git a/ld/gamefiles.ntsc-beta.inc b/ld/gamefiles.ntsc-beta.inc index 3dd9e9730..072abd36c 100644 --- a/ld/gamefiles.ntsc-beta.inc +++ b/ld/gamefiles.ntsc-beta.inc @@ -21,71 +21,76 @@ build/ROMID/game/game_00b190.o (section); \ build/ROMID/game/stubs/game_00b200.o (section); \ build/ROMID/game/game_00b210.o (section); \ - build/ROMID/game/game_00b320.o (section); \ + build/ROMID/game/langreset.o (section); \ build/ROMID/game/game_00b420.o (section); \ - build/ROMID/game/game_00b480.o (section); \ + build/ROMID/game/titlereset.o (section); \ + build/ROMID/game/chrmgr.o (section); \ build/ROMID/game/game_00b820.o (section); \ - build/ROMID/game/game_00c240.o (section); \ + build/ROMID/game/varsreset.o (section); \ build/ROMID/game/game_00c490.o (section); \ - build/ROMID/game/game_0108d0.o (section); \ - build/ROMID/game/objectives/setup.o (section); \ - build/ROMID/game/casing/reset.o (section); \ - build/ROMID/game/bondguninit.o (section); \ - build/ROMID/game/playerinit.o (section); \ - build/ROMID/game/inventory/init.o (section); \ - build/ROMID/game/game_0125a0.o (section); \ + build/ROMID/game/propsndreset.o (section); \ + build/ROMID/game/objectivesreset.o (section); \ + build/ROMID/game/casingreset.o (section); \ + build/ROMID/game/bondgunreset.o (section); \ + build/ROMID/game/playerreset.o (section); \ + build/ROMID/game/invreset.o (section); \ + build/ROMID/game/bondheadreset.o (section); \ build/ROMID/game/game_012aa0.o (section); \ build/ROMID/game/game_012d50.o (section); \ - build/ROMID/game/explosions/init.o (section); \ - build/ROMID/game/smoke/init.o (section); \ - build/ROMID/game/sparks/init.o (section); \ - build/ROMID/game/weather/init.o (section); \ + build/ROMID/game/explosionsreset.o (section); \ + build/ROMID/game/smokereset.o (section); \ + build/ROMID/game/sparksreset.o (section); \ + build/ROMID/game/weatherreset.o (section); \ build/ROMID/game/stubs/game_013540.o (section); \ build/ROMID/game/game_013550.o (section); \ - build/ROMID/game/shards/init.o (section); \ + build/ROMID/game/shardsreset.o (section); \ build/ROMID/game/game_013b80.o (section); \ - build/ROMID/game/game_013cf0.o (section); \ + build/ROMID/game/vtxstorereset.o (section); \ + build/ROMID/game/tilesreset.o (section); \ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ - build/ROMID/game/game_0147d0.o (section); \ + build/ROMID/game/lasersightsreset.o (section); \ build/ROMID/game/botmgr.o (section); \ build/ROMID/game/botinvinit.o (section); \ - build/ROMID/game/game_014f10.o (section); \ + build/ROMID/game/chrmgrstop.o (section); \ + build/ROMID/game/propsstop.o (section); \ build/ROMID/game/game_015010.o (section); \ - build/ROMID/game/game_0150a0.o (section); \ - build/ROMID/game/objectives/autocomplete.o (section); \ + build/ROMID/game/propsndstop.o (section); \ + build/ROMID/game/objectivesstop.o (section); \ build/ROMID/game/stubs/game_015260.o (section); \ build/ROMID/game/stubs/game_015270.o (section); \ - build/ROMID/game/explosions/reset.o (section); \ - build/ROMID/game/smoke/reset.o (section); \ + build/ROMID/game/explosionsstop.o (section); \ + build/ROMID/game/smokestop.o (section); \ build/ROMID/game/stubs/game_0153f0.o (section); \ build/ROMID/game/stubs/game_015400.o (section); \ build/ROMID/game/stubs/game_015410.o (section); \ - build/ROMID/game/shards/reset.o (section); \ - build/ROMID/game/game_015470.o (section); \ + build/ROMID/game/shardsstop.o (section); \ + build/ROMID/game/bondgunstop.o (section); \ + build/ROMID/game/getitle.o (section); \ build/ROMID/game/title.o (section); \ build/ROMID/game/game_01afc0.o (section); \ build/ROMID/game/game_01b0a0.o (section); \ - build/ROMID/game/activemenu/tick.o (section); \ - build/ROMID/game/game_01bea0.o (section); \ - build/ROMID/game/weather/tick.o (section); \ + build/ROMID/game/activemenutick.o (section); \ + build/ROMID/game/menustop.o (section); \ + build/ROMID/game/menutick.o (section); \ + build/ROMID/game/weathertick.o (section); \ build/ROMID/game/langtick.o (section); \ build/ROMID/game/game_01d8c0.o (section); \ build/ROMID/game/game_01d990.o (section); \ - build/ROMID/game/casing/tick.o (section); \ - build/ROMID/game/shards/tick.o (section); \ - build/ROMID/game/sparks/tick.o (section); \ - build/ROMID/game/chr/chr.o (section); \ + build/ROMID/game/casingtick.o (section); \ + build/ROMID/game/shardstick.o (section); \ + build/ROMID/game/sparkstick.o (section); \ + build/ROMID/game/chr.o (section); \ build/ROMID/game/game_02cde0.o (section); \ - build/ROMID/game/chr/chraction.o (section); \ - build/ROMID/game/chr/chrai.o (section); \ - build/ROMID/game/chr/chraicommands.o (section); \ + build/ROMID/game/chraction.o (section); \ + build/ROMID/game/chrai.o (section); \ + build/ROMID/game/chraicommands.o (section); \ build/ROMID/game/prop.o (section); \ build/ROMID/game/propobj.o (section); \ build/ROMID/game/propobjbss.o (section); \ build/ROMID/game/game_091e10.o (section); \ - build/ROMID/game/game_092610.o (section); \ - build/ROMID/game/objectives/objectives.o (section); \ + build/ROMID/game/propsnd.o (section); \ + build/ROMID/game/objectives.o (section); \ build/ROMID/game/game_096360.o (section); \ build/ROMID/game/game_096700.o (section); \ build/ROMID/game/atan2f.o (section); \ @@ -97,7 +102,7 @@ build/ROMID/game/ceil.o (section); \ build/ROMID/game/game_097a50.o (section); \ build/ROMID/game/game_097aa0.o (section); \ - build/ROMID/game/inventory/items.o (section); \ + build/ROMID/game/invitems.o (section); \ build/ROMID/game/bondgun.o (section); \ build/ROMID/game/game_0abe70.o (section); \ build/ROMID/game/mpstats.o (section); \ @@ -122,7 +127,7 @@ build/ROMID/game/menugfx.o (section); \ build/ROMID/game/menuitem.o (section); \ build/ROMID/game/menu.o (section); \ - build/ROMID/game/activemenu/activemenu.o (section); \ + build/ROMID/game/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ @@ -132,11 +137,11 @@ build/ROMID/game/gamefile.o (section); \ build/ROMID/game/bossfile.o (section); \ build/ROMID/game/filelist.o (section); \ - build/ROMID/game/inventory/inventory.o (section); \ + build/ROMID/game/inv.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ build/ROMID/game/pad.o (section); \ - build/ROMID/game/pak/pak.o (section); \ + build/ROMID/game/pak.o (section); \ build/ROMID/game/debug1.o (section); \ build/ROMID/game/debug2.o (section); \ build/ROMID/game/debug3.o (section); \ @@ -161,11 +166,11 @@ build/ROMID/game/playermgr.o (section); \ build/ROMID/game/crc.o (section); \ build/ROMID/game/rng2.o (section); \ - build/ROMID/game/game_129210.o (section); \ - build/ROMID/game/explosions/explosions.o (section); \ - build/ROMID/game/smoke/smoke.o (section); \ - build/ROMID/game/sparks/sparks.o (section); \ - build/ROMID/game/weather/weather.o (section); \ + build/ROMID/game/vtxstore.o (section); \ + build/ROMID/game/explosions.o (section); \ + build/ROMID/game/smoke.o (section); \ + build/ROMID/game/sparks.o (section); \ + build/ROMID/game/weather.o (section); \ build/ROMID/game/sky.o (section); \ build/ROMID/game/credits.o (section); \ build/ROMID/game/game_13b670.o (section); \ @@ -174,7 +179,7 @@ build/ROMID/game/bondview.o (section); \ build/ROMID/game/splat.o (section); \ build/ROMID/game/camdraw.o (section); \ - build/ROMID/game/shards/shards.o (section); \ + build/ROMID/game/shards.o (section); \ build/ROMID/game/options.o (section); \ build/ROMID/game/game_152fa0.o (section); \ build/ROMID/game/game_1531a0.o (section); \ @@ -184,7 +189,7 @@ build/ROMID/game/game_165360.o (section); \ build/ROMID/game/game_1655c0.o (section); \ build/ROMID/game/game_165670.o (section); \ - build/ROMID/game/game_1657c0.o (section); \ + build/ROMID/game/env.o (section); \ build/ROMID/game/game_1668e0.o (section); \ build/ROMID/game/file.o (section); \ build/ROMID/game/gfxmemory.o (section); \ @@ -193,7 +198,7 @@ build/ROMID/game/music.o (section); \ build/ROMID/game/lang.o (section); \ build/ROMID/game/texdecompress.o (section); \ - build/ROMID/game/game_173520.o (section); \ + build/ROMID/game/texreset.o (section); \ build/ROMID/game/game_173a00.o (section); \ build/ROMID/game/stubs/game_175f50.o (section); \ build/ROMID/game/game_175f90.o (section); \ @@ -212,6 +217,6 @@ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ - build/ROMID/game/training/training.o (section); \ - build/ROMID/game/training/menus.o (section); \ + build/ROMID/game/training.o (section); \ + build/ROMID/game/trainingmenus.o (section); \ build/ROMID/game/game_1a78b0.o (section); diff --git a/ld/gamefiles.ntsc-final.inc b/ld/gamefiles.ntsc-final.inc index e5ed1c9a6..0229b6453 100644 --- a/ld/gamefiles.ntsc-final.inc +++ b/ld/gamefiles.ntsc-final.inc @@ -21,71 +21,76 @@ build/ROMID/game/game_00b190.o (section); \ build/ROMID/game/stubs/game_00b200.o (section); \ build/ROMID/game/game_00b210.o (section); \ - build/ROMID/game/game_00b320.o (section); \ + build/ROMID/game/langreset.o (section); \ build/ROMID/game/game_00b420.o (section); \ - build/ROMID/game/game_00b480.o (section); \ + build/ROMID/game/titlereset.o (section); \ + build/ROMID/game/chrmgr.o (section); \ build/ROMID/game/game_00b820.o (section); \ - build/ROMID/game/game_00c240.o (section); \ + build/ROMID/game/varsreset.o (section); \ build/ROMID/game/game_00c490.o (section); \ - build/ROMID/game/game_0108d0.o (section); \ - build/ROMID/game/objectives/setup.o (section); \ - build/ROMID/game/casing/reset.o (section); \ - build/ROMID/game/bondguninit.o (section); \ - build/ROMID/game/playerinit.o (section); \ - build/ROMID/game/inventory/init.o (section); \ - build/ROMID/game/game_0125a0.o (section); \ + build/ROMID/game/propsndreset.o (section); \ + build/ROMID/game/objectivesreset.o (section); \ + build/ROMID/game/casingreset.o (section); \ + build/ROMID/game/bondgunreset.o (section); \ + build/ROMID/game/playerreset.o (section); \ + build/ROMID/game/invreset.o (section); \ + build/ROMID/game/bondheadreset.o (section); \ build/ROMID/game/game_012aa0.o (section); \ build/ROMID/game/game_012d50.o (section); \ - build/ROMID/game/explosions/init.o (section); \ - build/ROMID/game/smoke/init.o (section); \ - build/ROMID/game/sparks/init.o (section); \ - build/ROMID/game/weather/init.o (section); \ + build/ROMID/game/explosionsreset.o (section); \ + build/ROMID/game/smokereset.o (section); \ + build/ROMID/game/sparksreset.o (section); \ + build/ROMID/game/weatherreset.o (section); \ build/ROMID/game/stubs/game_013540.o (section); \ build/ROMID/game/game_013550.o (section); \ - build/ROMID/game/shards/init.o (section); \ + build/ROMID/game/shardsreset.o (section); \ build/ROMID/game/game_013b80.o (section); \ - build/ROMID/game/game_013cf0.o (section); \ + build/ROMID/game/vtxstorereset.o (section); \ + build/ROMID/game/tilesreset.o (section); \ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ - build/ROMID/game/game_0147d0.o (section); \ + build/ROMID/game/lasersightsreset.o (section); \ build/ROMID/game/botmgr.o (section); \ build/ROMID/game/botinvinit.o (section); \ - build/ROMID/game/game_014f10.o (section); \ + build/ROMID/game/chrmgrstop.o (section); \ + build/ROMID/game/propsstop.o (section); \ build/ROMID/game/game_015010.o (section); \ - build/ROMID/game/game_0150a0.o (section); \ - build/ROMID/game/objectives/autocomplete.o (section); \ + build/ROMID/game/propsndstop.o (section); \ + build/ROMID/game/objectivesstop.o (section); \ build/ROMID/game/stubs/game_015260.o (section); \ build/ROMID/game/stubs/game_015270.o (section); \ - build/ROMID/game/explosions/reset.o (section); \ - build/ROMID/game/smoke/reset.o (section); \ + build/ROMID/game/explosionsstop.o (section); \ + build/ROMID/game/smokestop.o (section); \ build/ROMID/game/stubs/game_0153f0.o (section); \ build/ROMID/game/stubs/game_015400.o (section); \ build/ROMID/game/stubs/game_015410.o (section); \ - build/ROMID/game/shards/reset.o (section); \ - build/ROMID/game/game_015470.o (section); \ + build/ROMID/game/shardsstop.o (section); \ + build/ROMID/game/bondgunstop.o (section); \ + build/ROMID/game/getitle.o (section); \ build/ROMID/game/title.o (section); \ build/ROMID/game/game_01afc0.o (section); \ build/ROMID/game/game_01b0a0.o (section); \ - build/ROMID/game/activemenu/tick.o (section); \ - build/ROMID/game/game_01bea0.o (section); \ - build/ROMID/game/weather/tick.o (section); \ + build/ROMID/game/activemenutick.o (section); \ + build/ROMID/game/menustop.o (section); \ + build/ROMID/game/menutick.o (section); \ + build/ROMID/game/weathertick.o (section); \ build/ROMID/game/langtick.o (section); \ build/ROMID/game/game_01d8c0.o (section); \ build/ROMID/game/game_01d990.o (section); \ - build/ROMID/game/casing/tick.o (section); \ - build/ROMID/game/shards/tick.o (section); \ - build/ROMID/game/sparks/tick.o (section); \ - build/ROMID/game/chr/chr.o (section); \ + build/ROMID/game/casingtick.o (section); \ + build/ROMID/game/shardstick.o (section); \ + build/ROMID/game/sparkstick.o (section); \ + build/ROMID/game/chr.o (section); \ build/ROMID/game/game_02cde0.o (section); \ - build/ROMID/game/chr/chraction.o (section); \ - build/ROMID/game/chr/chrai.o (section); \ - build/ROMID/game/chr/chraicommands.o (section); \ + build/ROMID/game/chraction.o (section); \ + build/ROMID/game/chrai.o (section); \ + build/ROMID/game/chraicommands.o (section); \ build/ROMID/game/prop.o (section); \ build/ROMID/game/propobj.o (section); \ build/ROMID/game/propobjbss.o (section); \ build/ROMID/game/game_091e10.o (section); \ - build/ROMID/game/game_092610.o (section); \ - build/ROMID/game/objectives/objectives.o (section); \ + build/ROMID/game/propsnd.o (section); \ + build/ROMID/game/objectives.o (section); \ build/ROMID/game/game_096360.o (section); \ build/ROMID/game/game_096700.o (section); \ build/ROMID/game/atan2f.o (section); \ @@ -97,7 +102,7 @@ build/ROMID/game/ceil.o (section); \ build/ROMID/game/game_097a50.o (section); \ build/ROMID/game/game_097aa0.o (section); \ - build/ROMID/game/inventory/items.o (section); \ + build/ROMID/game/invitems.o (section); \ build/ROMID/game/bondgun.o (section); \ build/ROMID/game/game_0abe70.o (section); \ build/ROMID/game/mpstats.o (section); \ @@ -122,7 +127,7 @@ build/ROMID/game/menugfx.o (section); \ build/ROMID/game/menuitem.o (section); \ build/ROMID/game/menu.o (section); \ - build/ROMID/game/activemenu/activemenu.o (section); \ + build/ROMID/game/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ @@ -132,11 +137,11 @@ build/ROMID/game/gamefile.o (section); \ build/ROMID/game/bossfile.o (section); \ build/ROMID/game/filelist.o (section); \ - build/ROMID/game/inventory/inventory.o (section); \ + build/ROMID/game/inv.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ build/ROMID/game/pad.o (section); \ - build/ROMID/game/pak/pak.o (section); \ + build/ROMID/game/pak.o (section); \ build/ROMID/game/debug.o (section); \ build/ROMID/game/debug3.o (section); \ build/ROMID/game/stubs/game_11eff0.o (section); \ @@ -160,11 +165,11 @@ build/ROMID/game/playermgr.o (section); \ build/ROMID/game/crc.o (section); \ build/ROMID/game/rng2.o (section); \ - build/ROMID/game/game_129210.o (section); \ - build/ROMID/game/explosions/explosions.o (section); \ - build/ROMID/game/smoke/smoke.o (section); \ - build/ROMID/game/sparks/sparks.o (section); \ - build/ROMID/game/weather/weather.o (section); \ + build/ROMID/game/vtxstore.o (section); \ + build/ROMID/game/explosions.o (section); \ + build/ROMID/game/smoke.o (section); \ + build/ROMID/game/sparks.o (section); \ + build/ROMID/game/weather.o (section); \ build/ROMID/game/sky.o (section); \ build/ROMID/game/credits.o (section); \ build/ROMID/game/game_13b670.o (section); \ @@ -173,7 +178,7 @@ build/ROMID/game/bondview.o (section); \ build/ROMID/game/splat.o (section); \ build/ROMID/game/camdraw.o (section); \ - build/ROMID/game/shards/shards.o (section); \ + build/ROMID/game/shards.o (section); \ build/ROMID/game/options.o (section); \ build/ROMID/game/game_152fa0.o (section); \ build/ROMID/game/game_1531a0.o (section); \ @@ -183,7 +188,7 @@ build/ROMID/game/game_165360.o (section); \ build/ROMID/game/game_1655c0.o (section); \ build/ROMID/game/game_165670.o (section); \ - build/ROMID/game/game_1657c0.o (section); \ + build/ROMID/game/env.o (section); \ build/ROMID/game/game_1668e0.o (section); \ build/ROMID/game/file.o (section); \ build/ROMID/game/gfxmemory.o (section); \ @@ -192,7 +197,7 @@ build/ROMID/game/music.o (section); \ build/ROMID/game/lang.o (section); \ build/ROMID/game/texdecompress.o (section); \ - build/ROMID/game/game_173520.o (section); \ + build/ROMID/game/texreset.o (section); \ build/ROMID/game/game_173a00.o (section); \ build/ROMID/game/stubs/game_175f50.o (section); \ build/ROMID/game/game_175f90.o (section); \ @@ -211,7 +216,7 @@ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ - build/ROMID/game/training/training.o (section); \ - build/ROMID/game/training/menus.o (section); \ + build/ROMID/game/training.o (section); \ + build/ROMID/game/trainingmenus.o (section); \ build/ROMID/game/game_1a7560.o (section); \ build/ROMID/game/game_1a78b0.o (section); diff --git a/ld/gamefiles.pal-beta.inc b/ld/gamefiles.pal-beta.inc index db95df8b0..f22cfc2a9 100644 --- a/ld/gamefiles.pal-beta.inc +++ b/ld/gamefiles.pal-beta.inc @@ -21,71 +21,76 @@ build/ROMID/game/game_00b190.o (section); \ build/ROMID/game/stubs/game_00b200.o (section); \ build/ROMID/game/game_00b210.o (section); \ - build/ROMID/game/game_00b320.o (section); \ + build/ROMID/game/langreset.o (section); \ build/ROMID/game/game_00b420.o (section); \ - build/ROMID/game/game_00b480.o (section); \ + build/ROMID/game/titlereset.o (section); \ + build/ROMID/game/chrmgr.o (section); \ build/ROMID/game/game_00b820.o (section); \ - build/ROMID/game/game_00c240.o (section); \ + build/ROMID/game/varsreset.o (section); \ build/ROMID/game/game_00c490.o (section); \ - build/ROMID/game/game_0108d0.o (section); \ - build/ROMID/game/objectives/setup.o (section); \ - build/ROMID/game/casing/reset.o (section); \ - build/ROMID/game/bondguninit.o (section); \ - build/ROMID/game/playerinit.o (section); \ - build/ROMID/game/inventory/init.o (section); \ - build/ROMID/game/game_0125a0.o (section); \ + build/ROMID/game/propsndreset.o (section); \ + build/ROMID/game/objectivesreset.o (section); \ + build/ROMID/game/casingreset.o (section); \ + build/ROMID/game/bondgunreset.o (section); \ + build/ROMID/game/playerreset.o (section); \ + build/ROMID/game/invreset.o (section); \ + build/ROMID/game/bondheadreset.o (section); \ build/ROMID/game/game_012aa0.o (section); \ build/ROMID/game/game_012d50.o (section); \ - build/ROMID/game/explosions/init.o (section); \ - build/ROMID/game/smoke/init.o (section); \ - build/ROMID/game/sparks/init.o (section); \ - build/ROMID/game/weather/init.o (section); \ + build/ROMID/game/explosionsreset.o (section); \ + build/ROMID/game/smokereset.o (section); \ + build/ROMID/game/sparksreset.o (section); \ + build/ROMID/game/weatherreset.o (section); \ build/ROMID/game/stubs/game_013540.o (section); \ build/ROMID/game/game_013550.o (section); \ - build/ROMID/game/shards/init.o (section); \ + build/ROMID/game/shardsreset.o (section); \ build/ROMID/game/game_013b80.o (section); \ - build/ROMID/game/game_013cf0.o (section); \ + build/ROMID/game/vtxstorereset.o (section); \ + build/ROMID/game/tilesreset.o (section); \ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ - build/ROMID/game/game_0147d0.o (section); \ + build/ROMID/game/lasersightsreset.o (section); \ build/ROMID/game/botmgr.o (section); \ build/ROMID/game/botinvinit.o (section); \ - build/ROMID/game/game_014f10.o (section); \ + build/ROMID/game/chrmgrstop.o (section); \ + build/ROMID/game/propsstop.o (section); \ build/ROMID/game/game_015010.o (section); \ - build/ROMID/game/game_0150a0.o (section); \ - build/ROMID/game/objectives/autocomplete.o (section); \ + build/ROMID/game/propsndstop.o (section); \ + build/ROMID/game/objectivesstop.o (section); \ build/ROMID/game/stubs/game_015260.o (section); \ build/ROMID/game/stubs/game_015270.o (section); \ - build/ROMID/game/explosions/reset.o (section); \ - build/ROMID/game/smoke/reset.o (section); \ + build/ROMID/game/explosionsstop.o (section); \ + build/ROMID/game/smokestop.o (section); \ build/ROMID/game/stubs/game_0153f0.o (section); \ build/ROMID/game/stubs/game_015400.o (section); \ build/ROMID/game/stubs/game_015410.o (section); \ - build/ROMID/game/shards/reset.o (section); \ - build/ROMID/game/game_015470.o (section); \ + build/ROMID/game/shardsstop.o (section); \ + build/ROMID/game/bondgunstop.o (section); \ + build/ROMID/game/getitle.o (section); \ build/ROMID/game/title.o (section); \ build/ROMID/game/game_01afc0.o (section); \ build/ROMID/game/game_01b0a0.o (section); \ - build/ROMID/game/activemenu/tick.o (section); \ - build/ROMID/game/game_01bea0.o (section); \ - build/ROMID/game/weather/tick.o (section); \ + build/ROMID/game/activemenutick.o (section); \ + build/ROMID/game/menustop.o (section); \ + build/ROMID/game/menutick.o (section); \ + build/ROMID/game/weathertick.o (section); \ build/ROMID/game/langtick.o (section); \ build/ROMID/game/game_01d8c0.o (section); \ build/ROMID/game/game_01d990.o (section); \ - build/ROMID/game/casing/tick.o (section); \ - build/ROMID/game/shards/tick.o (section); \ - build/ROMID/game/sparks/tick.o (section); \ - build/ROMID/game/chr/chr.o (section); \ + build/ROMID/game/casingtick.o (section); \ + build/ROMID/game/shardstick.o (section); \ + build/ROMID/game/sparkstick.o (section); \ + build/ROMID/game/chr.o (section); \ build/ROMID/game/game_02cde0.o (section); \ - build/ROMID/game/chr/chraction.o (section); \ - build/ROMID/game/chr/chrai.o (section); \ - build/ROMID/game/chr/chraicommands.o (section); \ + build/ROMID/game/chraction.o (section); \ + build/ROMID/game/chrai.o (section); \ + build/ROMID/game/chraicommands.o (section); \ build/ROMID/game/prop.o (section); \ build/ROMID/game/propobj.o (section); \ build/ROMID/game/propobjbss.o (section); \ build/ROMID/game/game_091e10.o (section); \ - build/ROMID/game/game_092610.o (section); \ - build/ROMID/game/objectives/objectives.o (section); \ + build/ROMID/game/propsnd.o (section); \ + build/ROMID/game/objectives.o (section); \ build/ROMID/game/game_096360.o (section); \ build/ROMID/game/game_096700.o (section); \ build/ROMID/game/atan2f.o (section); \ @@ -97,7 +102,7 @@ build/ROMID/game/ceil.o (section); \ build/ROMID/game/game_097a50.o (section); \ build/ROMID/game/game_097aa0.o (section); \ - build/ROMID/game/inventory/items.o (section); \ + build/ROMID/game/invitems.o (section); \ build/ROMID/game/bondgun.o (section); \ build/ROMID/game/game_0abe70.o (section); \ build/ROMID/game/mpstats.o (section); \ @@ -122,7 +127,7 @@ build/ROMID/game/menugfx.o (section); \ build/ROMID/game/menuitem.o (section); \ build/ROMID/game/menu.o (section); \ - build/ROMID/game/activemenu/activemenu.o (section); \ + build/ROMID/game/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ @@ -132,11 +137,11 @@ build/ROMID/game/gamefile.o (section); \ build/ROMID/game/bossfile.o (section); \ build/ROMID/game/filelist.o (section); \ - build/ROMID/game/inventory/inventory.o (section); \ + build/ROMID/game/inv.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ build/ROMID/game/pad.o (section); \ - build/ROMID/game/pak/pak.o (section); \ + build/ROMID/game/pak.o (section); \ build/ROMID/game/debug1.o (section); \ build/ROMID/game/debug2.o (section); \ build/ROMID/game/debug3.o (section); \ @@ -161,11 +166,11 @@ build/ROMID/game/playermgr.o (section); \ build/ROMID/game/crc.o (section); \ build/ROMID/game/rng2.o (section); \ - build/ROMID/game/game_129210.o (section); \ - build/ROMID/game/explosions/explosions.o (section); \ - build/ROMID/game/smoke/smoke.o (section); \ - build/ROMID/game/sparks/sparks.o (section); \ - build/ROMID/game/weather/weather.o (section); \ + build/ROMID/game/vtxstore.o (section); \ + build/ROMID/game/explosions.o (section); \ + build/ROMID/game/smoke.o (section); \ + build/ROMID/game/sparks.o (section); \ + build/ROMID/game/weather.o (section); \ build/ROMID/game/sky.o (section); \ build/ROMID/game/credits.o (section); \ build/ROMID/game/game_13b670.o (section); \ @@ -174,7 +179,7 @@ build/ROMID/game/bondview.o (section); \ build/ROMID/game/splat.o (section); \ build/ROMID/game/camdraw.o (section); \ - build/ROMID/game/shards/shards.o (section); \ + build/ROMID/game/shards.o (section); \ build/ROMID/game/options.o (section); \ build/ROMID/game/game_152fa0.o (section); \ build/ROMID/game/game_1531a0.o (section); \ @@ -184,7 +189,7 @@ build/ROMID/game/game_165360.o (section); \ build/ROMID/game/game_1655c0.o (section); \ build/ROMID/game/game_165670.o (section); \ - build/ROMID/game/game_1657c0.o (section); \ + build/ROMID/game/env.o (section); \ build/ROMID/game/game_1668e0.o (section); \ build/ROMID/game/file.o (section); \ build/ROMID/game/gfxmemory.o (section); \ @@ -193,7 +198,7 @@ build/ROMID/game/music.o (section); \ build/ROMID/game/lang.o (section); \ build/ROMID/game/texdecompress.o (section); \ - build/ROMID/game/game_173520.o (section); \ + build/ROMID/game/texreset.o (section); \ build/ROMID/game/game_173a00.o (section); \ build/ROMID/game/stubs/game_175f50.o (section); \ build/ROMID/game/game_175f90.o (section); \ @@ -212,7 +217,7 @@ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ - build/ROMID/game/training/training.o (section); \ - build/ROMID/game/training/menus.o (section); \ + build/ROMID/game/training.o (section); \ + build/ROMID/game/trainingmenus.o (section); \ build/ROMID/game/game_1a7560.o (section); \ build/ROMID/game/game_1a78b0.o (section); diff --git a/ld/gamefiles.pal-final.inc b/ld/gamefiles.pal-final.inc index e5ed1c9a6..0229b6453 100644 --- a/ld/gamefiles.pal-final.inc +++ b/ld/gamefiles.pal-final.inc @@ -21,71 +21,76 @@ build/ROMID/game/game_00b190.o (section); \ build/ROMID/game/stubs/game_00b200.o (section); \ build/ROMID/game/game_00b210.o (section); \ - build/ROMID/game/game_00b320.o (section); \ + build/ROMID/game/langreset.o (section); \ build/ROMID/game/game_00b420.o (section); \ - build/ROMID/game/game_00b480.o (section); \ + build/ROMID/game/titlereset.o (section); \ + build/ROMID/game/chrmgr.o (section); \ build/ROMID/game/game_00b820.o (section); \ - build/ROMID/game/game_00c240.o (section); \ + build/ROMID/game/varsreset.o (section); \ build/ROMID/game/game_00c490.o (section); \ - build/ROMID/game/game_0108d0.o (section); \ - build/ROMID/game/objectives/setup.o (section); \ - build/ROMID/game/casing/reset.o (section); \ - build/ROMID/game/bondguninit.o (section); \ - build/ROMID/game/playerinit.o (section); \ - build/ROMID/game/inventory/init.o (section); \ - build/ROMID/game/game_0125a0.o (section); \ + build/ROMID/game/propsndreset.o (section); \ + build/ROMID/game/objectivesreset.o (section); \ + build/ROMID/game/casingreset.o (section); \ + build/ROMID/game/bondgunreset.o (section); \ + build/ROMID/game/playerreset.o (section); \ + build/ROMID/game/invreset.o (section); \ + build/ROMID/game/bondheadreset.o (section); \ build/ROMID/game/game_012aa0.o (section); \ build/ROMID/game/game_012d50.o (section); \ - build/ROMID/game/explosions/init.o (section); \ - build/ROMID/game/smoke/init.o (section); \ - build/ROMID/game/sparks/init.o (section); \ - build/ROMID/game/weather/init.o (section); \ + build/ROMID/game/explosionsreset.o (section); \ + build/ROMID/game/smokereset.o (section); \ + build/ROMID/game/sparksreset.o (section); \ + build/ROMID/game/weatherreset.o (section); \ build/ROMID/game/stubs/game_013540.o (section); \ build/ROMID/game/game_013550.o (section); \ - build/ROMID/game/shards/init.o (section); \ + build/ROMID/game/shardsreset.o (section); \ build/ROMID/game/game_013b80.o (section); \ - build/ROMID/game/game_013cf0.o (section); \ + build/ROMID/game/vtxstorereset.o (section); \ + build/ROMID/game/tilesreset.o (section); \ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ - build/ROMID/game/game_0147d0.o (section); \ + build/ROMID/game/lasersightsreset.o (section); \ build/ROMID/game/botmgr.o (section); \ build/ROMID/game/botinvinit.o (section); \ - build/ROMID/game/game_014f10.o (section); \ + build/ROMID/game/chrmgrstop.o (section); \ + build/ROMID/game/propsstop.o (section); \ build/ROMID/game/game_015010.o (section); \ - build/ROMID/game/game_0150a0.o (section); \ - build/ROMID/game/objectives/autocomplete.o (section); \ + build/ROMID/game/propsndstop.o (section); \ + build/ROMID/game/objectivesstop.o (section); \ build/ROMID/game/stubs/game_015260.o (section); \ build/ROMID/game/stubs/game_015270.o (section); \ - build/ROMID/game/explosions/reset.o (section); \ - build/ROMID/game/smoke/reset.o (section); \ + build/ROMID/game/explosionsstop.o (section); \ + build/ROMID/game/smokestop.o (section); \ build/ROMID/game/stubs/game_0153f0.o (section); \ build/ROMID/game/stubs/game_015400.o (section); \ build/ROMID/game/stubs/game_015410.o (section); \ - build/ROMID/game/shards/reset.o (section); \ - build/ROMID/game/game_015470.o (section); \ + build/ROMID/game/shardsstop.o (section); \ + build/ROMID/game/bondgunstop.o (section); \ + build/ROMID/game/getitle.o (section); \ build/ROMID/game/title.o (section); \ build/ROMID/game/game_01afc0.o (section); \ build/ROMID/game/game_01b0a0.o (section); \ - build/ROMID/game/activemenu/tick.o (section); \ - build/ROMID/game/game_01bea0.o (section); \ - build/ROMID/game/weather/tick.o (section); \ + build/ROMID/game/activemenutick.o (section); \ + build/ROMID/game/menustop.o (section); \ + build/ROMID/game/menutick.o (section); \ + build/ROMID/game/weathertick.o (section); \ build/ROMID/game/langtick.o (section); \ build/ROMID/game/game_01d8c0.o (section); \ build/ROMID/game/game_01d990.o (section); \ - build/ROMID/game/casing/tick.o (section); \ - build/ROMID/game/shards/tick.o (section); \ - build/ROMID/game/sparks/tick.o (section); \ - build/ROMID/game/chr/chr.o (section); \ + build/ROMID/game/casingtick.o (section); \ + build/ROMID/game/shardstick.o (section); \ + build/ROMID/game/sparkstick.o (section); \ + build/ROMID/game/chr.o (section); \ build/ROMID/game/game_02cde0.o (section); \ - build/ROMID/game/chr/chraction.o (section); \ - build/ROMID/game/chr/chrai.o (section); \ - build/ROMID/game/chr/chraicommands.o (section); \ + build/ROMID/game/chraction.o (section); \ + build/ROMID/game/chrai.o (section); \ + build/ROMID/game/chraicommands.o (section); \ build/ROMID/game/prop.o (section); \ build/ROMID/game/propobj.o (section); \ build/ROMID/game/propobjbss.o (section); \ build/ROMID/game/game_091e10.o (section); \ - build/ROMID/game/game_092610.o (section); \ - build/ROMID/game/objectives/objectives.o (section); \ + build/ROMID/game/propsnd.o (section); \ + build/ROMID/game/objectives.o (section); \ build/ROMID/game/game_096360.o (section); \ build/ROMID/game/game_096700.o (section); \ build/ROMID/game/atan2f.o (section); \ @@ -97,7 +102,7 @@ build/ROMID/game/ceil.o (section); \ build/ROMID/game/game_097a50.o (section); \ build/ROMID/game/game_097aa0.o (section); \ - build/ROMID/game/inventory/items.o (section); \ + build/ROMID/game/invitems.o (section); \ build/ROMID/game/bondgun.o (section); \ build/ROMID/game/game_0abe70.o (section); \ build/ROMID/game/mpstats.o (section); \ @@ -122,7 +127,7 @@ build/ROMID/game/menugfx.o (section); \ build/ROMID/game/menuitem.o (section); \ build/ROMID/game/menu.o (section); \ - build/ROMID/game/activemenu/activemenu.o (section); \ + build/ROMID/game/activemenu.o (section); \ build/ROMID/game/stubs/game_102230.o (section); \ build/ROMID/game/mainmenu.o (section); \ build/ROMID/game/cheats.o (section); \ @@ -132,11 +137,11 @@ build/ROMID/game/gamefile.o (section); \ build/ROMID/game/bossfile.o (section); \ build/ROMID/game/filelist.o (section); \ - build/ROMID/game/inventory/inventory.o (section); \ + build/ROMID/game/inv.o (section); \ build/ROMID/game/bondhead.o (section); \ build/ROMID/game/padhalllv.o (section); \ build/ROMID/game/pad.o (section); \ - build/ROMID/game/pak/pak.o (section); \ + build/ROMID/game/pak.o (section); \ build/ROMID/game/debug.o (section); \ build/ROMID/game/debug3.o (section); \ build/ROMID/game/stubs/game_11eff0.o (section); \ @@ -160,11 +165,11 @@ build/ROMID/game/playermgr.o (section); \ build/ROMID/game/crc.o (section); \ build/ROMID/game/rng2.o (section); \ - build/ROMID/game/game_129210.o (section); \ - build/ROMID/game/explosions/explosions.o (section); \ - build/ROMID/game/smoke/smoke.o (section); \ - build/ROMID/game/sparks/sparks.o (section); \ - build/ROMID/game/weather/weather.o (section); \ + build/ROMID/game/vtxstore.o (section); \ + build/ROMID/game/explosions.o (section); \ + build/ROMID/game/smoke.o (section); \ + build/ROMID/game/sparks.o (section); \ + build/ROMID/game/weather.o (section); \ build/ROMID/game/sky.o (section); \ build/ROMID/game/credits.o (section); \ build/ROMID/game/game_13b670.o (section); \ @@ -173,7 +178,7 @@ build/ROMID/game/bondview.o (section); \ build/ROMID/game/splat.o (section); \ build/ROMID/game/camdraw.o (section); \ - build/ROMID/game/shards/shards.o (section); \ + build/ROMID/game/shards.o (section); \ build/ROMID/game/options.o (section); \ build/ROMID/game/game_152fa0.o (section); \ build/ROMID/game/game_1531a0.o (section); \ @@ -183,7 +188,7 @@ build/ROMID/game/game_165360.o (section); \ build/ROMID/game/game_1655c0.o (section); \ build/ROMID/game/game_165670.o (section); \ - build/ROMID/game/game_1657c0.o (section); \ + build/ROMID/game/env.o (section); \ build/ROMID/game/game_1668e0.o (section); \ build/ROMID/game/file.o (section); \ build/ROMID/game/gfxmemory.o (section); \ @@ -192,7 +197,7 @@ build/ROMID/game/music.o (section); \ build/ROMID/game/lang.o (section); \ build/ROMID/game/texdecompress.o (section); \ - build/ROMID/game/game_173520.o (section); \ + build/ROMID/game/texreset.o (section); \ build/ROMID/game/game_173a00.o (section); \ build/ROMID/game/stubs/game_175f50.o (section); \ build/ROMID/game/game_175f90.o (section); \ @@ -211,7 +216,7 @@ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ - build/ROMID/game/training/training.o (section); \ - build/ROMID/game/training/menus.o (section); \ + build/ROMID/game/training.o (section); \ + build/ROMID/game/trainingmenus.o (section); \ build/ROMID/game/game_1a7560.o (section); \ build/ROMID/game/game_1a78b0.o (section); diff --git a/ld/libfiles.jpn-final.inc b/ld/libfiles.jpn-final.inc index 7ff48dc43..2a3b003fd 100644 --- a/ld/libfiles.jpn-final.inc +++ b/ld/libfiles.jpn-final.inc @@ -50,7 +50,7 @@ build/ROMID/lib/base.o (section); \ build/ROMID/lib/joy.o (section); \ build/ROMID/lib/lib_15850.o (section); \ - build/ROMID/lib/gvars.o (section); \ + build/ROMID/lib/varsinit.o (section); \ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ diff --git a/ld/libfiles.ntsc-beta.inc b/ld/libfiles.ntsc-beta.inc index 917c797aa..a776f2f27 100644 --- a/ld/libfiles.ntsc-beta.inc +++ b/ld/libfiles.ntsc-beta.inc @@ -52,7 +52,7 @@ build/ROMID/lib/base.o (section); \ build/ROMID/lib/joy.o (section); \ build/ROMID/lib/lib_15850.o (section); \ - build/ROMID/lib/gvars.o (section); \ + build/ROMID/lib/varsinit.o (section); \ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ diff --git a/ld/libfiles.ntsc-final.inc b/ld/libfiles.ntsc-final.inc index 422dd2b97..0d14cee3a 100644 --- a/ld/libfiles.ntsc-final.inc +++ b/ld/libfiles.ntsc-final.inc @@ -50,7 +50,7 @@ build/ROMID/lib/base.o (section); \ build/ROMID/lib/joy.o (section); \ build/ROMID/lib/lib_15850.o (section); \ - build/ROMID/lib/gvars.o (section); \ + build/ROMID/lib/varsinit.o (section); \ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ diff --git a/ld/libfiles.pal-beta.inc b/ld/libfiles.pal-beta.inc index 7ff48dc43..2a3b003fd 100644 --- a/ld/libfiles.pal-beta.inc +++ b/ld/libfiles.pal-beta.inc @@ -50,7 +50,7 @@ build/ROMID/lib/base.o (section); \ build/ROMID/lib/joy.o (section); \ build/ROMID/lib/lib_15850.o (section); \ - build/ROMID/lib/gvars.o (section); \ + build/ROMID/lib/varsinit.o (section); \ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ diff --git a/ld/libfiles.pal-final.inc b/ld/libfiles.pal-final.inc index 7ff48dc43..2a3b003fd 100644 --- a/ld/libfiles.pal-final.inc +++ b/ld/libfiles.pal-final.inc @@ -50,7 +50,7 @@ build/ROMID/lib/base.o (section); \ build/ROMID/lib/joy.o (section); \ build/ROMID/lib/lib_15850.o (section); \ - build/ROMID/lib/gvars.o (section); \ + build/ROMID/lib/varsinit.o (section); \ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ diff --git a/src/game/activemenu/activemenu.c b/src/game/activemenu.c similarity index 99% rename from src/game/activemenu/activemenu.c rename to src/game/activemenu.c index 8eec64aa3..efd6368ee 100644 --- a/src/game/activemenu/activemenu.c +++ b/src/game/activemenu.c @@ -1,19 +1,19 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/game_006900.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/game_0b3350.h" #include "game/savebuffer.h" #include "game/menu.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/game_1531a0.h" #include "game/file.h" #include "game/bot.h" #include "game/botcmd.h" #include "game/gfxmemory.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/options.h" @@ -512,7 +512,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label) } } -void amInit(void) +void amReset(void) { s32 i; s32 j; diff --git a/src/game/activemenu/tick.c b/src/game/activemenutick.c similarity index 99% rename from src/game/activemenu/tick.c rename to src/game/activemenutick.c index 3984f21f5..86834f1ac 100644 --- a/src/game/activemenu/tick.c +++ b/src/game/activemenutick.c @@ -1,10 +1,10 @@ #include #include "constants.h" -#include "game/activemenu/activemenu.h" +#include "game/activemenu.h" #include "game/game_01b0a0.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/options.h" #include "bss.h" diff --git a/src/game/bg.c b/src/game/bg.c index aed0160ea..bf95274f9 100644 --- a/src/game/bg.c +++ b/src/game/bg.c @@ -5,7 +5,7 @@ #include "game/game_006900.h" #include "game/game_013550.h" #include "game/game_013ee0.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" #include "game/ceil.h" #include "game/bondgun.h" @@ -20,7 +20,7 @@ #include "game/bg.h" #include "game/game_165360.h" #include "game/game_1655c0.h" -#include "game/game_1657c0.h" +#include "game/env.h" #include "game/game_1668e0.h" #include "game/file.h" #include "game/lv.h" @@ -3862,7 +3862,7 @@ glabel func7f155c10nb * - 4 bytes pointer to light table * - 4 bytes null */ -void bgInit(s32 stagenum) +void bgReset(s32 stagenum) { u8 *header; u8 headerbuffer[0x50]; @@ -4016,7 +4016,7 @@ void bgInit(s32 stagenum) } #else GLOBAL_ASM( -glabel bgInit +glabel bgReset /* f155d14: 3c0f8009 */ lui $t7,0x8009 /* f155d18: 91ef30e0 */ lbu $t7,0x30e0($t7) /* f155d1c: 27bdff48 */ addiu $sp,$sp,-184 @@ -7852,7 +7852,7 @@ glabel var7f1b75d0 // func0f001c0c(); //} -void bgReset(void) +void bgStop(void) { bgUnloadAllRooms(); mtx00016748(1); diff --git a/src/game/bondbike.c b/src/game/bondbike.c index ab52ed5d2..53328246f 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -2,10 +2,10 @@ #include "constants.h" #include "game/bondbike.h" #include "game/bondmove.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/prop.h" #include "game/game_091e10.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/game_096ca0.h" #include "game/bondgun.h" diff --git a/src/game/bondeyespy.c b/src/game/bondeyespy.c index 16269178e..0236c5834 100644 --- a/src/game/bondeyespy.c +++ b/src/game/bondeyespy.c @@ -1,14 +1,14 @@ #include #include "constants.h" #include "game/bondeyespy.h" -#include "game/chr/chraction.h" -#include "game/chr/chr.h" +#include "game/chraction.h" +#include "game/chr.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/bondgun.h" #include "game/player.h" #include "game/hudmsg.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/mplayer/ingame.h" #include "game/playermgr.h" #include "game/game_1655c0.h" diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index fcb964e94..62c04d1c3 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -3,7 +3,7 @@ #include "game/bondgrab.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" #include "game/prop.h" #include "game/objectives.h" diff --git a/src/game/bondgun.c b/src/game/bondgun.c index 143918d43..37a869663 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -2,12 +2,12 @@ #include "constants.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/chr/chraction.h" -#include "game/inventory/items.h" +#include "game/chraction.h" +#include "game/inv.h" #include "game/game_006900.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/game_096360.h" #include "game/acosfasinf.h" #include "game/game_096b20.h" @@ -23,19 +23,18 @@ #include "game/game_0c33f0.h" #include "game/gfxmemory.h" #include "game/sight.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" -#include "game/smoke/smoke.h" +#include "game/smoke.h" #include "game/game_1531a0.h" #include "game/file.h" #include "game/lv.h" #include "game/texdecompress.h" #include "game/game_176080.h" -#include "game/training/training.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/propobj.h" #include "bss.h" @@ -12099,7 +12098,7 @@ bool bgun0f09e004(s32 newowner) if (newowner == GUNMEMOWNER_1 && var8009dfc0 != 0) { unlock = true; - player0f0b9538(); + playerRemoveChrBody(); } break; case GUNMEMOWNER_3: @@ -12322,10 +12321,10 @@ glabel bgun0f09e144 /* f09e438: 3b2f003f */ xori $t7,$t9,0x3f /* f09e43c: accf0000 */ sw $t7,0x0($a2) /* f09e440: 8e4a15bc */ lw $t2,0x15bc($s2) -/* f09e444: 3c097f09 */ lui $t1,%hi(tagsAllocatePtrs) +/* f09e444: 3c097f09 */ lui $t1,%hi(tagsReset) /* f09e448: 3c087f09 */ lui $t0,%hi(tagFindById) /* f09e44c: 01ee6023 */ subu $t4,$t7,$t6 -/* f09e450: 252953cc */ addiu $t1,$t1,%lo(tagsAllocatePtrs) +/* f09e450: 252953cc */ addiu $t1,$t1,%lo(tagsReset) /* f09e454: 25055528 */ addiu $a1,$t0,%lo(tagFindById) /* f09e458: 020c8023 */ subu $s0,$s0,$t4 /* f09e45c: 240d0004 */ addiu $t5,$zero,0x4 diff --git a/src/game/bondguninit.c b/src/game/bondgunreset.c similarity index 99% rename from src/game/bondguninit.c rename to src/game/bondgunreset.c index eb020b992..5bc939d19 100644 --- a/src/game/bondguninit.c +++ b/src/game/bondgunreset.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/inventory/items.h" +#include "game/inv.h" #include "game/bondgun.h" #include "game/game_1655c0.h" #include "bss.h" @@ -10,7 +10,7 @@ extern u32 var800700ac; -void bgunInit(void) +void bgunReset(void) { s32 i; diff --git a/src/game/bondgunstop.c b/src/game/bondgunstop.c new file mode 100644 index 000000000..c1cb393d3 --- /dev/null +++ b/src/game/bondgunstop.c @@ -0,0 +1,25 @@ +#include +#include "constants.h" +#include "game/game_01afc0.h" +#include "bss.h" +#include "lib/vi.h" +#include "lib/dma.h" +#include "lib/lib_317f0.h" +#include "data.h" +#include "types.h" + +void bgunStop(void) +{ + s32 i; + s32 j; + + for (i = 0; i < PLAYERCOUNT(); i++) { + for (j = 0; j < 2; j++) { + struct hand *hand = &g_Vars.players[i]->hands[j]; + + if (hand->audiohandle2 && sndGetState(hand->audiohandle2) != AL_STOPPED) { + audioStop(hand->audiohandle2); + } + } + } +} diff --git a/src/game/game_0125a0.c b/src/game/bondheadreset.c similarity index 98% rename from src/game/game_0125a0.c rename to src/game/bondheadreset.c index 3959fee11..c63bceddf 100644 --- a/src/game/game_0125a0.c +++ b/src/game/bondheadreset.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/game_0125a0.h" #include "game/game_013ee0.h" #include "game/bondhead.h" #include "game/bg.h" @@ -32,7 +31,7 @@ void func0f0125a0(s16 animnum, s32 loopframe, s32 endframe, s32 *arg3) } } -void currentPlayerInitAnimation(void) +void bheadReset(void) { s32 i; diff --git a/src/game/bondmove.c b/src/game/bondmove.c index f9513a62f..646d0bb52 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -5,9 +5,9 @@ #include "game/bondmove.h" #include "game/bondwalk.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/game_006900.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" #include "game/atan2f.h" #include "game/game_096ca0.h" diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index 086c642ac..b022d171a 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -3,16 +3,16 @@ #include "game/bondmove.h" #include "game/bondwalk.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" #include "game/game_006900.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/bondgun.h" #include "game/player.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/bondhead.h" #include "game/playermgr.h" #include "game/propobj.h" diff --git a/src/game/bossfile.c b/src/game/bossfile.c index 9f9cccc7c..963e7e639 100644 --- a/src/game/bossfile.c +++ b/src/game/bossfile.c @@ -8,10 +8,10 @@ #include "game/bossfile.h" #include "game/bg.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/utils.h" #include "bss.h" diff --git a/src/game/bot.c b/src/game/bot.c index 836d4724d..9fd5a3368 100644 --- a/src/game/bot.c +++ b/src/game/bot.c @@ -1,10 +1,10 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/atan2f.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" diff --git a/src/game/botact.c b/src/game/botact.c index d1da5a7b8..299afe03d 100644 --- a/src/game/botact.c +++ b/src/game/botact.c @@ -1,9 +1,9 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" -#include "game/chr/chr.h" -#include "game/game_092610.h" +#include "game/chr.h" +#include "game/propsnd.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/playermgr.h" diff --git a/src/game/botcmd.c b/src/game/botcmd.c index bbe747a07..6f8b385d8 100644 --- a/src/game/botcmd.c +++ b/src/game/botcmd.c @@ -1,8 +1,8 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/ceil.h" #include "game/game_0b0fd0.h" #include "game/playermgr.h" diff --git a/src/game/botinv.c b/src/game/botinv.c index b71e5bd0d..7875f07a3 100644 --- a/src/game/botinv.c +++ b/src/game/botinv.c @@ -1,8 +1,8 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/ceil.h" #include "game/game_0b0fd0.h" #include "game/playermgr.h" diff --git a/src/game/botmgr.c b/src/game/botmgr.c index d5a7dcf5b..5c0a60faa 100644 --- a/src/game/botmgr.c +++ b/src/game/botmgr.c @@ -1,7 +1,7 @@ #include #include "constants.h" -#include "game/game_0147d0.h" -#include "game/chr/chr.h" +#include "game/botmgr.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" #include "game/botcmd.h" diff --git a/src/game/camdraw.c b/src/game/camdraw.c index e63d6a6c9..0f92c22f8 100644 --- a/src/game/camdraw.c +++ b/src/game/camdraw.c @@ -6,7 +6,7 @@ #include "game/stubs/game_102230.h" #include "game/bg.h" #include "game/lang.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/splat.h" #include "game/utils.h" #include "bss.h" @@ -494,7 +494,7 @@ bool func0f14a2fc(s32 index, u32 line, char *file) return thing->unk3f4_00; } -void phAllocate(void) +void pheadInit(void) { s32 i; @@ -513,12 +513,12 @@ void phAllocate(void) } } -void func0f14a3bc(void) +void pheadInit2(void) { // empty } -void func0f14a3c4(void) +void pheadReset(void) { s32 i; diff --git a/src/game/casing/reset.c b/src/game/casingreset.c similarity index 100% rename from src/game/casing/reset.c rename to src/game/casingreset.c diff --git a/src/game/casing/tick.c b/src/game/casingtick.c similarity index 100% rename from src/game/casing/tick.c rename to src/game/casingtick.c diff --git a/src/game/cheats.c b/src/game/cheats.c index 0491c4c65..e6c1c27f3 100644 --- a/src/game/cheats.c +++ b/src/game/cheats.c @@ -3,12 +3,12 @@ #include "lib/sched.h" #include "game/camdraw.h" #include "game/cheats.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/lang.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "bss.h" #include "data.h" #include "types.h" @@ -218,7 +218,7 @@ void cheatDeactivate(s32 cheat_id) } } -void cheatsDisableAll(void) +void cheatsInit(void) { g_CheatsActiveBank0 = 0; g_CheatsActiveBank1 = 0; @@ -226,10 +226,15 @@ void cheatsDisableAll(void) g_CheatsEnabledBank1 = 0; } -void cheatsActivate(void) +/** + * Apply cheats at level startup. + */ +void cheatsReset(void) { s32 cheat_id; + // Copy enabled cheats to active cheats, unless in CI training + // or weapon cheats not in solo if (g_Vars.stagenum != STAGE_CITRAINING) { g_CheatsActiveBank0 = g_CheatsEnabledBank0; g_CheatsActiveBank1 = g_CheatsEnabledBank1; @@ -263,6 +268,7 @@ void cheatsActivate(void) g_CheatsActiveBank1 = 0; } + // Set any "always on" cheats to active and properly activate all active cheats for (cheat_id = 0; cheat_id != NUM_CHEATS; cheat_id++) { if (g_Cheats[cheat_id].flags & CHEATFLAG_ALWAYSON) { if (cheatIsUnlocked(cheat_id)) { diff --git a/src/game/chr/chr.c b/src/game/chr.c similarity index 99% rename from src/game/chr/chr.c rename to src/game/chr.c index 627e08f17..75a7a8415 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr.c @@ -3,11 +3,11 @@ #include "constants.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/game_096360.h" #include "game/bondgun.h" @@ -20,11 +20,11 @@ #include "game/game_0c33f0.h" #include "game/playermgr.h" #include "game/game_1291b0.h" -#include "game/game_129210.h" +#include "game/vtxstore.h" #include "game/gfxmemory.h" -#include "game/explosions/explosions.h" -#include "game/smoke/smoke.h" -#include "game/sparks/sparks.h" +#include "game/explosions.h" +#include "game/smoke.h" +#include "game/sparks.h" #include "game/bg.h" #include "game/game_165670.h" #include "game/file.h" @@ -1411,9 +1411,9 @@ struct prop *chrAllocate(struct model *model, struct coord *pos, s16 *rooms, f32 } /** - * Appears to hide a chr. If removechr is true, deallocates the chr completely. + * Removes a chr. If delete is true, deallocates the chr completely. */ -void chr0f020d44(struct prop *prop, bool removechr) +void chrRemove(struct prop *prop, bool delete) { struct chrdata *chr = prop->chr; struct model *model = chr->model; @@ -1459,7 +1459,7 @@ void chr0f020d44(struct prop *prop, bool removechr) modelFree(model); chr->model = NULL; - if (removechr) { + if (delete) { chrDeregister(chr->chrnum); if (chr->cover != -1) { @@ -2698,7 +2698,7 @@ s32 chrTick(struct prop *prop) objDropRecursively(prop, true); } - chr0f020d44(prop, true); + chrRemove(prop, true); return TICKOP_FREE; } } diff --git a/src/game/chr/chraction.c b/src/game/chraction.c similarity index 99% rename from src/game/chr/chraction.c rename to src/game/chraction.c index 8ff49d315..be64da029 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chraction.c @@ -1,15 +1,15 @@ #include #include "constants.h" -#include "game/chr/chraction.h" -#include "game/chr/chrai.h" +#include "game/chraction.h" +#include "game/chrai.h" #include "game/debug.h" #include "game/dlights.h" #include "game/game_006900.h" #include "game/game_01b0a0.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/atan2f.h" #include "game/acosfasinf.h" @@ -20,15 +20,15 @@ #include "game/game_0b3350.h" #include "game/game_0b4950.h" #include "game/player.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" -#include "game/explosions/explosions.h" -#include "game/sparks/sparks.h" +#include "game/explosions.h" +#include "game/sparks.h" #include "game/bg.h" #include "game/game_1531a0.h" #include "game/game_1655c0.h" #include "game/game_165670.h" -#include "game/game_1657c0.h" +#include "game/env.h" #include "game/lv.h" #include "game/bot.h" #include "game/botact.h" @@ -37,7 +37,7 @@ #include "game/mplayer/mplayer.h" #include "game/pad.h" #include "game/padhalllv.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/propobj.h" #include "game/wallhit.h" #include "game/mpstats.h" @@ -7617,7 +7617,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid) #if PIRACYCHECKS { u32 checksum = 0; - s32 *i = (s32 *)&bgInit; + s32 *i = (s32 *)&bgReset; s32 *end = (s32 *)&bgBuildTables; u32 stackpadding[1]; diff --git a/src/game/chr/chrai.c b/src/game/chrai.c similarity index 99% rename from src/game/chr/chrai.c rename to src/game/chrai.c index ef8d55021..e79afcfc0 100644 --- a/src/game/chr/chrai.c +++ b/src/game/chrai.c @@ -1,8 +1,8 @@ #include #include "constants.h" -#include "game/chr/chraction.h" -#include "game/chr/chrai.h" -#include "game/chr/chraicommands.h" +#include "game/chraction.h" +#include "game/chrai.h" +#include "game/chraicommands.h" #include "bss.h" #include "lib/rng.h" #include "lib/ailist.h" diff --git a/src/game/chr/chraicommands.c b/src/game/chraicommands.c similarity index 99% rename from src/game/chr/chraicommands.c rename to src/game/chraicommands.c index 44c29ca36..b520244f0 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chraicommands.c @@ -3,17 +3,17 @@ #include "constants.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/chr/chraction.h" -#include "game/chr/chrai.h" -#include "game/chr/chraicommands.h" +#include "game/chraction.h" +#include "game/chrai.h" +#include "game/chraicommands.h" #include "game/debug.h" #include "game/dlights.h" -#include "game/playerinit.h" +#include "game/playerreset.h" #include "game/title.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" #include "game/game_091e10.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/atan2f.h" #include "game/bondgun.h" @@ -21,18 +21,18 @@ #include "game/game_0b28d0.h" #include "game/player.h" #include "game/hudmsg.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" -#include "game/explosions/explosions.h" -#include "game/smoke/smoke.h" -#include "game/weather/weather.h" +#include "game/explosions.h" +#include "game/smoke.h" +#include "game/weather.h" #include "game/bg.h" #include "game/game_1655c0.h" #include "game/game_165670.h" -#include "game/game_1657c0.h" +#include "game/env.h" #include "game/lv.h" #include "game/music.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/lang.h" #include "game/pad.h" diff --git a/src/game/game_00b480.c b/src/game/chrmgr.c similarity index 78% rename from src/game/game_00b480.c rename to src/game/chrmgr.c index 3016a602d..60b4bdc08 100644 --- a/src/game/game_00b480.c +++ b/src/game/chrmgr.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/game_00b320.h" #include "game/game_00b820.h" #include "game/title.h" #include "bss.h" @@ -8,26 +7,7 @@ #include "data.h" #include "types.h" -void func0f00b480(void) -{ - g_TitleMode = -1; - var800624d4 = 0; - var800624d8 = 0; - var800624dc = 0; - g_TitleDelayedTimer = 2; - g_TitleDelayedMode = -1; - var800624f4 = 1; - - if (var800624f0) { - g_TitleNextMode = TITLEMODE_SKIP; - } - - var8009cca0 = mempAlloc(0x47800, MEMPOOL_STAGE); - - func0f00b420(); -} - -void func0f00b510(void) +void chrmgrReset(void) { s32 i; @@ -61,7 +41,7 @@ void func0f00b510(void) resetSomeStageThings(); } -void func0f00b62c(s32 numchrs) +void chrmgrConfigure(s32 numchrs) { s32 i; diff --git a/src/game/game_014f10.c b/src/game/chrmgrstop.c similarity index 69% rename from src/game/game_014f10.c rename to src/game/chrmgrstop.c index 81c1009f7..c206b9d39 100644 --- a/src/game/game_014f10.c +++ b/src/game/chrmgrstop.c @@ -1,14 +1,13 @@ #include #include "constants.h" -#include "game/game_014f10.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" #include "game/propobj.h" #include "bss.h" #include "data.h" #include "types.h" -void chrsReset(void) +void chrmgrStop(void) { s32 i; @@ -16,16 +15,10 @@ void chrsReset(void) if (g_ChrSlots[i].chrnum >= 0 && g_ChrSlots[i].prop && g_ChrSlots[i].prop->type == PROPTYPE_CHR) { - chr0f020d44(g_ChrSlots[i].prop, true); + chrRemove(g_ChrSlots[i].prop, true); propDelist(g_ChrSlots[i].prop); propDisable(g_ChrSlots[i].prop); propFree(g_ChrSlots[i].prop); } } } - -void alarmReset(void) -{ - alarmDeactivate(); - gasStopAudio(); -} diff --git a/src/game/credits.c b/src/game/credits.c index a11e2a92c..9d488d7e0 100644 --- a/src/game/credits.c +++ b/src/game/credits.c @@ -5930,7 +5930,7 @@ Gfx *creditsRender(Gfx *gdl) return gdl; } -void creditsInit(void) +void creditsReset(void) { var800a4164 = 0; var800a416c = 0; diff --git a/src/game/debug2.c b/src/game/debug2.c index bdf299b0a..640ee4ebf 100644 --- a/src/game/debug2.c +++ b/src/game/debug2.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" #include "lib/rmon.h" #include "lib/vi.h" @@ -572,7 +572,7 @@ bool debugProcessInput(s8 stickx, s8 sticky, u16 buttons, u16 buttonsthisframe) if (dmenuGetSelectedOption() == 0) { // Selected "main" from cutscene menu g_DebugCurMenu = DEBUGMENU_MAIN; - dhudReset(); + dhudClear(); debugUpdateMenu(); } else { cutsceneStart(0xc00 + dmenuGetSelectedOption() - 1); @@ -694,7 +694,7 @@ bool debugProcessInput(s8 stickx, s8 sticky, u16 buttons, u16 buttonsthisframe) if (buttonsthisframe & START_BUTTON) { if (g_DebugIsMenuOpen == true) { - dhudReset(); + dhudClear(); } g_DebugIsMenuOpen = false; diff --git a/src/game/dlights.c b/src/game/dlights.c index 78afaf117..a7e3862c2 100644 --- a/src/game/dlights.c +++ b/src/game/dlights.c @@ -2,12 +2,12 @@ #include "constants.h" #include "game/cheats.h" #include "game/dlights.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/game_0b3350.h" #include "game/game_0b4950.h" #include "game/player.h" -#include "game/smoke/smoke.h" -#include "game/sparks/sparks.h" +#include "game/smoke.h" +#include "game/sparks.h" #include "game/bg.h" #include "game/file.h" #include "game/lv.h" @@ -1101,7 +1101,7 @@ void roomSetLightBroken(s32 roomnum, s32 lightnum) g_Rooms[roomnum].flags |= ROOMFLAG_DIRTY; } -void func0f001bdc(void) +void lightsReset(void) { if (var80061444) { func0f004c6c(); @@ -4561,7 +4561,7 @@ glabel var7f1a7dd4 ); #endif -void func0f004314(void) +void lightsTick(void) { struct hand *hand1 = &g_Vars.currentplayer->hands[0]; struct hand *hand2 = &g_Vars.currentplayer->hands[1]; diff --git a/src/game/game_1657c0.c b/src/game/env.c similarity index 100% rename from src/game/game_1657c0.c rename to src/game/env.c diff --git a/src/game/explosions/explosions.c b/src/game/explosions.c similarity index 99% rename from src/game/explosions/explosions.c rename to src/game/explosions.c index 51c8acfd7..ebb200be3 100644 --- a/src/game/explosions/explosions.c +++ b/src/game/explosions.c @@ -1,15 +1,15 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/dlights.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" #include "game/game_091e10.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/game_0b3350.h" #include "game/game_0b4950.h" -#include "game/explosions/explosions.h" -#include "game/smoke/smoke.h" +#include "game/explosions.h" +#include "game/smoke.h" #include "game/bg.h" #include "game/game_1668e0.h" #include "game/file.h" diff --git a/src/game/explosions/init.c b/src/game/explosionsreset.c similarity index 96% rename from src/game/explosions/init.c rename to src/game/explosionsreset.c index d12e7a5ae..302701e84 100644 --- a/src/game/explosions/init.c +++ b/src/game/explosionsreset.c @@ -5,7 +5,7 @@ #include "data.h" #include "types.h" -void explosionsInit(void) +void explosionsReset(void) { s32 i; s32 j; diff --git a/src/game/explosions/reset.c b/src/game/explosionsstop.c similarity index 94% rename from src/game/explosions/reset.c rename to src/game/explosionsstop.c index 022c7e5c0..f5850e5a8 100644 --- a/src/game/explosions/reset.c +++ b/src/game/explosionsstop.c @@ -6,7 +6,7 @@ #include "data.h" #include "types.h" -void explosionsReset(void) +void explosionsStop(void) { s32 i; diff --git a/src/game/file.c b/src/game/file.c index b09b17ffd..311b91ebd 100644 --- a/src/game/file.c +++ b/src/game/file.c @@ -4175,7 +4175,7 @@ const char var7f1b1dd8nb[] = "ob.c"; #if VERSION >= VERSION_JPN_FINAL GLOBAL_ASM( -glabel filesResetAndPrint +glabel filesInit /* f166f74: 27bdffd0 */ addiu $sp,$sp,-48 /* f166f78: afb20020 */ sw $s2,0x20($sp) /* f166f7c: afb1001c */ sw $s1,0x1c($sp) @@ -4211,7 +4211,7 @@ glabel filesResetAndPrint ); #elif VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel filesResetAndPrint +glabel filesInit /* f166f74: 27bdffd0 */ addiu $sp,$sp,-48 /* f166f78: afb20020 */ sw $s2,0x20($sp) /* f166f7c: afb1001c */ sw $s1,0x1c($sp) @@ -4247,7 +4247,7 @@ glabel filesResetAndPrint ); #else GLOBAL_ASM( -glabel filesResetAndPrint +glabel filesInit /* f166f74: 27bdffd0 */ addiu $sp,$sp,-48 /* f166f78: afb20020 */ sw $s2,0x20($sp) /* f166f7c: afb1001c */ sw $s1,0x1c($sp) @@ -4283,7 +4283,7 @@ glabel filesResetAndPrint ); #endif -//void filesResetAndPrint(void) +//void filesInit(void) //{ // s32 i; // @@ -4545,7 +4545,7 @@ void fileSetSize(s32 filenum, void *ptr, u32 size, bool reallocate) } } -void filesReset(u8 arg0) +void filesStop(u8 arg0) { s32 i; @@ -4559,5 +4559,5 @@ void filesReset(u8 arg0) void func0f167330(void) { - filesReset(5); + filesStop(5); } diff --git a/src/game/filelist.c b/src/game/filelist.c index 8bedaec9a..1598be431 100644 --- a/src/game/filelist.c +++ b/src/game/filelist.c @@ -8,10 +8,10 @@ #include "game/filelist.h" #include "game/bg.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/utils.h" #include "bss.h" diff --git a/src/game/filemgr.c b/src/game/filemgr.c index 6b136b894..24ccbee18 100644 --- a/src/game/filemgr.c +++ b/src/game/filemgr.c @@ -10,7 +10,7 @@ #include "game/gamefile.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/utils.h" #include "bss.h" #include "lib/vi.h" @@ -3315,7 +3315,7 @@ s32 filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union g_Menus[g_MpPlayerNum].fm.filetypeplusone = 0; filelistCreate(0, FILETYPE_GAME); - mpSetDefaultSetup(); + mpInit(); // Set MP player names to "Player 1" through 4 if blank for (i = 0; i < 4; i++) { @@ -3436,7 +3436,7 @@ bool filemgrConsiderPushingFileSelectDialog(void) } #endif -void pakPushPakMenuDialog(void) +void bootmenuReset(void) { s32 prevplayernum = g_MpPlayerNum; g_MpPlayerNum = 0; diff --git a/src/game/gailists.c b/src/game/gailists.c index aafdd5fe9..aceda8914 100644 --- a/src/game/gailists.c +++ b/src/game/gailists.c @@ -1,5 +1,5 @@ #include -#include "game/chr/chraicommands.h" +#include "game/chraicommands.h" #include "game/prop.h" #include "stagesetup.h" #include "data.h" diff --git a/src/game/game_000100.c b/src/game/game_000100.c index c0c4ef20d..702c1959e 100644 --- a/src/game/game_000100.c +++ b/src/game/game_000100.c @@ -1,12 +1,12 @@ #include #include "constants.h" #include "game/game_000130.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "bss.h" #include "data.h" #include "types.h" -void func0f000100(void) +void racesInit(void) { modelSetVtxAllocatorFunc(&chrAllocateVertices); func0f000648(); diff --git a/src/game/game_000130.c b/src/game/game_000130.c index 1e572b5cb..af1699300 100644 --- a/src/game/game_000130.c +++ b/src/game/game_000130.c @@ -7,7 +7,7 @@ #include "data.h" #include "types.h" -void func0f000130(void) +void bodiesInit(void) { g_NumBondBodies = 0; diff --git a/src/game/game_005fd0.c b/src/game/game_005fd0.c index 19fc38e4d..9403b1603 100644 --- a/src/game/game_005fd0.c +++ b/src/game/game_005fd0.c @@ -2,7 +2,7 @@ #include "constants.h" #include "game/debug.h" #include "game/game_006900.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/bg.h" #include "bss.h" #include "lib/rng.h" diff --git a/src/game/game_006900.c b/src/game/game_006900.c index 9f53820ef..8cc39049c 100644 --- a/src/game/game_006900.c +++ b/src/game/game_006900.c @@ -2,7 +2,7 @@ #include "constants.h" #include "game/debug.h" #include "game/game_006900.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/bg.h" #include "bss.h" #include "lib/rng.h" @@ -64,7 +64,7 @@ void func0f0069dc(void) } if (checksum != CHECKSUM_PLACEHOLDER) { - u32 *ptr = (u32 *)&bgInit; + u32 *ptr = (u32 *)&bgReset; ptr += random() % 0x40; end = &ptr[4]; diff --git a/src/game/game_006bd0.c b/src/game/game_006bd0.c index 4823bd832..0c5b6a398 100644 --- a/src/game/game_006bd0.c +++ b/src/game/game_006bd0.c @@ -1,11 +1,11 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/dlights.h" #include "game/game_006900.h" #include "game/nbomb.h" -#include "game/chr/chr.h" -#include "game/chr/chraction.h" +#include "game/chr.h" +#include "game/chraction.h" #include "game/prop.h" #include "game/objectives.h" #include "game/atan2f.h" diff --git a/src/game/game_00b190.c b/src/game/game_00b190.c index 29386a868..14a37d86e 100644 --- a/src/game/game_00b190.c +++ b/src/game/game_00b190.c @@ -6,7 +6,7 @@ #include "data.h" #include "types.h" -void loadTextureList(void) +void texInit(void) { extern u8 _textureslistSegmentRomStart; extern u8 _textureslistSegmentRomEnd; diff --git a/src/game/game_00b210.c b/src/game/game_00b210.c index 52aa6b6a9..f54f5e78c 100644 --- a/src/game/game_00b210.c +++ b/src/game/game_00b210.c @@ -6,7 +6,7 @@ #include "data.h" #include "types.h" -void mpInitPresetFeatures(void) +void challengesInit(void) { struct mpconfigfull *mpconfig; u8 buffer[0x1ca]; diff --git a/src/game/game_00b820.c b/src/game/game_00b820.c index 38ecdc8e6..fdc617f95 100644 --- a/src/game/game_00b820.c +++ b/src/game/game_00b820.c @@ -1,9 +1,9 @@ #include #include "constants.h" #include "game/cheats.h" -#include "game/chr/chrai.h" +#include "game/chrai.h" #include "game/game_00b820.h" -#include "game/playerinit.h" +#include "game/playerreset.h" #include "game/game_02cde0.h" #include "game/game_091e10.h" #include "bss.h" @@ -24,7 +24,7 @@ u32 var80061708 = 0x00000000; u32 var8006170c = 0x00000000; GLOBAL_ASM( -glabel stageChooseActiveHeads +glabel headsReset /* f00b820: 27bdffd0 */ addiu $sp,$sp,-48 /* f00b824: 3c0e8008 */ lui $t6,%hi(g_HeadsAndBodies+0x2) /* f00b828: 95cecf06 */ lhu $t6,%lo(g_HeadsAndBodies+0x2)($t6) @@ -275,7 +275,7 @@ glabel stageChooseActiveHeads // - PLAYERCOUNT() calculation is more spread out // (does other register preparation during calculation) // - Loop at 950 is calculated differently -//void stageChooseActiveHeads(s32 stagenum) +//void headsReset(s32 stagenum) //{ // s32 *headsavailablelist; // s32 headsavailablelen; diff --git a/src/game/game_00c490.c b/src/game/game_00c490.c index 7b2ba801c..4a4b17821 100644 --- a/src/game/game_00c490.c +++ b/src/game/game_00c490.c @@ -1,21 +1,18 @@ #include #include "constants.h" #include "game/cheats.h" -#include "game/game_00b480.h" #include "game/game_00b820.h" #include "game/game_00c490.h" #include "game/objectives.h" -#include "game/playerinit.h" -#include "game/inventory/init.h" -#include "game/game_0125a0.h" +#include "game/playerreset.h" #include "game/game_012d50.h" -#include "game/game_0147d0.h" -#include "game/chr/chr.h" +#include "game/botmgr.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" #include "game/game_091e10.h" #include "game/atan2f.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/bg.h" #include "game/game_1655c0.h" @@ -175,7 +172,7 @@ u32 var80061be4 = 0x00000000; u32 var80061be8 = 0x00000000; u32 var80061bec = 0x00000000; -void setupInit(void) +void propsReset(void) { s32 i; @@ -3533,7 +3530,7 @@ glabel setupLoadBriefing // } //} -void setupLoadFiles(s32 stagenum) +void setupReset(s32 stagenum) { s32 i; s32 j; @@ -3702,7 +3699,7 @@ void setupLoadFiles(s32 stagenum) g_Vars.maxprops = total + numchrs + extra + 40; } -void setupParseObjects(s32 stagenum) +void propsCreate(s32 stagenum) { s32 withchrs = !argFindByPrefix(1, "-nochr") && !argFindByPrefix(1, "-noprop"); s32 withobjs = !argFindByPrefix(1, "-noobj") && !argFindByPrefix(1, "-noprop"); @@ -3745,9 +3742,9 @@ void setupParseObjects(s32 stagenum) numchrs += g_Vars.numaibuddies; } - func0f00b62c(numchrs); + chrmgrConfigure(numchrs); } else { - func0f00b62c(0); + chrmgrConfigure(0); } for (j = 0; j < PLAYERCOUNT(); j++) { @@ -4505,7 +4502,7 @@ void setupParseObjects(s32 stagenum) } } } else { - func0f00b62c(0); + chrmgrConfigure(0); } stageAllocateBgChrs(); diff --git a/src/game/game_012aa0.c b/src/game/game_012aa0.c index 10a8afd0d..2b2c593a0 100644 --- a/src/game/game_012aa0.c +++ b/src/game/game_012aa0.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/game_0125a0.h" #include "game/game_013ee0.h" #include "game/bondhead.h" #include "game/bg.h" diff --git a/src/game/game_013b80.c b/src/game/game_013b80.c index 69a8f51bf..33df07aef 100644 --- a/src/game/game_013b80.c +++ b/src/game/game_013b80.c @@ -12,36 +12,3 @@ void func0f013b80(void) var800aabc8.unk04 = NULL; var800aabc8.unk0c = NULL; } - -void func0f013ba0(void) -{ - s32 i; - s32 j; - s32 num; - s32 val; - - for (i = 0; i < 4; i++) { - if (PLAYERCOUNT() >= 2) { - val = var8007e3d0[i].valifmp; - num = var8007e3d0[i].numifmp; - } else if (g_Vars.stagenum >= STAGE_TITLE) { - val = var8007e3d0[i].valifspecial; - num = var8007e3d0[i].numifspecial; - } else { - val = var8007e3d0[i].valifsp; - num = var8007e3d0[i].numifsp; - } - - if (num > 0) { - var8007e3d0[i].unk24 = mempAlloc(num * sizeof(struct var8007e3d0_data), MEMPOOL_STAGE); - } - - for (j = 0; j < num; j++) { - var8007e3d0[i].unk24[j].unk0e = 0; - } - - var8007e3d0[i].numallocated = num; - var8007e3d0[i].val1 = val; - var8007e3d0[i].val2 = val; - } -} diff --git a/src/game/game_015010.c b/src/game/game_015010.c index 3e653e22e..b658e0599 100644 --- a/src/game/game_015010.c +++ b/src/game/game_015010.c @@ -7,7 +7,7 @@ #include "data.h" #include "types.h" -void objsReset(void) +void objsStop(void) { u32 *ptr = g_StageSetup.props; diff --git a/src/game/game_01b0a0.c b/src/game/game_01b0a0.c index b367ba68f..e2e4e99f9 100644 --- a/src/game/game_01b0a0.c +++ b/src/game/game_01b0a0.c @@ -3,7 +3,7 @@ #include "game/game_01b0a0.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/options.h" #include "bss.h" diff --git a/src/game/game_02cde0.c b/src/game/game_02cde0.c index 5897a5316..f38245d32 100644 --- a/src/game/game_02cde0.c +++ b/src/game/game_02cde0.c @@ -1,8 +1,8 @@ #include #include "constants.h" #include "game/cheats.h" -#include "game/chr/chraction.h" -#include "game/chr/chr.h" +#include "game/chraction.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" #include "game/atan2f.h" @@ -888,7 +888,7 @@ struct prop *propAllocateEyespy(struct pad *pad, s16 room) { u32 stack[2]; u32 checksum = 0; - s32 *ptr = (s32 *)&lvInit; + s32 *ptr = (s32 *)&lvReset; s32 *end = (s32 *)&lvConfigureFade; while (ptr < end) { diff --git a/src/game/game_096360.c b/src/game/game_096360.c index 6e83102c2..64787b84b 100644 --- a/src/game/game_096360.c +++ b/src/game/game_096360.c @@ -3,7 +3,7 @@ #include "game/objectives.h" #include "game/game_096360.h" #include "game/game_0b3350.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/propobj.h" #include "bss.h" #include "lib/rng.h" diff --git a/src/game/game_0b0fd0.c b/src/game/game_0b0fd0.c index 0b9454c5b..246bbf069 100644 --- a/src/game/game_0b0fd0.c +++ b/src/game/game_0b0fd0.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/cheats.h" -#include "game/inventory/items.h" +#include "game/inv.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/player.h" diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 40bd8ba14..f7bba19e3 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -3,14 +3,14 @@ #include "game/bondeyespy.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/chr/chraction.h" -#include "game/inventory/items.h" +#include "game/chraction.h" +#include "game/inv.h" #include "game/nbomb.h" #include "game/title.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/atan2f.h" #include "game/game_096ca0.h" @@ -25,9 +25,9 @@ #include "game/menu.h" #include "game/mainmenu.h" #include "game/filemgr.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" -#include "game/explosions/explosions.h" +#include "game/explosions.h" #include "game/bondview.h" #include "game/game_1531a0.h" #include "game/bg.h" @@ -41,11 +41,10 @@ #include "game/mplayer/ingame.h" #include "game/mplayer/scenarios.h" #include "game/radar.h" -#include "game/training/training.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/mplayer/mplayer.h" #include "game/pad.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/propobj.h" #include "game/splat.h" diff --git a/src/game/game_10c9c0.c b/src/game/game_10c9c0.c index 64c43beae..7174d41cf 100644 --- a/src/game/game_10c9c0.c +++ b/src/game/game_10c9c0.c @@ -58,7 +58,7 @@ s32 menuhandler0010cabc(s32 operation, struct menuitem *item, union handlerdata return 0; } -void func0f10cb2c(void) +void fmbmenuReset(void) { s32 i; u32 prevplayernum = g_MpPlayerNum; diff --git a/src/game/game_11f000.c b/src/game/game_11f000.c index 9333b6409..4d2740035 100644 --- a/src/game/game_11f000.c +++ b/src/game/game_11f000.c @@ -5,7 +5,7 @@ #include "game/game_0b4950.h" #include "game/game_11f000.h" #include "game/game_152fa0.h" -#include "game/game_1657c0.h" +#include "game/env.h" #include "game/pad.h" #include "bss.h" #include "lib/vi.h" diff --git a/src/game/game_13b670.c b/src/game/game_13b670.c index d15f87a9c..fe2ed617f 100644 --- a/src/game/game_13b670.c +++ b/src/game/game_13b670.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/game_13b670.h" #include "bss.h" #include "lib/main.h" diff --git a/src/game/game_1531a0.c b/src/game/game_1531a0.c index 3c1c6e60e..3c2e665c0 100644 --- a/src/game/game_1531a0.c +++ b/src/game/game_1531a0.c @@ -365,7 +365,7 @@ void fontLoad(u8 *romstart, u8 *romend, struct font **fontptr, struct fontchar * #if VERSION >= VERSION_JPN_FINAL GLOBAL_ASM( -glabel fontsLoadForCurrentStage +glabel fontsReset /* f1529d4: 3c018008 */ lui $at,0x8008 /* f1529d8: ac200128 */ sw $zero,0x128($at) /* f1529dc: 3c018008 */ lui $at,0x8008 @@ -601,7 +601,7 @@ glabel fontsLoadForCurrentStage /* f152d50: 00000000 */ nop ); #else -void fontsLoadForCurrentStage(void) +void fontsReset(void) { extern u8 _fontbankgothicSegmentRomStart, _fontbankgothicSegmentRomEnd; extern u8 _fontzurichSegmentRomStart, _fontzurichSegmentRomEnd; diff --git a/src/game/game_175f90.c b/src/game/game_175f90.c index 783179d8d..8bcaf06f4 100644 --- a/src/game/game_175f90.c +++ b/src/game/game_175f90.c @@ -16,13 +16,13 @@ void func0f175f98(void) { func0f167330(); mempResetPool(MEMPOOL_5); - filesReset(5); + filesStop(5); } void func0f175fc8(void) { mempDisablePool(MEMPOOL_5); - filesReset(5); + filesStop(5); } char *func0f175ff0(void) diff --git a/src/game/game_19aa80.c b/src/game/game_19aa80.c index 05bc70eea..73eb2e22e 100644 --- a/src/game/game_19aa80.c +++ b/src/game/game_19aa80.c @@ -1,14 +1,14 @@ #include #include "constants.h" -#include "game/chr/chrai.h" -#include "game/chr/chraicommands.h" +#include "game/chrai.h" +#include "game/chraicommands.h" #include "game/prop.h" #include "game/atan2f.h" #include "game/playermgr.h" #include "game/mplayer/setup.h" #include "game/bot.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/mplayer/scenarios.h" diff --git a/src/game/game_1a7560.c b/src/game/game_1a7560.c index ecedddfd0..02d6fda2b 100644 --- a/src/game/game_1a7560.c +++ b/src/game/game_1a7560.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/ceil.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" @@ -8,7 +8,7 @@ #include "game/menugfx.h" #include "game/menu.h" #include "game/mainmenu.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/game_1531a0.h" #include "game/file.h" #include "game/texdecompress.h" diff --git a/src/game/gamefile.c b/src/game/gamefile.c index 924a37abd..21d9ebb8c 100644 --- a/src/game/gamefile.c +++ b/src/game/gamefile.c @@ -7,10 +7,10 @@ #include "game/savebuffer.h" #include "game/bg.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/utils.h" #include "bss.h" @@ -284,7 +284,7 @@ s32 gamefileLoad(s32 device) g_FilemgrLastPakError = ret; if (ret == 0) { - cheatsDisableAll(); + cheatsInit(); savebufferReadString(&buffer, g_GameFile.name, 0); g_GameFile.thumbnail = savebufferReadBits(&buffer, 5); g_GameFile.totaltime = savebufferReadBits(&buffer, 32); diff --git a/src/game/game_015470.c b/src/game/getitle.c similarity index 98% rename from src/game/game_015470.c rename to src/game/getitle.c index 31d6d23bc..d152b8baa 100644 --- a/src/game/game_015470.c +++ b/src/game/getitle.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/game_015470.h" #include "game/game_01afc0.h" #include "bss.h" #include "lib/vi.h" @@ -41,24 +40,8 @@ u32 var80062494 = 0x00000001; s32 var80062498 = 0; u32 var8006249c = 0x00000000; -void func0f015470(void) -{ - s32 i; - s32 j; - - for (i = 0; i < PLAYERCOUNT(); i++) { - for (j = 0; j < 2; j++) { - struct hand *hand = &g_Vars.players[i]->hands[j]; - - if (hand->audiohandle2 && sndGetState(hand->audiohandle2) != AL_STOPPED) { - audioStop(hand->audiohandle2); - } - } - } -} - GLOBAL_ASM( -glabel func0f0155f0 +glabel getitle0f0155f0 /* f0155f0: 44852000 */ mtc1 $a1,$f4 /* f0155f4: 27bdfef8 */ addiu $sp,$sp,-264 /* f0155f8: 3c018006 */ lui $at,%hi(g_GetitleCamPos+0x8) @@ -596,12 +579,12 @@ extern u8 var02004d28; extern u8 var02004dc8; extern u8 var02005dd0; -Gfx *func0f0155f0(Gfx *gdl, s32 arg1, u32 arg2); +Gfx *getitle0f0155f0(Gfx *gdl, s32 arg1, u32 arg2); // Mismatch: arg2 is should be accessed using lbu. Changing it a to a u8 does // this and creates a match, but causes the caller to cast it to u8 which // creates a mismatch in the caller. GE uses lw so it's likely a u32. -//Gfx *func0f0155f0(Gfx *gdl, s32 arg1, u32 arg2) +//Gfx *getitle0f0155f0(Gfx *gdl, s32 arg1, u32 arg2) //{ // g_GetitleCamPos.z = arg1; // @@ -687,7 +670,7 @@ extern u8 _getitleSegmentRomStart; extern u8 _getitleSegmentStart; extern u8 _getitleSegmentEnd; -void getitleInit(void *addr, u32 arg1) +void getitleReset(void *addr, u32 arg1) { u32 len = (u32)&_getitleSegmentEnd - (u32)&_getitleSegmentStart; @@ -740,7 +723,7 @@ Gfx *getitleRender(Gfx *gdl) guRotate(&var8009cc88[var80062410], var80062484, 0, 1, 0); - gdl = func0f0155f0(gdl, var8009cc8c, (sp30 * sp2c) / 255); + gdl = getitle0f0155f0(gdl, var8009cc8c, (sp30 * sp2c) / 255); if (var80062498 >= TICKS(1040) && var80062498 >= TICKS(1160)) { var80062498 = 0; @@ -752,7 +735,7 @@ Gfx *getitleRender(Gfx *gdl) return gdl; } -bool func0f0160e8(void) +bool getitle0f0160e8(void) { return (var80062414 ^ 2) == 0; } diff --git a/src/game/gfxmemory.c b/src/game/gfxmemory.c index d0a948099..5a6fb4440 100644 --- a/src/game/gfxmemory.c +++ b/src/game/gfxmemory.c @@ -63,7 +63,7 @@ u32 g_GfxNumSwaps = 0x00000002; * Comments in this function are strings that appear in an XBLA debug build. * They were likely in the N64 version but ifdeffed out. */ -void gfxInitMemory(void) +void gfxReset(void) { s32 stack; diff --git a/src/game/hudmsg.c b/src/game/hudmsg.c index a2a04861d..804b83ee4 100644 --- a/src/game/hudmsg.c +++ b/src/game/hudmsg.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "constants.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/game_0b0fd0.h" #include "game/player.h" #include "game/savebuffer.h" @@ -658,7 +658,7 @@ void hudmsgsHideByChannel(s32 channelnum) } } -void hudmsgsInit(void) +void hudmsgsReset(void) { s32 i; @@ -6258,7 +6258,7 @@ glabel var7f1adef4 // return gdl; //} -void hudmsgsReset(void) +void hudmsgsStop(void) { s32 i; diff --git a/src/game/inventory/inventory.c b/src/game/inv.c similarity index 99% rename from src/game/inventory/inventory.c rename to src/game/inv.c index f74b059cf..cf1b8913e 100644 --- a/src/game/inventory/inventory.c +++ b/src/game/inv.c @@ -3,8 +3,8 @@ #include "game/cheats.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" -#include "game/inventory/inventory.h" -#include "game/training/training.h" +#include "game/inv.h" +#include "game/training.h" #include "game/lang.h" #include "bss.h" #include "lib/main.h" diff --git a/src/game/inventory/items.c b/src/game/invitems.c similarity index 99% rename from src/game/inventory/items.c rename to src/game/invitems.c index 7742d384b..8c1c141f9 100644 --- a/src/game/inventory/items.c +++ b/src/game/invitems.c @@ -1,7 +1,7 @@ #include -#include "game/chr/chraicommands.h" +#include "game/chraicommands.h" #include "game/prop.h" -#include "game/inventory/items.h" +#include "game/inv.h" #include "stagesetup.h" #include "data.h" #include "types.h" diff --git a/src/game/inventory/init.c b/src/game/invreset.c similarity index 87% rename from src/game/inventory/init.c rename to src/game/invreset.c index 86d18dcf5..98fcd6350 100644 --- a/src/game/inventory/init.c +++ b/src/game/invreset.c @@ -2,14 +2,13 @@ #include "constants.h" #include "constants.h" #include "game/cheats.h" -#include "game/inventory/init.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "bss.h" #include "lib/memp.h" #include "data.h" #include "types.h" -void invInitGunsHeld(void) +void invReset(void) { s32 i; diff --git a/src/game/game_00b320.c b/src/game/langreset.c similarity index 98% rename from src/game/game_00b320.c rename to src/game/langreset.c index 816592c78..41fed14c2 100644 --- a/src/game/game_00b320.c +++ b/src/game/langreset.c @@ -9,7 +9,7 @@ #if VERSION >= VERSION_JPN_FINAL GLOBAL_ASM( -glabel stageLoadCommonLang +glabel langReset /* f00b3b0: 27bdffe0 */ addiu $sp,$sp,-32 /* f00b3b4: 3c02800b */ lui $v0,0x800b /* f00b3b8: 3c03800b */ lui $v1,0x800b @@ -68,7 +68,7 @@ glabel stageLoadCommonLang ); #elif VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel stageLoadCommonLang +glabel langReset /* f00b330: 27bdffe0 */ addiu $sp,$sp,-32 /* f00b334: 3c02800b */ lui $v0,0x800b /* f00b338: 3c03800b */ lui $v1,0x800b @@ -127,7 +127,7 @@ glabel stageLoadCommonLang ); #elif VERSION >= VERSION_PAL_BETA GLOBAL_ASM( -glabel stageLoadCommonLang +glabel langReset /* f00b330: 27bdffe0 */ addiu $sp,$sp,-32 /* f00b334: 3c02800b */ lui $v0,0x800b /* f00b338: 3c03800b */ lui $v1,0x800b @@ -185,7 +185,7 @@ glabel stageLoadCommonLang /* f00b3f4: 00000000 */ nop ); #else -void stageLoadCommonLang(s32 stagenum) +void langReset(s32 stagenum) { s32 i; diff --git a/src/game/game_0147d0.c b/src/game/lasersightsreset.c similarity index 89% rename from src/game/game_0147d0.c rename to src/game/lasersightsreset.c index 634ff0a8d..0ea68e3d2 100644 --- a/src/game/game_0147d0.c +++ b/src/game/lasersightsreset.c @@ -1,7 +1,7 @@ #include #include "constants.h" -#include "game/game_0147d0.h" -#include "game/chr/chr.h" +#include "game/lasersights.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" #include "game/botcmd.h" diff --git a/src/game/lv.c b/src/game/lv.c index 2cb859f26..a063e6e60 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -1,109 +1,94 @@ #include #include "constants.h" -#include "game/activemenu/activemenu.h" -#include "game/activemenu/tick.h" +#include "bss.h" +#include "data.h" +#include "game/activemenu.h" #include "game/atan2f.h" +#include "game/bg.h" +#include "game/bondgun.h" +#include "game/bondhead.h" #include "game/bondmove.h" +#include "game/bondview.h" #include "game/camdraw.h" +#include "game/casing.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chr.h" +#include "game/chraction.h" +#include "game/credits.h" #include "game/debug.h" #include "game/dlights.h" +#include "game/explosions.h" +#include "game/filemgr.h" #include "game/game_006900.h" -#include "game/nbomb.h" -#include "game/game_00b480.h" #include "game/game_00b820.h" -#include "game/game_00c240.h" #include "game/game_00c490.h" -#include "game/game_0108d0.h" -#include "game/objectives.h" -#include "game/casing.h" -#include "game/playerinit.h" -#include "game/inventory/init.h" -#include "game/game_0125a0.h" -#include "game/explosions/init.h" -#include "game/smoke/init.h" -#include "game/sparks/init.h" -#include "game/weather/init.h" -#include "game/stubs/game_013540.h" #include "game/game_013550.h" -#include "game/game_013cf0.h" #include "game/game_0147a0.h" -#include "game/game_0147d0.h" -#include "game/game_014f10.h" #include "game/game_015010.h" -#include "game/game_0150a0.h" -#include "game/gfxmemory.h" -#include "game/stubs/game_015260.h" -#include "game/stubs/game_015270.h" -#include "game/explosions/reset.h" -#include "game/smoke/reset.h" -#include "game/stubs/game_0153f0.h" -#include "game/stubs/game_015400.h" -#include "game/stubs/game_015410.h" -#include "game/shards.h" -#include "game/game_015470.h" -#include "game/title.h" #include "game/game_01b0a0.h" -#include "game/game_01bea0.h" -#include "game/weather/tick.h" #include "game/game_01d990.h" -#include "game/chr/chr.h" -#include "game/prop.h" -#include "game/objectives.h" -#include "game/bondgun.h" #include "game/game_0abe70.h" #include "game/game_0b0fd0.h" #include "game/game_0b28d0.h" #include "game/game_0b63b0.h" -#include "game/player.h" -#include "game/savebuffer.h" -#include "game/hudmsg.h" -#include "game/menu.h" -#include "game/filemgr.h" #include "game/game_10c9c0.h" #include "game/game_11f000.h" -#include "game/playermgr.h" -#include "game/game_129210.h" -#include "game/explosions/explosions.h" -#include "game/sparks/sparks.h" -#include "game/weather/weather.h" -#include "game/sky.h" -#include "game/credits.h" #include "game/game_13c510.h" -#include "game/bondview.h" #include "game/game_1531a0.h" -#include "game/bg.h" #include "game/game_165670.h" -#include "game/lv.h" -#include "game/music.h" -#include "game/texdecompress.h" #include "game/game_176080.h" -#include "game/mplayer/setup.h" -#include "game/mplayer/scenarios.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/gfxmemory.h" +#include "game/hudmsg.h" +#include "game/inv.h" #include "game/lang.h" +#include "game/lasersights.h" +#include "game/lv.h" +#include "game/menu.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/mplayer/scenarios.h" +#include "game/mplayer/setup.h" +#include "game/music.h" +#include "game/nbomb.h" +#include "game/objectives.h" +#include "game/pak.h" +#include "game/player.h" +#include "game/playermgr.h" +#include "game/playerreset.h" +#include "game/prop.h" #include "game/propobj.h" -#include "game/sparks/tick.h" +#include "game/propsnd.h" +#include "game/savebuffer.h" +#include "game/shards.h" +#include "game/sky.h" +#include "game/sparks.h" #include "game/splat.h" +#include "game/stubs/game_013540.h" +#include "game/stubs/game_015260.h" +#include "game/stubs/game_015270.h" +#include "game/stubs/game_0153f0.h" +#include "game/stubs/game_015400.h" +#include "game/stubs/game_015410.h" +#include "game/texdecompress.h" +#include "game/tiles.h" +#include "game/title.h" +#include "game/training.h" #include "game/utils.h" +#include "game/vtxstore.h" #include "game/wallhit.h" -#include "bss.h" +#include "game/weather.h" +#include "lib/anim.h" #include "lib/args.h" #include "lib/joy.h" #include "lib/lib_06440.h" -#include "lib/vi.h" +#include "lib/lib_317f0.h" #include "lib/main.h" -#include "lib/snd.h" +#include "lib/mtx.h" #include "lib/music.h" #include "lib/rng.h" -#include "lib/mtx.h" -#include "lib/anim.h" -#include "lib/lib_317f0.h" -#include "data.h" +#include "lib/snd.h" +#include "lib/vars.h" +#include "lib/vi.h" #include "types.h" struct sndstate *g_MiscSfxAudioHandles[3]; @@ -150,13 +135,13 @@ void setVar80084040(u32 value) var80084040 = value; } -void lv0f167af8(void) +void lvInit(void) { g_Vars.lockscreen = 0; g_Vars.joydisableframestogo = -1; } -void lvStopAllMiscSfx(void) +void lvResetMiscSfx(void) { s32 i; @@ -242,9 +227,9 @@ void lvUpdateMiscSfx(void) } } -void lvInit(s32 stagenum) +void lvReset(s32 stagenum) { - lvCancelFade(); + lvFadeReset(); var80084014 = false; var80084010 = 0; @@ -265,7 +250,7 @@ void lvInit(s32 stagenum) g_Vars.paksconnected = 0; g_Vars.stagenum = stagenum; - cheatsActivate(); + cheatsReset(); var80084040 = true; g_Vars.lvframenum = 0; @@ -305,19 +290,19 @@ void lvInit(s32 stagenum) g_MiscAudioHandle = NULL; - musicInit(); + musicReset(); func0f011124(true); func0f013b80(); - texturesLoadConfigs(); - fontsLoadForCurrentStage(); - hudmsgsInit(); + texReset(); + fontsReset(); + hudmsgsReset(); if (stagenum == STAGE_TEST_OLD) { - func0f00b480(); + titleReset(); } if (stagenum == STAGE_TITLE) { - func0f00b480(); + titleReset(); } else if (stagenum == STAGE_BOOTPAKMENU) { // empty } else if (stagenum == STAGE_CREDITS) { @@ -328,8 +313,8 @@ void lvInit(s32 stagenum) s32 i; s32 j; - stageLoadTiles(); - bgInit(g_Vars.stagenum); + tilesReset(); + bgReset(g_Vars.stagenum); bgBuildTables(g_Vars.stagenum); func0f0147a0(g_Vars.stagenum); @@ -372,24 +357,24 @@ void lvInit(s32 stagenum) } mpSetDefaultNamesIfEmpty(); - anim0002373c(); + animsReset(); objectivesReset(); - func0f013ba0(); + vtxstoreReset(); func0f011110(); - func0f0108d0(); - setupLoadFiles(stagenum); + propsndReset(); + setupReset(stagenum); scenarioReset(); - gvarsInitProps(); - setupInit(); - func0f00b510(); - stageChooseActiveHeads(stagenum); - setupParseObjects(stagenum); - tagsAllocatePtrs(); - explosionsInit(); - smokeInit(); - sparksInit(); - weatherInit(); - lvStopAllMiscSfx(); + varsReset(); + propsReset(); + chrmgrReset(); + headsReset(stagenum); + propsCreate(stagenum); + tagsReset(); + explosionsReset(); + smokeReset(); + sparksReset(); + weatherReset(); + lvResetMiscSfx(); switch (g_Vars.stagenum) { case STAGE_ESCAPE: @@ -398,7 +383,7 @@ void lvInit(s32 stagenum) case STAGE_DEFECTION: case STAGE_ATTACKSHIP: case STAGE_TEST_OLD: - skyInit(); + skyReset(); break; } @@ -406,23 +391,23 @@ void lvInit(s32 stagenum) func0f0147d0(); lasersightsReset(); stub0f013540(); - shardsInit(); - frUnloadData(); + shardsReset(); + frReset(); if (g_Vars.stagenum == STAGE_TITLE) { // empty } else if (stagenum == STAGE_BOOTPAKMENU) { setCurrentPlayerNum(0); - menuInit(); + menuReset(); } else if (stagenum == STAGE_4MBMENU) { setCurrentPlayerNum(0); - menuInit(); + menuReset(); } else if (stagenum == STAGE_CREDITS) { - creditsInit(); + creditsReset(); } else { s32 i; - func0f1777f8(); + utilsReset(); casingsReset(); for (i = 0; i < PLAYERCOUNT(); i++) { @@ -430,14 +415,14 @@ void lvInit(s32 stagenum) g_Vars.currentplayer->usedowntime = 0; g_Vars.currentplayer->invdowntime = g_Vars.currentplayer->usedowntime; - menuInit(); - amInit(); - invInitGunsHeld(); - bgunInit(); + menuReset(); + amReset(); + invReset(); + bgunReset(); playerLoadDefaults(); - playerInit(); + playerReset(); playerSpawn(); - currentPlayerInitAnimation(); + bheadReset(); if (g_Vars.normmplayerisrunning && (g_MpSetup.options & MPOPTION_TEAMSENABLED)) { playermgrCalculateAiBuddyNums(); @@ -446,7 +431,7 @@ void lvInit(s32 stagenum) acousticReset(); func0f0b65f8(); - func0f001bdc(); + lightsReset(); setCurrentPlayerNum(0); } @@ -454,19 +439,19 @@ void lvInit(s32 stagenum) mpCalculateTeamIsOnlyAi(); } - pak0f11a2e4(); + paksReset(); sndResetCurMp3(); if (stagenum == STAGE_BOOTPAKMENU) { - pakPushPakMenuDialog(); + bootmenuReset(); } if (stagenum == STAGE_4MBMENU) { - func0f10cb2c(); + fmbmenuReset(); } if (IS8MB()) { - func0f14a3c4(); + pheadReset(); } func0f011124(false); @@ -575,7 +560,7 @@ bool lvIsFadeActive(void) return g_FadeFrac >= 0; } -void lvCancelFade(void) +void lvFadeReset(void) { g_FadeNumFrames = 0; g_FadeFrac = -1; @@ -1196,7 +1181,7 @@ Gfx *lvRender(Gfx *gdl) gdl = viRenderViewportEdges(gdl); gdl = func0f11f984(gdl); bgTick(); - func0f004314(); + lightsTick(); propsTick(islastplayer); scenarioTickChr(NULL); propsSort(); @@ -1307,7 +1292,7 @@ Gfx *lvRender(Gfx *gdl) currentPlayerInteract(true); } - func0f0641f4(); + propsTestForPickup(); gdl = bgRender(gdl); chr0f028498(var80075d68 == 15 || g_AnimHostEnabled); gdl = propsRenderBeams(gdl); @@ -2011,7 +1996,7 @@ void lvTick(void) #if VERSION >= VERSION_NTSC_1_0 if (g_Vars.unk0004e4) { - pak0f11c54c(); + paksTick(); } #endif @@ -2312,7 +2297,7 @@ void lvTick(void) shardsTick(); sparksTick(); wallhitsTick(); - func0f149864(); + splatsTick(); if (g_WeatherActive) { weatherTick(); @@ -2383,9 +2368,9 @@ void lvTickPlayer(void) g_Vars.currentplayerstats->distance += sqrtf(xdiff * xdiff + zdiff * zdiff); } -void lvReset(void) +void lvStop(void) { - pakStopRumbleForAllPaks(true); + paksStop(true); if (g_MiscAudioHandle && sndGetState(g_MiscAudioHandle)) { audioStop(g_MiscAudioHandle); @@ -2397,25 +2382,25 @@ void lvReset(void) stub0f015270(); } - chrsReset(); - explosionsReset(); - smokeReset(); + chrmgrStop(); + explosionsStop(); + smokeStop(); stub0f015400(); stub0f015410(); - shardsReset(); + shardsStop(); stub0f0153f0(); - alarmReset(); - objsReset(); // props/setup related - weatherReset(); - objectivesAutocomplete(); + propsStop(); + objsStop(); + weatherStop(); + objectivesStop(); stub0f015260(); - func0f015470(); - func0f0150a0(); - musicReset(); - hudmsgsReset(); + bgunStop(); + propsndStop(); + musicStop(); + hudmsgsStop(); if (g_Vars.stagenum < NUM_STAGES) { - bgReset(); + bgStop(); } func00033dd8(); @@ -2426,7 +2411,7 @@ void lvReset(void) } #if VERSION >= VERSION_NTSC_1_0 - func0f01bea0(); + menuStop(); #endif } diff --git a/src/game/mainmenu.c b/src/game/mainmenu.c index 6a219e000..a97588815 100644 --- a/src/game/mainmenu.c +++ b/src/game/mainmenu.c @@ -4,7 +4,6 @@ #include "game/game_00c490.h" #include "game/title.h" #include "game/game_01b0a0.h" -#include "game/game_01bea0.h" #include "game/objectives.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" @@ -13,12 +12,12 @@ #include "game/menu.h" #include "game/mainmenu.h" #include "game/filemgr.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/game_1531a0.h" #include "game/lv.h" #include "game/mplayer/ingame.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" @@ -797,7 +796,7 @@ struct menudialogdef g_PreAndPostMissionBriefingMenuDialog = { s32 menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_SET) { - func0f01bea0(); + menuStop(); if (g_Vars.stagenum == g_MissionConfig.stagenum) { g_Vars.restartlevel = true; @@ -6151,13 +6150,13 @@ s32 menuhandlerCinema(s32 operation, struct menuitem *item, union handlerdata *d g_Vars.autocutgroupcur = 0; g_Vars.autocutgroupleft = g_CutsceneCountsByMission[index]; menuPopDialog(); - func0f01bea0(); + menuStop(); } else { // Play specific cutscene g_Vars.autocutgroupcur = data->list.value - 1; g_Vars.autocutgroupleft = 1; menuPopDialog(); - func0f01bea0(); + menuStop(); } break; case MENUOP_GETOPTIONVALUE: diff --git a/src/game/menu.c b/src/game/menu.c index 2cf3762cd..1926eb6b1 100644 --- a/src/game/menu.c +++ b/src/game/menu.c @@ -25,13 +25,13 @@ #include "game/texdecompress.h" #include "game/mplayer/setup.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/game_1a78b0.h" #include "game/gamefile.h" #include "game/gfxmemory.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/propobj.h" #include "bss.h" @@ -21250,7 +21250,7 @@ void func0f0f8bb4(struct menu840 *arg0, u32 arg1, u32 arg2) arg0->unk524 = arg0->unk54c; } -void menuInit(void) +void menuReset(void) { s32 i; diff --git a/src/game/menuitem.c b/src/game/menuitem.c index 25950522f..573eedc3f 100644 --- a/src/game/menuitem.c +++ b/src/game/menuitem.c @@ -12,7 +12,7 @@ #include "game/game_1531a0.h" #include "game/lv.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/options.h" diff --git a/src/game/menustop.c b/src/game/menustop.c new file mode 100644 index 000000000..6a578f715 --- /dev/null +++ b/src/game/menustop.c @@ -0,0 +1,38 @@ +#include +#include "constants.h" +#include "game/game_006900.h" +#include "game/title.h" +#include "game/game_01b0a0.h" +#include "game/bondgun.h" +#include "game/player.h" +#include "game/menugfx.h" +#include "game/menu.h" +#include "game/filelist.h" +#include "game/mainmenu.h" +#include "game/endscreen.h" +#include "game/playermgr.h" +#include "game/lv.h" +#include "game/music.h" +#include "game/mplayer/ingame.h" +#include "game/mplayer/setup.h" +#include "game/game_19aa80.h" +#include "game/training.h" +#include "game/gamefile.h" +#include "game/mplayer/mplayer.h" +#include "bss.h" +#include "lib/vi.h" +#include "lib/joy.h" +#include "lib/main.h" +#include "lib/snd.h" +#include "data.h" +#include "types.h" + +void menuStop(void) +{ + if (var80062944) { + var80062944 = 0; + var80062948 = 0; + joy000139c8(); + func0f110bf8(); + } +} diff --git a/src/game/game_01bea0.c b/src/game/menutick.c similarity index 98% rename from src/game/game_01bea0.c rename to src/game/menutick.c index edb44b574..a55aaf8e8 100644 --- a/src/game/game_01bea0.c +++ b/src/game/menutick.c @@ -3,7 +3,6 @@ #include "game/game_006900.h" #include "game/title.h" #include "game/game_01b0a0.h" -#include "game/game_01bea0.h" #include "game/bondgun.h" #include "game/player.h" #include "game/menugfx.h" @@ -17,7 +16,7 @@ #include "game/mplayer/ingame.h" #include "game/mplayer/setup.h" #include "game/game_19aa80.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/mplayer/mplayer.h" #include "bss.h" @@ -42,16 +41,6 @@ const char var7f1a85e0[] = "Live: %d\n"; const char var7f1a85ec[] = "current:"; const char var7f1a85f8[] = " numactive %d "; -void func0f01bea0(void) -{ - if (var80062944) { - var80062944 = 0; - var80062948 = 0; - joy000139c8(); - func0f110bf8(); - } -} - void menuCountDialogs(void) { s32 i; @@ -211,7 +200,7 @@ void menuTick(void) } if (var8009dfc0 && g_Vars.currentplayer->gunmem2) { - player0f0b9538(); + playerRemoveChrBody(); if (g_Vars.currentplayer->gunmem2); } @@ -491,7 +480,7 @@ void menuTick(void) } } else { if (var80062944 == 1) { - func0f01bea0(); + menuStop(); } } @@ -523,7 +512,7 @@ void menuTick(void) if (g_MenuData.unk008 == -5) { // Match is beginning mpStartMatch(); - func0f01bea0(); + menuStop(); if (g_Vars.modifiedfiles & MODFILE_MPSETUP) { bossfileSave(); @@ -573,7 +562,7 @@ void menuTick(void) } } } else if (g_MenuData.unk008 == -7) { - func0f01bea0(); + menuStop(); g_FileState = FILESTATE_CHANGINGAGENT; gamefileLoadDefaults(&g_GameFile); gamefileApplyOptions(&g_GameFile); diff --git a/src/game/mplayer/mpaicommands.c b/src/game/mplayer/mpaicommands.c index f8e88a990..4b2459312 100644 --- a/src/game/mplayer/mpaicommands.c +++ b/src/game/mplayer/mpaicommands.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chrai.h" +#include "game/chrai.h" #include "game/bot.h" #include "bss.h" #include "data.h" diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index b82723322..77bbde2b2 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -18,7 +18,7 @@ #include "game/game_19aa80.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "bss.h" #include "lib/args.h" #include "lib/vi.h" @@ -171,7 +171,7 @@ void mpStartMatch(void) g_Vars.perfectbuddynum = 1; } -void mpInit(void) +void mpReset(void) { s32 i; s32 mpindex = 0; @@ -456,7 +456,7 @@ void func0f1881d4(s32 index) g_BotConfigsArray[index].difficulty = BOTDIFF_DISABLED; } -void mpSetDefaultSetup(void) +void mpInit(void) { s32 i; s32 j; diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index 0ce1f91dc..c11dc404a 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -1,18 +1,18 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/dlights.h" #include "game/game_006900.h" #include "game/game_00c490.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/atan2f.h" #include "game/bondgun.h" #include "game/player.h" #include "game/savebuffer.h" #include "game/hudmsg.h" #include "game/menu.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/game_1531a0.h" #include "game/mplayer/setup.h" diff --git a/src/game/mpstats.c b/src/game/mpstats.c index 64063242d..1fb70e0a1 100644 --- a/src/game/mpstats.c +++ b/src/game/mpstats.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/cheats.h" -#include "game/inventory/items.h" +#include "game/inv.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/player.h" diff --git a/src/game/music.c b/src/game/music.c index bd8982585..80e45a85b 100644 --- a/src/game/music.c +++ b/src/game/music.c @@ -213,7 +213,7 @@ void musicQueueFadeEvent(s32 tracktype, f32 arg1, bool fadetopause) } } -void musicInit(void) +void musicReset(void) { s32 i; @@ -515,7 +515,7 @@ void musicSetStage(s32 stagenum) g_MusicStageNum = stagenum; } -void musicReset(void) +void musicStop(void) { #if VERSION >= VERSION_NTSC_1_0 func0f16d430(); diff --git a/src/game/nbomb.c b/src/game/nbomb.c index 7f01b950b..ead6d025e 100644 --- a/src/game/nbomb.c +++ b/src/game/nbomb.c @@ -1,11 +1,11 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/dlights.h" #include "game/game_006900.h" #include "game/nbomb.h" -#include "game/chr/chr.h" -#include "game/chr/chraction.h" +#include "game/chr.h" +#include "game/chraction.h" #include "game/prop.h" #include "game/objectives.h" #include "game/atan2f.h" diff --git a/src/game/objectives/objectives.c b/src/game/objectives.c similarity index 99% rename from src/game/objectives/objectives.c rename to src/game/objectives.c index 9616b17e6..74abdfcf6 100644 --- a/src/game/objectives/objectives.c +++ b/src/game/objectives.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/debug.h" #include "game/prop.h" #include "game/game_091e10.h" @@ -8,10 +8,10 @@ #include "game/game_0b3350.h" #include "game/game_0b4950.h" #include "game/hudmsg.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/lv.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/lang.h" #include "game/propobj.h" #include "bss.h" @@ -73,7 +73,7 @@ void func0f095350(u32 arg0, u32 *arg1) } #endif -void tagsAllocatePtrs(void) +void tagsReset(void) { s32 index = 0; struct tag *tag = g_TagsLinkedList; diff --git a/src/game/objectives/setup.c b/src/game/objectivesreset.c similarity index 97% rename from src/game/objectives/setup.c rename to src/game/objectivesreset.c index fbd3dbc55..f3dbe3470 100644 --- a/src/game/objectives/setup.c +++ b/src/game/objectivesreset.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/inventory/items.h" +#include "game/inv.h" #include "bss.h" #include "lib/main.h" #include "data.h" diff --git a/src/game/objectives/autocomplete.c b/src/game/objectivesstop.c similarity index 91% rename from src/game/objectives/autocomplete.c rename to src/game/objectivesstop.c index 52b4a3d04..190a7d18e 100644 --- a/src/game/objectives/autocomplete.c +++ b/src/game/objectivesstop.c @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void objectivesAutocomplete(void) +void objectivesStop(void) { s32 i; diff --git a/src/game/pak/pak.c b/src/game/pak.c similarity index 99% rename from src/game/pak/pak.c rename to src/game/pak.c index 9fdc04d3d..1655d0c49 100644 --- a/src/game/pak/pak.c +++ b/src/game/pak.c @@ -5,7 +5,7 @@ #include "game/menu.h" #include "game/crc.h" #include "game/gamefile.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/utils.h" #include "bss.h" #include "lib/args.h" @@ -2270,7 +2270,7 @@ void pak0f1189d0(void) } #if VERSION >= VERSION_NTSC_1_0 -void pakInitAll(void) +void paksInit(void) { u8 prevvalue = g_Vars.paksconnected; s8 i; @@ -2310,7 +2310,7 @@ void pakInitAll(void) } #else GLOBAL_ASM( -glabel pakInitAll +glabel paksInit /* f112d30: 27bdffd0 */ addiu $sp,$sp,-48 /* f112d34: afb00018 */ sw $s0,0x18($sp) /* f112d38: afbf002c */ sw $ra,0x2c($sp) @@ -4160,7 +4160,7 @@ void pakMergeBlanks(s8 device) } } -void pak0f11a2e4(void) +void paksReset(void) { // empty } @@ -7329,7 +7329,7 @@ glabel var7f1af0fcnb #endif #if VERSION >= VERSION_NTSC_1_0 -void pak0f11c54c(void) +void paksTick(void) { s32 i; @@ -8897,7 +8897,7 @@ void pakRumble(s8 device, f32 numsecs, s32 onduration, s32 offduration) } #endif -void pakStopRumbleForAllPaks(bool disablepolling) +void paksStop(bool disablepolling) { s8 i; diff --git a/src/game/player.c b/src/game/player.c index 40525cc12..90c69cbb3 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -3,15 +3,15 @@ #include "game/bondeyespy.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/floor.h" -#include "game/inventory/items.h" +#include "game/inv.h" #include "game/nbomb.h" #include "game/title.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/atan2f.h" #include "game/game_096ca0.h" @@ -28,9 +28,9 @@ #include "game/menu.h" #include "game/mainmenu.h" #include "game/filemgr.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" -#include "game/explosions/explosions.h" +#include "game/explosions.h" #include "game/bondview.h" #include "game/game_1531a0.h" #include "game/bg.h" @@ -44,11 +44,10 @@ #include "game/mplayer/ingame.h" #include "game/mplayer/scenarios.h" #include "game/radar.h" -#include "game/training/training.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/mplayer/mplayer.h" #include "game/pad.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/options.h" #include "game/propobj.h" #include "game/splat.h" @@ -881,7 +880,7 @@ bool playerSpawnAnti(struct chrdata *hostchr, bool force) g_Vars.currentplayer->haschrbody = false; g_Vars.currentplayer->model00d4 = NULL; - chr0f020d44(g_Vars.currentplayer->prop, false); + chrRemove(g_Vars.currentplayer->prop, false); if (hostchr->bodynum == BODY_SKEDAR) { g_Vars.antiheadnum = HEAD_MRBLONDE; @@ -911,7 +910,7 @@ bool playerSpawnAnti(struct chrdata *hostchr, bool force) playerchr->chrwidth = hostchr->chrwidth; g_Vars.currentplayer->bond2.width = hostchr->chrwidth; - chr0f020d44(hostprop, true); + chrRemove(hostprop, true); propDeregisterRooms(hostprop); propDelist(hostprop); propDisable(hostprop); @@ -1529,12 +1528,12 @@ void playerTickChrBody(void) } } -void player0f0b9538(void) +void playerRemoveChrBody(void) { if (g_Vars.currentplayer->haschrbody) { if (!g_Vars.mplayerisrunning || (IS4MB() && PLAYERCOUNT() == 1)) { g_Vars.currentplayer->haschrbody = false; - chr0f020d44(g_Vars.currentplayer->prop, false); + chrRemove(g_Vars.currentplayer->prop, false); g_Vars.currentplayer->model00d4 = NULL; bmove0f0cb8c4(g_Vars.currentplayer); bgun0f09df50(); @@ -2046,7 +2045,7 @@ void playerStartCutscene2(void) var8009de2c = -1; g_InCutscene = 1; - pakStopRumbleForAllPaks(true); + paksStop(true); g_Vars.in_cutscene = g_Vars.tickmode == TICKMODE_CUTSCENE && g_CutsceneCurAnimFrame60 < animGetNumFrames(g_CutsceneAnimNum) - 1; g_Vars.cutsceneskip60ths = 0; } @@ -4217,7 +4216,7 @@ void playerTick(bool arg0) struct chrdata *chr; s32 i; - player0f0b9538(); + playerRemoveChrBody(); if (g_PlayersWithControl[g_Vars.currentplayernum]) { bmoveTick(1, 1, arg0, 0); @@ -4499,7 +4498,7 @@ void playerTick(bool arg0) } } } else if (g_Vars.tickmode == TICKMODE_GE_FADEIN || g_Vars.tickmode == TICKMODE_GE_FADEOUT) { - player0f0b9538(); + playerRemoveChrBody(); bmoveTick(1, 1, arg0, 0); playerUpdateShake(); playerSetCameraMode(CAMERAMODE_DEFAULT); @@ -4531,7 +4530,7 @@ void playerTick(bool arg0) struct pad pad; f32 speedfrac; - player0f0b9538(); + playerRemoveChrBody(); padUnpack(g_Vars.currentplayer->autocontrol_aimpad, PADFIELD_POS, &pad); if (mainGetStageNum() == g_Stages[STAGEINDEX_EXTRACTION].id diff --git a/src/game/playerinit.c b/src/game/playerreset.c similarity index 99% rename from src/game/playerinit.c rename to src/game/playerreset.c index 9f4c72036..4a0b77c16 100644 --- a/src/game/playerinit.c +++ b/src/game/playerreset.c @@ -3,15 +3,15 @@ #include "constants.h" #include "game/bondmove.h" #include "game/cheats.h" -#include "game/inventory/items.h" -#include "game/playerinit.h" -#include "game/chr/chr.h" +#include "game/inv.h" +#include "game/playerreset.h" +#include "game/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" #include "game/game_091e10.h" #include "game/bondgun.h" #include "game/player.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/game_1655c0.h" #include "game/mplayer/scenarios.h" #include "game/mplayer/mplayer.h" @@ -464,7 +464,7 @@ struct cmd32 { s32 param3; }; -void playerInit(void) +void playerReset(void) { struct coord pos = {0, 0, 0}; s16 rooms[8]; diff --git a/src/game/prop.c b/src/game/prop.c index 3b5913896..b37b8fb97 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -2,11 +2,11 @@ #include "constants.h" #include "game/bondmove.h" #include "game/bondwalk.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/dlights.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/floor.h" #include "game/ceil.h" @@ -16,12 +16,12 @@ #include "game/game_0b4950.h" #include "game/player.h" #include "game/playermgr.h" -#include "game/explosions/explosions.h" -#include "game/smoke/smoke.h" -#include "game/sparks/sparks.h" +#include "game/explosions.h" +#include "game/smoke.h" +#include "game/sparks.h" #include "game/bg.h" #include "game/bot.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/pad.h" #include "game/propobj.h" #include "game/splat.h" @@ -6225,7 +6225,7 @@ void propSetPerimEnabled(struct prop *prop, s32 enable) } } -void func0f0641f4(void) +void propsTestForPickup(void) { s16 *propnumptr; s32 i; diff --git a/src/game/propobj.c b/src/game/propobj.c index acce7966a..a02ad92e7 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -3,16 +3,16 @@ #include "game/bondmove.h" #include "game/bondwalk.h" #include "game/cheats.h" -#include "game/chr/chraction.h" -#include "game/chr/chrai.h" +#include "game/chraction.h" +#include "game/chrai.h" #include "game/debug.h" #include "game/dlights.h" #include "game/nbomb.h" -#include "game/playerinit.h" -#include "game/chr/chr.h" +#include "game/playerreset.h" +#include "game/chr.h" #include "game/prop.h" #include "game/game_091e10.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/game_096360.h" #include "game/atan2f.h" @@ -31,18 +31,18 @@ #include "game/game_0c33f0.h" #include "game/hudmsg.h" #include "game/menu.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/game_1291b0.h" -#include "game/game_129210.h" -#include "game/explosions/explosions.h" -#include "game/smoke/smoke.h" -#include "game/sparks/sparks.h" +#include "game/vtxstore.h" +#include "game/explosions.h" +#include "game/smoke.h" +#include "game/sparks.h" #include "game/game_1531a0.h" #include "game/bg.h" #include "game/game_1655c0.h" #include "game/game_165670.h" -#include "game/game_1657c0.h" +#include "game/env.h" #include "game/gfxmemory.h" #include "game/lv.h" #include "game/mplayer/setup.h" @@ -50,7 +50,7 @@ #include "game/mpstats.h" #include "game/bot.h" #include "game/botact.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/pad.h" diff --git a/src/game/game_092610.c b/src/game/propsnd.c similarity index 99% rename from src/game/game_092610.c rename to src/game/propsnd.c index 9bde14ab0..521f7a9bd 100644 --- a/src/game/game_092610.c +++ b/src/game/propsnd.c @@ -1,8 +1,8 @@ #include #include "constants.h" -#include "game/chr/chraicommands.h" +#include "game/chraicommands.h" #include "game/dlights.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/atan2f.h" #include "game/hudmsg.h" #include "game/file.h" diff --git a/src/game/game_0108d0.c b/src/game/propsndreset.c similarity index 94% rename from src/game/game_0108d0.c rename to src/game/propsndreset.c index 00d64308b..1c972edb0 100644 --- a/src/game/game_0108d0.c +++ b/src/game/propsndreset.c @@ -5,7 +5,7 @@ #include "data.h" #include "types.h" -void func0f0108d0(void) +void propsndReset(void) { s32 i; diff --git a/src/game/game_0150a0.c b/src/game/propsndstop.c similarity index 96% rename from src/game/game_0150a0.c rename to src/game/propsndstop.c index 27a84075e..fdd85f23f 100644 --- a/src/game/game_0150a0.c +++ b/src/game/propsndstop.c @@ -6,7 +6,7 @@ #include "data.h" #include "types.h" -void func0f0150a0(void) +void propsndStop(void) { s32 i; diff --git a/src/game/propsstop.c b/src/game/propsstop.c new file mode 100644 index 000000000..42f89492a --- /dev/null +++ b/src/game/propsstop.c @@ -0,0 +1,14 @@ +#include +#include "constants.h" +#include "game/chr.h" +#include "game/prop.h" +#include "game/propobj.h" +#include "bss.h" +#include "data.h" +#include "types.h" + +void propsStop(void) +{ + alarmDeactivate(); + gasStopAudio(); +} diff --git a/src/game/radar.c b/src/game/radar.c index 6c02f4c85..ef29af397 100644 --- a/src/game/radar.c +++ b/src/game/radar.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/cheats.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/atan2f.h" #include "game/game_0b2150.h" #include "game/game_0b3350.h" diff --git a/src/game/shards/shards.c b/src/game/shards.c similarity index 99% rename from src/game/shards/shards.c rename to src/game/shards.c index 7c7329ef0..9baadc451 100644 --- a/src/game/shards/shards.c +++ b/src/game/shards.c @@ -4,7 +4,7 @@ #include "game/atan2f.h" #include "game/dlights.h" #include "game/file.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/game_0b3350.h" #include "game/game_0b4950.h" #include "game/gfxmemory.h" diff --git a/src/game/shards/init.c b/src/game/shardsreset.c similarity index 95% rename from src/game/shards/init.c rename to src/game/shardsreset.c index f2def78ed..8b4441531 100644 --- a/src/game/shards/init.c +++ b/src/game/shardsreset.c @@ -5,7 +5,7 @@ #include "data.h" #include "types.h" -void shardsInit(void) +void shardsReset(void) { s32 i; diff --git a/src/game/shards/reset.c b/src/game/shardsstop.c similarity index 88% rename from src/game/shards/reset.c rename to src/game/shardsstop.c index 2ebd726fe..f865de31b 100644 --- a/src/game/shards/reset.c +++ b/src/game/shardsstop.c @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void shardsReset(void) +void shardsStop(void) { s32 i; diff --git a/src/game/shards/tick.c b/src/game/shardstick.c similarity index 100% rename from src/game/shards/tick.c rename to src/game/shardstick.c diff --git a/src/game/sight.c b/src/game/sight.c index 577625a90..9c79c2807 100644 --- a/src/game/sight.c +++ b/src/game/sight.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/game_0b2150.h" diff --git a/src/game/sky.c b/src/game/sky.c index da326a795..8986fc671 100644 --- a/src/game/sky.c +++ b/src/game/sky.c @@ -197,7 +197,7 @@ glabel func0f135f08 ); GLOBAL_ASM( -glabel skyInit +glabel skyReset /* f1360e8: 27bdff18 */ addiu $sp,$sp,-232 /* f1360ec: 3c05800a */ lui $a1,%hi(g_Vars) /* f1360f0: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars) diff --git a/src/game/smoke/smoke.c b/src/game/smoke.c similarity index 99% rename from src/game/smoke/smoke.c rename to src/game/smoke.c index d456028e4..30aabfa61 100644 --- a/src/game/smoke/smoke.c +++ b/src/game/smoke.c @@ -4,7 +4,7 @@ #include "game/prop.h" #include "game/game_0b3350.h" #include "game/game_0b4950.h" -#include "game/smoke/smoke.h" +#include "game/smoke.h" #include "game/bg.h" #include "game/game_1668e0.h" #include "game/file.h" diff --git a/src/game/smoke/init.c b/src/game/smokereset.c similarity index 96% rename from src/game/smoke/init.c rename to src/game/smokereset.c index 6e15ed7ff..8008ccbbe 100644 --- a/src/game/smoke/init.c +++ b/src/game/smokereset.c @@ -5,7 +5,7 @@ #include "data.h" #include "types.h" -void smokeInit(void) +void smokeReset(void) { s32 i; s32 j; diff --git a/src/game/smoke/reset.c b/src/game/smokestop.c similarity index 94% rename from src/game/smoke/reset.c rename to src/game/smokestop.c index 122cf50bf..adee8834a 100644 --- a/src/game/smoke/reset.c +++ b/src/game/smokestop.c @@ -5,7 +5,7 @@ #include "data.h" #include "types.h" -void smokeReset(void) +void smokeStop(void) { s32 i; diff --git a/src/game/sparks/sparks.c b/src/game/sparks.c similarity index 99% rename from src/game/sparks/sparks.c rename to src/game/sparks.c index 3b5ef7192..9555f5244 100644 --- a/src/game/sparks/sparks.c +++ b/src/game/sparks.c @@ -1,9 +1,9 @@ #include #include "constants.h" #include "game/dlights.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/game_0b3350.h" -#include "game/sparks/sparks.h" +#include "game/sparks.h" #include "game/file.h" #include "bss.h" #include "lib/vi.h" diff --git a/src/game/sparks/init.c b/src/game/sparksreset.c similarity index 91% rename from src/game/sparks/init.c rename to src/game/sparksreset.c index 4ce192ed0..182bcf5d5 100644 --- a/src/game/sparks/init.c +++ b/src/game/sparksreset.c @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void sparksInit(void) +void sparksReset(void) { s32 i; g_NextSparkIndex = 0; diff --git a/src/game/sparks/tick.c b/src/game/sparkstick.c similarity index 100% rename from src/game/sparks/tick.c rename to src/game/sparkstick.c diff --git a/src/game/splat.c b/src/game/splat.c index 9fd26cd8e..c8690f343 100644 --- a/src/game/splat.c +++ b/src/game/splat.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/smoke/smoke.h" +#include "game/smoke.h" #include "game/bg.h" #include "game/propobj.h" #include "game/splat.h" @@ -638,7 +638,7 @@ void func0f149268jf(void) } #endif -void func0f149864(void) +void splatsTick(void) { // empty } diff --git a/src/game/game_173520.c b/src/game/texreset.c similarity index 99% rename from src/game/game_173520.c rename to src/game/texreset.c index 13452e758..2341e9091 100644 --- a/src/game/game_173520.c +++ b/src/game/texreset.c @@ -41,7 +41,7 @@ extern u8 _textureconfigSegmentRomStart; extern u8 _textureconfigSegmentStart; extern u8 _textureconfigSegmentEnd; -void texturesLoadConfigs(void) +void texReset(void) { s32 stage; u32 len = &_textureconfigSegmentEnd - &_textureconfigSegmentStart; diff --git a/src/game/game_013cf0.c b/src/game/tilesreset.c similarity index 95% rename from src/game/game_013cf0.c rename to src/game/tilesreset.c index f785aeac9..9fecced99 100644 --- a/src/game/game_013cf0.c +++ b/src/game/tilesreset.c @@ -1,13 +1,15 @@ #include #include "constants.h" -#include "game/game_013cf0.h" +#include "game/tiles.h" #include "game/bg.h" #include "game/file.h" #include "bss.h" #include "data.h" #include "types.h" -void stageLoadTiles(void) +void stageParseTiles(void); + +void tilesReset(void) { s32 index = stageGetIndex2(g_Vars.stagenum); diff --git a/src/game/title.c b/src/game/title.c index a9615cb68..3083b7cc1 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -5,7 +5,7 @@ #include "game/bondgun.h" #include "game/game_0b28d0.h" #include "game/game_0b3350.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/playermgr.h" #include "game/gfxmemory.h" #include "game/credits.h" @@ -14,7 +14,7 @@ #include "game/file.h" #include "game/lv.h" #include "game/music.h" -#include "game/training/training.h" +#include "game/training.h" #include "game/game_1a7560.h" #include "game/lang.h" #include "game/propobj.h" diff --git a/src/game/titlereset.c b/src/game/titlereset.c new file mode 100644 index 000000000..caebb72ec --- /dev/null +++ b/src/game/titlereset.c @@ -0,0 +1,27 @@ +#include +#include "constants.h" +#include "game/game_00b820.h" +#include "game/title.h" +#include "bss.h" +#include "lib/memp.h" +#include "data.h" +#include "types.h" + +void titleReset(void) +{ + g_TitleMode = -1; + var800624d4 = 0; + var800624d8 = 0; + var800624dc = 0; + g_TitleDelayedTimer = 2; + g_TitleDelayedMode = -1; + var800624f4 = 1; + + if (var800624f0) { + g_TitleNextMode = TITLEMODE_SKIP; + } + + var8009cca0 = mempAlloc(0x47800, MEMPOOL_STAGE); + + func0f00b420(); +} diff --git a/src/game/training/training.c b/src/game/training.c similarity index 99% rename from src/game/training/training.c rename to src/game/training.c index 754a22bc2..c9688e403 100644 --- a/src/game/training/training.c +++ b/src/game/training.c @@ -1,9 +1,9 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/dlights.h" #include "game/prop.h" -#include "game/game_092610.h" +#include "game/propsnd.h" #include "game/objectives.h" #include "game/atan2f.h" #include "game/bondgun.h" @@ -12,12 +12,12 @@ #include "game/hudmsg.h" #include "game/menu.h" #include "game/filemgr.h" -#include "game/inventory/inventory.h" -#include "game/explosions/explosions.h" +#include "game/inv.h" +#include "game/explosions.h" #include "game/game_1531a0.h" #include "game/bg.h" -#include "game/training/menus.h" -#include "game/training/training.h" +#include "game/trainingmenus.h" +#include "game/training.h" #include "game/gamefile.h" #include "game/lang.h" #include "game/pad.h" @@ -467,7 +467,7 @@ void frRestoreLighting(void) } } -void frUnloadData(void) +void frReset(void) { s32 i; diff --git a/src/game/training/menus.c b/src/game/trainingmenus.c similarity index 99% rename from src/game/training/menus.c rename to src/game/trainingmenus.c index 3b58a889d..612cfe655 100644 --- a/src/game/training/menus.c +++ b/src/game/trainingmenus.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/chr/chraction.h" +#include "game/chraction.h" #include "game/ceil.h" #include "game/bondgun.h" #include "game/game_0b0fd0.h" @@ -8,13 +8,13 @@ #include "game/menugfx.h" #include "game/menu.h" #include "game/mainmenu.h" -#include "game/inventory/inventory.h" +#include "game/inv.h" #include "game/game_1531a0.h" #include "game/file.h" #include "game/texdecompress.h" #include "game/game_173a00.h" -#include "game/training/menus.h" -#include "game/training/training.h" +#include "game/trainingmenus.h" +#include "game/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/options.h" diff --git a/src/game/utils.c b/src/game/utils.c index cb12edae2..56376c107 100644 --- a/src/game/utils.c +++ b/src/game/utils.c @@ -85,7 +85,7 @@ u32 align32(u32 arg0) } GLOBAL_ASM( -glabel func0f176ddc +glabel utilsInit /* f176ddc: 27bdffd8 */ addiu $sp,$sp,-40 /* f176de0: afbf0014 */ sw $ra,0x14($sp) /* f176de4: 24042710 */ addiu $a0,$zero,0x2710 @@ -146,7 +146,7 @@ glabel func0f176ddc ); // Mismatch: Different codegen in last 3 statements -//void func0f176ddc(void) +//void utilsInit(void) //{ // u32 stack1; // u32 stack2; @@ -488,7 +488,7 @@ bool func0f1777b8(struct coord *a, struct coord *b, struct coord *c, struct coor return true; } -void func0f1777f8(void) +void utilsReset(void) { s32 i; diff --git a/src/game/game_00c240.c b/src/game/varsreset.c similarity index 93% rename from src/game/game_00c240.c rename to src/game/varsreset.c index 201bb0259..3c9ccf80a 100644 --- a/src/game/game_00c240.c +++ b/src/game/varsreset.c @@ -1,13 +1,15 @@ #include #include "constants.h" -#include "game/game_00c240.h" #include "game/prop.h" #include "bss.h" #include "lib/memp.h" +#include "lib/vars.h" #include "data.h" #include "types.h" -void gvarsInitProps(void) +void varsResetRoomProps(void); + +void varsReset(void) { s32 i; @@ -29,7 +31,7 @@ void gvarsInitProps(void) g_Vars.props[i].next = &g_Vars.props[i + 1]; } - gvarsInitRoomProps(); + varsResetRoomProps(); if (g_Vars.normmplayerisrunning) { g_Vars.numpropstates = 4; @@ -53,7 +55,7 @@ void gvarsInitProps(void) } } -void gvarsInitRoomProps(void) +void varsResetRoomProps(void) { s32 i; s32 j; diff --git a/src/game/game_129210.c b/src/game/vtxstore.c similarity index 98% rename from src/game/game_129210.c rename to src/game/vtxstore.c index ad2be52f3..233d7de54 100644 --- a/src/game/game_129210.c +++ b/src/game/vtxstore.c @@ -1,8 +1,8 @@ #include #include "constants.h" -#include "game/chr/chraction.h" -#include "game/chr/chr.h" -#include "game/game_129210.h" +#include "game/chraction.h" +#include "game/chr.h" +#include "game/vtxstore.h" #include "game/propobj.h" #include "bss.h" #include "lib/mema.h" diff --git a/src/game/vtxstorereset.c b/src/game/vtxstorereset.c new file mode 100644 index 000000000..a37421770 --- /dev/null +++ b/src/game/vtxstorereset.c @@ -0,0 +1,39 @@ +#include +#include "constants.h" +#include "bss.h" +#include "lib/memp.h" +#include "data.h" +#include "types.h" + +void vtxstoreReset(void) +{ + s32 i; + s32 j; + s32 num; + s32 val; + + for (i = 0; i < 4; i++) { + if (PLAYERCOUNT() >= 2) { + val = var8007e3d0[i].valifmp; + num = var8007e3d0[i].numifmp; + } else if (g_Vars.stagenum >= STAGE_TITLE) { + val = var8007e3d0[i].valifspecial; + num = var8007e3d0[i].numifspecial; + } else { + val = var8007e3d0[i].valifsp; + num = var8007e3d0[i].numifsp; + } + + if (num > 0) { + var8007e3d0[i].unk24 = mempAlloc(num * sizeof(struct var8007e3d0_data), MEMPOOL_STAGE); + } + + for (j = 0; j < num; j++) { + var8007e3d0[i].unk24[j].unk0e = 0; + } + + var8007e3d0[i].numallocated = num; + var8007e3d0[i].val1 = val; + var8007e3d0[i].val2 = val; + } +} diff --git a/src/game/wallhit.c b/src/game/wallhit.c index 73de987cf..c1603c0a2 100644 --- a/src/game/wallhit.c +++ b/src/game/wallhit.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/dlights.h" -#include "game/chr/chr.h" +#include "game/chr.h" #include "game/game_0b0fd0.h" #include "game/game_0b3350.h" #include "game/playermgr.h" diff --git a/src/game/weather/weather.c b/src/game/weather.c similarity index 99% rename from src/game/weather/weather.c rename to src/game/weather.c index ec65166ac..d770644a5 100644 --- a/src/game/weather/weather.c +++ b/src/game/weather.c @@ -4,8 +4,8 @@ #include "game/game_0b3350.h" #include "game/game_0b4950.h" #include "game/gfxmemory.h" -#include "game/sparks/sparks.h" -#include "game/weather/weather.h" +#include "game/sparks.h" +#include "game/weather.h" #include "game/bg.h" #include "game/file.h" #include "game/lv.h" @@ -5089,7 +5089,7 @@ u32 var8007f110 = 0xffffff7f; // return gdl; //} -void weatherReset(void) +void weatherStop(void) { if (g_WeatherData) { if (g_WeatherData->audiohandles[0]) { diff --git a/src/game/weather/init.c b/src/game/weatherreset.c similarity index 97% rename from src/game/weather/init.c rename to src/game/weatherreset.c index cac94885c..3bba7cc86 100644 --- a/src/game/weather/init.c +++ b/src/game/weatherreset.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/weather/weather.h" +#include "game/weather.h" #include "bss.h" #include "lib/memp.h" #include "data.h" @@ -11,7 +11,7 @@ u32 var800623f4 = 0x00000000; u32 var800623f8 = 0x00000000; u32 var800623fc = 0x00000000; -void weatherInit(void) +void weatherReset(void) { g_WeatherActive = false; g_WeatherData = NULL; diff --git a/src/game/weather/tick.c b/src/game/weathertick.c similarity index 95% rename from src/game/weather/tick.c rename to src/game/weathertick.c index 827f78764..4a45b71c9 100644 --- a/src/game/weather/tick.c +++ b/src/game/weathertick.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/weather/weather.h" +#include "game/weather.h" #include "bss.h" #include "lib/main.h" #include "data.h" diff --git a/src/include/game/activemenu/activemenu.h b/src/include/game/activemenu.h similarity index 90% rename from src/include/game/activemenu/activemenu.h rename to src/include/game/activemenu.h index 921a27117..c120475ac 100644 --- a/src/include/game/activemenu/activemenu.h +++ b/src/include/game/activemenu.h @@ -1,9 +1,11 @@ -#ifndef IN_GAME_ACTIVEMENU_ACTIVEMENU_H -#define IN_GAME_ACTIVEMENU_ACTIVEMENU_H +#ifndef IN_GAME_ACTIVEMENU_H +#define IN_GAME_ACTIVEMENU_H #include #include "data.h" #include "types.h" +void amTick(void); + void amOpenPickTarget(void); s32 menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); @@ -12,7 +14,7 @@ void amSetAiBuddyStealth(void); s32 amGetFirstBuddyIndex(void); void amApply(s32 slot); void amGetSlotDetails(s32 slot, u32 *flags, char *label); -void amInit(void); +void amReset(void); s16 amCalculateSlotWidth(void); void amChangeScreen(s32 step); void amAssignWeaponSlots(void); diff --git a/src/include/game/activemenu/tick.h b/src/include/game/activemenu/tick.h deleted file mode 100644 index a670584a6..000000000 --- a/src/include/game/activemenu/tick.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_ACTIVEMENU_TICK_H -#define _IN_GAME_ACTIVEMENU_TICK_H -#include -#include "data.h" -#include "types.h" - -void amTick(void); - -#endif diff --git a/src/include/game/bg.h b/src/include/game/bg.h index e16435cc5..2120c93e9 100644 --- a/src/include/game/bg.h +++ b/src/include/game/bg.h @@ -24,9 +24,9 @@ f32 func0f15b274(s32 portal); u8 func0f15b4c0(s32 portal); u32 not(u32 arg); u32 xorBabebabe(u32 value); -void bgInit(s32 stagenum); +void bgReset(s32 stagenum); void bgBuildTables(s32 stagenum); -void bgReset(void); +void bgStop(void); void func0f15c880(f32 arg0); f32 func0f15c888(void); f32 currentPlayerGetScaleBg2Gfx(void); diff --git a/src/include/game/bondgun.h b/src/include/game/bondgun.h index bb8b80807..eba9d69c2 100644 --- a/src/include/game/bondgun.h +++ b/src/include/game/bondgun.h @@ -4,6 +4,10 @@ #include "data.h" #include "types.h" +void bgunReset(void); + +void bgunStop(void); + void bgunRumble(s32 handnum, s32 weaponnum); s32 bgunGetUnequippedReloadIndex(s32 weaponnum); void bgunTickUnequippedReload(void); diff --git a/src/include/game/bondguninit.h b/src/include/game/bondguninit.h index 3f9010cc3..cd567040b 100644 --- a/src/include/game/bondguninit.h +++ b/src/include/game/bondguninit.h @@ -4,6 +4,6 @@ #include "data.h" #include "types.h" -void bgunInit(void); +void bgunReset(void); #endif diff --git a/src/include/game/bondhead.h b/src/include/game/bondhead.h index 630709acc..270cb2dce 100644 --- a/src/include/game/bondhead.h +++ b/src/include/game/bondhead.h @@ -4,6 +4,8 @@ #include "data.h" #include "types.h" +void bheadReset(void); + void bheadFlipAnimation(void); void bheadUpdateIdleRoll(void); void bheadUpdatePos(struct coord *vel); diff --git a/src/include/game/botmgr.h b/src/include/game/botmgr.h new file mode 100644 index 000000000..e5530bf7e --- /dev/null +++ b/src/include/game/botmgr.h @@ -0,0 +1,10 @@ +#ifndef _IN_GAME_BOTMGR_H +#define _IN_GAME_BOTMGR_H +#include +#include "data.h" +#include "types.h" + +void botmgrRemoveAll(void); +void botmgrAllocateBot(s32 chrnum, s32 aibotnum); + +#endif diff --git a/src/include/game/camdraw.h b/src/include/game/camdraw.h index 7b3911da2..d6e30543b 100644 --- a/src/include/game/camdraw.h +++ b/src/include/game/camdraw.h @@ -15,8 +15,8 @@ char *phGetColourName(s32 colournum); struct var8007f8dc *func0f14a20c(void); void func0f14a240(void); bool func0f14a2fc(s32 index, u32 line, char *file); -void phAllocate(void); -void func0f14a3c4(void); +void pheadInit(void); +void pheadReset(void); void func0f14a52c(void); void func0f14a560(void); void func0f14a594(s32 arg0); diff --git a/src/include/game/cheats.h b/src/include/game/cheats.h index 127e647db..32c4a823c 100644 --- a/src/include/game/cheats.h +++ b/src/include/game/cheats.h @@ -16,8 +16,8 @@ u32 cheatIsUnlocked(s32 cheat_id); bool cheatIsActive(s32 cheat_id); void cheatActivate(s32 cheat_id); void cheatDeactivate(s32 cheat_id); -void cheatsDisableAll(void); -void cheatsActivate(void); +void cheatsInit(void); +void cheatsReset(void); char *cheatGetNameIfUnlocked(struct menuitem *item); char *cheatGetMarquee(struct menuitem *item); s32 cheatGetByTimedStageIndex(s32 stage_index, s32 difficulty); diff --git a/src/include/game/chr/chr.h b/src/include/game/chr.h similarity index 99% rename from src/include/game/chr/chr.h rename to src/include/game/chr.h index 558f2b6cd..32a67dfce 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr.h @@ -19,7 +19,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3 s32 chrsGetNumFree(void); s16 chrsGetNextUnusedChrnum(void); struct prop *chr0f020b14(struct prop *prop, struct model *model, struct coord *pos, s16 *rooms, f32 arg3, u8 *ailist); -void chr0f020d44(struct prop *prop, bool removechr); +void chrRemove(struct prop *prop, bool removechr); void chrUpdateAimProperties(struct chrdata *chr); void chrFlinchBody(struct chrdata *chr); void chrFlinchHead(struct chrdata *chr, f32 arg1); diff --git a/src/include/game/chr/chraction.h b/src/include/game/chraction.h similarity index 100% rename from src/include/game/chr/chraction.h rename to src/include/game/chraction.h diff --git a/src/include/game/chr/chrai.h b/src/include/game/chrai.h similarity index 100% rename from src/include/game/chr/chrai.h rename to src/include/game/chrai.h diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chraicommands.h similarity index 100% rename from src/include/game/chr/chraicommands.h rename to src/include/game/chraicommands.h diff --git a/src/include/game/chrmgr.h b/src/include/game/chrmgr.h new file mode 100644 index 000000000..e3c7a4a82 --- /dev/null +++ b/src/include/game/chrmgr.h @@ -0,0 +1,12 @@ +#ifndef IN_GAME_CHRMGR_H +#define IN_GAME_CHRMGR_H +#include +#include "data.h" +#include "types.h" + +void chrmgrReset(void); +void chrmgrConfigure(s32 numchrs); + +void chrmgrStop(void); + +#endif diff --git a/src/include/game/credits.h b/src/include/game/credits.h index 0f684d41b..c703321da 100644 --- a/src/include/game/credits.h +++ b/src/include/game/credits.h @@ -26,7 +26,7 @@ Gfx *func0f13a3ec(Gfx *gdl); void credits0f13ae04(Mtxf *mtx); void creditsTick(void); Gfx *creditsRender(Gfx *gdl); -void creditsInit(void); +void creditsReset(void); void creditsRequestAltTitle(void); struct credits000c { diff --git a/src/include/game/dlights.h b/src/include/game/dlights.h index 55b33b666..11fe13fe0 100644 --- a/src/include/game/dlights.h +++ b/src/include/game/dlights.h @@ -25,7 +25,7 @@ void roomInitLights(s32 roomnum); s32 func0f001734(struct coord *arg0, struct coord *arg1, s32 roomnum); void roomSetLightsFaulty(s32 roomnum, s32 chance); void roomSetLightBroken(s32 roomnum, s32 lightnum); -void func0f001bdc(void); +void lightsReset(void); void func0f001c0c(void); u32 func0f00215c(void); u32 func0f0023b8(void); @@ -40,7 +40,7 @@ void func0f003444(void); void func0f0035c0(void); void func0f00372c(void); void func0f0037ac(void); -void func0f004314(void); +void lightsTick(void); void roomAdjustLighting(s32 roomnum, s32 start, s32 limit); void func0f004558(s32 roomnum, s32 increment, s32 limit); void func0f004604(s32 roomnum); diff --git a/src/include/game/game_1657c0.h b/src/include/game/env.h similarity index 90% rename from src/include/game/game_1657c0.h rename to src/include/game/env.h index a14421dbd..b13e9be4a 100644 --- a/src/include/game/game_1657c0.h +++ b/src/include/game/env.h @@ -1,5 +1,5 @@ -#ifndef IN_GAME_GAME_1657C0_H -#define IN_GAME_GAME_1657C0_H +#ifndef IN_GAME_ENV_H +#define IN_GAME_ENV_H #include #include "data.h" #include "types.h" diff --git a/src/include/game/explosions/explosions.h b/src/include/game/explosions.h similarity index 91% rename from src/include/game/explosions/explosions.h rename to src/include/game/explosions.h index b68009529..f80b2e724 100644 --- a/src/include/game/explosions/explosions.h +++ b/src/include/game/explosions.h @@ -1,9 +1,13 @@ -#ifndef IN_GAME_EXPLOSIONS_EXPLOSIONS_H -#define IN_GAME_EXPLOSIONS_EXPLOSIONS_H +#ifndef IN_GAME_EXPLOSIONS_H +#define IN_GAME_EXPLOSIONS_H #include #include "data.h" #include "types.h" +void explosionsReset(void); + +void explosionsStop(void); + bool explosionCreateSimple(struct prop *prop, struct coord *pos, s16 *rooms, s16 type, s32 playernum); bool explosionCreateComplex(struct prop *prop, struct coord *pos, s16 *rooms, s16 type, s32 playernum); f32 explosionGetHorizontalRangeAtFrame(struct explosion *exp, s32 frame); diff --git a/src/include/game/explosions/init.h b/src/include/game/explosions/init.h deleted file mode 100644 index 472a971be..000000000 --- a/src/include/game/explosions/init.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_EXPLOSIONS_INIT_H -#define _IN_GAME_EXPLOSIONS_INIT_H -#include -#include "data.h" -#include "types.h" - -void explosionsInit(void); - -#endif diff --git a/src/include/game/explosions/reset.h b/src/include/game/explosions/reset.h deleted file mode 100644 index 7cc3ef7bf..000000000 --- a/src/include/game/explosions/reset.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef IN_GAME_EXPLOSIONS_RESET_H -#define IN_GAME_EXPLOSIONS_RESET_H -#include -#include "data.h" -#include "types.h" - -void explosionsReset(void); - -#endif diff --git a/src/include/game/file.h b/src/include/game/file.h index 4735c78f2..b57abfe64 100644 --- a/src/include/game/file.h +++ b/src/include/game/file.h @@ -6,7 +6,7 @@ u32 fileGetRomAddress(s32 filenum); s32 fileGetRomSize(s32 filenum); -void filesResetAndPrint(void); +void filesInit(void); void fileLoadPartToAddr(u16 filenum, void *memaddr, s32 offset, u32 len); u32 fileGetInflatedSize(u32 filenum); void *fileLoadToNew(s32 filenum, u32 method); @@ -14,7 +14,7 @@ void *fileLoadToAddr(s32 filenum, s32 method, u8 *ptr, u32 size); u32 fileGetLoadedSize(s32 filenum); u32 fileGetAllocationSize(s32 filenum); void fileSetSize(s32 filenum, void *ptr, u32 size, bool reallocate); -void filesReset(u8 arg0); +void filesStop(u8 arg0); void func0f167330(void); #endif diff --git a/src/include/game/filemgr.h b/src/include/game/filemgr.h index b682199fe..e541ea381 100644 --- a/src/include/game/filemgr.h +++ b/src/include/game/filemgr.h @@ -49,7 +49,7 @@ char *pakMenuTextPagesUsed(struct menuitem *item); char *pakMenuTextStatusMessage(struct menuitem *item); char *pakMenuTextEditingPakName(struct menuitem *item); bool filemgrConsiderPushingFileSelectDialog(void); -void pakPushPakMenuDialog(void); +void bootmenuReset(void); s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/game_000100.h b/src/include/game/game_000100.h index a6e6e3ee8..99689820d 100644 --- a/src/include/game/game_000100.h +++ b/src/include/game/game_000100.h @@ -4,6 +4,6 @@ #include "data.h" #include "types.h" -void func0f000100(void); +void racesInit(void); #endif diff --git a/src/include/game/game_000130.h b/src/include/game/game_000130.h index 02085662d..9a6140377 100644 --- a/src/include/game/game_000130.h +++ b/src/include/game/game_000130.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void func0f000130(void); +void bodiesInit(void); u16 func0f0002a0(s16 animnum, s32 frame, s32 endframe); s32 func0f000358(s16 animnum, s32 startframe, s32 endframe); s32 func0f00040c(struct attackanimconfig *configs); diff --git a/src/include/game/game_00b190.h b/src/include/game/game_00b190.h index fd42c8cac..167992400 100644 --- a/src/include/game/game_00b190.h +++ b/src/include/game/game_00b190.h @@ -4,6 +4,6 @@ #include "data.h" #include "types.h" -void loadTextureList(void); +void texInit(void); #endif diff --git a/src/include/game/game_00b210.h b/src/include/game/game_00b210.h index cf0b35ab7..474233394 100644 --- a/src/include/game/game_00b210.h +++ b/src/include/game/game_00b210.h @@ -4,6 +4,6 @@ #include "data.h" #include "types.h" -void mpInitPresetFeatures(void); +void challengesInit(void); #endif diff --git a/src/include/game/game_00b320.h b/src/include/game/game_00b320.h index 04cfacde0..dc6c2c53e 100644 --- a/src/include/game/game_00b320.h +++ b/src/include/game/game_00b320.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void stageLoadCommonLang(s32 stagenum); +void langReset(s32 stagenum); void func0f00b420(void); #endif diff --git a/src/include/game/game_00b480.h b/src/include/game/game_00b480.h deleted file mode 100644 index 933226065..000000000 --- a/src/include/game/game_00b480.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _IN_GAME_GAME_00B480_H -#define _IN_GAME_GAME_00B480_H -#include -#include "data.h" -#include "types.h" - -void func0f00b480(void); -void func0f00b510(void); -void func0f00b62c(s32 numchrs); - -#endif diff --git a/src/include/game/game_00b820.h b/src/include/game/game_00b820.h index f64dbf921..db2a615fa 100644 --- a/src/include/game/game_00b820.h +++ b/src/include/game/game_00b820.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void stageChooseActiveHeads(s32 stagenum); +void headsReset(s32 stagenum); void resetSomeStageThings(void); void stageAllocateBgChrs(void); diff --git a/src/include/game/game_00c240.h b/src/include/game/game_00c240.h deleted file mode 100644 index 4d5ed915a..000000000 --- a/src/include/game/game_00c240.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IN_GAME_GAME_00C240_H -#define IN_GAME_GAME_00C240_H -#include -#include "data.h" -#include "types.h" - -void gvarsInitProps(void); -void gvarsInitRoomProps(void); - -#endif diff --git a/src/include/game/game_00c490.h b/src/include/game/game_00c490.h index 479b06e03..2bbb27a7f 100644 --- a/src/include/game/game_00c490.h +++ b/src/include/game/game_00c490.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void setupInit(void); +void propsReset(void); void addLiftDoor(struct linkliftdoorobj *link); void addPadlockedDoor(struct padlockeddoorobj *link); void addSafeItem(struct safeitemobj *link); @@ -28,7 +28,7 @@ s32 func0f00e2b0(s32 padnum); void setupDoor(struct doorobj *door, s32 cmdindex); void setupHov(struct defaultobj *obj, struct hov *hov); void setupLoadBriefing(s32 stagenum, u8 *buffer, s32 bufferlen, struct briefing *briefing); -void setupLoadFiles(s32 stagenum); -void setupParseObjects(s32 stagenum); +void setupReset(s32 stagenum); +void propsCreate(s32 stagenum); #endif diff --git a/src/include/game/game_0108d0.h b/src/include/game/game_0108d0.h deleted file mode 100644 index ddbfde89d..000000000 --- a/src/include/game/game_0108d0.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_GAME_0108D0_H -#define _IN_GAME_GAME_0108D0_H -#include -#include "data.h" -#include "types.h" - -void func0f0108d0(void); - -#endif diff --git a/src/include/game/game_0125a0.h b/src/include/game/game_0125a0.h deleted file mode 100644 index 159d7856b..000000000 --- a/src/include/game/game_0125a0.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IN_GAME_GAME_0125A0_H -#define IN_GAME_GAME_0125A0_H -#include -#include "data.h" -#include "types.h" - -void func0f0125a0(s16 animnum, s32 loopframe, s32 endframe, s32 *arg3); -void currentPlayerInitAnimation(void); - -#endif diff --git a/src/include/game/game_013b80.h b/src/include/game/game_013b80.h index 78b5b99fc..5577ad46c 100644 --- a/src/include/game/game_013b80.h +++ b/src/include/game/game_013b80.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void func0f013b80(void); -void func0f013ba0(void); +void texReset(void); +void vtxstoreReset(void); #endif diff --git a/src/include/game/game_013cf0.h b/src/include/game/game_013cf0.h deleted file mode 100644 index 89ef15c7f..000000000 --- a/src/include/game/game_013cf0.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _IN_GAME_GAME_013CF0_H -#define _IN_GAME_GAME_013CF0_H -#include -#include "data.h" -#include "types.h" - -void stageLoadTiles(void); -void stageParseTiles(void); - -#endif diff --git a/src/include/game/game_0147d0.h b/src/include/game/game_0147d0.h index 46562358d..acccf72ca 100644 --- a/src/include/game/game_0147d0.h +++ b/src/include/game/game_0147d0.h @@ -6,7 +6,5 @@ void func0f0147d0(void); void lasersightsReset(void); -void botmgrRemoveAll(void); -void botmgrAllocateBot(s32 chrnum, s32 aibotnum); #endif diff --git a/src/include/game/game_014f10.h b/src/include/game/game_014f10.h deleted file mode 100644 index 2ee635fac..000000000 --- a/src/include/game/game_014f10.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IN_GAME_GAME_014F10_H -#define IN_GAME_GAME_014F10_H -#include -#include "data.h" -#include "types.h" - -void chrsReset(void); -void alarmReset(void); - -#endif diff --git a/src/include/game/game_015010.h b/src/include/game/game_015010.h index e1505242d..b346e0d47 100644 --- a/src/include/game/game_015010.h +++ b/src/include/game/game_015010.h @@ -4,6 +4,6 @@ #include "data.h" #include "types.h" -void objsReset(void); +void objsStop(void); #endif diff --git a/src/include/game/game_0150a0.h b/src/include/game/game_0150a0.h deleted file mode 100644 index 784f85b0c..000000000 --- a/src/include/game/game_0150a0.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef IN_GAME_GAME_0150A0_H -#define IN_GAME_GAME_0150A0_H -#include -#include "data.h" -#include "types.h" - -u32 func0f0150a0(void); - -#endif diff --git a/src/include/game/game_015470.h b/src/include/game/game_015470.h deleted file mode 100644 index 708728f5c..000000000 --- a/src/include/game/game_015470.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef IN_GAME_GAME_015470_H -#define IN_GAME_GAME_015470_H -#include -#include "data.h" -#include "types.h" - -void func0f015470(void); -void getitleInit(void *addr, u32 arg1); -Gfx *getitleRender(Gfx *gdl); - - -#endif diff --git a/src/include/game/game_01bea0.h b/src/include/game/game_01bea0.h deleted file mode 100644 index b47e6177c..000000000 --- a/src/include/game/game_01bea0.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _IN_GAME_GAME_01BEA0_H -#define _IN_GAME_GAME_01BEA0_H -#include -#include "data.h" -#include "types.h" - -void func0f01bea0(void); -void menuCountDialogs(void); -void menuTick(void); - -#endif diff --git a/src/include/game/game_10c9c0.h b/src/include/game/game_10c9c0.h index aed76c7ba..4eacff820 100644 --- a/src/include/game/game_10c9c0.h +++ b/src/include/game/game_10c9c0.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void func0f10cb2c(void); +void fmbmenuReset(void); s32 menuhandler4MbDropOut(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler0010ca1c(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler4MbAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/game_1531a0.h b/src/include/game/game_1531a0.h index 97ba38ab6..d4c566020 100644 --- a/src/include/game/game_1531a0.h +++ b/src/include/game/game_1531a0.h @@ -10,7 +10,7 @@ void func0f1531c4(s32 arg0); void func0f1531d0(s32 arg0); void func0f1531dc(bool arg0); void fontLoad(u8 *romstart, u8 *romend, struct font **fontptr, struct fontchar **charsptr, bool monospace); -void fontsLoadForCurrentStage(void); +void fontsReset(void); Gfx *func0f153628(Gfx *gdl); Gfx *func0f153780(Gfx *gdl); Gfx *gfxSetPrimColour(Gfx *gdl, u32 colour); diff --git a/src/include/game/getitle.h b/src/include/game/getitle.h new file mode 100644 index 000000000..48694e6e3 --- /dev/null +++ b/src/include/game/getitle.h @@ -0,0 +1,10 @@ +#ifndef IN_GAME_GETITLE_H +#define IN_GAME_GETITLE_H +#include +#include "data.h" +#include "types.h" + +void getitleReset(void *addr, u32 arg1); +Gfx *getitleRender(Gfx *gdl); + +#endif diff --git a/src/include/game/gfxmemory.h b/src/include/game/gfxmemory.h index 0c05bd342..6f90a212d 100644 --- a/src/include/game/gfxmemory.h +++ b/src/include/game/gfxmemory.h @@ -6,7 +6,7 @@ extern u8 *g_GfxBuffers[3]; -void gfxInitMemory(void); +void gfxReset(void); Gfx *gfxGetMasterDisplayList(void); struct gfxvtx *gfxAllocateVertices(s32 count); void *gfxAllocateMatrix(void); diff --git a/src/include/game/hudmsg.h b/src/include/game/hudmsg.h index 3110833f5..7f857ab4e 100644 --- a/src/include/game/hudmsg.h +++ b/src/include/game/hudmsg.h @@ -11,7 +11,7 @@ Gfx *hudmsgRenderZoomRange(Gfx *gdl, u32 alpha); Gfx *hudmsgRenderBox(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, f32 bgopacity, u32 bordercolour, f32 textopacity); s32 hudmsg0f0ddb1c(s32 *arg0, s32 arg1); void hudmsgsHideByChannel(s32 value); -void hudmsgsInit(void); +void hudmsgsReset(void); void hudmsgRemoveAll(void); s32 hudmsgGetNext(s32 refid); void hudmsgCreate(char *text, s32 type); @@ -29,6 +29,6 @@ void hudmsgsSetOn(u32 reason); void hudmsgsSetOff(u32 reason); void hudmsgsRemoveForDeadPlayer(s32 playernum); Gfx *hudmsgsRender(Gfx *gdl); -void hudmsgsReset(void); +void hudmsgsStop(void); #endif diff --git a/src/include/game/inventory/inventory.h b/src/include/game/inv.h similarity index 88% rename from src/include/game/inventory/inventory.h rename to src/include/game/inv.h index 8265d2f91..248cecbc8 100644 --- a/src/include/game/inventory/inventory.h +++ b/src/include/game/inv.h @@ -1,9 +1,16 @@ -#ifndef IN_GAME_INVENTORY_INVENTORY_H -#define IN_GAME_INVENTORY_INVENTORY_H +#ifndef IN_GAME_INV_H +#define IN_GAME_INV_H #include #include "data.h" #include "types.h" +extern struct noisesettings invnoisesettings_00010fd0; +extern struct inventory_class invclass_default; +extern struct weapon *g_Weapons[WEAPON_SUICIDEPILL + 1]; + +void invReset(void); +void invInit(s32 numdoubles); + void invClear(void); void invSortItem(struct invitem *item); void invInsertItem(struct invitem *item); diff --git a/src/include/game/inventory/init.h b/src/include/game/inventory/init.h deleted file mode 100644 index 59f60ab9a..000000000 --- a/src/include/game/inventory/init.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IN_GAME_INVENTORY_INIT_H -#define IN_GAME_INVENTORY_INIT_H -#include -#include "data.h" -#include "types.h" - -void invInitGunsHeld(void); -void invInit(s32 numdoubles); - -#endif diff --git a/src/include/game/inventory/items.h b/src/include/game/inventory/items.h deleted file mode 100644 index 50d03cdaf..000000000 --- a/src/include/game/inventory/items.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef IN_GAME_INVENTORY_ITEMS_H -#define IN_GAME_INVENTORY_ITEMS_H -#include - -extern struct noisesettings invnoisesettings_00010fd0; -extern struct inventory_class invclass_default; -extern struct weapon *g_Weapons[WEAPON_SUICIDEPILL + 1]; - -#endif diff --git a/src/include/game/lasersights.h b/src/include/game/lasersights.h new file mode 100644 index 000000000..e8913c657 --- /dev/null +++ b/src/include/game/lasersights.h @@ -0,0 +1,10 @@ +#ifndef _IN_GAME_LASERSIGHTS_H +#define _IN_GAME_LASERSIGHTS_H +#include +#include "data.h" +#include "types.h" + +void func0f0147d0(void); +void lasersightsReset(void); + +#endif diff --git a/src/include/game/lv.h b/src/include/game/lv.h index 504544fdc..733193f3d 100644 --- a/src/include/game/lv.h +++ b/src/include/game/lv.h @@ -5,14 +5,14 @@ #include "types.h" u32 getVar80084040(void); -void lv0f167af8(void); -void lvStopAllMiscSfx(void); +void lvInit(void); +void lvResetMiscSfx(void); s32 lvGetMiscSfxIndex(u32 arg0); void lvSetMiscSfxState(u32 type, bool play); void lvUpdateMiscSfx(void); -void lvInit(s32 stagenum); +void lvReset(s32 stagenum); Gfx *lvRenderFade(Gfx *gdl); -void lvCancelFade(void); +void lvFadeReset(void); bool lvCheckCmpFollowThreat(struct threat *threat, s32 index); void lvFindThreatsForProp(struct prop *prop, bool inchild, struct coord *playerpos, s32 *activeslots, f32 *param_5); void func0f168f24(struct prop *prop, bool inchild, struct coord *playerpos, s32 *activeslots, f32 *distances); @@ -28,7 +28,7 @@ void lvCheckPauseStateChanged(void); void lvSetPaused(bool paused); void lvConfigureFade(u32 color, s16 num_frames); bool lvIsFadeActive(void); -void lvReset(void); +void lvStop(void); bool lvIsPaused(void); s32 lvGetDifficulty(void); void lvSetDifficulty(s32 difficulty); diff --git a/src/include/game/menu.h b/src/include/game/menu.h index 1a17356c9..e87249346 100644 --- a/src/include/game/menu.h +++ b/src/include/game/menu.h @@ -8,6 +8,10 @@ extern const struct menucolourpalette g_MenuColourPalettes[]; extern const struct menucolourpalette g_MenuColourPalettes2[]; extern const struct menucolourpalette g_MenuColourPalettes3[]; +void menuTick(void); + +void menuStop(void); + void menuPlaySound(s32 menusound); bool menuIsSoloMissionOrMp(void); bool currentPlayerIsMenuOpenInSoloOrMp(void); @@ -82,7 +86,7 @@ void func0f0f85e0(struct menudialogdef *dialogdef, s32 root); Gfx *menuRenderDialog(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool lightweight); Gfx *menuRenderDialogs(Gfx *gdl); void func0f0f8bb4(struct menu840 *arg0, u32 arg1, u32 arg2); -void menuInit(void); +void menuReset(void); void menuSwipe(s32 direction); void dialogTick(struct menudialog *dialog, struct menuinputs *inputs, u32 tickflags); void dialogInitItems(struct menudialog *dialog); diff --git a/src/include/game/mplayer/mplayer.h b/src/include/game/mplayer/mplayer.h index 63bca51c9..89d599ebf 100644 --- a/src/include/game/mplayer/mplayer.h +++ b/src/include/game/mplayer/mplayer.h @@ -7,13 +7,13 @@ f32 mpHandicapToDamageScale(u8 value); void func0f187838(struct mpchrconfig *mpchr); void mpStartMatch(void); -void mpInit(void); +void mpReset(void); void mpCalculateTeamIsOnlyAi(void); void func0f187fbc(s32 playernum); void func0f187fec(void); void mpPlayerSetDefaults(s32 playernum, bool autonames); void func0f1881d4(s32 index); -void mpSetDefaultSetup(void); +void mpInit(void); void mpSetDefaultNamesIfEmpty(void); s32 mpCalculateTeamScoreLimit(void); void mpApplyLimits(void); diff --git a/src/include/game/music.h b/src/include/game/music.h index 9ed7f1968..9f3f19506 100644 --- a/src/include/game/music.h +++ b/src/include/game/music.h @@ -11,7 +11,7 @@ s32 func0f16d124(s32 tracktype); void musicQueueStartEvent(u32 tracktype, u32 tracknum, f32 arg2, u16 volume); void musicQueueStopEvent(s32 tracktype); void musicQueueFadeEvent(s32 tracktype, f32 arg1, bool fadetopause); -void musicInit(void); +void musicReset(void); void musicQueueStopAllEvent(void); void func0f16d430(void); void musicQueueType5Event(void); @@ -22,7 +22,7 @@ void musicStartNrg(f32 arg0); void musicStartTrackAsMenu(s32 tracknum); void musicSetStageAndStartMusic(s32 stagenum); void musicSetStage(s32 stagenum); -void musicReset(void); +void musicStop(void); void musicActivateNrg(void); void musicDeactivateNrg(void); void musicStartMenu(void); diff --git a/src/include/game/objectives.h b/src/include/game/objectives.h index 472c33dd1..e7534b17e 100644 --- a/src/include/game/objectives.h +++ b/src/include/game/objectives.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void objectivesAutocomplete(void); +void objectivesStop(void); void objectivesReset(void); void tagInsert(struct tag *tag); @@ -17,7 +17,7 @@ void objectiveAddHolographCriteria(struct criteria_holograph *criteria); u32 xorBaffbeff(u32 value); u32 xorBabeffff(u32 value); u32 xorBoobless(u32 value); -void tagsAllocatePtrs(void); +void tagsReset(void); s32 objGetTagNum(struct defaultobj *obj); s32 objectiveGetCount(void); u32 objectiveGetDifficultyBits(s32 index); diff --git a/src/include/game/pak/pak.h b/src/include/game/pak.h similarity index 97% rename from src/include/game/pak/pak.h rename to src/include/game/pak.h index 9857c16c1..2489eb34f 100644 --- a/src/include/game/pak/pak.h +++ b/src/include/game/pak.h @@ -1,5 +1,5 @@ -#ifndef IN_GAME_PAK_PAK_H -#define IN_GAME_PAK_PAK_H +#ifndef IN_GAME_PAK_H +#define IN_GAME_PAK_H #include #include "data.h" #include "types.h" @@ -66,7 +66,7 @@ s32 _pakCreateCameraFile(s8 device, s32 *outfileid); bool pakResizeNote(s8 device, s32 numpages); void pak0f1185e0(s8 device, s32 arg1, s32 arg2); u32 pak0f118674(s8 device, u32 filetype, s32 *outfileid); -void pakInitAll(void); +void paksInit(void); void pakCalculateChecksum(u8 *arg0, u8 *arg1, u16 *arg2); s32 _pakReadBodyAtGuid(s8 device, s32 fileid, u8 *body, s32 arg3); s32 _pakGetFileIdsByType(s8 device, u32 filetype, u32 *fileids); @@ -83,7 +83,7 @@ void pakCorrupt(void); bool pakCreateInitialFiles(s8 device); s32 pakFindMaxFileId(s8 device); void pakMergeBlanks(s8 device); -void pak0f11a2e4(void); +void paksReset(void); void pak0f11a32c(s8 device, u8 arg1, u32 line, char *file); void pakInit(s8 arg0); PakErr1 pakReadWriteBlock(s8 device, OSPfs *pfs, s32 file_no, u8 flag, u32 address, u32 len, u8 *buffer); @@ -101,7 +101,7 @@ bool pakReplaceFileAtOffsetWithBlank(s8 device, u32 offset); s32 pakWriteFileAtOffset(s8 device, u32 offset, u32 filetype, u8 *newdata, s32 bodylen, s32 *outfileid, u8 *olddata, u32 fileid, u32 generation); bool pakRepair(s8 device); bool pakHandleResult(s32 err1, s8 device, bool arg2, u32 line); -void pak0f11c54c(void); +void paksTick(void); void pak0f11c6d0(void); void pakExecuteDebugOperations(void); void pak0f11ca30(void); @@ -128,7 +128,7 @@ void pakRumble(s32 device, f32 numsecs, s32 onduration, s32 offduration); void pakRumble(s8 device, f32 numsecs, s32 onduration, s32 offduration); #endif -void pakStopRumbleForAllPaks(bool disablepolling); +void paksStop(bool disablepolling); void pakDisableRumbleForPlayer(s8 playernum); void pakEnableRumbleForPlayer(s8 playernum); void pakDisableRumbleForAllPlayers(void); diff --git a/src/include/game/player.h b/src/include/game/player.h index 5292bd169..6f452578e 100644 --- a/src/include/game/player.h +++ b/src/include/game/player.h @@ -14,7 +14,7 @@ void playerResetBond(struct playerbond *pb, struct coord *pos); void playersTickAllChrBodies(void); void playerChooseBodyAndHead(s32 *bodynum, s32 *headnum, s32 *arg2); void playerTickChrBody(void); -void player0f0b9538(void); +void playerRemoveChrBody(void); void playerTickMpSwirl(void); void playerExecutePreparedWarp(void); void playerStartCutscene(s16 anim_id); diff --git a/src/include/game/playerinit.h b/src/include/game/playerreset.h similarity index 74% rename from src/include/game/playerinit.h rename to src/include/game/playerreset.h index a8cd182f2..e3e29fac5 100644 --- a/src/include/game/playerinit.h +++ b/src/include/game/playerreset.h @@ -1,5 +1,5 @@ -#ifndef IN_GAME_PLAYERINIT_H -#define IN_GAME_PLAYERINIT_H +#ifndef IN_GAME_PLAYERRESET_H +#define IN_GAME_PLAYERRESET_H #include #include "data.h" #include "types.h" @@ -9,6 +9,6 @@ void func0f011124(bool value); void func0f011130(s32 arg0, s32 numchrs); bool weaponLoadProjectileModels(s32 weaponnum); void playerInitEyespy(void); -void playerInit(void); +void playerReset(void); #endif diff --git a/src/include/game/prop.h b/src/include/game/prop.h index 12474366a..6a4d63b94 100644 --- a/src/include/game/prop.h +++ b/src/include/game/prop.h @@ -36,7 +36,7 @@ void propUnpause(struct prop *prop); void propsTick(u32 islastplayer); void propsTickPadEffects(void); void propSetPerimEnabled(struct prop *prop, bool enable); -void func0f0641f4(void); +void propsTestForPickup(void); f32 func0f06438c(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3, f32 *arg4, s32 arg5, bool cangangsta, s32 arg7); void farsightChooseTarget(void); void autoaimTick(void); diff --git a/src/include/game/game_092610.h b/src/include/game/propsnd.h similarity index 94% rename from src/include/game/game_092610.h rename to src/include/game/propsnd.h index 45fb39254..f5bf0c73a 100644 --- a/src/include/game/game_092610.h +++ b/src/include/game/propsnd.h @@ -1,9 +1,13 @@ -#ifndef IN_GAME_GAME_092610_H -#define IN_GAME_GAME_092610_H +#ifndef IN_GAME_PROPSND_H +#define IN_GAME_PROPSND_H #include #include "data.h" #include "types.h" +void propsndReset(void); + +void propsndStop(void); + bool func0f092610(struct prop *prop, s32 arg1); void func0f0926bc(struct prop *prop, s32 arg1, u16 arg2); s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4); diff --git a/src/include/game/shards.h b/src/include/game/shards.h index 34e6c78df..3681d77ee 100644 --- a/src/include/game/shards.h +++ b/src/include/game/shards.h @@ -5,9 +5,9 @@ #include "types.h" void shardsCreate(struct coord *pos, f32 *rotx, f32 *roty, f32 *rotz, f32 xmin, f32 xmax, f32 ymin, f32 ymax, s32 type, struct prop *prop); -void shardsInit(void); -Gfx *shardsRender(Gfx *gdl); void shardsReset(void); +Gfx *shardsRender(Gfx *gdl); +void shardsStop(void); void shardsTick(void); #endif diff --git a/src/include/game/sky.h b/src/include/game/sky.h index 21adc77c7..2448bc804 100644 --- a/src/include/game/sky.h +++ b/src/include/game/sky.h @@ -6,7 +6,7 @@ void func0f135c70(void); u32 func0f135f08(void); -void skyInit(void); +void skyReset(void); Gfx *func0f13687c(Gfx *gdl); #endif diff --git a/src/include/game/smoke/smoke.h b/src/include/game/smoke.h similarity index 89% rename from src/include/game/smoke/smoke.h rename to src/include/game/smoke.h index 6c3b7dd4e..a6ff84049 100644 --- a/src/include/game/smoke/smoke.h +++ b/src/include/game/smoke.h @@ -1,9 +1,13 @@ -#ifndef _IN_GAME_SMOKE_SMOKE_H -#define _IN_GAME_SMOKE_SMOKE_H +#ifndef _IN_GAME_SMOKE_H +#define _IN_GAME_SMOKE_H #include #include "data.h" #include "types.h" +void smokeReset(void); + +void smokeStop(void); + Gfx *smokeRenderPart(struct smoke *smoke, struct smokepart *part, Gfx *gdl, struct coord *coord, f32 size); struct smoke *smokeCreate(struct coord *pos, s16 *rooms, s16 type); bool func0f12e454(struct coord *pos, s16 *rooms, s16 type, u32 arg4); diff --git a/src/include/game/smoke/init.h b/src/include/game/smoke/init.h deleted file mode 100644 index 76cee5775..000000000 --- a/src/include/game/smoke/init.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_SMOKE_INIT_H -#define _IN_GAME_SMOKE_INIT_H -#include -#include "data.h" -#include "types.h" - -void smokeInit(void); - -#endif diff --git a/src/include/game/smoke/reset.h b/src/include/game/smoke/reset.h deleted file mode 100644 index 016fafae6..000000000 --- a/src/include/game/smoke/reset.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_SMOKE_RESET_H -#define _IN_GAME_SMOKE_RESET_H -#include -#include "data.h" -#include "types.h" - -void smokeReset(void); - -#endif diff --git a/src/include/game/sparks/sparks.h b/src/include/game/sparks.h similarity index 74% rename from src/include/game/sparks/sparks.h rename to src/include/game/sparks.h index ff40ee10c..725df521c 100644 --- a/src/include/game/sparks/sparks.h +++ b/src/include/game/sparks.h @@ -1,9 +1,13 @@ -#ifndef _IN_GAME_SPARKS_SPARKS_H -#define _IN_GAME_SPARKS_SPARKS_H +#ifndef _IN_GAME_SPARKS_H +#define _IN_GAME_SPARKS_H #include #include "data.h" #include "types.h" +void sparksReset(void); + +void sparksTick(void); + u32 func0f12f6c0(void); void sparkgroupEnsureFreeSparkSlot(struct sparkgroup *group); void sparksCreate(s32 room, struct prop *prop, struct coord *pos, struct coord *arg3, struct coord *dir, s32 type); diff --git a/src/include/game/sparks/init.h b/src/include/game/sparks/init.h deleted file mode 100644 index 9b035f74e..000000000 --- a/src/include/game/sparks/init.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef IN_GAME_SPARKS_INIT_H -#define IN_GAME_SPARKS_INIT_H -#include -#include "data.h" -#include "types.h" - -void sparksInit(void); - -#endif diff --git a/src/include/game/sparks/tick.h b/src/include/game/sparks/tick.h deleted file mode 100644 index be93aedc7..000000000 --- a/src/include/game/sparks/tick.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef IN_GAME_SPARKS_TICK_H -#define IN_GAME_SPARKS_TICK_H -#include -#include "data.h" -#include "types.h" - -void sparksTick(void); - -#endif diff --git a/src/include/game/splat.h b/src/include/game/splat.h index dc852ab56..9d17794a9 100644 --- a/src/include/game/splat.h +++ b/src/include/game/splat.h @@ -8,9 +8,9 @@ void splatTick(struct prop *prop); void splatsCreateForChrHit(struct prop *prop, struct splat *arg1, struct coord *arg2, struct coord *arg3, s32 arg4, s32 arg5, struct chrdata *arg6); s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct splat *arg3, struct coord *arg4, struct coord *arg5, s32 arg6, s32 arg7, s32 arg8, struct chrdata *arg9, s32 arg10); bool func0f149274(f32 arg0, struct prop *prop, struct splat *arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6, struct chrdata *arg7, s32 arg8); -void func0f149864(void); +void splatsTick(void); u32 func0f14986c(void); void chrInitSplats(struct chrdata *chr); -void func0f14a3bc(void); +void pheadInit2(void); #endif diff --git a/src/include/game/texdecompress.h b/src/include/game/texdecompress.h index 54776a7d1..4c62667f4 100644 --- a/src/include/game/texdecompress.h +++ b/src/include/game/texdecompress.h @@ -37,6 +37,6 @@ void texLoadFromConfigs(struct textureconfig *configs, s32 numconfigs, struct te void texLoadFromTextureNum(u32 arg0, struct texturething *arg1); void texSetBitstring(u8 *arg0); s32 texReadBits(s32 arg0); -void texturesLoadConfigs(void); +void texReset(void); #endif diff --git a/src/include/game/tiles.h b/src/include/game/tiles.h new file mode 100644 index 000000000..b7e1e17e7 --- /dev/null +++ b/src/include/game/tiles.h @@ -0,0 +1,9 @@ +#ifndef _IN_GAME_TILES_H +#define _IN_GAME_TILES_H +#include +#include "data.h" +#include "types.h" + +void tilesReset(void); + +#endif diff --git a/src/include/game/title.h b/src/include/game/title.h index bb0d683ad..dee501662 100644 --- a/src/include/game/title.h +++ b/src/include/game/title.h @@ -10,6 +10,8 @@ extern u32 var800624dc; void titleInit(void); +void titleReset(void); + char *mpPlayerGetWeaponOfChoiceName(u32 playernum, u32 slot); void func0f01616c(void *light, u8 arg1, u8 arg2, u8 arg3, f32 arg4, struct coord *arg5); void titleInitLegal(void); diff --git a/src/include/game/training/training.h b/src/include/game/training.h similarity index 99% rename from src/include/game/training/training.h rename to src/include/game/training.h index 5efb075a8..24bb73004 100644 --- a/src/include/game/training/training.h +++ b/src/include/game/training.h @@ -28,7 +28,7 @@ u32 frGetWeaponBySlot(s32 slot); s32 frGetNumWeaponsAvailable(void); void frInitLighting(void); void frRestoreLighting(void); -void frUnloadData(void); +void frReset(void); void *frLoadRomData(u32 len); void frSetDifficulty(s32 difficulty); u32 frGetDifficulty(void); diff --git a/src/include/game/training/menus.h b/src/include/game/trainingmenus.h similarity index 100% rename from src/include/game/training/menus.h rename to src/include/game/trainingmenus.h diff --git a/src/include/game/utils.h b/src/include/game/utils.h index 4d7c6405f..d4c8b59b2 100644 --- a/src/include/game/utils.h +++ b/src/include/game/utils.h @@ -8,14 +8,14 @@ void func0f176d70(s32 arg0); u32 align4(u32 arg0); u32 align16(u32 arg0); u32 align32(u32 arg0); -void func0f176ddc(void); +void utilsInit(void); void func0f1770ac(struct coord *a, struct coord *b, struct coord *out); bool func0f177164(struct coord *arg0, struct coord *arg1, u32 line, char *file); bool func0f1773c8(struct coord *a, struct coord *b); f32 coordsGetDistance(struct coord *a, struct coord *b); f32 func0f1776cc(struct coord *a, struct coord *b, struct coord *c); bool func0f17776c(struct coord *a, struct coord *b, f32 mult, struct coord *out); -void func0f1777f8(void); +void utilsReset(void); u32 func0f177a54(void); u32 func0f177bb4(void); s32 func0f177c8c(s32 arg0, s32 *arg1, s32 *arg2); diff --git a/src/include/game/game_129210.h b/src/include/game/vtxstore.h similarity index 92% rename from src/include/game/game_129210.h rename to src/include/game/vtxstore.h index eb52619be..4fdcd99c5 100644 --- a/src/include/game/game_129210.h +++ b/src/include/game/vtxstore.h @@ -4,6 +4,8 @@ #include "data.h" #include "types.h" +void vtxstoreReset(void); + void vtxstoreFixRefs(union modelrwdata *find, union modelrwdata *replacement); void vtxstoreTick(void); void *vtxstoreAllocate(s32 count, s32 index, s32 arg2, s32 arg3); diff --git a/src/include/game/weather/weather.h b/src/include/game/weather.h similarity index 88% rename from src/include/game/weather/weather.h rename to src/include/game/weather.h index 391e44256..053d8811c 100644 --- a/src/include/game/weather/weather.h +++ b/src/include/game/weather.h @@ -1,9 +1,13 @@ -#ifndef _IN_GAME_WEATHER_WEATHER_H -#define _IN_GAME_WEATHER_WEATHER_H +#ifndef _IN_GAME_WEATHER_H +#define _IN_GAME_WEATHER_H #include #include "data.h" #include "types.h" +void weatherReset(void); + +void weatherTick(void); + Gfx *weatherRender(Gfx *gdl); void weatherSetBoundaries(struct weatherparticledata *data, s32 index, f32 min, f32 max); struct weatherparticledata *weatherAllocateParticles(void); @@ -17,6 +21,6 @@ void weatherConfigureSnow(u32 intensity); bool weatherIsRoomWeatherProof(s32 room); Gfx *weatherRenderRain(Gfx *gdl, struct weatherdata *weather, s32 arg2); Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2); -void weatherReset(void); +void weatherStop(void); #endif diff --git a/src/include/game/weather/init.h b/src/include/game/weather/init.h deleted file mode 100644 index 1f98fb0f9..000000000 --- a/src/include/game/weather/init.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_WEATHER_INIT_H -#define _IN_GAME_WEATHER_INIT_H -#include -#include "data.h" -#include "types.h" - -void weatherInit(void); - -#endif diff --git a/src/include/game/weather/tick.h b/src/include/game/weather/tick.h deleted file mode 100644 index 822f70e01..000000000 --- a/src/include/game/weather/tick.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_WEATHER_TICK_H -#define _IN_GAME_WEATHER_TICK_H -#include -#include "data.h" -#include "types.h" - -void weatherTick(void); - -#endif diff --git a/src/include/lib/anim.h b/src/include/lib/anim.h index 013ac727d..2344813aa 100644 --- a/src/include/lib/anim.h +++ b/src/include/lib/anim.h @@ -6,7 +6,7 @@ void animsInit(void); void animsInitTables(void); -void anim0002373c(void); +void animsReset(void); s32 animGetNumFrames(s16 anim_id); bool animHasFrames(s16 animnum); s32 animGetNumAnimations(void); diff --git a/src/include/lib/audiomgr.h b/src/include/lib/audiomgr.h index c59a24f2f..1a140dc94 100644 --- a/src/include/lib/audiomgr.h +++ b/src/include/lib/audiomgr.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void amgrAllocateStack(void); +void amgrInit(void); #if VERSION >= VERSION_PAL_BETA void amgrCreate(ALSynConfig *config, u32 *settings); diff --git a/src/include/lib/debughud.h b/src/include/lib/debughud.h index 8917aa607..2dc05e1bf 100644 --- a/src/include/lib/debughud.h +++ b/src/include/lib/debughud.h @@ -6,8 +6,8 @@ void dhudPutCharAt(s32 x, s32 y, char c); void dhudInit(void); -void dhudTryReset(void); void dhudReset(void); +void dhudClear(void); void dhudSetPos(s32 x, s32 y); void dhudPrintChar(u8 c); void dhudPrintString(char *text); diff --git a/src/include/lib/fault.h b/src/include/lib/fault.h index 9109fd6d6..1f1c51cfc 100644 --- a/src/include/lib/fault.h +++ b/src/include/lib/fault.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -void faultCreateThread(void); +void faultInit(void); void faultAssert(char *msg, char *file, s32 line); #endif diff --git a/src/include/lib/joy.h b/src/include/lib/joy.h index 41533da6d..cd8b803d0 100644 --- a/src/include/lib/joy.h +++ b/src/include/lib/joy.h @@ -14,9 +14,9 @@ s32 joyShiftPfsStates(void); void joyRecordPfsState(u8 pfsstate); void joyCheckPfs(s32 arg0); void joySetPfsTemporarilyPlugged(s8 index); -void joySystemInit(void); +void joyInit(void); void joyDisableTemporarily(void); -void joy00013dfc(void); +void joyReset(void); void joy00013e84(void); u32 joyGetConnectedControllers(void); void joyConsumeSamples(struct joydata *joydata); @@ -47,7 +47,7 @@ void joyDisableCyclicPolling(s32 line, char *file); void joyEnableCyclicPolling(s32 line, char *file); #endif -void joyReset(void); +void joyDestroy(void); void joyGetContpadNumsForPlayer(s8 playernum, s32 *pad1, s32 *pad2); void joyStopRumble(s8 device, bool disablepolling); s32 joy000155b4(s8 device); diff --git a/src/include/lib/mema.h b/src/include/lib/mema.h index 6f49bbab8..c83878ef6 100644 --- a/src/include/lib/mema.h +++ b/src/include/lib/mema.h @@ -6,7 +6,7 @@ void memaDefrag(void); void memaInit(void); -void memaHeapInit(void *ptr, u32 size); +void memaReset(void *ptr, u32 size); void memaPrint(void); void *memaAlloc(u32 size); s32 memaGrow(s32 addr, u32 amount); diff --git a/src/include/lib/memp.h b/src/include/lib/memp.h index 7c6eb3687..7653e1fc1 100644 --- a/src/include/lib/memp.h +++ b/src/include/lib/memp.h @@ -4,8 +4,8 @@ #include "data.h" #include "types.h" -void memp000121e0(void); -void mempInit(u8 *heapstart, u32 heaplen); +void mempInit(void); +void mempSetHeap(u8 *heapstart, u32 heaplen); u32 mempGetStageFree(void); void *mempGetNextStageAllocation(void); void *mempAlloc(u32 len, u8 pool); diff --git a/src/include/lib/gvars.h b/src/include/lib/vars.h similarity index 72% rename from src/include/lib/gvars.h rename to src/include/lib/vars.h index e6f44a10d..66218e3f5 100644 --- a/src/include/lib/gvars.h +++ b/src/include/lib/vars.h @@ -4,6 +4,8 @@ #include "data.h" #include "types.h" -void gvarsInit(void); +void varsInit(void); + +void varsReset(void); #endif diff --git a/src/include/lib/vi.h b/src/include/lib/vi.h index 7c96d9432..a096d6127 100644 --- a/src/include/lib/vi.h +++ b/src/include/lib/vi.h @@ -6,14 +6,14 @@ void profileInit(void); void profileTick(void); -void profile00009a90(void); +void profileReset(void); void profile00009a98(void); void profileSetMarker(u32 arg0); Gfx *profileRender(Gfx *gdl); void viConfigureForLogos(void); void viConfigureForBanner(u8 *fb); void viConfigureForLegal(void); -void viAllocateFbs(s32 stagenum); +void viReset(s32 stagenum); void viBlack(bool black); void vi00009ed4(void); void viUpdateMode(void); diff --git a/src/include/lib/videbug.h b/src/include/lib/videbug.h index 67393b42d..3981f8cc3 100644 --- a/src/include/lib/videbug.h +++ b/src/include/lib/videbug.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" +void videbugCreate(void); void videbugInit(void); -void videbugCreateMesgQueue(void); #endif diff --git a/src/lib/anim.c b/src/lib/anim.c index 04d12f966..1c4fb253d 100644 --- a/src/lib/anim.c +++ b/src/lib/anim.c @@ -106,7 +106,7 @@ void animsInitTables(void) } } -void anim0002373c(void) +void animsReset(void) { g_NumAnimations = var8009a894; g_Anims = var8009a898; diff --git a/src/lib/audiomgr.c b/src/lib/audiomgr.c index 3543088db..a663c8fef 100644 --- a/src/lib/audiomgr.c +++ b/src/lib/audiomgr.c @@ -45,7 +45,7 @@ void amgrHandleDoneMsg(AudioInfo *info); void amgrHandleFrameMsg(AudioInfo *info, AudioInfo *previnfo); void amgrMain(void *arg); -void amgrAllocateStack(void) +void amgrInit(void) { g_AudioSp = bootAllocateStack(THREAD_AUDIO, STACKSIZE_AUDIO); } diff --git a/src/lib/boot.c b/src/lib/boot.c index a6f29e01a..779de1546 100644 --- a/src/lib/boot.c +++ b/src/lib/boot.c @@ -596,7 +596,7 @@ void bootCreateSchedThread(void) void bootPhase2(void *arg) { bootCreateIdleThread(); - videbugInit(); + videbugCreate(); pimgrCreate(); bootCreateRmonThread(); diff --git a/src/lib/debughud.c b/src/lib/debughud.c index 85c6a1e57..3bf38968a 100644 --- a/src/lib/debughud.c +++ b/src/lib/debughud.c @@ -141,11 +141,11 @@ void dhudInit(void) #endif } -void dhudTryReset(void) +void dhudReset(void) { #if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA if (g_DHudInitialised) { - dhudReset(); + dhudClear(); } #endif } @@ -189,7 +189,7 @@ void dhudResetPos(void) #endif } -void dhudReset(void) +void dhudClear(void) { #if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA s32 x; diff --git a/src/lib/fault.c b/src/lib/fault.c index 4b4cee647..4478de9ad 100644 --- a/src/lib/fault.c +++ b/src/lib/fault.c @@ -6,7 +6,7 @@ #include "data.h" #include "types.h" -void faultCreateThread(void) +void faultInit(void) { crashCreateThread(); } diff --git a/src/lib/joy.c b/src/lib/joy.c index 0c2d103fa..3ec28996d 100644 --- a/src/lib/joy.c +++ b/src/lib/joy.c @@ -1,6 +1,6 @@ #include #include "constants.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "bss.h" #include "lib/main.h" #include "lib/joy.h" @@ -293,7 +293,7 @@ glabel joySetPfsTemporarilyPlugged ); #endif -void joySystemInit(void) +void joyInit(void) { s32 i; s32 j; @@ -348,7 +348,7 @@ void joyDisableTemporarily(void) } } -void joy00013dfc(void) +void joyReset(void) { OSMesg msg; @@ -1317,7 +1317,7 @@ glabel func00016154nb ); #endif -void joyReset(void) +void joyDestroy(void) { s32 i; diff --git a/src/lib/main.c b/src/lib/main.c index d11606a1a..12787d80f 100644 --- a/src/lib/main.c +++ b/src/lib/main.c @@ -1,6 +1,7 @@ #include #include #include "lib/sched.h" +#include "lib/vars.h" #include "constants.h" #include "game/camdraw.h" #include "game/cheats.h" @@ -21,7 +22,6 @@ #include "game/stubs/game_00b180.h" #include "game/stubs/game_00b200.h" #include "game/game_00b210.h" -#include "game/game_00b320.h" #include "game/title.h" #include "game/game_01b0a0.h" #include "game/objectives.h" @@ -37,7 +37,7 @@ #include "game/game_176080.h" #include "game/game_1a78b0.h" #include "game/mplayer/mplayer.h" -#include "game/pak/pak.h" +#include "game/pak.h" #include "game/splat.h" #include "game/utils.h" #include "bss.h" @@ -297,26 +297,26 @@ GLOBAL_ASM( glabel mainInit /* d4c0: 27bdeb28 */ addiu $sp,$sp,-5336 /* d4c4: afbf002c */ sw $ra,0x2c($sp) -/* d4c8: 0c002fd4 */ jal faultCreateThread +/* d4c8: 0c002fd4 */ jal faultInit /* d4cc: afb00028 */ sw $s0,0x28($sp) /* d4d0: 0c003410 */ jal dmaInit /* d4d4: 00000000 */ nop -/* d4d8: 0c002264 */ jal amgrAllocateStack +/* d4d8: 0c002264 */ jal amgrInit /* d4dc: 00000000 */ nop -/* d4e0: 0c005600 */ jal gvarsInit +/* d4e0: 0c005600 */ jal varsInit /* d4e4: 00000000 */ nop -/* d4e8: 0c004868 */ jal memp000121e0 +/* d4e8: 0c004868 */ jal mempInit /* d4ec: 00000000 */ nop /* d4f0: 0c004a73 */ jal memaInit /* d4f4: 00000000 */ nop -/* d4f8: 0c004dbe */ jal videbugCreateMesgQueue +/* d4f8: 0c004dbe */ jal videbugInit /* d4fc: 00000000 */ nop /* d500: 0c002690 */ jal viConfigureForLogos /* d504: 00000000 */ nop /* d508: 0c00bd46 */ jal rmonIsDisabled /* d50c: 00000000 */ nop /* d510: 3c018006 */ lui $at,0x8006 -/* d514: 0c004f0b */ jal joySystemInit +/* d514: 0c004f0b */ jal joyInit /* d518: ac22d860 */ sw $v0,-0x27a0($at) /* d51c: 27a41490 */ addiu $a0,$sp,0x1490 /* d520: 27a514cc */ addiu $a1,$sp,0x14cc @@ -344,7 +344,7 @@ glabel mainInit /* d574: 24010001 */ li $at,0x1 /* d578: 56010006 */ bnel $s0,$at,.JF0000d594 /* d57c: 2a010002 */ slti $at,$s0,0x2 -/* d580: 0c004f65 */ jal joy00013dfc +/* d580: 0c004f65 */ jal joyReset /* d584: 00000000 */ nop /* d588: 10000007 */ b .JF0000d5a8 /* d58c: 26100001 */ addiu $s0,$s0,0x1 @@ -586,7 +586,7 @@ glabel mainInit /* d8f0: 00000000 */ nop /* d8f4: 0fc6a10c */ jal func0f1a78b0 /* d8f8: 00000000 */ nop -/* d8fc: 0fc59ce1 */ jal filesResetAndPrint +/* d8fc: 0fc59ce1 */ jal filesInit /* d900: 00000000 */ nop /* d904: 0fc5d8e8 */ jal stub0f175f50 /* d908: 00000000 */ nop @@ -606,7 +606,7 @@ glabel mainInit /* d93c: 8c631170 */ lw $v1,0x1170($v1) /* d940: 3c018000 */ lui $at,0x8000 /* d944: 00412025 */ or $a0,$v0,$at -/* d948: 0c00486a */ jal mempInit +/* d948: 0c00486a */ jal mempSetHeap /* d94c: 00642823 */ subu $a1,$v1,$a0 /* d950: 0c00493a */ jal mempResetPool /* d954: 24040008 */ li $a0,0x8 @@ -614,19 +614,19 @@ glabel mainInit /* d95c: 24040006 */ li $a0,0x6 /* d960: 0c0033a6 */ jal crashReset /* d964: 00000000 */ nop -/* d968: 0fc02ca8 */ jal mpInitPresetFeatures +/* d968: 0fc02ca8 */ jal challengesInit /* d96c: 00000000 */ nop -/* d970: 0fc5dc8b */ jal func0f176ddc +/* d970: 0fc5dc8b */ jal utilsInit /* d974: 00000000 */ nop /* d978: 0c000d34 */ jal func000034d0 /* d97c: 00000000 */ nop -/* d980: 0fc02c88 */ jal loadTextureList +/* d980: 0fc02c88 */ jal texInit /* d984: 00000000 */ nop /* d988: 0fc00000 */ jal langInit /* d98c: 00000000 */ nop -/* d990: 0fc59fc2 */ jal lv0f167af8 +/* d990: 0fc59fc2 */ jal lvInit /* d994: 00000000 */ nop -/* d998: 0fc41d8f */ jal cheatsDisableAll +/* d998: 0fc41d8f */ jal cheatsInit /* d99c: 00000000 */ nop /* d9a0: 0c003a58 */ jal func0000e9c0 /* d9a4: 00000000 */ nop @@ -658,19 +658,19 @@ glabel mainInit /* da0c: 00000000 */ nop /* da10: 0fc00234 */ jal stub0f000840 /* da14: 00000000 */ nop -/* da18: 0fc6224c */ jal mpSetDefaultSetup +/* da18: 0fc6224c */ jal mpInit /* da1c: 00000000 */ nop -/* da20: 0fc52652 */ jal phAllocate +/* da20: 0fc52652 */ jal pheadInit /* da24: 00000000 */ nop -/* da28: 0fc46362 */ jal pakInitAll +/* da28: 0fc46362 */ jal paksInit /* da2c: 00000000 */ nop -/* da30: 0fc52677 */ jal func0f14a3bc +/* da30: 0fc52677 */ jal pheadInit2 /* da34: 00000000 */ nop /* da38: 0c008bb4 */ jal animsInit /* da3c: 00000000 */ nop -/* da40: 0fc00064 */ jal func0f000100 +/* da40: 0fc00064 */ jal racesInit /* da44: 00000000 */ nop -/* da48: 0fc00070 */ jal func0f000130 +/* da48: 0fc00070 */ jal bodiesInit /* da4c: 00000000 */ nop /* da50: 0fc00238 */ jal stub0f000850 /* da54: 00000000 */ nop @@ -694,26 +694,26 @@ GLOBAL_ASM( glabel mainInit /* d260: 27bdeb20 */ addiu $sp,$sp,-5344 /* d264: afbf002c */ sw $ra,0x2c($sp) -/* d268: 0c002f3c */ jal faultCreateThread +/* d268: 0c002f3c */ jal faultInit /* d26c: afb00028 */ sw $s0,0x28($sp) /* d270: 0c003378 */ jal dmaInit /* d274: 00000000 */ nop -/* d278: 0c002258 */ jal amgrAllocateStack +/* d278: 0c002258 */ jal amgrInit /* d27c: 00000000 */ nop -/* d280: 0c00557c */ jal gvarsInit +/* d280: 0c00557c */ jal varsInit /* d284: 00000000 */ nop -/* d288: 0c0047dc */ jal memp000121e0 +/* d288: 0c0047dc */ jal mempInit /* d28c: 00000000 */ nop /* d290: 0c0049e7 */ jal memaInit /* d294: 00000000 */ nop -/* d298: 0c004d3a */ jal videbugCreateMesgQueue +/* d298: 0c004d3a */ jal videbugInit /* d29c: 00000000 */ nop /* d2a0: 0c002668 */ jal viConfigureForLogos /* d2a4: 00000000 */ nop /* d2a8: 0c00bcc2 */ jal rmonIsDisabled /* d2ac: 00000000 */ nop /* d2b0: 3c018006 */ lui $at,0x8006 -/* d2b4: 0c004e87 */ jal joySystemInit +/* d2b4: 0c004e87 */ jal joyInit /* d2b8: ac22d650 */ sw $v0,-0x29b0($at) /* d2bc: 27a41498 */ addiu $a0,$sp,0x1498 /* d2c0: 27a514d4 */ addiu $a1,$sp,0x14d4 @@ -741,7 +741,7 @@ glabel mainInit /* d314: 24010001 */ li $at,0x1 /* d318: 56010006 */ bnel $s0,$at,.PF0000d334 /* d31c: 2a010002 */ slti $at,$s0,0x2 -/* d320: 0c004ee1 */ jal joy00013dfc +/* d320: 0c004ee1 */ jal joyReset /* d324: 00000000 */ nop /* d328: 10000007 */ b .PF0000d348 /* d32c: 26100001 */ addiu $s0,$s0,0x1 @@ -981,7 +981,7 @@ glabel mainInit /* d684: 00000000 */ nop /* d688: 0fc6a2ac */ jal func0f1a78b0 /* d68c: 00000000 */ nop -/* d690: 0fc59fbd */ jal filesResetAndPrint +/* d690: 0fc59fbd */ jal filesInit /* d694: 00000000 */ nop /* d698: 0fc5dbe0 */ jal stub0f175f50 /* d69c: 00000000 */ nop @@ -1001,7 +1001,7 @@ glabel mainInit /* d6d0: 8c631050 */ lw $v1,0x1050($v1) /* d6d4: 3c018000 */ lui $at,0x8000 /* d6d8: 00412025 */ or $a0,$v0,$at -/* d6dc: 0c0047de */ jal mempInit +/* d6dc: 0c0047de */ jal mempSetHeap /* d6e0: 00642823 */ subu $a1,$v1,$a0 /* d6e4: 0c0048ae */ jal mempResetPool /* d6e8: 24040008 */ li $a0,0x8 @@ -1009,19 +1009,19 @@ glabel mainInit /* d6f0: 24040006 */ li $a0,0x6 /* d6f4: 0c00330e */ jal crashReset /* d6f8: 00000000 */ nop -/* d6fc: 0fc02c88 */ jal mpInitPresetFeatures +/* d6fc: 0fc02c88 */ jal challengesInit /* d700: 00000000 */ nop -/* d704: 0fc5df83 */ jal func0f176ddc +/* d704: 0fc5df83 */ jal utilsInit /* d708: 00000000 */ nop /* d70c: 0c000d28 */ jal func000034d0 /* d710: 00000000 */ nop -/* d714: 0fc02c68 */ jal loadTextureList +/* d714: 0fc02c68 */ jal texInit /* d718: 00000000 */ nop /* d71c: 0fc00000 */ jal langInit /* d720: 00000000 */ nop -/* d724: 0fc5a29e */ jal lv0f167af8 +/* d724: 0fc5a29e */ jal lvInit /* d728: 00000000 */ nop -/* d72c: 0fc41f77 */ jal cheatsDisableAll +/* d72c: 0fc41f77 */ jal cheatsInit /* d730: 00000000 */ nop /* d734: 0c0039c8 */ jal func0000e9c0 /* d738: 00000000 */ nop @@ -1053,19 +1053,19 @@ glabel mainInit /* d7a0: 00000000 */ nop /* d7a4: 0fc00210 */ jal stub0f000840 /* d7a8: 00000000 */ nop -/* d7ac: 0fc62468 */ jal mpSetDefaultSetup +/* d7ac: 0fc62468 */ jal mpInit /* d7b0: 00000000 */ nop -/* d7b4: 0fc52bf6 */ jal phAllocate +/* d7b4: 0fc52bf6 */ jal pheadInit /* d7b8: 00000000 */ nop -/* d7bc: 0fc4652e */ jal pakInitAll +/* d7bc: 0fc4652e */ jal paksInit /* d7c0: 00000000 */ nop -/* d7c4: 0fc52c1b */ jal func0f14a3bc +/* d7c4: 0fc52c1b */ jal pheadInit2 /* d7c8: 00000000 */ nop /* d7cc: 0c008b30 */ jal animsInit /* d7d0: 00000000 */ nop -/* d7d4: 0fc00040 */ jal func0f000100 +/* d7d4: 0fc00040 */ jal racesInit /* d7d8: 00000000 */ nop -/* d7dc: 0fc0004c */ jal func0f000130 +/* d7dc: 0fc0004c */ jal bodiesInit /* d7e0: 00000000 */ nop /* d7e4: 0fc00214 */ jal stub0f000850 /* d7e8: 00000000 */ nop @@ -1097,26 +1097,26 @@ GLOBAL_ASM( glabel mainInit /* d2b0: 27bdeb20 */ addiu $sp,$sp,-5344 /* d2b4: afbf002c */ sw $ra,0x2c($sp) -/* d2b8: 0c002f38 */ jal faultCreateThread +/* d2b8: 0c002f38 */ jal faultInit /* d2bc: afb00028 */ sw $s0,0x28($sp) /* d2c0: 0c00338c */ jal dmaInit /* d2c4: 00000000 */ nop -/* d2c8: 0c002258 */ jal amgrAllocateStack +/* d2c8: 0c002258 */ jal amgrInit /* d2cc: 00000000 */ nop -/* d2d0: 0c0058ac */ jal gvarsInit +/* d2d0: 0c0058ac */ jal varsInit /* d2d4: 00000000 */ nop -/* d2d8: 0c004890 */ jal memp000121e0 +/* d2d8: 0c004890 */ jal mempInit /* d2dc: 00000000 */ nop /* d2e0: 0c004aaf */ jal memaInit /* d2e4: 00000000 */ nop -/* d2e8: 0c004e46 */ jal videbugCreateMesgQueue +/* d2e8: 0c004e46 */ jal videbugInit /* d2ec: 00000000 */ nop /* d2f0: 0c002668 */ jal viConfigureForLogos /* d2f4: 00000000 */ nop /* d2f8: 0c00bff2 */ jal rmonIsDisabled /* d2fc: 00000000 */ nop /* d300: 3c018006 */ lui $at,0x8006 -/* d304: 0c0051b7 */ jal joySystemInit +/* d304: 0c0051b7 */ jal joyInit /* d308: ac22e4c0 */ sw $v0,-0x1b40($at) /* d30c: 27a41498 */ addiu $a0,$sp,0x1498 /* d310: 27a514d4 */ addiu $a1,$sp,0x14d4 @@ -1144,7 +1144,7 @@ glabel mainInit /* d364: 24010001 */ li $at,0x1 /* d368: 56010006 */ bnel $s0,$at,.PB0000d384 /* d36c: 2a010002 */ slti $at,$s0,0x2 -/* d370: 0c005211 */ jal joy00013dfc +/* d370: 0c005211 */ jal joyReset /* d374: 00000000 */ nop /* d378: 10000007 */ b .PB0000d398 /* d37c: 26100001 */ addiu $s0,$s0,0x1 @@ -1406,7 +1406,7 @@ glabel mainInit /* d724: 00000000 */ nop /* d728: 0fc6a558 */ jal func0f1a78b0 /* d72c: 00000000 */ nop -/* d730: 0fc5a179 */ jal filesResetAndPrint +/* d730: 0fc5a179 */ jal filesInit /* d734: 00000000 */ nop /* d738: 0fc5dea0 */ jal stub0f175f50 /* d73c: 00000000 */ nop @@ -1426,7 +1426,7 @@ glabel mainInit /* d770: 8c632fe0 */ lw $v1,0x2fe0($v1) /* d774: 3c018000 */ lui $at,0x8000 /* d778: 00412025 */ or $a0,$v0,$at -/* d77c: 0c004892 */ jal mempInit +/* d77c: 0c004892 */ jal mempSetHeap /* d780: 00642823 */ subu $a1,$v1,$a0 /* d784: 0c004977 */ jal mempResetPool /* d788: 24040008 */ li $a0,0x8 @@ -1434,19 +1434,19 @@ glabel mainInit /* d790: 24040006 */ li $a0,0x6 /* d794: 0c003320 */ jal crashReset /* d798: 00000000 */ nop -/* d79c: 0fc02c88 */ jal mpInitPresetFeatures +/* d79c: 0fc02c88 */ jal challengesInit /* d7a0: 00000000 */ nop -/* d7a4: 0fc5e243 */ jal func0f176ddc +/* d7a4: 0fc5e243 */ jal utilsInit /* d7a8: 00000000 */ nop /* d7ac: 0c000d28 */ jal func000034d0 /* d7b0: 00000000 */ nop -/* d7b4: 0fc02c68 */ jal loadTextureList +/* d7b4: 0fc02c68 */ jal texInit /* d7b8: 00000000 */ nop /* d7bc: 0fc00000 */ jal langInit /* d7c0: 00000000 */ nop -/* d7c4: 0fc5a45a */ jal lv0f167af8 +/* d7c4: 0fc5a45a */ jal lvInit /* d7c8: 00000000 */ nop -/* d7cc: 0fc41edb */ jal cheatsDisableAll +/* d7cc: 0fc41edb */ jal cheatsInit /* d7d0: 00000000 */ nop /* d7d4: 0c003a7d */ jal func0000e9c0 /* d7d8: 00000000 */ nop @@ -1478,19 +1478,19 @@ glabel mainInit /* d840: 00000000 */ nop /* d844: 0fc00210 */ jal stub0f000840 /* d848: 00000000 */ nop -/* d84c: 0fc62728 */ jal mpSetDefaultSetup +/* d84c: 0fc62728 */ jal mpInit /* d850: 00000000 */ nop -/* d854: 0fc52db6 */ jal phAllocate +/* d854: 0fc52db6 */ jal pheadInit /* d858: 00000000 */ nop -/* d85c: 0fc4649e */ jal pakInitAll +/* d85c: 0fc4649e */ jal paksInit /* d860: 00000000 */ nop -/* d864: 0fc52ddb */ jal func0f14a3bc +/* d864: 0fc52ddb */ jal pheadInit2 /* d868: 00000000 */ nop /* d86c: 0c008e60 */ jal animsInit /* d870: 00000000 */ nop -/* d874: 0fc00040 */ jal func0f000100 +/* d874: 0fc00040 */ jal racesInit /* d878: 00000000 */ nop -/* d87c: 0fc0004c */ jal func0f000130 +/* d87c: 0fc0004c */ jal bodiesInit /* d880: 00000000 */ nop /* d884: 0fc00214 */ jal stub0f000850 /* d888: 00000000 */ nop @@ -1522,26 +1522,26 @@ GLOBAL_ASM( glabel mainInit /* d520: 27bdeb28 */ addiu $sp,$sp,-5336 /* d524: afbf002c */ sw $ra,0x2c($sp) -/* d528: 0c002fec */ jal faultCreateThread +/* d528: 0c002fec */ jal faultInit /* d52c: afb00028 */ sw $s0,0x28($sp) /* d530: 0c003428 */ jal dmaInit /* d534: 00000000 */ nop -/* d538: 0c002288 */ jal amgrAllocateStack +/* d538: 0c002288 */ jal amgrInit /* d53c: 00000000 */ nop -/* d540: 0c005618 */ jal gvarsInit +/* d540: 0c005618 */ jal varsInit /* d544: 00000000 */ nop -/* d548: 0c004878 */ jal memp000121e0 +/* d548: 0c004878 */ jal mempInit /* d54c: 00000000 */ nop /* d550: 0c004a83 */ jal memaInit /* d554: 00000000 */ nop -/* d558: 0c004dd6 */ jal videbugCreateMesgQueue +/* d558: 0c004dd6 */ jal videbugInit /* d55c: 00000000 */ nop /* d560: 0c0026ac */ jal viConfigureForLogos /* d564: 00000000 */ nop /* d568: 0c00be82 */ jal rmonIsDisabled /* d56c: 00000000 */ nop /* d570: 3c018006 */ lui $at,%hi(var8005d9b0) -/* d574: 0c004f25 */ jal joySystemInit +/* d574: 0c004f25 */ jal joyInit /* d578: ac22d9b0 */ sw $v0,%lo(var8005d9b0)($at) /* d57c: 27a41490 */ addiu $a0,$sp,0x1490 /* d580: 27a514cc */ addiu $a1,$sp,0x14cc @@ -1569,7 +1569,7 @@ glabel mainInit /* d5d4: 24010001 */ addiu $at,$zero,0x1 /* d5d8: 56010006 */ bnel $s0,$at,.L0000d5f4 /* d5dc: 2a010002 */ slti $at,$s0,0x2 -/* d5e0: 0c004f7f */ jal joy00013dfc +/* d5e0: 0c004f7f */ jal joyReset /* d5e4: 00000000 */ nop /* d5e8: 10000007 */ b .L0000d608 /* d5ec: 26100001 */ addiu $s0,$s0,0x1 @@ -1809,7 +1809,7 @@ glabel mainInit /* d948: 00000000 */ nop /* d94c: 0fc69e2c */ jal func0f1a78b0 /* d950: 00000000 */ nop -/* d954: 0fc59bdd */ jal filesResetAndPrint +/* d954: 0fc59bdd */ jal filesInit /* d958: 00000000 */ nop /* d95c: 0fc5d7d4 */ jal stub0f175f50 /* d960: 00000000 */ nop @@ -1829,7 +1829,7 @@ glabel mainInit /* d994: 8c630b00 */ lw $v1,%lo(g_VmMarker)($v1) /* d998: 3c018000 */ lui $at,0x8000 /* d99c: 00412025 */ or $a0,$v0,$at -/* d9a0: 0c00487a */ jal mempInit +/* d9a0: 0c00487a */ jal mempSetHeap /* d9a4: 00642823 */ subu $a1,$v1,$a0 /* d9a8: 0c00494a */ jal mempResetPool /* d9ac: 24040008 */ addiu $a0,$zero,0x8 @@ -1837,19 +1837,19 @@ glabel mainInit /* d9b4: 24040006 */ addiu $a0,$zero,0x6 /* d9b8: 0c0033be */ jal crashReset /* d9bc: 00000000 */ nop -/* d9c0: 0fc02c84 */ jal mpInitPresetFeatures +/* d9c0: 0fc02c84 */ jal challengesInit /* d9c4: 00000000 */ nop -/* d9c8: 0fc5db77 */ jal func0f176ddc +/* d9c8: 0fc5db77 */ jal utilsInit /* d9cc: 00000000 */ nop /* d9d0: 0c000d34 */ jal func000034d0 /* d9d4: 00000000 */ nop -/* d9d8: 0fc02c64 */ jal loadTextureList +/* d9d8: 0fc02c64 */ jal texInit /* d9dc: 00000000 */ nop /* d9e0: 0fc00000 */ jal langInit /* d9e4: 00000000 */ nop -/* d9e8: 0fc59ebe */ jal lv0f167af8 +/* d9e8: 0fc59ebe */ jal lvInit /* d9ec: 00000000 */ nop -/* d9f0: 0fc41d3b */ jal cheatsDisableAll +/* d9f0: 0fc41d3b */ jal cheatsInit /* d9f4: 00000000 */ nop /* d9f8: 0c003a70 */ jal func0000e9c0 /* d9fc: 00000000 */ nop @@ -1881,19 +1881,19 @@ glabel mainInit /* da64: 00000000 */ nop /* da68: 0fc00210 */ jal stub0f000840 /* da6c: 00000000 */ nop -/* da70: 0fc62084 */ jal mpSetDefaultSetup +/* da70: 0fc62084 */ jal mpInit /* da74: 00000000 */ nop -/* da78: 0fc528ca */ jal phAllocate +/* da78: 0fc528ca */ jal pheadInit /* da7c: 00000000 */ nop -/* da80: 0fc46276 */ jal pakInitAll +/* da80: 0fc46276 */ jal paksInit /* da84: 00000000 */ nop -/* da88: 0fc528ef */ jal func0f14a3bc +/* da88: 0fc528ef */ jal pheadInit2 /* da8c: 00000000 */ nop /* da90: 0c008cf0 */ jal animsInit /* da94: 00000000 */ nop -/* da98: 0fc00040 */ jal func0f000100 +/* da98: 0fc00040 */ jal racesInit /* da9c: 00000000 */ nop -/* daa0: 0fc0004c */ jal func0f000130 +/* daa0: 0fc0004c */ jal bodiesInit /* daa4: 00000000 */ nop /* daa8: 0fc00214 */ jal stub0f000850 /* daac: 00000000 */ nop @@ -1919,26 +1919,26 @@ glabel mainInit /* da84: afbf0034 */ sw $ra,0x34($sp) /* da88: afb20030 */ sw $s2,0x30($sp) /* da8c: afb1002c */ sw $s1,0x2c($sp) -/* da90: 0c003060 */ jal faultCreateThread +/* da90: 0c003060 */ jal faultInit /* da94: afb00028 */ sw $s0,0x28($sp) /* da98: 0c0035b4 */ jal dmaInit /* da9c: 00000000 */ sll $zero,$zero,0x0 -/* daa0: 0c0022f0 */ jal amgrAllocateStack +/* daa0: 0c0022f0 */ jal amgrInit /* daa4: 00000000 */ sll $zero,$zero,0x0 -/* daa8: 0c0059d4 */ jal gvarsInit +/* daa8: 0c0059d4 */ jal varsInit /* daac: 00000000 */ sll $zero,$zero,0x0 -/* dab0: 0c004994 */ jal memp000121e0 +/* dab0: 0c004994 */ jal mempInit /* dab4: 00000000 */ sll $zero,$zero,0x0 /* dab8: 0c004beb */ jal memaInit /* dabc: 00000000 */ sll $zero,$zero,0x0 -/* dac0: 0c004fea */ jal videbugCreateMesgQueue +/* dac0: 0c004fea */ jal videbugInit /* dac4: 00000000 */ sll $zero,$zero,0x0 /* dac8: 0c002714 */ jal viConfigureForLogos /* dacc: 00000000 */ sll $zero,$zero,0x0 /* dad0: 0c00c456 */ jal rmonIsDisabled /* dad4: 00000000 */ sll $zero,$zero,0x0 /* dad8: 3c018006 */ lui $at,0x8006 -/* dadc: 0c0052b6 */ jal joySystemInit +/* dadc: 0c0052b6 */ jal joyInit /* dae0: ac22f2d0 */ sw $v0,-0xd30($at) /* dae4: 27b11498 */ addiu $s1,$sp,0x1498 /* dae8: 27b214d4 */ addiu $s2,$sp,0x14d4 @@ -1966,7 +1966,7 @@ glabel mainInit /* db3c: 24010001 */ addiu $at,$zero,0x1 /* db40: 56010006 */ bnel $s0,$at,.NB0000db5c /* db44: 2a010002 */ slti $at,$s0,0x2 -/* db48: 0c005310 */ jal joy00013dfc +/* db48: 0c005310 */ jal joyReset /* db4c: 00000000 */ sll $zero,$zero,0x0 /* db50: 10000007 */ beqz $zero,.NB0000db70 /* db54: 26100001 */ addiu $s0,$s0,0x1 @@ -2182,7 +2182,7 @@ glabel mainInit /* de58: 00000000 */ sll $zero,$zero,0x0 /* de5c: 0fc68554 */ jal func0f1a78b0 /* de60: 00000000 */ sll $zero,$zero,0x0 -/* de64: 0fc585fd */ jal filesResetAndPrint +/* de64: 0fc585fd */ jal filesInit /* de68: 00000000 */ sll $zero,$zero,0x0 /* de6c: 0fc5c2fc */ jal stub0f175f50 /* de70: 00000000 */ sll $zero,$zero,0x0 @@ -2202,7 +2202,7 @@ glabel mainInit /* dea4: 8c6330f0 */ lw $v1,0x30f0($v1) /* dea8: 3c018000 */ lui $at,0x8000 /* deac: 00412025 */ or $a0,$v0,$at -/* deb0: 0c004996 */ jal mempInit +/* deb0: 0c004996 */ jal mempSetHeap /* deb4: 00642823 */ subu $a1,$v1,$a0 /* deb8: 0c004ab1 */ jal mempResetPool /* debc: 24040008 */ addiu $a0,$zero,0x8 @@ -2210,19 +2210,19 @@ glabel mainInit /* dec4: 24040006 */ addiu $a0,$zero,0x6 /* dec8: 0c003535 */ jal crashReset /* decc: 00000000 */ sll $zero,$zero,0x0 -/* ded0: 0fc02bb0 */ jal mpInitPresetFeatures +/* ded0: 0fc02bb0 */ jal challengesInit /* ded4: 00000000 */ sll $zero,$zero,0x0 -/* ded8: 0fc5c69f */ jal func0f176ddc +/* ded8: 0fc5c69f */ jal utilsInit /* dedc: 00000000 */ sll $zero,$zero,0x0 /* dee0: 0c000dbc */ jal func000034d0 /* dee4: 00000000 */ sll $zero,$zero,0x0 -/* dee8: 0fc02b90 */ jal loadTextureList +/* dee8: 0fc02b90 */ jal texInit /* deec: 00000000 */ sll $zero,$zero,0x0 /* def0: 0fc00000 */ jal langInit /* def4: 00000000 */ sll $zero,$zero,0x0 -/* def8: 0fc5890e */ jal lv0f167af8 +/* def8: 0fc5890e */ jal lvInit /* defc: 00000000 */ sll $zero,$zero,0x0 -/* df00: 0fc40c5b */ jal cheatsDisableAll +/* df00: 0fc40c5b */ jal cheatsInit /* df04: 00000000 */ sll $zero,$zero,0x0 /* df08: 0c003c68 */ jal func0000e9c0 /* df0c: 00000000 */ sll $zero,$zero,0x0 @@ -2254,19 +2254,19 @@ glabel mainInit /* df74: 00000000 */ sll $zero,$zero,0x0 /* df78: 0fc00210 */ jal stub0f000840 /* df7c: 00000000 */ sll $zero,$zero,0x0 -/* df80: 0fc60985 */ jal mpSetDefaultSetup +/* df80: 0fc60985 */ jal mpInit /* df84: 00000000 */ sll $zero,$zero,0x0 -/* df88: 0fc512be */ jal phAllocate +/* df88: 0fc512be */ jal pheadInit /* df8c: 00000000 */ sll $zero,$zero,0x0 -/* df90: 0fc44b4c */ jal pakInitAll +/* df90: 0fc44b4c */ jal paksInit /* df94: 00000000 */ sll $zero,$zero,0x0 -/* df98: 0fc512e3 */ jal func0f14a3bc +/* df98: 0fc512e3 */ jal pheadInit2 /* df9c: 00000000 */ sll $zero,$zero,0x0 /* dfa0: 0c0091e8 */ jal animsInit /* dfa4: 00000000 */ sll $zero,$zero,0x0 -/* dfa8: 0fc00040 */ jal func0f000100 +/* dfa8: 0fc00040 */ jal racesInit /* dfac: 00000000 */ sll $zero,$zero,0x0 -/* dfb0: 0fc0004c */ jal func0f000130 +/* dfb0: 0fc0004c */ jal bodiesInit /* dfb4: 00000000 */ sll $zero,$zero,0x0 /* dfb8: 0fc00214 */ jal stub0f000850 /* dfbc: 00000000 */ sll $zero,$zero,0x0 @@ -2316,16 +2316,16 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // u32 iVar5; // u32 tmp; // -// faultCreateThread(); +// faultInit(); // dmaInit(); -// amgrAllocateStack(); -// gvarsInit(); -// memp000121e0(); +// amgrInit(); +// varsInit(); +// mempInit(); // memaInit(); -// videbugCreateMesgQueue(); +// videbugInit(); // viConfigureForLogos(); // var8005d9b0 = rmonIsDisabled(); -// joySystemInit(); +// joyInit(); // osCreateMesgQueue(&queue, &msg, 1); // // for (i = 0; i < 4; i++) { @@ -2333,7 +2333,7 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // osRecvMesg(&queue, &msg, OS_MESG_BLOCK); // // if (i == 1) { -// joy00013dfc(); +// joyReset(); // } else if (i >= 2) { // joyDebugJoy(); // } @@ -2448,7 +2448,7 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // // vmInit(); // func0f1a78b0(); -// filesResetAndPrint(); +// filesInit(); // stub0f175f50(); // func0f175f90(); // @@ -2458,18 +2458,18 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // // uVar2 = osVirtualToPhysical(&_bssSegmentEnd) | 0x80000000; // tmp = g_VmMarker; -// mempInit(uVar2, tmp - uVar2); +// mempSetHeap(uVar2, tmp - uVar2); // // mempResetPool(MEMPOOL_8); // mempResetPool(MEMPOOL_PERMANENT); // crashReset(); -// mpInitPresetFeatures(); -// func0f176ddc(); +// challengesInit(); +// utilsInit(); // func000034d0(); -// loadTextureList(); +// texInit(); // langInit(); -// lv0f167af8(); -// cheatsDisableAll(); +// lvInit(); +// cheatsInit(); // func0000e9c0(); // func0f1531a0(); // dhudInit(); @@ -2485,13 +2485,13 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // stub0f00b180(); // stub0f000910(); // stub0f000840(); -// mpSetDefaultSetup(); -// phAllocate(); -// pakInitAll(); -// func0f14a3bc(); +// mpInit(); +// pheadInit(); +// paksInit(); +// pheadInit2(); // animsInit(); -// func0f000100(); -// func0f000130(); +// racesInit(); +// bodiesInit(); // stub0f000850(); // stub0f000860(); // titleInit(); @@ -2680,14 +2680,14 @@ void mainLoop(void) mempResetPool(MEMPOOL_7); mempResetPool(MEMPOOL_STAGE); - filesReset(4); + filesStop(4); if (argFindByPrefix(1, "-ma")) { g_MainMemaHeapSize = strtol(argFindByPrefix(1, "-ma"), NULL, 0) * 1024; } - memaHeapInit(mempAlloc(g_MainMemaHeapSize, MEMPOOL_STAGE), g_MainMemaHeapSize); - stageLoadCommonLang(g_StageNum); + memaReset(mempAlloc(g_MainMemaHeapSize, MEMPOOL_STAGE), g_MainMemaHeapSize); + langReset(g_StageNum); playermgrReset(); if (g_StageNum >= STAGE_TITLE) { @@ -2726,9 +2726,9 @@ void mainLoop(void) if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) { g_MpSetup.chrslots = 0x03; - mpInit(); + mpReset(); } else if (g_Vars.perfectbuddynum) { - mpInit(); + mpReset(); } else if (g_Vars.mplayerisrunning == false && (numplayers >= 2 || g_Vars.lvmpbotlevel || argFindByPrefix(1, "-play"))) { g_MpSetup.chrslots = 1; @@ -2746,17 +2746,17 @@ void mainLoop(void) } g_MpSetup.stagenum = g_StageNum; - mpInit(); + mpReset(); } - gfxInitMemory(); - joy00013dfc(); - dhudTryReset(); + gfxReset(); + joyReset(); + dhudReset(); func0f17608c(g_StageNum); - lvInit(g_StageNum); - viAllocateFbs(g_StageNum); + lvReset(g_StageNum); + viReset(g_StageNum); frametimeCalculate(); - profile00009a90(); + profileReset(); while (osRecvMesg(&g_SchedMesgQueue, &msg, OS_MESG_NOBLOCK) != -1) { // empty @@ -2790,10 +2790,10 @@ void mainLoop(void) } } - lvReset(); + lvStop(); mempDisablePool(MEMPOOL_STAGE); mempDisablePool(MEMPOOL_7); - filesReset(4); + filesStop(4); viBlack(true); pak0f116994(); @@ -3111,7 +3111,7 @@ glabel mainLoop /* e48c: 24040007 */ addiu $a0,$zero,0x7 /* e490: 0c004ab1 */ jal mempResetPool /* e494: 24040004 */ addiu $a0,$zero,0x4 -/* e498: 0fc58709 */ jal filesReset +/* e498: 0fc58709 */ jal filesStop /* e49c: 24040004 */ addiu $a0,$zero,0x4 /* e4a0: 3c057005 */ lui $a1,0x7005 /* e4a4: 24a55134 */ addiu $a1,$a1,0x5134 @@ -3136,10 +3136,10 @@ glabel mainLoop /* e4ec: 24050004 */ addiu $a1,$zero,0x4 /* e4f0: 3c058006 */ lui $a1,0x8006 /* e4f4: 8ca5f2d8 */ lw $a1,-0xd28($a1) -/* e4f8: 0c004bed */ jal memaHeapInit +/* e4f8: 0c004bed */ jal memaReset /* e4fc: 00402025 */ or $a0,$v0,$zero /* e500: 3c048006 */ lui $a0,0x8006 -/* e504: 0fc02bf4 */ jal stageLoadCommonLang +/* e504: 0fc02bf4 */ jal langReset /* e508: 8c84f2d4 */ lw $a0,-0xd2c($a0) /* e50c: 0fc48964 */ jal playermgrReset /* e510: 00000000 */ sll $zero,$zero,0x0 @@ -3223,7 +3223,7 @@ glabel mainLoop /* e628: 05620006 */ bltzl $t3,.NB0000e644 /* e62c: 8e4d0470 */ lw $t5,0x470($s2) .NB0000e630: -/* e630: 0fc60755 */ jal mpInit +/* e630: 0fc60755 */ jal mpReset /* e634: a42c144e */ sh $t4,0x144e($at) /* e638: 10000033 */ beqz $zero,.NB0000e708 /* e63c: 00000000 */ sll $zero,$zero,0x0 @@ -3231,7 +3231,7 @@ glabel mainLoop .NB0000e644: /* e644: 51a00006 */ beqzl $t5,.NB0000e660 /* e648: 8e590314 */ lw $t9,0x314($s2) -/* e64c: 0fc60755 */ jal mpInit +/* e64c: 0fc60755 */ jal mpReset /* e650: 00000000 */ sll $zero,$zero,0x0 /* e654: 1000002c */ beqz $zero,.NB0000e708 /* e658: 00000000 */ sll $zero,$zero,0x0 @@ -3281,27 +3281,27 @@ glabel mainLoop .NB0000e6f8: /* e6f8: 8dadf2d4 */ lw $t5,-0xd2c($t5) /* e6fc: 3c01800b */ lui $at,0x800b -/* e700: 0fc60755 */ jal mpInit +/* e700: 0fc60755 */ jal mpReset /* e704: a02d1449 */ sb $t5,0x1449($at) .NB0000e708: -/* e708: 0fc58724 */ jal gfxInitMemory +/* e708: 0fc58724 */ jal gfxReset /* e70c: 00000000 */ sll $zero,$zero,0x0 -/* e710: 0c005310 */ jal joy00013dfc +/* e710: 0c005310 */ jal joyReset /* e714: 00000000 */ sll $zero,$zero,0x0 -/* e718: 0c005049 */ jal dhudTryReset +/* e718: 0c005049 */ jal dhudReset /* e71c: 00000000 */ sll $zero,$zero,0x0 /* e720: 3c048006 */ lui $a0,0x8006 /* e724: 0fc5c34b */ jal func0f17608c /* e728: 8c84f2d4 */ lw $a0,-0xd2c($a0) /* e72c: 3c048006 */ lui $a0,0x8006 -/* e730: 0fc589ee */ jal lvInit +/* e730: 0fc589ee */ jal lvReset /* e734: 8c84f2d4 */ lw $a0,-0xd2c($a0) /* e738: 3c048006 */ lui $a0,0x8006 -/* e73c: 0c002778 */ jal viAllocateFbs +/* e73c: 0c002778 */ jal viReset /* e740: 8c84f2d4 */ lw $a0,-0xd2c($a0) /* e744: 0fc59f11 */ jal frametimeCalculate /* e748: 00000000 */ sll $zero,$zero,0x0 -/* e74c: 0c00270c */ jal profile00009a90 +/* e74c: 0c00270c */ jal profileReset /* e750: 00000000 */ sll $zero,$zero,0x0 /* e754: 02602025 */ or $a0,$s3,$zero /* e758: 02802825 */ or $a1,$s4,$zero @@ -3385,13 +3385,13 @@ glabel mainLoop /* e86c: 55c0ffca */ bnezl $t6,.NB0000e798 /* e870: 02602025 */ or $a0,$s3,$zero .NB0000e874: -/* e874: 0fc59e56 */ jal lvReset +/* e874: 0fc59e56 */ jal lvStop /* e878: 00000000 */ sll $zero,$zero,0x0 /* e87c: 0c004acc */ jal mempDisablePool /* e880: 24040004 */ addiu $a0,$zero,0x4 /* e884: 0c004acc */ jal mempDisablePool /* e888: 24040007 */ addiu $a0,$zero,0x7 -/* e88c: 0fc58709 */ jal filesReset +/* e88c: 0fc58709 */ jal filesStop /* e890: 24040004 */ addiu $a0,$zero,0x4 /* e894: 0c00281a */ jal viBlack /* e898: 02e02025 */ or $a0,$s7,$zero @@ -3462,7 +3462,7 @@ glabel mainTick /* e198: 00000000 */ nop /* e19c: 0c002662 */ jal profile00009a98 /* e1a0: 00000000 */ nop -/* e1a4: 0c002660 */ jal profile00009a90 +/* e1a4: 0c002660 */ jal profileReset /* e1a8: 00000000 */ nop /* e1ac: 0c002664 */ jal profileSetMarker /* e1b0: 3c040002 */ lui $a0,0x2 @@ -3743,7 +3743,7 @@ glabel mainTick .PB0000e5bc: /* e5bc: 0c004fd8 */ jal dhudRender /* e5c0: 8fa40094 */ lw $a0,0x94($sp) -/* e5c4: 0c004f11 */ jal dhudReset +/* e5c4: 0c004f11 */ jal dhudClear /* e5c8: afa20094 */ sw $v0,0x94($sp) /* e5cc: 0fc4806b */ jal debug0f11ed70 /* e5d0: 00000000 */ nop @@ -3849,7 +3849,7 @@ glabel mainTick /* e970: 00000000 */ sll $zero,$zero,0x0 /* e974: 0c00270e */ jal profile00009a98 /* e978: 00000000 */ sll $zero,$zero,0x0 -/* e97c: 0c00270c */ jal profile00009a90 +/* e97c: 0c00270c */ jal profileReset /* e980: 00000000 */ sll $zero,$zero,0x0 /* e984: 0c002710 */ jal profileSetMarker /* e988: 3c040002 */ lui $a0,0x2 @@ -4130,7 +4130,7 @@ glabel mainTick .NB0000ed94: /* ed94: 0c0051a1 */ jal dhudRender /* ed98: 8fa40094 */ lw $a0,0x94($sp) -/* ed9c: 0c0050b5 */ jal dhudReset +/* ed9c: 0c0050b5 */ jal dhudClear /* eda0: afa20094 */ sw $v0,0x94($sp) /* eda4: 0fc4663a */ jal debug0f11ed70 /* eda8: 00000000 */ sll $zero,$zero,0x0 @@ -4217,7 +4217,7 @@ u32 var8005f690nb[] = { // if (g_MainChangeToStageNum < 0 && g_MainNumGfxTasks < 2) { // frametimeCalculate(); // profile00009a98(); -// profile00009a90(); +// profileReset(); // profileSetMarker(PROFILE_MAINTICK_START); // func000034d8(); // joyDebugJoy(); @@ -4280,7 +4280,7 @@ u32 var8005f690nb[] = { // } // // gdl = dhudRender(gdl); -// dhudReset(); +// dhudClear(); // // if (debug0f11ed70() >= 2) { // gdl = profileRender(gdl); @@ -4318,7 +4318,7 @@ void mainTick(void) if (g_MainChangeToStageNum < 0 && g_MainNumGfxTasks < 2) { frametimeCalculate(); profile00009a98(); - profile00009a90(); + profileReset(); profileSetMarker(PROFILE_MAINTICK_START); func000034d8(); joyDebugJoy(); diff --git a/src/lib/mema.c b/src/lib/mema.c index 2aa21471b..866ece78e 100644 --- a/src/lib/mema.c +++ b/src/lib/mema.c @@ -216,7 +216,7 @@ void memaInit(void) #if VERSION == VERSION_PAL_BETA GLOBAL_ASM( -glabel memaHeapInit +glabel memaReset /* 12ac4: 3c03800a */ lui $v1,0x800a /* 12ac8: 2463c1a8 */ addiu $v1,$v1,-15960 /* 12acc: 2406ffff */ li $a2,-1 @@ -253,7 +253,7 @@ glabel memaHeapInit /* 12b44: ac39f910 */ sw $t9,-0x6f0($at) ); #else -void memaHeapInit(void *heapaddr, u32 heapsize) +void memaReset(void *heapaddr, u32 heapsize) { struct memaspace *space; diff --git a/src/lib/memp.c b/src/lib/memp.c index 69fc22adb..00eee9a2a 100644 --- a/src/lib/memp.c +++ b/src/lib/memp.c @@ -52,7 +52,7 @@ struct memorypool { struct memorypool g_MempOnboardPools[9]; struct memorypool g_MempExpansionPools[9]; -void memp000121e0(void) +void mempInit(void) { // empty } @@ -63,7 +63,7 @@ void memp000121e0(void) * The arguments passed are the onboard start and length that can be used. * If the expansion pak is present, the entire pak is used for the second bank. */ -void mempInit(u8 *heapstart, u32 heaplen) +void mempSetHeap(u8 *heapstart, u32 heaplen) { s32 i; u8 *extraend; diff --git a/src/lib/profile.c b/src/lib/profile.c index 39e45a22c..27dfd3fc0 100644 --- a/src/lib/profile.c +++ b/src/lib/profile.c @@ -14,7 +14,7 @@ void profileTick(void) // empty } -void profile00009a90(void) +void profileReset(void) { // empty } diff --git a/src/lib/reset.c b/src/lib/reset.c index f5f5ec2ed..c105f0730 100644 --- a/src/lib/reset.c +++ b/src/lib/reset.c @@ -68,7 +68,7 @@ void resetproc(void *data) } // Stop controller rumbles if active - joyReset(); + joyDestroy(); // Wait for the system to reset while (1); diff --git a/src/lib/gvars.c b/src/lib/varsinit.c similarity index 99% rename from src/lib/gvars.c rename to src/lib/varsinit.c index 51e17e794..e712bacd8 100644 --- a/src/lib/gvars.c +++ b/src/lib/varsinit.c @@ -10,7 +10,7 @@ u32 var8009e6b0[4]; struct g_vars g_Vars; -void gvarsInit(void) +void varsInit(void) { g_Vars.diffframe60f = 1; g_Vars.lvframe60 = 0; diff --git a/src/lib/vi.c b/src/lib/vi.c index 7386bc2fe..32467ccaf 100644 --- a/src/lib/vi.c +++ b/src/lib/vi.c @@ -180,7 +180,7 @@ const s16 g_ViModeHeights[] = {220, 220, 440}; * * The same is probably true for wide and cinema modes. */ -void viAllocateFbs(s32 stagenum) +void viReset(s32 stagenum) { s32 i; s32 fbsize; diff --git a/src/lib/videbug.c b/src/lib/videbug.c index 329917740..4e9e42634 100644 --- a/src/lib/videbug.c +++ b/src/lib/videbug.c @@ -8,12 +8,12 @@ OSMesg g_ViDebugMesgs[8]; OSMesgQueue g_ViDebugMesgQueue; -void videbugInit(void) +void videbugCreate(void) { // empty } -void videbugCreateMesgQueue(void) +void videbugInit(void) { osCreateMesgQueue(&g_ViDebugMesgQueue, g_ViDebugMesgs, ARRAYCOUNT(g_ViDebugMesgs)); } diff --git a/tools/mkrom/piracy.c b/tools/mkrom/piracy.c index 55380f3e3..c7ab85b4d 100644 --- a/tools/mkrom/piracy.c +++ b/tools/mkrom/piracy.c @@ -160,10 +160,10 @@ void piracy_patch(void) patch(algo03, "botPickupProp", "doorFinishClose"); patch(algo04, "chrUncloak", "botPickupProp"); patch(algo05, "chrsCheckForNoise", "__scHandleRetrace"); - patch(algo06, "lvInit", "lvGetSlowMotionType"); - patch(algo07, "propAllocateEyespy", "lvInit"); - patch(algo08, "chrConsiderGrenadeThrow", "bgInit"); - patch(algo09, "bgun0f09e144", "tagsAllocatePtrs"); + patch(algo06, "lvReset", "lvGetSlowMotionType"); + patch(algo07, "propAllocateEyespy", "lvReset"); + patch(algo08, "chrConsiderGrenadeThrow", "bgReset"); + patch(algo09, "bgun0f09e144", "tagsReset"); patch(algo10, "explosionAlertChrs", "glassDestroy"); patch(algo11, "func0f0069dc", "mtxGetObfuscatedRomBase"); patch(algo12, "func0f15c920", "func0f0069dc");