some refactoring of ovl1_7

This commit is contained in:
Faris Awan 2022-04-19 05:28:17 -04:00
parent 9466f66102
commit 44d8b2d609
10 changed files with 41 additions and 2016 deletions

View File

@ -1,3 +1,12 @@
.late_rodata
glabel D_800D6700
.float -3.40282346638528859812e+38
glabel D_800D6704
.float -1.13427448879509619937e+38
glabel D_800D6708
.float -1.70141173319264429906e+38
.text
glabel func_800AF0F4
/* 057344 800AF0F4 3C0E8005 */ lui $t6, %hi(D_8004A7C4) # $t6, 0x8005
/* 057348 800AF0F8 8DCEA7C4 */ lw $t6, %lo(D_8004A7C4)($t6)

View File

@ -16,21 +16,21 @@
// ovl1_7 rodata
u32 D_800D6700 = 0xFF7FFFFF;
// u32 D_800D6700 = 0xFF7FFFFF;
u32 D_800D6704 = 0xFEAAAAAA;
u32 D_800D6708 = 0xFEFFFFFF;
// u32 D_800D6704 = 0xFEAAAAAA;
// u32 D_800D6708 = 0xFEFFFFFF;
f32 D_800D670C = 65535.0f;
// f32 D_800D670C = 65535.0f;
f32 D_800D6710 = 65535.0f;
// f32 D_800D6710 = 65535.0f;
f32 D_800D6714 = 65535.0f;
// f32 D_800D6714 = 65535.0f;
f32 D_800D6718 = 65535.0f;
// f32 D_800D6718 = 65535.0f;
f32 D_800D671C = 65535.0f;
// f32 D_800D671C = 65535.0f;
f32 D_800D6720 = 65535.0f;

View File

@ -3,6 +3,8 @@
#define M_PI 3.14159265358979323846
#define M_PIF 3.14159265358979323846f
#define FLT_MAX (3.40282346639e+38f)
#define FLT_MIN (3.40282346639e+38f)
float sinf(float);
double sin(double);

View File

@ -362,6 +362,7 @@ SECTIONS
BUILD_DIR/data/kirby.066630.o(.rodata*);
BUILD_DIR/asm/ovl1/ovl1_5_rodata.o(.rodata*);
BUILD_DIR/src/ovl1/ovl1_6.o(.rodata*);
BUILD_DIR/src/ovl1/ovl1_7.o(.rodata*);
BUILD_DIR/data/ovl1/kirby.066630.4.o(.data*);
BUILD_DIR/src/ovl1/ovl1_8.o(.rodata);
BUILD_DIR/data/ovl1/kirby.066630.5.o(.data*);

View File

