diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index f63c78457..76495cc0e 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -23066,7 +23066,7 @@ bool chrStartSkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) chr->act_skjump.hit = false; chr->act_skjump.unk03c = hspeed; chr->act_skjump.unk04c = hspeed; - chr->act_skjump.y = func0002a330(&chr->prop->pos, chr->chrwidth, chr->prop->rooms, 0, 0); + chr->act_skjump.y = coordFindGroundYSimple(&chr->prop->pos, chr->chrwidth, chr->prop->rooms, NULL, NULL); } else { return false; } @@ -25703,7 +25703,7 @@ glabel var7f1a941c /* f04b038: 4481a000 */ mtc1 $at,$f20 /* f04b03c: 02a03025 */ or $a2,$s5,$zero /* f04b040: 00003825 */ or $a3,$zero,$zero -/* f04b044: 0c00a8cc */ jal func0002a330 +/* f04b044: 0c00a8cc */ jal coordFindGroundYSimple /* f04b048: afa00010 */ sw $zero,0x10($sp) /* f04b04c: 3c017f1b */ lui $at,%hi(var7f1a940c) /* f04b050: c426940c */ lwc1 $f6,%lo(var7f1a940c)($at) @@ -25802,7 +25802,7 @@ glabel var7f1a941c /* f04b1ac: 8fa500a8 */ lw $a1,0xa8($sp) /* f04b1b0: 02003025 */ or $a2,$s0,$zero /* f04b1b4: 00003825 */ or $a3,$zero,$zero -/* f04b1b8: 0c00a8cc */ jal func0002a330 +/* f04b1b8: 0c00a8cc */ jal coordFindGroundYSimple /* f04b1bc: afa00010 */ sw $zero,0x10($sp) /* f04b1c0: 3c017f1b */ lui $at,%hi(var7f1a9414) /* f04b1c4: c4249414 */ lwc1 $f4,%lo(var7f1a9414)($at) diff --git a/src/game/propobj.c b/src/game/propobj.c index 4fb539f2b..ab5fb4610 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -12709,7 +12709,7 @@ glabel var7f1aa2c8 /* f07145c: 3c0540a0 */ lui $a1,0x40a0 /* f071460: 27a6002c */ addiu $a2,$sp,0x2c /* f071464: afa00010 */ sw $zero,0x10($sp) -/* f071468: 0c00a8cc */ jal func0002a330 +/* f071468: 0c00a8cc */ jal coordFindGroundYSimple /* f07146c: 24e70058 */ addiu $a3,$a3,0x58 /* f071470: 3c017f1b */ lui $at,%hi(var7f1aa2c8) /* f071474: c432a2c8 */ lwc1 $f18,%lo(var7f1aa2c8)($at) @@ -12926,7 +12926,7 @@ glabel var7f1aa314 /* f0716f8: 3c0540a0 */ lui $a1,0x40a0 /* f0716fc: 27a60198 */ addiu $a2,$sp,0x198 /* f071700: 26270058 */ addiu $a3,$s1,0x58 -/* f071704: 0c00a8cc */ jal func0002a330 +/* f071704: 0c00a8cc */ jal coordFindGroundYSimple /* f071708: afa00010 */ sw $zero,0x10($sp) /* f07170c: 8fa40064 */ lw $a0,0x64($sp) /* f071710: 8fa50060 */ lw $a1,0x60($sp) @@ -12942,7 +12942,7 @@ glabel var7f1aa314 /* f071738: 3c0540a0 */ lui $a1,0x40a0 /* f07173c: 27a60188 */ addiu $a2,$sp,0x188 /* f071740: 00003825 */ or $a3,$zero,$zero -/* f071744: 0c00a8cc */ jal func0002a330 +/* f071744: 0c00a8cc */ jal coordFindGroundYSimple /* f071748: afa00010 */ sw $zero,0x10($sp) /* f07174c: 3c017f1b */ lui $at,%hi(var7f1aa2d4) /* f071750: c42ca2d4 */ lwc1 $f12,%lo(var7f1aa2d4)($at) @@ -16633,7 +16633,7 @@ glabel var7f1aa438 /* f074aac: 3c054000 */ lui $a1,0x4000 /* f074ab0: 26460028 */ addiu $a2,$s2,0x28 /* f074ab4: 26270058 */ addiu $a3,$s1,0x58 -/* f074ab8: 0c00a8cc */ jal func0002a330 +/* f074ab8: 0c00a8cc */ jal coordFindGroundYSimple /* f074abc: afa00010 */ sw $zero,0x10($sp) /* f074ac0: 3c017f1b */ lui $at,%hi(var7f1aa3ec) /* f074ac4: c424a3ec */ lwc1 $f4,%lo(var7f1aa3ec)($at) @@ -25536,7 +25536,7 @@ glabel var7f1aa698 /* f07c60c: e626000c */ swc1 $f6,0xc($s1) /* f07c610: afa00010 */ sw $zero,0x10($sp) /* f07c614: 8fa60040 */ lw $a2,0x40($sp) -/* f07c618: 0c00a8cc */ jal func0002a330 +/* f07c618: 0c00a8cc */ jal coordFindGroundYSimple /* f07c61c: 8fa40044 */ lw $a0,0x44($sp) /* f07c620: e7a00060 */ swc1 $f0,0x60($sp) /* f07c624: 3c0142c8 */ lui $at,0x42c8 @@ -26594,7 +26594,7 @@ glabel var7f1aa6e4 /* f07d51c: 27a60210 */ addiu $a2,$sp,0x210 /* f07d520: 00003825 */ or $a3,$zero,$zero /* f07d524: afa00010 */ sw $zero,0x10($sp) -/* f07d528: 0c00a8cc */ jal func0002a330 +/* f07d528: 0c00a8cc */ jal coordFindGroundYSimple /* f07d52c: a7ad0210 */ sh $t5,0x210($sp) /* f07d530: 3c01420c */ lui $at,0x420c /* f07d534: 44814000 */ mtc1 $at,$f8 @@ -27213,7 +27213,7 @@ glabel var7f1aa6e4 /* f07de08: 13000017 */ beqz $t8,.L0f07de68 /* f07de0c: 27a60140 */ addiu $a2,$sp,0x140 /* f07de10: 00003825 */ or $a3,$zero,$zero -/* f07de14: 0c00a8cc */ jal func0002a330 +/* f07de14: 0c00a8cc */ jal coordFindGroundYSimple /* f07de18: afa00010 */ sw $zero,0x10($sp) /* f07de1c: 3c01420c */ lui $at,0x420c /* f07de20: 44812000 */ mtc1 $at,$f4 @@ -27439,7 +27439,7 @@ glabel var7f1aa6e4 // sp210[0] = pad.room; // sp210[1] = -1; // -// sp214.y = func0002a330(&pad.pos, 5, sp210, NULL, 0) + 35; +// sp214.y = coordFindGroundYSimple(&pad.pos, 5, sp210, NULL, NULL) + 35; // } else { // sp214.y = pad.pos.y; // } @@ -27634,7 +27634,7 @@ glabel var7f1aa6e4 // // // e08 // if (active) { -// sp150.y = func0002a330(&sp150, 5, sp140, NULL, 0) + 35; +// sp150.y = coordFindGroundYSimple(&sp150, 5, sp140, NULL, NULL) + 35; // // if (sp150.y < -100000) { // sp150.y = prop->pos.y + sp194.y * (hovercar->speed * g_Vars.lvupdate240freal); @@ -28323,7 +28323,7 @@ s32 objTick(struct prop *prop) roomsCopy(sp220, prop->rooms); if (sp148 <= sp144) { - prop->pos.y = func0002a330(&prop->pos, 5, prop->rooms, &obj->floorcol, 0) + prop->pos.y = coordFindGroundYSimple(&prop->pos, 5, prop->rooms, &obj->floorcol, NULL) + func0f06a620(obj) + sp112; } diff --git a/src/include/lib/lib_233c0.h b/src/include/lib/lib_233c0.h index 3c8c41fc9..84303ad9d 100644 --- a/src/include/lib/lib_233c0.h +++ b/src/include/lib/lib_233c0.h @@ -78,7 +78,7 @@ f32 func000296a0(u32 *arg0, struct coord *pos, struct tilething **arg2, f32 widt bool func00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversefeettoeyesheight, s16 *rooms, u32 arg5, struct coord *laddernormal); u32 func0002a13c(void); f32 coordFindGroundY(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype, u16 *floorflags, s16 *floorroom, s32 *inlift, struct prop **lift); -f32 func0002a330(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, s32 arg4); +f32 coordFindGroundYSimple(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype); f32 func0002a36c(struct coord *coord, s16 *rooms, u16 *floorcol, s32 arg3); u32 func0002a400(void); u32 func0002a440(void); diff --git a/src/lib/lib_233c0.c b/src/lib/lib_233c0.c index bcb8d0fa4..08e5fbc87 100644 --- a/src/lib/lib_233c0.c +++ b/src/lib/lib_233c0.c @@ -7800,24 +7800,10 @@ f32 func0002a324(void) return 0; } -GLOBAL_ASM( -glabel func0002a330 -/* 2a330: 27bdffd0 */ addiu $sp,$sp,-48 -/* 2a334: 44856000 */ mtc1 $a1,$f12 -/* 2a338: 8fae0040 */ lw $t6,0x40($sp) -/* 2a33c: afbf002c */ sw $ra,0x2c($sp) -/* 2a340: 44056000 */ mfc1 $a1,$f12 -/* 2a344: afa00014 */ sw $zero,0x14($sp) -/* 2a348: afa00018 */ sw $zero,0x18($sp) -/* 2a34c: afa0001c */ sw $zero,0x1c($sp) -/* 2a350: afa00020 */ sw $zero,0x20($sp) -/* 2a354: 0c00a86c */ jal coordFindGroundY -/* 2a358: afae0010 */ sw $t6,0x10($sp) -/* 2a35c: 8fbf002c */ lw $ra,0x2c($sp) -/* 2a360: 27bd0030 */ addiu $sp,$sp,0x30 -/* 2a364: 03e00008 */ jr $ra -/* 2a368: 00000000 */ nop -); +f32 coordFindGroundYSimple(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype) +{ + return coordFindGroundY(pos, width, rooms, floorcol, floortype, NULL, NULL, NULL, NULL); +} GLOBAL_ASM( glabel func0002a36c