mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
vec3f
This commit is contained in:
parent
b0001034bf
commit
eff6fe2f10
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user