From 1affcb278053e9c16521b2c93ed9001e1ecb3e8b Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 14 Dec 2021 20:02:53 +1000 Subject: [PATCH] Rename chr functions --- src/game/bg.c | 8 +- src/game/bondeyespy.c | 24 +- src/game/bondgun.c | 6 +- src/game/bondwalk.c | 8 +- src/game/chr/chr.c | 374 +++++++++++++++---------------- src/game/chr/chraction.c | 212 +++++++++--------- src/game/chr/chraicommands.c | 26 +-- src/game/explosions/explosions.c | 6 +- src/game/game_011110.c | 8 +- src/game/game_0147d0.c | 2 +- src/game/game_014f10.c | 2 +- src/game/game_02cde0.c | 6 +- src/game/game_0b69d0.c | 24 +- src/game/game_129210.c | 4 +- src/game/game_1999b0.c | 2 +- src/game/lv.c | 6 +- src/game/prop.c | 18 +- src/game/propobj.c | 28 +-- src/game/sparks/sparks.c | 2 +- src/game/splat.c | 10 +- src/game/wallhit.c | 2 +- src/include/game/chr/chr.h | 86 +++---- src/include/game/splat.h | 4 +- 23 files changed, 434 insertions(+), 434 deletions(-) diff --git a/src/game/bg.c b/src/game/bg.c index a21764eb3..2d1afc6b6 100644 --- a/src/game/bg.c +++ b/src/game/bg.c @@ -5144,7 +5144,7 @@ glabel var7f1b75d0 /* f15baf0: 03320019 */ multu $t9,$s2 /* f15baf4: 00007012 */ mflo $t6 /* f15baf8: 020e7821 */ addu $t7,$s0,$t6 -/* f15bafc: 0fc0a124 */ jal func0f028490 +/* f15bafc: 0fc0a124 */ jal chr0f028490 /* f15bb00: c5ec0014 */ lwc1 $f12,0x14($t7) /* f15bb04: 3c188008 */ lui $t8,%hi(g_StageIndex) /* f15bb08: 8f18fc00 */ lw $t8,%lo(g_StageIndex)($t8) @@ -6208,7 +6208,7 @@ glabel var7f1b75d0 /* f15b8b4: 03320019 */ multu $t9,$s2 /* f15b8b8: 00007012 */ mflo $t6 /* f15b8bc: 020e7821 */ addu $t7,$s0,$t6 -/* f15b8c0: 0fc0a124 */ jal func0f028490 +/* f15b8c0: 0fc0a124 */ jal chr0f028490 /* f15b8c4: c5ec0014 */ lwc1 $f12,0x14($t7) /* f15b8c8: 3c188008 */ lui $t8,%hi(g_StageIndex) /* f15b8cc: 8f18fc00 */ lw $t8,%lo(g_StageIndex)($t8) @@ -7270,7 +7270,7 @@ glabel var7f1b75d0 /* f156248: 03320019 */ multu $t9,$s2 /* f15624c: 00007012 */ mflo $t6 /* f156250: 020e7821 */ addu $t7,$s0,$t6 -/* f156254: 0fc09fa6 */ jal func0f028490 +/* f156254: 0fc09fa6 */ jal chr0f028490 /* f156258: c5ec0014 */ lwc1 $f12,0x14($t7) /* f15625c: 3c188008 */ lui $t8,0x8008 /* f156260: 8f182460 */ lw $t8,0x2460($t8) @@ -8252,7 +8252,7 @@ glabel var7f1b75d0 // // // ae4 // func0f15c880(g_Stages[g_StageIndex].unk14); -// func0f028490(g_Stages[g_StageIndex].unk14); +// chr0f028490(g_Stages[g_StageIndex].unk14); // // // b34 // for (s4 = 0; s4 < 4; s4++) { // might not be s4 diff --git a/src/game/bondeyespy.c b/src/game/bondeyespy.c index 6c714ded3..36283fae4 100644 --- a/src/game/bondeyespy.c +++ b/src/game/bondeyespy.c @@ -95,7 +95,7 @@ s32 eyespyTryMoveUpwards(f32 yvel) } func0f065e74(&prop->pos, prop->rooms, &dstpos, dstrooms); - func0f021fa8(prop->chr, &dstpos, dstrooms); + chr0f021fa8(prop->chr, &dstpos, dstrooms); propSetPerimEnabled(prop, false); f0 -= 0.1f; @@ -164,7 +164,7 @@ s32 eyespyCalculateNewPosition(struct coord *vel) } } - func0f021fa8(eyespyprop->chr, &dstpos, dstrooms); + chr0f021fa8(eyespyprop->chr, &dstpos, dstrooms); // Check if the eyespy is moving 13cm or more along either the X or Z // axis in a single frame. If less, only do a collision check for the @@ -539,7 +539,7 @@ void eyespyUpdateVertical(void) g_EyespyHit = sp73; } - func0f0220ac(chr); + chr0f0220ac(chr); dist.x = prop->pos.x - origpos.x; dist.y = prop->pos.y - origpos.y; @@ -675,7 +675,7 @@ bool eyespyTryLaunch(void) func0f065e74(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &g_Vars.currentplayer->eyespy->prop->pos, g_Vars.currentplayer->eyespy->prop->rooms); - func0f0220ac(chr); + chr0f0220ac(chr); return launched; } @@ -1281,7 +1281,7 @@ glabel var7f1adb00 /* f0d165c: 030e2023 */ subu $a0,$t8,$t6 /* f0d1660: 0081001a */ div $zero,$a0,$at /* f0d1664: 00002012 */ mflo $a0 -/* f0d1668: 0fc0842c */ jal propClearReferences +/* f0d1668: 0fc0842c */ jal chrClearReferences /* f0d166c: 00000000 */ nop /* f0d1670: 3c09800a */ lui $t1,0x800a /* f0d1674: 44808000 */ mtc1 $zero,$f16 @@ -2279,7 +2279,7 @@ glabel var7f1adb00 /* f0d2540: 03382023 */ subu $a0,$t9,$t8 /* f0d2544: 0081001a */ div $zero,$a0,$at /* f0d2548: 00002012 */ mflo $a0 -/* f0d254c: 0fc0842c */ jal propClearReferences +/* f0d254c: 0fc0842c */ jal chrClearReferences /* f0d2550: 00000000 */ nop /* f0d2554: 8faf00e4 */ lw $t7,0xe4($sp) .PF0f0d2558: @@ -2893,7 +2893,7 @@ glabel var7f1adb00 /* f0d10b8: 032f2023 */ subu $a0,$t9,$t7 /* f0d10bc: 0081001a */ div $zero,$a0,$at /* f0d10c0: 00002012 */ mflo $a0 -/* f0d10c4: 0fc083e4 */ jal propClearReferences +/* f0d10c4: 0fc083e4 */ jal chrClearReferences /* f0d10c8: 00000000 */ nop /* f0d10cc: 3c09800a */ lui $t1,%hi(g_Vars) /* f0d10d0: 44808000 */ mtc1 $zero,$f16 @@ -3891,7 +3891,7 @@ glabel var7f1adb00 /* f0d1f9c: 01d92023 */ subu $a0,$t6,$t9 /* f0d1fa0: 0081001a */ div $zero,$a0,$at /* f0d1fa4: 00002012 */ mflo $a0 -/* f0d1fa8: 0fc083e4 */ jal propClearReferences +/* f0d1fa8: 0fc083e4 */ jal chrClearReferences /* f0d1fac: 00000000 */ nop /* f0d1fb0: 8fb800e4 */ lw $t8,0xe4($sp) .L0f0d1fb4: @@ -4495,7 +4495,7 @@ glabel var7f1adb00 /* f0ce81c: 01f92023 */ subu $a0,$t7,$t9 /* f0ce820: 0081001a */ div $zero,$a0,$at /* f0ce824: 00002012 */ mflo $a0 -/* f0ce828: 0fc082b4 */ jal propClearReferences +/* f0ce828: 0fc082b4 */ jal chrClearReferences /* f0ce82c: 00000000 */ sll $zero,$zero,0x0 /* f0ce830: 3c09800a */ lui $t1,0x800a /* f0ce834: 44808000 */ mtc1 $zero,$f16 @@ -5522,7 +5522,7 @@ glabel var7f1adb00 /* f0cf768: 030f2023 */ subu $a0,$t8,$t7 /* f0cf76c: 0081001a */ div $zero,$a0,$at /* f0cf770: 00002012 */ mflo $a0 -/* f0cf774: 0fc082b4 */ jal propClearReferences +/* f0cf774: 0fc082b4 */ jal chrClearReferences /* f0cf778: 00000000 */ sll $zero,$zero,0x0 /* f0cf77c: 8fae00e4 */ lw $t6,0xe4($sp) .NB0f0cf780: @@ -5764,7 +5764,7 @@ glabel var7f1adb00 // // chr->chrflags |= CHRCFLAG_HIDDEN; // -// propClearReferences(g_Vars.currentplayer->eyespy->prop - g_Vars.props); +// chrClearReferences(g_Vars.currentplayer->eyespy->prop - g_Vars.props); // } // // // 0e8 @@ -6075,7 +6075,7 @@ glabel var7f1adb00 // weaponPlayPickupSound(WEAPON_EYESPY); // currentPlayerQueuePickupWeaponHudmsg(WEAPON_EYESPY, false); // func0f0926bc(g_Vars.currentplayer->eyespy->prop, 1, 0xffff); -// propClearReferences(g_Vars.currentplayer->eyespy->prop - g_Vars.props); +// chrClearReferences(g_Vars.currentplayer->eyespy->prop - g_Vars.props); // } // // coordTriggerProxies(&chr->prop->pos, true); diff --git a/src/game/bondgun.c b/src/game/bondgun.c index 2d64e5efe..6cb856581 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -25186,7 +25186,7 @@ glabel var7f1aca90 .L0f0a78e4: /* f0a78e4: 8e6f00bc */ lw $t7,0xbc($s3) .L0f0a78e8: -/* f0a78e8: 0fc08af9 */ jal func0f022be4 +/* f0a78e8: 0fc08af9 */ jal chr0f022be4 /* f0a78ec: 8de40004 */ lw $a0,0x4($t7) /* f0a78f0: 284100ff */ slti $at,$v0,0xff /* f0a78f4: 1020000f */ beqz $at,.L0f0a7934 @@ -26027,7 +26027,7 @@ glabel var7f1aca90 .L0f0a78e4: /* f0a78e4: 8e6f00bc */ lw $t7,0xbc($s3) .L0f0a78e8: -/* f0a78e8: 0fc08af9 */ jal func0f022be4 +/* f0a78e8: 0fc08af9 */ jal chr0f022be4 /* f0a78ec: 8de40004 */ lw $a0,0x4($t7) /* f0a78f0: 284100ff */ slti $at,$v0,0xff /* f0a78f4: 1020000f */ beqz $at,.L0f0a7934 @@ -26868,7 +26868,7 @@ glabel var7f1aca90 .NB0f0a5630: /* f0a5630: 8e6f00bc */ lw $t7,0xbc($s3) .NB0f0a5634: -/* f0a5634: 0fc089b4 */ jal func0f022be4 +/* f0a5634: 0fc089b4 */ jal chr0f022be4 /* f0a5638: 8de40004 */ lw $a0,0x4($t7) /* f0a563c: 284100ff */ slti $at,$v0,0xff /* f0a5640: 1020000f */ beqz $at,.NB0f0a5680 diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index aa8ddd9e5..4188b8cc1 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -1082,7 +1082,7 @@ glabel bwalkCalculateNewPositionWithPush /* f0c45ac: 27a40058 */ addiu $a0,$sp,0x58 /* f0c45b0: 0fc195e9 */ jal roomsCopy /* f0c45b4: 24a50028 */ addiu $a1,$a1,0x28 -/* f0c45b8: 0fc0882b */ jal func0f0220ac +/* f0c45b8: 0fc0882b */ jal chr0f0220ac /* f0c45bc: 8fa40074 */ lw $a0,0x74($sp) /* f0c45c0: 8fab0074 */ lw $t3,0x74($sp) /* f0c45c4: 27a50068 */ addiu $a1,$sp,0x68 @@ -1425,7 +1425,7 @@ glabel bwalkCalculateNewPositionWithPush /* f0c45ac: 27a40058 */ addiu $a0,$sp,0x58 /* f0c45b0: 0fc195e9 */ jal roomsCopy /* f0c45b4: 24a50028 */ addiu $a1,$a1,0x28 -/* f0c45b8: 0fc0882b */ jal func0f0220ac +/* f0c45b8: 0fc0882b */ jal chr0f0220ac /* f0c45bc: 8fa40074 */ lw $a0,0x74($sp) /* f0c45c0: 8fab0074 */ lw $t3,0x74($sp) /* f0c45c4: 27a50068 */ addiu $a1,$sp,0x68 @@ -1768,7 +1768,7 @@ glabel bwalkCalculateNewPositionWithPush /* f0c45ac: 27a40058 */ addiu $a0,$sp,0x58 /* f0c45b0: 0fc195e9 */ jal roomsCopy /* f0c45b4: 24a50028 */ addiu $a1,$a1,0x28 -/* f0c45b8: 0fc0882b */ jal func0f0220ac +/* f0c45b8: 0fc0882b */ jal chr0f0220ac /* f0c45bc: 8fa40074 */ lw $a0,0x74($sp) /* f0c45c0: 8fab0074 */ lw $t3,0x74($sp) /* f0c45c4: 27a50068 */ addiu $a1,$sp,0x68 @@ -1971,7 +1971,7 @@ glabel bwalkCalculateNewPositionWithPush // // propDeregisterRooms(obstacle); // roomsCopy(newrooms, obstacle->rooms); -// func0f0220ac(chr); +// chr0f0220ac(chr); // modelSetRootPosition(chr->model, &newpos); // // result = bwalkCalculateNewPosition(delta, rotateamount, apply, extrawidth, types); diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 83c244420..8a698d1ac 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -149,7 +149,7 @@ void propsTick2(void) } while (!done); } -s32 getNumChrSlots(void) +s32 chrsGetNumSlots(void) { return g_NumChrSlots; } @@ -239,22 +239,22 @@ struct gfxvtx *chrAllocateVertices(s32 numvertices) return (struct gfxvtx *) gfxAllocate(numvertices * sizeof(struct gfxvtx)); } -void setVar8006297c(u32 arg0) +void chrsSetVar8006297c(u32 arg0) { var8006297c = arg0; } -u32 getVar8006297c(void) +u32 chrsGetVar8006297c(void) { return var8006297c; } -void setVar80062980(u32 arg0) +void chrsSetVar80062980(u32 arg0) { var80062980 = arg0; } -u32 getVar80062980(void) +u32 chrsGetVar80062980(void) { return var80062980; } @@ -311,7 +311,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom return; } - propChrGetBbox(prop, &width, &ymax, &ymin); + chrGetBbox(prop, &width, &ymax, &ymin); halfwidth = width * 0.5f; chrSetPerimEnabled(chr, false); @@ -336,7 +336,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom } #endif - func0f021fa8(chr, dstpos, dstrooms); + chr0f021fa8(chr, dstpos, dstrooms); movex = dstpos->x - prop->pos.x; movez = dstpos->z - prop->pos.z; @@ -398,7 +398,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom } #endif - func0f021fa8(chr, &sp44, dstrooms); + chr0f021fa8(chr, &sp44, dstrooms); movex = sp44.x - prop->pos.x; movez = sp44.z - prop->pos.z; @@ -454,7 +454,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom } #endif - func0f021fa8(chr, &sp44, dstrooms); + chr0f021fa8(chr, &sp44, dstrooms); movex = sp44.x - prop->pos.x; movez = sp44.z - prop->pos.z; @@ -508,7 +508,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom } #endif - func0f021fa8(chr, &sp44, dstrooms); + chr0f021fa8(chr, &sp44, dstrooms); movex = sp44.x - prop->pos.x; movez = sp44.z - prop->pos.z; @@ -551,7 +551,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom } } -bool func0f01f264(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 arg3, bool arg4) +bool chr0f01f264(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 arg3, bool arg4) { bool result; struct coord newpos; @@ -564,9 +564,9 @@ bool func0f01f264(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 arg3, newpos.y = pos->y + arg3; newpos.z = pos->z; - propChrGetBbox(chr->prop, &width, &ymax, &ymin); + chrGetBbox(chr->prop, &width, &ymax, &ymin); func0f065e74(pos, rooms, &newpos, newrooms); - func0f021fa8(chr, &newpos, newrooms); + chr0f021fa8(chr, &newpos, newrooms); chrSetPerimEnabled(chr, false); result = cdTestVolume(&newpos, width, newrooms, CDTYPE_ALL, 1, ymax - chr->prop->pos.y, @@ -585,7 +585,7 @@ bool func0f01f264(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 arg3, #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel func0f01f378 +glabel chr0f01f378 .late_rodata glabel var7f1a98dcpf .word 0xc9742400 @@ -1313,7 +1313,7 @@ glabel var7f1a992cpf /* f01fea4: 27a600fc */ addiu $a2,$sp,0xfc /* f01fea8: 24090001 */ li $t1,0x1 /* f01feac: afa90010 */ sw $t1,0x10($sp) -/* f01feb0: 0fc07ce1 */ jal func0f01f264 +/* f01feb0: 0fc07ce1 */ jal chr0f01f264 /* f01feb4: 8fa700f0 */ lw $a3,0xf0($sp) /* f01feb8: 10400005 */ beqz $v0,.PF0f01fed0 /* f01febc: 3c017f1b */ lui $at,0x7f1b @@ -1342,7 +1342,7 @@ glabel var7f1a992cpf /* f01ff0c: afb90010 */ sw $t9,0x10($sp) /* f01ff10: 02202825 */ move $a1,$s1 /* f01ff14: 27a600fc */ addiu $a2,$sp,0xfc -/* f01ff18: 0fc07ce1 */ jal func0f01f264 +/* f01ff18: 0fc07ce1 */ jal chr0f01f264 /* f01ff1c: 8fa700f0 */ lw $a3,0xf0($sp) /* f01ff20: 10400005 */ beqz $v0,.PF0f01ff38 /* f01ff24: 3c017f1b */ lui $at,0x7f1b @@ -1410,7 +1410,7 @@ glabel var7f1a992cpf /* f02000c: e7a40090 */ swc1 $f4,0x90($sp) /* f020010: 02002025 */ move $a0,$s0 /* f020014: 27a50088 */ addiu $a1,$sp,0x88 -/* f020018: 0fc08839 */ jal func0f021fa8 +/* f020018: 0fc08839 */ jal chr0f021fa8 /* f02001c: 27a60078 */ addiu $a2,$sp,0x78 /* f020020: 10000004 */ b .PF0f020034 /* f020024: 8e050024 */ lw $a1,0x24($s0) @@ -1595,7 +1595,7 @@ glabel var7f1a992cpf /* f0202bc: 02202825 */ move $a1,$s1 /* f0202c0: 27a600fc */ addiu $a2,$sp,0xfc /* f0202c4: 8fa700f0 */ lw $a3,0xf0($sp) -/* f0202c8: 0fc07ce1 */ jal func0f01f264 +/* f0202c8: 0fc07ce1 */ jal chr0f01f264 /* f0202cc: afa00010 */ sw $zero,0x10($sp) /* f0202d0: 44808000 */ mtc1 $zero,$f16 /* f0202d4: 10400007 */ beqz $v0,.PF0f0202f4 @@ -1753,7 +1753,7 @@ glabel var7f1a992cpf /* f020508: e6240004 */ swc1 $f4,0x4($s1) /* f02050c: 02002025 */ move $a0,$s0 /* f020510: 02202825 */ move $a1,$s1 -/* f020514: 0fc08839 */ jal func0f021fa8 +/* f020514: 0fc08839 */ jal chr0f021fa8 /* f020518: 27a600fc */ addiu $a2,$sp,0xfc /* f02051c: c60000b4 */ lwc1 $f0,0xb4($s0) .PF0f020520: @@ -1824,7 +1824,7 @@ glabel var7f1a992cpf /* f02060c: 14a3fff3 */ bne $a1,$v1,.PF0f0205dc /* f020610: 00000000 */ nop .PF0f020614: -/* f020614: 0fc0887a */ jal func0f0220ac +/* f020614: 0fc0887a */ jal chr0f0220ac /* f020618: 02002025 */ move $a0,$s0 /* f02061c: 8fa40118 */ lw $a0,0x118($sp) /* f020620: 260500fc */ addiu $a1,$s0,0xfc @@ -1839,7 +1839,7 @@ glabel var7f1a992cpf ); #elif VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func0f01f378 +glabel chr0f01f378 .late_rodata glabel var7f1a86ac .word 0xc9742400 @@ -2585,7 +2585,7 @@ glabel var7f1a8720 /* f01fd88: 27a600fc */ addiu $a2,$sp,0xfc /* f01fd8c: 24090001 */ addiu $t1,$zero,0x1 /* f01fd90: afa90010 */ sw $t1,0x10($sp) -/* f01fd94: 0fc07c99 */ jal func0f01f264 +/* f01fd94: 0fc07c99 */ jal chr0f01f264 /* f01fd98: 8fa700f0 */ lw $a3,0xf0($sp) /* f01fd9c: 10400005 */ beqz $v0,.L0f01fdb4 /* f01fda0: 3c017f1b */ lui $at,%hi(var7f1a86dc) @@ -2614,7 +2614,7 @@ glabel var7f1a8720 /* f01fdf0: afb90010 */ sw $t9,0x10($sp) /* f01fdf4: 02202825 */ or $a1,$s1,$zero /* f01fdf8: 27a600fc */ addiu $a2,$sp,0xfc -/* f01fdfc: 0fc07c99 */ jal func0f01f264 +/* f01fdfc: 0fc07c99 */ jal chr0f01f264 /* f01fe00: 8fa700f0 */ lw $a3,0xf0($sp) /* f01fe04: 10400005 */ beqz $v0,.L0f01fe1c /* f01fe08: 3c017f1b */ lui $at,%hi(var7f1a86e0) @@ -2684,7 +2684,7 @@ glabel var7f1a8720 /* f01fef8: e7aa0090 */ swc1 $f10,0x90($sp) /* f01fefc: 02002025 */ or $a0,$s0,$zero /* f01ff00: 27a50088 */ addiu $a1,$sp,0x88 -/* f01ff04: 0fc087ea */ jal func0f021fa8 +/* f01ff04: 0fc087ea */ jal chr0f021fa8 /* f01ff08: 27a60078 */ addiu $a2,$sp,0x78 /* f01ff0c: 10000004 */ b .L0f01ff20 /* f01ff10: 8e050024 */ lw $a1,0x24($s0) @@ -2873,7 +2873,7 @@ glabel var7f1a8720 /* f0201b8: 02202825 */ or $a1,$s1,$zero /* f0201bc: 27a600fc */ addiu $a2,$sp,0xfc /* f0201c0: 8fa700f0 */ lw $a3,0xf0($sp) -/* f0201c4: 0fc07c99 */ jal func0f01f264 +/* f0201c4: 0fc07c99 */ jal chr0f01f264 /* f0201c8: afa00010 */ sw $zero,0x10($sp) /* f0201cc: 44809000 */ mtc1 $zero,$f18 /* f0201d0: 10400007 */ beqz $v0,.L0f0201f0 @@ -3029,7 +3029,7 @@ glabel var7f1a8720 /* f0203fc: e62a0004 */ swc1 $f10,0x4($s1) /* f020400: 02002025 */ or $a0,$s0,$zero /* f020404: 02202825 */ or $a1,$s1,$zero -/* f020408: 0fc087ea */ jal func0f021fa8 +/* f020408: 0fc087ea */ jal chr0f021fa8 /* f02040c: 27a600fc */ addiu $a2,$sp,0xfc /* f020410: c60000b4 */ lwc1 $f0,0xb4($s0) .L0f020414: @@ -3100,7 +3100,7 @@ glabel var7f1a8720 /* f020500: 14a3fff3 */ bne $a1,$v1,.L0f0204d0 /* f020504: 00000000 */ nop .L0f020508: -/* f020508: 0fc0882b */ jal func0f0220ac +/* f020508: 0fc0882b */ jal chr0f0220ac /* f02050c: 02002025 */ or $a0,$s0,$zero /* f020510: 8fa40118 */ lw $a0,0x118($sp) /* f020514: 260500fc */ addiu $a1,$s0,0xfc @@ -3115,7 +3115,7 @@ glabel var7f1a8720 ); #else GLOBAL_ASM( -glabel func0f01f378 +glabel chr0f01f378 .late_rodata glabel var7f1a86ac .word 0xc9742400 @@ -3796,7 +3796,7 @@ glabel var7f1a8720 /* f01fa74: 02202825 */ or $a1,$s1,$zero /* f01fa78: 11600016 */ beqz $t3,.NB0f01fad4 /* f01fa7c: 27a600cc */ addiu $a2,$sp,0xcc -/* f01fa80: 0fc07c17 */ jal func0f01f264 +/* f01fa80: 0fc07c17 */ jal chr0f01f264 /* f01fa84: 8fa700c0 */ lw $a3,0xc0($sp) /* f01fa88: 10400009 */ beqz $v0,.NB0f01fab0 /* f01fa8c: 3c017f1a */ lui $at,0x7f1a @@ -3827,7 +3827,7 @@ glabel var7f1a8720 /* f01fae4: 24010003 */ addiu $at,$zero,0x3 /* f01fae8: 02202825 */ or $a1,$s1,$zero /* f01faec: 27a600cc */ addiu $a2,$sp,0xcc -/* f01faf0: 0fc07c17 */ jal func0f01f264 +/* f01faf0: 0fc07c17 */ jal chr0f01f264 /* f01faf4: 8fa700c0 */ lw $a3,0xc0($sp) /* f01faf8: 10400009 */ beqz $v0,.NB0f01fb20 /* f01fafc: 3c017f1a */ lui $at,0x7f1a @@ -3901,7 +3901,7 @@ glabel var7f1a8720 /* f01fbfc: e7aa0088 */ swc1 $f10,0x88($sp) /* f01fc00: 02002025 */ or $a0,$s0,$zero /* f01fc04: 27a50080 */ addiu $a1,$sp,0x80 -/* f01fc08: 0fc086ba */ jal func0f021fa8 +/* f01fc08: 0fc086ba */ jal chr0f021fa8 /* f01fc0c: 27a60070 */ addiu $a2,$sp,0x70 /* f01fc10: 10000004 */ beqz $zero,.NB0f01fc24 /* f01fc14: 8e050024 */ lw $a1,0x24($s0) @@ -4025,7 +4025,7 @@ glabel var7f1a8720 /* f01fdc4: 02002025 */ or $a0,$s0,$zero /* f01fdc8: 02202825 */ or $a1,$s1,$zero /* f01fdcc: 27a600cc */ addiu $a2,$sp,0xcc -/* f01fdd0: 0fc07c17 */ jal func0f01f264 +/* f01fdd0: 0fc07c17 */ jal chr0f01f264 /* f01fdd4: 8fa700c0 */ lw $a3,0xc0($sp) /* f01fdd8: 44809000 */ mtc1 $zero,$f18 /* f01fddc: 10400007 */ beqz $v0,.NB0f01fdfc @@ -4197,7 +4197,7 @@ glabel var7f1a8720 /* f020040: 27a400cc */ addiu $a0,$sp,0xcc /* f020044: 0fc19283 */ jal roomsCopy /* f020048: 8fa50044 */ lw $a1,0x44($sp) -/* f02004c: 0fc086f9 */ jal func0f0220ac +/* f02004c: 0fc086f9 */ jal chr0f0220ac /* f020050: 02002025 */ or $a0,$s0,$zero /* f020054: 8fa400e8 */ lw $a0,0xe8($sp) /* f020058: 260500fc */ addiu $a1,$s0,0xfc @@ -4212,7 +4212,7 @@ glabel var7f1a8720 ); #endif -s32 getNumFreeChrSlots(void) +s32 chrsGetNumFree(void) { s32 count = 0; s32 i; @@ -4250,7 +4250,7 @@ f32 chrGetArmor(struct chrdata *chr) return 0; } -s16 getNextUnusedChrnum(void) +s16 chrsGetNextUnusedChrnum(void) { s32 chrnum; struct chrdata *chr; @@ -4281,7 +4281,7 @@ void chrInit(struct prop *prop, u8 *ailist) } prop->chr = chr; - chr->chrnum = getNextUnusedChrnum(); + chr->chrnum = chrsGetNextUnusedChrnum(); chrRegister(chr->chrnum, i); chr->headnum = 0; @@ -4484,7 +4484,7 @@ void chrInit(struct prop *prop, u8 *ailist) chrInitSplats(chr); } -struct prop *func0f020b14(struct prop *prop, struct model *model, +struct prop *chr0f020b14(struct prop *prop, struct model *model, struct coord *pos, s16 *rooms, f32 faceangle, u8 *ailist) { struct chrdata *chr; @@ -4500,7 +4500,7 @@ struct prop *func0f020b14(struct prop *prop, struct model *model, chr = prop->chr; - modelSetAnim70(model, func0f01f378); + modelSetAnim70(model, chr0f01f378); model->chr = chr; model->unk01 = 1; chr->model = model; @@ -4521,7 +4521,7 @@ struct prop *func0f020b14(struct prop *prop, struct model *model, propDeregisterRooms(prop); roomsCopy(rooms, prop->rooms); - func0f0220ac(chr); + chr0f0220ac(chr); modelSetRootPosition(model, &prop->pos); nodetype = chr->model->filedata->rootnode->type; @@ -4540,12 +4540,12 @@ struct prop *func0f020b14(struct prop *prop, struct model *model, return prop; } -struct prop *propAllocateChr(struct model *model, struct coord *pos, s16 *rooms, f32 faceangle, u8 *ailist) +struct prop *chrAllocate(struct model *model, struct coord *pos, s16 *rooms, f32 faceangle, u8 *ailist) { struct prop *prop = propAllocate(); if (prop) { - prop = func0f020b14(prop, model, pos, rooms, faceangle, ailist); + prop = chr0f020b14(prop, model, pos, rooms, faceangle, ailist); if (cheatIsActive(CHEAT_ENEMYSHIELDS)) { chrSetShield(prop->chr, 8); @@ -4558,7 +4558,7 @@ struct prop *propAllocateChr(struct model *model, struct coord *pos, s16 *rooms, /** * Appears to hide a chr. If removechr is true, deallocates the chr completely. */ -void func0f020d44(struct prop *prop, bool removechr) +void chr0f020d44(struct prop *prop, bool removechr) { struct chrdata *chr = prop->chr; struct model *model = chr->model; @@ -4612,7 +4612,7 @@ void func0f020d44(struct prop *prop, bool removechr) chr->cover = -1; } - propClearReferences(prop - g_Vars.props); + chrClearReferences(prop - g_Vars.props); projectilesUnrefOwner(prop); if (g_Vars.normmplayerisrunning == false && g_MissionConfig.iscoop) { @@ -4632,7 +4632,7 @@ void func0f020d44(struct prop *prop, bool removechr) } } -void propClearReferences(s32 propnum) +void chrClearReferences(s32 propnum) { s32 i; s32 j; @@ -4661,7 +4661,7 @@ void propClearReferences(s32 propnum) } } -void func0f0211a8(f32 arg0) +void chr0f0211a8(f32 arg0) { s32 i; @@ -4674,7 +4674,7 @@ void func0f0211a8(f32 arg0) } } -f32 func0f02124c(void) +f32 chr0f02124c(void) { return var80062968; } @@ -4736,7 +4736,7 @@ void chrFlinchHead(struct chrdata *chr, f32 arg1) chr->hidden2 |= value << 13; } -f32 func0f02143c(struct chrdata *chr) +f32 chr0f02143c(struct chrdata *chr) { f32 value = chr->flinchcnt; @@ -4757,11 +4757,11 @@ f32 func0f02143c(struct chrdata *chr) return value; } -void func0f02152c(void); +void chr0f02152c(void); #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel func0f02152c +glabel chr0f02152c .late_rodata glabel var7f1a8740 .word 0x40c907a9 @@ -5205,7 +5205,7 @@ glabel var7f1a879c /* f021ab4: 00c02025 */ or $a0,$a2,$zero /* f021ab8: afa20028 */ sw $v0,0x28($sp) /* f021abc: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f021ac0: 0fc0850f */ jal func0f02143c +/* f021ac0: 0fc0850f */ jal chr0f02143c /* f021ac4: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021ac8: 3c0c800a */ lui $t4,%hi(var8009cd1c) /* f021acc: 8d8ccd1c */ lw $t4,%lo(var8009cd1c)($t4) @@ -5313,7 +5313,7 @@ glabel var7f1a879c /* f021c38: afb80088 */ sw $t8,0x88($sp) /* f021c3c: 00c02025 */ or $a0,$a2,$zero /* f021c40: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f021c44: 0fc0850f */ jal func0f02143c +/* f021c44: 0fc0850f */ jal chr0f02143c /* f021c48: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021c4c: 3c017f1b */ lui $at,%hi(var7f1a8780) /* f021c50: c42a8780 */ lwc1 $f10,%lo(var7f1a8780)($at) @@ -5339,7 +5339,7 @@ glabel var7f1a879c /* f021c98: 14ea0033 */ bne $a3,$t2,.L0f021d68 /* f021c9c: 00c02025 */ or $a0,$a2,$zero /* f021ca0: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f021ca4: 0fc0850f */ jal func0f02143c +/* f021ca4: 0fc0850f */ jal chr0f02143c /* f021ca8: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021cac: 3c19800a */ lui $t9,%hi(var8009cd1c) /* f021cb0: 3c017f1b */ lui $at,%hi(var7f1a8788) @@ -5555,7 +5555,7 @@ glabel var7f1a879c ); #else GLOBAL_ASM( -glabel func0f02152c +glabel chr0f02152c .late_rodata glabel var7f1a8740 .word 0x40c907a9 @@ -5999,7 +5999,7 @@ glabel var7f1a879c /* f021ab4: 00c02025 */ or $a0,$a2,$zero /* f021ab8: afa20028 */ sw $v0,0x28($sp) /* f021abc: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f021ac0: 0fc0850f */ jal func0f02143c +/* f021ac0: 0fc0850f */ jal chr0f02143c /* f021ac4: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021ac8: 3c0c800a */ lui $t4,%hi(var8009cd1c) /* f021acc: 8d8ccd1c */ lw $t4,%lo(var8009cd1c)($t4) @@ -6107,7 +6107,7 @@ glabel var7f1a879c /* f021c38: afb80088 */ sw $t8,0x88($sp) /* f021c3c: 00c02025 */ or $a0,$a2,$zero /* f021c40: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f021c44: 0fc0850f */ jal func0f02143c +/* f021c44: 0fc0850f */ jal chr0f02143c /* f021c48: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021c4c: 3c017f1b */ lui $at,%hi(var7f1a8780) /* f021c50: c42a8780 */ lwc1 $f10,%lo(var7f1a8780)($at) @@ -6133,7 +6133,7 @@ glabel var7f1a879c /* f021c98: 14ea0033 */ bne $a3,$t2,.L0f021d68 /* f021c9c: 00c02025 */ or $a0,$a2,$zero /* f021ca0: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f021ca4: 0fc0850f */ jal func0f02143c +/* f021ca4: 0fc0850f */ jal chr0f02143c /* f021ca8: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021cac: 3c19800a */ lui $t9,%hi(var8009cd1c) /* f021cb0: 3c017f1b */ lui $at,%hi(var7f1a8788) @@ -6349,7 +6349,7 @@ glabel var7f1a879c ); #endif -void func0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms) +void chr0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms) { struct coord lower; struct coord upper; @@ -6382,19 +6382,19 @@ void func0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms) func0f1650d0(&lower, &upper, rooms, 7, 1); } -void func0f022084(struct chrdata *chr, s16 *room) +void chr0f022084(struct chrdata *chr, s16 *room) { - func0f021fa8(chr, &chr->prop->pos, room); + chr0f021fa8(chr, &chr->prop->pos, room); } -void func0f0220ac(struct chrdata *chr) +void chr0f0220ac(struct chrdata *chr) { propDeregisterRooms(chr->prop); - func0f022084(chr, chr->prop->rooms); + chr0f022084(chr, chr->prop->rooms); propRegisterRooms(chr->prop); } -void func0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2) +void chr0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2) { struct model *model = chr->model; @@ -6442,7 +6442,7 @@ u32 var800629d0 = 0x00000000; u32 var800629d4 = 0x00000000; GLOBAL_ASM( -glabel func0f022214 +glabel chr0f022214 .late_rodata glabel var7f1a87a0 .word 0x3fa8dd79 @@ -6586,7 +6586,7 @@ glabel var7f1a87a8 /* f022404: 8e300020 */ lw $s0,0x20($s1) /* f022408: 02802025 */ or $a0,$s4,$zero /* f02240c: 02202825 */ or $a1,$s1,$zero -/* f022410: 0fc08885 */ jal func0f022214 +/* f022410: 0fc08885 */ jal chr0f022214 /* f022414: 02603025 */ or $a2,$s3,$zero /* f022418: 1600fffa */ bnez $s0,.L0f022404 /* f02241c: 02008825 */ or $s1,$s0,$zero @@ -6621,7 +6621,7 @@ glabel var7f1a87a8 ); // Mismatch: regalloc -//void func0f022214(struct chrdata *chr, struct prop *prop, bool fulltick) +//void chr0f022214(struct chrdata *chr, struct prop *prop, bool fulltick) //{ // struct defaultobj *obj = prop->obj; // struct model *model = obj->model; @@ -6675,7 +6675,7 @@ glabel var7f1a87a8 // // while (child) { // next = child->next; -// func0f022214(chr, child, fulltick); +// chr0f022214(chr, child, fulltick); // child = next; // } // } else { @@ -6894,7 +6894,7 @@ void chrUpdateCloak(struct chrdata *chr) } } -s32 func0f022be4(struct chrdata *chr) +s32 chr0f022be4(struct chrdata *chr) { s32 result = 255; @@ -7126,7 +7126,7 @@ s32 chrTick(struct prop *prop) objDropRecursively(prop, true); } - func0f020d44(prop, true); + chr0f020d44(prop, true); return TICKOP_FREE; } } @@ -7142,7 +7142,7 @@ s32 chrTick(struct prop *prop) } if (fulltick) { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } } else { onscreen = false; @@ -7161,9 +7161,9 @@ s32 chrTick(struct prop *prop) model->anim->average = false; if (chr->actiontype == ACT_ANIM && !chr->act_anim.movewheninvis && chr->act_anim.lockpos) { - func0f0220ec(chr, lvupdate240, 0); + chr0f0220ec(chr, lvupdate240, 0); } else { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } } @@ -7192,7 +7192,7 @@ s32 chrTick(struct prop *prop) } } else { if (fulltick) { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true); @@ -7215,16 +7215,16 @@ s32 chrTick(struct prop *prop) model->anim->average = false; if (onscreen && !chr->act_anim.lockpos) { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } else { - func0f0220ec(chr, lvupdate240, 0); + chr0f0220ec(chr, lvupdate240, 0); } } } else if (chr->actiontype == ACT_STAND) { model->anim->average = false; if (chr->chrflags & CHRCFLAG_00000001) { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true); } else { onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true); @@ -7233,22 +7233,22 @@ s32 chrTick(struct prop *prop) if (fulltick) { if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) { if (onscreen) { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } else if (model->anim->animnum2 != 0) { - func0f0220ec(chr, lvupdate240, 0); + chr0f0220ec(chr, lvupdate240, 0); } } else { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } } } else if (onscreen) { if (chr->act_stand.playwalkanim == true) { - func0f0220ec(chr, lvupdate240, 0); + chr0f0220ec(chr, lvupdate240, 0); } else { - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } } else if (model->anim->animnum2 != 0) { - func0f0220ec(chr, lvupdate240, 0); + chr0f0220ec(chr, lvupdate240, 0); } } } else if (chr->actiontype == ACT_DEAD) { @@ -7258,14 +7258,14 @@ s32 chrTick(struct prop *prop) || (player = g_Vars.players[propGetPlayerNum(prop)], player->cameramode == CAMERAMODE_EYESPY) || (player->cameramode == CAMERAMODE_THIRDPERSON && player->visionmode == VISIONMODE_SLAYERROCKET))) { model->anim->average = false; - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true); } else { offscreen2 = false; if (fulltick) { model->anim->average = false; - func0f0220ec(chr, lvupdate240, 1); + chr0f0220ec(chr, lvupdate240, 1); } if (chr->model && chr->model->anim && (g_Anims[chr->model->anim->animnum].flags & ANIMFLAG_04)) { @@ -7335,7 +7335,7 @@ s32 chrTick(struct prop *prop) modelSetDistanceScale(0.3125f); } - var8005efcc = &func0f02152c; + var8005efcc = &chr0f02152c; var8009cd1c = chr; if (CHRRACE(chr) == RACE_DRCAROLL && g_Vars.tickmode != TICKMODE_CUTSCENE) { @@ -7463,7 +7463,7 @@ s32 chrTick(struct prop *prop) while (child) { next = child->next; - func0f022214(chr, child, fulltick); + chr0f022214(chr, child, fulltick); child = next; } @@ -7619,26 +7619,26 @@ void chrDropItemsForOwnerReap(struct chrdata *chr) u8 var80062a48[] = { 64, 10, 10 }; -void func0f0246e4(u8 *arg0) +void chr0f0246e4(u8 *arg0) { var80062a48[0] = arg0[0]; var80062a48[1] = arg0[1]; var80062a48[2] = arg0[2]; } -void func0f024708(u8 *arg0) +void chr0f024708(u8 *arg0) { arg0[0] = var80062a48[0]; arg0[1] = var80062a48[1]; arg0[2] = var80062a48[2]; } -void func0f02472c(void) +void chr0f02472c(void) { var80062964 = 0; } -bool func0f024738(struct chrdata *chr) +bool chr0f024738(struct chrdata *chr) { s16 *propnumptr; s16 propnums[256]; @@ -7736,24 +7736,24 @@ next: } GLOBAL_ASM( -glabel func0f024b18 +glabel chr0f024b18 .late_rodata glabel var7f1a87dc -.word func0f024b18+0x2b8 # f024dd0 +.word chr0f024b18+0x2b8 # f024dd0 glabel var7f1a87e0 -.word func0f024b18+0x2d4 # f024dec +.word chr0f024b18+0x2d4 # f024dec glabel var7f1a87e4 -.word func0f024b18+0x2f0 # f024e08 +.word chr0f024b18+0x2f0 # f024e08 glabel var7f1a87e8 -.word func0f024b18+0x30c # f024e24 +.word chr0f024b18+0x30c # f024e24 glabel var7f1a87ec -.word func0f024b18+0x328 # f024e40 +.word chr0f024b18+0x328 # f024e40 glabel var7f1a87f0 -.word func0f024b18+0x344 # f024e5c +.word chr0f024b18+0x344 # f024e5c glabel var7f1a87f4 -.word func0f024b18+0x360 # f024e78 +.word chr0f024b18+0x360 # f024e78 glabel var7f1a87f8 -.word func0f024b18+0x37c # f024e94 +.word chr0f024b18+0x37c # f024e94 .text /* f024b18: 27bdfee8 */ addiu $sp,$sp,-280 /* f024b1c: afbf0044 */ sw $ra,0x44($sp) @@ -8156,7 +8156,7 @@ void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderda } } -void bodyGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2) +void chrGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2) { switch (bodynum) { case BODY_ELVIS1: @@ -8256,8 +8256,8 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha) alpha = (f32)alpha * (PALDOWN(120) - chr->aibot->unk058) * (PAL ? 0.01f : 0.0083333337679505f); } - bodyGetBloodColour(chr->bodynum, spec, NULL); - func0f0246e4(spec); + chrGetBloodColour(chr->bodynum, spec, NULL); + chr0f0246e4(spec); alpha *= func0f08e6bc(prop, model0001af80(model)); if (g_Vars.currentplayer->visionmode == VISIONMODE_XRAY) { @@ -8286,7 +8286,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha) || g_InCutscene || !EYESPYINACTIVE() || (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_IRSCANNER) == 0) { - alpha = func0f022be4(chr) * alpha * 0.0039215688593686f; + alpha = chr0f022be4(chr) * alpha * 0.0039215688593686f; } if (alpha < 0xff) { @@ -8317,7 +8317,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha) u32 stack; if (withalpha && chr->cloakfadefrac > 0 && !chr->cloakfadefinished) { - gdl = func0f02bdf8(gdl, chr->prop, chr->prop); + gdl = chrRenderCloak(gdl, chr->prop, chr->prop); } if (func0f08e5a8(prop->rooms, &screenbox) > 0 && (chr->chrflags & CHRCFLAG_UNPLAYABLE) == 0) { @@ -8440,8 +8440,8 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha) g_Vars.currentplayerstats->drawplayercount++; - if (func0f024738(chr)) { - var8005efc4 = func0f024b18; + if (chr0f024738(chr)) { + var8005efc4 = chr0f024b18; } // Render the chr's model @@ -8578,7 +8578,7 @@ void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 hitpart, struct c } GLOBAL_ASM( -glabel func0f0260c4 +glabel chr0f0260c4 /* f0260c4: 27bdfed8 */ addiu $sp,$sp,-296 /* f0260c8: afb00018 */ sw $s0,0x18($sp) /* f0260cc: afbf003c */ sw $ra,0x3c($sp) @@ -9142,42 +9142,42 @@ glabel func0f0260c4 ); GLOBAL_ASM( -glabel func0f0268bc +glabel chrBruise .late_rodata glabel var7f1a8904 -.word func0f0268bc+0x778 # f027034 +.word chrBruise+0x778 # f027034 glabel var7f1a8908 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a890c -.word func0f0268bc+0x424 # f026ce0 +.word chrBruise+0x424 # f026ce0 glabel var7f1a8910 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8914 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8918 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a891c -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8920 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8924 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8928 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a892c -.word func0f0268bc+0x790 # f02704c +.word chrBruise+0x790 # f02704c glabel var7f1a8930 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8934 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8938 -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a893c -.word func0f0268bc+0x7bc # f027078 +.word chrBruise+0x7bc # f027078 glabel var7f1a8940 -.word func0f0268bc+0x7a8 # f027064 +.word chrBruise+0x7a8 # f027064 glabel var7f1a8944 -.word func0f0268bc+0x484 # f026d40 +.word chrBruise+0x484 # f026d40 .text /* f0268bc: 27bdfee0 */ addiu $sp,$sp,-288 /* f0268c0: afb00018 */ sw $s0,0x18($sp) @@ -9758,7 +9758,7 @@ glabel var7f1a8944 ); GLOBAL_ASM( -glabel func0f0270f4 +glabel chr0f0270f4 /* f0270f4: 27bdff58 */ addiu $sp,$sp,-168 /* f0270f8: afbf003c */ sw $ra,0x3c($sp) /* f0270fc: afbe0038 */ sw $s8,0x38($sp) @@ -10305,7 +10305,7 @@ glabel func0f0270f4 /* f0278a0: 27bd00a8 */ addiu $sp,$sp,0xa8 ); -f32 func0f0278a4(struct chrdata *chr) +f32 chr0f0278a4(struct chrdata *chr) { s32 i; f32 result; @@ -10337,14 +10337,14 @@ f32 func0f0278a4(struct chrdata *chr) return result; } -void func0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3) +void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3) { struct coord spdc; struct coord spd0; struct chrdata *chr = prop->chr; if ((chr->chrflags & CHRCFLAG_HIDDEN) == 0 && (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK)) { - f32 fStack32 = func0f0278a4(chr); + f32 fStack32 = chr0f0278a4(chr); if (prop->z - fStack32 < shotdata->unk34) { struct model *model = chr->model; @@ -10609,10 +10609,10 @@ void chrHit(struct shotdata *shotdata, struct hit *hit) } if (!chrIsUsingPaintball(g_Vars.currentplayer->prop->chr)) { - func0f0268bc(hit->model, hit->hitpart, hit->node, &sp5c); + chrBruise(hit->model, hit->hitpart, hit->node, &sp5c); } - func0f148e54(prop, (struct splat *)shotdata, &sp98, &hitpos, darker, 0, g_Vars.currentplayer->prop->chr); + splatsCreateForChrHit(prop, (struct splat *)shotdata, &sp98, &hitpos, darker, 0, g_Vars.currentplayer->prop->chr); } #else // NTSC beta wraps all the blood logic in this paintball check. @@ -10632,9 +10632,9 @@ void chrHit(struct shotdata *shotdata, struct hit *hit) darker = false; } - func0f0268bc(hit->model, hit->hitpart, hit->node, &sp5c); + chrBruise(hit->model, hit->hitpart, hit->node, &sp5c); - func0f148e54(prop, (struct splat *)shotdata, &sp98, &hitpos, darker, 0, g_Vars.currentplayer->prop->chr); + splatsCreateForChrHit(prop, (struct splat *)shotdata, &sp98, &hitpos, darker, 0, g_Vars.currentplayer->prop->chr); } #endif } @@ -10642,18 +10642,18 @@ void chrHit(struct shotdata *shotdata, struct hit *hit) } } -void func0f028490(f32 arg1) +void chr0f028490(f32 arg1) { // empty } -void func0f028498(bool value) +void chr0f028498(bool value) { var8006296c = value; var8005efbc = value; } -void func0f0284ac(s32 arg0) +void chr0f0284ac(s32 arg0) { g_SelectedAnimNum -= arg0; @@ -10662,7 +10662,7 @@ void func0f0284ac(s32 arg0) } } -void func0f0284f4(s32 arg0) +void chr0f0284f4(s32 arg0) { g_SelectedAnimNum += arg0; @@ -10671,12 +10671,12 @@ void func0f0284f4(s32 arg0) } } -void func0f028544(void) +void chr0f028544(void) { var80062974 = !var80062974; } -void func0f02855c(s32 arg0) +void chr0f02855c(s32 arg0) { var80062978 = arg0; @@ -10751,12 +10751,12 @@ struct chrdata *chrFindByLiteralId(s32 chrnum) return NULL; } -struct prop *chrGetEquippedWeaponProp(struct chrdata *chr, s32 hand) +struct prop *chrGetHeldProp(struct chrdata *chr, s32 hand) { return chr->weapons_held[hand]; } -struct prop *chrGetEquippedWeaponPropWithCheck(struct chrdata *chr, s32 hand) +struct prop *chrGetHeldUsableProp(struct chrdata *chr, s32 hand) { struct prop *prop = chr->weapons_held[hand]; @@ -10830,7 +10830,7 @@ bool chrUpdateGeometry(struct prop *prop, u8 **start, u8 **end) } -void propChrGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin) +void chrGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin) { struct chrdata *chr = prop->chr; @@ -10910,7 +10910,7 @@ bool chrCalculateAutoAim(struct prop *prop, struct coord *arg1, f32 *arg2, f32 * return false; } -bool func0f028d50(struct prop *arg0, struct prop *arg1, struct modelnode *node, struct model *model, s32 *total) +bool chr0f028d50(struct prop *arg0, struct prop *arg1, struct modelnode *node, struct model *model, s32 *total) { if (arg1 == arg0) { *total += model0001a524(node, 0); @@ -10919,22 +10919,22 @@ bool func0f028d50(struct prop *arg0, struct prop *arg1, struct modelnode *node, *total += model->filedata->nummatrices; - if (arg0->child && func0f028d50(arg0->child, arg1, node, model, total) > 0) { + if (arg0->child && chr0f028d50(arg0->child, arg1, node, model, total) > 0) { return true; } - if (arg0->next && func0f028d50(arg0->next, arg1, node, model, total) > 0) { + if (arg0->next && chr0f028d50(arg0->next, arg1, node, model, total) > 0) { return true; } return false; } -s32 func0f028e18(struct prop *arg0, struct modelnode *node, struct model *model, struct prop *arg3) +s32 chr0f028e18(struct prop *arg0, struct modelnode *node, struct model *model, struct prop *arg3) { s32 result = 0; - if (func0f028d50(arg3, arg0, node, model, &result)) { + if (chr0f028d50(arg3, arg0, node, model, &result)) { return result; } @@ -10942,7 +10942,7 @@ s32 func0f028e18(struct prop *arg0, struct modelnode *node, struct model *model, } GLOBAL_ASM( -glabel func0f028e6c +glabel chr0f028e6c /* f028e6c: 27bdffb8 */ addiu $sp,$sp,-72 /* f028e70: afb60038 */ sw $s6,0x38($sp) /* f028e74: afb50034 */ sw $s5,0x34($sp) @@ -10986,7 +10986,7 @@ glabel func0f028e6c /* f028efc: 02202025 */ or $a0,$s1,$zero /* f028f00: 50a00005 */ beqzl $a1,.L0f028f18 /* f028f04: 8e020020 */ lw $v0,0x20($s0) -/* f028f08: 0fc0a39b */ jal func0f028e6c +/* f028f08: 0fc0a39b */ jal chr0f028e6c /* f028f0c: afb40010 */ sw $s4,0x10($sp) /* f028f10: 00401825 */ or $v1,$v0,$zero /* f028f14: 8e020020 */ lw $v0,0x20($s0) @@ -11022,7 +11022,7 @@ glabel func0f028e6c ); // Mismatch: Reordered instructions -//bool func0f028e6c(s32 arg0, struct prop *prop, struct prop **propptr, struct modelnode **nodeptr, struct model **modelptr) +//bool chr0f028e6c(s32 arg0, struct prop *prop, struct prop **propptr, struct modelnode **nodeptr, struct model **modelptr) //{ // while (true) { // bool result = false; @@ -11041,7 +11041,7 @@ glabel func0f028e6c // arg0 -= model->filedata->nummatrices; // // if (prop->child) { -// result = func0f028e6c(arg0, prop->child, propptr, nodeptr, modelptr); +// result = chr0f028e6c(arg0, prop->child, propptr, nodeptr, modelptr); // } // // if (prop->next && !result) { @@ -11188,7 +11188,7 @@ glabel shieldhitCreate /* f029130: 8fa50034 */ lw $a1,0x34($sp) /* f029134: 8fa60038 */ lw $a2,0x38($sp) /* f029138: 02003825 */ or $a3,$s0,$zero -/* f02913c: 0fc0a386 */ jal func0f028e18 +/* f02913c: 0fc0a386 */ jal chr0f028e18 /* f029140: afab0024 */ sw $t3,0x24($sp) /* f029144: 28410020 */ slti $at,$v0,0x20 /* f029148: 10200004 */ beqz $at,.L0f02915c @@ -11298,7 +11298,7 @@ glabel shieldhitCreate // } // // if (pass) { -// s32 index = func0f028e18(arg2, node, model, prop); +// s32 index = chr0f028e18(arg2, node, model, prop); // // if (index < 32) { // shieldhit->unk018[index] = 0; @@ -11367,7 +11367,7 @@ void shieldhitsRemoveByProp(struct prop *prop) } } -s32 func0f02932c(struct prop *prop, s32 arg1) +s32 chr0f02932c(struct prop *prop, s32 arg1) { s32 result = -1; struct modelnode *node2; @@ -11375,20 +11375,20 @@ s32 func0f02932c(struct prop *prop, s32 arg1) struct modelnode *node; struct model *model; - if (func0f028e6c(arg1, prop, &prop2, &node, &model) && node) { + if (chr0f028e6c(arg1, prop, &prop2, &node, &model) && node) { node2 = model0001a784(node); if (node2) { - result = func0f028e18(prop2, node2, model, prop); + result = chr0f028e18(prop2, node2, model, prop); } else if (prop2->parent && model->attachedtomodel && model->attachedtonode) { - result = func0f028e18(prop2->parent, model->attachedtonode, model->attachedtomodel, prop); + result = chr0f028e18(prop2->parent, model->attachedtonode, model->attachedtomodel, prop); } } return result; } -s32 func0f0293ec(struct prop *prop, s32 cmnum) +s32 chr0f0293ec(struct prop *prop, s32 cmnum) { s32 result = -1; struct modelnode *node2; @@ -11396,11 +11396,11 @@ s32 func0f0293ec(struct prop *prop, s32 cmnum) struct modelnode *node; struct model *model; - if (func0f028e6c(cmnum, prop, &prop2, &node, &model) && node) { + if (chr0f028e6c(cmnum, prop, &prop2, &node, &model) && node) { node2 = model0001a7cc(node); if (node2) { - result = func0f028e18(prop2, node2, model, prop); + result = chr0f028e18(prop2, node2, model, prop); } else { struct prop *child = prop2->child; @@ -11409,7 +11409,7 @@ s32 func0f0293ec(struct prop *prop, s32 cmnum) if (model == parentmodel->attachedtomodel) { if (node == parentmodel->attachedtonode) { - result = func0f028e18(child, parentmodel->filedata->rootnode, parentmodel, prop); + result = chr0f028e18(child, parentmodel->filedata->rootnode, parentmodel, prop); break; } } @@ -11422,7 +11422,7 @@ s32 func0f0293ec(struct prop *prop, s32 cmnum) return result; } -s32 func0f0294cc(struct prop *prop, s32 arg1) +s32 chr0f0294cc(struct prop *prop, s32 arg1) { s32 result = -1; struct prop *child; @@ -11430,11 +11430,11 @@ s32 func0f0294cc(struct prop *prop, s32 arg1) struct modelnode *node2; struct model *model2; - if (func0f028e6c(arg1, prop, &prop2, &node2, &model2) && node2) { + if (chr0f028e6c(arg1, prop, &prop2, &node2, &model2) && node2) { struct modelnode *node3 = model0001a85c(node2); if (node3) { - result = func0f028e18(prop2, node3, model2, prop); + result = chr0f028e18(prop2, node3, model2, prop); } else if (model0001a784(node2) == NULL && prop2->parent) { child = prop2->parent->child; @@ -11450,7 +11450,7 @@ s32 func0f0294cc(struct prop *prop, s32 arg1) if (parent->attachedtomodel == model2->attachedtomodel) { if (parent->attachedtonode == model2->attachedtonode) { - result = func0f028e18(child, parent->filedata->rootnode, parent, prop); + result = chr0f028e18(child, parent->filedata->rootnode, parent, prop); break; } } @@ -11464,7 +11464,7 @@ s32 func0f0294cc(struct prop *prop, s32 arg1) return result; } -void func0f0295f8(f32 arg0, s32 *arg1, s32 *arg2, s32 *arg3) +void chr0f0295f8(f32 arg0, s32 *arg1, s32 *arg2, s32 *arg3) { if (arg0 < 1.5f) { *arg1 = 57 - (s32)((1.5f - arg0) * 28.0f); @@ -11524,7 +11524,7 @@ f32 propGetShieldThing(struct prop **propptr) #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel func0f02983c +glabel chr0f02983c .late_rodata glabel var7f1a9b60pf .word 0x3c40c0c1 @@ -11908,7 +11908,7 @@ glabel var7f1a9ba0pf /* f029e8c: 46087302 */ mul.s $f12,$f14,$f8 /* f029e90: 00000000 */ nop .PF0f029e94: -/* f029e94: 0fc0a5c7 */ jal func0f0295f8 +/* f029e94: 0fc0a5c7 */ jal chr0f0295f8 /* f029e98: 27a700f8 */ addiu $a3,$sp,0xf8 /* f029e9c: 8fac0100 */ lw $t4,0x100($sp) /* f029ea0: 8fad00fc */ lw $t5,0xfc($sp) @@ -13686,7 +13686,7 @@ glabel var7f1a9ba0pf ); #else GLOBAL_ASM( -glabel func0f02983c +glabel chr0f02983c .late_rodata glabel var7f1a894c .word 0x3c40c0c1 @@ -14064,7 +14064,7 @@ glabel var7f1a8980 /* f029d68: 46087302 */ mul.s $f12,$f14,$f8 /* f029d6c: 00000000 */ nop .L0f029d70: -/* f029d70: 0fc0a57e */ jal func0f0295f8 +/* f029d70: 0fc0a57e */ jal chr0f0295f8 /* f029d74: 27a700f8 */ addiu $a3,$sp,0xf8 /* f029d78: 8fac0100 */ lw $t4,0x100($sp) /* f029d7c: 8fad00fc */ lw $t5,0xfc($sp) @@ -15877,7 +15877,7 @@ Gfx *shieldhitRender(Gfx *gdl, struct prop *prop1, struct prop *prop2, s32 alpha struct shieldhit *s0 = NULL; struct shieldhit *s1 = NULL; struct shieldhit *s2 = NULL; - s32 index = func0f028e18(prop2, node, model, prop1); + s32 index = chr0f028e18(prop2, node, model, prop1); s32 i; for (i = 0; i < 20; i++) { @@ -15905,11 +15905,11 @@ Gfx *shieldhitRender(Gfx *gdl, struct prop *prop1, struct prop *prop2, s32 alpha } if (s0) { - gdl = func0f02983c(gdl, s0, prop1, s0->model, s0->node, s0->side, -1, -1, 255); + gdl = chr0f02983c(gdl, s0, prop1, s0->model, s0->node, s0->side, -1, -1, 255); } else if (s1) { - gdl = func0f02983c(gdl, s1, prop1, model, node, -1, -1, -1, 255); + gdl = chr0f02983c(gdl, s1, prop1, model, node, -1, -1, -1, 255); } else if (s2) { - gdl = func0f02983c(gdl, s2, prop1, model, node, -2, s2->unk018[index], s2->unk038[index], 255); + gdl = chr0f02983c(gdl, s2, prop1, model, node, -2, s2->unk018[index], s2->unk038[index], 255); } else { if (arg4) { if (specificnode) { @@ -15930,16 +15930,16 @@ Gfx *shieldhitRender(Gfx *gdl, struct prop *prop1, struct prop *prop2, s32 alpha gDPSetTextureFilter(gdl++, G_TF_BILERP); gDPSetColorDither(gdl++, G_CD_BAYER); - gdl = func0f02983c(gdl, NULL, prop1, model, node, -7, -1, -1, 255); + gdl = chr0f02983c(gdl, NULL, prop1, model, node, -7, -1, -1, 255); } else { if (index == cmnum1) { - gdl = func0f02983c(gdl, NULL, prop1, model, node, -3, -1, -1, alpha); + gdl = chr0f02983c(gdl, NULL, prop1, model, node, -3, -1, -1, alpha); } else if (index == cmnum2) { - gdl = func0f02983c(gdl, NULL, prop1, model, node, -4, -1, -1, alpha); + gdl = chr0f02983c(gdl, NULL, prop1, model, node, -4, -1, -1, alpha); } else if (index == cmnum3) { - gdl = func0f02983c(gdl, NULL, prop1, model, node, -5, -1, -1, alpha); + gdl = chr0f02983c(gdl, NULL, prop1, model, node, -5, -1, -1, alpha); } else if (index == cmnum4) { - gdl = func0f02983c(gdl, NULL, prop1, model, node, -6, -1, -1, alpha); + gdl = chr0f02983c(gdl, NULL, prop1, model, node, -6, -1, -1, alpha); } } } @@ -15973,7 +15973,7 @@ Gfx *shieldhitRender(Gfx *gdl, struct prop *prop1, struct prop *prop2, s32 alpha } GLOBAL_ASM( -glabel func0f02bdf8 +glabel chrRenderCloak /* f02bdf8: 27bdfeb0 */ addiu $sp,$sp,-336 /* f02bdfc: afbf003c */ sw $ra,0x3c($sp) /* f02be00: afb70038 */ sw $s7,0x38($sp) @@ -16171,7 +16171,7 @@ glabel func0f02bdf8 .L0f02c0ec: /* f02c0ec: 02002825 */ or $a1,$s0,$zero /* f02c0f0: 02e03025 */ or $a2,$s7,$zero -/* f02c0f4: 0fc0a386 */ jal func0f028e18 +/* f02c0f4: 0fc0a386 */ jal chr0f028e18 /* f02c0f8: 8fa70154 */ lw $a3,0x154($sp) /* f02c0fc: 12c00002 */ beqz $s6,.L0f02c108 /* f02c100: 0040a825 */ or $s5,$v0,$zero @@ -16450,7 +16450,7 @@ glabel func0f02bdf8 /* f02c504: 8fa50154 */ lw $a1,0x154($sp) .L0f02c508: /* f02c508: 02202025 */ or $a0,$s1,$zero -/* f02c50c: 0fc0af7e */ jal func0f02bdf8 +/* f02c50c: 0fc0af7e */ jal chrRenderCloak /* f02c510: 02003025 */ or $a2,$s0,$zero /* f02c514: 8e100020 */ lw $s0,0x20($s0) /* f02c518: 00408825 */ or $s1,$v0,$zero @@ -16596,7 +16596,7 @@ Gfx *chrRenderShield(Gfx *gdl, struct chrdata *chr, u32 alpha) for (i = 0; i <= numiterations; ) { if (operation == 0) { - candidate = func0f02932c(chr->prop, chr->cmnum); + candidate = chr0f02932c(chr->prop, chr->cmnum); operation = 1; if (candidate >= 0) { @@ -16609,7 +16609,7 @@ Gfx *chrRenderShield(Gfx *gdl, struct chrdata *chr, u32 alpha) again = false; } } else if (operation == 1) { - candidate = func0f0293ec(chr->prop, chr->cmnum); + candidate = chr0f0293ec(chr->prop, chr->cmnum); if (candidate >= 0) { operation = 2; @@ -16627,7 +16627,7 @@ Gfx *chrRenderShield(Gfx *gdl, struct chrdata *chr, u32 alpha) } } } else if (operation == 2) { - candidate = func0f0294cc(chr->prop, candidate); + candidate = chr0f0294cc(chr->prop, candidate); if (candidate >= 0) { if (candidate != chr->cmnum2) { @@ -16684,7 +16684,7 @@ void shieldhitsTick(void) time60 = g_ShieldHits[i].unk018[j] + g_Vars.lvupdate240_60; if (g_ShieldHits[i].unk018[j] < 1 && time60 > 0) { - index = func0f02932c(g_ShieldHits[i].prop, j); + index = chr0f02932c(g_ShieldHits[i].prop, j); if (index >= 0 && index < 32) { if (g_ShieldHits[i].unk018[index] == -1) { @@ -16693,7 +16693,7 @@ void shieldhitsTick(void) } } - index = func0f0293ec(g_ShieldHits[i].prop, j); + index = chr0f0293ec(g_ShieldHits[i].prop, j); while (index >= 0) { if (index < 32) { @@ -16703,7 +16703,7 @@ void shieldhitsTick(void) } } - index = func0f0294cc(g_ShieldHits[i].prop, index); + index = chr0f0294cc(g_ShieldHits[i].prop, index); } } diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index 72e3c79ef..0c23588dc 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -1648,15 +1648,15 @@ f32 func0f02e684(struct prop *prop, f32 arg1, f32 arg2) f32 ymin; f32 width; - propChrGetBbox(prop, &width, &ymax, &ymin); + chrGetBbox(prop, &width, &ymax, &ymin); return func0f02e550(prop, arg1, arg2, CDTYPE_ALL, ymax, ymin); } void chrStandChooseAnimation(struct chrdata *chr, f32 mergetime) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); s32 race = CHRRACE(chr); s32 prevanimnum = modelGetAnimNum(chr->model); @@ -1819,8 +1819,8 @@ void chrStop(struct chrdata *chr) void chrKneelChooseAnimation(struct chrdata *chr) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); if (chr->aibot == NULL) { if ((gun1 && gun2) @@ -1853,8 +1853,8 @@ void chrKneel(struct chrdata *chr) void chrStartAlarmChooseAnimation(struct chrdata *chr) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); bool flip = false; if (gun1 && !gun2) { @@ -1925,8 +1925,8 @@ void chrThrowGrenade(struct chrdata *chr, s32 hand, s32 needsequip) void chrSurprisedChooseAnimation(struct chrdata *chr) { if (chr->act_surprised.type == 1) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun0 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun0 = chrGetHeldProp(chr, 0); s32 flip = 0; if (gun1 != NULL && gun0 == NULL) { @@ -2009,8 +2009,8 @@ void chrDoSurprisedLookAround(struct chrdata *chr) void chrSurrenderChooseAnimation(struct chrdata *chr) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun0 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun0 = chrGetHeldProp(chr, 0); if (gun0 || gun1) { modelSetAnimation(chr->model, ANIM_SURRENDER_002F, random() & 1, 0, 0.5, 16); @@ -2053,8 +2053,8 @@ void chrSurrender(struct chrdata *chr) void chrSidestepChooseAnimation(struct chrdata *chr) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); bool flip = false; bool allowflip = false; u32 race = CHRRACE(chr); @@ -2117,8 +2117,8 @@ void chrSidestep(struct chrdata *chr, bool side) void chrJumpOutChooseAnimation(struct chrdata *chr) { - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); bool flip = false; if (gun1 && !gun2) { @@ -2158,8 +2158,8 @@ void chrRunPosChooseAnimation(struct chrdata *chr) f32 ydiff = chr->prop->pos.y - chr->act_runpos.pos.y; f32 zdiff = chr->prop->pos.z - chr->act_runpos.pos.z; f32 distance = sqrtf(xdiff * xdiff + zdiff * zdiff); - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); bool heavy = true; bool flip; s32 race = CHRRACE(chr); @@ -2224,16 +2224,16 @@ void chrRunToPos(struct chrdata *chr, struct coord *pos) void chrAttackStand(struct chrdata *chr, u32 attackflags, s32 entityid) { - struct prop *leftgun = chrGetEquippedWeaponProp(chr, HAND_LEFT); - struct prop *rightgun = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + struct prop *leftgun = chrGetHeldProp(chr, HAND_LEFT); + struct prop *rightgun = chrGetHeldProp(chr, HAND_RIGHT); bool flip; struct attackanimgroup **animgroup; bool firing[] = {false, false}; s32 race = CHRRACE(chr); if (leftgun && rightgun) { - struct prop *leftgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_LEFT); - struct prop *rightgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_RIGHT); + struct prop *leftgun2 = chrGetHeldUsableProp(chr, HAND_LEFT); + struct prop *rightgun2 = chrGetHeldUsableProp(chr, HAND_RIGHT); if (leftgun2 && rightgun2) { flip = random() % 2; @@ -2280,7 +2280,7 @@ glabel chrAttackLie /* f030310: afa5004c */ sw $a1,0x4c($sp) /* f030314: afa60050 */ sw $a2,0x50($sp) /* f030318: 00002825 */ or $a1,$zero,$zero -/* f03031c: 0fc0a209 */ jal chrGetEquippedWeaponProp +/* f03031c: 0fc0a209 */ jal chrGetHeldProp /* f030320: afa40048 */ sw $a0,0x48($sp) /* f030324: 3c0e8007 */ lui $t6,%hi(var80068024) /* f030328: 25ce8024 */ addiu $t6,$t6,%lo(var80068024) @@ -2321,7 +2321,7 @@ glabel chrAttackLie //void chrAttackLie(struct chrdata *chr, u32 attackflags, s32 entityid) //{ // u32 stack1[2]; -// struct prop *gun = chrGetEquippedWeaponProp(chr, 0); +// struct prop *gun = chrGetHeldProp(chr, 0); // s32 firing[2] = {false, false}; // u32 stack2[2]; // @@ -2338,8 +2338,8 @@ glabel chrAttackLie void chrAttackKneel(struct chrdata *chr, u32 attackflags, s32 entityid) { - struct prop *leftgun = chrGetEquippedWeaponProp(chr, HAND_LEFT); - struct prop *rightgun = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + struct prop *leftgun = chrGetHeldProp(chr, HAND_LEFT); + struct prop *rightgun = chrGetHeldProp(chr, HAND_RIGHT); s32 flip; struct attackanimgroup **animgroup; bool firing[2] = {false, false}; @@ -2348,8 +2348,8 @@ void chrAttackKneel(struct chrdata *chr, u32 attackflags, s32 entityid) struct prop *rightgun2; if (leftgun && rightgun) { - leftgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_LEFT); - rightgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_RIGHT); + leftgun2 = chrGetHeldUsableProp(chr, HAND_LEFT); + rightgun2 = chrGetHeldUsableProp(chr, HAND_RIGHT); if (leftgun2 && rightgun2) { flip = random() % 2; @@ -2397,8 +2397,8 @@ void chrAttackWalkChooseAnimation(struct chrdata *chr) void chrAttackWalk(struct chrdata *chr, bool run) { struct attackanimconfig *animcfg; - struct prop *leftgun = chrGetEquippedWeaponProp(chr, HAND_LEFT); - struct prop *rightgun = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + struct prop *leftgun = chrGetHeldProp(chr, HAND_LEFT); + struct prop *rightgun = chrGetHeldProp(chr, HAND_RIGHT); bool flip; bool firing[] = {false, false}; bool everytick[] = {false, false}; @@ -2408,8 +2408,8 @@ void chrAttackWalk(struct chrdata *chr, bool run) struct weaponobj *weapon; if (leftgun && rightgun) { - struct prop *leftgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_LEFT); - struct prop *rightgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_RIGHT); + struct prop *leftgun2 = chrGetHeldUsableProp(chr, HAND_LEFT); + struct prop *rightgun2 = chrGetHeldUsableProp(chr, HAND_RIGHT); s32 style = 0; if (leftgun2 && rightgun2) { @@ -2482,7 +2482,7 @@ void chrAttackWalk(struct chrdata *chr, bool run) for (i = 0; i < 2; i++) { if (firing[i]) { - prop = chrGetEquippedWeaponProp(chr, i); + prop = chrGetHeldProp(chr, i); weapon = prop->weapon; if (weaponGetNumTicksPerShot(weapon->weaponnum, weapon->gunfunc) < 1) { @@ -2568,8 +2568,8 @@ void chrAttackRollChooseAnimation(struct chrdata *chr) void chrAttackRoll(struct chrdata *chr, bool toleft) { struct attackanimconfig *animcfg; - struct prop *leftgun = chrGetEquippedWeaponProp(chr, HAND_LEFT); - struct prop *rightgun = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + struct prop *leftgun = chrGetHeldProp(chr, HAND_LEFT); + struct prop *rightgun = chrGetHeldProp(chr, HAND_RIGHT); bool flip; bool onehanded = false; struct prop *prop; @@ -2582,8 +2582,8 @@ void chrAttackRoll(struct chrdata *chr, bool toleft) bool singleshot[] = {false, false}; if (leftgun && rightgun) { - struct prop *leftgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_LEFT); - struct prop *rightgun2 = chrGetEquippedWeaponPropWithCheck(chr, HAND_RIGHT); + struct prop *leftgun2 = chrGetHeldUsableProp(chr, HAND_LEFT); + struct prop *rightgun2 = chrGetHeldUsableProp(chr, HAND_RIGHT); if (leftgun2 && rightgun2) { flip = random() % 2; @@ -2640,7 +2640,7 @@ void chrAttackRoll(struct chrdata *chr, bool toleft) for (i = 0; i < 2; i++) { if (firing[i]) { - prop = chrGetEquippedWeaponProp(chr, i); + prop = chrGetHeldProp(chr, i); weapon = prop->weapon; if (weaponGetNumTicksPerShot(weapon->weaponnum, weapon->gunfunc) < 1) { @@ -2883,7 +2883,7 @@ void chrAttack(struct chrdata *chr, struct attackanimgroup **animgroups, bool fl for (i = 0; i < 2; i++) { if (firing[i]) { - prop = chrGetEquippedWeaponProp(chr, i); + prop = chrGetHeldProp(chr, i); if (prop == NULL) { chrStandChooseAnimation(chr, 16); @@ -2989,7 +2989,7 @@ void chrAttack(struct chrdata *chr, struct attackanimgroup **animgroups, bool fl void chrAttackAmount(struct chrdata *chr, u32 attackflags, u32 entityid, u32 maxshots) { u32 stack; - struct prop *prop = chrGetEquippedWeaponProp(chr, 0); + struct prop *prop = chrGetHeldProp(chr, 0); struct attackanimgroup **things = NULL; bool firing[] = {false, false}; u32 race = CHRRACE(chr); @@ -3542,8 +3542,8 @@ void chrBeginArgh(struct chrdata *chr, f32 angle, s32 hitpart) && g_AnimTablesByRace[race][index].injuryanimcount > 0) { // If shot in a hand that's holding a gun, remap the hit location to the // forearm because the hand injury animations assume the hand is empty. - struct prop *lgun = chrGetEquippedWeaponProp(chr, HAND_LEFT); - struct prop *rgun = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + struct prop *lgun = chrGetHeldProp(chr, HAND_LEFT); + struct prop *rgun = chrGetHeldProp(chr, HAND_RIGHT); s32 rowindex; struct animtablerow *row; @@ -4725,8 +4725,8 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse onehitko = true; } - if (chrGetEquippedWeaponProp(chr, HAND_RIGHT) == NULL - && chrGetEquippedWeaponProp(chr, HAND_LEFT) == NULL + if (chrGetHeldProp(chr, HAND_RIGHT) == NULL + && chrGetHeldProp(chr, HAND_LEFT) == NULL && (chr->gunprop == NULL || chr->actiontype == ACT_SURRENDER || chr->actiontype == ACT_SURPRISED)) { // Chr is unarmed and has no hope of getting their gun onehitko = true; @@ -4902,7 +4902,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse if (chr->aibot) { aibotLoseGun(chr, aprop); } else { - weapon = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + weapon = chrGetHeldProp(chr, HAND_RIGHT); if (weapon) { chr->gunprop = weapon; @@ -4910,7 +4910,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse chr->hidden |= CHRHFLAG_00000001; } - weapon = chrGetEquippedWeaponProp(chr, HAND_LEFT); + weapon = chrGetHeldProp(chr, HAND_LEFT); if (weapon) { chr->gunprop = weapon; @@ -5171,7 +5171,7 @@ bool func0f03645c(struct chrdata *chr, struct coord *arg1, s16 *arg2, struct coo s16 sp30; struct prop *prop = chr->prop; - propChrGetBbox(prop, &width, &ymax, &ymin); + chrGetBbox(prop, &width, &ymax, &ymin); chrSetPerimEnabled(chr, false); if (cd0002d840(arg1, arg2, arg3, &sp30, arg5, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) { @@ -5203,7 +5203,7 @@ bool func0f03654c(struct chrdata *chr, struct coord *pos, s16 *rooms, struct coo prop = chr->prop; chrSetPerimEnabled(chr, false); - propChrGetBbox(prop, &width, &ymax, &ymin); + chrGetBbox(prop, &width, &ymax, &ymin); if ((rooms2 && cdTestAToB2(pos, rooms, pos2, rooms2, types, 1, ymax - prop->pos.y, ymin - prop->pos.y)) || (rooms2 == NULL && cd0002d6ac(pos, rooms, pos2, types, 1, ymax - prop->pos.y, ymin - prop->pos.y))) { @@ -5895,7 +5895,7 @@ void chrGoPosTickMagic(struct chrdata *chr, struct waydata *waydata, f32 speed, // Reached end of segment chrSetPerimEnabled(chr, false); roomsCopy(rooms, sp118); - func0f021fa8(chr, arg3, sp118); + chr0f021fa8(chr, arg3, sp118); ground = cdFindGroundY(arg3, chr->chrwidth, sp118, &floorcol, &floortype, 0, &floorroom, NULL, NULL); @@ -5904,8 +5904,8 @@ void chrGoPosTickMagic(struct chrdata *chr, struct waydata *waydata, f32 speed, spf4.z = arg3->z; roomsCopy(rooms, sp118); - func0f021fa8(chr, &spf4, sp118); - propChrGetBbox(chr->prop, &width, &ymax, &ymin); + chr0f021fa8(chr, &spf4, sp118); + chrGetBbox(chr->prop, &width, &ymax, &ymin); if (cdTestVolume(&spf4, chr->chrwidth, sp118, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) { // Reached end of segment with no collision @@ -6027,8 +6027,8 @@ void chrGoPosChooseAnimation(struct chrdata *chr) { s32 gospeed = chr->act_gopos.flags & 3; s32 male = g_HeadsAndBodies[chr->bodynum].ismale; - struct prop *gun1 = chrGetEquippedWeaponProp(chr, 1); - struct prop *gun2 = chrGetEquippedWeaponProp(chr, 0); + struct prop *gun1 = chrGetHeldProp(chr, 1); + struct prop *gun2 = chrGetHeldProp(chr, 0); s32 flip = false; s32 heavy; s32 race = CHRRACE(chr); @@ -6415,8 +6415,8 @@ struct path *pathFindById(u32 path_id) void chrPatrolChooseAnimation(struct chrdata *chr) { - struct prop *leftprop = chrGetEquippedWeaponProp(chr, HAND_LEFT); - struct prop *rightprop = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + struct prop *leftprop = chrGetHeldProp(chr, HAND_LEFT); + struct prop *rightprop = chrGetHeldProp(chr, HAND_RIGHT); s32 flip; bool heavy; s32 race = CHRRACE(chr); @@ -6511,7 +6511,7 @@ glabel var7f1a8dd0 /* f038c34: 27a50070 */ addiu $a1,$sp,0x70 /* f038c38: 27a60078 */ addiu $a2,$sp,0x78 /* f038c3c: 27a70074 */ addiu $a3,$sp,0x74 -/* f038c40: 0fc0a277 */ jal propChrGetBbox +/* f038c40: 0fc0a277 */ jal chrGetBbox /* f038c44: a7b9007c */ sh $t9,0x7c($sp) /* f038c48: 02602025 */ or $a0,$s3,$zero /* f038c4c: 0fc079ef */ jal chrSetPerimEnabled @@ -6739,7 +6739,7 @@ glabel var7f1a8dd0 // rooms[0] = pad.room; // rooms[1] = -1; // -// propChrGetBbox(prop, &width, &ymax, &ymin); +// chrGetBbox(prop, &width, &ymax, &ymin); // // chrSetPerimEnabled(chr, false); // @@ -6839,10 +6839,10 @@ bool chrCanSeeEntity(struct chrdata *chr, struct coord *chrpos, s16 *chrrooms, b result = true; } else { types = CDTYPE_DOORSWITHOUTFLAG | CDTYPE_ALL; - weaponprop = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + weaponprop = chrGetHeldProp(chr, HAND_RIGHT); if (weaponprop == NULL) { - weaponprop = chrGetEquippedWeaponProp(chr, HAND_LEFT); + weaponprop = chrGetHeldProp(chr, HAND_LEFT); } if (weaponprop) { @@ -7317,7 +7317,7 @@ bool chrTryAttackWalk(struct chrdata *chr) struct prop *prop = chr->prop; if (chrCanSeeAttackTarget(chr, &prop->pos, prop->rooms, false) - && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1)) + && (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1)) && g_Vars.lvframe60 - chr->lastwalk60 > PALDOWN(120)) { struct prop *target = chrGetTargetProp(chr); f32 x = target->pos.x - prop->pos.x; @@ -7346,7 +7346,7 @@ bool chrTryAttackRun(struct chrdata *chr) struct prop *prop = chr->prop; if (chrCanSeeAttackTarget(chr, &prop->pos, prop->rooms, false) - && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1)) + && (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1)) && g_Vars.lvframe60 - chr->lastwalk60 > PALDOWN(180)) { struct prop *target = chrGetTargetProp(chr); f32 x = target->pos.x - prop->pos.x; @@ -7369,7 +7369,7 @@ bool chrTryAttackRoll(struct chrdata *chr) struct prop *prop = chr->prop; if (chrCanSeeAttackTarget(chr, &prop->pos, prop->rooms, false) && - (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { + (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1))) { struct prop *target = chrGetTargetProp(chr); f32 x = target->pos.x - prop->pos.x; f32 y = target->pos.y - prop->pos.y; @@ -7458,8 +7458,8 @@ bool chrTryAttackStand(struct chrdata *chr, u32 attackflags, s32 entityid) } if (race == RACE_HUMAN || race == RACE_SKEDAR) { - if (chrGetEquippedWeaponPropWithCheck(chr, 0) || - (chrGetEquippedWeaponPropWithCheck(chr, 1))) { + if (chrGetHeldUsableProp(chr, 0) || + (chrGetHeldUsableProp(chr, 1))) { chrAttackStand(chr, attackflags, entityid); return true; } @@ -7474,7 +7474,7 @@ bool chrTryAttackKneel(struct chrdata *chr, u32 attackflags, s32 entityid) s32 race = CHRRACE(chr); if (race == RACE_HUMAN || race == RACE_SKEDAR) { - if (chrIsReadyForOrders(chr) && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { + if (chrIsReadyForOrders(chr) && (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1))) { chrAttackKneel(chr, attackflags, entityid); return true; } @@ -7488,7 +7488,7 @@ bool chrTryAttackLie(struct chrdata *chr, u32 attackflags, s32 entityid) s32 race = CHRRACE(chr); if (race == RACE_HUMAN || race == RACE_SKEDAR) { - if (chrIsReadyForOrders(chr) && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { + if (chrIsReadyForOrders(chr) && (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1))) { chrAttackLie(chr, attackflags, entityid); return true; } @@ -8028,8 +8028,8 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid) } if (target && cd0002dc18(&chr->prop->pos, chr->prop->rooms, &pos, 0x33)) { - struct prop *leftprop = chrGetEquippedWeaponProp(chr, 1); - struct prop *rightprop = chrGetEquippedWeaponProp(chr, 0); + struct prop *leftprop = chrGetHeldProp(chr, 1); + struct prop *rightprop = chrGetHeldProp(chr, 0); struct weaponobj *weapon; #if PIRACYCHECKS @@ -8404,8 +8404,8 @@ void chrTickStand(struct chrdata *chr) if ((relangle > 0.34901028871536f && relangle < 5.9331746101379f) || (relangle > 0.17450514435768f && relangle < 6.1076798439026f && !chr->act_stand.playwalkanim)) { - leftgun = chrGetEquippedWeaponProp(chr, HAND_LEFT); - rightgun = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + leftgun = chrGetHeldProp(chr, HAND_LEFT); + rightgun = chrGetHeldProp(chr, HAND_RIGHT); chr->act_stand.reaim = true; chr->act_stand.turning = TURNSTATE_TURNING; @@ -8694,7 +8694,7 @@ void chrAlertOthersOfInjury(struct chrdata *chr, bool dying) { s32 index = 0; s32 numinrange = 0; - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); if (g_Vars.antiplayernum >= 0 && chr->prop == g_Vars.anti->prop) { return; @@ -9398,7 +9398,7 @@ void chrCreateFireslot(struct chrdata *chr, s32 handnum, bool withsound, bool wi u8 duration; u16 soundnum; - weaponprop = chrGetEquippedWeaponProp(chr, handnum); + weaponprop = chrGetHeldProp(chr, handnum); if (weaponprop) { weapon = weaponprop->weapon; @@ -10259,12 +10259,12 @@ glabel var7f1a8fc8 /* f03f214: 11e00006 */ beqz $t7,.L0f03f230 /* f03f218: 8fa40190 */ lw $a0,0x190($sp) /* f03f21c: 8fa40190 */ lw $a0,0x190($sp) -/* f03f220: 0fc0a209 */ jal chrGetEquippedWeaponProp +/* f03f220: 0fc0a209 */ jal chrGetHeldProp /* f03f224: 00002825 */ or $a1,$zero,$zero /* f03f228: 10000004 */ b .L0f03f23c /* f03f22c: 00404025 */ or $t0,$v0,$zero .L0f03f230: -/* f03f230: 0fc0a209 */ jal chrGetEquippedWeaponProp +/* f03f230: 0fc0a209 */ jal chrGetHeldProp /* f03f234: 24050001 */ addiu $a1,$zero,0x1 /* f03f238: 00404025 */ or $t0,$v0,$zero .L0f03f23c: @@ -10673,7 +10673,7 @@ void chrResetAimEndProperties(struct chrdata *chr) void chrSetFiring(struct chrdata *chr, s32 hand, bool firing) { - struct prop *prop = chrGetEquippedWeaponProp(chr, hand); + struct prop *prop = chrGetHeldProp(chr, hand); chr->prop->forcetick = firing ? true : false; @@ -10684,7 +10684,7 @@ void chrSetFiring(struct chrdata *chr, s32 hand, bool firing) bool chrIsGunfireVisible(struct chrdata *chr, s32 hand) { - struct prop *prop = chrGetEquippedWeaponProp(chr, hand); + struct prop *prop = chrGetHeldProp(chr, hand); if (prop) { return weaponIsGunfireVisible(prop); @@ -10915,7 +10915,7 @@ void chrCalculateHit(struct chrdata *chr, bool *angleokptr, bool *hit, struct gs bool func0f03fde4(struct chrdata *chr, s32 handnum, struct coord *arg2) { - struct prop *weaponprop = chrGetEquippedWeaponProp(chr, handnum); + struct prop *weaponprop = chrGetHeldProp(chr, handnum); struct defaultobj *obj; struct model *model; bool result = false; @@ -11370,7 +11370,7 @@ glabel var7f1a9184 /* f040688: 24020001 */ li $v0,0x1 /* f04068c: a3a2026f */ sb $v0,0x26f($sp) .PF0f040690: -/* f040690: 0fc0a252 */ jal chrGetEquippedWeaponProp +/* f040690: 0fc0a252 */ jal chrGetHeldProp /* f040694: afa40278 */ sw $a0,0x278($sp) /* f040698: 5040055c */ beqzl $v0,.PF0f041c0c /* f04069c: 8fbf0044 */ lw $ra,0x44($sp) @@ -12968,7 +12968,7 @@ glabel var7f1a9184 /* f040504: 24020001 */ addiu $v0,$zero,0x1 /* f040508: a3a2026f */ sb $v0,0x26f($sp) .L0f04050c: -/* f04050c: 0fc0a209 */ jal chrGetEquippedWeaponProp +/* f04050c: 0fc0a209 */ jal chrGetHeldProp /* f040510: afa40278 */ sw $a0,0x278($sp) /* f040514: 50400554 */ beqzl $v0,.L0f041a68 /* f040518: 8fbf0044 */ lw $ra,0x44($sp) @@ -14558,7 +14558,7 @@ glabel var7f1a9184 /* f03fce4: 24020001 */ addiu $v0,$zero,0x1 /* f03fce8: a3a2026f */ sb $v0,0x26f($sp) .NB0f03fcec: -/* f03fcec: 0fc0a074 */ jal chrGetEquippedWeaponProp +/* f03fcec: 0fc0a074 */ jal chrGetHeldProp /* f03fcf0: afa40278 */ sw $a0,0x278($sp) /* f03fcf4: 5040054e */ beqzl $v0,.NB0f041230 /* f03fcf8: 8fbf0044 */ lw $ra,0x44($sp) @@ -17278,7 +17278,7 @@ void chrTickThrowGrenade(struct chrdata *chr) model = chr->model; frame = modelGetCurAnimFrame(model); hand = model->anim->flip ? 1 : 0; - weaponprop = chrGetEquippedWeaponProp(chr, hand); + weaponprop = chrGetHeldProp(chr, hand); if ((frame >= 20 && weaponprop && modelGetAnimNum(model) == ANIM_THROWGRENADE_STANDING) || (frame >= 1 && weaponprop && modelGetAnimNum(model) == ANIM_THROWGRENADE_NOPIN) || @@ -17787,7 +17787,7 @@ glabel var7f1a9244 /* f044c64: 27a50078 */ addiu $a1,$sp,0x78 /* f044c68: 27a7007c */ addiu $a3,$sp,0x7c /* f044c6c: 27a60080 */ addiu $a2,$sp,0x80 -/* f044c70: 0fc0a277 */ jal propChrGetBbox +/* f044c70: 0fc0a277 */ jal chrGetBbox /* f044c74: afa4003c */ sw $a0,0x3c($sp) /* f044c78: 8fa200ec */ lw $v0,0xec($sp) /* f044c7c: c6060000 */ lwc1 $f6,0x0($s0) @@ -18162,7 +18162,7 @@ glabel var7f1a9244 /* f044c64: 27a50078 */ addiu $a1,$sp,0x78 /* f044c68: 27a7007c */ addiu $a3,$sp,0x7c /* f044c6c: 27a60080 */ addiu $a2,$sp,0x80 -/* f044c70: 0fc0a277 */ jal propChrGetBbox +/* f044c70: 0fc0a277 */ jal chrGetBbox /* f044c74: afa4003c */ sw $a0,0x3c($sp) /* f044c78: 8fa200ec */ lw $v0,0xec($sp) /* f044c7c: c6060000 */ lwc1 $f6,0x0($s0) @@ -18537,7 +18537,7 @@ glabel var7f1a9244 /* f044c64: 27a50078 */ addiu $a1,$sp,0x78 /* f044c68: 27a7007c */ addiu $a3,$sp,0x7c /* f044c6c: 27a60080 */ addiu $a2,$sp,0x80 -/* f044c70: 0fc0a277 */ jal propChrGetBbox +/* f044c70: 0fc0a277 */ jal chrGetBbox /* f044c74: afa4003c */ sw $a0,0x3c($sp) /* f044c78: 8fa200ec */ lw $v0,0xec($sp) /* f044c7c: c6060000 */ lwc1 $f6,0x0($s0) @@ -18914,7 +18914,7 @@ glabel var7f1a9254 /* f0451d4: 27a50078 */ addiu $a1,$sp,0x78 /* f0451d8: 27a7007c */ addiu $a3,$sp,0x7c /* f0451dc: 27a60080 */ addiu $a2,$sp,0x80 -/* f0451e0: 0fc0a277 */ jal propChrGetBbox +/* f0451e0: 0fc0a277 */ jal chrGetBbox /* f0451e4: afa4003c */ sw $a0,0x3c($sp) /* f0451e8: 8fa200f4 */ lw $v0,0xf4($sp) /* f0451ec: c6060000 */ lwc1 $f6,0x0($s0) @@ -19308,7 +19308,7 @@ glabel var7f1a9254 /* f0451d4: 27a50078 */ addiu $a1,$sp,0x78 /* f0451d8: 27a7007c */ addiu $a3,$sp,0x7c /* f0451dc: 27a60080 */ addiu $a2,$sp,0x80 -/* f0451e0: 0fc0a277 */ jal propChrGetBbox +/* f0451e0: 0fc0a277 */ jal chrGetBbox /* f0451e4: afa4003c */ sw $a0,0x3c($sp) /* f0451e8: 8fa200f4 */ lw $v0,0xf4($sp) /* f0451ec: c6060000 */ lwc1 $f6,0x0($s0) @@ -19702,7 +19702,7 @@ glabel var7f1a9254 /* f0451d4: 27a50078 */ addiu $a1,$sp,0x78 /* f0451d8: 27a7007c */ addiu $a3,$sp,0x7c /* f0451dc: 27a60080 */ addiu $a2,$sp,0x80 -/* f0451e0: 0fc0a277 */ jal propChrGetBbox +/* f0451e0: 0fc0a277 */ jal chrGetBbox /* f0451e4: afa4003c */ sw $a0,0x3c($sp) /* f0451e8: 8fa200f4 */ lw $v0,0xf4($sp) /* f0451ec: c6060000 */ lwc1 $f6,0x0($s0) @@ -21922,7 +21922,7 @@ bool chrStartSkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) return false; } - propChrGetBbox(prop, &width, &ymax, &ymin); + chrGetBbox(prop, &width, &ymax, &ymin); chrSetPerimEnabled(chr, false); propSetPerimEnabled(target, false); iVar2 = cd0002d6ac(&prop->pos, prop->rooms, &target->pos, 51, 1, @@ -22238,7 +22238,7 @@ glabel func0f048398 /* f0483b4: afb30024 */ sw $s3,0x24($sp) /* f0483b8: afb20020 */ sw $s2,0x20($sp) /* f0483bc: afb1001c */ sw $s1,0x1c($sp) -/* f0483c0: 0fc07934 */ jal getNumChrSlots +/* f0483c0: 0fc07934 */ jal chrsGetNumSlots /* f0483c4: afb00018 */ sw $s0,0x18($sp) /* f0483c8: 3c1e8006 */ lui $s8,%hi(var80062cb0) /* f0483cc: 27de2cb0 */ addiu $s8,$s8,%lo(var80062cb0) @@ -22698,7 +22698,7 @@ glabel func0f048398 /* f0483b4: afb30024 */ sw $s3,0x24($sp) /* f0483b8: afb20020 */ sw $s2,0x20($sp) /* f0483bc: afb1001c */ sw $s1,0x1c($sp) -/* f0483c0: 0fc07934 */ jal getNumChrSlots +/* f0483c0: 0fc07934 */ jal chrsGetNumSlots /* f0483c4: afb00018 */ sw $s0,0x18($sp) /* f0483c8: 3c1e8006 */ lui $s8,%hi(var80062cb0) /* f0483cc: 27de2cb0 */ addiu $s8,$s8,%lo(var80062cb0) @@ -23158,7 +23158,7 @@ glabel func0f048398 /* f047ad8: afb30024 */ sw $s3,0x24($sp) /* f047adc: afb20020 */ sw $s2,0x20($sp) /* f047ae0: afb1001c */ sw $s1,0x1c($sp) -/* f047ae4: 0fc0786c */ jal getNumChrSlots +/* f047ae4: 0fc0786c */ jal chrsGetNumSlots /* f047ae8: afb00018 */ sw $s0,0x18($sp) /* f047aec: afa20098 */ sw $v0,0x98($sp) /* f047af0: 00008025 */ or $s0,$zero,$zero @@ -23462,7 +23462,7 @@ glabel func0f048398 // Mismatch because it uses the stack differently. //void func0f048398(void) //{ -// s32 numchrs = getNumChrSlots(); // e0 +// s32 numchrs = chrsGetNumSlots(); // e0 // s32 numalivewithpropflag80; // dc // struct chrdata *spb8[10]; // struct chrdata *spa4[5]; // a4 @@ -24198,7 +24198,7 @@ void chrsClearRefsToPlayer(s32 playernum) playerpropnum = g_Vars.coop->prop - g_Vars.props; } - for (i = 0; i < getNumChrSlots(); i++) { + for (i = 0; i < chrsGetNumSlots(); i++) { if (g_ChrSlots[i].p1p2 == playernum) { g_ChrSlots[i].p1p2 = otherplayernum; } @@ -25073,7 +25073,7 @@ bool chrAdjustPosForSpawn(f32 width, struct coord *pos, s16 *rooms, f32 angle, b if ((arg6 && cd0002d840(pos, rooms, &testpos, testrooms, CDTYPE_ALL & ~CDTYPE_PLAYERS, 1, ymax, -200) != CDRESULT_COLLISION) || (!arg6 && cd0002deac(pos, rooms, &testpos, testrooms, CDTYPE_BG))) { - func0f021fa8(NULL, &testpos, testrooms); + chr0f021fa8(NULL, &testpos, testrooms); ground = cdFindGroundYSimple(&testpos, width, testrooms, 0, 0); ymin = -200; @@ -25167,7 +25167,7 @@ struct prop *chrSpawnAtCoord(s32 bodynum, s32 headnum, struct coord *pos, s16 *r s16 rooms2[8]; s32 stack; - if (getNumFreeChrSlots() > 1) { + if (chrsGetNumFree() > 1) { if (headnum < 0) { headnum = bodyChooseHead(bodynum); } @@ -25187,7 +25187,7 @@ struct prop *chrSpawnAtCoord(s32 bodynum, s32 headnum, struct coord *pos, s16 *r struct chrdata *chr; if (model) { - prop = propAllocateChr(model, &pos2, rooms2, angle, ailist); + prop = chrAllocate(model, &pos2, rooms2, angle, ailist); if (prop) { propActivateThisFrame(prop); @@ -25216,7 +25216,7 @@ struct prop *chrSpawnAtCoord(s32 bodynum, s32 headnum, struct coord *pos, s16 *r } // Low memory - find a corpse to reap - if (getNumFreeChrSlots() < 4) { + if (chrsGetNumFree() < 4) { #if VERSION >= VERSION_NTSC_1_0 s32 stack2; struct chrdata *replacechr; @@ -25363,7 +25363,7 @@ bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 angle, propDeregisterRooms(chr->prop); roomsCopy(rooms2, chr->prop->rooms); - func0f0220ac(chr); + chr0f0220ac(chr); modelSetRootPosition(chr->model, &pos2); nodetype = chr->model->filedata->rootnode->type; @@ -26500,7 +26500,7 @@ glabel var7f1a942c /* f04c9cc: c6320010 */ lwc1 $f18,0x10($s1) /* f04c9d0: 46109100 */ add.s $f4,$f18,$f16 /* f04c9d4: e6040008 */ swc1 $f4,0x8($s0) -/* f04c9d8: 0fc0a277 */ jal propChrGetBbox +/* f04c9d8: 0fc0a277 */ jal chrGetBbox /* f04c9dc: 8e64001c */ lw $a0,0x1c($s3) /* f04c9e0: c7a800cc */ lwc1 $f8,0xcc($sp) /* f04c9e4: c7a600a0 */ lwc1 $f6,0xa0($sp) @@ -26743,7 +26743,7 @@ glabel var7f1a942c /* f04c9cc: c6320010 */ lwc1 $f18,0x10($s1) /* f04c9d0: 46109100 */ add.s $f4,$f18,$f16 /* f04c9d4: e6040008 */ swc1 $f4,0x8($s0) -/* f04c9d8: 0fc0a277 */ jal propChrGetBbox +/* f04c9d8: 0fc0a277 */ jal chrGetBbox /* f04c9dc: 8e64001c */ lw $a0,0x1c($s3) /* f04c9e0: c7a800cc */ lwc1 $f8,0xcc($sp) /* f04c9e4: c7a600a0 */ lwc1 $f6,0xa0($sp) @@ -26986,7 +26986,7 @@ glabel var7f1a942c /* f04c9cc: c6320010 */ lwc1 $f18,0x10($s1) /* f04c9d0: 46109100 */ add.s $f4,$f18,$f16 /* f04c9d4: e6040008 */ swc1 $f4,0x8($s0) -/* f04c9d8: 0fc0a277 */ jal propChrGetBbox +/* f04c9d8: 0fc0a277 */ jal chrGetBbox /* f04c9dc: 8e64001c */ lw $a0,0x1c($s3) /* f04c9e0: c7a800cc */ lwc1 $f8,0xcc($sp) /* f04c9e4: c7a600a0 */ lwc1 $f6,0xa0($sp) @@ -27175,7 +27175,7 @@ glabel var7f1a942c // pos->y = chrpos.y; // pos->z = target->pos.z + (xdiff * sine + zdiff * cosine); // -// propChrGetBbox(chr->prop, &width, &ymax, &ymin); +// chrGetBbox(chr->prop, &width, &ymax, &ymin); // // // a14 // result = cd0002d7c0(&chrpos, chr->prop->rooms, pos, @@ -27263,7 +27263,7 @@ glabel var7f1a942c */ void rebuildTeams(void) { - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); s16 index = 7; s32 team; s32 i; @@ -27308,7 +27308,7 @@ void rebuildTeams(void) */ void rebuildSquadrons(void) { - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); s16 index = 15; s32 squadron; s32 i; @@ -27416,7 +27416,7 @@ Gfx *chrsRenderChrStats(Gfx *gdl, s16 *rooms) char aibotbuffer[120]; u8 aibot = 0; s32 i; - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); gdl = func0f153628(gdl); @@ -27553,12 +27553,12 @@ void chrAvoid(struct chrdata *chr) dstpos.y = chr->prop->pos.y; dstpos.z = chr->prop->pos.z + cosf(chrangle) * 100; - propChrGetBbox(chr->prop, &width, &ymax, &ymin); + chrGetBbox(chr->prop, &width, &ymax, &ymin); halfchrwidth = width * 0.5f; func0f065e74(&chr->prop->pos, chr->prop->rooms, &dstpos, dstrooms); - func0f021fa8(chr, &dstpos, dstrooms); + chr0f021fa8(chr, &dstpos, dstrooms); xdiff = dstpos.x - chr->prop->pos.x; zdiff = dstpos.z - chr->prop->pos.z; diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 0cdbd4e6f..216e29bb8 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -434,7 +434,7 @@ bool aiChrDoAnimation(void) chrTryStartAnim(chr, anim_id, fstartframe, fendframe, cmd[8], cmd[9], speed); if (startframe == 0xfffe) { - func0f0220ec(chr, 1, 1); + chr0f0220ec(chr, 1, 1); if (chr->prop->type == PROPTYPE_PLAYER) { u32 playernum = propGetPlayerNum(chr->prop); @@ -830,13 +830,13 @@ bool aiChrDamageChr(void) struct chrdata *chr2 = chrFindById(g_Vars.chrdata, cmd[3]); if (chr1 && chr2 && chr1->prop && chr2->prop) { - struct prop *prop = chrGetEquippedWeaponPropWithCheck(chr1, HAND_RIGHT); + struct prop *prop = chrGetHeldUsableProp(chr1, HAND_RIGHT); f32 damage; struct coord vector = {0, 0, 0}; struct weaponobj *weapon; if (!prop) { - prop = chrGetEquippedWeaponPropWithCheck(chr1, HAND_LEFT); + prop = chrGetHeldUsableProp(chr1, HAND_LEFT); } if (prop) { @@ -4586,10 +4586,10 @@ bool aiDuplicateChr(void) if (cloneprop) { clone = cloneprop->chr; - chrSetChrnum(clone, getNextUnusedChrnum()); + chrSetChrnum(clone, chrsGetNextUnusedChrnum()); chr->chrdup = clone->chrnum; - srcweapon0prop = chrGetEquippedWeaponProp(chr, 0); + srcweapon0prop = chrGetHeldProp(chr, 0); if (srcweapon0prop) { srcweapon0 = srcweapon0prop->weapon; @@ -4600,7 +4600,7 @@ bool aiDuplicateChr(void) } } - srcweapon1prop = chrGetEquippedWeaponProp(chr, 1); + srcweapon1prop = chrGetHeldProp(chr, 1); if (srcweapon1prop) { srcweapon1 = srcweapon1prop->weapon; @@ -5436,7 +5436,7 @@ bool aiEnableChr(void) if (chr && chr->prop && chr->model) { propActivate(chr->prop); propEnable(chr->prop); - func0f0220ac(chr); + chr0f0220ac(chr); } g_Vars.aioffset += 3; @@ -11523,8 +11523,8 @@ bool aiDoPresetAnimation(void) if (cmd[2] == 255) { chrTryStartAnim(g_Vars.chrdata, anims[7 + (random() % 8)], 0, -1, 0, 15, 0.5); } else if (cmd[2] == 254) { - struct prop *prop0 = chrGetEquippedWeaponProp(g_Vars.chrdata, 1); - struct prop *prop1 = chrGetEquippedWeaponProp(g_Vars.chrdata, 0); + struct prop *prop0 = chrGetHeldProp(g_Vars.chrdata, 1); + struct prop *prop1 = chrGetHeldProp(g_Vars.chrdata, 0); if (weaponIsOneHanded(prop0) || weaponIsOneHanded(prop1)) { chrTryStartAnim(g_Vars.chrdata, ANIM_FIX_GUN_JAM_EASY, 0, -1, 0, 5, 0.5); @@ -12362,14 +12362,14 @@ bool aiShowCutsceneChrs(void) s32 i; if (show) { - for (i = getNumChrSlots() - 1; i >= 0; i--) { + for (i = chrsGetNumSlots() - 1; i >= 0; i--) { if (g_ChrSlots[i].chrnum >= 0 && g_ChrSlots[i].prop && (g_ChrSlots[i].hidden2 & CHRH2FLAG_0001)) { g_ChrSlots[i].hidden2 &= ~CHRH2FLAG_0001; g_ChrSlots[i].chrflags &= ~CHRCFLAG_HIDDEN; } } } else { - for (i = getNumChrSlots() - 1; i >= 0; i--) { + for (i = chrsGetNumSlots() - 1; i >= 0; i--) { if (g_ChrSlots[i].chrnum >= 0 && g_ChrSlots[i].prop && (g_ChrSlots[i].chrflags & (CHRCFLAG_UNPLAYABLE | CHRCFLAG_HIDDEN)) == 0) { g_ChrSlots[i].hidden2 |= CHRH2FLAG_0001; @@ -12603,7 +12603,7 @@ bool aiRemoveReferencesToChr(void) { if (g_Vars.chrdata && g_Vars.chrdata->prop) { u32 index = g_Vars.chrdata->prop - g_Vars.props; - propClearReferences(index); + chrClearReferences(index); } g_Vars.aioffset += 2; @@ -12619,7 +12619,7 @@ bool aiRemoveReferencesToChr(void) bool ai01b4(void) { if (g_Vars.chrdata && g_Vars.chrdata->prop && - func0f01f264(g_Vars.chrdata, &g_Vars.chrdata->prop->pos, g_Vars.chrdata->prop->rooms, 0, false)) { + chr0f01f264(g_Vars.chrdata, &g_Vars.chrdata->prop->pos, g_Vars.chrdata->prop->rooms, 0, false)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { diff --git a/src/game/explosions/explosions.c b/src/game/explosions/explosions.c index b1d5910a4..44a93cbc1 100644 --- a/src/game/explosions/explosions.c +++ b/src/game/explosions/explosions.c @@ -2130,7 +2130,7 @@ glabel var7f1b68a0pf /* f12c674: 17000004 */ bnez $t8,.PF0f12c688 /* f12c678: 02402025 */ move $a0,$s2 /* f12c67c: 4406d000 */ mfc1 $a2,$f26 -/* f12c680: 0fc09c86 */ jal func0f0270f4 +/* f12c680: 0fc09c86 */ jal chr0f0270f4 /* f12c684: 02602825 */ move $a1,$s3 .PF0f12c688: /* f12c688: 86820002 */ lh $v0,0x2($s4) @@ -2898,7 +2898,7 @@ glabel var7f1b559c /* f12bb70: 17000004 */ bnez $t8,.L0f12bb84 /* f12bb74: 02402025 */ or $a0,$s2,$zero /* f12bb78: 4406d000 */ mfc1 $a2,$f26 -/* f12bb7c: 0fc09c3d */ jal func0f0270f4 +/* f12bb7c: 0fc09c3d */ jal chr0f0270f4 /* f12bb80: 02602825 */ or $a1,$s3,$zero .L0f12bb84: /* f12bb84: 86820002 */ lh $v0,0x2($s4) @@ -3663,7 +3663,7 @@ glabel var7f1b559c /* f126700: 17000004 */ bnez $t8,.NB0f126714 /* f126704: 02402025 */ or $a0,$s2,$zero /* f126708: 4406d000 */ mfc1 $a2,$f26 -/* f12670c: 0fc09ac4 */ jal func0f0270f4 +/* f12670c: 0fc09ac4 */ jal chr0f0270f4 /* f126710: 02602825 */ or $a1,$s3,$zero .NB0f126714: /* f126714: 86820002 */ lh $v0,0x2($s4) diff --git a/src/game/game_011110.c b/src/game/game_011110.c index 1c89cf6eb..8419b71ce 100644 --- a/src/game/game_011110.c +++ b/src/game/game_011110.c @@ -1169,7 +1169,7 @@ glabel var7f1a827c /* f0122d4: 24450394 */ addiu $a1,$v0,0x394 /* f0122d8: 0fc30864 */ jal currentPlayerSetCamPropertiesWithRoom /* f0122dc: 24460388 */ addiu $a2,$v0,0x388 -/* f0122e0: 0fc0797c */ jal getNumChrSlots +/* f0122e0: 0fc0797c */ jal chrsGetNumSlots /* f0122e4: 00000000 */ nop /* f0122e8: 18400026 */ blez $v0,.PF0f012384 /* f0122ec: 00402025 */ move $a0,$v0 @@ -1990,7 +1990,7 @@ glabel var7f1a827c /* f0122b0: 24450394 */ addiu $a1,$v0,0x394 /* f0122b4: 0fc30709 */ jal currentPlayerSetCamPropertiesWithRoom /* f0122b8: 24460388 */ addiu $a2,$v0,0x388 -/* f0122bc: 0fc07934 */ jal getNumChrSlots +/* f0122bc: 0fc07934 */ jal chrsGetNumSlots /* f0122c0: 00000000 */ nop /* f0122c4: 18400026 */ blez $v0,.L0f012360 /* f0122c8: 00402025 */ or $a0,$v0,$zero @@ -2803,7 +2803,7 @@ glabel var7f1a827c /* f011fd4: 24450394 */ addiu $a1,$v0,0x394 /* f011fd8: 0fc2fdfb */ jal currentPlayerSetCamPropertiesWithRoom /* f011fdc: 24460388 */ addiu $a2,$v0,0x388 -/* f011fe0: 0fc0786c */ jal getNumChrSlots +/* f011fe0: 0fc0786c */ jal chrsGetNumSlots /* f011fe4: 00000000 */ sll $zero,$zero,0x0 /* f011fe8: 18400026 */ blez $v0,.NB0f012084 /* f011fec: 00402025 */ or $a0,$v0,$zero @@ -3236,7 +3236,7 @@ glabel var7f1a827c // &g_Vars.currentplayer->bond2.unk28, // &g_Vars.currentplayer->bond2.unk1c, rooms[0]); // -// numchrs = getNumChrSlots(); +// numchrs = chrsGetNumSlots(); // // for (i = 0; i < numchrs; i++) { // if (g_ChrSlots[i].target == -2) { diff --git a/src/game/game_0147d0.c b/src/game/game_0147d0.c index 206195ed0..a9302615e 100644 --- a/src/game/game_0147d0.c +++ b/src/game/game_0147d0.c @@ -70,7 +70,7 @@ void aibotAllocate(s32 chrnum, s32 aibotnum) struct coord pos = {0.0f, 0.0f, 0.0f}; u32 stack; - prop = propAllocateChr(model, &pos, rooms, 0.0f, ailistFindById(GAILIST_AI_BOT_INIT)); + prop = chrAllocate(model, &pos, rooms, 0.0f, ailistFindById(GAILIST_AI_BOT_INIT)); if (prop != NULL) { propActivate(prop); diff --git a/src/game/game_014f10.c b/src/game/game_014f10.c index 9b09fbdf1..81c1009f7 100644 --- a/src/game/game_014f10.c +++ b/src/game/game_014f10.c @@ -16,7 +16,7 @@ void chrsReset(void) if (g_ChrSlots[i].chrnum >= 0 && g_ChrSlots[i].prop && g_ChrSlots[i].prop->type == PROPTYPE_CHR) { - func0f020d44(g_ChrSlots[i].prop, true); + chr0f020d44(g_ChrSlots[i].prop, true); propDelist(g_ChrSlots[i].prop); propDisable(g_ChrSlots[i].prop); propFree(g_ChrSlots[i].prop); diff --git a/src/game/game_02cde0.c b/src/game/game_02cde0.c index df68b3ee7..12ce273e5 100644 --- a/src/game/game_02cde0.c +++ b/src/game/game_02cde0.c @@ -752,7 +752,7 @@ void chrUnpack(s32 stagenum, struct packedchr *packed, s32 cmdindex) if (model != NULL) { angle = atan2f(pad.look.x, pad.look.z); - prop = propAllocateChr(model, &pad.pos, rooms, angle, ailistFindById(packed->ailistnum)); + prop = chrAllocate(model, &pad.pos, rooms, angle, ailistFindById(packed->ailistnum)); if (prop != NULL) { propActivate(prop); @@ -912,13 +912,13 @@ struct prop *propAllocateEyespy(struct pad *pad, s16 room) model = modelAllocateChr(BODY_EYESPY, 0, 0); if (model) { - prop = propAllocateChr(model, &pad->pos, rooms, 0, ailistFindById(GAILIST_IDLE)); + prop = chrAllocate(model, &pad->pos, rooms, 0, ailistFindById(GAILIST_IDLE)); if (prop) { propActivate(prop); propEnable(prop); chr = prop->chr; - chrSetChrnum(chr, getNextUnusedChrnum()); + chrSetChrnum(chr, chrsGetNextUnusedChrnum()); chr->bodynum = BODY_EYESPY; chr->padpreset1 = 0; chr->chrpreset1 = 0; diff --git a/src/game/game_0b69d0.c b/src/game/game_0b69d0.c index 9596e6359..0966ee9c0 100644 --- a/src/game/game_0b69d0.c +++ b/src/game/game_0b69d0.c @@ -1654,7 +1654,7 @@ bool currentPlayerAssumeChrForAnti(struct chrdata *hostchr, bool force) g_Vars.currentplayer->haschrbody = false; g_Vars.currentplayer->model00d4 = NULL; - func0f020d44(g_Vars.currentplayer->prop, false); + chr0f020d44(g_Vars.currentplayer->prop, false); if (hostchr->bodynum == BODY_SKEDAR) { g_Vars.antiheadnum = HEAD_MRBLONDE; @@ -1684,7 +1684,7 @@ bool currentPlayerAssumeChrForAnti(struct chrdata *hostchr, bool force) playerchr->chrwidth = hostchr->chrwidth; g_Vars.currentplayer->bond2.width = hostchr->chrwidth; - func0f020d44(hostprop, true); + chr0f020d44(hostprop, true); propDeregisterRooms(hostprop); propDelist(hostprop); propDisable(hostprop); @@ -1759,7 +1759,7 @@ void currentPlayerSpawn(void) func0f0b8ba0(); } - for (i = 0; i < getNumChrSlots(); i++) { + for (i = 0; i < chrsGetNumSlots(); i++) { if (g_ChrSlots[i].model && g_ChrSlots[i].prop && (g_ChrSlots[i].hidden & CHRHFLAG_00400000) @@ -2472,7 +2472,7 @@ glabel var7f1ad5b4 /* f0b9200: afa00014 */ sw $zero,0x14($sp) /* f0b9204: e7b20010 */ swc1 $f18,0x10($sp) /* f0b9208: 24860008 */ addiu $a2,$a0,0x8 -/* f0b920c: 0fc082c5 */ jal func0f020b14 +/* f0b920c: 0fc082c5 */ jal chr0f020b14 /* f0b9210: 24870028 */ addiu $a3,$a0,0x28 /* f0b9214: 8e0f0284 */ lw $t7,0x284($s0) /* f0b9218: 24090006 */ addiu $t1,$zero,0x6 @@ -3130,7 +3130,7 @@ glabel var7f1ad5b4 /* f0b6f18: afa00014 */ sw $zero,0x14($sp) /* f0b6f1c: e7b20010 */ swc1 $f18,0x10($sp) /* f0b6f20: 24860008 */ addiu $a2,$a0,0x8 -/* f0b6f24: 0fc08195 */ jal func0f020b14 +/* f0b6f24: 0fc08195 */ jal chr0f020b14 /* f0b6f28: 24870028 */ addiu $a3,$a0,0x28 /* f0b6f2c: 8e0f0284 */ lw $t7,0x284($s0) /* f0b6f30: 24090006 */ addiu $t1,$zero,0x6 @@ -3336,7 +3336,7 @@ void func0f0b9538(void) if (g_Vars.currentplayer->haschrbody) { if (!g_Vars.mplayerisrunning || (IS4MB() && PLAYERCOUNT() == 1)) { g_Vars.currentplayer->haschrbody = false; - func0f020d44(g_Vars.currentplayer->prop, false); + chr0f020d44(g_Vars.currentplayer->prop, false); g_Vars.currentplayer->model00d4 = NULL; bmove0f0cb8c4(g_Vars.currentplayer); bgun0f09df50(); @@ -14343,7 +14343,7 @@ Gfx *currentPlayerRenderShield(Gfx *gdl) sp88[0] = currentPlayerGetScreenWidth() * (1.0f + 0.002f * ((g_Vars.currentplayer->shieldshowrnd >> 20) % 100) + (g_Vars.currentplayer->shieldshowtime * (0.2f + 0.002f * (g_Vars.currentplayer->shieldshowrnd % 100)) * (1.0f / 60.0f))); sp88[1] = currentPlayerGetScreenHeight() * (1.0f + 0.002f * ((g_Vars.currentplayer->shieldshowrnd >> 24) % 100) + (g_Vars.currentplayer->shieldshowtime * (0.2f + 0.002f * ((g_Vars.currentplayer->shieldshowrnd >> 8) % 100)) * (1.0f / 60.0f))); - func0f0295f8(shield, &red, &green, &blue); + chr0f0295f8(shield, &red, &green, &blue); if (g_Vars.currentplayer->shieldshowtime < 30) { f20 = 1 - g_Vars.currentplayer->shieldshowtime * (1.0f / 120.0f); @@ -15257,7 +15257,7 @@ s32 playerTick(struct prop *prop) player->vv_ground = chr->ground; player->vv_manground = chr->ground; - func0f0220ac(prop->chr); + chr0f0220ac(prop->chr); if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) { if (player->model00d4->filedata->type == &g_ModelTypeChr) { @@ -15298,8 +15298,8 @@ s32 playerTick(struct prop *prop) chr->actiontype = ACT_BONDMULTI; if ((chr->hidden & CHRHFLAG_00000800) == 0) { - leftprop = chrGetEquippedWeaponProp(chr, HAND_LEFT); - rightprop = chrGetEquippedWeaponProp(chr, HAND_RIGHT); + leftprop = chrGetHeldProp(chr, HAND_LEFT); + rightprop = chrGetHeldProp(chr, HAND_RIGHT); animnum = modelGetAnimNum(chr->model); func0f0c2a58(chr, bmoveGetCrouchPosByPlayer(playernum), player->speedsideways, player->speedforwards, player->speedtheta, &player->angleoffset, &chr->act_bondmulti.animcfg); @@ -15445,11 +15445,11 @@ glabel var7f1ad744 /* f0c2a64: afa40060 */ sw $a0,0x60($sp) /* f0c2a68: afa60068 */ sw $a2,0x68($sp) /* f0c2a6c: afa7006c */ sw $a3,0x6c($sp) -/* f0c2a70: 0fc0a209 */ jal chrGetEquippedWeaponProp +/* f0c2a70: 0fc0a209 */ jal chrGetHeldProp /* f0c2a74: 24050001 */ addiu $a1,$zero,0x1 /* f0c2a78: 8fa40060 */ lw $a0,0x60($sp) /* f0c2a7c: 00002825 */ or $a1,$zero,$zero -/* f0c2a80: 0fc0a209 */ jal chrGetEquippedWeaponProp +/* f0c2a80: 0fc0a209 */ jal chrGetHeldProp /* f0c2a84: afa2005c */ sw $v0,0x5c($sp) /* f0c2a88: 8fa3005c */ lw $v1,0x5c($sp) /* f0c2a8c: 3c01bf80 */ lui $at,0xbf80 diff --git a/src/game/game_129210.c b/src/game/game_129210.c index f7a6f91d7..16766f512 100644 --- a/src/game/game_129210.c +++ b/src/game/game_129210.c @@ -163,7 +163,7 @@ void *func0f12955c(s32 count, s32 index, s32 arg2, s32 arg3) // reaping on a random corpse and replace its entry in the array. // So at the end, we'll have an array of up to six unreapable corpses and // all other corpses will be flagged for reaping. - numchrs = getNumChrSlots(); + numchrs = chrsGetNumSlots(); tally = 0; for (i = 0; i < numchrs; i++) { @@ -296,7 +296,7 @@ glabel func0f12955c /* f1242ec: 1420ffcb */ bnez $at,.NB0f12421c /* f1242f0: 26100010 */ addiu $s0,$s0,0x10 .NB0f1242f4: -/* f1242f4: 0fc0786c */ jal getNumChrSlots +/* f1242f4: 0fc0786c */ jal chrsGetNumSlots /* f1242f8: 00002825 */ or $a1,$zero,$zero /* f1242fc: 0040a825 */ or $s5,$v0,$zero /* f124300: 18400039 */ blez $v0,.NB0f1243e8 diff --git a/src/game/game_1999b0.c b/src/game/game_1999b0.c index 09639cc6e..fd4673e77 100644 --- a/src/game/game_1999b0.c +++ b/src/game/game_1999b0.c @@ -265,7 +265,7 @@ bool aibotDoFarsightThing(struct chrdata *chr, u32 arg1, struct coord *vector, s // chance of passing. if (oppchr != chr && value > rand - && func0f06b39c(arg3, vector, &oppprop->pos, func0f0278a4(oppchr))) { + && func0f06b39c(arg3, vector, &oppprop->pos, chr0f0278a4(oppchr))) { bgunPlayPropHitSound(&gset, oppprop, -1); if (oppchr->model && chrGetShield(oppchr) > 0) { diff --git a/src/game/lv.c b/src/game/lv.c index 98404794c..29f9c003f 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -2616,7 +2616,7 @@ glabel var7f1b8e7cpf /* f16b29c: 0010582b */ sltu $t3,$zero,$s0 /* f16b2a0: 01608025 */ move $s0,$t3 .PF0f16b2a4: -/* f16b2a4: 0fc0a16f */ jal func0f028498 +/* f16b2a4: 0fc0a16f */ jal chr0f028498 /* f16b2a8: 02002025 */ move $a0,$s0 /* f16b2ac: 0fc1fe48 */ jal propsRenderBeams /* f16b2b0: 02602025 */ move $a0,$s3 @@ -3771,7 +3771,7 @@ Gfx *lvRender(Gfx *gdl) func0f0641f4(); gdl = bgRender(gdl); - func0f028498(var80075d68 == 15 || g_AnimHostEnabled); + chr0f028498(var80075d68 == 15 || g_AnimHostEnabled); gdl = propsRenderBeams(gdl); gdl = shardsRender(gdl); gdl = sparksRender(gdl); @@ -5208,7 +5208,7 @@ glabel var7f1b1fd4nb /* f164fb4: 0010582b */ sltu $t3,$zero,$s0 /* f164fb8: 01608025 */ or $s0,$t3,$zero .NB0f164fbc: -/* f164fbc: 0fc09fa8 */ jal func0f028498 +/* f164fbc: 0fc09fa8 */ jal chr0f028498 /* f164fc0: 02002025 */ or $a0,$s0,$zero /* f164fc4: 0fc1f852 */ jal propsRenderBeams /* f164fc8: 02602025 */ or $a0,$s3,$zero diff --git a/src/game/prop.c b/src/game/prop.c index ec5f69073..1fbb3902b 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -714,7 +714,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc if (prop->type == PROPTYPE_CHR || (prop->type == PROPTYPE_PLAYER && prop->chr && propGetPlayerNum(prop) != g_Vars.currentplayernum)) { if (!shortrange) { - func0f027994(prop, &shotdata, arg1, arg8); + chr0f027994(prop, &shotdata, arg1, arg8); } } else if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_WEAPON || prop->type == PROPTYPE_DOOR) { func0f085e00(prop, &shotdata); @@ -2609,7 +2609,7 @@ glabel var7f1ab190pf /* f064028: 0fc198b9 */ jal propsDefragRoomProps /* f06402c: 00000000 */ nop .PF0f064030: -/* f064030: 0fc09214 */ jal func0f02472c +/* f064030: 0fc09214 */ jal chr0f02472c /* f064034: 00000000 */ nop /* f064038: 8fbf002c */ lw $ra,0x2c($sp) /* f06403c: 8fb00014 */ lw $s0,0x14($sp) @@ -3586,7 +3586,7 @@ glabel propsTick /* f063d98: 0fc19815 */ jal propsDefragRoomProps /* f063d9c: 00000000 */ nop .L0f063da0: -/* f063da0: 0fc091cb */ jal func0f02472c +/* f063da0: 0fc091cb */ jal chr0f02472c /* f063da4: 00000000 */ nop /* f063da8: 8fbf002c */ lw $ra,0x2c($sp) /* f063dac: 8fb00014 */ lw $s0,0x14($sp) @@ -4559,7 +4559,7 @@ glabel propsTick /* f06300c: 0fc194af */ jal propsDefragRoomProps /* f063010: 00000000 */ sll $zero,$zero,0x0 .NB0f063014: -/* f063014: 0fc09052 */ jal func0f02472c +/* f063014: 0fc09052 */ jal chr0f02472c /* f063018: 00000000 */ sll $zero,$zero,0x0 /* f06301c: 8fbf002c */ lw $ra,0x2c($sp) /* f063020: 8fb00014 */ lw $s0,0x14($sp) @@ -5113,7 +5113,7 @@ glabel propsTick // propsDefragRoomProps(); // } // -// func0f02472c(); +// chr0f02472c(); //} void propsTickPadEffects(void) @@ -5406,7 +5406,7 @@ void farsightChooseTarget(void) s32 i; if (weaponnum == WEAPON_FARSIGHT) { - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); for (i = numchrs - 1; i >= 0; i--) { struct prop *prop = g_ChrSlots[i].prop; @@ -5589,8 +5589,8 @@ void autoaimTick(void) chr = prop->chr; if (!chrCompareTeams(g_Vars.currentplayer->prop->chr, chr, COMPARE_FRIENDS) - && (chrGetEquippedWeaponProp(chr, HAND_RIGHT) - || chrGetEquippedWeaponProp(chr, HAND_LEFT) + && (chrGetHeldProp(chr, HAND_RIGHT) + || chrGetHeldProp(chr, HAND_LEFT) || (chr->chrflags & CHRCFLAG_FORCEAUTOAIM) || chr->gunprop) && chrCalculateAutoAim(prop, &sp94, sp8c, sp84)) { @@ -6168,7 +6168,7 @@ void func0f0661fc(void) void propGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin) { if (prop->type == PROPTYPE_CHR) { - propChrGetBbox(prop, width, ymax, ymin); + chrGetBbox(prop, width, ymax, ymin); } else if (prop->type == PROPTYPE_PLAYER) { propPlayerGetBbox(prop, width, ymax, ymin); } else if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_DOOR) { diff --git a/src/game/propobj.c b/src/game/propobj.c index a86e2254f..a6d5978a2 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -420,7 +420,7 @@ bool doorCallLift(struct prop *doorprop, bool allowclose) handled = false; } else { bool vacant = true; - s32 numchrslots = getNumChrSlots(); + s32 numchrslots = chrsGetNumSlots(); s32 i; for (i = 0; i < PLAYERCOUNT(); i++) { @@ -6023,7 +6023,7 @@ void objFree(struct defaultobj *obj, bool freeprop, bool canregen) // If obj is an occupied chair, remove the chr from it if (obj->hidden & OBJHFLAG_OCCUPIEDCHAIR) { - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); s32 i; obj->hidden &= ~OBJHFLAG_OCCUPIEDCHAIR; @@ -6056,7 +6056,7 @@ void objFree(struct defaultobj *obj, bool freeprop, bool canregen) func0f0926bc(obj->prop, 1, 0xffff); shieldhitsRemoveByProp(obj->prop); - propClearReferences(obj->prop - g_Vars.props); + chrClearReferences(obj->prop - g_Vars.props); projectilesUnrefOwner(obj->prop); func0f13e40c(obj->prop, 0); @@ -7383,7 +7383,7 @@ glabel func0f06c28c /* f06c2c4: afa700fc */ sw $a3,0xfc($sp) /* f06c2c8: 8c8e001c */ lw $t6,0x1c($a0) /* f06c2cc: 00808025 */ or $s0,$a0,$zero -/* f06c2d0: 0fc09e29 */ jal func0f0278a4 +/* f06c2d0: 0fc09e29 */ jal chr0f0278a4 /* f06c2d4: afae00e8 */ sw $t6,0xe8($sp) /* f06c2d8: 8fa200e8 */ lw $v0,0xe8($sp) /* f06c2dc: 8fa300f4 */ lw $v1,0xf4($sp) @@ -24781,7 +24781,7 @@ glabel var7f1ab6dcpf /* f075bac: 8cc6d3d4 */ lw $a2,-0x2c2c($a2) /* f075bb0: 8ca59614 */ lw $a1,-0x69ec($a1) /* f075bb4: 8c84d3d0 */ lw $a0,-0x2c30($a0) -/* f075bb8: 0fc0987a */ jal func0f0260c4 +/* f075bb8: 0fc0987a */ jal chr0f0260c4 /* f075bbc: 27a701c8 */ addiu $a3,$sp,0x1c8 /* f075bc0: 100000df */ b .PF0f075f40 /* f075bc4: 8faf034c */ lw $t7,0x34c($sp) @@ -28319,7 +28319,7 @@ glabel var7f1aa438 /* f075928: 8cc6ce74 */ lw $a2,%lo(var8009ce74)($a2) /* f07592c: 8ca59934 */ lw $a1,%lo(var80069934)($a1) /* f075930: 8c84ce70 */ lw $a0,%lo(var8009ce70)($a0) -/* f075934: 0fc09831 */ jal func0f0260c4 +/* f075934: 0fc09831 */ jal chr0f0260c4 /* f075938: 27a701c8 */ addiu $a3,$sp,0x1c8 /* f07593c: 100000df */ b .L0f075cbc /* f075940: 8faf034c */ lw $t7,0x34c($sp) @@ -31821,7 +31821,7 @@ glabel var7f1aa438 /* f074654: 8cc615a4 */ lw $a2,0x15a4($a2) /* f074658: 8ca5c034 */ lw $a1,-0x3fcc($a1) /* f07465c: 8c8415a0 */ lw $a0,0x15a0($a0) -/* f074660: 0fc096b8 */ jal func0f0260c4 +/* f074660: 0fc096b8 */ jal chr0f0260c4 /* f074664: 27a701cc */ addiu $a3,$sp,0x1cc /* f074668: 100000e0 */ beqz $zero,.NB0f0749ec /* f07466c: 8fb9034c */ lw $t9,0x34c($sp) @@ -33840,7 +33840,7 @@ glabel var7f1aa454 /* f0778d8: 02802825 */ or $a1,$s4,$zero /* f0778dc: 0fc1979d */ jal func0f065e74 /* f0778e0: 26270028 */ addiu $a3,$s1,0x28 -/* f0778e4: 0fc0882b */ jal func0f0220ac +/* f0778e4: 0fc0882b */ jal chr0f0220ac /* f0778e8: 02002025 */ or $a0,$s0,$zero /* f0778ec: 8e040020 */ lw $a0,0x20($s0) /* f0778f0: 0c006b4d */ jal modelSetRootPosition @@ -34226,7 +34226,7 @@ glabel var7f1aa454 /* f0778d8: 02802825 */ or $a1,$s4,$zero /* f0778dc: 0fc1979d */ jal func0f065e74 /* f0778e0: 26270028 */ addiu $a3,$s1,0x28 -/* f0778e4: 0fc0882b */ jal func0f0220ac +/* f0778e4: 0fc0882b */ jal chr0f0220ac /* f0778e8: 02002025 */ or $a0,$s0,$zero /* f0778ec: 8e040020 */ lw $a0,0x20($s0) /* f0778f0: 0c006b4d */ jal modelSetRootPosition @@ -34609,7 +34609,7 @@ glabel var7f1aa454 /* f0764d0: 02c02825 */ or $a1,$s6,$zero /* f0764d4: 0fc19437 */ jal func0f065e74 /* f0764d8: 26270028 */ addiu $a3,$s1,0x28 -/* f0764dc: 0fc086f9 */ jal func0f0220ac +/* f0764dc: 0fc086f9 */ jal chr0f0220ac /* f0764e0: 02002025 */ or $a0,$s0,$zero /* f0764e4: 8e040020 */ lw $a0,0x20($s0) /* f0764e8: 0c006f6d */ jal modelSetRootPosition @@ -35626,7 +35626,7 @@ glabel var7f1aa580 /* f07908c: 10000007 */ b .L0f0790ac /* f079090: 8ca5c530 */ lw $a1,%lo(g_MpNumPlayers)($a1) .L0f079094: -/* f079094: 0fc07934 */ jal getNumChrSlots +/* f079094: 0fc07934 */ jal chrsGetNumSlots /* f079098: afa800ac */ sw $t0,0xac($sp) /* f07909c: 3c09800a */ lui $t1,%hi(g_Vars) /* f0790a0: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -36848,7 +36848,7 @@ glabel var7f1aa580 /* f07908c: 10000007 */ b .L0f0790ac /* f079090: 8ca5c530 */ lw $a1,%lo(g_MpNumPlayers)($a1) .L0f079094: -/* f079094: 0fc07934 */ jal getNumChrSlots +/* f079094: 0fc07934 */ jal chrsGetNumSlots /* f079098: afa800ac */ sw $t0,0xac($sp) /* f07909c: 3c09800a */ lui $t1,%hi(g_Vars) /* f0790a0: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -49820,7 +49820,7 @@ s32 objTick(struct prop *prop) tagnum = objGetTagNum(obj); if (tagnum >= 0) { - numchrs = getNumChrSlots(); + numchrs = chrsGetNumSlots(); for (i = 0; i < numchrs; i++) { if (g_ChrSlots[i].myspecial == tagnum) { @@ -65681,7 +65681,7 @@ void coordTriggerProxies(struct coord *pos, bool arg1) void chrsTriggerProxies(void) { - s32 numchrs = getNumChrSlots(); + s32 numchrs = chrsGetNumSlots(); s32 i; for (i = 0; i < numchrs; i++) { diff --git a/src/game/sparks/sparks.c b/src/game/sparks/sparks.c index 24f216397..6d76675f3 100644 --- a/src/game/sparks/sparks.c +++ b/src/game/sparks/sparks.c @@ -546,7 +546,7 @@ glabel sparksCreate /* f12fa84: 8fa80084 */ lw $t0,0x84($sp) /* f12fa88: 8d420004 */ lw $v0,0x4($t2) /* f12fa8c: 27a60048 */ addiu $a2,$sp,0x48 -/* f12fa90: 0fc09451 */ jal bodyGetBloodColour +/* f12fa90: 0fc09451 */ jal chrGetBloodColour /* f12fa94: 84440010 */ lh $a0,0x10($v0) /* f12fa98: 8fac0084 */ lw $t4,0x84($sp) /* f12fa9c: 24010002 */ addiu $at,$zero,0x2 diff --git a/src/game/splat.c b/src/game/splat.c index 972898945..37f02ce5d 100644 --- a/src/game/splat.c +++ b/src/game/splat.c @@ -61,7 +61,7 @@ void splatTick(struct prop *prop) if (thudframe != -1.0f && modelGetCurAnimFrame(chr->model) < thudframe) { osSyncPrintf("SPLAT : Not Dead Enough %s%s%f", "", "", modelGetCurAnimFrame(chr->model)); } else if (chr->tickssincesplat > PALDOWN(30) && chr->deaddropsplatsadded < 6) { - chr->deaddropsplatsadded += func0f148f18(1, 1.1f, prop, NULL, 0, 0, isskedar, 1, PALDOWN(150), attacker, random() & 8); + chr->deaddropsplatsadded += splatsCreate(1, 1.1f, prop, NULL, 0, 0, isskedar, 1, PALDOWN(150), attacker, random() & 8); } } else { u32 value = chr->bulletstaken * chr->tickssincesplat; @@ -79,7 +79,7 @@ void splatTick(struct prop *prop) } if (addmore) { - chr->woundedsplatsadded += func0f148f18(1, 0.3f, prop, NULL, 0, 0, isskedar, 2, PALDOWN(80), attacker, 0); + chr->woundedsplatsadded += splatsCreate(1, 0.3f, prop, NULL, 0, 0, isskedar, 2, PALDOWN(80), attacker, 0); } } @@ -95,7 +95,7 @@ void splatTick(struct prop *prop) chr->tickssincesplat += g_Vars.lvupdate240_60; } -void func0f148e54(struct prop *prop, struct splat *arg1, struct coord *arg2, struct coord *arg3, s32 arg4, s32 arg5, struct chrdata *arg6) +void splatsCreateForChrHit(struct prop *prop, struct splat *arg1, struct coord *arg2, struct coord *arg3, s32 arg4, s32 arg5, struct chrdata *arg6) { struct chrdata *chr = prop->chr; @@ -107,12 +107,12 @@ void func0f148e54(struct prop *prop, struct splat *arg1, struct coord *arg2, str u32 rand = random() % 3; if (rand) { - chr->stdsplatsadded += func0f148f18(rand, 0.8f, prop, arg1, arg2, arg3, arg4, arg5, PALDOWN(50), arg6, 0); + chr->stdsplatsadded += splatsCreate(rand, 0.8f, prop, arg1, arg2, arg3, arg4, arg5, PALDOWN(50), arg6, 0); } } } -s32 func0f148f18(s32 qty, f32 arg1, struct prop *prop, struct splat *arg3, struct coord *arg4, struct coord *arg5, s32 arg6, s32 arg7, s32 arg8, struct chrdata *arg9, s32 arg10) +s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct splat *arg3, struct coord *arg4, struct coord *arg5, s32 arg6, s32 arg7, s32 arg8, struct chrdata *arg9, s32 arg10) { s32 i; s32 j; diff --git a/src/game/wallhit.c b/src/game/wallhit.c index cb508ddb8..bcd04035d 100644 --- a/src/game/wallhit.c +++ b/src/game/wallhit.c @@ -340,7 +340,7 @@ void func0f13e5c8(struct prop *prop) { if (prop && prop->chr && (prop->type == PROPTYPE_CHR || prop->type == PROPTYPE_PLAYER)) { struct chrdata *chr = prop->chr; - bodyGetBloodColour(chr->bodynum, var8007f744, NULL); + chrGetBloodColour(chr->bodynum, var8007f744, NULL); } else { var8007f744[0] = 0x40; var8007f744[1] = 0x0a; diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index 654271130..f7abe1aa9 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -8,21 +8,21 @@ void propsTick2(void); void chrSetChrnum(struct chrdata *chr, s16 chrnum); void chrDeregister(s32 chrnum); void chrCalculatePushPos(struct chrdata *chr, struct coord *pos, s16 *rooms, bool arg3); -bool func0f01f264(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3, bool arg4); -void func0f01f378(void); -s32 getNumFreeChrSlots(void); -s16 getNextUnusedChrnum(void); -struct prop *func0f020b14(struct prop *prop, struct model *model, struct coord *pos, s16 *rooms, f32 arg3, u8 *ailist); -void func0f020d44(struct prop *prop, bool removechr); +bool chr0f01f264(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3, bool arg4); +void chr0f01f378(void); +s32 chrsGetNumFree(void); +s16 chrsGetNextUnusedChrnum(void); +struct prop *chr0f020b14(struct prop *prop, struct model *model, struct coord *pos, s16 *rooms, f32 arg3, u8 *ailist); +void chr0f020d44(struct prop *prop, bool removechr); void chrUpdateAimProperties(struct chrdata *chr); void chrFlinchBody(struct chrdata *chr); void chrFlinchHead(struct chrdata *chr, f32 arg1); -f32 func0f02143c(struct chrdata *chr); -void func0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms); -void func0f0220ec(struct chrdata *chr, s32 lvupdate240, s32 arg2); -void func0f022214(struct chrdata *chr, struct prop *child, bool fulltick); +f32 chr0f02143c(struct chrdata *chr); +void chr0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms); +void chr0f0220ec(struct chrdata *chr, s32 lvupdate240, s32 arg2); +void chr0f022214(struct chrdata *chr, struct prop *child, bool fulltick); void chrUpdateCloak(struct chrdata *chr); -s32 func0f022be4(struct chrdata *chr); +s32 chr0f022be4(struct chrdata *chr); void chrSetPoisoned(struct chrdata *chr, struct prop *poisonprop); void chrTickPoisoned(struct chrdata *chr); bool chrTickBeams(struct prop *prop); @@ -30,65 +30,65 @@ s32 chrTick(struct prop *prop); void chrDropConcealedItems(struct chrdata *chr); void chrSetHudpieceVisible(struct chrdata *chr, bool visible); void chrDropItemsForOwnerReap(struct chrdata *chr); -void func0f0246e4(u8 *arg0); -bool func0f024738(struct chrdata *chr); -bool func0f024b18(struct model *model, struct modelnode *node); +void chr0f0246e4(u8 *arg0); +bool chr0f024738(struct chrdata *chr); +bool chr0f024b18(struct model *model, struct modelnode *node); void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha, struct chrdata *chr); -void bodyGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2); +void chrGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2); Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha); void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 hitpart, struct coord *coord, struct coord *coord2, struct chrdata *chr2); -u32 func0f0260c4(void); -void func0f0268bc(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3); -u32 func0f0270f4(void); -f32 func0f0278a4(struct chrdata *chr); -void func0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3); +u32 chr0f0260c4(void); +void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3); +u32 chr0f0270f4(void); +f32 chr0f0278a4(struct chrdata *chr); +void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3); void chrHit(struct shotdata *shotdata, struct hit *hit); -void func0f028498(bool value); +void chr0f028498(bool value); void chrsCheckForNoise(f32 noiseradius); bool chrCalculateAutoAim(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3); -s32 func0f028e18(struct prop *arg0, struct modelnode *node, struct model *model, struct prop *arg3); -bool func0f028e6c(s32 arg0, struct prop *prop, struct prop **propptr, struct modelnode **nodeptr, struct model **modelptr); +s32 chr0f028e18(struct prop *arg0, struct modelnode *node, struct model *model, struct prop *arg3); +bool chr0f028e6c(s32 arg0, struct prop *prop, struct prop **propptr, struct modelnode **nodeptr, struct model **modelptr); void shieldhitCreate(struct prop *prop, f32 shield, struct prop *arg2, struct modelnode *node, struct model *model, s32 side, s16 *arg6); void shieldhitRemove(struct shieldhit *shieldhit); void shieldhitsRemoveByProp(struct prop *prop); -s32 func0f02932c(struct prop *prop, s32 arg1); -s32 func0f0293ec(struct prop *prop, s32 arg1); -s32 func0f0294cc(struct prop *prop, s32 arg1); -void func0f0295f8(f32 arg0, s32 *arg1, s32 *arg2, s32 *arg3); +s32 chr0f02932c(struct prop *prop, s32 arg1); +s32 chr0f0293ec(struct prop *prop, s32 arg1); +s32 chr0f0294cc(struct prop *prop, s32 arg1); +void chr0f0295f8(f32 arg0, s32 *arg1, s32 *arg2, s32 *arg3); f32 propGetShieldThing(struct prop **propptr); -Gfx *func0f02983c(Gfx *gdl, struct shieldhit *hit, struct prop *prop, struct model *model, struct modelnode *node, s32 side, s32 arg6, s32 arg7, s32 alpha); +Gfx *chr0f02983c(Gfx *gdl, struct shieldhit *hit, struct prop *prop, struct model *model, struct modelnode *node, s32 side, s32 arg6, s32 arg7, s32 alpha); Gfx *shieldhitRender(Gfx *gdl, struct prop *prop1, struct prop *prop2, s32 alpha, bool arg4, s32 cmnum1, s32 cmnum2, s32 cmnum3, s32 cmnum4); -Gfx *func0f02bdf8(Gfx *gdl, struct prop *chr1, struct prop *chr2); +Gfx *chrRenderCloak(Gfx *gdl, struct prop *chr1, struct prop *chr2); Gfx *chrRenderShield(Gfx *gdl, struct chrdata *chr, u32 alpha); void shieldhitsTick(void); void chrSetDrCarollImages(struct chrdata *drcaroll, s32 imageleft, s32 imageright); -s32 getNumChrSlots(void); +s32 chrsGetNumSlots(void); void chrRegister(s32 chrnum, s32 chrindex); struct gfxvtx *chrAllocateVertices(s32 numvertices); -void setVar8006297c(u32 arg0); -u32 getVar8006297c(void); -void setVar80062980(u32 arg0); -u32 getVar80062980(void); +void chrsSetVar8006297c(u32 arg0); +u32 chrsGetVar8006297c(void); +void chrsSetVar80062980(u32 arg0); +u32 chrsGetVar80062980(void); void chrSetPerimEnabled(struct chrdata *chr, bool enable); void chrSetMaxDamage(struct chrdata *chr, f32 maxdamage); f32 chrGetMaxDamage(struct chrdata *chr); void chrAddHealth(struct chrdata *chr, f32 health); f32 chrGetArmor(struct chrdata *chr); void chrInit(struct prop *prop, u8 *ailist); -struct prop *propAllocateChr(struct model *model, struct coord *pos, s16 *rooms, f32 faceangle, u8 *ailist); -void propClearReferences(s32 propnum); -void func0f022084(struct chrdata *chr, s16 *room); -void func0f0220ac(struct chrdata *chr); +struct prop *chrAllocate(struct model *model, struct coord *pos, s16 *rooms, f32 faceangle, u8 *ailist); +void chrClearReferences(s32 propnum); +void chr0f022084(struct chrdata *chr, s16 *room); +void chr0f0220ac(struct chrdata *chr); void chrCloak(struct chrdata *chr, bool arg1); void chrUncloak(struct chrdata *chr, bool value); void chrUncloakTemporarily(struct chrdata *chr); -void func0f02472c(void); -void func0f028490(f32 arg1); +void chr0f02472c(void); +void chr0f028490(f32 arg1); struct chrdata *chrFindByLiteralId(s32 chrnum); -struct prop *chrGetEquippedWeaponProp(struct chrdata *chr, s32 hand); -struct prop *chrGetEquippedWeaponPropWithCheck(struct chrdata *chr, s32 hand); +struct prop *chrGetHeldProp(struct chrdata *chr, s32 hand); +struct prop *chrGetHeldUsableProp(struct chrdata *chr, s32 hand); struct prop *chrGetTargetProp(struct chrdata *chr); bool chrUpdateGeometry(struct prop *prop, u8 **start, u8 **end); -void propChrGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin); +void chrGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin); #endif diff --git a/src/include/game/splat.h b/src/include/game/splat.h index 76a834770..dc852ab56 100644 --- a/src/include/game/splat.h +++ b/src/include/game/splat.h @@ -5,8 +5,8 @@ #include "types.h" void splatTick(struct prop *prop); -void func0f148e54(struct prop *prop, struct splat *arg1, struct coord *arg2, struct coord *arg3, s32 arg4, s32 arg5, struct chrdata *arg6); -s32 func0f148f18(s32 qty, f32 arg1, struct prop *prop, struct splat *arg3, struct coord *arg4, struct coord *arg5, s32 arg6, s32 arg7, s32 arg8, struct chrdata *arg9, s32 arg10); +void splatsCreateForChrHit(struct prop *prop, struct splat *arg1, struct coord *arg2, struct coord *arg3, s32 arg4, s32 arg5, struct chrdata *arg6); +s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct splat *arg3, struct coord *arg4, struct coord *arg5, s32 arg6, s32 arg7, s32 arg8, struct chrdata *arg9, s32 arg10); bool func0f149274(f32 arg0, struct prop *prop, struct splat *arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6, struct chrdata *arg7, s32 arg8); void func0f149864(void); u32 func0f14986c(void);