diff --git a/ld/gamefiles.inc b/ld/gamefiles.inc index f65059117..b95175f59 100644 --- a/ld/gamefiles.inc +++ b/ld/gamefiles.inc @@ -96,11 +96,11 @@ src/game/game_0b63b0.o (section); \ src/game/game_0c33f0.o (section); \ src/game/game_0c3620.o (section); \ - src/game/game_0c37d0.o (section); \ + src/game/bondwalk.o (section); \ src/game/game_0c79f0.o (section); \ src/game/bondgrab.o (section); \ src/game/game_0cf150.o (section); \ - src/game/game_0d1fe0.o (section); \ + src/game/bondbike.o (section); \ src/game/game_0d4690.o (section); \ src/game/game_0d5a90.o (section); \ src/game/game_0d7070.o (section); \ diff --git a/src/game/game_0d1fe0.c b/src/game/bondbike.c similarity index 99% rename from src/game/game_0d1fe0.c rename to src/game/bondbike.c index 75bdb4794..5627e4248 100644 --- a/src/game/game_0d1fe0.c +++ b/src/game/bondbike.c @@ -15,7 +15,7 @@ #include "game/game_0b3350.h" #include "game/game_0b63b0.h" #include "game/game_0c79f0.h" -#include "game/game_0d1fe0.h" +#include "game/bondbike.h" #include "game/game_113220.h" #include "game/game_167ae0.h" #include "game/pdoptions.h" @@ -61,7 +61,7 @@ const u32 var7f1adb98[] = {0x3f333333}; const u32 var7f1adb9c[] = {0x3c8ef461}; GLOBAL_ASM( -glabel currentPlayerSetMoveModeHoverbike +glabel currentPlayerBikeInit /* f0d1fe0: 27bdff70 */ addiu $sp,$sp,-144 /* f0d1fe4: afb00034 */ sw $s0,0x34($sp) /* f0d1fe8: 3c10800a */ lui $s0,%hi(g_Vars) diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index a69106e12..3b42d0f4a 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -91,7 +91,7 @@ const char var7f1ada74[] = "l"; const char var7f1ada78[] = "%s%s"; GLOBAL_ASM( -glabel currentPlayerSetMoveModeGrabbedProp +glabel currentPlayerGrabInit /* f0cc6e0: 27bdff68 */ addiu $sp,$sp,-152 /* f0cc6e4: afb0001c */ sw $s0,0x1c($sp) /* f0cc6e8: 3c10800a */ lui $s0,%hi(g_Vars) diff --git a/src/game/game_0c37d0.c b/src/game/bondwalk.c similarity index 99% rename from src/game/game_0c37d0.c rename to src/game/bondwalk.c index 5443e5358..4c81f1b20 100644 --- a/src/game/game_0c37d0.c +++ b/src/game/bondwalk.c @@ -15,7 +15,7 @@ #include "game/game_092610.h" #include "game/game_097ba0.h" #include "game/game_0b63b0.h" -#include "game/game_0c37d0.h" +#include "game/bondwalk.h" #include "game/game_0c79f0.h" #include "game/game_111600.h" #include "game/game_113220.h" @@ -89,7 +89,7 @@ const u32 var7f1ad858[] = {0x00000000}; const u32 var7f1ad85c[] = {0x00000000}; GLOBAL_ASM( -glabel currentPlayerSetMoveModeNormal +glabel currentPlayerWalkInit /* f0c37d0: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c37d4: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) /* f0c37d8: 8d020284 */ lw $v0,0x284($t0) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index df1bc0696..71f8dcd90 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -10293,7 +10293,7 @@ bool aiClearInventory(void) */ bool aiReleaseObject(void) { - setMoveModeForAllPlayers(MOVEMODE_NORMAL); + setMoveModeForAllPlayers(MOVEMODE_WALK); g_Vars.aioffset += 3; return false; @@ -10313,7 +10313,7 @@ bool aiChrGrabObject(void) u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK && func0f0cc680() == 2 && g_Vars.currentplayer->unk00b4 == 0) { currentPlayerGrabProp(obj->prop); diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index c5eca228f..a3b4c28c8 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -18,7 +18,7 @@ #include "game/game_0b0420.h" #include "game/game_0b3350.h" #include "game/game_0b63b0.h" -#include "game/game_0c37d0.h" +#include "game/bondwalk.h" #include "game/game_0c79f0.h" #include "game/game_127910.h" #include "game/game_129900.h" diff --git a/src/game/game_066310.c b/src/game/game_066310.c index dd5f9b490..06db33c21 100644 --- a/src/game/game_066310.c +++ b/src/game/game_066310.c @@ -29,7 +29,7 @@ #include "game/game_0b3350.h" #include "game/game_0b63b0.h" #include "game/game_0c33f0.h" -#include "game/game_0c37d0.h" +#include "game/bondwalk.h" #include "game/game_0c79f0.h" #include "game/game_0dcdb0.h" #include "game/game_0f09f0.h" diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 6d5f81227..6d5513cae 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -3626,7 +3626,7 @@ void func0f0b9674(void) { setTickMode(TICKMODE_4); var80070744 = 0; - currentPlayerSetMoveMode(MOVEMODE_NORMAL); + currentPlayerSetMoveMode(MOVEMODE_WALK); var8009ddd8 = 0; var8009dddc = -90; var8009dde0 = 0; @@ -3860,7 +3860,7 @@ void func0f0b9a20(void) { setTickMode(TICKMODE_1); var80070744 = 0; - currentPlayerSetMoveMode(MOVEMODE_NORMAL); + currentPlayerSetMoveMode(MOVEMODE_WALK); if (getCurrentStageId() == STAGE_TEST_LEN) { currentPlayerSetFadeColour(0, 0, 0, 1); @@ -3885,7 +3885,7 @@ void func0f0b9afc(void) } else { setTickMode(TICKMODE_1); var80070744 = 0; - setMoveModeForAllPlayers(MOVEMODE_NORMAL); + setMoveModeForAllPlayers(MOVEMODE_WALK); } } @@ -12747,11 +12747,11 @@ void func0f0c1e54(struct prop *prop, bool enable) chrSetOrUnsetHiddenFlag00000100(prop->chr, enable); } - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { if (g_Vars.currentplayer->unk1af0) { propObjSetOrUnsetHiddenFlag00400000(g_Vars.currentplayer->unk1af0, enable); } - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { propObjSetOrUnsetHiddenFlag00400000(g_Vars.currentplayer->hoverbike, enable); } @@ -12888,7 +12888,7 @@ void propPlayerGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin) *ymin = g_Vars.currentplayer->unk0074 + 30; *ymax = g_Vars.currentplayer->unk0074 + g_Vars.players[playernum]->unk19c0; - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { f32 tmp; *ymax += g_Vars.players[playernum]->unk19b8; tmp = g_Vars.currentplayer->unk0074 + 80; diff --git a/src/game/game_0c79f0.c b/src/game/game_0c79f0.c index 416cb6730..2c021ad5d 100644 --- a/src/game/game_0c79f0.c +++ b/src/game/game_0c79f0.c @@ -20,9 +20,9 @@ #include "game/game_0b3350.h" #include "game/game_0b63b0.h" #include "game/game_0c3620.h" -#include "game/game_0c37d0.h" +#include "game/bondwalk.h" #include "game/game_0c79f0.h" -#include "game/game_0d1fe0.h" +#include "game/bondbike.h" #include "game/game_0fd660.h" #include "game/game_113220.h" #include "game/game_127910.h" @@ -207,7 +207,7 @@ void currentPlayerUpdateAutoAimXProp(struct prop *prop, f32 autoaimx) struct prop *currentPlayerGetHoverbike(void) { - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { return g_Vars.currentplayer->hoverbike; } @@ -216,7 +216,7 @@ struct prop *currentPlayerGetHoverbike(void) struct prop *currentPlayerGetGrabbedProp(void) { - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { return g_Vars.currentplayer->grabbedprop; } @@ -229,26 +229,26 @@ void currentPlayerGrabProp(struct prop *prop) if ((obj->hidden & OBJHFLAG_04000000) == 0 && (obj->hidden & OBJHFLAG_08000000) == 0) { g_Vars.currentplayer->grabbedprop = prop; - currentPlayerSetMoveModeGrabbedProp(); + currentPlayerGrabInit(); } } void currentPlayerSetMoveMode(u32 movemode) { - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { func0f0ccac4(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { func0f0d2184(); } - if (movemode == MOVEMODE_HOVERBIKE) { - currentPlayerSetMoveModeHoverbike(); - } else if (movemode == MOVEMODE_GRABBEDPROP) { - currentPlayerSetMoveModeGrabbedProp(); + if (movemode == MOVEMODE_BIKE) { + currentPlayerBikeInit(); + } else if (movemode == MOVEMODE_GRAB) { + currentPlayerGrabInit(); } else if (movemode == MOVEMODE_CUTSCENE) { currentPlayerSetMoveModeCutscene(); - } else if (movemode == MOVEMODE_NORMAL) { - currentPlayerSetMoveModeNormal(); + } else if (movemode == MOVEMODE_WALK) { + currentPlayerWalkInit(); } } @@ -267,33 +267,33 @@ void setMoveModeForAllPlayers(u32 movemode) void func0f0c7f2c(void) { - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { func0f0d2558(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { func0f0ce450(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { func0f0c65a8(); } } void func0f0c7f98(void) { - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { func0f0d26ac(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { func0f0ce608(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { func0f0c65c8(); } } void func0f0c8004(void) { - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { // empty - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { func0f0ce8ac(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { func0f0c6948(); } } @@ -4165,17 +4165,17 @@ void currentPlayerUpdateFootsteps(bool arg0, bool arg1, bool arg2, bool arg3) func0f0c8b90(arg0, arg1, arg2, arg3); - if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) { + if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { func0f0d3d50(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { func0f0ceec4(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_CUTSCENE) { func0f0c37c0(); - } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL) { + } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { func0f0c785c(); } - if ((g_Vars.currentplayer->bondmovemode == MOVEMODE_NORMAL || g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) + if ((g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK || g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) && (g_Vars.currentplayer->unk0170 || g_Vars.currentplayer->unk0168) && (!g_Vars.normmplayerisrunning || PLAYERCOUNT() == 1)) { chr = g_Vars.currentplayer->prop->chr; diff --git a/src/include/constants.h b/src/include/constants.h index ee6d2a4b6..97d7317d4 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -1129,10 +1129,10 @@ #define MODEL_CETANDOORSIDE 0x01b7 #define MODEL_BUDDYBRIDGE 0x01b8 -#define MOVEMODE_NORMAL 0 -#define MOVEMODE_HOVERBIKE 3 -#define MOVEMODE_GRABBEDPROP 4 -#define MOVEMODE_CUTSCENE 5 +#define MOVEMODE_WALK 0 +#define MOVEMODE_BIKE 3 +#define MOVEMODE_GRAB 4 +#define MOVEMODE_CUTSCENE 5 #define MPLOCKTYPE_NONE 0 #define MPLOCKTYPE_LASTWINNER 1 diff --git a/src/include/game/game_0d1fe0.h b/src/include/game/bondbike.h similarity index 80% rename from src/include/game/game_0d1fe0.h rename to src/include/game/bondbike.h index 3c03c7af2..87fcdbc2a 100644 --- a/src/include/game/game_0d1fe0.h +++ b/src/include/game/bondbike.h @@ -1,9 +1,9 @@ -#ifndef IN_GAME_GAME_0D1FE0_H -#define IN_GAME_GAME_0D1FE0_H +#ifndef IN_GAME_BONDBIKE_H +#define IN_GAME_BONDBIKE_H #include #include "types.h" -u32 currentPlayerSetMoveModeHoverbike(void); +u32 currentPlayerBikeInit(void); u32 func0f0d2184(void); u32 func0f0d2294(void); u32 func0f0d22f8(void); diff --git a/src/include/game/bondgrab.h b/src/include/game/bondgrab.h index 9441493e9..f721fca70 100644 --- a/src/include/game/bondgrab.h +++ b/src/include/game/bondgrab.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 currentPlayerSetMoveModeGrabbedProp(void); +u32 currentPlayerGrabInit(void); u32 func0f0ccac4(void); u32 func0f0ccbf0(void); u32 func0f0cd05c(void); diff --git a/src/include/game/game_0c37d0.h b/src/include/game/bondwalk.h similarity index 86% rename from src/include/game/game_0c37d0.h rename to src/include/game/bondwalk.h index 99970fdd2..0fdc8c3f1 100644 --- a/src/include/game/game_0c37d0.h +++ b/src/include/game/bondwalk.h @@ -1,9 +1,9 @@ -#ifndef IN_GAME_GAME_0C37D0_H -#define IN_GAME_GAME_0C37D0_H +#ifndef IN_GAME_BONDWALK_H +#define IN_GAME_BONDWALK_H #include #include "types.h" -u32 currentPlayerSetMoveModeNormal(void); +u32 currentPlayerWalkInit(void); u32 func0f0c3ad0(void); u32 func0f0c3af4(void); u32 func0f0c3b38(void);