mirror of
https://github.com/n64decomp/mk64
synced 2026-08-18 21:17:47 -04:00
+35
-44
@@ -2284,56 +2284,47 @@ void func_8000BA14(u16 waypointIndex, f32 arg1, f32 arg2, s16 pathIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-12-2023
|
||||
extern f32 D_80162FA8;
|
||||
|
||||
void func_8000BBD8(u16 waypointIndex, f32 arg1, s16 pathIndex) {
|
||||
f32 sp14;
|
||||
f32 sp10;
|
||||
f32 sp8;
|
||||
f32 sp4;
|
||||
f32 sp0;
|
||||
TrackWaypoint *temp_a1;
|
||||
TrackWaypoint *temp_t0;
|
||||
TrackWaypoint *temp_t0_2;
|
||||
TrackWaypoint *temp_t1;
|
||||
TrackWaypoint *temp_v0;
|
||||
TrackWaypoint *temp_v0_2;
|
||||
TrackWaypoint* path1;
|
||||
TrackWaypoint* path2;
|
||||
f32 x1;
|
||||
f32 z1;
|
||||
f32 x3;
|
||||
f32 z3;
|
||||
f32 x2;
|
||||
f32 z2;
|
||||
f32 x4;
|
||||
f32 z4;
|
||||
f32 temp_f0;
|
||||
f32 temp_f12;
|
||||
f32 temp_f4;
|
||||
f32 temp_f4_2;
|
||||
f32 temp_f8;
|
||||
f32 temp_f8_2;
|
||||
s32 temp_t6;
|
||||
s32 temp_t8;
|
||||
|
||||
temp_t6 = waypointIndex & 0xFFFF;
|
||||
temp_a1 = D_80164560[pathIndex];
|
||||
temp_t1 = D_80164570[pathIndex];
|
||||
temp_v0 = &temp_a1[temp_t6];
|
||||
temp_t0 = &temp_t1[temp_t6];
|
||||
sp8 = (f32) temp_t0->posZ;
|
||||
temp_t8 = ((s32) ((temp_t6 + 1) & 0xFFFF) % (s32) gWaypointCountByPathIndex[pathIndex]) & 0xFFFF;
|
||||
temp_v0_2 = &temp_a1[temp_t8];
|
||||
temp_t0_2 = &temp_t1[temp_t8];
|
||||
temp_f8 = (f32) temp_v0_2->posX;
|
||||
sp14 = temp_f8;
|
||||
temp_f4 = (f32) temp_v0_2->posZ;
|
||||
sp10 = temp_f4;
|
||||
temp_f8_2 = (f32) temp_t0_2->posX;
|
||||
sp4 = temp_f8_2;
|
||||
temp_f4_2 = (f32) temp_t0_2->posZ;
|
||||
sp0 = temp_f4_2;
|
||||
temp_f0 = 0.5f - (arg1 * 0.5f);
|
||||
path1 = &D_80164560[pathIndex][waypointIndex];
|
||||
path2 = &D_80164570[pathIndex][waypointIndex];
|
||||
|
||||
x1 = (f32) path1->posX;
|
||||
z1 = (f32) path1->posZ;
|
||||
|
||||
x2 = (f32) path2->posX;
|
||||
z2 = (f32) path2->posZ;
|
||||
|
||||
waypointIndex += 1;
|
||||
waypointIndex = waypointIndex % gWaypointCountByPathIndex[pathIndex];
|
||||
|
||||
path1 = &D_80164560[pathIndex][waypointIndex];
|
||||
path2 = &D_80164570[pathIndex][waypointIndex];
|
||||
|
||||
x3 = (f32) path1->posX;
|
||||
z3 = (f32) path1->posZ;
|
||||
|
||||
x4 = (f32) path2->posX;
|
||||
z4 = (f32) path2->posZ;
|
||||
|
||||
|
||||
temp_f0 = 0.5f - (arg1 / 2.0f);
|
||||
temp_f12 = 1.0f - temp_f0;
|
||||
*D_80162FA0 = (((f32) temp_v0->posX + temp_f8) * temp_f0 * 0.5f) + (temp_f12 * ((f32) temp_t0->posX + temp_f8_2) * 0.5f);
|
||||
D_80162FA8 = (((f32) temp_v0->posZ + temp_f4) * temp_f0 * 0.5f) + (temp_f12 * (sp8 + temp_f4_2) * 0.5f);
|
||||
D_80162FA0[0] = ((temp_f0 * ( x1 + x3)) / 2.0f) + ((temp_f12 * (x2 + x4)) / 2.0f);
|
||||
D_80162FA0[2] = ((temp_f0 * ( z1 + z3)) / 2.0f) + ((temp_f12 * (z2 + z4)) / 2.0f);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000BBD8.s")
|
||||
#endif
|
||||
|
||||
s16 func_8000BD94(f32 posX, f32 posY, f32 posZ, s32 pathIndex) {
|
||||
f32 x_dist;
|
||||
|
||||
Reference in New Issue
Block a user