diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index ac7c31110..8921bb648 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -3764,7 +3764,7 @@ void chrInit(struct prop *prop, u8 *ailist) chr->unk32c_20 = 0; chr->goposhitcount = 0; - func0f149c64(chr); + chrInitSplats(chr); } GLOBAL_ASM( diff --git a/src/game/game_0b28d0.c b/src/game/game_0b28d0.c index d4d2987d4..11128d968 100644 --- a/src/game/game_0b28d0.c +++ b/src/game/game_0b28d0.c @@ -5657,7 +5657,7 @@ glabel func0f0b72dc /* f0b7378: 8e580284 */ lw $t8,0x284($s2) .L0f0b737c: /* f0b737c: 8f0e00bc */ lw $t6,0xbc($t8) -/* f0b7380: 0fc52719 */ jal func0f149c64 +/* f0b7380: 0fc52719 */ jal chrInitSplats /* f0b7384: 8dc40004 */ lw $a0,0x4($t6) /* f0b7388: 0fc2ddf3 */ jal func0f0b77cc /* f0b738c: 00000000 */ sll $zero,$zero,0x0 diff --git a/src/game/game_129900.c b/src/game/game_129900.c index e435583a6..71758e953 100644 --- a/src/game/game_129900.c +++ b/src/game/game_129900.c @@ -36425,20 +36425,18 @@ glabel func0f14986c /* f149c60: 00000000 */ sll $zero,$zero,0x0 ); -GLOBAL_ASM( -glabel func0f149c64 -/* f149c64: 44800000 */ mtc1 $zero,$f0 -/* f149c68: a0800334 */ sb $zero,0x334($a0) -/* f149c6c: a4800336 */ sh $zero,0x336($a0) -/* f149c70: a0800339 */ sb $zero,0x339($a0) -/* f149c74: a0800335 */ sb $zero,0x335($a0) -/* f149c78: a080033a */ sb $zero,0x33a($a0) -/* f149c7c: a0800338 */ sb $zero,0x338($a0) -/* f149c80: e480033c */ swc1 $f0,0x33c($a0) -/* f149c84: e4800340 */ swc1 $f0,0x340($a0) -/* f149c88: 03e00008 */ jr $ra -/* f149c8c: e4800344 */ swc1 $f0,0x344($a0) -); +void chrInitSplats(struct chrdata *chr) +{ + chr->bulletstaken = 0; + chr->tickssincesplat = 0; + chr->stdsplatsadded = 0; + chr->woundedsplatsadded = 0; + chr->deaddropsplatsadded = 0; + chr->splatsdroppedhe = 0; + chr->lastdroppos.x = 0; + chr->lastdroppos.y = 0; + chr->lastdroppos.z = 0; +} GLOBAL_ASM( glabel func0f149c90 diff --git a/src/game/game_187770.c b/src/game/game_187770.c index 0cb137dfb..85ef4b0c0 100644 --- a/src/game/game_187770.c +++ b/src/game/game_187770.c @@ -10469,7 +10469,7 @@ glabel func0f1905f0 /* f19064c: 8fbf0024 */ lw $ra,0x24($sp) /* f190650: 0fc640a3 */ jal mpChrReset /* f190654: 02002025 */ or $a0,$s0,$zero -/* f190658: 0fc52719 */ jal func0f149c64 +/* f190658: 0fc52719 */ jal chrInitSplats /* f19065c: 02002025 */ or $a0,$s0,$zero /* f190660: c60c0024 */ lwc1 $f12,0x24($s0) /* f190664: 27a5003c */ addiu $a1,$sp,0x3c diff --git a/src/include/game/game_129900.h b/src/include/game/game_129900.h index 3602c8c55..992012d8c 100644 --- a/src/include/game/game_129900.h +++ b/src/include/game/game_129900.h @@ -142,7 +142,7 @@ u32 func0f148f18(void); u32 func0f149274(void); void func0f149864(void); u32 func0f14986c(void); -void func0f149c64(struct chrdata *chr); +void chrInitSplats(struct chrdata *chr); u32 func0f149c90(void); u32 func0f149d58(void); u32 func0f149e58(void); diff --git a/src/include/types.h b/src/include/types.h index e8f862e13..8bd80e6b5 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -645,14 +645,14 @@ struct chrdata { /*0x330*/ u16 roomtosearch; /*0x332*/ u8 propsoundcount; /*0x333*/ s8 patrolnextstep; - /*0x334*/ u8 BulletsTaken; - /*0x335*/ u8 WoundedSplatsAd; - /*0x336*/ u16 TicksSinceSplat; - /*0x338*/ u8 SplatsDroppedHe; - /*0x339*/ u8 StdSplatsAdded; - /*0x33a*/ u8 DeadDropSplatsA; + /*0x334*/ u8 bulletstaken; + /*0x335*/ u8 woundedsplatsadded; + /*0x336*/ u16 tickssincesplat; + /*0x338*/ u8 splatsdroppedhe; + /*0x339*/ u8 stdsplatsadded; + /*0x33a*/ u8 deaddropsplatsadded; /*0x33b*/ u8 aimtesttimer60; - /*0x33c*/ struct coord LastDropPos; + /*0x33c*/ struct coord lastdroppos; /*0x348*/ u32 unk348; /*0x34c*/ u32 unk34c; /*0x350*/ u32 unk350;