diff --git a/include/common_structs.h b/include/common_structs.h index d7adbb290d..86b8fcbf08 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -432,7 +432,7 @@ typedef struct Camera { /* 0x038 */ s16 perspNorm; /* 0x03A */ char unk_3A[2]; /* 0x03C */ f32 lookAt_eye[3]; - /* 0x048 */ f32 lookAt_obj[3]; + /* 0x048 */ Vec3f lookAt_obj; /* 0x054 */ f32 unk_54; /* 0x058 */ f32 unk_58; /* 0x05C */ f32 unk_5C; diff --git a/src/code_1a1f0_len_5390.c b/src/code_1a1f0_len_5390.c index f474f7218a..acd8b18e2f 100644 --- a/src/code_1a1f0_len_5390.c +++ b/src/code_1a1f0_len_5390.c @@ -83,9 +83,9 @@ INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003F0C4); INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003F384); ApiStatus GetCamLookAtObjVector(ScriptInstance* script, s32 isInitialCall) { - script->varTable[0] = CURRENT_CAM->lookAt_obj[0]; - script->varTable[1] = CURRENT_CAM->lookAt_obj[1]; - script->varTable[2] = CURRENT_CAM->lookAt_obj[2]; + script->varTable[0] = CURRENT_CAM->lookAt_obj.x; + script->varTable[1] = CURRENT_CAM->lookAt_obj.y; + script->varTable[2] = CURRENT_CAM->lookAt_obj.z; return ApiStatus_DONE2; } diff --git a/src/code_ef070_len_3400.c b/src/code_ef070_len_3400.c index 26d910974b..c145c181f3 100644 --- a/src/code_ef070_len_3400.c +++ b/src/code_ef070_len_3400.c @@ -73,15 +73,15 @@ ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall) { CAM(id)->unk_1C = -round(CAM(id)->currentPitch); CAM(id)->unk_1E = -CAM(id)->currentBlendedYawNegated; - temp1 = CAM(id)->lookAt_obj[0] - CAM(id)->lookAt_eye[0]; - temp2 = CAM(id)->lookAt_obj[1] - CAM(id)->lookAt_eye[1]; - temp3 = CAM(id)->lookAt_obj[2] - CAM(id)->lookAt_eye[2]; + temp1 = CAM(id)->lookAt_obj.x - CAM(id)->lookAt_eye[0]; + temp2 = CAM(id)->lookAt_obj.y - CAM(id)->lookAt_eye[1]; + temp3 = CAM(id)->lookAt_obj.z - CAM(id)->lookAt_eye[2]; CAM(id)->unk_20 = round(sqrtf((temp1 * temp1) + (temp2 * temp2) + (temp3 * temp3))); CAM(id)->unk_22 = 0; - CAM(id)->unk_54 = CAM(id)->lookAt_obj[0]; - CAM(id)->unk_58 = CAM(id)->lookAt_obj[1]; - CAM(id)->unk_5C = CAM(id)->lookAt_obj[2]; + CAM(id)->unk_54 = CAM(id)->lookAt_obj.x; + CAM(id)->unk_58 = CAM(id)->lookAt_obj.y; + CAM(id)->unk_5C = CAM(id)->lookAt_obj.z; set_variable(script, outVar1, CAM(id)->unk_1C); set_variable(script, outVar2, CAM(id)->unk_1E);