From 299cf1932e845c7b9e5ada853e25a3bae99b25b8 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 14 Jan 2021 18:03:51 +1000 Subject: [PATCH] Give all bond*.c functions appropriate prefixes --- src/game/bondbike.c | 138 ++++++++++---------- src/game/bondcutscene.c | 4 +- src/game/bondeyespy.c | 64 +++++----- src/game/bondgrab.c | 124 +++++++++--------- src/game/bondhead.c | 38 +++--- src/game/bondmove.c | 219 ++++++++++++++++---------------- src/game/bondview.c | 16 +-- src/game/bondwalk.c | 200 ++++++++++++++--------------- src/game/chr/chr.c | 2 +- src/game/chr/chraicommands.c | 6 +- src/game/core.c | 8 +- src/game/game_011110.c | 4 +- src/game/game_0125a0.c | 4 +- src/game/game_0601b0.c | 30 ++--- src/game/game_097ba0.c | 4 +- src/game/game_0b63b0.c | 92 +++++++------- src/game/propobj.c | 34 ++--- src/include/constants.h | 6 +- src/include/game/bondbike.h | 34 ++--- src/include/game/bondcutscene.h | 4 +- src/include/game/bondeyespy.h | 16 +-- src/include/game/bondgrab.h | 44 +++---- src/include/game/bondhead.h | 20 +-- src/include/game/bondmove.h | 78 ++++++------ src/include/game/bondview.h | 6 +- src/include/game/bondwalk.h | 48 +++---- 26 files changed, 622 insertions(+), 621 deletions(-) diff --git a/src/game/bondbike.c b/src/game/bondbike.c index 8bd28bd8f..e071331a8 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -31,7 +31,7 @@ #include "lib/lib_4a360.h" #include "types.h" -void currentPlayerBikeInit(void) +void bbikeInit(void) { struct hoverbikeobj *hoverbike = (struct hoverbikeobj *)g_Vars.currentplayer->hoverbike->obj; Mtxf matrix; @@ -42,7 +42,7 @@ void currentPlayerBikeInit(void) g_Vars.currentplayer->gunextraaimx = 0; g_Vars.currentplayer->gunextraaimy = 0; - func0f0d2294(); + bbikeUpdateVehicleOffset(); g_Vars.currentplayer->bondentert = 0; g_Vars.currentplayer->bondentert2 = 1; @@ -75,7 +75,7 @@ void currentPlayerBikeInit(void) hoverbike->base.hidden |= OBJHFLAG_04000000; } -void func0f0d2184(void) +void bbikeExit(void) { struct defaultobj *obj = g_Vars.currentplayer->hoverbike->obj; struct hoverbikeobj *bikeobj = (struct hoverbikeobj *)g_Vars.currentplayer->hoverbike->obj; @@ -98,7 +98,7 @@ void func0f0d2184(void) obj->flags |= OBJFLAG_40000000; } -void func0f0d2294(void) +void bbikeUpdateVehicleOffset(void) { struct defaultobj *hoverbike = g_Vars.currentplayer->hoverbike->obj; @@ -107,7 +107,7 @@ void func0f0d2294(void) g_Vars.currentplayer->bondvehicleoffset.z = -50.0f / hoverbike->model->unk14; } -void currentPlayerTryBikeDismountAngle(f32 relativeangle, f32 distance) +void bbikeTryDismountAngle(f32 relativeangle, f32 distance) { u32 stack; struct hoverbikeobj *bike; @@ -141,7 +141,7 @@ void currentPlayerTryBikeDismountAngle(f32 relativeangle, f32 distance) propSetCollisionsEnabled(g_Vars.currentplayer->prop, false); func0f065e74(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &pos, rooms); - func0f0cb79c(g_Vars.currentplayer, &pos, rooms); + bmove0f0cb79c(g_Vars.currentplayer, &pos, rooms); result = cdTestAToB2(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &pos, rooms, CDTYPE_ALL, true, @@ -172,7 +172,7 @@ void currentPlayerTryBikeDismountAngle(f32 relativeangle, f32 distance) } } -void currentPlayerDismountBike(void) +void bbikeHandleActivate(void) { if (g_Vars.currentplayer->bondvehiclemode == VEHICLEMODE_RUNNING && g_Vars.lvframe60 - g_Vars.currentplayer->activatetimelast < 25) { @@ -185,17 +185,17 @@ void currentPlayerDismountBike(void) g_Vars.currentplayer->walkinitmove = false; - currentPlayerTryBikeDismountAngle(1.5705462694168f, fVar5); - currentPlayerTryBikeDismountAngle(4.7116389274597f, fVar5); - currentPlayerTryBikeDismountAngle(0.7852731347084f, uVar4); - currentPlayerTryBikeDismountAngle(5.4969120025635f, uVar4); - currentPlayerTryBikeDismountAngle(2.3558194637299f, uVar4); - currentPlayerTryBikeDismountAngle(3.9263656139374f, uVar4); - currentPlayerTryBikeDismountAngle(0, fVar3); - currentPlayerTryBikeDismountAngle(3.1410925388336f, fVar3); + bbikeTryDismountAngle(1.5705462694168f, fVar5); + bbikeTryDismountAngle(4.7116389274597f, fVar5); + bbikeTryDismountAngle(0.7852731347084f, uVar4); + bbikeTryDismountAngle(5.4969120025635f, uVar4); + bbikeTryDismountAngle(2.3558194637299f, uVar4); + bbikeTryDismountAngle(3.9263656139374f, uVar4); + bbikeTryDismountAngle(0, fVar3); + bbikeTryDismountAngle(3.1410925388336f, fVar3); if (g_Vars.currentplayer->walkinitmove) { - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); } g_Vars.currentplayer->bondactivateorreload = 0; @@ -203,7 +203,7 @@ void currentPlayerDismountBike(void) } GLOBAL_ASM( -glabel currentPlayerUpdateSpeedBike +glabel bbikeApplyMoveData .late_rodata glabel var7f1adb54 .word 0x3dcccccd @@ -545,7 +545,7 @@ glabel var7f1adb74 // Mismatch due to stack placement. // Need to declare another stack variable before sp3c to push sp3c onwards down, // but this makes the stack allocation too big. -//void currentPlayerUpdateSpeedBike(struct movedata *data) +//void bbikeApplyMoveData(struct movedata *data) //{ // struct hoverbikeobj *bike = (struct hoverbikeobj *)g_Vars.currentplayer->hoverbike->obj; // s8 contnum = optionsGetContpadNum1(g_Vars.currentplayerstats->mpindex); @@ -649,7 +649,7 @@ glabel var7f1adb74 // } //} -void func0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct defaultobj *obstacle) +void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct defaultobj *obstacle) { struct coord sp9c; struct coord sp90; @@ -713,7 +713,7 @@ void func0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct } GLOBAL_ASM( -glabel func0f0d2e18 +glabel bbikeCalculateNewPosition .late_rodata glabel var7f1adb7c .word 0x40c907a9 @@ -1020,11 +1020,11 @@ glabel var7f1adb7c /* f0d3294: 27bd0138 */ addiu $sp,$sp,0x138 ); -s32 func0f0d3298(struct coord *arg0, f32 arg1) +s32 bbikeCalculateNewPositionWithPush(struct coord *arg0, f32 arg1) { - s32 result = func0f0d2e18(arg0, arg1); + s32 result = bbikeCalculateNewPosition(arg0, arg1); - if (result != 1) { + if (result != CDRESULT_NOCOLLISION) { struct prop *obstacle = cdGetObstacle(); if (obstacle && g_Vars.lvupdate240 > 0) { @@ -1047,7 +1047,7 @@ s32 func0f0d3298(struct coord *arg0, f32 arg1) } if (pass) { - func0f0d2b40(bike, arg0, arg1, obj); + bbike0f0d2b40(bike, arg0, arg1, obj); if ((obj->hidden & OBJHFLAG_AIRBORNE) && (obj->projectile->flags & PROJECTILEFLAG_00000800)) { @@ -1066,7 +1066,7 @@ s32 func0f0d3298(struct coord *arg0, f32 arg1) } if (somevalue) { - result = func0f0d2e18(arg0, arg1); + result = bbikeCalculateNewPosition(arg0, arg1); } } } @@ -1078,7 +1078,7 @@ s32 func0f0d3298(struct coord *arg0, f32 arg1) return result; } -void func0f0d341c(struct coord *arg0) +void bbikeUpdateVertical(struct coord *arg0) { struct defaultobj *bike = g_Vars.currentplayer->hoverbike->obj; f32 angle; @@ -1090,7 +1090,7 @@ void func0f0d341c(struct coord *arg0) angle = hoverpropGetTurnAngle(bike); func0f065e74(&bike->prop->pos, bike->prop->rooms, arg0, newrooms); - func0f0cb79c(g_Vars.currentplayer, arg0, newrooms); + bmove0f0cb79c(g_Vars.currentplayer, arg0, newrooms); func0f065c44(g_Vars.currentplayer->prop); roomsCopy(newrooms, g_Vars.currentplayer->prop->rooms); @@ -1139,19 +1139,19 @@ void func0f0d341c(struct coord *arg0) currentPlayerDie(true); } - func0f0cbf50(); + bmoveUpdateVerta(); } -s32 func0f0d363c(f32 arg0) +s32 bbike0f0d363c(f32 arg0) { struct coord coord = {0, 0, 0}; - return func0f0d3298(&coord, arg0); + return bbikeCalculateNewPositionWithPush(&coord, arg0); } -s32 func0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2) +s32 bbike0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2) { - s32 result = func0f0d3298(arg0, 0); + s32 result = bbikeCalculateNewPositionWithPush(arg0, 0); if (!result) { func00024e4c(arg1, arg2, 659, "bondbike.c"); @@ -1160,7 +1160,7 @@ s32 func0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2) return result; } -s32 func0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4) +s32 bbike0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4) { if (func00024ea4()) { struct coord sp24; @@ -1171,7 +1171,7 @@ s32 func0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, str sp24.y = arg0->y * somefloat * 0.25f; sp24.z = arg0->z * somefloat * 0.25f; - someint = func0f0d3298(&sp24, 0); + someint = bbikeCalculateNewPositionWithPush(&sp24, 0); if (someint == 1) { return 1; @@ -1194,7 +1194,7 @@ s32 func0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, str return -1; } -s32 func0f0d3840(struct coord *arg0, struct coord *arg1, struct coord *arg2) +s32 bbike0f0d3840(struct coord *arg0, struct coord *arg1, struct coord *arg2) { s32 result; @@ -1217,7 +1217,7 @@ s32 func0f0d3840(struct coord *arg0, struct coord *arg1, struct coord *arg2) sp24.y = 0; sp24.z = sp30.z * tmp; - result = func0f0d3298(&sp24, 0); + result = bbikeCalculateNewPositionWithPush(&sp24, 0); } else { result = -1; } @@ -1225,7 +1225,7 @@ s32 func0f0d3840(struct coord *arg0, struct coord *arg1, struct coord *arg2) return result; } -s32 func0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2) +s32 bbike0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2) { struct coord sp34; struct coord sp28; @@ -1259,7 +1259,7 @@ s32 func0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2) sp28.y = 0; sp28.z = sp34.z; - if (func0f0d3298(&sp28, 0) == CDRESULT_NOCOLLISION) { + if (bbikeCalculateNewPositionWithPush(&sp28, 0) == CDRESULT_NOCOLLISION) { return true; } } @@ -1287,7 +1287,7 @@ s32 func0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2) sp28.y = 0; sp28.z = sp34.z; - if (func0f0d3298(&sp28, 0) == CDRESULT_NOCOLLISION) { + if (bbikeCalculateNewPositionWithPush(&sp28, 0) == CDRESULT_NOCOLLISION) { return true; } } @@ -1298,12 +1298,12 @@ s32 func0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2) } GLOBAL_ASM( -glabel func0f0d3c60 +glabel bbike0f0d3c60 /* f0d3c60: 27bdff90 */ addiu $sp,$sp,-112 /* f0d3c64: afbf001c */ sw $ra,0x1c($sp) /* f0d3c68: afa40070 */ sw $a0,0x70($sp) /* f0d3c6c: 27a50064 */ addiu $a1,$sp,0x64 -/* f0d3c70: 0fc34da0 */ jal func0f0d3680 +/* f0d3c70: 0fc34da0 */ jal bbike0f0d3680 /* f0d3c74: 27a60058 */ addiu $a2,$sp,0x58 /* f0d3c78: 14400031 */ bnez $v0,.L0f0d3d40 /* f0d3c7c: 8fa40070 */ lw $a0,0x70($sp) @@ -1311,19 +1311,19 @@ glabel func0f0d3c60 /* f0d3c84: afae0010 */ sw $t6,0x10($sp) /* f0d3c88: 27a50064 */ addiu $a1,$sp,0x64 /* f0d3c8c: 27a60058 */ addiu $a2,$sp,0x58 -/* f0d3c90: 0fc34db5 */ jal func0f0d36d4 +/* f0d3c90: 0fc34db5 */ jal bbike0f0d36d4 /* f0d3c94: 27a7004c */ addiu $a3,$sp,0x4c /* f0d3c98: 1c400002 */ bgtz $v0,.L0f0d3ca4 /* f0d3c9c: 8fa40070 */ lw $a0,0x70($sp) /* f0d3ca0: 0441000c */ bgez $v0,.L0f0d3cd4 .L0f0d3ca4: /* f0d3ca4: 27a50064 */ addiu $a1,$sp,0x64 -/* f0d3ca8: 0fc34e10 */ jal func0f0d3840 +/* f0d3ca8: 0fc34e10 */ jal bbike0f0d3840 /* f0d3cac: 27a60058 */ addiu $a2,$sp,0x58 /* f0d3cb0: 1c400023 */ bgtz $v0,.L0f0d3d40 /* f0d3cb4: 8fa40070 */ lw $a0,0x70($sp) /* f0d3cb8: 27a50064 */ addiu $a1,$sp,0x64 -/* f0d3cbc: 0fc34e50 */ jal func0f0d3940 +/* f0d3cbc: 0fc34e50 */ jal bbike0f0d3940 /* f0d3cc0: 27a60058 */ addiu $a2,$sp,0x58 /* f0d3cc4: 5c40001f */ bgtzl $v0,.L0f0d3d44 /* f0d3cc8: 8fbf001c */ lw $ra,0x1c($sp) @@ -1336,26 +1336,26 @@ glabel func0f0d3c60 /* f0d3ce0: afaf0010 */ sw $t7,0x10($sp) /* f0d3ce4: 27a5004c */ addiu $a1,$sp,0x4c /* f0d3ce8: 27a60040 */ addiu $a2,$sp,0x40 -/* f0d3cec: 0fc34db5 */ jal func0f0d36d4 +/* f0d3cec: 0fc34db5 */ jal bbike0f0d36d4 /* f0d3cf0: 27a70030 */ addiu $a3,$sp,0x30 /* f0d3cf4: 8fa40070 */ lw $a0,0x70($sp) /* f0d3cf8: 27a5004c */ addiu $a1,$sp,0x4c -/* f0d3cfc: 0fc34e10 */ jal func0f0d3840 +/* f0d3cfc: 0fc34e10 */ jal bbike0f0d3840 /* f0d3d00: 27a60040 */ addiu $a2,$sp,0x40 /* f0d3d04: 1c40000e */ bgtz $v0,.L0f0d3d40 /* f0d3d08: 8fa40070 */ lw $a0,0x70($sp) /* f0d3d0c: 27a50064 */ addiu $a1,$sp,0x64 -/* f0d3d10: 0fc34e10 */ jal func0f0d3840 +/* f0d3d10: 0fc34e10 */ jal bbike0f0d3840 /* f0d3d14: 27a60058 */ addiu $a2,$sp,0x58 /* f0d3d18: 1c400009 */ bgtz $v0,.L0f0d3d40 /* f0d3d1c: 8fa40070 */ lw $a0,0x70($sp) /* f0d3d20: 27a5004c */ addiu $a1,$sp,0x4c -/* f0d3d24: 0fc34e50 */ jal func0f0d3940 +/* f0d3d24: 0fc34e50 */ jal bbike0f0d3940 /* f0d3d28: 27a60040 */ addiu $a2,$sp,0x40 /* f0d3d2c: 1c400004 */ bgtz $v0,.L0f0d3d40 /* f0d3d30: 8fa40070 */ lw $a0,0x70($sp) /* f0d3d34: 27a50064 */ addiu $a1,$sp,0x64 -/* f0d3d38: 0fc34e50 */ jal func0f0d3940 +/* f0d3d38: 0fc34e50 */ jal bbike0f0d3940 /* f0d3d3c: 27a60058 */ addiu $a2,$sp,0x58 .L0f0d3d40: /* f0d3d40: 8fbf001c */ lw $ra,0x1c($sp) @@ -1366,7 +1366,7 @@ glabel func0f0d3c60 ); // Mismatch because the below copies arg0 into s0 but goal uses sp. -//void func0f0d3c60(struct coord *arg0) +//void bbike0f0d3c60(struct coord *arg0) //{ // struct coord sp100; // struct coord sp88; @@ -1376,28 +1376,28 @@ glabel func0f0d3c60 // struct coord sp48; // struct coord sp36; // -// if (func0f0d3680(arg0, &sp100, &sp88) == 0) { -// lVar1 = func0f0d36d4(arg0, &sp100, &sp88, &sp76, &sp64); +// if (bbike0f0d3680(arg0, &sp100, &sp88) == 0) { +// lVar1 = bbike0f0d36d4(arg0, &sp100, &sp88, &sp76, &sp64); // // if (lVar1 > 0 || lVar1 < 0) { -// if (func0f0d3840(arg0, &sp100, &sp88) < 1 -// && func0f0d3940(arg0, &sp100, &sp88) < 1) { +// if (bbike0f0d3840(arg0, &sp100, &sp88) < 1 +// && bbike0f0d3940(arg0, &sp100, &sp88) < 1) { // // empty // } // } else if (lVar1 == 0) { -// func0f0d36d4(arg0, &sp76, &sp64, &sp48, &sp36); +// bbike0f0d36d4(arg0, &sp76, &sp64, &sp48, &sp36); // -// if (func0f0d3840(arg0, &sp76, &sp64) < 1 -// && func0f0d3840(arg0, &sp100, &sp88) < 1 -// && func0f0d3940(arg0, &sp76, &sp64) < 1) { -// func0f0d3940(arg0, &sp100, &sp88); +// if (bbike0f0d3840(arg0, &sp76, &sp64) < 1 +// && bbike0f0d3840(arg0, &sp100, &sp88) < 1 +// && bbike0f0d3940(arg0, &sp76, &sp64) < 1) { +// bbike0f0d3940(arg0, &sp100, &sp88); // } // } // } //} GLOBAL_ASM( -glabel func0f0d3d50 +glabel bbikeTick .late_rodata glabel var7f1adb88 .word 0x4528c000 @@ -1558,7 +1558,7 @@ glabel var7f1adb9c .L0f0d3f6c: /* f0d3f6c: c606004c */ lwc1 $f6,0x4c($s0) /* f0d3f70: 46065302 */ mul.s $f12,$f10,$f6 -/* f0d3f74: 0fc34d8f */ jal func0f0d363c +/* f0d3f74: 0fc34d8f */ jal bbike0f0d363c /* f0d3f78: 00000000 */ nop /* f0d3f7c: 8fa70218 */ lw $a3,0x218($sp) /* f0d3f80: c600004c */ lwc1 $f0,0x4c($s0) @@ -1575,7 +1575,7 @@ glabel var7f1adb9c /* f0d3fac: c4440008 */ lwc1 $f4,0x8($v0) /* f0d3fb0: e4e400a4 */ swc1 $f4,0xa4($a3) /* f0d3fb4: c44a0010 */ lwc1 $f10,0x10($v0) -/* f0d3fb8: 0fc34f18 */ jal func0f0d3c60 +/* f0d3fb8: 0fc34f18 */ jal bbike0f0d3c60 /* f0d3fbc: e4ea00a8 */ swc1 $f10,0xa8($a3) /* f0d3fc0: 8fa70218 */ lw $a3,0x218($sp) /* f0d3fc4: c600004c */ lwc1 $f0,0x4c($s0) @@ -1653,7 +1653,7 @@ glabel var7f1adb9c /* f0d40dc: 27a601e8 */ addiu $a2,$sp,0x1e8 /* f0d40e0: 0c0056da */ jal func00015b68 /* f0d40e4: 24a51a70 */ addiu $a1,$a1,0x1a70 -/* f0d40e8: 0fc34d07 */ jal func0f0d341c +/* f0d40e8: 0fc34d07 */ jal bbikeUpdateVertical /* f0d40ec: 27a401e8 */ addiu $a0,$sp,0x1e8 /* f0d40f0: 8e080284 */ lw $t0,0x284($s0) /* f0d40f4: 2405ffff */ addiu $a1,$zero,-1 @@ -1688,10 +1688,10 @@ glabel var7f1adb9c .L0f0d415c: /* f0d415c: 44806000 */ mtc1 $zero,$f12 /* f0d4160: 25ae001c */ addiu $t6,$t5,0x1c -/* f0d4164: 0fc44fc4 */ jal currentPlayerAdjustHeadAnimation +/* f0d4164: 0fc44fc4 */ jal bheadAdjustAnimation /* f0d4168: afae0060 */ sw $t6,0x60($sp) /* f0d416c: 44806000 */ mtc1 $zero,$f12 -/* f0d4170: 0fc44e29 */ jal currentPlayerUpdateHead +/* f0d4170: 0fc44e29 */ jal bheadUpdate /* f0d4174: 46006386 */ mov.s $f14,$f12 /* f0d4178: 8e0f0284 */ lw $t7,0x284($s0) /* f0d417c: 3c0143b4 */ lui $at,0x43b4 @@ -1957,13 +1957,13 @@ glabel var7f1adb9c /* f0d4580: c5c40010 */ lwc1 $f4,0x10($t6) /* f0d4584: 46085182 */ mul.s $f6,$f10,$f8 /* f0d4588: 46043280 */ add.s $f10,$f6,$f4 -/* f0d458c: 0fc33067 */ jal func0f0cc19c +/* f0d458c: 0fc33067 */ jal bmove0f0cc19c /* f0d4590: e7aa0080 */ swc1 $f10,0x80($sp) /* f0d4594: 10000005 */ b .L0f0d45ac /* f0d4598: 8e0f0284 */ lw $t7,0x284($s0) /* f0d459c: 8d0400bc */ lw $a0,0xbc($t0) .L0f0d45a0: -/* f0d45a0: 0fc33067 */ jal func0f0cc19c +/* f0d45a0: 0fc33067 */ jal bmove0f0cc19c /* f0d45a4: 24840008 */ addiu $a0,$a0,0x8 /* f0d45a8: 8e0f0284 */ lw $t7,0x284($s0) .L0f0d45ac: @@ -1971,7 +1971,7 @@ glabel var7f1adb9c /* f0d45b0: c426db98 */ lwc1 $f6,%lo(var7f1adb98)($at) /* f0d45b4: c5e8015c */ lwc1 $f8,0x15c($t7) /* f0d45b8: 46064083 */ div.s $f2,$f8,$f6 -/* f0d45bc: 0fc4505b */ jal func0f11416c +/* f0d45bc: 0fc4505b */ jal bheadGetBreathingValue /* f0d45c0: e7a20070 */ swc1 $f2,0x70($sp) /* f0d45c4: 3c013f80 */ lui $at,0x3f80 /* f0d45c8: c7a20070 */ lwc1 $f2,0x70($sp) @@ -2012,7 +2012,7 @@ glabel var7f1adb9c /* f0d464c: 00000000 */ nop /* f0d4650: 0fc307fd */ jal currentPlayerUpdatePerimInfo /* f0d4654: 00000000 */ nop -/* f0d4658: 0fc32e31 */ jal func0f0cb8c4 +/* f0d4658: 0fc32e31 */ jal bmove0f0cb8c4 /* f0d465c: 8e040284 */ lw $a0,0x284($s0) /* f0d4660: 8e090284 */ lw $t1,0x284($s0) /* f0d4664: 8d2a00bc */ lw $t2,0xbc($t1) diff --git a/src/game/bondcutscene.c b/src/game/bondcutscene.c index 312c6d318..53903a24a 100644 --- a/src/game/bondcutscene.c +++ b/src/game/bondcutscene.c @@ -11,7 +11,7 @@ #include "lib/lib_317f0.h" #include "types.h" -void currentPlayerSetMoveModeCutscene(void) +void bcutsceneInit(void) { s32 i; s32 j; @@ -35,7 +35,7 @@ void currentPlayerSetMoveModeCutscene(void) } } -void func0f0c37c0(void) +void bcutsceneTick(void) { // empty } diff --git a/src/game/bondeyespy.c b/src/game/bondeyespy.c index 3297e2998..edb06f6ae 100644 --- a/src/game/bondeyespy.c +++ b/src/game/bondeyespy.c @@ -76,7 +76,7 @@ f32 eyespyFindGround(s16 *floorroom) return ground; } -s32 eyespyCalculateNewY(f32 yvel) +s32 eyespyTryMoveUpwards(f32 yvel) { s32 result; struct prop *prop = g_Vars.currentplayer->eyespy->prop; @@ -221,7 +221,7 @@ s32 eyespyCalculateNewPosition(struct coord *vel) return result; } -bool func0f0cf728(struct coord *vel) +bool eyespyCalculateNewPositionWithPush(struct coord *vel) { s32 result = eyespyCalculateNewPosition(vel); struct prop *prop; @@ -244,8 +244,8 @@ bool func0f0cf728(struct coord *vel) func00024e4c(&sp2c, &sp20, 286, "bondeyespy.c"); // Nothing is actually done with these coordinates... - // maybe they were originally going to make the eyespy - // bounce off the lasers like Jo does? + // This code was likely copied from bondwalk then the bounce + // feature removed sp38[0] = sp20.z - sp2c.z; sp38[1] = 0; sp38[2] = sp2c.x - sp20.x; @@ -275,7 +275,7 @@ bool func0f0cf728(struct coord *vel) return result; } -s32 func0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4) +s32 eyespy0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4) { if (func00024ea4()) { struct coord sp24; @@ -285,7 +285,7 @@ s32 func0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, str sp24.y = arg0->y * somefloat * 0.25f; sp24.z = arg0->z * somefloat * 0.25f; - someint = func0f0cf728(&sp24); + someint = eyespyCalculateNewPositionWithPush(&sp24); if (someint == 1) { return 1; @@ -308,7 +308,7 @@ s32 func0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, str return -1; } -s32 func0f0cf9f8(struct coord *arg0, struct coord *arg1, struct coord *arg2) +s32 eyespy0f0cf9f8(struct coord *arg0, struct coord *arg1, struct coord *arg2) { f32 tmp; struct coord sp30; @@ -331,13 +331,13 @@ s32 func0f0cf9f8(struct coord *arg0, struct coord *arg1, struct coord *arg2) sp24.y = 0; sp24.z = sp30.z * tmp; - return func0f0cf728(&sp24); + return eyespyCalculateNewPositionWithPush(&sp24); } return -1; } -s32 func0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2) +s32 eyespy0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2) { struct coord sp34; struct coord sp28; @@ -368,7 +368,7 @@ s32 func0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2) sp28.y = 0; sp28.z = sp34.z; - if (func0f0cf728(&sp28) == 1) { + if (eyespyCalculateNewPositionWithPush(&sp28) == 1) { return true; } } @@ -396,7 +396,7 @@ s32 func0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2) sp28.y = 0; sp28.z = sp34.z; - if (func0f0cf728(&sp28) == 1) { + if (eyespyCalculateNewPositionWithPush(&sp28) == 1) { return true; } } @@ -406,9 +406,9 @@ s32 func0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2) return false; } -s32 func0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *arg2) +s32 eyespy0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *arg2) { - bool result = func0f0cf728(vel); + bool result = eyespyCalculateNewPositionWithPush(vel); if (result != CDRESULT_NOCOLLISION) { func00024e4c(arg1, arg2, 473, "bondeyespy.c"); @@ -417,7 +417,7 @@ s32 func0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *arg2) return result; } -void eyespyCalculateVerticalMovement(void) +void eyespyUpdateVertical(void) { struct coord spac; struct coord spa0; @@ -444,18 +444,18 @@ void eyespyCalculateVerticalMovement(void) dist.y = 0; dist.z = g_Vars.currentplayer->eyespy->vel.z; - if (func0f0cfdd0(&dist, &spac, &spa0) == CDRESULT_COLLISION) { - if (func0f0cf890(&dist, &spac, &spa0, &sp60, &sp54)) { - if (func0f0cf9f8(&dist, &spac, &spa0) <= 0) { - func0f0cfafc(&dist, &spac, &spa0); + if (eyespy0f0cfdd0(&dist, &spac, &spa0) == CDRESULT_COLLISION) { + if (eyespy0f0cf890(&dist, &spac, &spa0, &sp60, &sp54)) { + if (eyespy0f0cf9f8(&dist, &spac, &spa0) <= 0) { + eyespy0f0cfafc(&dist, &spac, &spa0); } } else { - func0f0cf890(&dist, &sp60, &sp54, &sp44, &sp38); + eyespy0f0cf890(&dist, &sp60, &sp54, &sp44, &sp38); - if (func0f0cf9f8(&dist, &sp60, &sp54) <= 0 - && func0f0cf9f8(&dist, &spac, &spa0) <= 0 - && func0f0cfafc(&dist, &sp60, &sp54) <= 0) { - func0f0cfafc(&dist, &spac, &spa0); + if (eyespy0f0cf9f8(&dist, &sp60, &sp54) <= 0 + && eyespy0f0cf9f8(&dist, &spac, &spa0) <= 0 + && eyespy0f0cfafc(&dist, &sp60, &sp54) <= 0) { + eyespy0f0cfafc(&dist, &spac, &spa0); } } } @@ -506,7 +506,7 @@ void eyespyCalculateVerticalMovement(void) } } - if (eyespyCalculateNewY(newy - chr->manground)) { + if (eyespyTryMoveUpwards(newy - chr->manground)) { chr->manground = newy; } else { g_Vars.currentplayer->eyespy->gravity = 0; @@ -529,7 +529,7 @@ void eyespyCalculateVerticalMovement(void) rebound = true; } - if (eyespyCalculateNewY(newheight - g_Vars.currentplayer->eyespy->height)) { + if (eyespyTryMoveUpwards(newheight - g_Vars.currentplayer->eyespy->height)) { g_Vars.currentplayer->eyespy->height = newheight; } else { rebound = true; @@ -682,7 +682,7 @@ bool eyespyTryLaunch(void) } GLOBAL_ASM( -glabel func0f0d0928 +glabel eyespyProcessInput .late_rodata glabel var7f1adaa0 .word 0x3f75c28f @@ -721,15 +721,15 @@ glabel var7f1adae0 glabel var7f1adae4 .word 0x3ccccccd glabel var7f1adae8 -.word func0f0d0928+0x1184 # f0d1aac +.word eyespyProcessInput+0x1184 # f0d1aac glabel var7f1adaec -.word func0f0d0928+0x1280 # f0d1ba8 +.word eyespyProcessInput+0x1280 # f0d1ba8 glabel var7f1adaf0 -.word func0f0d0928+0x122c # f0d1b54 +.word eyespyProcessInput+0x122c # f0d1b54 glabel var7f1adaf4 -.word func0f0d0928+0x12d4 # f0d1bfc +.word eyespyProcessInput+0x12d4 # f0d1bfc glabel var7f1adaf8 -.word func0f0d0928+0x11d8 # f0d1b00 +.word eyespyProcessInput+0x11d8 # f0d1b00 glabel var7f1adafc .word 0x40c907a9 glabel var7f1adb00 @@ -1913,7 +1913,7 @@ glabel var7f1adb00 /* f0d1a28: a02e0ec8 */ sb $t6,%lo(var80070ec8)($at) /* f0d1a2c: a0400000 */ sb $zero,0x0($v0) /* f0d1a30: 3c018007 */ lui $at,%hi(var80070ecc) -/* f0d1a34: 0fc33f89 */ jal eyespyCalculateVerticalMovement +/* f0d1a34: 0fc33f89 */ jal eyespyUpdateVertical /* f0d1a38: a0200ecc */ sb $zero,%lo(var80070ecc)($at) /* f0d1a3c: 3c09800a */ lui $t1,%hi(g_Vars) /* f0d1a40: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index 2b8d666cc..220b9a53f 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -38,7 +38,7 @@ u32 var80070e90 = 0x00000000; u32 var80070e94 = 0x00000000; u32 var80070e98 = 0x00000000; -void currentPlayerGrabInit(void) +void bgrabInit(void) { s32 prevmode = g_Vars.currentplayer->bondmovemode; Mtxf matrix; @@ -144,7 +144,7 @@ void currentPlayerGrabInit(void) g_Vars.currentplayer->grabstarttime = g_Vars.lvframe60; } -void currentPlayerUpdateGrabbedPropForRelease(void) +void bgrabExit(void) { struct coord moveamount; struct defaultobj *obj; @@ -179,7 +179,7 @@ void currentPlayerUpdateGrabbedPropForRelease(void) } GLOBAL_ASM( -glabel func0f0ccbf0 +glabel bgrab0f0ccbf0 .late_rodata glabel var7f1ad990 .word 0x3dcccccd @@ -482,7 +482,7 @@ glabel var7f1ad990 /* f0cd058: 00000000 */ nop ); -bool func0f0cd05c(f32 y) +bool bgrabTryMoveUpwards(f32 y) { bool result; struct coord newpos; @@ -497,7 +497,7 @@ bool func0f0cd05c(f32 y) propPlayerGetBbox(g_Vars.currentplayer->prop, &width, &ymax, &ymin); func0f065e74(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &newpos, rooms); - func0f0cb79c(g_Vars.currentplayer, &newpos, rooms); + bmove0f0cb79c(g_Vars.currentplayer, &newpos, rooms); propSetCollisionsEnabled(g_Vars.currentplayer->prop, false); ymin -= 0.1f; @@ -508,7 +508,7 @@ bool func0f0cd05c(f32 y) propSetCollisionsEnabled(g_Vars.currentplayer->prop, true); - if (result == 1) { + if (result == CDRESULT_NOCOLLISION) { g_Vars.currentplayer->prop->pos.y = newpos.y; func0f065c44(g_Vars.currentplayer->prop); roomsCopy(rooms, g_Vars.currentplayer->prop->rooms); @@ -518,7 +518,7 @@ bool func0f0cd05c(f32 y) } GLOBAL_ASM( -glabel func0f0cd1a4 +glabel bgrabCalculateNewPosition .late_rodata glabel var7f1ad998 .word 0x3c8ef461 @@ -621,7 +621,7 @@ glabel var7f1ad9c4 /* f0cd2c4: 24450028 */ addiu $a1,$v0,0x28 /* f0cd2c8: 8e040284 */ lw $a0,0x284($s0) /* f0cd2cc: 27a500dc */ addiu $a1,$sp,0xdc -/* f0cd2d0: 0fc32de7 */ jal func0f0cb79c +/* f0cd2d0: 0fc32de7 */ jal bmove0f0cb79c /* f0cd2d4: 27a600cc */ addiu $a2,$sp,0xcc /* f0cd2d8: 8e0d0284 */ lw $t5,0x284($s0) /* f0cd2dc: 240c0001 */ addiu $t4,$zero,0x1 @@ -1075,11 +1075,11 @@ glabel var7f1ad9c4 /* f0cd96c: 27bd00f0 */ addiu $sp,$sp,0xf0 ); -bool func0f0cd970(struct coord *delta, f32 angle, bool arg2) +bool bgrabCalculateNewPositiontWithPush(struct coord *delta, f32 angle, bool arg2) { - s32 result = func0f0cd1a4(delta, angle, arg2); + s32 result = bgrabCalculateNewPosition(delta, angle, arg2); - if (result != 1) { + if (result != CDRESULT_NOCOLLISION) { struct prop *obstacle = cdGetObstacle(); if (obstacle && g_Vars.lvupdate240 > 0) { @@ -1103,7 +1103,7 @@ bool func0f0cd970(struct coord *delta, f32 angle, bool arg2) } if (canpush) { - func0f0ccbf0(delta, angle); + bgrab0f0ccbf0(delta, angle); if ((obj->hidden & OBJHFLAG_AIRBORNE) && (obj->projectile->flags & PROJECTILEFLAG_00000800)) { @@ -1122,7 +1122,7 @@ bool func0f0cd970(struct coord *delta, f32 angle, bool arg2) } if (someint) { - result = func0f0cd1a4(delta, angle, arg2); + result = bgrabCalculateNewPosition(delta, angle, arg2); } } } @@ -1134,20 +1134,20 @@ bool func0f0cd970(struct coord *delta, f32 angle, bool arg2) return result; } -bool func0f0cdb04(f32 angle, bool arg2) +bool bgrab0f0cdb04(f32 angle, bool arg2) { struct coord coord = {0, 0, 0}; bool result; g_Vars.currentplayer->grabbeddoextra = true; - result = func0f0cd970(&coord, angle, arg2); + result = bgrabCalculateNewPositiontWithPush(&coord, angle, arg2); g_Vars.currentplayer->grabbeddoextra = false; return result; } GLOBAL_ASM( -glabel func0f0cdb68 +glabel bgrab0f0cdb68 .late_rodata glabel var7f1ad9c8 .word 0x3f8147ae @@ -1377,10 +1377,10 @@ glabel var7f1ad9c8 /* f0cdeb0: 46167202 */ mul.s $f8,$f14,$f22 /* f0cdeb4: e7a40054 */ swc1 $f4,0x54($sp) /* f0cdeb8: 46004182 */ mul.s $f6,$f8,$f0 -/* f0cdebc: 0fc3382f */ jal func0f0ce0bc +/* f0cdebc: 0fc3382f */ jal bgrab0f0ce0bc /* f0cdec0: e7a6005c */ swc1 $f6,0x5c($sp) /* f0cdec4: c7ac00b0 */ lwc1 $f12,0xb0($sp) -/* f0cdec8: 0fc336c1 */ jal func0f0cdb04 +/* f0cdec8: 0fc336c1 */ jal bgrab0f0cdb04 /* f0cdecc: 24050001 */ addiu $a1,$zero,0x1 /* f0cded0: 10000002 */ b .L0f0cdedc /* f0cded4: 8fbf002c */ lw $ra,0x2c($sp) @@ -1394,20 +1394,20 @@ glabel var7f1ad9c8 /* f0cdeec: 27bd00b0 */ addiu $sp,$sp,0xb0 ); -void func0f0cdef0(void) +void bgrab0f0cdef0(void) { if (g_Vars.lvupdate240 > 0) { f32 angle = g_Vars.currentplayer->speedtheta * g_Vars.lvupdate240freal * 0.017450513318181f * 3.5f; - if (func0f0cdb04(angle, true) == 0) { - func0f0cdb68(angle); + if (bgrab0f0cdb04(angle, true) == 0) { + bgrab0f0cdb68(angle); } } } -bool func0f0cdf64(struct coord *delta, struct coord *arg1, struct coord *arg2) +bool bgrab0f0cdf64(struct coord *delta, struct coord *arg1, struct coord *arg2) { - bool result = func0f0cd970(delta, 0, true); + bool result = bgrabCalculateNewPositiontWithPush(delta, 0, true); if (!result) { func00024e4c(arg1, arg2, 0x32f, "bondgrab.c"); @@ -1416,7 +1416,7 @@ bool func0f0cdf64(struct coord *delta, struct coord *arg1, struct coord *arg2) return result; } -s32 func0f0cdfbc(struct coord *delta, struct coord *arg1, struct coord *arg2) +s32 bgrab0f0cdfbc(struct coord *delta, struct coord *arg1, struct coord *arg2) { if (arg1->f[0] != arg2->f[0] || arg1->f[2] != arg2->f[2]) { f32 tmp; @@ -1437,20 +1437,20 @@ s32 func0f0cdfbc(struct coord *delta, struct coord *arg1, struct coord *arg2) sp24.y = 0; sp24.z = sp30.z * tmp; - return func0f0cd970(&sp24, 0, true); + return bgrabCalculateNewPositiontWithPush(&sp24, 0, true); } return -1; } -void func0f0ce0bc(struct coord *arg0) +void bgrab0f0ce0bc(struct coord *arg0) { struct coord a; struct coord b; - s32 value = func0f0cdf64(arg0, &a, &b); + s32 value = bgrab0f0cdf64(arg0, &a, &b); if (value == 0) { - value = func0f0cdfbc(arg0, &a, &b); + value = bgrab0f0cdfbc(arg0, &a, &b); if (value <= 0) { value = 1; @@ -1462,7 +1462,7 @@ void func0f0ce0bc(struct coord *arg0) } } -void currentPlayerUpdatePrevPosGrab(void) +void bgrabUpdatePrevPos(void) { g_Vars.currentplayer->bondprevpos.x = g_Vars.currentplayer->prop->pos.x; g_Vars.currentplayer->bondprevpos.y = g_Vars.currentplayer->prop->pos.y; @@ -1475,12 +1475,12 @@ void currentPlayerUpdatePrevPosGrab(void) g_Vars.currentplayer->grabbedprevpos.z = g_Vars.currentplayer->grabbedprop->pos.z; } -void func0f0ce178(void) +void bgrab0f0ce178(void) { func0f069c70(g_Vars.currentplayer->grabbedprop->obj, 0, 1); } -void func0f0ce1ac(void) +void bgrabUpdateVertical(void) { f32 stack; s32 i; @@ -1548,7 +1548,7 @@ void func0f0ce1ac(void) tmp = g_Vars.currentplayer->vv_ground + 10.0f - g_Vars.currentplayer->prop->pos.y; } - if (func0f0cd05c(tmp)) { + if (bgrabTryMoveUpwards(tmp)) { g_Vars.currentplayer->sumground = fVar3; g_Vars.currentplayer->vv_manground = fVar3 * 0.045499980449677f; } @@ -1559,17 +1559,17 @@ void func0f0ce1ac(void) } } -void func0f0ce450(void) +void bgrabHandleActivate(void) { if (currentPlayerTryMountHoverbike(g_Vars.currentplayer->grabbedprop)) { g_Vars.currentplayer->bondactivateorreload = 0; } else { g_Vars.currentplayer->bondactivateorreload = 0; - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); } } -void currentPlayerUpdateSpeedSidewaysGrab(f32 targetspeed, f32 accelspeed, s32 mult) +void bgrabUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult) { if (targetspeed < g_Vars.currentplayer->speedstrafe) { g_Vars.currentplayer->speedstrafe -= accelspeed * mult; @@ -1588,7 +1588,7 @@ void currentPlayerUpdateSpeedSidewaysGrab(f32 targetspeed, f32 accelspeed, s32 m g_Vars.currentplayer->speedsideways = g_Vars.currentplayer->speedstrafe; } -void currentPlayerUpdateSpeedForwardsGrab(f32 target, f32 speed) +void bgrabUpdateSpeedForwards(f32 target, f32 speed) { if (g_Vars.currentplayer->speedgo < target) { g_Vars.currentplayer->speedgo += speed * g_Vars.lvupdate240freal; @@ -1607,33 +1607,33 @@ void currentPlayerUpdateSpeedForwardsGrab(f32 target, f32 speed) g_Vars.currentplayer->speedforwards = g_Vars.currentplayer->speedgo; } -void currentPlayerUpdateSpeedGrab(struct movedata *data) +void bgrabApplyMoveData(struct movedata *data) { // Sideways if (data->digitalstepleft) { - currentPlayerUpdateSpeedSidewaysGrab(-1, 0.2f / 3.0f, data->digitalstepleft); + bgrabUpdateSpeedSideways(-1, 0.2f / 3.0f, data->digitalstepleft); } else if (data->digitalstepright) { - currentPlayerUpdateSpeedSidewaysGrab(1, 0.2f / 3.0f, data->digitalstepright); + bgrabUpdateSpeedSideways(1, 0.2f / 3.0f, data->digitalstepright); } else if (data->unk14 == 0) { - currentPlayerUpdateSpeedSidewaysGrab(0, 0.2f / 3.0f, g_Vars.lvupdate240_60); + bgrabUpdateSpeedSideways(0, 0.2f / 3.0f, g_Vars.lvupdate240_60); } if (data->unk14) { - currentPlayerUpdateSpeedSidewaysGrab(data->analogstrafe * 0.014285714365542f, 0.2f / 3.0f, g_Vars.lvupdate240_60); + bgrabUpdateSpeedSideways(data->analogstrafe * 0.014285714365542f, 0.2f / 3.0f, g_Vars.lvupdate240_60); } // Forward/back if (data->digitalstepforward) { - currentPlayerUpdateSpeedForwardsGrab(1, 0.2f / 3.0f); + bgrabUpdateSpeedForwards(1, 0.2f / 3.0f); g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60; } else if (data->digitalstepback) { - currentPlayerUpdateSpeedForwardsGrab(-1, 0.2f / 3.0f); + bgrabUpdateSpeedForwards(-1, 0.2f / 3.0f); } else if (data->canlookahead == false) { - currentPlayerUpdateSpeedForwardsGrab(0, 0.2f / 3.0f); + bgrabUpdateSpeedForwards(0, 0.2f / 3.0f); } if (data->canlookahead) { - currentPlayerUpdateSpeedForwardsGrab(data->analogwalk * 0.014285714365542f, 0.2f / 3.0f); + bgrabUpdateSpeedForwards(data->analogwalk * 0.014285714365542f, 0.2f / 3.0f); if (data->analogwalk > 60) { g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60; @@ -1666,7 +1666,7 @@ void currentPlayerUpdateSpeedGrab(struct movedata *data) } } -void currentPlayerUpdateSpeedThetaGrab(void) +void bgrabUpdateSpeedTheta(void) { f32 mult = 0.98470002412796f; f32 speedtheta = g_Vars.currentplayer->speedtheta * 0.75f; @@ -1687,7 +1687,7 @@ u32 var80070eb8 = 0x00000000; u32 var80070ebc = 0x00000000; GLOBAL_ASM( -glabel func0f0ce924 +glabel bgrab0f0ce924 .late_rodata glabel var7f1ada18 .word 0x3f4ccccd @@ -1725,7 +1725,7 @@ glabel var7f1ada2c /* f0ce974: c444014c */ lwc1 $f4,0x14c($v0) /* f0ce978: 8c470150 */ lw $a3,0x150($v0) /* f0ce97c: 2446017c */ addiu $a2,$v0,0x17c -/* f0ce980: 0fc32ea2 */ jal func0f0cba88 +/* f0ce980: 0fc32ea2 */ jal bmove0f0cba88 /* f0ce984: e7a40010 */ swc1 $f4,0x10($sp) /* f0ce988: 3c08800a */ lui $t0,%hi(g_Vars) /* f0ce98c: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -1840,7 +1840,7 @@ glabel var7f1ada2c /* f0ceb1c: c44e0170 */ lwc1 $f14,0x170($v0) .L0f0ceb20: /* f0ceb20: e7ac005c */ swc1 $f12,0x5c($sp) -/* f0ceb24: 0fc33195 */ jal func0f0cc654 +/* f0ceb24: 0fc33195 */ jal bmove0f0cc654 /* f0ceb28: 8fa60088 */ lw $a2,0x88($sp) /* f0ceb2c: 3c08800a */ lui $t0,%hi(g_Vars) /* f0ceb30: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -1888,7 +1888,7 @@ glabel var7f1ada2c /* f0cebd4: c7a4007c */ lwc1 $f4,0x7c($sp) /* f0cebd8: 460e3282 */ mul.s $f10,$f6,$f14 /* f0cebdc: 460a2200 */ add.s $f8,$f4,$f10 -/* f0cebe0: 0fc32ed2 */ jal currentPlayerUpdateMoveInitSpeed +/* f0cebe0: 0fc32ed2 */ jal bmoveUpdateMoveInitSpeed /* f0cebe4: e7a8007c */ swc1 $f8,0x7c($sp) /* f0cebe8: 0fc47b82 */ jal debugIsTurboModeEnabled /* f0cebec: 00000000 */ nop @@ -1926,7 +1926,7 @@ glabel var7f1ada2c /* f0cec6c: 460a2200 */ add.s $f8,$f4,$f10 /* f0cec70: e7a8007c */ swc1 $f8,0x7c($sp) .L0f0cec74: -/* f0cec74: 0fc3382f */ jal func0f0ce0bc +/* f0cec74: 0fc3382f */ jal bgrab0f0ce0bc /* f0cec78: 27a40074 */ addiu $a0,$sp,0x74 /* f0cec7c: 3c08800a */ lui $t0,%hi(g_Vars) /* f0cec80: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -2032,7 +2032,7 @@ glabel var7f1ada2c /* f0cedf8: c44a00cc */ lwc1 $f10,0xcc($v0) /* f0cedfc: 46044083 */ div.s $f2,$f8,$f4 /* f0cee00: e7aa0038 */ swc1 $f10,0x38($sp) -/* f0cee04: 0fc4505b */ jal func0f11416c +/* f0cee04: 0fc4505b */ jal bheadGetBreathingValue /* f0cee08: e7a2003c */ swc1 $f2,0x3c($sp) /* f0cee0c: 3c013f80 */ lui $at,0x3f80 /* f0cee10: 44817000 */ mtc1 $at,$f14 @@ -2087,18 +2087,18 @@ glabel var7f1ada2c /* f0ceec0: 00000000 */ nop ); -void func0f0ceec4(void) +void bgrabTick(void) { s32 i; struct defaultobj *obj; struct hov *hov; - currentPlayerUpdatePrevPosGrab(); - func0f0cdef0(); - func0f0cbf50(); - func0f0ce924(); - func0f0ce178(); - func0f0ce1ac(); + bgrabUpdatePrevPos(); + bgrab0f0cdef0(); + bmoveUpdateVerta(); + bgrab0f0ce924(); + bgrab0f0ce178(); + bgrabUpdateVertical(); for (i = 0; g_Vars.currentplayer->prop->rooms[i] != -1; i++) { if (g_Vars.currentplayer->prop->rooms[i] == g_Vars.currentplayer->floorroom) { @@ -2124,9 +2124,9 @@ void func0f0ceec4(void) func0f0714b8(obj, hov); } - func0f0cb8c4(g_Vars.currentplayer); + bmove0f0cb8c4(g_Vars.currentplayer); objectiveCheckRoomEntered(g_Vars.currentplayer->prop->rooms[0]); - func0f0cc19c(&g_Vars.currentplayer->prop->pos); + bmove0f0cc19c(&g_Vars.currentplayer->prop->pos); currentPlayerUpdatePerimInfo(); func0f08c190(); @@ -2146,7 +2146,7 @@ void func0f0ceec4(void) || g_Vars.currentplayer->vv_ground < g_Vars.currentplayer->vv_manground - 50 || !hasLineOfSight(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &g_Vars.currentplayer->grabbedprop->pos, g_Vars.currentplayer->grabbedprop->rooms, CDTYPE_ALL, 12)) { - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); } propSetCollisionsEnabled(g_Vars.currentplayer->prop, true); diff --git a/src/game/bondhead.c b/src/game/bondhead.c index 6f12ea264..f338a647c 100644 --- a/src/game/bondhead.c +++ b/src/game/bondhead.c @@ -24,12 +24,12 @@ struct var80075c00 var80075c00[] = { struct coord var80075c30 = {0, 0, 0}; -void currentPlayerFlipAnimation(void) +void bheadFlipAnimation(void) { g_Vars.currentplayer->model.anim->flip = !g_Vars.currentplayer->model.anim->flip; } -void currentPlayerUpdateIdleHeadRoll(void) +void bheadUpdateIdleRoll(void) { f32 mult = 1.0f / U32_MAX; @@ -49,7 +49,7 @@ void currentPlayerUpdateIdleHeadRoll(void) g_Vars.currentplayer->standcnt = 1 - g_Vars.currentplayer->standcnt; } -void currentPlayerUpdateHeadPos(struct coord *vel) +void bheadUpdatePos(struct coord *vel) { s32 i; @@ -72,7 +72,7 @@ void currentPlayerUpdateHeadPos(struct coord *vel) g_Vars.currentplayer->headpos.z = g_Vars.currentplayer->headpossum.z * 0.018000006f; } -void currentPlayerUpdateHeadRot(struct coord *lookvel, struct coord *upvel) +void bheadUpdateRot(struct coord *lookvel, struct coord *upvel) { s32 i; @@ -104,7 +104,7 @@ void currentPlayerUpdateHeadRot(struct coord *lookvel, struct coord *upvel) g_Vars.currentplayer->headup.z = g_Vars.currentplayer->headupsum.z * (1.0f - g_Vars.currentplayer->headdamp); } -void currentPlayerSetHeadDamp(f32 headdamp) +void bheadSetdamp(f32 headdamp) { if (headdamp != g_Vars.currentplayer->headdamp) { f32 divisor = 1.0f - headdamp; @@ -118,7 +118,7 @@ void currentPlayerSetHeadDamp(f32 headdamp) } } -void currentPlayerUpdateHead(f32 arg0, f32 arg1) +void bheadUpdate(f32 arg0, f32 arg1) { struct coord headpos = var80075c30; struct coord lookvel = {0, 0, 1}; @@ -205,9 +205,9 @@ void currentPlayerUpdateHead(f32 arg0, f32 arg1) g_Vars.currentplayer->headwalkingtime60 += g_Vars.lvupdate240_60; if (g_Vars.currentplayer->headwalkingtime60 > 60) { - currentPlayerSetHeadDamp(0.982f); + bheadSetdamp(0.982f); } else { - currentPlayerSetHeadDamp(0.99748998880386f); + bheadSetdamp(0.99748998880386f); } } else { lookvel.x = g_Vars.currentplayer->unk0510.m[2][0]; @@ -218,7 +218,7 @@ void currentPlayerUpdateHead(f32 arg0, f32 arg1) upvel.y = g_Vars.currentplayer->unk0510.m[1][1]; upvel.z = g_Vars.currentplayer->unk0510.m[1][2]; - currentPlayerSetHeadDamp(0.96f); + bheadSetdamp(0.96f); } } else { g_Vars.currentplayer->headbodyoffset.x = g_Vars.currentplayer->standbodyoffset.x; @@ -230,15 +230,15 @@ void currentPlayerUpdateHead(f32 arg0, f32 arg1) headpos.z = 0; g_Vars.currentplayer->headwalkingtime60 = 0; - currentPlayerSetHeadDamp(0.99748998880386f); + bheadSetdamp(0.99748998880386f); - if (currentPlayerGetCrouchPos() != CROUCH_SQUAT) { + if (bmoveGetCrouchPos() != CROUCHPOS_SQUAT) { g_Vars.currentplayer->standfrac += (0.0083333337679505f + 0.025000002235174f * g_Vars.currentplayer->bondbreathing) * g_Vars.lvupdate240freal; if (g_Vars.currentplayer->standfrac >= 1) { - currentPlayerUpdateIdleHeadRoll(); + bheadUpdateIdleRoll(); g_Vars.currentplayer->standfrac -= 1; } @@ -260,11 +260,11 @@ void currentPlayerUpdateHead(f32 arg0, f32 arg1) } } - currentPlayerUpdateHeadPos(&headpos); - currentPlayerUpdateHeadRot(&lookvel, &upvel); + bheadUpdatePos(&headpos); + bheadUpdateRot(&lookvel, &upvel); } -void currentPlayerAdjustHeadAnimation(f32 speed) +void bheadAdjustAnimation(f32 speed) { struct chrdata *chr = g_Vars.currentplayer->prop->chr; s32 i; @@ -289,7 +289,7 @@ void currentPlayerAdjustHeadAnimation(f32 speed) modelSetAnimLooping(&g_Vars.currentplayer->model, var80075c00[i].loopframe, false); modelSetAnimEndFrame(&g_Vars.currentplayer->model, var80075c00[i].endframe); - modelSetAnimFlipFunction(&g_Vars.currentplayer->model, currentPlayerFlipAnimation); + modelSetAnimFlipFunction(&g_Vars.currentplayer->model, bheadFlipAnimation); g_Vars.currentplayer->headanim = i; } @@ -303,18 +303,18 @@ void currentPlayerAdjustHeadAnimation(f32 speed) chr->oldframe = g_Vars.currentplayer->model.anim->frame; } -void currentPlayerStartDeathAnimation(s16 animnum, u32 flip, f32 fstarttime, f32 speed) +void bheadStartDeathAnimation(s16 animnum, u32 flip, f32 fstarttime, f32 speed) { modelSetAnimation(&g_Vars.currentplayer->model, animnum, flip, fstarttime, speed * 0.5f, 12); g_Vars.currentplayer->headanim = -1; } -void currentPlayerSetAnimSpeed(f32 speed) +void bheadSetSpeed(f32 speed) { modelSetAnimSpeed(&g_Vars.currentplayer->model, speed * 0.5f, 0); } -f32 func0f11416c(void) +f32 bheadGetBreathingValue(void) { if (g_Vars.currentplayer->headanim >= 0) { f32 a = g_Vars.currentplayer->bondbreathing * 0.012500001f + 0.004166667f; diff --git a/src/game/bondmove.c b/src/game/bondmove.c index ed22aed58..4f582745c 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -44,27 +44,27 @@ const char var7f1ad860[] = "bondmove.c"; -void currentPlayerSetControlDef(u32 controldef) +void bmoveSetControlDef(u32 controldef) { g_Vars.currentplayer->controldef = controldef; } -void currentPlayerSetAutoMoveCentreEnabled(bool enabled) +void bmoveSetAutoMoveCentreEnabled(bool enabled) { g_Vars.currentplayer->automovecentreenabled = enabled; } -bool currentPlayerIsAutoMoveCentreEnabled(void) +bool bmoveIsAutoMoveCentreEnabled(void) { return g_Vars.currentplayer->automovecentreenabled; } -void currentPlayerSetAutoAimY(bool enabled) +void bmoveSetAutoAimY(bool enabled) { g_Vars.currentplayer->autoyaimenabled = enabled; } -bool currentPlayerIsAutoAimYEnabled(void) +bool bmoveIsAutoAimYEnabled(void) { if (!g_Vars.normmplayerisrunning) { return g_Vars.currentplayer->autoyaimenabled; @@ -77,7 +77,7 @@ bool currentPlayerIsAutoAimYEnabled(void) return optionsGetAutoAim(g_Vars.currentplayerstats->mpindex); } -bool func0f0c7a8c(void) +bool bmoveIsAutoAimYEnabledForCurrentWeapon(void) { struct weaponfunc *func = currentPlayerGetWeaponFunction(0); @@ -91,15 +91,15 @@ bool func0f0c7a8c(void) } } - return currentPlayerIsAutoAimYEnabled(); + return bmoveIsAutoAimYEnabled(); } -bool currentPlayerIsInSightAimMode(void) +bool bmoveIsInSightAimMode(void) { return g_Vars.currentplayer->insightaimmode; } -void currentPlayerUpdateAutoAimYProp(struct prop *prop, f32 autoaimy) +void bmoveUpdateAutoAimYProp(struct prop *prop, f32 autoaimy) { if (g_Vars.currentplayer->autoyaimtime60 >= 0) { g_Vars.currentplayer->autoyaimtime60 -= g_Vars.lvupdate240_60; @@ -117,12 +117,12 @@ void currentPlayerUpdateAutoAimYProp(struct prop *prop, f32 autoaimy) g_Vars.currentplayer->autoaimy = autoaimy; } -void currentPlayerSetAutoAimX(bool enabled) +void bmoveSetAutoAimX(bool enabled) { g_Vars.currentplayer->autoxaimenabled = enabled; } -bool currentPlayerIsAutoAimXEnabled(void) +bool bmoveIsAutoAimXEnabled(void) { if (!g_Vars.normmplayerisrunning) { return g_Vars.currentplayer->autoxaimenabled; @@ -135,7 +135,7 @@ bool currentPlayerIsAutoAimXEnabled(void) return optionsGetAutoAim(g_Vars.currentplayerstats->mpindex); } -bool func0f0c7bd0(void) +bool bmoveIsAutoAimXEnabledForCurrentWeapon(void) { struct weaponfunc *func = currentPlayerGetWeaponFunction(0); @@ -149,10 +149,10 @@ bool func0f0c7bd0(void) } } - return currentPlayerIsAutoAimXEnabled(); + return bmoveIsAutoAimXEnabled(); } -void currentPlayerUpdateAutoAimXProp(struct prop *prop, f32 autoaimx) +void bmoveUpdateAutoAimXProp(struct prop *prop, f32 autoaimx) { if (g_Vars.currentplayer->autoxaimtime60 >= 0) { g_Vars.currentplayer->autoxaimtime60 -= g_Vars.lvupdate240_60; @@ -170,7 +170,7 @@ void currentPlayerUpdateAutoAimXProp(struct prop *prop, f32 autoaimx) g_Vars.currentplayer->autoaimx = autoaimx; } -struct prop *currentPlayerGetHoverbike(void) +struct prop *bmoveGetHoverbike(void) { if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { return g_Vars.currentplayer->hoverbike; @@ -179,7 +179,7 @@ struct prop *currentPlayerGetHoverbike(void) return NULL; } -struct prop *currentPlayerGetGrabbedProp(void) +struct prop *bmoveGetGrabbedProp(void) { if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { return g_Vars.currentplayer->grabbedprop; @@ -188,82 +188,82 @@ struct prop *currentPlayerGetGrabbedProp(void) return NULL; } -void currentPlayerGrabProp(struct prop *prop) +void bmoveGrabProp(struct prop *prop) { struct defaultobj *obj = prop->obj; if ((obj->hidden & OBJHFLAG_04000000) == 0 && (obj->hidden & OBJHFLAG_GRABBED) == 0) { g_Vars.currentplayer->grabbedprop = prop; - currentPlayerGrabInit(); + bgrabInit(); } } -void currentPlayerSetMoveMode(u32 movemode) +void bmoveSetMode(u32 movemode) { if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { - currentPlayerUpdateGrabbedPropForRelease(); + bgrabExit(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { - func0f0d2184(); + bbikeExit(); } if (movemode == MOVEMODE_BIKE) { - currentPlayerBikeInit(); + bbikeInit(); } else if (movemode == MOVEMODE_GRAB) { - currentPlayerGrabInit(); + bgrabInit(); } else if (movemode == MOVEMODE_CUTSCENE) { - currentPlayerSetMoveModeCutscene(); + bcutsceneInit(); } else if (movemode == MOVEMODE_WALK) { - currentPlayerWalkInit(); + bwalkInit(); } } -void setMoveModeForAllPlayers(u32 movemode) +void bmoveSetModeForAllPlayers(u32 movemode) { u32 prevplayernum = g_Vars.currentplayernum; s32 i; for (i = 0; i < PLAYERCOUNT(); i++) { setCurrentPlayerNum(i); - currentPlayerSetMoveMode(movemode); + bmoveSetMode(movemode); } setCurrentPlayerNum(prevplayernum); } -void func0f0c7f2c(void) +void bmoveHandleActivate(void) { if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { - currentPlayerDismountBike(); + bbikeHandleActivate(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { - func0f0ce450(); + bgrabHandleActivate(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { - func0f0c65a8(); + bwalkHandleActivate(); } } -void currentPlayerUpdateSpeed(struct movedata *data) +void bmoveApplyMoveData(struct movedata *data) { if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { - currentPlayerUpdateSpeedBike(data); + bbikeApplyMoveData(data); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { - currentPlayerUpdateSpeedGrab(data); + bgrabApplyMoveData(data); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { - currentPlayerUpdateSpeedWalk(data); + bwalkApplyMoveData(data); } } -void func0f0c8004(void) +void bmoveUpdateSpeedTheta(void) { if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { // empty } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { - currentPlayerUpdateSpeedThetaGrab(); + bgrabUpdateSpeedTheta(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { - currentPlayerApplyCrouchSpeedTheta(); + bwalkUpdateSpeedTheta(); } } -f32 func0f0c805c(f32 value) +f32 bmoveGetSpeedVertaLimit(f32 value) { if (value > 0) { return (viGetFovY() * value * -0.7f) / 60.0f; @@ -276,10 +276,10 @@ f32 func0f0c805c(f32 value) return 0; } -void currentPlayerUpdateSpeedVerta(f32 value) +void bmoveUpdateSpeedVerta(f32 value) { f32 mult = viGetFovY() / 60.0f; - f32 limit = func0f0c805c(value); + f32 limit = bmoveGetSpeedVertaLimit(value); if (value > 0) { if (g_Vars.currentplayer->speedverta > 0) { @@ -318,7 +318,7 @@ void currentPlayerUpdateSpeedVerta(f32 value) } } -f32 func0f0c82f8(f32 value) +f32 bmoveGetSpeedThetaControlLimit(f32 value) { if (value > 0) { return (viGetFovY() * value * -0.7f) / 60.0f; @@ -331,10 +331,10 @@ f32 func0f0c82f8(f32 value) return 0; } -void currentPlayerUpdateSpeedThetaControl(f32 value) +void bmoveUpdateSpeedThetaControl(f32 value) { f32 mult = viGetFovY() / 60.0f; - f32 limit = func0f0c82f8(value); + f32 limit = bmoveGetSpeedThetaControlLimit(value); if (value > 0) { if (g_Vars.currentplayer->speedthetacontrol > 0) { @@ -374,7 +374,7 @@ void currentPlayerUpdateSpeedThetaControl(f32 value) } GLOBAL_ASM( -glabel func0f0c8598 +glabel bmove0f0c8598 .late_rodata glabel var7f1ad8ac .word 0x3e4ccccd @@ -729,7 +729,7 @@ glabel var7f1ad8b4 /* f0c8aa4: 27bd0168 */ addiu $sp,$sp,0x168 ); -void movedataReset(struct movedata *data) +void bmoveResetMoveData(struct movedata *data) { data->canswivelgun = 0; data->canmanualaim = 0; @@ -777,7 +777,7 @@ void movedataReset(struct movedata *data) } GLOBAL_ASM( -glabel func0f0c8b90 +glabel bmoveProcessInput .late_rodata glabel var7f1ad8b8 .word 0x3c23d70a @@ -917,7 +917,7 @@ glabel var7f1ad8e4 /* f0c8d24: 0c005207 */ jal contGetNumSamples /* f0c8d28: 00000000 */ nop /* f0c8d2c: 0040b025 */ or $s6,$v0,$zero -/* f0c8d30: 0fc322aa */ jal movedataReset +/* f0c8d30: 0fc322aa */ jal bmoveResetMoveData /* f0c8d34: 27a401b4 */ addiu $a0,$sp,0x1b4 /* f0c8d38: 2a81fffb */ slti $at,$s4,-5 /* f0c8d3c: 10200003 */ beqz $at,.L0f0c8d4c @@ -1804,7 +1804,7 @@ glabel var7f1ad8e4 /* f0c999c: 5616ffab */ bnel $s0,$s6,.L0f0c984c /* f0c99a0: 8fab01a8 */ lw $t3,0x1a8($sp) .L0f0c99a4: -/* f0c99a4: 0fc331a0 */ jal currentPlayerGetCrouchPos +/* f0c99a4: 0fc331a0 */ jal bmoveGetCrouchPos /* f0c99a8: 00000000 */ nop /* f0c99ac: 1440001d */ bnez $v0,.L0f0c9a24 /* f0c99b0: 00000000 */ nop @@ -2712,7 +2712,7 @@ glabel var7f1ad8e4 /* f0ca668: 5616ffb3 */ bnel $s0,$s6,.L0f0ca538 /* f0ca66c: 8fae01a8 */ lw $t6,0x1a8($sp) .L0f0ca670: -/* f0ca670: 0fc331a0 */ jal currentPlayerGetCrouchPos +/* f0ca670: 0fc331a0 */ jal bmoveGetCrouchPos /* f0ca674: 00000000 */ nop /* f0ca678: 1440001e */ bnez $v0,.L0f0ca6f4 /* f0ca67c: 00000000 */ nop @@ -2895,7 +2895,7 @@ glabel var7f1ad8e4 /* f0ca8f4: ad4901a0 */ sw $t1,0x1a0($t2) /* f0ca8f8: 8e4c0284 */ lw $t4,0x284($s2) /* f0ca8fc: 8fab01c0 */ lw $t3,0x1c0($sp) -/* f0ca900: 0fc31fcb */ jal func0f0c7f2c +/* f0ca900: 0fc31fcb */ jal bmoveHandleActivate /* f0ca904: ad8b00d0 */ sw $t3,0xd0($t4) /* f0ca908: 8fad0238 */ lw $t5,0x238($sp) .L0f0ca90c: @@ -3181,7 +3181,7 @@ glabel var7f1ad8e4 /* f0cad20: 0fc2eab0 */ jal currentPlayerUpdateZoom /* f0cad24: 00000000 */ nop .L0f0cad28: -/* f0cad28: 0fc31fe6 */ jal currentPlayerUpdateSpeed +/* f0cad28: 0fc31fe6 */ jal bmoveApplyMoveData /* f0cad2c: 27a401b4 */ addiu $a0,$sp,0x1b4 /* f0cad30: 8e450284 */ lw $a1,0x284($s2) /* f0cad34: 8ca90178 */ lw $t1,0x178($a1) @@ -3268,7 +3268,7 @@ glabel var7f1ad8e4 /* f0cae60: 304f0003 */ andi $t7,$v0,0x3 /* f0cae64: 55cf0008 */ bnel $t6,$t7,.L0f0cae88 /* f0cae68: c4ae1be0 */ lwc1 $f14,0x1be0($a1) -/* f0cae6c: 0fc32166 */ jal func0f0c8598 +/* f0cae6c: 0fc32166 */ jal bmove0f0c8598 /* f0cae70: afa40064 */ sw $a0,0x64($sp) /* f0cae74: 8e580284 */ lw $t8,0x284($s2) /* f0cae78: 8fa40064 */ lw $a0,0x64($sp) @@ -3431,7 +3431,7 @@ glabel var7f1ad8e4 /* f0cb0a8: 45020007 */ bc1fl .L0f0cb0c8 /* f0cb0ac: 460c7401 */ sub.s $f16,$f14,$f12 /* f0cb0b0: 44816000 */ mtc1 $at,$f12 -/* f0cb0b4: 0fc3203e */ jal currentPlayerUpdateSpeedVerta +/* f0cb0b4: 0fc3203e */ jal bmoveUpdateSpeedVerta /* f0cb0b8: e7ae0094 */ swc1 $f14,0x94($sp) /* f0cb0bc: 10000010 */ b .L0f0cb100 /* f0cb0c0: c7ae0094 */ lwc1 $f14,0x94($sp) @@ -3443,13 +3443,13 @@ glabel var7f1ad8e4 /* f0cb0d4: 45020007 */ bc1fl .L0f0cb0f4 /* f0cb0d8: 44806000 */ mtc1 $zero,$f12 /* f0cb0dc: 44816000 */ mtc1 $at,$f12 -/* f0cb0e0: 0fc3203e */ jal currentPlayerUpdateSpeedVerta +/* f0cb0e0: 0fc3203e */ jal bmoveUpdateSpeedVerta /* f0cb0e4: e7ae0094 */ swc1 $f14,0x94($sp) /* f0cb0e8: 10000005 */ b .L0f0cb100 /* f0cb0ec: c7ae0094 */ lwc1 $f14,0x94($sp) /* f0cb0f0: 44806000 */ mtc1 $zero,$f12 .L0f0cb0f4: -/* f0cb0f4: 0fc3203e */ jal currentPlayerUpdateSpeedVerta +/* f0cb0f4: 0fc3203e */ jal bmoveUpdateSpeedVerta /* f0cb0f8: e7ae0094 */ swc1 $f14,0x94($sp) /* f0cb0fc: c7ae0094 */ lwc1 $f14,0x94($sp) .L0f0cb100: @@ -3552,7 +3552,7 @@ glabel var7f1ad8e4 /* f0cb25c: 00000000 */ nop /* f0cb260: 45020010 */ bc1fl .L0f0cb2a4 /* f0cb264: 44804000 */ mtc1 $zero,$f8 -/* f0cb268: 0fc3203e */ jal currentPlayerUpdateSpeedVerta +/* f0cb268: 0fc3203e */ jal bmoveUpdateSpeedVerta /* f0cb26c: 46003306 */ mov.s $f12,$f6 /* f0cb270: 8fac01c4 */ lw $t4,0x1c4($sp) /* f0cb274: 8fad025c */ lw $t5,0x25c($sp) @@ -3574,7 +3574,7 @@ glabel var7f1ad8e4 /* f0cb2ac: 00000000 */ nop /* f0cb2b0: 45020010 */ bc1fl .L0f0cb2f4 /* f0cb2b4: 44806000 */ mtc1 $zero,$f12 -/* f0cb2b8: 0fc3203e */ jal currentPlayerUpdateSpeedVerta +/* f0cb2b8: 0fc3203e */ jal bmoveUpdateSpeedVerta /* f0cb2bc: 46008307 */ neg.s $f12,$f16 /* f0cb2c0: 8fb801c4 */ lw $t8,0x1c4($sp) /* f0cb2c4: 8fb9025c */ lw $t9,0x25c($sp) @@ -3591,7 +3591,7 @@ glabel var7f1ad8e4 /* f0cb2ec: ad28010c */ sw $t0,0x10c($t1) /* f0cb2f0: 44806000 */ mtc1 $zero,$f12 .L0f0cb2f4: -/* f0cb2f4: 0fc3203e */ jal currentPlayerUpdateSpeedVerta +/* f0cb2f4: 0fc3203e */ jal bmoveUpdateSpeedVerta /* f0cb2f8: 00000000 */ nop .L0f0cb2fc: /* f0cb2fc: 8e450284 */ lw $a1,0x284($s2) @@ -3666,7 +3666,7 @@ glabel var7f1ad8e4 /* f0cb3f0: 00000000 */ nop /* f0cb3f4: 45020006 */ bc1fl .L0f0cb410 /* f0cb3f8: 44809000 */ mtc1 $zero,$f18 -/* f0cb3fc: 0fc320e5 */ jal currentPlayerUpdateSpeedThetaControl +/* f0cb3fc: 0fc320e5 */ jal bmoveUpdateSpeedThetaControl /* f0cb400: e7ac01f4 */ swc1 $f12,0x1f4($sp) /* f0cb404: 10000010 */ b .L0f0cb448 /* f0cb408: 8e450284 */ lw $a1,0x284($s2) @@ -3678,19 +3678,19 @@ glabel var7f1ad8e4 /* f0cb41c: 45020007 */ bc1fl .L0f0cb43c /* f0cb420: 44806000 */ mtc1 $zero,$f12 /* f0cb424: 46000307 */ neg.s $f12,$f0 -/* f0cb428: 0fc320e5 */ jal currentPlayerUpdateSpeedThetaControl +/* f0cb428: 0fc320e5 */ jal bmoveUpdateSpeedThetaControl /* f0cb42c: e7a001f8 */ swc1 $f0,0x1f8($sp) /* f0cb430: 10000005 */ b .L0f0cb448 /* f0cb434: 8e450284 */ lw $a1,0x284($s2) /* f0cb438: 44806000 */ mtc1 $zero,$f12 .L0f0cb43c: -/* f0cb43c: 0fc320e5 */ jal currentPlayerUpdateSpeedThetaControl +/* f0cb43c: 0fc320e5 */ jal bmoveUpdateSpeedThetaControl /* f0cb440: 00000000 */ nop .L0f0cb444: /* f0cb444: 8e450284 */ lw $a1,0x284($s2) .L0f0cb448: /* f0cb448: c4a41b9c */ lwc1 $f4,0x1b9c($a1) -/* f0cb44c: 0fc32001 */ jal func0f0c8004 +/* f0cb44c: 0fc32001 */ jal bmoveUpdateSpeedTheta /* f0cb450: e4a40148 */ swc1 $f4,0x148($a1) /* f0cb454: 8fad0228 */ lw $t5,0x228($sp) /* f0cb458: 51a00008 */ beqzl $t5,.L0f0cb47c @@ -3761,11 +3761,11 @@ glabel var7f1ad8e4 /* f0cb538: 8faa022c */ lw $t2,0x22c($sp) /* f0cb53c: 11400015 */ beqz $t2,.L0f0cb594 /* f0cb540: 00000000 */ nop -/* f0cb544: 0fc31ef4 */ jal func0f0c7bd0 +/* f0cb544: 0fc31ef4 */ jal bmoveIsAutoAimXEnabledForCurrentWeapon /* f0cb548: 00000000 */ nop /* f0cb54c: 54400006 */ bnezl $v0,.L0f0cb568 /* f0cb550: 8e450284 */ lw $a1,0x284($s2) -/* f0cb554: 0fc31ea3 */ jal func0f0c7a8c +/* f0cb554: 0fc31ea3 */ jal bmoveIsAutoAimYEnabledForCurrentWeapon /* f0cb558: 00000000 */ nop /* f0cb55c: 1040000d */ beqz $v0,.L0f0cb594 /* f0cb560: 00000000 */ nop @@ -3944,7 +3944,7 @@ glabel var7f1ad8e4 * - lookahead is applying when it shouldn't (eg. 1.2) and looks at the floor * - Farsight seek doesn't work */ -//void func0f0c8b90(s32 arg0, s32 arg1, s32 arg2, s32 arg3) +//void bmoveProcessInput(s32 arg0, s32 arg1, s32 arg2, s32 arg3) //{ // struct movedata movedata; // 1b4 - 260 // s32 controlmode; // 1b0 @@ -4020,7 +4020,7 @@ glabel var7f1ad8e4 // } // // numsamples = contGetNumSamples(); -// movedataReset(&movedata); +// bmoveResetMoveData(&movedata); // // // 8d3c // if (c1stickx < -5) { @@ -4410,7 +4410,7 @@ glabel var7f1ad8e4 // } // // // 99a4 -// if (currentPlayerGetCrouchPos() == CROUCH_SQUAT +// if (bmoveGetCrouchPos() == CROUCHPOS_SQUAT // && g_Vars.currentplayer->crouchoffset == -90 // && g_Vars.mplayerisrunning // && g_Vars.coopplayernum < 0) { @@ -4790,7 +4790,7 @@ glabel var7f1ad8e4 // // // a670 // // Handle shutting eyes in multiplayer -// if (currentPlayerGetCrouchPos() == CROUCH_SQUAT +// if (bmoveGetCrouchPos() == CROUCHPOS_SQUAT // && g_Vars.currentplayer->crouchoffset == -90 // && g_Vars.mplayerisrunning // && g_Vars.coopplayernum <= -1) { @@ -4855,7 +4855,7 @@ glabel var7f1ad8e4 // g_Vars.currentplayer->activatetimethis = g_Vars.lvframe60; // g_Vars.currentplayer->bondactivateorreload = movedata.btapcount; // -// func0f0c7f2c(); +// bmoveHandleActivate(); // } // // if (!movedata.invertpitch) { @@ -4952,7 +4952,7 @@ glabel var7f1ad8e4 // } // // // ad28 -// currentPlayerUpdateSpeed(&movedata); +// bmoveApplyMoveData(&movedata); // // // Speed boost // // After 3 seconds of holding forward at max speed, apply boost multiplier. @@ -4987,7 +4987,7 @@ glabel var7f1ad8e4 // if (g_Vars.currentplayer->lookaheadcentreenabled) { // if (g_Vars.lvframenum != g_Vars.currentplayer->lookaheadframe // && g_Vars.currentplayernum == (g_Vars.lvframenum % 4)) { -// g_Vars.currentplayer->cachedlookahead = func0f0c8598(); +// g_Vars.currentplayer->cachedlookahead = bmove0f0c8598(); // } // // lookahead = g_Vars.currentplayer->cachedlookahead; @@ -5047,11 +5047,11 @@ glabel var7f1ad8e4 // // // b0a8 // if (g_Vars.currentplayer->vv_verta > lookahead + increment) { -// currentPlayerUpdateSpeedVerta(1); +// bmoveUpdateSpeedVerta(1); // } else if (g_Vars.currentplayer->vv_verta < lookahead - increment) { -// currentPlayerUpdateSpeedVerta(-1); +// bmoveUpdateSpeedVerta(-1); // } else { -// currentPlayerUpdateSpeedVerta(0); +// bmoveUpdateSpeedVerta(0); // } // // // b100 @@ -5088,19 +5088,19 @@ glabel var7f1ad8e4 // // g_Vars.currentplayer->speedverta = -(fVar25 * fVar26) * (viGetFovY() / 60.0f); // } else if (movedata.speedvertadown > 0) { -// currentPlayerUpdateSpeedVerta(movedata.speedvertadown); +// bmoveUpdateSpeedVerta(movedata.speedvertadown); // // if (movedata.canlookahead && (movedata.analogwalk > 60 || movedata.analogwalk < -60)) { // g_Vars.currentplayer->movecentrerelease = true; // } // } else if (movedata.speedvertaup > 0) { -// currentPlayerUpdateSpeedVerta(-movedata.speedvertaup); +// bmoveUpdateSpeedVerta(-movedata.speedvertaup); // // if (movedata.canlookahead && (movedata.analogwalk > 60 || movedata.analogwalk < -60)) { // g_Vars.currentplayer->movecentrerelease = true; // } // } else { -// currentPlayerUpdateSpeedVerta(0); +// bmoveUpdateSpeedVerta(0); // } // // g_Vars.currentplayer->vv_verta += @@ -5122,16 +5122,16 @@ glabel var7f1ad8e4 // // g_Vars.currentplayer->speedthetacontrol = fVar25 * fVar26 * (viGetFovY() / 60.0f); // } else if (movedata.aimturnleftspeed > 0) { -// currentPlayerUpdateSpeedThetaControl(movedata.aimturnleftspeed); +// bmoveUpdateSpeedThetaControl(movedata.aimturnleftspeed); // } else if (movedata.aimturnrightspeed > 0) { -// currentPlayerUpdateSpeedThetaControl(-movedata.aimturnrightspeed); +// bmoveUpdateSpeedThetaControl(-movedata.aimturnrightspeed); // } else { -// currentPlayerUpdateSpeedThetaControl(0); +// bmoveUpdateSpeedThetaControl(0); // } // // // b444 // g_Vars.currentplayer->speedtheta = g_Vars.currentplayer->speedthetacontrol; -// func0f0c8004(); +// bmoveUpdateSpeedTheta(); // // if (movedata.detonating) { // g_Vars.currentplayer->hands[HAND_RIGHT].unk0658 = 0; @@ -5171,7 +5171,7 @@ glabel var7f1ad8e4 // if ( // ( // movedata.canautoaim -// && (func0f0c7bd0() || func0f0c7a8c()) +// && (bmoveIsAutoAimXEnabledForCurrentWeapon() || bmoveIsAutoAimYEnabledForCurrentWeapon()) // && g_Vars.currentplayer->autoxaimprop // && g_Vars.currentplayer->autoyaimprop // && weaponHasInvEFlag(weaponnum, 0x00000002) @@ -5226,7 +5226,7 @@ glabel var7f1ad8e4 // } //} -void func0f0cb79c(struct player *player, struct coord *mid, s16 *rooms) +void bmove0f0cb79c(struct player *player, struct coord *mid, s16 *rooms) { struct coord lower; struct coord upper; @@ -5244,19 +5244,19 @@ void func0f0cb79c(struct player *player, struct coord *mid, s16 *rooms) func0f1650d0(&lower, &upper, rooms, 7, 0); } -void func0f0cb89c(struct player *player, s16 *rooms) +void bmove0f0cb89c(struct player *player, s16 *rooms) { - func0f0cb79c(player, &player->prop->pos, rooms); + bmove0f0cb79c(player, &player->prop->pos, rooms); } -void func0f0cb8c4(struct player *player) +void bmove0f0cb8c4(struct player *player) { func0f065c44(player->prop); - func0f0cb89c(player, player->prop->rooms); + bmove0f0cb89c(player, player->prop->rooms); func0f065cb0(player->prop); } -void func0f0cb904(struct coord *arg0) +void bmove0f0cb904(struct coord *arg0) { if (arg0->f[0] || arg0->f[2]) { f32 hypotenuse = sqrtf(arg0->f[0] * arg0->f[0] + arg0->f[2] * arg0->f[2]); @@ -5292,10 +5292,10 @@ void func0f0cb904(struct coord *arg0) } } -void func0f0cba88(f32 *a, f32 *b, struct coord *c, f32 mult1, f32 mult2) +void bmove0f0cba88(f32 *a, f32 *b, struct coord *c, f32 mult1, f32 mult2) { if (c->x != 0 || c->z != 0) { - func0f0cb904(c); + bmove0f0cb904(c); *a = c->z * mult2 + -c->x * mult1; *b = -c->x * mult2 - c->z * mult1; } else { @@ -5304,7 +5304,7 @@ void func0f0cba88(f32 *a, f32 *b, struct coord *c, f32 mult1, f32 mult2) } } -void currentPlayerUpdateMoveInitSpeed(struct coord *newpos) +void bmoveUpdateMoveInitSpeed(struct coord *newpos) { if (g_Vars.currentplayer->moveinitspeed.x != 0) { if (g_Vars.currentplayer->moveinitspeed.x < 0.001f && g_Vars.currentplayer->moveinitspeed.x > -0.001f) { @@ -5325,7 +5325,7 @@ void currentPlayerUpdateMoveInitSpeed(struct coord *newpos) } } -void currentPlayerUpdateFootsteps(bool arg0, bool arg1, bool arg2, bool arg3) +void bmoveTick(bool arg0, bool arg1, bool arg2, bool arg3) { struct chrdata *chr; u8 foot; @@ -5335,18 +5335,19 @@ void currentPlayerUpdateFootsteps(bool arg0, bool arg1, bool arg2, bool arg3) f32 zdiff; f32 distance; - func0f0c8b90(arg0, arg1, arg2, arg3); + bmoveProcessInput(arg0, arg1, arg2, arg3); if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { - func0f0d3d50(); + bbikeTick(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) { - func0f0ceec4(); + bgrabTick(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_CUTSCENE) { - func0f0c37c0(); + bcutsceneTick(); } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { - func0f0c785c(); + bwalkTick(); } + // Update footstep sounds if ((g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK || g_Vars.currentplayer->bondmovemode == MOVEMODE_GRAB) && (g_Vars.currentplayer->speedforwards || g_Vars.currentplayer->speedsideways) && (!g_Vars.normmplayerisrunning || PLAYERCOUNT() == 1)) { @@ -5389,7 +5390,7 @@ void currentPlayerUpdateFootsteps(bool arg0, bool arg1, bool arg2, bool arg3) } } -void func0f0cbf50(void) +void bmoveUpdateVerta(void) { while (g_Vars.currentplayer->vv_verta < -180) { g_Vars.currentplayer->vv_verta += 360; @@ -5430,7 +5431,7 @@ void func0f0cbf50(void) } } -void func0f0cc19c(struct coord *arg) +void bmove0f0cc19c(struct coord *arg) { f32 min; f32 mult; @@ -5475,7 +5476,7 @@ void func0f0cc19c(struct coord *arg) } } -void func0f0cc3b8(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4) +void bmoveUpdateHead(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4) { f32 sp244 = 0; Mtxf sp180; @@ -5485,7 +5486,7 @@ void func0f0cc3b8(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4) f32 sp68[4]; if (g_Vars.currentplayer->isdead == false) { - currentPlayerAdjustHeadAnimation(arg0); + bheadAdjustAnimation(arg0); if (arg0 != 0) { sp244 = arg1 / arg0; @@ -5494,15 +5495,15 @@ void func0f0cc3b8(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4) } } else { if (g_Vars.currentplayer->startnewbonddie) { - currentPlayerStartDeathAnimation(g_DeathAnimations[random() % g_NumDeathAnimations], random() % 2, 0, 1); + bheadStartDeathAnimation(g_DeathAnimations[random() % g_NumDeathAnimations], random() % 2, 0, 1); g_Vars.currentplayer->startnewbonddie = false; } - currentPlayerSetAnimSpeed(0.5); + bheadSetSpeed(0.5); arg2 = 0; } - currentPlayerUpdateHead(sp244, arg2); + bheadUpdate(sp244, arg2); func000162e8(BADDEG2RAD(360 - g_Vars.currentplayer->vv_verta360), &sp180); if (optionsGetHeadRoll(g_Vars.currentplayerstats->mpindex)) { @@ -5532,19 +5533,19 @@ void func0f0cc3b8(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4) g_Vars.currentplayer->bond2.unk28.z = sp180.m[1][2]; } -void func0f0cc654(f32 arg0, f32 arg1, f32 arg2) +void bmove0f0cc654(f32 arg0, f32 arg1, f32 arg2) { - func0f0cc3b8(arg0, arg1, arg2, NULL, 0); + bmoveUpdateHead(arg0, arg1, arg2, NULL, 0); } -s32 currentPlayerGetCrouchPos(void) +s32 bmoveGetCrouchPos(void) { return (g_Vars.currentplayer->crouchpos < g_Vars.currentplayer->autocrouchpos) ? g_Vars.currentplayer->crouchpos : g_Vars.currentplayer->autocrouchpos; } -s32 playerGetCrouchPos(s32 playernum) +s32 bmoveGetCrouchPosByPlayer(s32 playernum) { return (g_Vars.players[playernum]->crouchpos < g_Vars.players[playernum]->autocrouchpos) ? g_Vars.players[playernum]->crouchpos diff --git a/src/game/bondview.c b/src/game/bondview.c index 911baf17e..62de8ed59 100644 --- a/src/game/bondview.c +++ b/src/game/bondview.c @@ -696,7 +696,7 @@ Gfx *bviewRenderZoomBlur(Gfx *gdl, u32 colour, s32 alpha, f32 arg3, f32 arg4) const char var7f1b5dd4[] = "blurGfxFisheye"; -f32 func0f142d74(s32 arg0, f32 arg1, f32 arg2, f32 arg3) +f32 bview0f142d74(s32 arg0, f32 arg1, f32 arg2, f32 arg3) { f32 result; f32 value = arg2; @@ -888,7 +888,7 @@ glabel var7f1b5f48 /* f14306c: 014c6825 */ or $t5,$t2,$t4 /* f143070: 4407c000 */ mfc1 $a3,$f24 /* f143074: ac4d0004 */ sw $t5,0x4($v0) -/* f143078: 0fc50b5d */ jal func0f142d74 +/* f143078: 0fc50b5d */ jal bview0f142d74 /* f14307c: 26310008 */ addiu $s1,$s1,0x8 /* f143080: 461e0102 */ mul.s $f4,$f0,$f30 /* f143084: 02202025 */ or $a0,$s1,$zero @@ -981,7 +981,7 @@ glabel var7f1b5f48 /* f1431c4: 4405d000 */ mfc1 $a1,$f26 /* f1431c8: 4406e000 */ mfc1 $a2,$f28 /* f1431cc: 4407c000 */ mfc1 $a3,$f24 -/* f1431d0: 0fc50b5d */ jal func0f142d74 +/* f1431d0: 0fc50b5d */ jal bview0f142d74 /* f1431d4: 02402025 */ or $a0,$s2,$zero /* f1431d8: 46160182 */ mul.s $f6,$f0,$f22 /* f1431dc: 02202025 */ or $a0,$s1,$zero @@ -1005,7 +1005,7 @@ glabel var7f1b5f48 /* f143224: ac4e0004 */ sw $t6,0x4($v0) /* f143228: ac540000 */ sw $s4,0x0($v0) /* f14322c: 26310008 */ addiu $s1,$s1,0x8 -/* f143230: 0fc50b5d */ jal func0f142d74 +/* f143230: 0fc50b5d */ jal bview0f142d74 /* f143234: 02402025 */ or $a0,$s2,$zero /* f143238: 3c017f1b */ lui $at,%hi(var7f1b5f40) /* f14323c: c42a5f40 */ lwc1 $f10,%lo(var7f1b5f40)($at) @@ -1252,7 +1252,7 @@ glabel var7f1b5f48 .L0f1435c4: /* f1435c4: 4406e000 */ mfc1 $a2,$f28 /* f1435c8: 4407c000 */ mfc1 $a3,$f24 -/* f1435cc: 0fc50b5d */ jal func0f142d74 +/* f1435cc: 0fc50b5d */ jal bview0f142d74 /* f1435d0: 02402025 */ or $a0,$s2,$zero /* f1435d4: 44060000 */ mfc1 $a2,$f0 /* f1435d8: 02202025 */ or $a0,$s1,$zero @@ -7362,14 +7362,14 @@ Gfx *func0f148b38(Gfx *gdl) return gdl; } -void func0f148b40(u32 arg0) +void bviewSetBlur(u32 bluramount) { var8007f840 = 0; var8007f848 = 0; - var8007f844 = (arg0 << 1) / 3; + var8007f844 = (bluramount << 1) / 3; } -void func0f148b6c(void) +void bviewClearBlur(void) { var8007f844 = 0; } diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index d52a87748..6e8be2eed 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -33,7 +33,7 @@ #include "lib/lib_4a360.h" #include "types.h" -void currentPlayerWalkInit(void) +void bwalkInit(void) { u32 prevmode = g_Vars.currentplayer->bondmovemode; s32 i; @@ -69,14 +69,14 @@ void currentPlayerWalkInit(void) g_Vars.currentplayer->crouchheight = 0; g_Vars.currentplayer->crouchtime240 = 0; g_Vars.currentplayer->crouchfall = 0; - g_Vars.currentplayer->crouchpos = CROUCH_STAND; - g_Vars.currentplayer->autocrouchpos = CROUCH_STAND; + g_Vars.currentplayer->crouchpos = CROUCHPOS_STAND; + g_Vars.currentplayer->autocrouchpos = CROUCHPOS_STAND; g_Vars.currentplayer->crouchspeed = 0; g_Vars.currentplayer->crouchoffset = 0; g_Vars.currentplayer->guncloseroffset = 0; } - currentPlayerUpdateCrouchOffsetWalk(); + bwalkUpdateCrouchOffsetReal(); if (prevmode != MOVEMODE_GRAB && prevmode != MOVEMODE_WALK) { for (i = 0; i != 3; i++) { @@ -110,7 +110,7 @@ void currentPlayerWalkInit(void) delta.z = g_Vars.currentplayer->walkinitpos.z - g_Vars.currentplayer->prop->pos.z; propSetCollisionsEnabled(g_Vars.currentplayer->hoverbike, false); - func0f0c4250(&delta, 0, true, 0, CDTYPE_ALL); + bwalkCalculateNewPositionWithPush(&delta, 0, true, 0, CDTYPE_ALL); propSetCollisionsEnabled(g_Vars.currentplayer->hoverbike, true); } else if (prevmode != MOVEMODE_GRAB && prevmode != MOVEMODE_WALK) { g_Vars.currentplayer->moveinitspeed.x = 0; @@ -119,23 +119,23 @@ void currentPlayerWalkInit(void) } } -void currentPlayerSetSwayTarget(s32 value) +void bwalkSetSwayTarget(s32 value) { g_Vars.currentplayer->swaytarget = value * 75.0f; } -void currentPlayerAdjustCrouchPos(s32 value) +void bwalkAdjustCrouchPos(s32 value) { g_Vars.currentplayer->crouchpos += value; - if (g_Vars.currentplayer->crouchpos < CROUCH_SQUAT) { - g_Vars.currentplayer->crouchpos = CROUCH_SQUAT; - } else if (g_Vars.currentplayer->crouchpos > CROUCH_STAND) { - g_Vars.currentplayer->crouchpos = CROUCH_STAND; + if (g_Vars.currentplayer->crouchpos < CROUCHPOS_SQUAT) { + g_Vars.currentplayer->crouchpos = CROUCHPOS_SQUAT; + } else if (g_Vars.currentplayer->crouchpos > CROUCHPOS_STAND) { + g_Vars.currentplayer->crouchpos = CROUCHPOS_STAND; } } -void func0f0c3b38(struct coord *reltarget, struct defaultobj *obj) +void bwalk0f0c3b38(struct coord *reltarget, struct defaultobj *obj) { struct coord posunk; struct coord vector; @@ -203,7 +203,7 @@ s32 bwalkTryMoveUpwards(f32 amount) propPlayerGetBbox(g_Vars.currentplayer->prop, &width, &ymax, &ymin); func0f065e74(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &newpos, rooms); - func0f0cb79c(g_Vars.currentplayer, &newpos, rooms); + bmove0f0cb79c(g_Vars.currentplayer, &newpos, rooms); propSetCollisionsEnabled(g_Vars.currentplayer->prop, false); ymin -= 0.1f; @@ -269,7 +269,7 @@ bool bwalkCalculateNewPosition(struct coord *vel, f32 rotateamount, bool apply, func0f065dfc(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &dstpos, dstrooms, sp64, 20); - func0f0cb79c(g_Vars.currentplayer, &dstpos, dstrooms); + bmove0f0cb79c(g_Vars.currentplayer, &dstpos, dstrooms); copyrooms = true; @@ -338,7 +338,7 @@ bool bwalkCalculateNewPosition(struct coord *vel, f32 rotateamount, bool apply, const char var7f1ad75c[] = "bondwalk.c"; GLOBAL_ASM( -glabel func0f0c4250 +glabel bwalkCalculateNewPositionWithPush /* f0c4250: 27bdff58 */ addiu $sp,$sp,-168 /* f0c4254: 8fae00b8 */ lw $t6,0xb8($sp) /* f0c4258: afbf0024 */ sw $ra,0x24($sp) @@ -623,7 +623,7 @@ glabel func0f0c4250 .L0f0c4690: /* f0c4690: 50400030 */ beqzl $v0,.L0f0c4754 /* f0c4694: 8fbf0024 */ lw $ra,0x24($sp) -/* f0c4698: 0fc30ece */ jal func0f0c3b38 +/* f0c4698: 0fc30ece */ jal bwalk0f0c3b38 /* f0c469c: afa60040 */ sw $a2,0x40($sp) /* f0c46a0: 8fa60040 */ lw $a2,0x40($sp) /* f0c46a4: 8ccf0040 */ lw $t7,0x40($a2) @@ -681,7 +681,7 @@ glabel func0f0c4250 ); // Mismatch: The below loads 0.5f twice in the chr push code while goal reuses it. -//bool func0f0c4250(struct coord *delta, f32 rotateamount, bool apply, f32 extrawidth, s32 types) +//bool bwalkCalculateNewPositionWithPush(struct coord *delta, f32 rotateamount, bool apply, f32 extrawidth, s32 types) //{ // s32 result = bwalkCalculateNewPosition(delta, rotateamount, apply, extrawidth, types); // @@ -792,7 +792,7 @@ glabel func0f0c4250 // } // // if (dothething) { -// func0f0c3b38(delta, obj); +// bwalk0f0c3b38(delta, obj); // // if (obj->hidden & OBJHFLAG_AIRBORNE && (obj->projectile->flags & PROJECTILEFLAG_00000800)) { // bool somevalue; @@ -823,9 +823,9 @@ glabel func0f0c4250 // return result; //} -s32 func0f0c4764(struct coord *delta, struct coord *arg1, struct coord *arg2, s32 types) +s32 bwalk0f0c4764(struct coord *delta, struct coord *arg1, struct coord *arg2, s32 types) { - s32 result = func0f0c4250(delta, 0, true, 0, types); + s32 result = bwalkCalculateNewPositionWithPush(delta, 0, true, 0, types); if (result == CDRESULT_COLLISION) { func00024e4c(arg1, arg2, 0x25f, "bondwalk.c"); @@ -834,7 +834,7 @@ s32 func0f0c4764(struct coord *delta, struct coord *arg1, struct coord *arg2, s3 return result; } -s32 func0f0c47d0(struct coord *a, struct coord *b, struct coord *c, +s32 bwalk0f0c47d0(struct coord *a, struct coord *b, struct coord *c, struct coord *d, struct coord *e, s32 types) { struct coord quarter; @@ -845,7 +845,7 @@ s32 func0f0c47d0(struct coord *a, struct coord *b, struct coord *c, quarter.x = a->x * mult * 0.25f; quarter.y = a->y * mult * 0.25f; quarter.z = a->z * mult * 0.25f; - result = func0f0c4250(&quarter, 0, true, 0, types); + result = bwalkCalculateNewPositionWithPush(&quarter, 0, true, 0, types); if (result == CDRESULT_NOCOLLISION) { return CDRESULT_NOCOLLISION; @@ -868,7 +868,7 @@ s32 func0f0c47d0(struct coord *a, struct coord *b, struct coord *c, return CDRESULT_ERROR; } -s32 func0f0c494c(struct coord *a, struct coord *b, struct coord *c, s32 types) +s32 bwalk0f0c494c(struct coord *a, struct coord *b, struct coord *c, s32 types) { if (b->f[0] != c->f[0] || b->f[2] != c->f[2]) { f32 tmp; @@ -890,13 +890,13 @@ s32 func0f0c494c(struct coord *a, struct coord *b, struct coord *c, s32 types) sp2c.y = 0; sp2c.z = sp38.z * tmp; - return func0f0c4250(&sp2c, 0, true, 0, types); + return bwalkCalculateNewPositionWithPush(&sp2c, 0, true, 0, types); } return -1; } -s32 func0f0c4a5c(struct coord *arg0, struct coord *arg1, struct coord *arg2, s32 types) +s32 bwalk0f0c4a5c(struct coord *arg0, struct coord *arg1, struct coord *arg2, s32 types) { struct coord sp34; struct coord sp28; @@ -930,7 +930,7 @@ s32 func0f0c4a5c(struct coord *arg0, struct coord *arg1, struct coord *arg2, s32 sp28.y = 0; sp28.z = sp34.z; - if (func0f0c4250(&sp28, 0, true, 0, types) == CDRESULT_NOCOLLISION) { + if (bwalkCalculateNewPositionWithPush(&sp28, 0, true, 0, types) == CDRESULT_NOCOLLISION) { return true; } } @@ -958,7 +958,7 @@ s32 func0f0c4a5c(struct coord *arg0, struct coord *arg1, struct coord *arg2, s32 sp28.y = 0; sp28.z = sp34.z; - if (func0f0c4250(&sp28, 0, true, 0, types) == CDRESULT_NOCOLLISION) { + if (bwalkCalculateNewPositionWithPush(&sp28, 0, true, 0, types) == CDRESULT_NOCOLLISION) { return true; } } @@ -968,12 +968,12 @@ s32 func0f0c4a5c(struct coord *arg0, struct coord *arg1, struct coord *arg2, s32 return false; } -void func0f0c4d98(void) +void bwalk0f0c4d98(void) { // empty } -void currentPlayerUpdateSpeedSidewaysWalk(f32 targetspeed, f32 accelspeed, s32 mult) +void bwalkUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult) { if (g_Vars.normmplayerisrunning) { targetspeed = (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.unk1c + 25.0f) / 100 * targetspeed; @@ -996,7 +996,7 @@ void currentPlayerUpdateSpeedSidewaysWalk(f32 targetspeed, f32 accelspeed, s32 m g_Vars.currentplayer->speedsideways = g_Vars.currentplayer->speedstrafe; } -void currentPlayerUpdateSpeedForwardsWalk(f32 targetspeed, f32 accelspeed) +void bwalkUpdateSpeedForwards(f32 targetspeed, f32 accelspeed) { if (g_Vars.normmplayerisrunning) { targetspeed = (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.unk1c + 25.0f) / 100 * targetspeed; @@ -1019,7 +1019,7 @@ void currentPlayerUpdateSpeedForwardsWalk(f32 targetspeed, f32 accelspeed) g_Vars.currentplayer->speedforwards = g_Vars.currentplayer->speedgo; } -void currentPlayerUpdateVerticalMovement(void) +void bwalkUpdateVertical(void) { s32 i; struct defaultobj *obj; @@ -1073,7 +1073,7 @@ void currentPlayerUpdateVerticalMovement(void) testpos.y = g_Vars.currentplayer->prop->pos.y - 10; testpos.z = g_Vars.currentplayer->prop->pos.z; roomsCopy(g_Vars.currentplayer->prop->rooms, rooms); - func0f0cb79c(g_Vars.currentplayer, &testpos, rooms); + bmove0f0cb79c(g_Vars.currentplayer, &testpos, rooms); onladder2 = func00029ffc(&g_Vars.currentplayer->prop->pos, width * 1.1f, ymax - g_Vars.currentplayer->prop->pos.y, g_Vars.currentplayer->vv_manground - g_Vars.currentplayer->prop->pos.y - 10, @@ -1089,7 +1089,7 @@ void currentPlayerUpdateVerticalMovement(void) } roomsCopy(g_Vars.currentplayer->prop->rooms, rooms); - func0f0cb79c(g_Vars.currentplayer, &testpos, rooms); + bmove0f0cb79c(g_Vars.currentplayer, &testpos, rooms); ground = cdFindGroundY(&testpos, g_Vars.currentplayer->bond2.width, rooms, &g_Vars.currentplayer->floorcol, &g_Vars.currentplayer->floortype, &g_Vars.currentplayer->floorflags, &g_Vars.currentplayer->floorroom, @@ -1429,18 +1429,18 @@ void currentPlayerUpdateVerticalMovement(void) } } -void currentPlayerApplyCrouchSpeed(void) +void bwalkApplyCrouchSpeed(void) { - if (currentPlayerGetCrouchPos() == CROUCH_HALF) { + if (bmoveGetCrouchPos() == CROUCHPOS_DUCK) { g_Vars.currentplayer->speedforwards *= 0.5f; g_Vars.currentplayer->speedsideways *= 0.5f; - } else if (currentPlayerGetCrouchPos() == CROUCH_SQUAT) { + } else if (bmoveGetCrouchPos() == CROUCHPOS_SQUAT) { g_Vars.currentplayer->speedforwards *= 0.35f; g_Vars.currentplayer->speedsideways *= 0.35f; } } -void currentPlayerUpdateCrouchOffsetWalk(void) +void bwalkUpdateCrouchOffsetReal(void) { if (g_Vars.currentplayer->vv_eyeheight + -90.0f * g_Vars.currentplayer->vv_eyeheight * (1.0f / 159.0f) < 69.0f) { g_Vars.currentplayer->crouchoffsetreal = g_Vars.currentplayer->crouchoffset * ((69.0f - g_Vars.currentplayer->vv_eyeheight) / -90.0f); @@ -1457,15 +1457,15 @@ void currentPlayerUpdateCrouchOffsetWalk(void) } } -void func0f0c6180(void) +void bwalkUpdateCrouchOffset(void) { f32 targetoffset = 0; - if (currentPlayerGetCrouchPos() == CROUCH_SQUAT) { + if (bmoveGetCrouchPos() == CROUCHPOS_SQUAT) { targetoffset = -90; - } else if (currentPlayerGetCrouchPos() == CROUCH_HALF) { + } else if (bmoveGetCrouchPos() == CROUCHPOS_DUCK) { targetoffset = -45; - } else if (currentPlayerGetCrouchPos() == CROUCH_STAND) { + } else if (bmoveGetCrouchPos() == CROUCHPOS_STAND) { // empty } @@ -1479,7 +1479,7 @@ void func0f0c6180(void) func0f06d90c(&g_Vars.currentplayer->crouchoffset, targetoffset, &g_Vars.currentplayer->crouchspeed, 0.5, 0.5, 5); - currentPlayerUpdateCrouchOffsetWalk(); + bwalkUpdateCrouchOffsetReal(); if (bwalkTryMoveUpwards(0) == CDRESULT_COLLISION) { // Crouch adjustment is blocked by ceiling @@ -1488,7 +1488,7 @@ void func0f0c6180(void) g_Vars.currentplayer->crouchoffsetsmall = prevcrouchoffsetsmall; g_Vars.currentplayer->crouchoffsetrealsmall = prevcrouchoffsetrealsmall; g_Vars.currentplayer->crouchspeed = 0; - currentPlayerAdjustCrouchPos(-1); + bwalkAdjustCrouchPos(-1); } } @@ -1499,7 +1499,7 @@ void func0f0c6180(void) g_Vars.currentplayer->guncloseroffset = g_Vars.currentplayer->crouchoffset / -90; } -void func0f0c6318(void) +void bwalkUpdateTheta(void) { f32 mult; f32 rotateamount; @@ -1510,7 +1510,7 @@ void func0f0c6318(void) rotateamount = g_Vars.currentplayer->speedtheta * mult * g_Vars.lvupdate240freal * 0.0174505133f * 3.5f; - func0f0c4250(&delta, rotateamount, true, 0, CDTYPE_ALL); + bwalkCalculateNewPositionWithPush(&delta, rotateamount, true, 0, CDTYPE_ALL); } u32 var80070e68 = 0x00000000; @@ -1520,53 +1520,53 @@ u32 var80070e74 = 0x00000000; u32 var80070e78 = 0x00000000; u32 var80070e7c = 0x00000000; -void func0f0c63bc(struct coord *arg0, u32 arg1, s32 types) +void bwalk0f0c63bc(struct coord *arg0, u32 arg1, s32 types) { struct coord sp100; struct coord sp88; g_Vars.currentplayer->unk1af4 = 0; - g_Vars.currentplayer->autocrouchpos = CROUCH_STAND; + g_Vars.currentplayer->autocrouchpos = CROUCHPOS_STAND; - func0f0c4d98(); + bwalk0f0c4d98(); - if (func0f0c4764(arg0, &sp100, &sp88, types) == CDRESULT_COLLISION) { + if (bwalk0f0c4764(arg0, &sp100, &sp88, types) == CDRESULT_COLLISION) { struct coord sp76; struct coord sp64; - s32 result = func0f0c47d0(arg0, &sp100, &sp88, &sp76, &sp64, types); + s32 result = bwalk0f0c47d0(arg0, &sp100, &sp88, &sp76, &sp64, types); if (result >= CDRESULT_NOCOLLISION || result <= CDRESULT_ERROR) { if (result >= CDRESULT_NOCOLLISION) { - func0f0c4d98(); + bwalk0f0c4d98(); } if (arg1 - && func0f0c494c(arg0, &sp100, &sp88, types) <= CDRESULT_COLLISION - && func0f0c4a5c(arg0, &sp100, &sp88, types) <= CDRESULT_COLLISION) { + && bwalk0f0c494c(arg0, &sp100, &sp88, types) <= CDRESULT_COLLISION + && bwalk0f0c4a5c(arg0, &sp100, &sp88, types) <= CDRESULT_COLLISION) { // empty } } else if (result == CDRESULT_COLLISION) { struct coord sp48; struct coord sp36; - if (func0f0c47d0(arg0, &sp76, &sp64, &sp48, &sp36, types) >= CDRESULT_NOCOLLISION) { - func0f0c4d98(); + if (bwalk0f0c47d0(arg0, &sp76, &sp64, &sp48, &sp36, types) >= CDRESULT_NOCOLLISION) { + bwalk0f0c4d98(); } if (arg1 - && func0f0c494c(arg0, &sp76, &sp64, types) <= CDRESULT_COLLISION - && func0f0c494c(arg0, &sp100, &sp88, types) <= CDRESULT_COLLISION - && func0f0c4a5c(arg0, &sp76, &sp64, types) <= CDRESULT_COLLISION) { - func0f0c4a5c(arg0, &sp100, &sp88, types); + && bwalk0f0c494c(arg0, &sp76, &sp64, types) <= CDRESULT_COLLISION + && bwalk0f0c494c(arg0, &sp100, &sp88, types) <= CDRESULT_COLLISION + && bwalk0f0c4a5c(arg0, &sp76, &sp64, types) <= CDRESULT_COLLISION) { + bwalk0f0c4a5c(arg0, &sp100, &sp88, types); } } } - func0f0c4d98(); + bwalk0f0c4d98(); } -void currentPlayerUpdatePrevPosWalk(void) +void bwalkUpdatePrevPos(void) { g_Vars.currentplayer->bondprevpos.x = g_Vars.currentplayer->prop->pos.x; g_Vars.currentplayer->bondprevpos.y = g_Vars.currentplayer->prop->pos.y; @@ -1575,41 +1575,41 @@ void currentPlayerUpdatePrevPosWalk(void) roomsCopy(g_Vars.currentplayer->prop->rooms, g_Vars.currentplayer->bondprevrooms); } -void func0f0c65a8(void) +void bwalkHandleActivate(void) { if (g_Vars.currentplayer->walkinitmove) { g_Vars.currentplayer->bondactivateorreload = 0; } } -void currentPlayerUpdateSpeedWalk(struct movedata *data) +void bwalkApplyMoveData(struct movedata *data) { if (g_Vars.currentplayer->walkinitmove == false) { // Sideways if (data->digitalstepleft) { - currentPlayerUpdateSpeedSidewaysWalk(-1, 0.2f, data->digitalstepleft); + bwalkUpdateSpeedSideways(-1, 0.2f, data->digitalstepleft); } else if (data->digitalstepright) { - currentPlayerUpdateSpeedSidewaysWalk(1, 0.2f, data->digitalstepright); + bwalkUpdateSpeedSideways(1, 0.2f, data->digitalstepright); } else if (data->unk14 == false) { - currentPlayerUpdateSpeedSidewaysWalk(0, 0.2f, g_Vars.lvupdate240_60); + bwalkUpdateSpeedSideways(0, 0.2f, g_Vars.lvupdate240_60); } if (data->unk14) { - currentPlayerUpdateSpeedSidewaysWalk(data->analogstrafe * 0.014285714365542f, 0.2f, g_Vars.lvupdate240_60); + bwalkUpdateSpeedSideways(data->analogstrafe * 0.014285714365542f, 0.2f, g_Vars.lvupdate240_60); } // Forward/back if (data->digitalstepforward) { - currentPlayerUpdateSpeedForwardsWalk(1, 1); + bwalkUpdateSpeedForwards(1, 1); g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60; } else if (data->digitalstepback) { - currentPlayerUpdateSpeedForwardsWalk(-1, 1); + bwalkUpdateSpeedForwards(-1, 1); } else if (data->canlookahead == false) { - currentPlayerUpdateSpeedForwardsWalk(0, 1); + bwalkUpdateSpeedForwards(0, 1); } if (data->canlookahead) { - currentPlayerUpdateSpeedForwardsWalk(data->analogwalk * 0.014285714365542f, 1); + bwalkUpdateSpeedForwards(data->analogwalk * 0.014285714365542f, 1); if (data->analogwalk > 60) { g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60; @@ -1639,41 +1639,41 @@ void currentPlayerUpdateSpeedWalk(struct movedata *data) g_Vars.currentplayer->speedforwards *= g_Vars.currentplayer->speedboost; if ((data->canlookahead == false && data->digitalstepforward == false) || - currentPlayerGetCrouchPos() != CROUCH_STAND) { + bmoveGetCrouchPos() != CROUCHPOS_STAND) { g_Vars.currentplayer->speedmaxtime60 = 0; } if (data->rleanleft) { - currentPlayerSetSwayTarget(-1); + bwalkSetSwayTarget(-1); } else if (data->rleanright) { - currentPlayerSetSwayTarget(1); + bwalkSetSwayTarget(1); } else { - currentPlayerSetSwayTarget(0); + bwalkSetSwayTarget(0); } while (data->crouchdown-- > 0) { - currentPlayerAdjustCrouchPos(-1); + bwalkAdjustCrouchPos(-1); } while (data->crouchup-- > 0) { - currentPlayerAdjustCrouchPos(1); + bwalkAdjustCrouchPos(1); } g_Vars.currentplayer->eyesshut = data->eyesshut; } } -void currentPlayerApplyCrouchSpeedTheta(void) +void bwalkUpdateSpeedTheta(void) { - if (currentPlayerGetCrouchPos() == CROUCH_SQUAT) { + if (bmoveGetCrouchPos() == CROUCHPOS_SQUAT) { g_Vars.currentplayer->speedtheta *= 0.5f; - } else if (currentPlayerGetCrouchPos() == CROUCH_HALF) { + } else if (bmoveGetCrouchPos() == CROUCHPOS_DUCK) { g_Vars.currentplayer->speedtheta *= 0.75f; } } GLOBAL_ASM( -glabel func0f0c69b8 +glabel bwalk0f0c69b8 .late_rodata glabel var7f1ad7fc .word 0xc27e6668 @@ -1838,28 +1838,28 @@ glabel var7f1ad854 /* f0c6b68: c4661b4c */ lwc1 $f6,0x1b4c($v1) /* f0c6b6c: 24671b08 */ addiu $a3,$v1,0x1b08 /* f0c6b70: 46061101 */ sub.s $f4,$f2,$f6 -/* f0c6b74: 0fc330ee */ jal func0f0cc3b8 +/* f0c6b74: 0fc330ee */ jal bmoveUpdateHead /* f0c6b78: e7a40010 */ swc1 $f4,0x10($sp) /* f0c6b7c: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c6b80: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) /* f0c6b84: 8d090284 */ lw $t1,0x284($t0) /* f0c6b88: 27a400cc */ addiu $a0,$sp,0xcc -/* f0c6b8c: 0fc32ed2 */ jal currentPlayerUpdateMoveInitSpeed +/* f0c6b8c: 0fc32ed2 */ jal bmoveUpdateMoveInitSpeed /* f0c6b90: e53400cc */ swc1 $f20,0xcc($t1) /* f0c6b94: 4405a000 */ mfc1 $a1,$f20 /* f0c6b98: 4407a000 */ mfc1 $a3,$f20 /* f0c6b9c: 240a003f */ addiu $t2,$zero,0x3f /* f0c6ba0: afaa0010 */ sw $t2,0x10($sp) /* f0c6ba4: 27a400cc */ addiu $a0,$sp,0xcc -/* f0c6ba8: 0fc31094 */ jal func0f0c4250 +/* f0c6ba8: 0fc31094 */ jal bwalkCalculateNewPositionWithPush /* f0c6bac: 24060001 */ addiu $a2,$zero,0x1 /* f0c6bb0: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c6bb4: 100002ea */ b .L0f0c7760 /* f0c6bb8: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) .L0f0c6bbc: -/* f0c6bbc: 0fc317fa */ jal currentPlayerApplyCrouchSpeed +/* f0c6bbc: 0fc317fa */ jal bwalkApplyCrouchSpeed /* f0c6bc0: 00000000 */ nop -/* f0c6bc4: 0fc31860 */ jal func0f0c6180 +/* f0c6bc4: 0fc31860 */ jal bwalkUpdateCrouchOffset /* f0c6bc8: 00000000 */ nop /* f0c6bcc: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c6bd0: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -1869,7 +1869,7 @@ glabel var7f1ad854 /* f0c6be0: c468014c */ lwc1 $f8,0x14c($v1) /* f0c6be4: 8c670150 */ lw $a3,0x150($v1) /* f0c6be8: 2466017c */ addiu $a2,$v1,0x17c -/* f0c6bec: 0fc32ea2 */ jal func0f0cba88 +/* f0c6bec: 0fc32ea2 */ jal bmove0f0cba88 /* f0c6bf0: e7a80010 */ swc1 $f8,0x10($sp) /* f0c6bf4: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c6bf8: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -2131,7 +2131,7 @@ glabel var7f1ad854 /* f0c6fa0: 44061000 */ mfc1 $a2,$f2 /* f0c6fa4: c7ac0078 */ lwc1 $f12,0x78($sp) /* f0c6fa8: 46044182 */ mul.s $f6,$f8,$f4 -/* f0c6fac: 0fc33195 */ jal func0f0cc654 +/* f0c6fac: 0fc33195 */ jal bmove0f0cc654 /* f0c6fb0: 460a3380 */ add.s $f14,$f6,$f10 /* f0c6fb4: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c6fb8: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -2183,7 +2183,7 @@ glabel var7f1ad854 /* f0c706c: e7a800d4 */ swc1 $f8,0xd4($sp) /* f0c7070: 46044180 */ add.s $f6,$f8,$f4 /* f0c7074: e7aa00cc */ swc1 $f10,0xcc($sp) -/* f0c7078: 0fc32ed2 */ jal currentPlayerUpdateMoveInitSpeed +/* f0c7078: 0fc32ed2 */ jal bmoveUpdateMoveInitSpeed /* f0c707c: e7a600d4 */ swc1 $f6,0xd4($sp) /* f0c7080: 0fc47b82 */ jal debugIsTurboModeEnabled /* f0c7084: 00000000 */ nop @@ -2396,7 +2396,7 @@ glabel var7f1ad854 /* f0c7398: 00000000 */ nop /* f0c739c: 24050001 */ addiu $a1,$zero,0x1 .L0f0c73a0: -/* f0c73a0: 0fc318ef */ jal func0f0c63bc +/* f0c73a0: 0fc318ef */ jal bwalk0f0c63bc /* f0c73a4: 2406003f */ addiu $a2,$zero,0x3f /* f0c73a8: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c73ac: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -2669,7 +2669,7 @@ glabel var7f1ad854 /* f0c7790: c46600cc */ lwc1 $f6,0xcc($v1) /* f0c7794: e7a6003c */ swc1 $f6,0x3c($sp) /* f0c7798: 460a2080 */ add.s $f2,$f4,$f10 -/* f0c779c: 0fc4505b */ jal func0f11416c +/* f0c779c: 0fc4505b */ jal bheadGetBreathingValue /* f0c77a0: e7a20040 */ swc1 $f2,0x40($sp) /* f0c77a4: 3c013f80 */ lui $at,0x3f80 /* f0c77a8: 44817000 */ mtc1 $at,$f14 @@ -2723,16 +2723,16 @@ glabel var7f1ad854 /* f0c7858: 00000000 */ nop ); -void func0f0c785c(void) +void bwalkTick(void) { s32 i; struct coord sStack16; - currentPlayerUpdatePrevPosWalk(); - func0f0c6318(); - func0f0cbf50(); - func0f0c69b8(); - currentPlayerUpdateVerticalMovement(); + bwalkUpdatePrevPos(); + bwalkUpdateTheta(); + bmoveUpdateVerta(); + bwalk0f0c69b8(); + bwalkUpdateVertical(); for (i = 0; g_Vars.currentplayer->prop->rooms[i] != -1; i++) { if (g_Vars.currentplayer->floorroom == g_Vars.currentplayer->prop->rooms[i]) { @@ -2743,7 +2743,7 @@ void func0f0c785c(void) } } - func0f0cb8c4(g_Vars.currentplayer); + bmove0f0cb8c4(g_Vars.currentplayer); objectiveCheckRoomEntered(g_Vars.currentplayer->prop->rooms[0]); if (g_Vars.currentplayer->walkinitmove) { @@ -2756,9 +2756,9 @@ void func0f0c785c(void) sStack16.z = (g_Vars.currentplayer->walkinitstart.z - g_Vars.currentplayer->walkinitpos.z) * (1.0f - g_Vars.currentplayer->walkinitt2) + g_Vars.currentplayer->prop->pos.z; - func0f0cc19c(&sStack16); + bmove0f0cc19c(&sStack16); } else { - func0f0cc19c(&g_Vars.currentplayer->prop->pos); + bmove0f0cc19c(&g_Vars.currentplayer->prop->pos); } currentPlayerUpdatePerimInfo(); diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 85979f4ad..7090b896b 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -1422,7 +1422,7 @@ glabel var7f1a8720 .L0f01f80c: /* f01f80c: 8e0402d4 */ lw $a0,0x2d4($s0) /* f01f810: e7ac00e0 */ swc1 $f12,0xe0($sp) -/* f01f814: 0fc32e41 */ jal func0f0cb904 +/* f01f814: 0fc32e41 */ jal bmove0f0cb904 /* f01f818: 24840108 */ addiu $a0,$a0,0x108 /* f01f81c: 8e0f02d4 */ lw $t7,0x2d4($s0) /* f01f820: 3c028007 */ lui $v0,%hi(var80075c00) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 69b374103..2393c490f 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -10169,7 +10169,7 @@ bool aiClearInventory(void) */ bool aiReleaseObject(void) { - setMoveModeForAllPlayers(MOVEMODE_WALK); + bmoveSetModeForAllPlayers(MOVEMODE_WALK); g_Vars.aioffset += 3; return false; @@ -10190,9 +10190,9 @@ bool aiChrGrabObject(void) setCurrentPlayerNum(playernum); if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK - && currentPlayerGetCrouchPos() == CROUCH_STAND + && bmoveGetCrouchPos() == CROUCHPOS_STAND && g_Vars.currentplayer->crouchoffset == 0) { - currentPlayerGrabProp(obj->prop); + bmoveGrabProp(obj->prop); } setCurrentPlayerNum(prevplayernum); diff --git a/src/game/core.c b/src/game/core.c index e2ddd5791..fbd0c60ad 100644 --- a/src/game/core.c +++ b/src/game/core.c @@ -1538,7 +1538,7 @@ Gfx *coreRender(Gfx *gdl) } } - func0f148b40(bluramount); + bviewSetBlur(bluramount); gSPDisplayList(gdl++, &var800613a0); @@ -1606,7 +1606,7 @@ Gfx *coreRender(Gfx *gdl) if (PLAYERCOUNT() == 1 || g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0 - || (weaponHasFlag(handGetWeaponNum(HAND_RIGHT), WEAPONFLAG_AIMTRACK) && currentPlayerIsInSightAimMode())) { + || (weaponHasFlag(handGetWeaponNum(HAND_RIGHT), WEAPONFLAG_AIMTRACK) && bmoveIsInSightAimMode())) { g_Vars.currentplayer->lookingatprop.prop = func0f061d54(HAND_RIGHT, 0, 0); if (g_Vars.currentplayer->lookingatprop.prop) { @@ -1650,7 +1650,7 @@ Gfx *coreRender(Gfx *gdl) if (frIsInTraining() && g_Vars.currentplayer->lookingatprop.prop - && currentPlayerIsInSightAimMode()) { + && bmoveIsInSightAimMode()) { func0f1a0924(g_Vars.currentplayer->lookingatprop.prop); } else if (coreCheckCmpFollowThreat(&g_Vars.currentplayer->lookingatprop, -1) == 0) { g_Vars.currentplayer->lookingatprop.prop = NULL; @@ -1922,7 +1922,7 @@ Gfx *coreRender(Gfx *gdl) } if (bluramount) { - func0f148b6c(); + bviewClearBlur(); gdl = bviewRenderMotionBlur(gdl, 0xffffffff, bluramount); } diff --git a/src/game/game_011110.c b/src/game/game_011110.c index e9e951182..8316b446f 100644 --- a/src/game/game_011110.c +++ b/src/game/game_011110.c @@ -1219,7 +1219,7 @@ glabel var7f1a827c /* f012358: 5420ffe9 */ bnezl $at,.L0f012300 /* f01235c: 8cca0000 */ lw $t2,0x0($a2) .L0f012360: -/* f012360: 0fc32e31 */ jal func0f0cb8c4 +/* f012360: 0fc32e31 */ jal bmove0f0cb8c4 /* f012364: 8e240284 */ lw $a0,0x284($s1) /* f012368: 8e380318 */ lw $t8,0x318($s1) /* f01236c: 13000005 */ beqz $t8,.L0f012384 @@ -1614,7 +1614,7 @@ glabel var7f1a827c // } // } // -// func0f0cb8c4(g_Vars.currentplayer); +// bmove0f0cb8c4(g_Vars.currentplayer); // // if (g_Vars.normmplayerisrunning) { // func0f0b9674(); diff --git a/src/game/game_0125a0.c b/src/game/game_0125a0.c index e056988f1..6ee4ac2c9 100644 --- a/src/game/game_0125a0.c +++ b/src/game/game_0125a0.c @@ -174,9 +174,9 @@ void currentPlayerInitAnimation(void) modelSetAnimEndFrame(&g_Vars.currentplayer->model, var80075c00[g_Vars.currentplayer->headanim].endframe); - modelSetAnimFlipFunction(&g_Vars.currentplayer->model, currentPlayerFlipAnimation); + modelSetAnimFlipFunction(&g_Vars.currentplayer->model, bheadFlipAnimation); - currentPlayerUpdateIdleHeadRoll(); + bheadUpdateIdleRoll(); } } diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index 6e2562901..20e636e90 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -2355,9 +2355,9 @@ void handInflictCloseRangeDamage(s32 handnum, struct hand *hand, bool arg2) func0f03ff2c(chr, &playerprop->pos, &spac, &spa8, &sp9c, &spa4, &spa0); } - if (currentPlayerGetCrouchPos() == CROUCH_HALF) { + if (bmoveGetCrouchPos() == CROUCHPOS_DUCK) { sp9c = 200; - } else if (currentPlayerGetCrouchPos() == CROUCH_SQUAT) { + } else if (bmoveGetCrouchPos() == CROUCHPOS_SQUAT) { sp9c = 201; } else { sp9c = 15; @@ -2456,10 +2456,10 @@ void handTickAttack(s32 handnum) handCreateFiredProjectile(handnum); break; case HANDATTACKTYPE_CROUCH: - if (g_Vars.currentplayer->crouchpos == CROUCH_SQUAT) { - currentPlayerAdjustCrouchPos(2); + if (g_Vars.currentplayer->crouchpos == CROUCHPOS_SQUAT) { + bwalkAdjustCrouchPos(2); } else { - currentPlayerAdjustCrouchPos(-2); + bwalkAdjustCrouchPos(-2); } break; case HANDATTACKTYPE_THROWPROJECTILE: @@ -4333,7 +4333,7 @@ glabel var7f1a9f54 /* f0645e4: e7a0008c */ swc1 $f0,0x8c($sp) /* f0645e8: 0fc25e5c */ jal ceilf /* f0645ec: c7ac0084 */ lwc1 $f12,0x84($sp) -/* f0645f0: 0fc31ef4 */ jal func0f0c7bd0 +/* f0645f0: 0fc31ef4 */ jal bmoveIsAutoAimXEnabledForCurrentWeapon /* f0645f4: e7a00084 */ swc1 $f0,0x84($sp) /* f0645f8: 14400003 */ bnez $v0,.L0f064608 /* f0645fc: 8fa900c0 */ lw $t1,0xc0($sp) @@ -4505,7 +4505,7 @@ glabel var7f1a9f54 /* f064860: 00000000 */ nop /* f064864: 46008006 */ mov.s $f0,$f16 .L0f064868: -/* f064868: 0fc31ef4 */ jal func0f0c7bd0 +/* f064868: 0fc31ef4 */ jal bmoveIsAutoAimXEnabledForCurrentWeapon /* f06486c: e5000004 */ swc1 $f0,0x4($t0) /* f064870: 14400003 */ bnez $v0,.L0f064880 /* f064874: 8fb900c0 */ lw $t9,0xc0($sp) @@ -5154,11 +5154,11 @@ glabel func0f064ce8 /* f0651b4: 10000060 */ b .L0f065338 /* f0651b8: 00000000 */ nop .L0f0651bc: -/* f0651bc: 0fc31ea3 */ jal func0f0c7a8c +/* f0651bc: 0fc31ea3 */ jal bmoveIsAutoAimYEnabledForCurrentWeapon /* f0651c0: 00000000 */ nop /* f0651c4: 14400007 */ bnez $v0,.L0f0651e4 /* f0651c8: 00000000 */ nop -/* f0651cc: 0fc31ef4 */ jal func0f0c7bd0 +/* f0651cc: 0fc31ef4 */ jal bmoveIsAutoAimXEnabledForCurrentWeapon /* f0651d0: 00000000 */ nop /* f0651d4: 14400003 */ bnez $v0,.L0f0651e4 /* f0651d8: 8faa00e4 */ lw $t2,0xe4($sp) @@ -5259,7 +5259,7 @@ glabel func0f064ce8 .L0f065338: /* f065338: 12600058 */ beqz $s3,.L0f06549c /* f06533c: 00002025 */ or $a0,$zero,$zero -/* f065340: 0fc31ea3 */ jal func0f0c7a8c +/* f065340: 0fc31ea3 */ jal bmoveIsAutoAimYEnabledForCurrentWeapon /* f065344: 00000000 */ nop /* f065348: 14400003 */ bnez $v0,.L0f065358 /* f06534c: 8fac00e0 */ lw $t4,0xe0($sp) @@ -5281,10 +5281,10 @@ glabel func0f064ce8 /* f065388: 46123283 */ div.s $f10,$f6,$f18 /* f06538c: 46105101 */ sub.s $f4,$f10,$f16 /* f065390: 44052000 */ mfc1 $a1,$f4 -/* f065394: 0fc31ec0 */ jal currentPlayerUpdateAutoAimYProp +/* f065394: 0fc31ec0 */ jal bmoveUpdateAutoAimYProp /* f065398: 00000000 */ nop .L0f06539c: -/* f06539c: 0fc31ef4 */ jal func0f0c7bd0 +/* f06539c: 0fc31ef4 */ jal bmoveIsAutoAimXEnabledForCurrentWeapon /* f0653a0: 00000000 */ nop /* f0653a4: 14400003 */ bnez $v0,.L0f0653b4 /* f0653a8: 8fad00e0 */ lw $t5,0xe0($sp) @@ -5306,7 +5306,7 @@ glabel func0f064ce8 /* f0653e4: 46124283 */ div.s $f10,$f8,$f18 /* f0653e8: 46105101 */ sub.s $f4,$f10,$f16 /* f0653ec: 44052000 */ mfc1 $a1,$f4 -/* f0653f0: 0fc31f0d */ jal currentPlayerUpdateAutoAimXProp +/* f0653f0: 0fc31f0d */ jal bmoveUpdateAutoAimXProp /* f0653f4: 00000000 */ nop /* f0653f8: 8fb900e4 */ lw $t9,0xe4($sp) .L0f0653fc: @@ -5353,10 +5353,10 @@ glabel func0f064ce8 /* f065494: 1000000a */ b .L0f0654c0 /* f065498: a04a1583 */ sb $t2,0x1583($v0) .L0f06549c: -/* f06549c: 0fc31ec0 */ jal currentPlayerUpdateAutoAimYProp +/* f06549c: 0fc31ec0 */ jal bmoveUpdateAutoAimYProp /* f0654a0: 24050000 */ addiu $a1,$zero,0x0 /* f0654a4: 00002025 */ or $a0,$zero,$zero -/* f0654a8: 0fc31f0d */ jal currentPlayerUpdateAutoAimXProp +/* f0654a8: 0fc31f0d */ jal bmoveUpdateAutoAimXProp /* f0654ac: 24050000 */ addiu $a1,$zero,0x0 /* f0654b0: 8ea20284 */ lw $v0,0x284($s5) /* f0654b4: 904c1583 */ lbu $t4,0x1583($v0) diff --git a/src/game/game_097ba0.c b/src/game/game_097ba0.c index c082c7760..f9f06fb66 100644 --- a/src/game/game_097ba0.c +++ b/src/game/game_097ba0.c @@ -7552,7 +7552,7 @@ glabel var7f1ac66c .L0f09d9b8: /* f09d9b8: e60015f8 */ swc1 $f0,0x15f8($s0) .L0f09d9bc: -/* f09d9bc: 0fc331a0 */ jal currentPlayerGetCrouchPos +/* f09d9bc: 0fc331a0 */ jal bmoveGetCrouchPos /* f09d9c0: e7b00050 */ swc1 $f16,0x50($sp) /* f09d9c4: 3c03800a */ lui $v1,%hi(g_Vars) /* f09d9c8: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) @@ -11261,7 +11261,7 @@ glabel func0f0a0cb0 /* f0a0d64: 46041082 */ mul.s $f2,$f2,$f4 /* f0a0d68: 00000000 */ nop .L0f0a0d6c: -/* f0a0d6c: 0fc331a0 */ jal currentPlayerGetCrouchPos +/* f0a0d6c: 0fc331a0 */ jal bmoveGetCrouchPos /* f0a0d70: e7a2003c */ swc1 $f2,0x3c($sp) /* f0a0d74: 14400006 */ bnez $v0,.L0f0a0d90 /* f0a0d78: c7a2003c */ lwc1 $f2,0x3c($sp) diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 918450e3b..f822d2cdf 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -1513,7 +1513,7 @@ glabel var7f1ad568 /* f0b7738: e5e200f0 */ swc1 $f2,0xf0($t7) /* f0b773c: 8e500284 */ lw $s0,0x284($s2) .L0f0b7740: -/* f0b7740: 0fc32e31 */ jal func0f0cb8c4 +/* f0b7740: 0fc32e31 */ jal bmove0f0cb8c4 /* f0b7744: 02002025 */ or $a0,$s0,$zero /* f0b7748: 0fc2e00b */ jal currentPlayerSpawn /* f0b774c: 00000000 */ nop @@ -1718,7 +1718,7 @@ glabel var7f1ad568 // g_Vars.currentplayer->apparentarmour = 0; // } // -// func0f0cb8c4(g_Vars.currentplayer); +// bmove0f0cb8c4(g_Vars.currentplayer); // currentPlayerSpawn(); // // if (g_Vars.normmplayerisrunning) { @@ -1758,7 +1758,7 @@ void currentPlayerResetToDefault(void) g_Vars.currentplayer->bondmovemode = -1; g_Vars.currentplayer->walkinitmove = 0; - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); g_Vars.currentplayer->bondperimenabled = true; g_Vars.currentplayer->periminfo.type = 3; @@ -2933,7 +2933,7 @@ glabel var7f1ad5b4 /* f0b94ac: 24050000 */ addiu $a1,$zero,0x0 /* f0b94b0: 0fc0ba68 */ jal func0f02e9a0 /* f0b94b4: a082017c */ sb $v0,0x17c($a0) -/* f0b94b8: 0fc32e31 */ jal func0f0cb8c4 +/* f0b94b8: 0fc32e31 */ jal bmove0f0cb8c4 /* f0b94bc: 8e040284 */ lw $a0,0x284($s0) /* f0b94c0: 10000019 */ b .L0f0b9528 /* f0b94c4: 8fbf002c */ lw $ra,0x2c($sp) @@ -2959,7 +2959,7 @@ glabel var7f1ad5b4 /* f0b9510: 8f0800bc */ lw $t0,0xbc($t8) /* f0b9514: 0fc0f94e */ jal func0f03e538 /* f0b9518: 8d040004 */ lw $a0,0x4($t0) -/* f0b951c: 0fc32e31 */ jal func0f0cb8c4 +/* f0b951c: 0fc32e31 */ jal bmove0f0cb8c4 /* f0b9520: 8e040284 */ lw $a0,0x284($s0) .L0f0b9524: /* f0b9524: 8fbf002c */ lw $ra,0x2c($sp) @@ -2977,7 +2977,7 @@ void func0f0b9538(void) g_Vars.currentplayer->haschrbody = false; func0f020d44(g_Vars.currentplayer->prop, false); g_Vars.currentplayer->unk00d4 = 0; - func0f0cb8c4(g_Vars.currentplayer); + bmove0f0cb8c4(g_Vars.currentplayer); func0f09df50(); g_Vars.currentplayer->unk1bd4 = 0; } @@ -3000,7 +3000,7 @@ void func0f0b9674(void) { setTickMode(TICKMODE_MPSWIRL); var80070744 = 0; - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); var8009ddd8 = 0; var8009dddc = -90; var8009dde0 = 0; @@ -3246,7 +3246,7 @@ void func0f0b9a20(void) { setTickMode(TICKMODE_NORMAL); var80070744 = 0; - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); if (mainGetStageNum() == STAGE_TEST_LEN) { currentPlayerSetFadeColour(0, 0, 0, 1); @@ -3271,7 +3271,7 @@ void func0f0b9afc(void) } else { setTickMode(TICKMODE_NORMAL); var80070744 = 0; - setMoveModeForAllPlayers(MOVEMODE_WALK); + bmoveSetModeForAllPlayers(MOVEMODE_WALK); } } @@ -3279,7 +3279,7 @@ void warpBondToPad(s16 pad) { setTickMode(TICKMODE_WARP); var80070744 = 0; - setMoveModeForAllPlayers(MOVEMODE_CUTSCENE); + bmoveSetModeForAllPlayers(MOVEMODE_CUTSCENE); allPlayersClearMemCamRoom(); g_WarpPadId = pad; } @@ -3288,7 +3288,7 @@ void func0f0b9bac(u32 *cmd, s32 arg1, s32 arg2) { setTickMode(TICKMODE_WARP); var80070744 = 0; - setMoveModeForAllPlayers(MOVEMODE_CUTSCENE); + bmoveSetModeForAllPlayers(MOVEMODE_CUTSCENE); allPlayersClearMemCamRoom(); g_WarpPadId = -1; var8009ddec = cmd; @@ -3300,7 +3300,7 @@ void func0f0b9c1c(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { setTickMode(TICKMODE_WARP); var80070744 = 0; - setMoveModeForAllPlayers(MOVEMODE_CUTSCENE); + bmoveSetModeForAllPlayers(MOVEMODE_CUTSCENE); allPlayersClearMemCamRoom(); g_WarpPadId = -1; var8009ddec = NULL; @@ -3544,7 +3544,7 @@ void func0f0ba010(void) { setTickMode(TICKMODE_CUTSCENE); var80070744 = 0; - setMoveModeForAllPlayers(MOVEMODE_CUTSCENE); + bmoveSetModeForAllPlayers(MOVEMODE_CUTSCENE); allPlayersClearMemCamRoom(); var8009de14 = var8009de20; g_CameraAnimCurFrame = var8009de20 >> 2; @@ -3821,7 +3821,7 @@ glabel var7f1ad5dc /* f0ba5b0: 44812000 */ mtc1 $at,$f4 /* f0ba5b4: 00002025 */ or $a0,$zero,$zero /* f0ba5b8: 46002481 */ sub.s $f18,$f4,$f0 -/* f0ba5bc: 0fc31f4c */ jal currentPlayerSetMoveMode +/* f0ba5bc: 0fc31f4c */ jal bmoveSetMode /* f0ba5c0: e7b20104 */ swc1 $f18,0x104($sp) /* f0ba5c4: 8e6202a0 */ lw $v0,0x2a0($s3) /* f0ba5c8: c7aa019c */ lwc1 $f10,0x19c($sp) @@ -5537,17 +5537,17 @@ glabel var7f1ad6ac /* f0bdc38: 8e6b0288 */ lw $t3,0x288($s3) /* f0bdc3c: 0fc549e9 */ jal optionsGetAutoAim /* f0bdc40: 8d640070 */ lw $a0,0x70($t3) -/* f0bdc44: 0fc31e88 */ jal currentPlayerSetAutoAimY +/* f0bdc44: 0fc31e88 */ jal bmoveSetAutoAimY /* f0bdc48: 00402025 */ or $a0,$v0,$zero /* f0bdc4c: 8e6c0288 */ lw $t4,0x288($s3) /* f0bdc50: 0fc549e9 */ jal optionsGetAutoAim /* f0bdc54: 8d840070 */ lw $a0,0x70($t4) -/* f0bdc58: 0fc31ed9 */ jal currentPlayerSetAutoAimX +/* f0bdc58: 0fc31ed9 */ jal bmoveSetAutoAimX /* f0bdc5c: 00402025 */ or $a0,$v0,$zero /* f0bdc60: 8e6d0288 */ lw $t5,0x288($s3) /* f0bdc64: 0fc549f2 */ jal optionsGetLookAhead /* f0bdc68: 8da40070 */ lw $a0,0x70($t5) -/* f0bdc6c: 0fc31e80 */ jal currentPlayerSetAutoMoveCentreEnabled +/* f0bdc6c: 0fc31e80 */ jal bmoveSetAutoMoveCentreEnabled /* f0bdc70: 00402025 */ or $a0,$v0,$zero /* f0bdc74: 8e6e0288 */ lw $t6,0x288($s3) /* f0bdc78: 0fc54a0d */ jal optionsGetAmmoOnScreen @@ -5665,7 +5665,7 @@ glabel var7f1ad6ac .L0f0bde18: /* f0bde18: 5180001d */ beqzl $t4,.L0f0bde90 /* f0bde1c: 924e0035 */ lbu $t6,0x35($s2) -/* f0bde20: 0fc3424a */ jal func0f0d0928 +/* f0bde20: 0fc3424a */ jal eyespyProcessInput /* f0bde24: 8fa40330 */ lw $a0,0x330($sp) /* f0bde28: 10000019 */ b .L0f0bde90 /* f0bde2c: 924e0035 */ lbu $t6,0x35($s2) @@ -5794,7 +5794,7 @@ glabel var7f1ad6ac /* f0bdff0: 24070001 */ addiu $a3,$zero,0x1 /* f0bdff4: 51200008 */ beqzl $t1,.L0f0be018 /* f0bdff8: 8e6b006c */ lw $t3,0x6c($s3) -/* f0bdffc: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0bdffc: 0fc32f16 */ jal bmoveTick /* f0be000: a611024c */ sh $s1,0x24c($s0) /* f0be004: 0fc2e8a7 */ jal func0f0ba29c /* f0be008: 8fa40330 */ lw $a0,0x330($sp) @@ -5915,7 +5915,7 @@ glabel var7f1ad6ac /* f0be1a4: 00002025 */ or $a0,$zero,$zero /* f0be1a8: 00002825 */ or $a1,$zero,$zero /* f0be1ac: 00003025 */ or $a2,$zero,$zero -/* f0be1b0: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0be1b0: 0fc32f16 */ jal bmoveTick /* f0be1b4: 24070001 */ addiu $a3,$zero,0x1 /* f0be1b8: 0fc3060c */ jal currentPlayerSetCameraMode /* f0be1bc: 24040002 */ addiu $a0,$zero,0x2 @@ -5941,7 +5941,7 @@ glabel var7f1ad6ac /* f0be208: 00002825 */ or $a1,$zero,$zero /* f0be20c: 00003025 */ or $a2,$zero,$zero /* f0be210: 24070001 */ addiu $a3,$zero,0x1 -/* f0be214: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0be214: 0fc32f16 */ jal bmoveTick /* f0be218: a439dde8 */ sh $t9,%lo(g_WarpPadId)($at) /* f0be21c: 0fc2e72f */ jal func0f0b9cbc /* f0be220: 00000000 */ nop @@ -5987,7 +5987,7 @@ glabel var7f1ad6ac /* f0be2bc: 00002025 */ or $a0,$zero,$zero /* f0be2c0: 00002825 */ or $a1,$zero,$zero /* f0be2c4: 00003025 */ or $a2,$zero,$zero -/* f0be2c8: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0be2c8: 0fc32f16 */ jal bmoveTick /* f0be2cc: 24070001 */ addiu $a3,$zero,0x1 /* f0be2d0: 0fc2f4f1 */ jal func0f0bd3c4 /* f0be2d4: 00000000 */ nop @@ -6583,12 +6583,12 @@ glabel var7f1ad6ac /* f0beb78: 00003025 */ or $a2,$zero,$zero /* f0beb7c: 24040001 */ addiu $a0,$zero,0x1 /* f0beb80: 24050001 */ addiu $a1,$zero,0x1 -/* f0beb84: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0beb84: 0fc32f16 */ jal bmoveTick /* f0beb88: 8fa60330 */ lw $a2,0x330($sp) /* f0beb8c: 10000003 */ b .L0f0beb9c /* f0beb90: 00000000 */ nop .L0f0beb94: -/* f0beb94: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0beb94: 0fc32f16 */ jal bmoveTick /* f0beb98: 24070001 */ addiu $a3,$zero,0x1 .L0f0beb9c: /* f0beb9c: 0fc2f4f1 */ jal func0f0bd3c4 @@ -7219,7 +7219,7 @@ glabel var7f1ad6ac /* f0bf4e4: 24040001 */ addiu $a0,$zero,0x1 /* f0bf4e8: 24050001 */ addiu $a1,$zero,0x1 /* f0bf4ec: 8fa60330 */ lw $a2,0x330($sp) -/* f0bf4f0: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0bf4f0: 0fc32f16 */ jal bmoveTick /* f0bf4f4: 00003825 */ or $a3,$zero,$zero /* f0bf4f8: 0fc2f4f1 */ jal func0f0bd3c4 /* f0bf4fc: 00000000 */ nop @@ -7245,7 +7245,7 @@ glabel var7f1ad6ac /* f0bf548: 00002025 */ or $a0,$zero,$zero /* f0bf54c: 00002825 */ or $a1,$zero,$zero /* f0bf550: 00003025 */ or $a2,$zero,$zero -/* f0bf554: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0bf554: 0fc32f16 */ jal bmoveTick /* f0bf558: 24070001 */ addiu $a3,$zero,0x1 /* f0bf55c: 0fc2e5ba */ jal func0f0b96e8 /* f0bf560: 00000000 */ nop @@ -7259,7 +7259,7 @@ glabel var7f1ad6ac /* f0bf57c: 00002025 */ or $a0,$zero,$zero /* f0bf580: 00002825 */ or $a1,$zero,$zero /* f0bf584: 00003025 */ or $a2,$zero,$zero -/* f0bf588: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0bf588: 0fc32f16 */ jal bmoveTick /* f0bf58c: 24070001 */ addiu $a3,$zero,0x1 /* f0bf590: 0fc2e72f */ jal func0f0b9cbc /* f0bf594: 00000000 */ nop @@ -7497,7 +7497,7 @@ glabel var7f1ad6ac /* f0bf8e8: 46022182 */ mul.s $f6,$f4,$f2 /* f0bf8ec: 4600348d */ trunc.w.s $f18,$f6 /* f0bf8f0: 440f9000 */ mfc1 $t7,$f18 -/* f0bf8f4: 0fc32f16 */ jal currentPlayerUpdateFootsteps +/* f0bf8f4: 0fc32f16 */ jal bmoveTick /* f0bf8f8: ae0f1bdc */ sw $t7,0x1bdc($s0) /* f0bf8fc: 0fc2f4f1 */ jal func0f0bd3c4 /* f0bf900: 00000000 */ nop @@ -7747,9 +7747,9 @@ glabel var7f1ad6ac // viSetBuf(viGetFbWidth(), viGetFbHeight()); // currentPlayerUpdateColourScreenProperties(); // currentPlayerTickChrFade(); -// currentPlayerSetAutoAimY(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex)); -// currentPlayerSetAutoAimX(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex)); -// currentPlayerSetAutoMoveCentreEnabled(optionsGetLookAhead(g_Vars.currentplayerstats->mpindex)); +// bmoveSetAutoAimY(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex)); +// bmoveSetAutoAimX(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex)); +// bmoveSetAutoMoveCentreEnabled(optionsGetLookAhead(g_Vars.currentplayerstats->mpindex)); // func0f0a95ec(1, optionsGetAmmoOnScreen(g_Vars.currentplayerstats->mpindex)); // currentPlayerSetGunSightVisible(GUNSIGHTREASON_1, true); // @@ -7806,7 +7806,7 @@ glabel var7f1ad6ac // // // de18 // if (g_Vars.lvupdate240) { -// func0f0d0928(param_1); +// eyespyProcessInput(param_1); // } // } else { // // de34 @@ -7870,7 +7870,7 @@ glabel var7f1ad6ac // // dfdc // if (g_Vars.currentplayer->haschrbody) { // g_Vars.currentplayer->invdowntime = -40; -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // func0f0ba29c(param_1); // g_Vars.currentplayer->invdowntime = -40; // } @@ -7891,7 +7891,7 @@ glabel var7f1ad6ac // sp776.y = g_Vars.currentplayer->eyespy->prop->pos.y; // sp776.z = g_Vars.currentplayer->eyespy->prop->pos.z; // func0f0b8ba0(); -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // currentPlayerSetCameraMode(CAMERAMODE_EYESPY); // func0f0c1bd8(&sp776, &g_Vars.currentplayer->eyespy->up, &g_Vars.currentplayer->eyespy->look); // } else { @@ -7899,7 +7899,7 @@ glabel var7f1ad6ac // if (g_Vars.currentplayer->teleportstate == TELEPORTSTATE_WHITE) { // func0f0b8ba0(); // g_WarpPadId = g_Vars.currentplayer->teleportcamerapad; -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // func0f0b9cbc(); // } else { // // e230 @@ -7914,7 +7914,7 @@ glabel var7f1ad6ac // // e2ac // currentPlayerSetCameraMode(CAMERAMODE_THIRDPERSON); // func0f0b8ba0(); -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // func0f0bd3c4(); // // // e2d8 @@ -8188,9 +8188,9 @@ glabel var7f1ad6ac // func0f0b9538(); // // if (g_PlayersWithControl[g_Vars.currentplayernum] == false) { -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // } else { -// currentPlayerUpdateFootsteps(1, 1, param_1, 0); +// bmoveTick(1, 1, param_1, 0); // } // // func0f0bd3c4(); @@ -8472,7 +8472,7 @@ glabel var7f1ad6ac // } // } else if (g_Vars.tickmode == TICKMODE_0 || g_Vars.tickmode == TICKMODE_5) { // func0f0b9538(); -// currentPlayerUpdateFootsteps(1, 1, param_1, 0); +// bmoveTick(1, 1, param_1, 0); // func0f0bd3c4(); // currentPlayerSetCameraMode(CAMERAMODE_DEFAULT); // func0f0c1840(&g_Vars.currentplayer->bond2.unk10, @@ -8482,11 +8482,11 @@ glabel var7f1ad6ac // g_Vars.currentplayer->prop->rooms); // } else if (g_Vars.tickmode == TICKMODE_MPSWIRL) { // func0f0b8ba0(); -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // func0f0b96e8(); // } else if (g_Vars.tickmode == TICKMODE_WARP) { // func0f0b8ba0(); -// currentPlayerUpdateFootsteps(0, 0, 0, 1); +// bmoveTick(0, 0, 0, 1); // func0f0b9cbc(); // } else if (g_Vars.tickmode == TICKMODE_AUTOWALK) { // struct pad pad; @@ -8582,7 +8582,7 @@ glabel var7f1ad6ac // } // // g_Vars.currentplayer->unk1bdc = g_Vars.currentplayer->autocontrol_walkspeed * fVar20; -// currentPlayerUpdateFootsteps(1, 1, 0, 1); +// bmoveTick(1, 1, 0, 1); // func0f0bd3c4(); // currentPlayerSetCameraMode(CAMERAMODE_DEFAULT); // func0f0c1840(&g_Vars.currentplayer->bond2.unk10, @@ -10165,7 +10165,7 @@ void currentPlayerDieByShooter(u32 shooter, bool force) g_Vars.currentplayer->bondtankexplode = true; } - currentPlayerSetMoveMode(MOVEMODE_WALK); + bmoveSetMode(MOVEMODE_WALK); func0f0a29c8(); if (getMissionTime() - g_Vars.currentplayer->lifestarttime60 < g_Vars.currentplayerstats->shortestlife) { @@ -10932,9 +10932,9 @@ glabel var7f1ad710 /* f0c256c: 46022183 */ div.s $f6,$f4,$f2 /* f0c2570: e6260144 */ swc1 $f6,0x144($s1) .L0f0c2574: -/* f0c2574: 0fc32fd4 */ jal func0f0cbf50 +/* f0c2574: 0fc32fd4 */ jal bmoveUpdateVerta /* f0c2578: 00000000 */ nop -/* f0c257c: 0fc33067 */ jal func0f0cc19c +/* f0c257c: 0fc33067 */ jal bmove0f0cc19c /* f0c2580: 27a4009c */ addiu $a0,$sp,0x9c /* f0c2584: 1000012e */ b .L0f0c2a40 /* f0c2588: 02401025 */ or $v0,$s2,$zero @@ -10978,7 +10978,7 @@ glabel var7f1ad710 /* f0c2614: 0c00744f */ jal modelGetAnimNum /* f0c2618: 8e040020 */ lw $a0,0x20($s0) /* f0c261c: afa20078 */ sw $v0,0x78($sp) -/* f0c2620: 0fc331ab */ jal playerGetCrouchPos +/* f0c2620: 0fc331ab */ jal bmoveGetCrouchPosByPlayer /* f0c2624: 8fa400fc */ lw $a0,0xfc($sp) /* f0c2628: c62a0148 */ lwc1 $f10,0x148($s1) /* f0c262c: 8e260168 */ lw $a2,0x168($s1) diff --git a/src/game/propobj.c b/src/game/propobj.c index e4dcb3190..8ad861bea 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -5766,18 +5766,18 @@ glabel func0f06ad2c .L0f06b004: /* f06b004: 0fc4a24b */ jal setCurrentPlayerNum /* f06b008: 02002025 */ or $a0,$s0,$zero -/* f06b00c: 0fc31f31 */ jal currentPlayerGetGrabbedProp +/* f06b00c: 0fc31f31 */ jal bmoveGetGrabbedProp /* f06b010: 00000000 */ nop /* f06b014: 8e2b0014 */ lw $t3,0x14($s1) /* f06b018: 104b0006 */ beq $v0,$t3,.L0f06b034 /* f06b01c: 00000000 */ nop -/* f06b020: 0fc31f26 */ jal currentPlayerGetHoverbike +/* f06b020: 0fc31f26 */ jal bmoveGetHoverbike /* f06b024: 00000000 */ nop /* f06b028: 8e240014 */ lw $a0,0x14($s1) /* f06b02c: 14440004 */ bne $v0,$a0,.L0f06b040 /* f06b030: 00000000 */ nop .L0f06b034: -/* f06b034: 0fc31f4c */ jal currentPlayerSetMoveMode +/* f06b034: 0fc31f4c */ jal bmoveSetMode /* f06b038: 00002025 */ or $a0,$zero,$zero /* f06b03c: 8e240014 */ lw $a0,0x14($s1) .L0f06b040: @@ -19984,11 +19984,11 @@ glabel var7f1aa454 /* f077a0c: e7a40094 */ swc1 $f4,0x94($sp) /* f077a10: 27a4008c */ addiu $a0,$sp,0x8c /* f077a14: 24050001 */ addiu $a1,$zero,0x1 -/* f077a18: 0fc318ef */ jal func0f0c63bc +/* f077a18: 0fc318ef */ jal bwalk0f0c63bc /* f077a1c: 24060020 */ addiu $a2,$zero,0x20 /* f077a20: 0fc307fd */ jal currentPlayerUpdatePerimInfo /* f077a24: 00000000 */ nop -/* f077a28: 0fc32e31 */ jal func0f0cb8c4 +/* f077a28: 0fc32e31 */ jal bmove0f0cb8c4 /* f077a2c: 8e440064 */ lw $a0,0x64($s2) /* f077a30: 0fc4a24b */ jal setCurrentPlayerNum /* f077a34: 02e02025 */ or $a0,$s7,$zero @@ -20082,7 +20082,7 @@ glabel var7f1aa454 .L0f077b88: /* f077b88: 0fc307fd */ jal currentPlayerUpdatePerimInfo /* f077b8c: 00000000 */ nop -/* f077b90: 0fc32e31 */ jal func0f0cb8c4 +/* f077b90: 0fc32e31 */ jal bmove0f0cb8c4 /* f077b94: 8e440064 */ lw $a0,0x64($s2) /* f077b98: 0fc4a24b */ jal setCurrentPlayerNum /* f077b9c: 02e02025 */ or $a0,$s7,$zero @@ -28401,7 +28401,7 @@ s32 objTick(struct prop *prop) if (sp552) { pass2 = false; - } else if (prop == currentPlayerGetHoverbike() || prop == currentPlayerGetGrabbedProp()) { + } else if (prop == bmoveGetHoverbike() || prop == bmoveGetGrabbedProp()) { pass2 = posIsInDrawDistance(&prop->pos); } else if (obj->flags2 & OBJFLAG2_04000000) { pass2 = posIsInDrawDistance(&prop->pos); @@ -37945,7 +37945,7 @@ glabel var7f1aab3c /* f086a78: 14400028 */ bnez $v0,.L0f086b1c /* f086a7c: 00000000 */ nop /* f086a80: afa50024 */ sw $a1,0x24($sp) -/* f086a84: 0fc331a0 */ jal currentPlayerGetCrouchPos +/* f086a84: 0fc331a0 */ jal bmoveGetCrouchPos /* f086a88: afa60028 */ sw $a2,0x28($sp) /* f086a8c: 24010002 */ addiu $at,$zero,0x2 /* f086a90: 8fa50024 */ lw $a1,0x24($sp) @@ -37969,7 +37969,7 @@ glabel var7f1aab3c /* f086ad4: 15a00011 */ bnez $t5,.L0f086b1c /* f086ad8: 00000000 */ nop /* f086adc: afa50024 */ sw $a1,0x24($sp) -/* f086ae0: 0fc331a0 */ jal currentPlayerGetCrouchPos +/* f086ae0: 0fc331a0 */ jal bmoveGetCrouchPos /* f086ae4: afa60028 */ sw $a2,0x28($sp) /* f086ae8: 24010002 */ addiu $at,$zero,0x2 /* f086aec: 8fa50024 */ lw $a1,0x24($sp) @@ -37992,7 +37992,7 @@ glabel var7f1aab3c /* f086b2c: 0701000a */ bgez $t8,.L0f086b58 /* f086b30: 00000000 */ nop /* f086b34: afa50024 */ sw $a1,0x24($sp) -/* f086b38: 0fc31f26 */ jal currentPlayerGetHoverbike +/* f086b38: 0fc31f26 */ jal bmoveGetHoverbike /* f086b3c: afa60028 */ sw $a2,0x28($sp) /* f086b40: 8fb90030 */ lw $t9,0x30($sp) /* f086b44: 8fa50024 */ lw $a1,0x24($sp) @@ -38153,7 +38153,7 @@ bool currentPlayerTryMountHoverbike(struct prop *prop) && g_Vars.lvframe60 - g_Vars.currentplayer->activatetimelast < 30 && (obj->hidden & OBJHFLAG_04000000) == 0) { if (obj->hidden & OBJHFLAG_GRABBED) { - if (currentPlayerGetGrabbedProp() == prop) { + if (bmoveGetGrabbedProp() == prop) { pass = true; } else { pass = false; @@ -38165,7 +38165,7 @@ bool currentPlayerTryMountHoverbike(struct prop *prop) if (pass && g_Vars.currentplayer->bondmovemode != MOVEMODE_GRAB) { if (g_Vars.currentplayer->bondmovemode != MOVEMODE_WALK - || currentPlayerGetCrouchPos() != CROUCH_STAND + || bmoveGetCrouchPos() != CROUCHPOS_STAND || g_Vars.currentplayer->crouchoffset != 0) { pass = false; } @@ -38184,7 +38184,7 @@ bool currentPlayerTryMountHoverbike(struct prop *prop) if ((angle > 0.3926365673542f && angle < 2.3558194637299f) || (angle < 5.8895483016968f && angle > 3.9263656139374f)) { g_Vars.currentplayer->hoverbike = prop; - currentPlayerSetMoveMode(MOVEMODE_BIKE); + bmoveSetMode(MOVEMODE_BIKE); return true; } } @@ -38295,10 +38295,10 @@ bool propobjInteract(struct prop *prop) } else if (currentPlayerTryMountHoverbike(prop) == false && (obj->flags3 & OBJFLAG3_GRABBABLE) && g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK - && currentPlayerGetCrouchPos() == CROUCH_STAND + && bmoveGetCrouchPos() == CROUCHPOS_STAND && g_Vars.currentplayer->crouchoffset == 0 && g_Vars.currentplayer->onladder == false) { - currentPlayerGrabProp(prop); + bmoveGrabProp(prop); } if (g_Vars.normmplayerisrunning) { @@ -43836,7 +43836,7 @@ glabel func0f08c190 /* f08c284: 0000a025 */ or $s4,$zero,$zero /* f08c288: 54410007 */ bnel $v0,$at,.L0f08c2a8 /* f08c28c: 24010003 */ addiu $at,$zero,0x3 -/* f08c290: 0fc31f31 */ jal currentPlayerGetGrabbedProp +/* f08c290: 0fc31f31 */ jal bmoveGetGrabbedProp /* f08c294: 00000000 */ nop /* f08c298: 8c530004 */ lw $s3,0x4($v0) /* f08c29c: 10000009 */ b .L0f08c2c4 @@ -43845,7 +43845,7 @@ glabel func0f08c190 .L0f08c2a8: /* f08c2a8: 54410007 */ bnel $v0,$at,.L0f08c2c8 /* f08c2ac: 8c6400bc */ lw $a0,0xbc($v1) -/* f08c2b0: 0fc31f26 */ jal currentPlayerGetHoverbike +/* f08c2b0: 0fc31f26 */ jal bmoveGetHoverbike /* f08c2b4: 00000000 */ nop /* f08c2b8: 8c530004 */ lw $s3,0x4($v0) /* f08c2bc: 24140001 */ addiu $s4,$zero,0x1 diff --git a/src/include/constants.h b/src/include/constants.h index 4d25b8a9e..093654a4d 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -586,9 +586,9 @@ #define CREDITSTYLE_C_BIG_C_BIG 10 #define CREDITSTYLE_TERMINATOR 20 -#define CROUCH_SQUAT 0 -#define CROUCH_HALF 1 -#define CROUCH_STAND 2 +#define CROUCHPOS_SQUAT 0 +#define CROUCHPOS_DUCK 1 +#define CROUCHPOS_STAND 2 #define DAMAGETYPE_0 0 #define DAMAGETYPE_1 1 diff --git a/src/include/game/bondbike.h b/src/include/game/bondbike.h index 6984789ae..08e8c4dd9 100644 --- a/src/include/game/bondbike.h +++ b/src/include/game/bondbike.h @@ -3,22 +3,22 @@ #include #include "types.h" -void currentPlayerBikeInit(void); -void func0f0d2184(void); -void func0f0d2294(void); -void currentPlayerTryBikeDismountAngle(f32 relativeangle, f32 distance); -void currentPlayerDismountBike(void); -void currentPlayerUpdateSpeedBike(struct movedata *data); -void func0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct defaultobj *obstacle); -s32 func0f0d2e18(struct coord *arg0, f32 arg1); -s32 func0f0d3298(struct coord *arg0, f32 arg1); -void func0f0d341c(struct coord *arg0); -s32 func0f0d363c(f32 arg0); -s32 func0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2); -s32 func0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4); -s32 func0f0d3840(struct coord *arg0, struct coord *arg1, struct coord *arg2); -s32 func0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2); -void func0f0d3c60(struct coord *arg0); -void func0f0d3d50(void); +void bbikeInit(void); +void bbikeExit(void); +void bbikeUpdateVehicleOffset(void); +void bbikeTryDismountAngle(f32 relativeangle, f32 distance); +void bbikeHandleActivate(void); +void bbikeApplyMoveData(struct movedata *data); +void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct defaultobj *obstacle); +s32 bbikeCalculateNewPosition(struct coord *arg0, f32 arg1); +s32 bbikeCalculateNewPositionWithPush(struct coord *arg0, f32 arg1); +void bbikeUpdateVertical(struct coord *arg0); +s32 bbike0f0d363c(f32 arg0); +s32 bbike0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2); +s32 bbike0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4); +s32 bbike0f0d3840(struct coord *arg0, struct coord *arg1, struct coord *arg2); +s32 bbike0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2); +void bbike0f0d3c60(struct coord *arg0); +void bbikeTick(void); #endif diff --git a/src/include/game/bondcutscene.h b/src/include/game/bondcutscene.h index 5e1706b2b..92859c19f 100644 --- a/src/include/game/bondcutscene.h +++ b/src/include/game/bondcutscene.h @@ -3,7 +3,7 @@ #include #include "types.h" -void currentPlayerSetMoveModeCutscene(void); -void func0f0c37c0(void); +void bcutsceneInit(void); +void bcutsceneTick(void); #endif diff --git a/src/include/game/bondeyespy.h b/src/include/game/bondeyespy.h index b1a31f5ae..5debb2206 100644 --- a/src/include/game/bondeyespy.h +++ b/src/include/game/bondeyespy.h @@ -4,15 +4,15 @@ #include "types.h" f32 eyespyFindGround(s16 *floorroom); -s32 eyespyCalculateNewY(f32 yvel); +s32 eyespyTryMoveUpwards(f32 yvel); s32 eyespyCalculateNewPosition(struct coord *vel); -bool func0f0cf728(struct coord *vel); -s32 func0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4); -s32 func0f0cf9f8(struct coord *arg0, struct coord *arg1, struct coord *arg2); -s32 func0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2); -s32 func0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *arg2); -void eyespyCalculateVerticalMovement(void); +bool eyespyCalculateNewPositionWithPush(struct coord *vel); +s32 eyespy0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4); +s32 eyespy0f0cf9f8(struct coord *arg0, struct coord *arg1, struct coord *arg2); +s32 eyespy0f0cfafc(struct coord *arg0, struct coord *arg1, struct coord *arg2); +s32 eyespy0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *arg2); +void eyespyUpdateVertical(void); bool eyespyTryLaunch(void); -void func0f0d0928(bool arg0); +void eyespyProcessInput(bool arg0); #endif diff --git a/src/include/game/bondgrab.h b/src/include/game/bondgrab.h index c16b69d94..af6465851 100644 --- a/src/include/game/bondgrab.h +++ b/src/include/game/bondgrab.h @@ -3,27 +3,27 @@ #include #include "types.h" -void currentPlayerGrabInit(void); -void currentPlayerUpdateGrabbedPropForRelease(void); -void func0f0ccbf0(struct coord *delta, f32 angle); -bool func0f0cd05c(f32 y); -s32 func0f0cd1a4(struct coord *delta, f32 angle, bool arg2); -bool func0f0cd970(struct coord *delta, f32 angle, bool arg2); -bool func0f0cdb04(f32 angle, bool arg2); -void func0f0cdb68(f32 angle); -void func0f0cdef0(void); -bool func0f0cdf64(struct coord *delta, struct coord *arg1, struct coord *arg2); -s32 func0f0cdfbc(struct coord *delta, struct coord *arg1, struct coord *arg2); -void func0f0ce0bc(struct coord *arg0); -void currentPlayerUpdatePrevPosGrab(void); -void func0f0ce178(void); -void func0f0ce1ac(void); -void func0f0ce450(void); -void currentPlayerUpdateSpeedSidewaysGrab(f32 targetspeed, f32 accelspeed, s32 mult); -void currentPlayerUpdateSpeedForwardsGrab(f32 target, f32 speed); -void currentPlayerUpdateSpeedGrab(struct movedata *data); -void currentPlayerUpdateSpeedThetaGrab(void); -void func0f0ce924(void); -void func0f0ceec4(void); +void bgrabInit(void); +void bgrabExit(void); +void bgrab0f0ccbf0(struct coord *delta, f32 angle); +bool bgrabTryMoveUpwards(f32 y); +s32 bgrabCalculateNewPosition(struct coord *delta, f32 angle, bool arg2); +bool bgrabCalculateNewPositiontWithPush(struct coord *delta, f32 angle, bool arg2); +bool bgrab0f0cdb04(f32 angle, bool arg2); +void bgrab0f0cdb68(f32 angle); +void bgrab0f0cdef0(void); +bool bgrab0f0cdf64(struct coord *delta, struct coord *arg1, struct coord *arg2); +s32 bgrab0f0cdfbc(struct coord *delta, struct coord *arg1, struct coord *arg2); +void bgrab0f0ce0bc(struct coord *arg0); +void bgrabUpdatePrevPos(void); +void bgrab0f0ce178(void); +void bgrabUpdateVertical(void); +void bgrabHandleActivate(void); +void bgrabUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult); +void bgrabUpdateSpeedForwards(f32 target, f32 speed); +void bgrabApplyMoveData(struct movedata *data); +void bgrabUpdateSpeedTheta(void); +void bgrab0f0ce924(void); +void bgrabTick(void); #endif diff --git a/src/include/game/bondhead.h b/src/include/game/bondhead.h index e560d554f..f1253ed1e 100644 --- a/src/include/game/bondhead.h +++ b/src/include/game/bondhead.h @@ -3,15 +3,15 @@ #include #include "types.h" -void currentPlayerFlipAnimation(void); -void currentPlayerUpdateIdleHeadRoll(void); -void currentPlayerUpdateHeadPos(struct coord *vel); -void currentPlayerUpdateHeadRot(struct coord *lookvel, struct coord *upvel); -void currentPlayerSetHeadDamp(f32 headdamp); -void currentPlayerUpdateHead(f32 arg0, f32 arg1); -void currentPlayerAdjustHeadAnimation(f32 speed); -void currentPlayerStartDeathAnimation(s16 animnum, u32 flip, f32 fstarttime, f32 speed); -void currentPlayerSetAnimSpeed(f32 speed); -f32 func0f11416c(void); +void bheadFlipAnimation(void); +void bheadUpdateIdleRoll(void); +void bheadUpdatePos(struct coord *vel); +void bheadUpdateRot(struct coord *lookvel, struct coord *upvel); +void bheadSetdamp(f32 headdamp); +void bheadUpdate(f32 arg0, f32 arg1); +void bheadAdjustAnimation(f32 speed); +void bheadStartDeathAnimation(s16 animnum, u32 flip, f32 fstarttime, f32 speed); +void bheadSetSpeed(f32 speed); +f32 bheadGetBreathingValue(void); #endif diff --git a/src/include/game/bondmove.h b/src/include/game/bondmove.h index 76a8bf104..fc5f211eb 100644 --- a/src/include/game/bondmove.h +++ b/src/include/game/bondmove.h @@ -3,44 +3,44 @@ #include #include "types.h" -void currentPlayerSetControlDef(u32 controldef); -void currentPlayerSetAutoMoveCentreEnabled(bool enabled); -void currentPlayerSetAutoAimY(bool enabled); -bool currentPlayerIsAutoAimYEnabled(void); -bool func0f0c7a8c(void); -bool currentPlayerIsInSightAimMode(void); -void currentPlayerUpdateAutoAimYProp(struct prop *prop, f32 autoaimy); -void currentPlayerSetAutoAimX(bool enabled); -bool currentPlayerIsAutoAimXEnabled(void); -bool func0f0c7bd0(void); -void currentPlayerUpdateAutoAimXProp(struct prop *prop, f32 autoaimx); -struct prop *currentPlayerGetHoverbike(void); -struct prop *currentPlayerGetGrabbedProp(void); -void currentPlayerGrabProp(struct prop *prop); -void currentPlayerSetMoveMode(u32 movemode); -void setMoveModeForAllPlayers(u32 movemode); -void func0f0c7f2c(void); -void currentPlayerUpdateSpeed(struct movedata *data); -void func0f0c8004(void); -f32 func0f0c805c(f32 value); -void currentPlayerUpdateSpeedVerta(f32 value); -f32 func0f0c82f8(f32 value); -void currentPlayerUpdateSpeedThetaControl(f32 value); -s32 func0f0c8598(void); -void movedataReset(struct movedata *data); -void func0f0c8b90(s32 arg0, s32 arg1, s32 arg2, s32 arg3); -void func0f0cb79c(struct player *player, struct coord *arg1, s16 *rooms); -void func0f0cb89c(struct player *player, s16 *rooms); -void func0f0cb8c4(struct player *player); -void func0f0cb904(struct coord *coord); -void func0f0cba88(f32 *a, f32 *b, struct coord *c, f32 mult1, f32 mult2); -void currentPlayerUpdateMoveInitSpeed(struct coord *newpos); -void currentPlayerUpdateFootsteps(bool arg0, bool arg1, bool arg2, bool arg3); -void func0f0cbf50(void); -void func0f0cc19c(struct coord *arg); -void func0f0cc3b8(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4); -void func0f0cc654(f32 arg0, f32 arg1, f32 arg2); -s32 currentPlayerGetCrouchPos(void); -s32 playerGetCrouchPos(s32 playernum); +void bmoveSetControlDef(u32 controldef); +void bmoveSetAutoMoveCentreEnabled(bool enabled); +void bmoveSetAutoAimY(bool enabled); +bool bmoveIsAutoAimYEnabled(void); +bool bmoveIsAutoAimYEnabledForCurrentWeapon(void); +bool bmoveIsInSightAimMode(void); +void bmoveUpdateAutoAimYProp(struct prop *prop, f32 autoaimy); +void bmoveSetAutoAimX(bool enabled); +bool bmoveIsAutoAimXEnabled(void); +bool bmoveIsAutoAimXEnabledForCurrentWeapon(void); +void bmoveUpdateAutoAimXProp(struct prop *prop, f32 autoaimx); +struct prop *bmoveGetHoverbike(void); +struct prop *bmoveGetGrabbedProp(void); +void bmoveGrabProp(struct prop *prop); +void bmoveSetMode(u32 movemode); +void bmoveSetModeForAllPlayers(u32 movemode); +void bmoveHandleActivate(void); +void bmoveApplyMoveData(struct movedata *data); +void bmoveUpdateSpeedTheta(void); +f32 bmoveGetSpeedVertaLimit(f32 value); +void bmoveUpdateSpeedVerta(f32 value); +f32 bmoveGetSpeedThetaControlLimit(f32 value); +void bmoveUpdateSpeedThetaControl(f32 value); +s32 bmove0f0c8598(void); +void bmoveResetMoveData(struct movedata *data); +void bmoveProcessInput(s32 arg0, s32 arg1, s32 arg2, s32 arg3); +void bmove0f0cb79c(struct player *player, struct coord *arg1, s16 *rooms); +void bmove0f0cb89c(struct player *player, s16 *rooms); +void bmove0f0cb8c4(struct player *player); +void bmove0f0cb904(struct coord *coord); +void bmove0f0cba88(f32 *a, f32 *b, struct coord *c, f32 mult1, f32 mult2); +void bmoveUpdateMoveInitSpeed(struct coord *newpos); +void bmoveTick(bool arg0, bool arg1, bool arg2, bool arg3); +void bmoveUpdateVerta(void); +void bmove0f0cc19c(struct coord *arg); +void bmoveUpdateHead(f32 arg0, f32 arg1, f32 arg2, Mtxf *arg3, f32 arg4); +void bmove0f0cc654(f32 arg0, f32 arg1, f32 arg2); +s32 bmoveGetCrouchPos(void); +s32 bmoveGetCrouchPosByPlayer(s32 playernum); #endif diff --git a/src/include/game/bondview.h b/src/include/game/bondview.h index 70e925536..861d59524 100644 --- a/src/include/game/bondview.h +++ b/src/include/game/bondview.h @@ -13,7 +13,7 @@ Gfx *bviewRenderStatic(Gfx *gdl, u32 arg1, s32 arg2); Gfx *bviewRenderSlayerRocketLens(Gfx *gdl, u32 arg1, u32 arg2); Gfx *bviewRenderFilmLens(Gfx *gdl, u32 colour, u32 alpha); Gfx *bviewRenderZoomBlur(Gfx *gdl, u32 colour, s32 alpha, f32 arg3, f32 arg4); -f32 func0f142d74(s32 arg0, f32 arg1, f32 arg2, f32 arg3); +f32 bview0f142d74(s32 arg0, f32 arg1, f32 arg2, f32 arg3); Gfx *bviewRenderFisheye(Gfx *gdl, s32 arg1, u32 arg2, u32 arg3, u32 arg4, u32 arg5); Gfx *bviewRenderEyespySideRect(Gfx *gdl, s32 *points, u8 r, u8 g, u8 b, u8 alpha); Gfx *bviewRenderEyespyDecorations(Gfx *gdl); @@ -22,8 +22,8 @@ Gfx *bviewRenderIrLens(Gfx *gdl); Gfx *bviewRenderRarePresents(Gfx *gdl); Gfx *bviewRenderHorizonScanner(Gfx *gdl); Gfx *bviewRenderIrBinoculars(Gfx *gdl); -void func0f148b40(u32 arg0); -void func0f148b6c(void); +void bviewSetBlur(u32 bluramount); +void bviewClearBlur(void); Gfx *bviewRenderNvBinoculars(Gfx *gdl); #endif diff --git a/src/include/game/bondwalk.h b/src/include/game/bondwalk.h index ab7c4c37e..b8bf2fb78 100644 --- a/src/include/game/bondwalk.h +++ b/src/include/game/bondwalk.h @@ -3,31 +3,31 @@ #include #include "types.h" -void currentPlayerWalkInit(void); -void currentPlayerSetSwayTarget(s32 value); -void currentPlayerAdjustCrouchPos(s32 value); -void func0f0c3b38(struct coord *param_1, struct defaultobj *obj); +void bwalkInit(void); +void bwalkSetSwayTarget(s32 value); +void bwalkAdjustCrouchPos(s32 value); +void bwalk0f0c3b38(struct coord *param_1, struct defaultobj *obj); s32 bwalkTryMoveUpwards(f32 amount); bool bwalkCalculateNewPosition(struct coord *vel, f32 rotateamount, bool apply, f32 extrawidth, s32 arg4); -bool func0f0c4250(struct coord *delta, f32 rotateamount, bool apply, f32 extrawidth, s32 types); -s32 func0f0c4764(struct coord *delta, struct coord *arg1, struct coord *arg2, s32 types); -s32 func0f0c47d0(struct coord *a, struct coord *b, struct coord *c, struct coord *d, struct coord *e, s32 types); -s32 func0f0c494c(struct coord *a, struct coord *b, struct coord *c, s32 types); -s32 func0f0c4a5c(struct coord *a, struct coord *b, struct coord *c, s32 types); -void func0f0c4d98(void); -void currentPlayerUpdateSpeedSidewaysWalk(f32 targetspeed, f32 accelspeed, s32 mult); -void currentPlayerUpdateSpeedForwardsWalk(f32 targetspeed, f32 accelspeed); -void currentPlayerUpdateVerticalMovement(void); -void currentPlayerApplyCrouchSpeed(void); -void currentPlayerUpdateCrouchOffsetWalk(void); -void func0f0c6180(void); -void func0f0c6318(void); -void func0f0c63bc(struct coord *arg0, u32 arg1, s32 types); -void currentPlayerUpdatePrevPosWalk(void); -void func0f0c65a8(void); -void currentPlayerUpdateSpeedWalk(struct movedata *data); -void currentPlayerApplyCrouchSpeedTheta(void); -u32 func0f0c69b8(void); -void func0f0c785c(void); +bool bwalkCalculateNewPositionWithPush(struct coord *delta, f32 rotateamount, bool apply, f32 extrawidth, s32 types); +s32 bwalk0f0c4764(struct coord *delta, struct coord *arg1, struct coord *arg2, s32 types); +s32 bwalk0f0c47d0(struct coord *a, struct coord *b, struct coord *c, struct coord *d, struct coord *e, s32 types); +s32 bwalk0f0c494c(struct coord *a, struct coord *b, struct coord *c, s32 types); +s32 bwalk0f0c4a5c(struct coord *a, struct coord *b, struct coord *c, s32 types); +void bwalk0f0c4d98(void); +void bwalkUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult); +void bwalkUpdateSpeedForwards(f32 targetspeed, f32 accelspeed); +void bwalkUpdateVertical(void); +void bwalkApplyCrouchSpeed(void); +void bwalkUpdateCrouchOffsetReal(void); +void bwalkUpdateCrouchOffset(void); +void bwalkUpdateTheta(void); +void bwalk0f0c63bc(struct coord *arg0, u32 arg1, s32 types); +void bwalkUpdatePrevPos(void); +void bwalkHandleActivate(void); +void bwalkApplyMoveData(struct movedata *data); +void bwalkUpdateSpeedTheta(void); +u32 bwalk0f0c69b8(void); +void bwalkTick(void); #endif