@ -60,3 +60,6 @@ struct UnkStruct80014264 {
// 00000000
// 00000000
// 00000000
f32 asinf(f32);
f32 atan2f(f32, f32);

View File

@ -109,7 +109,7 @@ void func_80019C60(float mf[4][4], Mtx *m) {
extern const f32 D_80040C70;
u32 func_80019E14(f32 arg0) {
s32 lbreflect_Int16Sin(f32 arg0) {
s32 idx = arg0 * D_80040C70;
u16 ret = INT16_SIN(idx);
@ -122,9 +122,10 @@ u32 func_80019E14(f32 arg0) {
}
extern const f32 D_80040C74, D_80040C78;
s32 func_80019E5C(f32 arg0) {
s32 lbreflect_Int16Cos(f32 arg0) {
s32 idx = (arg0 + D_80040C74) * D_80040C78;
u16 ret = lbreflect_Int16SinTable[idx & 0x7FF];
u16 ret = INT16_SIN(idx);
if (idx & 0x800) {
return -ret;
@ -530,19 +531,19 @@ f32 func_8001B008(Mat4 arg0, s32 *arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
// temp_a2 = ((u32)(arg2 * (M_PI / 360.0f) * (2048.0f / M_PI))) & 0xFFF
temp_a2 = ((u32)(arg2 * D_80040C7C * D_80040C80)) & 0xFFF;
// temp_t0 = lbreflect_Int16SinTable[temp_a2 & 0x7FF];
temp_t0 = *(&lbreflect_Int16SinTable + ((temp_a2 & 0x7FF) * 2));
temp_v1 = (temp_a2 + 0x400) & 0xFFFF;
phi_f2 = temp_t0;
sinval = lbreflect_Int16SinTable[temp_a2 & 0x7FF];
if ((temp_a2 & 0x800) != 0) {
phi_f2 = -phi_f2_2;
sinval = -sinval;
}
phi_f12 = lbreflect_Int16SinTable[temp_v1 & 0x7FF];
if ((temp_v1 & 0x800) != 0) {
phi_f12 = -phi_f12_2;
cosval = lbreflect_Int16SinTable[(temp_a2 + 0x400) & 0x7FF];
if (((temp_a2 + 0x400) & 0x800) != 0) {
cosval = -cosval;
}
temp_f14 = phi_f12 / phi_f2;
arg0->unk0 = (temp_f14 / arg3) * arg6; // [0][0]
arg0->unk14 = temp_f14 * arg6; // [1][1]
tanval = cosval / sinval;
arg0[0][0] = (tanval / arg3) * arg6; // [0][0]
arg0[1][1] = tanval * arg6; // [1][1]
temp_f0 = arg4 + arg5;
sp0 = arg4 - arg5;
arg0[2][3] = -arg6; // [2][3]

View File

@ -44,8 +44,11 @@
#define COMBINE_INTEGRAL(a, b) ((a & 0xffff0000 ) | ((b >> 16)))
#define COMBINE_FRACTIONAL(a, b) ((a << 16)) | (b & 0xffff)
s32 lbreflect_Int16Sin(f32 arg0);
s32 lbreflect_Int16Cos(f32 arg0);
void HS64_MkScaleMtxF(Mat4 mf, f32 x, f32 y, f32 z);
void HS64_MkRotationMtxF(Mat4 mf, f32 x, f32 y, f32 z);
void func_800A465C(Mat4 mf, f32 x, f32 y, f32 z);
void HS64_MkTranslateMtxF(Mat4 mf, f32 x, f32 y, f32 z);

View File

@ -1244,12 +1244,6 @@ void func_800A465C(void *arg0, ? arg1, f32 arg2, f32 arg3) {
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_1/func_800A465C.s")
#endif
void HS64_MkScaleMtxF(Mat4, f32, f32, f32);
void HS64_MkRotationMtxF(Mat4, f32, f32, f32);
void HS64_MkTranslateMtxF(Mat4, f32, f32, f32);
void func_800A4794(Vector *arg0, struct UnkStruct8004A7C4_3C *arg1) {
Mat4 finalMtx;
Mat4 intermediateMtx;

File diff suppressed because it is too large Load Diff

View File

@ -5,468 +5,7 @@
#include "unk_structs/D_800DE350.h"
#include "ovl0/ovl0_5.h"
#include "ovl0/ovl0_6.h"
#include "ovl0/ovl0_4.h"
s32 func_800B3234(f32 inputX, f32 inputY, f32 inputZ);
// all of these functions are easy i think if you start incorporating MtxF's
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void *func_800B2340(void *arg0, struct UnkStruct8004A7C4_3C *arg1, u32 arg2) {
? spB8;
? sp78;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f0_4;
f32 temp_f0_5;
f32 temp_f0_6;
f32 temp_f12;
f32 temp_f12_2;
f32 gEntitiesNextPosZArray[track];
f32 temp_f2;
f32 temp_f2_2;
f32 temp_f2_3;
struct UnkStruct8004A7C4_3C *temp_s0;
u32 phi_a2;
struct UnkStruct8004A7C4_3C *phi_s0;
phi_a2 = arg2;
if (arg2 == 0xFFFF) {
phi_a2 = D_8004A7C4->objId;
}
phi_s0 = arg1;
if (arg1 == 0) {
phi_s0 = D_8004A7C4->unk3C;
}
arg2 = phi_a2;
guMtxIdentF(&spB8);
loop_5:
if (phi_s0->unk14 != 1) {
temp_f0 = phi_s0->unk40.x;
if ((temp_f0 != 1.0f) || (phi_s0->unk40.y != 1.0f) || (phi_s0->unk40.z != 1.0f)) {
HS64_MkScaleMtxF(&sp78, temp_f0, (bitwise s32) phi_s0->unk40.y, (bitwise s32) phi_s0->unk40.z);
guMtxCatF(&spB8, &sp78, &spB8);
}
temp_f0_2 = phi_s0->unk30.x;
if ((temp_f0_2 != 0.0f) || (phi_s0->unk30.y != 0.0f) || (phi_s0->unk30.z != 0.0f)) {
HS64_MkRotationMtxF(&sp78, temp_f0_2, (bitwise f32) (bitwise s32) phi_s0->unk30.y, (bitwise f32) (bitwise s32) phi_s0->unk30.z);
guMtxCatF(&spB8, &sp78, &spB8);
}
temp_f0_3 = phi_s0->unk1C.x;
if ((temp_f0_3 != 0.0f) || (phi_s0->unk1C.y != 0.0f) || (phi_s0->unk1C.z != 0.0f)) {
HS64_MkTranslateMtxF(&sp78, temp_f0_3, (bitwise s32) phi_s0->unk1C.y, (bitwise s32) phi_s0->unk1C.z);
guMtxCatF(&spB8, &sp78, &spB8);
}
} else {
temp_f0_4 = gEntitiesScaleXArray[arg2];
temp_f2 = gEntitiesScaleYArray[arg2];
temp_f12 = gEntitiesScaleZArray[arg2];
if ((temp_f0_4 != 1.0f) || (temp_f2 != 1.0f) || (temp_f12 != 1.0f)) {
HS64_MkScaleMtxF(temp_f12, &sp78, temp_f0_4, temp_f2, temp_f12);
guMtxCatF(&spB8, &sp78, &spB8);
}
temp_f0_5 = gEntitiesAngleXArray[arg2];
temp_f2_2 = gEntitiesAngleYArray[arg2];
temp_f12_2 = gEntitiesAngleZArray[arg2];
if ((temp_f0_5 != 0.0f) || (temp_f2_2 != 0.0f) || (temp_f12_2 != 0.0f)) {
HS64_MkRotationMtxF(&sp78, temp_f0_5, temp_f2_2, temp_f12_2);
guMtxCatF(&spB8, &sp78, &spB8);
}
temp_f0_6 = gEntitiesNextPosXArray[arg2];
temp_f2_3 = gEntitiesNextPosYArray[arg2];
temp_f12_3 = gEntitiesNextPosZArray[arg2];
if ((temp_f0_6 != 0.0f) || (temp_f2_3 != 0.0f) || (temp_f12_3 != 0.0f)) {
HS64_MkTranslateMtxF(temp_f12_3, &sp78, temp_f0_6, temp_f2_3, temp_f12_3);
guMtxCatF(&spB8, &sp78, &spB8);
}
}
temp_s0 = phi_s0->unk14;
phi_s0 = temp_s0;
if (temp_s0 != 1) {
goto loop_5;
}
arg0->unk0 = spE8;
arg0->unk4 = spEC;
arg0->unk8 = spF0;
return arg0;
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B2340.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void func_800B26D8(void *arg0, struct UnkStruct8004A7C4_3C *arg1, u32 arg2) {
f32 sp90;
? sp50;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f12;
f32 temp_f2;
f32 temp_f2_2;
s32 temp_cond;
struct UnkStruct8004A7C4_3C *phi_s0;
u32 phi_s5;
phi_s5 = arg2;
if (arg2 == 0xFFFF) {
phi_s5 = D_8004A7C4->objId;
}
phi_s0 = arg1;
if (arg1 == 0) {
phi_s0 = D_8004A7C4->unk3C;
}
guMtxIdentF(&sp90);
loop_5:
if (phi_s0->unk14 != 1) {
temp_f0 = phi_s0->unk30.x;
if ((temp_f0 != 0.0f) || (phi_s0->unk30.y != 0.0f) || (phi_s0->unk30.z != 0.0f)) {
HS64_MkRotationMtxF(&sp50, temp_f0, (bitwise f32) (bitwise s32) phi_s0->unk30.y, (bitwise f32) (bitwise s32) phi_s0->unk30.z);
guMtxCatF(&sp90, &sp50, &sp90);
block_14:
}
} else {
temp_f0_2 = gEntitiesAngleXArray[phi_s5];
temp_f2 = gEntitiesAngleYArray[phi_s5];
temp_f12 = gEntitiesAngleZArray[phi_s5];
if ((temp_f0_2 != 0.0f) || (temp_f2 != 0.0f) || (temp_f12 != 0.0f)) {
HS64_MkRotationMtxF(&sp50, temp_f0_2, temp_f2, temp_f12);
guMtxCatF(&sp90, &sp50, &sp90);
goto block_14;
}
}
phi_s0 = phi_s0->unk14;
if (phi_s0->unk14 != 1) {
goto loop_5;
}
temp_f0_3 = asinf(-sp98);
temp_f2_2 = D_800D67D4;
temp_cond = temp_f0_3 == temp_f2_2;
arg0->unk4 = temp_f0_3;
if (temp_cond || (D_800D67D8 == arg0->unk4)) {
if (temp_f2_2 == arg0->unk4) {
arg0->unk0 = atan2f(spA0, spA4);
} else {
arg0->unk0 = atan2f(-spA0, spA4);
}
arg0->unk8 = 0.0f;
} else {
arg0->unk0 = atan2f(spA8, spB8);
arg0->unk8 = atan2f(sp94, sp90);
}
func_800A4598(arg0);
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B26D8.s")
#endif
void *func_800B2928(Vector *vec, struct UnkStruct8004A7C4_3C *userData, u32 track) {
Mat4 finalMtx;
Mat4 tmpMtx;
track = track;
if (track == 0xFFFF) {
track = D_8004A7C4->objId;
}
userData = userData;
if (userData == 0) {
userData = D_8004A7C4->unk3C;
}
guMtxIdentF(finalMtx);
do {
if ((u32) userData->unk14 != 1) {
if ((userData->scaleVec.x != 1.0f) || (userData->scaleVec.y != 1.0f) || (userData->scaleVec.z != 1.0f)) {
HS64_MkScaleMtxF(tmpMtx, userData->scaleVec.x, userData->scaleVec.y, userData->scaleVec.z);
guMtxCatF(finalMtx, tmpMtx, finalMtx);
}
} else {
if ((gEntitiesScaleXArray[track] != 1.0f) || (gEntitiesScaleYArray[track] != 1.0f) || (gEntitiesScaleZArray[track] != 1.0f)) {
HS64_MkScaleMtxF(tmpMtx, gEntitiesScaleXArray[track], gEntitiesScaleYArray[track], gEntitiesScaleZArray[track]);
guMtxCatF(finalMtx, tmpMtx, finalMtx);
}
}
userData = userData->unk14;
} while ((u32) userData != 1);
vec->x = finalMtx[0][0];
vec->y = finalMtx[1][1];
vec->z = finalMtx[2][2];
}
void func_800B2AD4(Vector *vec, struct UnkStruct8004A7C4_3C *userData, u32 track) {
Vector tmp;
Mat4 finalMtx; // 0xBC
Mat4 tmpMtx; // 0x7C
if (track == 0xFFFF) {
track = D_8004A7C4->objId;
}
if (userData == 0) {
userData = D_8004A7C4->unk3C;
}
guMtxIdentF(finalMtx);
do {
if ((u32) userData->unk14 != 1) {
if ((userData->scaleVec.x != 1.0f) || (userData->scaleVec.y != 1.0f) || (userData->scaleVec.z != 1.0f)) {
HS64_MkScaleMtxF(tmpMtx, 1.0f / userData->scaleVec.x, 1.0f / userData->scaleVec.y, 1.0f / userData->scaleVec.z);
guMtxCatF(tmpMtx, finalMtx, finalMtx);
}
if ((userData->angleVec.x != 0.0f) || (userData->angleVec.y != 0.0f) || (userData->angleVec.z != 0.0f)) {
func_800A465C(tmpMtx, -userData->angleVec.x, -userData->angleVec.y, -userData->angleVec.z);
guMtxCatF(tmpMtx, finalMtx, finalMtx);
}
if ((userData->posVec.x != 0.0f) || (userData->posVec.y != 0.0f) || (userData->posVec.z != 0.0f)) {
HS64_MkTranslateMtxF(tmpMtx, -userData->posVec.x, -userData->posVec.y, -userData->posVec.z);
guMtxCatF(tmpMtx, finalMtx, finalMtx);
}
} else {
if ((gEntitiesScaleXArray[track] != 1.0f) || (gEntitiesScaleYArray[track] != 1.0f) || (gEntitiesScaleZArray[track] != 1.0f)) {
HS64_MkScaleMtxF(tmpMtx,
1.0f / gEntitiesScaleXArray[track],
1.0f / gEntitiesScaleYArray[track],
1.0f / gEntitiesScaleZArray[track]
);
guMtxCatF(tmpMtx, finalMtx, finalMtx);
}
if ((gEntitiesAngleXArray[track] != 0.0f) || (gEntitiesAngleYArray[track] != 0.0f) || (gEntitiesAngleZArray[track] != 0.0f)) {
func_800A465C(tmpMtx,
-gEntitiesAngleXArray[track],
-gEntitiesAngleYArray[track],
-gEntitiesAngleZArray[track]
);
guMtxCatF(tmpMtx, finalMtx, finalMtx);
}
if ((gEntitiesNextPosXArray[track] != 0.0f) || (gEntitiesNextPosYArray[track] != 0.0f) || (gEntitiesNextPosZArray[track] != 0.0f)) {
HS64_MkTranslateMtxF(tmpMtx,
-gEntitiesNextPosXArray[track],
-gEntitiesNextPosYArray[track],
-gEntitiesNextPosZArray[track]
);
guMtxCatF(tmpMtx, finalMtx, finalMtx);
}
}
userData = userData->unk14;
} while ((u32) userData != 1);
tmp.x = vec->x;
tmp.y = vec->y;
tmp.z = vec->z;
vec->x = ((finalMtx[0][0] * tmp.x) + (finalMtx[1][0] * tmp.y) + (finalMtx[2][0] * tmp.z))
+ finalMtx[3][0];
vec->y = ((finalMtx[0][1] * tmp.x) + (finalMtx[1][1] * tmp.y) + (finalMtx[2][1] * tmp.z))
+ finalMtx[3][1];
vec->z = ((finalMtx[0][2] * tmp.x) + (finalMtx[1][2] * tmp.y) + (finalMtx[2][2] * tmp.z))
+ finalMtx[3][2];
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void func_800B2F54(s32 arg0, ? arg2) {
func_8000FE2C_ovl1(arg2, *(&D_800D79D8 + (((arg0 - 0xA) >> 1) * 4)), arg2);
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B2F54.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void func_800B2F90(s32 arg0, ? arg2) {
void *temp_s0;
temp_s0 = *(&D_800D79D8 + (((arg0 - 0xA) >> 1) * 4));
func_8000FE2C_ovl1(arg2, temp_s0, arg2);
loop_1:
if (D_800D67DC != temp_s0->unk74) {
finish_current_thread(1);
goto loop_1;
}
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B2F90.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void func_800B3008(s32 arg0) {
loop_1:
if (D_800D67E0 != (*(&D_800D79D8 + (((arg0 - 0xA) >> 1) * 4)))->unk74) {
finish_current_thread(1);
goto loop_1;
}
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B3008.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void *func_800B3070(s32 arg0, f32 arg1) {
void *temp_v0;
temp_v0 = *(&D_800D79D8 + (((arg0 - 0xA) >> 1) * 4));
temp_v0->unk78 = arg1;
return temp_v0;
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B3070.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
void *func_800B3094(s32 arg0) {
void *temp_v0;
temp_v0 = *(&D_800D79D8 + (((arg0 - 0xA) >> 1) * 4));
temp_v0->unk74 = D_800D67E4;
return temp_v0;
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B3094.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
s32 func_800B30BC(f32 arg0, f32 arg1, ? arg2) {
f32 temp_f0;
f32 temp_f0_2;
struct Normal *temp_v1;
f32 phi_f2;
s32 phi_v0;
f32 phi_f2_2;
s32 phi_return;
temp_v1 = &D_800E6F50[D_8004A7C4->objId];
temp_f0 = temp_v1->x;
if (temp_f0 < 0.0f) {
phi_f2 = -temp_f0;
} else {
phi_f2 = temp_f0;
}
phi_v0 = 0;
phi_return = 0;
if (phi_f2 < arg0) {
phi_v0 = 1;
phi_return = 1;
}
if (phi_v0 != 0) {
temp_f0_2 = temp_v1->y;
if (temp_f0_2 < 0.0f) {
phi_f2_2 = -temp_f0_2;
} else {
phi_f2_2 = temp_f0_2;
}
phi_return = 0;
if (phi_f2_2 < arg1) {
phi_return = 1;
}
}
return phi_return;
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B30BC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3ec45aadfc2cb619035fb802d88c52eacfab0326
? func_800B3158(void) {
u32 temp_v0;
temp_v0 = D_8004A7C4->objId;
if (func_800B3234(gEntitiesNextPosXArray[temp_v0], gEntitiesNextPosYArray[temp_v0], gEntitiesNextPosZArray[temp_v0]) != 0) {
return 0;
}
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B3158.s")
#endif
void func_800B31B4(void) {
s32 pad;
struct GObj *gobj = D_800DE350[D_8004A7C4->objId];
if (func_800B3234(gEntitiesNextPosXArray[D_8004A7C4->objId], gEntitiesNextPosYArray[D_8004A7C4->objId], gEntitiesNextPosZArray[D_8004A7C4->objId]) != 0) {
gobj->unk48 = NULL;
func_8019B7D8_ovl1(gobj);
func_8019D8A0_ovl1((u16) D_8004A7C4->objId);
}
}
// Basically matches on decomp.me but not locally????
// https://decomp.me/scratch/DsIpj
#ifdef NON_MATCHING
extern const f32 D_800D67E8;
extern struct GObj *D_800D799C;
f32 func_800A4F48(void *, Vector *, f32, f32);
s32 func_800B3234(f32 inputX, f32 inputY, f32 inputZ) {
s32 sp2C;
Vector inVec;
Vector delVec;
D_800E6F50[D_8004A7C4->objId].z = 0.0f;
if (gEntitiesNextPosYArray[D_8004A7C4->objId] < D_800D67E8) {
D_800E6F50[D_8004A7C4->objId].z = 1.0f;
return 1;
}
inVec.x = inputX;
inVec.y = inputY;
inVec.z = inputZ;
sp2C = func_800A4F48(D_800D799C->unk3C, &inVec, 1.7f, 2.4f);
D_800E6F50[D_8004A7C4->objId].x = inVec.x;
D_800E6F50[D_8004A7C4->objId].y = inVec.y;
delVec.x = inputX - gEntitiesNextPosXArray[0];
delVec.y = inputY - (gEntitiesNextPosYArray[0] + 20.0f);
delVec.z = inputZ - gEntitiesNextPosZArray[0];
D_800E6F50[D_8004A7C4->objId].originOffset = sqrtf(VEC_MAG_SQUARE(delVec));
if (sp2C == 0) {
if (D_800E6F50[D_8004A7C4->objId].originOffset > 500.0f) {
D_800E6F50[D_8004A7C4->objId].z = 1.0f;
return 1;
}
}
return 0;
}
#else
GLOBAL_ASM("asm/non_matchings/ovl1/ovl1_7/func_800B3234.s")
#endif
extern f32 D_800D67EC;
void func_800B33F4(void) {
D_800E64D0[D_8004A7C4->objId] = 0.0f;
D_800E3050[D_8004A7C4->objId] =
D_800E3210[D_8004A7C4->objId] =
D_800E33D0[D_8004A7C4->objId] = D_800E64D0[D_8004A7C4->objId];
D_800E6690[D_8004A7C4->objId] = 0.0f;
D_800E3590[D_8004A7C4->objId] =
D_800E3750[D_8004A7C4->objId] =
D_800E3910[D_8004A7C4->objId] = D_800E6690[D_8004A7C4->objId];
D_800E6850[D_8004A7C4->objId] = D_800D67EC;
D_800E3AD0[D_8004A7C4->objId] =
D_800E3C90[D_8004A7C4->objId] =
D_800E3E50[D_8004A7C4->objId] = D_800E6850[D_8004A7C4->objId];
}
extern f32 D_800D67F0;
void func_800B3520(void) {
f32 temp_f0;
D_800E6690[D_8004A7C4->objId] = 0.0f;
temp_f0 = D_800E6690[D_8004A7C4->objId];
D_800E3750[D_8004A7C4->objId] = temp_f0;
D_800E64D0[D_8004A7C4->objId] = temp_f0;
D_800E3210[D_8004A7C4->objId] = temp_f0;
D_800E6850[D_8004A7C4->objId] = D_800D67F0;
D_800E3C90[D_8004A7C4->objId] = D_800E6850[D_8004A7C4->objId];
}