mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-17 21:03:30 -04:00
Camera Preparation (#644)
* Copy progress from z_camera * cleanup functions.h * Oops * Revert `SUB16` and `ADD16` back to original names * PR Suggestions * PR Suggestions * Fix merge with master
This commit is contained in:
@@ -130,7 +130,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D220.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D2FC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_LineSegVsPlane.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D404.s")
|
||||
|
||||
|
||||
+3
-3
@@ -1279,7 +1279,7 @@ f32 Actor_HeightDiff(Actor* actor1, Actor* actor2) {
|
||||
* Sets the current and new inputs.
|
||||
*/
|
||||
void func_800B6F20(GlobalContext* globalCtx, Input* input, f32 magnitude, s16 baseYaw) {
|
||||
s16 relativeYaw = baseYaw - func_800DFC68(GET_ACTIVE_CAM(globalCtx));
|
||||
s16 relativeYaw = baseYaw - Camera_GetInputDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
|
||||
input->cur.stick_x = -Math_SinS(relativeYaw) * magnitude;
|
||||
input->rel.stick_x = input->cur.stick_x;
|
||||
@@ -1341,7 +1341,7 @@ void Actor_SetCameraHorseSetting(GlobalContext* globalCtx, Player* player) {
|
||||
EnHorse* rideActor = (EnHorse*)player->rideActor;
|
||||
|
||||
if ((rideActor != NULL) && !(rideActor->unk_1EC & 0x10)) {
|
||||
func_800DFAC8(Play_GetCamera(globalCtx, MAIN_CAM), 4);
|
||||
func_800DFAC8(Play_GetCamera(globalCtx, CAM_ID_MAIN), 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3329,7 +3329,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalC
|
||||
|
||||
if ((player != NULL) && (actor == player->unk_730)) {
|
||||
func_80123DA4(player);
|
||||
Camera_ChangeMode(Play_GetCamera(globalCtx, Play_GetActiveCameraIndex(globalCtx)), 0);
|
||||
Camera_ChangeMode(Play_GetCamera(globalCtx, Play_GetActiveCamId(globalCtx)), 0);
|
||||
}
|
||||
|
||||
if (actor == actorCtx->targetContext.arrowPointedActor) {
|
||||
|
||||
@@ -4047,7 +4047,7 @@ u16 func_800C9728(CollisionContext* colCtx, u32 camId, s32 bgId) {
|
||||
return 0;
|
||||
}
|
||||
camData = colHeader->cameraDataList;
|
||||
result = camData[camId].cameraSType;
|
||||
result = camData[camId].setting;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -4088,7 +4088,7 @@ u16 func_800C97F8(CollisionContext* colCtx, u32 camId, s32 bgId) {
|
||||
if (camData == NULL) {
|
||||
return 0;
|
||||
}
|
||||
return camData[camId].unk_02;
|
||||
return camData[camId].numData;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4114,7 +4114,7 @@ u16 func_800C9844(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* CamData get camPosData
|
||||
* CamData get data
|
||||
*/
|
||||
Vec3s* func_800C98CC(CollisionContext* colCtx, s32 camId, s32 bgId) {
|
||||
CollisionHeader* colHeader = BgCheck_GetCollisionHeader(colCtx, bgId);
|
||||
@@ -4127,11 +4127,11 @@ Vec3s* func_800C98CC(CollisionContext* colCtx, s32 camId, s32 bgId) {
|
||||
if (cameraDataList == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
return Lib_SegmentedToVirtual(cameraDataList[camId].camPosData);
|
||||
return Lib_SegmentedToVirtual(cameraDataList[camId].data);
|
||||
}
|
||||
|
||||
/**
|
||||
* SurfaceType Get camPosData
|
||||
* SurfaceType Get data
|
||||
*/
|
||||
Vec3s* SurfaceType_GetCamPosData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
CollisionHeader* colHeader = BgCheck_GetCollisionHeader(colCtx, bgId);
|
||||
@@ -4573,7 +4573,7 @@ u16 WaterBox_GetCameraSetting(CollisionContext* colCtx, WaterBox* waterBox, s32
|
||||
return result;
|
||||
}
|
||||
|
||||
result = camData[camId].cameraSType;
|
||||
result = camData[camId].setting;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -320,19 +320,19 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFAC8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFB14.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_ChangeDataIdx.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFC1C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFC40.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFC68.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_GetInputDirYaw.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFC90.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFCB4.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_GetCamDirPitch.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFCDC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_GetCamDirYaw.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFD04.s")
|
||||
|
||||
@@ -364,10 +364,10 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E0238.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E02AC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_SetToTrackActor.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E0308.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_SetTargetActor.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E031C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_GetWaterYPos.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E0348.s")
|
||||
|
||||
@@ -255,9 +255,12 @@ void EffectSS_DrawAllParticles(GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0; i < sEffectSsInfo.size; i++) {
|
||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
||||
if ((sEffectSsInfo.data_table[i].pos.x > 32000.0f) || (sEffectSsInfo.data_table[i].pos.x < -32000.0f) ||
|
||||
(sEffectSsInfo.data_table[i].pos.y > 32000.0f) || (sEffectSsInfo.data_table[i].pos.y < -32000.0f) ||
|
||||
(sEffectSsInfo.data_table[i].pos.z > 32000.0f) || (sEffectSsInfo.data_table[i].pos.z < -32000.0f)) {
|
||||
if ((sEffectSsInfo.data_table[i].pos.x > BGCHECK_Y_MAX) ||
|
||||
(sEffectSsInfo.data_table[i].pos.x < BGCHECK_Y_MIN) ||
|
||||
(sEffectSsInfo.data_table[i].pos.y > BGCHECK_Y_MAX) ||
|
||||
(sEffectSsInfo.data_table[i].pos.y < BGCHECK_Y_MIN) ||
|
||||
(sEffectSsInfo.data_table[i].pos.z > BGCHECK_Y_MAX) ||
|
||||
(sEffectSsInfo.data_table[i].pos.z < BGCHECK_Y_MIN)) {
|
||||
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
|
||||
} else {
|
||||
EffectSS_DrawParticle(globalCtx, i);
|
||||
|
||||
@@ -157,7 +157,7 @@ void FireObj_Draw(GlobalContext* globalCtx, FireObj* fire) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, lightParams->envColor.r, lightParams->envColor.g, lightParams->envColor.b, 0);
|
||||
|
||||
vec.x = 0;
|
||||
vec.y = func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) + 0x8000;
|
||||
vec.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000;
|
||||
vec.z = 0;
|
||||
Matrix_SetStateRotationAndTranslation(fire->position.x, fire->position.y, fire->position.z, &vec);
|
||||
Matrix_Scale(fire->xScale, fire->yScale, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
void (*sKaleidoScopeUpdateFunc)(GlobalContext* globalCtx);
|
||||
|
||||
+1
-1
@@ -371,7 +371,7 @@ void Math_Vec3f_DistXYZAndStoreNormDiff(Vec3f* a, Vec3f* b, f32 scale, Vec3f* de
|
||||
f32 Math_Vec3f_DistXYZ(Vec3f* a, Vec3f* b) {
|
||||
Vec3f diff;
|
||||
Math_Vec3f_Diff(b, a, &diff);
|
||||
return sqrtf(SQ(diff.x) + SQ(diff.y) + SQ(diff.z));
|
||||
return sqrtf(SQXYZ(diff));
|
||||
}
|
||||
|
||||
f32 Math_Vec3f_DistXYZAndStoreDiff(Vec3f* a, Vec3f* b, Vec3f* dest) {
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ Vec3f* OLib_Vec3fDistNormalize(Vec3f* dest, Vec3f* a, Vec3f* b) {
|
||||
v1.y = b->y - a->y;
|
||||
v1.z = b->z - a->z;
|
||||
|
||||
dist = OLib_ClampMinDist(sqrtf(SQ(v1.x) + SQ(v1.y) + SQ(v1.z)), 0.01f);
|
||||
dist = OLib_ClampMinDist(sqrtf(SQXYZ(v1)), 0.01f);
|
||||
|
||||
v2.x = v1.x / dist;
|
||||
v2.y = v1.y / dist;
|
||||
|
||||
+13
-13
@@ -74,41 +74,41 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169474.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_801694DC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CreateSubCamera.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetActiveCameraIndex.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetActiveCamId.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169590.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraChangeStatus.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169600.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_ClearCamera.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169668.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_ClearAllSubCameras.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetCamera.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetAtEye.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016981C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetAtEyeUp.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169940.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetFov.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169988.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetRoll.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_801699D4.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CopyCamera.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169A50.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169AC0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraChangeSetting.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169AFC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169BC4.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraGetUID.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169BF8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169C64.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetCsCamDataSetting.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169C84.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetCsCamDataVec3s.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/convert_scene_number_among_shared_scenes.s")
|
||||
|
||||
|
||||
+3
-3
@@ -137,7 +137,7 @@ QuakeRequest* Quake_AddImpl(Camera* camera, u32 callbackIdx) {
|
||||
|
||||
__osMemset(req, 0, sizeof(QuakeRequest));
|
||||
req->camera = camera;
|
||||
req->cameraPtrsIdx = camera->thisIdx;
|
||||
req->camId = camera->camId;
|
||||
req->callbackIdx = callbackIdx;
|
||||
req->isShakePerpendicular = true;
|
||||
req->randIdx = ((s16)(Rand_ZeroOne() * (f32)0x10000) & ~3) + idx;
|
||||
@@ -326,10 +326,10 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) {
|
||||
for (idx = 0; idx < ARRAY_COUNT(sQuakeRequest); idx++) {
|
||||
req = &sQuakeRequest[idx];
|
||||
if (req->callbackIdx != 0) {
|
||||
if (globalCtx->cameraPtrs[req->cameraPtrsIdx] == NULL) {
|
||||
if (globalCtx->cameraPtrs[req->camId] == NULL) {
|
||||
Quake_Remove(req);
|
||||
} else {
|
||||
eq = (camera->thisIdx != req->camera->thisIdx);
|
||||
eq = (camera->camId != req->camera->camId);
|
||||
absSpeedDiv = ABS(req->speed) / (f32)0x8000;
|
||||
if (sQuakeCallbacks[req->callbackIdx](req, &shake) == 0) {
|
||||
Quake_Remove(req);
|
||||
|
||||
+3
-3
@@ -179,7 +179,7 @@ void Scene_HeaderCmdActorList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x02: List of cameras for actor cutscenes
|
||||
void Scene_HeaderCmdActorCutsceneCamList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->unk_18858 = (UNK_PTR)Lib_SegmentedToVirtual(cmd->csCameraList.segment);
|
||||
globalCtx->csCamData = Lib_SegmentedToVirtual(cmd->csCameraList.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x03: Collision Header
|
||||
@@ -374,8 +374,8 @@ void Scene_HeaderCmdSkyboxSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x12: Skybox Disables
|
||||
void Scene_HeaderCmdSkyboxDisables(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->envCtx.unk_15 = cmd->skyboxDisables.unk4;
|
||||
globalCtx->envCtx.unk_16 = cmd->skyboxDisables.unk5;
|
||||
globalCtx->envCtx.skyboxDisabled = cmd->skyboxDisables.unk4;
|
||||
globalCtx->envCtx.sunMoonDisabled = cmd->skyboxDisables.unk5;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x10: Time Settings
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* File: z_shrink_window.c
|
||||
* Description: Draws black top/bottom/side borders on the viewing window (e.g. Z-targeting, talking to NPC)
|
||||
*/
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
ShrinkWindowContext gShrinkWindowContext;
|
||||
|
||||
+3
-5
@@ -114,21 +114,19 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
|
||||
s16 y;
|
||||
f32 distance;
|
||||
CollisionPoly* poly;
|
||||
Camera* camera;
|
||||
Camera* camera = GET_ACTIVE_CAM(globalCtx);
|
||||
Actor* actors[2];
|
||||
s32 ret = 0;
|
||||
s32 bgId;
|
||||
|
||||
camera = GET_ACTIVE_CAM(globalCtx);
|
||||
|
||||
distance = OLib_Vec3fDist(pos, &camera->eye);
|
||||
if ((distance < distanceMin) || (distanceMax < distance)) {
|
||||
func_8013A41C(0x3F);
|
||||
ret = 0x3F;
|
||||
}
|
||||
|
||||
x = func_8013A504(func_800DFCB4(camera) + rot->x);
|
||||
y = func_8013A504(func_800DFCDC(camera) - (s16)(rot->y - 0x7FFF));
|
||||
x = func_8013A504(Camera_GetCamDirPitch(camera) + rot->x);
|
||||
y = func_8013A504(Camera_GetCamDirYaw(camera) - BINANG_SUB(rot->y, 0x7FFF));
|
||||
if ((0 < angleError) && ((angleError < x) || (angleError < y))) {
|
||||
func_8013A41C(0x3E);
|
||||
ret |= 0x3E;
|
||||
|
||||
@@ -170,7 +170,8 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
if (this->actor.child != NULL) {
|
||||
f32 sp94 = Actor_DistanceBetweenActors(&this->actor, grabbed);
|
||||
f32 sp90 = sqrtf(SQ(this->unk1FC.x) + SQ(this->unk1FC.y) + SQ(this->unk1FC.z));
|
||||
f32 sp90 = sqrtf(SQXYZ(this->unk1FC));
|
||||
|
||||
Math_Vec3f_Diff(&grabbed->world.pos, &this->unk1FC, &this->actor.world.pos);
|
||||
if (50.0f < (sp94 - sp90)) {
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
@@ -217,8 +218,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else {
|
||||
Math_Vec3f_Diff(&bodyDistDiffVec, &newPos, &player->actor.velocity);
|
||||
player->actor.world.rot.x =
|
||||
Math_FAtan2F(sqrtf(SQ(bodyDistDiffVec.x) + SQ(bodyDistDiffVec.z)), -bodyDistDiffVec.y);
|
||||
player->actor.world.rot.x = Math_FAtan2F(sqrtf(SQXZ(bodyDistDiffVec)), -bodyDistDiffVec.y);
|
||||
}
|
||||
if (phi_f16 < 50.0f) {
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
|
||||
@@ -91,7 +91,7 @@ void BgCtowerRot_CorridorRotate(BgCtowerRot* this, GlobalContext* globalCtx) {
|
||||
rotZtmp = CLAMP_MAX(1100.0f - offset.z, 1000.0f);
|
||||
rotZ = rotZtmp;
|
||||
}
|
||||
func_800DFAC8(globalCtx->cameraPtrs[MAIN_CAM], 17);
|
||||
func_800DFAC8(globalCtx->cameraPtrs[CAM_ID_MAIN], 17);
|
||||
this->dyna.actor.shape.rot.z = rotZ * 16.384f;
|
||||
if (globalCtx->csCtx.frames == 132) {
|
||||
play_sound(NA_SE_SY_SPIRAL_DASH);
|
||||
|
||||
@@ -1651,9 +1651,9 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
|
||||
case 0:
|
||||
if (player->stateFlags1 & 0x100) {
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_1D22 = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, 0, 1);
|
||||
func_80169590(globalCtx, this->unk_1D22, 7);
|
||||
this->unk_1D22 = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, this->unk_1D22, 7);
|
||||
func_8016566C(150);
|
||||
this->unk_1D14 = 0;
|
||||
this->unk_1D5C = 0.0f;
|
||||
@@ -2048,7 +2048,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
|
||||
this->unk_1D54 = Math_SinS(this->unk_1D14 * 1512) * this->unk_1D58;
|
||||
Matrix_InsertZRotation_f(this->unk_1D54, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledY(1.0f, &this->unk_1D3C);
|
||||
func_8016981C(globalCtx, this->unk_1D22, &this->unk_1D30, &this->unk_1D24, &this->unk_1D3C);
|
||||
Play_CameraSetAtEyeUp(globalCtx, this->unk_1D22, &this->unk_1D30, &this->unk_1D24, &this->unk_1D3C);
|
||||
ShrinkWindow_SetLetterboxTarget(0x1B);
|
||||
}
|
||||
}
|
||||
@@ -2078,9 +2078,9 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_1D22 = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, 0, 1);
|
||||
func_80169590(globalCtx, this->unk_1D22, 7);
|
||||
this->unk_1D22 = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, this->unk_1D22, 7);
|
||||
this->unk_1D20 = 2;
|
||||
this->unk_1D1C = 0;
|
||||
|
||||
@@ -2176,9 +2176,9 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
|
||||
case 100:
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_1D22 = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, 0, 1);
|
||||
func_80169590(globalCtx, this->unk_1D22, 7);
|
||||
this->unk_1D22 = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, this->unk_1D22, 7);
|
||||
this->unk_1D20 = 101;
|
||||
this->unk_1D1C = 0;
|
||||
this->unk_1D5C = 1.0f;
|
||||
@@ -2260,7 +2260,7 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
|
||||
if ((this->unk_1D20 != 0) && (this->unk_1D22 != 0)) {
|
||||
sp5C = this->unk_1D24;
|
||||
sp5C.y += sp58 * D_809DF5B0;
|
||||
func_8016981C(globalCtx, this->unk_1D22, &this->unk_1D30, &sp5C, &this->unk_1D3C);
|
||||
Play_CameraSetAtEyeUp(globalCtx, this->unk_1D22, &this->unk_1D30, &sp5C, &this->unk_1D3C);
|
||||
this->unk_1D3C.z = this->unk_1D3C.x = 0.0f;
|
||||
this->unk_1D3C.y = 1.0f;
|
||||
ShrinkWindow_SetLetterboxTarget(0x1B);
|
||||
|
||||
@@ -260,9 +260,9 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
|
||||
this->unk_708 = 10;
|
||||
this->unk_704 = 0;
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_70A = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, 0, 1);
|
||||
func_80169590(globalCtx, this->unk_70A, 7);
|
||||
this->unk_70A = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, this->unk_70A, 7);
|
||||
func_800B7298(globalCtx, &this->actor, 7);
|
||||
player->actor.world.pos.x = this->unk_6E8;
|
||||
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
|
||||
@@ -380,7 +380,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (this->unk_704 > 140) {
|
||||
Camera* sp5C = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* sp5C = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
this->unk_708 = 0;
|
||||
func_809ECD00(this, globalCtx);
|
||||
@@ -407,7 +407,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
|
||||
Math_Vec3f_Copy(&sp50, &this->unk_718);
|
||||
sp50.y += Math_SinS(this->unk_748 * 0x4000) * this->unk_748 * 1.5f;
|
||||
Play_CameraSetAtEye(globalCtx, this->unk_70A, &sp50, &this->unk_70C);
|
||||
func_80169940(globalCtx, this->unk_70A, this->unk_744);
|
||||
Play_CameraSetFov(globalCtx, this->unk_70A, this->unk_744);
|
||||
Math_ApproachF(&this->unk_744, 60.0f, 0.1f, 1.0f);
|
||||
}
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
|
||||
@@ -199,9 +199,9 @@ void func_809F24C8(Boss06* this, GlobalContext* globalCtx) {
|
||||
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
func_800B7298(globalCtx, &this->actor, 7);
|
||||
this->unk_A00 = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, 0, 1);
|
||||
func_80169590(globalCtx, this->unk_A00, 7);
|
||||
this->unk_A00 = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, this->unk_A00, 7);
|
||||
D_809F4970->unk_151 = 1;
|
||||
this->unk_1C9 = 1;
|
||||
this->unk_1C8 = 1;
|
||||
|
||||
@@ -518,7 +518,7 @@ void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Vec3f screenPos;
|
||||
|
||||
// if not underwater
|
||||
if (!(globalCtx->cameraPtrs[MAIN_CAM]->flags2 & 0x100)) {
|
||||
if (!(globalCtx->cameraPtrs[CAM_ID_MAIN]->flags2 & 0x100)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20);
|
||||
|
||||
@@ -205,7 +205,7 @@ void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DoorAna* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
this->actor.shape.rot.y = BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)));
|
||||
this->actor.shape.rot.y = BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)));
|
||||
}
|
||||
|
||||
void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -405,7 +405,7 @@ void func_808A1288(DoorShutter* this, GlobalContext* globalCtx) {
|
||||
this->unk_164 = sp38;
|
||||
this->unk_168 = 0.0f;
|
||||
|
||||
func_800DFFAC(globalCtx->cameraPtrs[MAIN_CAM], &this->actor, player->unk_3BA, this->unk_168, 12, sp34, 10);
|
||||
func_800DFFAC(globalCtx->cameraPtrs[CAM_ID_MAIN], &this->actor, player->unk_3BA, this->unk_168, 12, sp34, 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +319,8 @@ s32 func_80BDE7FC(EnAl* this, GlobalContext* globalCtx) {
|
||||
case 6:
|
||||
case 8:
|
||||
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)),
|
||||
this->actor.child);
|
||||
}
|
||||
this->unk_4E6++;
|
||||
sp20 = true;
|
||||
@@ -329,7 +330,7 @@ s32 func_80BDE7FC(EnAl* this, GlobalContext* globalCtx) {
|
||||
case 3:
|
||||
case 5:
|
||||
case 7:
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
this->unk_4E6++;
|
||||
sp20 = true;
|
||||
break;
|
||||
|
||||
@@ -308,8 +308,8 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
} else if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
|
||||
this->actor.cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
|
||||
func_800E02AC(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->actor.cutscene)),
|
||||
&this->actor);
|
||||
Camera_SetToTrackActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->actor.cutscene)),
|
||||
&this->actor);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ void EnBigpo_UpdateSpin(EnBigpo* this) {
|
||||
void EnBigpo_LowerCutsceneSubCamera(EnBigpo* this, GlobalContext* globalContext) {
|
||||
Camera* subCam;
|
||||
|
||||
if (this->cutsceneSubCamId != SUBCAM_FREE) {
|
||||
if (this->cutsceneSubCamId != CAM_ID_MAIN) {
|
||||
subCam = Play_GetCamera(globalContext, this->cutsceneSubCamId);
|
||||
subCam->eye.y -= this->actor.velocity.y;
|
||||
if (this->actor.velocity.y > 0.0f) {
|
||||
@@ -332,7 +332,7 @@ void EnBigpo_SpawnCutsceneStage1(EnBigpo* this, GlobalContext* globalCtx) {
|
||||
this->actor.scale.y = 0.015f;
|
||||
this->actor.scale.z = 0.0f;
|
||||
|
||||
if (this->cutsceneSubCamId != SUBCAM_FREE) {
|
||||
if (this->cutsceneSubCamId != CAM_ID_MAIN) {
|
||||
Vec3f subCamEye;
|
||||
|
||||
subCamEye.x = ((this->actor.world.pos.x - this->fires[0].pos.x) * 1.8f) + this->actor.world.pos.x;
|
||||
@@ -460,8 +460,8 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, GlobalContext* globalCtx) {
|
||||
this->idleTimer--;
|
||||
if (this->idleTimer == 0) {
|
||||
subCam = Play_GetCamera(globalCtx, this->cutsceneSubCamId);
|
||||
Play_CameraSetAtEye(globalCtx, MAIN_CAM, &subCam->at, &subCam->eye);
|
||||
this->cutsceneSubCamId = SUBCAM_FREE;
|
||||
Play_CameraSetAtEye(globalCtx, CAM_ID_MAIN, &subCam->at, &subCam->eye);
|
||||
this->cutsceneSubCamId = CAM_ID_MAIN;
|
||||
if (this->actor.params == ENBIGPO_SUMMONED) {
|
||||
dampe = SubS_FindActor(globalCtx, NULL, ACTORCAT_NPC, ACTOR_EN_TK);
|
||||
if (dampe != NULL) {
|
||||
@@ -683,25 +683,25 @@ void EnBigpo_SetupDeath(EnBigpo* this) {
|
||||
void EnBigpo_BurnAwayDeath(EnBigpo* this, GlobalContext* globalCtx) {
|
||||
Vec3f tempVec;
|
||||
f32 unkTemp2; // dont really know what these unktemps are doing
|
||||
s16 cam;
|
||||
s16 camYaw;
|
||||
s16 unkTemp;
|
||||
s16 modifiedTimer;
|
||||
|
||||
this->idleTimer++;
|
||||
if (this->idleTimer < 8) {
|
||||
cam = func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) + 0x4800;
|
||||
camYaw = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x4800;
|
||||
if (this->idleTimer < 5) {
|
||||
unkTemp = (this->idleTimer << 0xC) - 0x4000;
|
||||
// 1.4.0...1 is NOT 1.4, the rodata demands it
|
||||
tempVec.y = (((Math_SinS(unkTemp) * 23.0f) + 40.0f) * 1.4000001f) + this->actor.world.pos.y;
|
||||
unkTemp2 = Math_CosS(unkTemp) * 32.2f;
|
||||
tempVec.x = (Math_SinS(cam) * unkTemp2) + this->actor.world.pos.x;
|
||||
tempVec.z = (Math_CosS(cam) * unkTemp2) + this->actor.world.pos.z;
|
||||
tempVec.x = (Math_SinS(camYaw) * unkTemp2) + this->actor.world.pos.x;
|
||||
tempVec.z = (Math_CosS(camYaw) * unkTemp2) + this->actor.world.pos.z;
|
||||
|
||||
} else {
|
||||
tempVec.y = this->actor.world.pos.y + ((40.0f + (15.0f * (this->idleTimer - 5))) * 1.4000001f);
|
||||
tempVec.x = (Math_SinS(cam) * 32.2f) + this->actor.world.pos.x;
|
||||
tempVec.z = (Math_CosS(cam) * 32.2f) + this->actor.world.pos.z;
|
||||
tempVec.x = (Math_SinS(camYaw) * 32.2f) + this->actor.world.pos.x;
|
||||
tempVec.z = (Math_CosS(camYaw) * 32.2f) + this->actor.world.pos.z;
|
||||
}
|
||||
|
||||
// not sure what we're turning this into, but its based on the timer
|
||||
@@ -955,7 +955,7 @@ void EnBigpo_SetupFlameCirclePositions(EnBigpo* this, GlobalContext* globalCtx)
|
||||
}
|
||||
|
||||
// Setup sub camera
|
||||
if (this->cutsceneSubCamId != SUBCAM_FREE) {
|
||||
if (this->cutsceneSubCamId != CAM_ID_MAIN) {
|
||||
subCamEye.x = (Math_SinS(this->actor.yawTowardsPlayer) * 360.0f) + this->actor.world.pos.x;
|
||||
subCamEye.y = this->actor.world.pos.y + 150.0f;
|
||||
subCamEye.z = (Math_CosS(this->actor.yawTowardsPlayer) * 360.0f) + this->actor.world.pos.z;
|
||||
@@ -1219,7 +1219,7 @@ void EnBigpo_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnBigpo_UpdateFire(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBigpo* this = THIS;
|
||||
|
||||
this->actor.shape.rot.y = BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)));
|
||||
this->actor.shape.rot.y = BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)));
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
@@ -1350,7 +1350,7 @@ void EnBigpo_DrawScoopSoul(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.world.pos.z, this->mainColor.r, this->mainColor.g, this->mainColor.b,
|
||||
this->mainColor.a * 2);
|
||||
|
||||
Matrix_RotateY(BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -1430,7 +1430,7 @@ void EnBigpo_DrawCircleFlames(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY(BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx))), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_NEW);
|
||||
if (this->actionFunc == EnBigpo_SpawnCutsceneStage6) {
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
fireRadius = 500;
|
||||
|
||||
@@ -843,10 +843,10 @@ void EnBigslime_UpdateCameraFormingBigslime(EnBigslime* this, GlobalContext* glo
|
||||
void EnBigslime_EndCutscene(EnBigslime* this, GlobalContext* globalCtx) {
|
||||
Camera* subCam;
|
||||
|
||||
if (this->subCamId != MAIN_CAM) {
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
Play_CameraSetAtEye(globalCtx, MAIN_CAM, &subCam->at, &subCam->eye);
|
||||
this->subCamId = MAIN_CAM;
|
||||
Play_CameraSetAtEye(globalCtx, CAM_ID_MAIN, &subCam->at, &subCam->eye);
|
||||
this->subCamId = CAM_ID_MAIN;
|
||||
ActorCutscene_Stop(this->cutscene);
|
||||
this->cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
|
||||
func_800B724C(globalCtx, &this->actor, 6);
|
||||
@@ -1019,7 +1019,7 @@ void EnBigslime_SetupMoveOnCeiling(EnBigslime* this) {
|
||||
this->actor.gravity = 0.0f;
|
||||
this->actor.velocity.y = 20.0f;
|
||||
|
||||
if (this->subCamId != MAIN_CAM) {
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->ceilingMoveTimer = 20;
|
||||
} else {
|
||||
@@ -1043,7 +1043,7 @@ void EnBigslime_MoveOnCeiling(EnBigslime* this, GlobalContext* globalCtx) {
|
||||
EnBigslime_Scale(this, pitch, 0.04f, 0.04f);
|
||||
EnBigslime_UpdateWavySurface(this);
|
||||
|
||||
if (this->subCamId != MAIN_CAM) {
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
if (this->ceilingMoveTimer == 0) {
|
||||
EnBigslime_EndCutscene(this, globalCtx);
|
||||
this->ceilingMoveTimer = 320;
|
||||
@@ -1493,7 +1493,7 @@ void EnBigslime_Rise(EnBigslime* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnBigslime_SetupCutsceneGrabPlayer(EnBigslime* this, GlobalContext* globalCtx) {
|
||||
Camera* mainCam = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
s16 yaw;
|
||||
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &mainCam->at, &mainCam->eye);
|
||||
@@ -1501,7 +1501,7 @@ void EnBigslime_SetupCutsceneGrabPlayer(EnBigslime* this, GlobalContext* globalC
|
||||
this->wavySurfaceTimer = 0;
|
||||
this->bigslimeCollider[0].base.atFlags &= ~AT_ON;
|
||||
this->actor.world.rot.y = Actor_YawToPoint(&this->actor, &this->actor.home.pos);
|
||||
yaw = func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) - this->actor.world.rot.y;
|
||||
yaw = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.world.rot.y;
|
||||
|
||||
if (yaw > 0x4000) {
|
||||
this->subCamYawGrabPlayer = -0x2000;
|
||||
@@ -2423,7 +2423,7 @@ void EnBigslime_SetupFrogSpawn(EnBigslime* this, GlobalContext* globalCtx) {
|
||||
Vec3f* worldPos;
|
||||
Vec3f dustPos;
|
||||
Vec3f hahenVel;
|
||||
s16 yaw = func_800DFCDC(GET_ACTIVE_CAM(globalCtx));
|
||||
s16 yaw = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
s16 yawReverse = yaw + 0x8000;
|
||||
s32 i;
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ void func_809C4DA4(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
case 0:
|
||||
this->unk_2C0 = 1;
|
||||
D_809C6104 = 1;
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->unk_2D0)),
|
||||
&this->unk_2D8[0]->actor);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->unk_2D0)),
|
||||
&this->unk_2D8[0]->actor);
|
||||
this->unk_2D4 = 0;
|
||||
this->unk_2BC = 10;
|
||||
func_809C493C(this, 17, 1.0f);
|
||||
@@ -580,7 +580,7 @@ void func_809C5BF4(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
func_801477B4(globalCtx);
|
||||
func_800E0308(sp28, &this->unk_2D8[0]->actor);
|
||||
Camera_SetTargetActor(sp28, &this->unk_2D8[0]->actor);
|
||||
func_809C493C(this, 13, 1.0f);
|
||||
D_809C6100 = 0;
|
||||
if (player->transformation == PLAYER_FORM_HUMAN) {
|
||||
@@ -595,7 +595,7 @@ void func_809C5BF4(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
s32 idx = D_809C6100 - 1;
|
||||
|
||||
func_800E0308(sp28, &this->unk_2D8[1 + idx]->actor);
|
||||
Camera_SetTargetActor(sp28, &this->unk_2D8[1 + idx]->actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,8 +469,8 @@ void func_80BFF03C(EnBomjima* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
player->stateFlags1 &= ~0x20;
|
||||
gSaveContext.weekEventReg[83] &= (u8)~4;
|
||||
this->actor.world.rot.y = func_800DFCDC(GET_ACTIVE_CAM(globalCtx));
|
||||
this->unk_2DC = func_800DFCDC(GET_ACTIVE_CAM(globalCtx));
|
||||
this->actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
this->unk_2DC = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_2D4[0], &this->actor);
|
||||
func_80BFF120(this);
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Camera* camera;
|
||||
Camera* mainCam;
|
||||
s32 pad;
|
||||
|
||||
switch (this->cameraState) {
|
||||
@@ -545,17 +545,17 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
|
||||
break;
|
||||
case 1:
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
this->camId = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, 0, 1);
|
||||
func_80169590(globalCtx, this->camId, 7);
|
||||
this->subCamId = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, this->subCamId, 7);
|
||||
func_800B7298(globalCtx, &this->actor, 4);
|
||||
camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
this->eye.x = camera->eye.x;
|
||||
this->eye.y = camera->eye.y;
|
||||
this->eye.z = camera->eye.z;
|
||||
this->at.x = camera->at.x;
|
||||
this->at.y = camera->at.y;
|
||||
this->at.z = camera->at.z;
|
||||
mainCam = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
this->subCamEye.x = mainCam->eye.x;
|
||||
this->subCamEye.y = mainCam->eye.y;
|
||||
this->subCamEye.z = mainCam->eye.z;
|
||||
this->subCamAt.x = mainCam->at.x;
|
||||
this->subCamAt.y = mainCam->at.y;
|
||||
this->subCamAt.z = mainCam->at.z;
|
||||
func_801518B0(globalCtx, 0xF, NULL);
|
||||
this->cameraState = 2;
|
||||
func_8019FDC8(&D_801DB4A4, NA_SE_VO_NA_LISTEN, 0x20);
|
||||
@@ -568,22 +568,22 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
|
||||
|
||||
player->actor.speedXZ = 0.0f;
|
||||
if (Message_GetState(&globalCtx->msgCtx) == 0) {
|
||||
camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera->eye = this->eye;
|
||||
camera->eyeNext = this->eye;
|
||||
camera->at = this->at;
|
||||
func_80169AFC(globalCtx, this->camId, 0);
|
||||
mainCam = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_80169AFC(globalCtx, this->subCamId, 0);
|
||||
func_800EA0EC(globalCtx, &globalCtx->csCtx);
|
||||
func_800B7298(globalCtx, &this->actor, 6);
|
||||
this->cameraState = 0;
|
||||
this->camId = 0;
|
||||
this->subCamId = CAM_ID_MAIN;
|
||||
this->activeTimer = 20;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->camId != 0) {
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->at, &this->eye);
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ typedef struct EnClearTag {
|
||||
/* 0x2E54 */ u8 cameraState;
|
||||
/* 0x2E56 */ s16 activeTimer; // Actor Marked for Death when timer runs out
|
||||
/* 0x2E58 */ UNK_TYPE1 unk2E58[0xC];
|
||||
/* 0x2E64 */ s16 camId;
|
||||
/* 0x2E64 */ s16 subCamId;
|
||||
/* 0x2E66 */ Color_RGBA8 flashEnvColor;
|
||||
/* 0x2E6C */ Vec3f eye; // Camera eye
|
||||
/* 0x2E78 */ Vec3f at; // Camera lookAt
|
||||
/* 0x2E6C */ Vec3f subCamEye;
|
||||
/* 0x2E78 */ Vec3f subCamAt;
|
||||
} EnClearTag; // size = 0x2E84
|
||||
|
||||
extern const ActorInit En_Clear_Tag_InitVars;
|
||||
|
||||
@@ -363,11 +363,11 @@ void func_8089A9B0(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_8089ABF4(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
if (this->camId != 0) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, this->camId);
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
|
||||
Play_CameraSetAtEye(globalCtx, 0, &camera->at, &camera->eye);
|
||||
this->camId = 0;
|
||||
Play_CameraSetAtEye(globalCtx, CAM_ID_MAIN, &subCam->at, &subCam->eye);
|
||||
this->subCamId = CAM_ID_MAIN;
|
||||
ActorCutscene_Stop(this->actor.cutscene);
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
func_800B724C(globalCtx, &this->actor, 6);
|
||||
@@ -462,14 +462,14 @@ s32 func_8089AE00(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_8089B100(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, this->camId);
|
||||
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Vec3f sp3C;
|
||||
|
||||
Animation_Change(&this->skelAnime, &object_dinofos_Anim_001CCC, 1.0f,
|
||||
Animation_GetLastFrame(&object_dinofos_Anim_001CCC),
|
||||
Animation_GetLastFrame(&object_dinofos_Anim_001CCC), 2, 0.0f);
|
||||
func_800BE33C(&camera->eye, &camera->at, &this->unk_29A, true);
|
||||
func_800BE33C(&subCam->eye, &subCam->at, &this->unk_29A, true);
|
||||
Math_Vec3f_Diff(&this->actor.world.pos, &player->actor.world.pos, &sp3C);
|
||||
this->unk_2BC.x = player->actor.world.pos.x + (0.4f * sp3C.x);
|
||||
this->unk_2BC.y = player->actor.world.pos.y + 5.0f;
|
||||
@@ -477,19 +477,19 @@ void func_8089B100(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
this->unk_2C8.x = this->actor.world.pos.x;
|
||||
this->unk_2C8.y = this->actor.focus.pos.y - 400.0f;
|
||||
this->unk_2C8.z = this->actor.world.pos.z;
|
||||
this->unk_2AC = Math_Vec3f_DistXYZ(&camera->eye, &this->unk_2BC) * 0.05f;
|
||||
this->unk_2A8 = Math_Vec3f_DistXYZ(&camera->at, &this->unk_2C8) * 0.05f;
|
||||
this->unk_2AC = Math_Vec3f_DistXYZ(&subCam->eye, &this->unk_2BC) * 0.05f;
|
||||
this->unk_2A8 = Math_Vec3f_DistXYZ(&subCam->at, &this->unk_2C8) * 0.05f;
|
||||
this->unk_290 = 20;
|
||||
this->actionFunc = func_8089B288;
|
||||
}
|
||||
|
||||
void func_8089B288(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, this->camId);
|
||||
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
|
||||
this->unk_290--;
|
||||
Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, this->unk_2AC);
|
||||
Math_Vec3f_StepTo(&camera->at, &this->unk_2C8, this->unk_2A8);
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &camera->at, &camera->eye);
|
||||
Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, this->unk_2AC);
|
||||
Math_Vec3f_StepTo(&subCam->at, &this->unk_2C8, this->unk_2A8);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &subCam->at, &subCam->eye);
|
||||
if (this->unk_290 == 0) {
|
||||
func_8089B320(this);
|
||||
}
|
||||
@@ -506,24 +506,24 @@ void func_8089B320(EnDinofos* this) {
|
||||
}
|
||||
|
||||
void func_8089B3D4(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, this->camId);
|
||||
Vec3f sp28;
|
||||
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
Vec3f subCamAt;
|
||||
|
||||
Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, 10.0f);
|
||||
Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, 10.0f);
|
||||
this->unk_290++;
|
||||
if (this->unk_290 == 10) {
|
||||
func_801A2E54(NA_BGM_MINI_BOSS);
|
||||
}
|
||||
|
||||
sp28.x = this->actor.world.pos.x;
|
||||
sp28.z = this->actor.world.pos.z;
|
||||
if (this->actor.focus.pos.y <= camera->at.y) {
|
||||
sp28.y = this->actor.focus.pos.y;
|
||||
subCamAt.x = this->actor.world.pos.x;
|
||||
subCamAt.z = this->actor.world.pos.z;
|
||||
if (this->actor.focus.pos.y <= subCam->at.y) {
|
||||
subCamAt.y = this->actor.focus.pos.y;
|
||||
} else {
|
||||
sp28.y = camera->at.y;
|
||||
subCamAt.y = subCam->at.y;
|
||||
}
|
||||
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &sp28, &camera->eye);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &subCamAt, &subCam->eye);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
func_8089B4A4(this);
|
||||
}
|
||||
@@ -544,11 +544,11 @@ void func_8089B4A4(EnDinofos* this) {
|
||||
}
|
||||
|
||||
void func_8089B580(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, this->camId);
|
||||
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
|
||||
this->unk_290++;
|
||||
if (this->unk_290 < 8) {
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &camera->eye);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.focus.pos, &subCam->eye);
|
||||
}
|
||||
|
||||
if (this->skelAnime.curFrame > 35.0f) {
|
||||
@@ -556,8 +556,8 @@ void func_8089B580(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
globalCtx->envCtx.unk_C3 = 11;
|
||||
}
|
||||
|
||||
Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, 10.0f);
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &camera->eye);
|
||||
Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, 10.0f);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.focus.pos, &subCam->eye);
|
||||
if (this->skelAnime.curFrame <= 55.0f) {
|
||||
func_800B9010(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG);
|
||||
}
|
||||
@@ -1201,7 +1201,7 @@ void func_8089D2E0(EnDinofos* this) {
|
||||
}
|
||||
|
||||
void func_8089D318(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp24;
|
||||
Vec3f subCamEye;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
@@ -1210,12 +1210,12 @@ void func_8089D318(EnDinofos* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
|
||||
}
|
||||
this->camId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
|
||||
this->subCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
sp24.x = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.x;
|
||||
sp24.y = this->actor.focus.pos.y;
|
||||
sp24.z = (Math_CosS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.z;
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &sp24);
|
||||
subCamEye.x = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.x;
|
||||
subCamEye.y = this->actor.focus.pos.y;
|
||||
subCamEye.z = (Math_CosS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.z;
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.focus.pos, &subCamEye);
|
||||
func_8089CFAC(this);
|
||||
} else {
|
||||
func_8089B100(this, globalCtx);
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef struct EnDinofos {
|
||||
/* 0x290 */ s16 unk_290;
|
||||
/* 0x292 */ s16 unk_292;
|
||||
/* 0x294 */ UNK_TYPE1 unk_294[4];
|
||||
/* 0x298 */ s16 camId;
|
||||
/* 0x298 */ s16 subCamId;
|
||||
/* 0x29A */ Vec3s unk_29A;
|
||||
/* 0x2A0 */ s32 unk_2A0;
|
||||
/* 0x2A4 */ f32 unk_2A4;
|
||||
|
||||
@@ -2898,7 +2898,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp118 = (player->actor.speedXZ * 0.3f) + 0.25f;
|
||||
}
|
||||
|
||||
if ((D_80917200 != 0) || (sCameraId != MAIN_CAM) ||
|
||||
if ((D_80917200 != 0) || (sCameraId != CAM_ID_MAIN) ||
|
||||
((player->actor.world.pos.z > 1150.0f) && (this->unk_150 != 100))) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
} else {
|
||||
@@ -4359,7 +4359,7 @@ void EnFishing_UpdatePondProps(GlobalContext* globalCtx) {
|
||||
prop++;
|
||||
}
|
||||
|
||||
if (sCameraId == MAIN_CAM) {
|
||||
if (sCameraId == CAM_ID_MAIN) {
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &sFishingMain->collider.base);
|
||||
}
|
||||
}
|
||||
@@ -5185,10 +5185,10 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
sCameraId = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, MAIN_CAM, 1);
|
||||
func_80169590(globalCtx, sCameraId, 7);
|
||||
camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
sCameraId = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, sCameraId, 7);
|
||||
camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
sCameraEye.x = camera->eye.x;
|
||||
sCameraEye.y = camera->eye.y;
|
||||
sCameraEye.z = camera->eye.z;
|
||||
@@ -5295,7 +5295,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
break;
|
||||
|
||||
case 3: {
|
||||
Camera* camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
camera->eye = sCameraEye;
|
||||
camera->eyeNext = sCameraEye;
|
||||
@@ -5304,7 +5304,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
func_80169AFC(globalCtx, sCameraId, 0);
|
||||
func_800EA0EC(globalCtx, &globalCtx->csCtx);
|
||||
D_8090CD4C = 0;
|
||||
sCameraId = MAIN_CAM;
|
||||
sCameraId = CAM_ID_MAIN;
|
||||
func_800F6834(globalCtx, 0);
|
||||
globalCtx->envCtx.unk_8C.fogNear = 0;
|
||||
player->unk_B28 = -5;
|
||||
@@ -5313,11 +5313,11 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
case 10:
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
sCameraId = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, MAIN_CAM, 1);
|
||||
func_80169590(globalCtx, sCameraId, 7);
|
||||
sCameraId = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, sCameraId, 7);
|
||||
func_800B7298(globalCtx, &this->actor, 4);
|
||||
camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
sCameraEye.x = camera->eye.x;
|
||||
sCameraEye.y = camera->eye.y;
|
||||
sCameraEye.z = camera->eye.z;
|
||||
@@ -5334,7 +5334,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
player->actor.speedXZ = 0.0f;
|
||||
|
||||
if (!Message_GetState(&globalCtx->msgCtx)) {
|
||||
camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
camera->eye = sCameraEye;
|
||||
camera->eyeNext = sCameraEye;
|
||||
@@ -5343,7 +5343,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
func_800EA0EC(globalCtx, &globalCtx->csCtx);
|
||||
func_800B7298(globalCtx, &this->actor, 6);
|
||||
D_8090CD4C = 0;
|
||||
sCameraId = MAIN_CAM;
|
||||
sCameraId = CAM_ID_MAIN;
|
||||
D_8090CD50 = 30;
|
||||
func_800F6834(globalCtx, 0);
|
||||
globalCtx->envCtx.unk_8C.fogNear = 0;
|
||||
@@ -5352,11 +5352,11 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
case 20:
|
||||
func_800EA0D4(globalCtx, &globalCtx->csCtx);
|
||||
sCameraId = func_801694DC(globalCtx);
|
||||
func_80169590(globalCtx, MAIN_CAM, 1);
|
||||
func_80169590(globalCtx, sCameraId, 7);
|
||||
sCameraId = Play_CreateSubCamera(globalCtx);
|
||||
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
|
||||
Play_CameraChangeStatus(globalCtx, sCameraId, 7);
|
||||
func_800B7298(globalCtx, &this->actor, 4);
|
||||
camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
sCameraEye.x = camera->eye.x;
|
||||
sCameraEye.y = camera->eye.y;
|
||||
sCameraEye.z = camera->eye.z;
|
||||
@@ -5428,7 +5428,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (D_8090CD50 == 0) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
|
||||
if (func_80147624(globalCtx)) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
func_801477B4(globalCtx);
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
@@ -5443,7 +5443,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
func_800EA0EC(globalCtx, &globalCtx->csCtx);
|
||||
func_800B7298(globalCtx, &this->actor, 6); // arg2 changed from 7 to 6 in MM
|
||||
D_8090CD4C = 0;
|
||||
sCameraId = MAIN_CAM;
|
||||
sCameraId = CAM_ID_MAIN;
|
||||
player->unk_B28 = -5;
|
||||
D_80917200 = 5;
|
||||
D_8090CD54 = 0;
|
||||
@@ -5459,7 +5459,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (sCameraId != MAIN_CAM) {
|
||||
if (sCameraId != CAM_ID_MAIN) {
|
||||
Play_CameraSetAtEye(globalCtx, sCameraId, &sCameraAt, &sCameraEye);
|
||||
Math_ApproachF(&D_80911F4C, 1.0f, 1.0f, 0.02f);
|
||||
|
||||
@@ -5561,7 +5561,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
if ((u8)D_8090CCD0 > 0) {
|
||||
s32 pad;
|
||||
Camera* camera = Play_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
s16 i;
|
||||
s32 pad1;
|
||||
Vec3f pos;
|
||||
@@ -5571,7 +5571,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
rot.x = 1.6707964f;
|
||||
rot.y = 1.0f;
|
||||
rot.z = (func_800DFC68(camera) * -(M_PI / 32768)) + rot.y;
|
||||
rot.z = (Camera_GetInputDirYaw(camera) * -(M_PI / 32768)) + rot.y;
|
||||
|
||||
for (i = 0; i < (u8)D_8090CCD0; i++) {
|
||||
pos.x = randPlusMinusPoint5Scaled(700.0f) + globalCtx->view.eye.x;
|
||||
|
||||
@@ -730,7 +730,8 @@ void func_80962D60(EnFu* this, GlobalContext* globalCtx) {
|
||||
void func_80962EBC(EnFu* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_542 != 0) {
|
||||
if (this->actor.cutscene != -1) {
|
||||
func_800DFB14(globalCtx->cameraPtrs[MAIN_CAM], ActorCutscene_GetCutscene(this->actor.cutscene)->unk4);
|
||||
Camera_ChangeDataIdx(globalCtx->cameraPtrs[CAM_ID_MAIN],
|
||||
ActorCutscene_GetCutscene(this->actor.cutscene)->csCamSceneDataId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1163,11 +1164,11 @@ void func_80963F44(EnFu* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80963F88(EnFu* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_542 == 1) {
|
||||
func_800DFAC8(globalCtx->cameraPtrs[MAIN_CAM], 75);
|
||||
func_800DFAC8(globalCtx->cameraPtrs[CAM_ID_MAIN], 75);
|
||||
globalCtx->unk_1887E = 0;
|
||||
} else if (this->unk_542 == 2) {
|
||||
globalCtx->unk_1887D = 0;
|
||||
func_800DFAC8(globalCtx->cameraPtrs[MAIN_CAM], 75);
|
||||
func_800DFAC8(globalCtx->cameraPtrs[CAM_ID_MAIN], 75);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1421,7 +1422,7 @@ void func_80964694(EnFu* this, EnFuUnkStruct* ptr, Vec3f* arg2, s32 len) {
|
||||
|
||||
void func_809647EC(GlobalContext* globalCtx, EnFuUnkStruct* ptr, s32 len) {
|
||||
Vec3f sp44 = { 0.0f, 0.0f, 0.0f };
|
||||
s16 activeCam = func_800DFC68(GET_ACTIVE_CAM(globalCtx));
|
||||
s16 yaw = Camera_GetInputDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < len; i++, ptr++) {
|
||||
@@ -1434,7 +1435,7 @@ void func_809647EC(GlobalContext* globalCtx, EnFuUnkStruct* ptr, s32 len) {
|
||||
ptr->unk_08.z += 2.0f * Math_CosS(ptr->unk_2C);
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(ptr->unk_08.x, ptr->unk_08.y, ptr->unk_08.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(activeCam, MTXMODE_APPLY);
|
||||
Matrix_RotateY(yaw, MTXMODE_APPLY);
|
||||
Matrix_MultiplyVector3fByState(&sp44, &ptr->unk_08);
|
||||
Matrix_StatePop();
|
||||
ptr->unk_2C += 6000;
|
||||
|
||||
@@ -385,7 +385,7 @@ s32 func_8094E52C(EnGm* this, GlobalContext* globalCtx) {
|
||||
if (!(gSaveContext.weekEventReg[86] & 0x40) && (this->unk_3E0 == 2)) {
|
||||
ActorCutscene_Stop(sp2A);
|
||||
} else {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
}
|
||||
this->unk_3E0++;
|
||||
ret = true;
|
||||
@@ -393,7 +393,8 @@ s32 func_8094E52C(EnGm* this, GlobalContext* globalCtx) {
|
||||
|
||||
case 1:
|
||||
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)),
|
||||
this->actor.child);
|
||||
}
|
||||
this->unk_3E0++;
|
||||
ret = true;
|
||||
@@ -453,7 +454,7 @@ s32 func_8094E69C(EnGm* this, GlobalContext* globalCtx) {
|
||||
case 4:
|
||||
case 6:
|
||||
camera = Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp4A));
|
||||
func_800E0308(camera, &this->actor);
|
||||
Camera_SetTargetActor(camera, &this->actor);
|
||||
this->unk_3E0++;
|
||||
ret = true;
|
||||
}
|
||||
@@ -464,7 +465,7 @@ s32 func_8094E69C(EnGm* this, GlobalContext* globalCtx) {
|
||||
case 7:
|
||||
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
|
||||
camera = Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp4A));
|
||||
func_800E0308(camera, this->actor.child);
|
||||
Camera_SetTargetActor(camera, this->actor.child);
|
||||
}
|
||||
this->unk_3E0++;
|
||||
ret = true;
|
||||
|
||||
@@ -1045,7 +1045,7 @@ s32 func_80A13564(EnGo* this, f32 arg1, f32 arg2, s32 arg3) {
|
||||
}
|
||||
|
||||
void func_80A136B8(GlobalContext* globalCtx, s16 arg1, s16 arg2, s16 arg3) {
|
||||
s16 sp26 = Quake_Add(Play_GetCamera(globalCtx, MAIN_CAM), 3);
|
||||
s16 sp26 = Quake_Add(Play_GetCamera(globalCtx, CAM_ID_MAIN), 3);
|
||||
|
||||
Quake_SetCountdown(sp26, arg3);
|
||||
Quake_SetSpeed(sp26, arg1);
|
||||
|
||||
@@ -331,8 +331,8 @@ s32 func_80BF17BC(EnIg* this, GlobalContext* globalCtx) {
|
||||
case 2:
|
||||
case 4:
|
||||
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)),
|
||||
this->actor.child);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)),
|
||||
this->actor.child);
|
||||
}
|
||||
this->unk_3F6++;
|
||||
ret = true;
|
||||
@@ -345,7 +345,7 @@ s32 func_80BF17BC(EnIg* this, GlobalContext* globalCtx) {
|
||||
ActorCutscene_Stop(sp2A);
|
||||
this->unk_3F6 = 5;
|
||||
} else {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
}
|
||||
this->unk_3F6++;
|
||||
ret = true;
|
||||
|
||||
@@ -383,13 +383,13 @@ void EnJg_GoronShrineCheer(EnJg* this, GlobalContext* globalCtx) {
|
||||
// Focus on a specifc Goron for these lines
|
||||
this->shrineGoron = EnJg_GetShrineGoronToFocusOn(globalCtx, this->focusedShrineGoronParam);
|
||||
ActorCutscene_Start(this->cutscene, this->shrineGoron);
|
||||
func_800E0308(globalCtx->cameraPtrs[0], this->shrineGoron);
|
||||
Camera_SetTargetActor(globalCtx->cameraPtrs[CAM_ID_MAIN], this->shrineGoron);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Focus on the whole group for these lines
|
||||
ActorCutscene_Start(this->cutscene, &this->actor);
|
||||
func_800E0308(globalCtx->cameraPtrs[0], this->shrineGoron);
|
||||
Camera_SetTargetActor(globalCtx->cameraPtrs[CAM_ID_MAIN], this->shrineGoron);
|
||||
break;
|
||||
}
|
||||
this->actionFunc = EnJg_GoronShrineTalk;
|
||||
|
||||
@@ -259,7 +259,7 @@ void EnKakasi_CheckPlayerPosition(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
* something to do with cutscene camera?
|
||||
*/
|
||||
void func_8096FAAC(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
if (this->cutsceneCamId != MAIN_CAM) {
|
||||
if (this->cutsceneCamId != CAM_ID_MAIN) {
|
||||
Math_ApproachF(&this->unk214.x, this->unk238.x, 0.4f, 4.0f);
|
||||
Math_ApproachF(&this->unk214.y, this->unk238.y, 0.4f, 4.0f);
|
||||
Math_ApproachF(&this->unk214.z, this->unk238.z, 0.4f, 4.0f);
|
||||
@@ -271,7 +271,7 @@ void func_8096FAAC(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
Math_ApproachF(&this->unk20C, this->unk210, 0.3f, 10.0f);
|
||||
|
||||
Play_CameraSetAtEye(globalCtx, this->cutsceneCamId, &this->unk220, &this->unk214);
|
||||
func_80169940(globalCtx, this->cutsceneCamId, this->unk20C);
|
||||
Play_CameraSetFov(globalCtx, this->cutsceneCamId, this->unk20C);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
void EnKakasi_SetupSongTeach(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
this->actor.textId = 0x1646;
|
||||
func_801518B0(globalCtx, this->actor.textId, &this->actor);
|
||||
this->cutsceneCamId = MAIN_CAM;
|
||||
this->cutsceneCamId = CAM_ID_MAIN;
|
||||
this->unk20C = 0.0f;
|
||||
this->unk210 = 60.0f;
|
||||
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL);
|
||||
@@ -628,7 +628,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_YASE_DEAD);
|
||||
if (this) {}
|
||||
this->unkState196 = 2;
|
||||
this->cutsceneCamId = MAIN_CAM;
|
||||
this->cutsceneCamId = CAM_ID_MAIN;
|
||||
this->actor.textId = 0x1647;
|
||||
this->unkState1A8 = 2;
|
||||
this->unkMsgState1AC = 5;
|
||||
@@ -662,7 +662,7 @@ void EnKakasi_SetupPostSongLearnDialogue(EnKakasi* this, GlobalContext* globalCt
|
||||
this->unk190 = 0;
|
||||
this->unkCounter1A4 = 0;
|
||||
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR);
|
||||
this->cutsceneCamId = MAIN_CAM;
|
||||
this->cutsceneCamId = CAM_ID_MAIN;
|
||||
this->unkMsgState1AC = 5;
|
||||
this->unkState1A8 = 1;
|
||||
this->actionFunc = EnKakasi_PostSongLearnDialogue;
|
||||
@@ -720,7 +720,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
this->unkState1A8 = 1;
|
||||
}
|
||||
|
||||
if (this->cutsceneCamId != MAIN_CAM) {
|
||||
if (this->cutsceneCamId != CAM_ID_MAIN) {
|
||||
this->unk22C.y = this->actor.home.pos.y + 50.0f;
|
||||
EnKakasi_CheckPlayerPosition(this, globalCtx);
|
||||
this->unk238.x = D_80971FA0[this->unk190].x;
|
||||
@@ -974,7 +974,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
Vec3f tempunk238;
|
||||
Vec3f tempWorldPos;
|
||||
|
||||
if (this->cutsceneCamId != MAIN_CAM) {
|
||||
if (this->cutsceneCamId != CAM_ID_MAIN) {
|
||||
this->unk22C.y = this->actor.home.pos.y + 50.0f;
|
||||
this->unk238.x = D_80972030.x;
|
||||
this->unk238.y = D_80972030.y;
|
||||
@@ -1127,7 +1127,7 @@ void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
if (this->unk1BC.x != 0.0f || this->unk1BC.z != 0.0f) {
|
||||
Math_Vec3f_Copy(&this->actor.focus.pos, &this->unk1BC);
|
||||
this->actor.focus.pos.y += 10.0f;
|
||||
if (this->cutsceneCamId == MAIN_CAM) {
|
||||
if (this->cutsceneCamId == CAM_ID_MAIN) {
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
} else {
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.home.rot);
|
||||
|
||||
@@ -667,7 +667,8 @@ void func_80B27774(EnKendoJs* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80B2783C(EnKendoJs* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.cutscene != -1) {
|
||||
func_800DFB14(globalCtx->cameraPtrs[MAIN_CAM], ActorCutscene_GetCutscene(this->actor.cutscene)->unk4);
|
||||
Camera_ChangeDataIdx(globalCtx->cameraPtrs[CAM_ID_MAIN],
|
||||
ActorCutscene_GetCutscene(this->actor.cutscene)->csCamSceneDataId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,22 +224,22 @@ void EnMinifrog_TurnToMissingFrog(EnMinifrog* this) {
|
||||
static Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 sEnvColor = { 80, 80, 80, 255 };
|
||||
|
||||
void EnMinifrog_SetCamera(EnMinifrog* this, GlobalContext* globalCtx) {
|
||||
void EnMinifrog_SpawnDust(EnMinifrog* this, GlobalContext* globalCtx) {
|
||||
Vec3f pos;
|
||||
Vec3f vec5;
|
||||
Vec3f vel;
|
||||
Vec3f accel;
|
||||
s16 yaw;
|
||||
s16 pitch;
|
||||
Vec3f eye;
|
||||
Vec3f eye = GET_ACTIVE_CAM(globalCtx)->eye;
|
||||
s32 i;
|
||||
|
||||
eye = GET_ACTIVE_CAM(globalCtx)->eye;
|
||||
yaw = Math_Vec3f_Yaw(&eye, &this->actor.world.pos);
|
||||
pitch = -Math_Vec3f_Pitch(&eye, &this->actor.world.pos);
|
||||
vec5.x = this->actor.world.pos.x - (5.0f * Math_SinS(yaw) * Math_CosS(pitch));
|
||||
vec5.y = this->actor.world.pos.y - (5.0f * Math_SinS(pitch));
|
||||
vec5.z = this->actor.world.pos.z - (5.0f * Math_CosS(yaw) * Math_CosS(pitch));
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
vel.x = randPlusMinusPoint5Scaled(4.0f);
|
||||
vel.y = randPlusMinusPoint5Scaled(4.0f);
|
||||
@@ -284,7 +284,7 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, GlobalContext* globalCtx) {
|
||||
case 0xD85: // "I understand. I shall head for the mountains immediately."
|
||||
default:
|
||||
func_801477B4(globalCtx);
|
||||
EnMinifrog_SetCamera(this, globalCtx);
|
||||
EnMinifrog_SpawnDust(this, globalCtx);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_NPC_FADEAWAY);
|
||||
if (this->actor.cutscene != -1) {
|
||||
if (ActorCutscene_GetCurrentIndex() == this->actor.cutscene) {
|
||||
|
||||
@@ -742,7 +742,7 @@ void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad2[9];
|
||||
s16 temp29C;
|
||||
f32 featherScale;
|
||||
f32 camResult;
|
||||
f32 viewAtToEyeNormY;
|
||||
f32 floorHeight;
|
||||
f32 dist = 20.0f;
|
||||
s32 pad3;
|
||||
@@ -808,17 +808,19 @@ void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 60.0f, 0x1F);
|
||||
|
||||
// if cucco is off the map?
|
||||
if (this->actor.floorHeight <= BGCHECK_Y_MIN || this->actor.floorHeight >= BGCHECK_Y_MAX) {
|
||||
// if cucco is off the map?
|
||||
Vec3f camera;
|
||||
camera.x = globalCtx->view.at.x - globalCtx->view.eye.x;
|
||||
camera.y = globalCtx->view.at.y - globalCtx->view.eye.y;
|
||||
camera.z = globalCtx->view.at.z - globalCtx->view.eye.z;
|
||||
camResult = camera.y / sqrtf(SQXYZ(camera));
|
||||
Vec3f viewAtToEye;
|
||||
|
||||
// Direction vector for the direction the camera is facing
|
||||
viewAtToEye.x = globalCtx->view.at.x - globalCtx->view.eye.x;
|
||||
viewAtToEye.y = globalCtx->view.at.y - globalCtx->view.eye.y;
|
||||
viewAtToEye.z = globalCtx->view.at.z - globalCtx->view.eye.z;
|
||||
viewAtToEyeNormY = viewAtToEye.y / sqrtf(SQXYZ(viewAtToEye));
|
||||
|
||||
this->actor.world.pos.x = this->actor.home.pos.x;
|
||||
this->actor.world.pos.z = this->actor.home.pos.z;
|
||||
this->actor.world.pos.y = (this->actor.home.pos.y + globalCtx->view.eye.y) + (camResult * 160.0f);
|
||||
this->actor.world.pos.y = (this->actor.home.pos.y + globalCtx->view.eye.y) + (viewAtToEyeNormY * 160.0f);
|
||||
|
||||
if (this->actor.world.pos.y < this->actor.home.pos.y) {
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + 300.0f;
|
||||
|
||||
@@ -461,7 +461,7 @@ void func_80B5C3D8(EnOt* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, 12.0f)) {
|
||||
Matrix_RotateY(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)), MTXMODE_NEW);
|
||||
Matrix_RotateY(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)), MTXMODE_NEW);
|
||||
sp38.x = 1.0f;
|
||||
sp38.y = 8.1f;
|
||||
sp38.z = 0.0f;
|
||||
@@ -645,8 +645,8 @@ void func_80B5CD40(EnOt* this, GlobalContext* globalCtx) {
|
||||
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
temp = Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx))),
|
||||
3, 0xE38, 0x38E);
|
||||
temp = Math_SmoothStepToS(&this->actor.shape.rot.y,
|
||||
BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), 3, 0xE38, 0x38E);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (1) {}
|
||||
if (!temp) {
|
||||
@@ -1112,7 +1112,7 @@ EnOtUnkStruct* func_80B5DF58(EnOtUnkStruct* arg0, u8 arg1, Vec3f* arg2, Vec3s* a
|
||||
void func_80B5E078(GlobalContext* globalCtx, EnOtUnkStruct* arg1, s32 arg2) {
|
||||
Vec3f sp54;
|
||||
s32 i;
|
||||
s16 temp = func_800DFC68(GET_ACTIVE_CAM(globalCtx));
|
||||
s16 temp = Camera_GetInputDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
|
||||
for (i = 0; i < arg2; i++, arg1++) {
|
||||
if ((arg1->unk_00 == 1) || (arg1->unk_00 == 2)) {
|
||||
@@ -1152,7 +1152,7 @@ void func_80B5E1D8(GlobalContext* globalCtx, EnOtUnkStruct* arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(arg1->unk_0C.x, arg1->unk_0C.y, arg1->unk_0C.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
Matrix_Scale(arg1->unk_04, arg1->unk_04, arg1->unk_04, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gameplay_keep_Tex_05E6F0));
|
||||
|
||||
@@ -241,7 +241,8 @@ void func_80BD8758(EnPamera* this, GlobalContext* globalCtx) {
|
||||
if (this->hideInisdeTimer++ > 1800) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->cutscenes[0]) && (this->cutscenes[0] != -1)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->cutscenes[0], &this->actor);
|
||||
func_800E02AC(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->cutscenes[0])), &this->actor);
|
||||
Camera_SetToTrackActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->cutscenes[0])),
|
||||
&this->actor);
|
||||
this->actor.speedXZ = 1.5f;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1);
|
||||
this->actor.shape.rot.y = this->actor.home.rot.y;
|
||||
@@ -427,7 +428,8 @@ void func_80BD90AC(EnPamera* this, GlobalContext* globalCtx) {
|
||||
(Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 200.0f)))) {
|
||||
if ((ActorCutscene_GetCanPlayNext(this->cutscenes[1])) && ((this->cutscenes[1] != -1))) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->cutscenes[1], &this->actor);
|
||||
func_800E02AC(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->cutscenes[1])), &this->actor);
|
||||
Camera_SetToTrackActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(this->cutscenes[1])),
|
||||
&this->actor);
|
||||
EnPamera_LookDownWell(this);
|
||||
} else if (this->cutscenes[1] != -1) {
|
||||
ActorCutscene_SetIntentToPlay(this->cutscenes[1]);
|
||||
|
||||
@@ -325,24 +325,24 @@ s32 func_8086A2CC(EnPametfrog* this, CollisionPoly* floorPoly) {
|
||||
}
|
||||
|
||||
void EnPametfrog_ShakeCamera(EnPametfrog* this, GlobalContext* globalCtx, f32 magShakeXZ, f32 magShakeY) {
|
||||
Camera* camera = Play_GetCamera(globalCtx, this->camId);
|
||||
s16 y;
|
||||
Vec3f eye;
|
||||
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
s16 subCamYaw;
|
||||
Vec3f subCamEye;
|
||||
|
||||
y = BINANG_ROT180(func_800DFCDC(camera));
|
||||
eye.x = (Math_SinS(y) * magShakeXZ) + camera->at.x;
|
||||
eye.y = camera->at.y + magShakeY;
|
||||
eye.z = (Math_CosS(y) * magShakeXZ) + camera->at.z;
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &camera->at, &eye);
|
||||
subCamYaw = BINANG_ROT180(Camera_GetCamDirYaw(subCam));
|
||||
subCamEye.x = (Math_SinS(subCamYaw) * magShakeXZ) + subCam->at.x;
|
||||
subCamEye.y = subCam->at.y + magShakeY;
|
||||
subCamEye.z = (Math_CosS(subCamYaw) * magShakeXZ) + subCam->at.z;
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &subCam->at, &subCamEye);
|
||||
}
|
||||
|
||||
void EnPametfrog_StopCutscene(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
Camera* camera;
|
||||
Camera* subCam;
|
||||
|
||||
if (this->camId != 0) {
|
||||
camera = Play_GetCamera(globalCtx, this->camId);
|
||||
Play_CameraSetAtEye(globalCtx, 0, &camera->at, &camera->eye);
|
||||
this->camId = 0;
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
subCam = Play_GetCamera(globalCtx, this->subCamId);
|
||||
Play_CameraSetAtEye(globalCtx, CAM_ID_MAIN, &subCam->at, &subCam->eye);
|
||||
this->subCamId = CAM_ID_MAIN;
|
||||
ActorCutscene_Stop(this->cutscene);
|
||||
func_800B724C(globalCtx, &this->actor, 6);
|
||||
}
|
||||
@@ -494,7 +494,7 @@ void EnPametfrog_RearOnSnapperRise(EnPametfrog* this, GlobalContext* globalCtx)
|
||||
}
|
||||
|
||||
void EnPametfrog_SetupFallOffSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
Vec3f eye;
|
||||
Vec3f subCamEye;
|
||||
s16 yaw;
|
||||
|
||||
Animation_PlayOnce(&this->skelAnime, &gGekkoFallInAirAnim);
|
||||
@@ -507,10 +507,10 @@ void EnPametfrog_SetupFallOffSnapper(EnPametfrog* this, GlobalContext* globalCtx
|
||||
this->timer = 30;
|
||||
this->collider.base.ocFlags1 |= OC1_ON;
|
||||
yaw = Actor_YawToPoint(&this->actor, &this->actor.home.pos);
|
||||
eye.x = (Math_SinS(yaw) * 300.0f) + this->actor.focus.pos.x;
|
||||
eye.y = this->actor.focus.pos.y + 100.0f;
|
||||
eye.z = (Math_CosS(yaw) * 300.0f) + this->actor.focus.pos.z;
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &eye);
|
||||
subCamEye.x = (Math_SinS(yaw) * 300.0f) + this->actor.focus.pos.x;
|
||||
subCamEye.y = this->actor.focus.pos.y + 100.0f;
|
||||
subCamEye.z = (Math_CosS(yaw) * 300.0f) + this->actor.focus.pos.z;
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.focus.pos, &subCamEye);
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_FROG_DAMAGE);
|
||||
this->actionFunc = EnPametfrog_FallOffSnapper;
|
||||
}
|
||||
@@ -806,7 +806,7 @@ void EnPametfrog_LandOnSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
|
||||
void EnPametfrog_SetupFallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
s16 yaw;
|
||||
Vec3f eye;
|
||||
Vec3f subCamEye;
|
||||
f32 xzDist;
|
||||
|
||||
Animation_PlayOnce(&this->skelAnime, &gGekkoFallInAirAnim);
|
||||
@@ -828,7 +828,7 @@ void EnPametfrog_SetupFallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
yaw = Actor_YawToPoint(&this->actor, &this->actor.home.pos);
|
||||
this->actor.world.pos.x += 30.0f * Math_SinS(yaw);
|
||||
this->actor.world.pos.z += 30.0f * Math_CosS(yaw);
|
||||
if (this->camId != 0) {
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
xzDist = sqrtf(SQXZ(this->unk_2DC));
|
||||
if (xzDist > 0.001f) {
|
||||
xzDist = 200.0f / xzDist;
|
||||
@@ -838,10 +838,10 @@ void EnPametfrog_SetupFallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
this->unk_2DC.z = 0.0f;
|
||||
}
|
||||
|
||||
eye.x = this->actor.world.pos.x + (xzDist * this->unk_2DC.x);
|
||||
eye.y = (this->actor.world.pos.y + this->actor.home.pos.y) * 0.5f;
|
||||
eye.z = this->actor.world.pos.z + (xzDist * this->unk_2DC.z);
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.world.pos, &eye);
|
||||
subCamEye.x = this->actor.world.pos.x + (xzDist * this->unk_2DC.x);
|
||||
subCamEye.y = (this->actor.world.pos.y + this->actor.home.pos.y) * 0.5f;
|
||||
subCamEye.z = this->actor.world.pos.z + (xzDist * this->unk_2DC.z);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.world.pos, &subCamEye);
|
||||
}
|
||||
|
||||
this->actionFunc = EnPametfrog_FallInAir;
|
||||
@@ -858,9 +858,9 @@ void EnPametfrog_FallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else {
|
||||
this->spinYaw += 0xF00;
|
||||
if (this->camId != 0) {
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.world.pos,
|
||||
&Play_GetCamera(globalCtx, this->camId)->eye);
|
||||
if (this->subCamId != CAM_ID_MAIN) {
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.world.pos,
|
||||
&Play_GetCamera(globalCtx, this->subCamId)->eye);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
@@ -900,15 +900,15 @@ void EnPametfrog_FallOnGround(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnPametfrog_SetupDefeatGekko(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
Vec3f eye;
|
||||
Vec3f subCamEye;
|
||||
s16 yaw = Actor_YawToPoint(this->actor.child, &this->actor.home.pos);
|
||||
s16 yawDiff = this->actor.yawTowardsPlayer - yaw;
|
||||
|
||||
yaw = yawDiff > 0 ? yaw - 0x2000 : yaw + 0x2000;
|
||||
eye.x = this->actor.child->focus.pos.x + 150.0f * Math_SinS(yaw);
|
||||
eye.y = this->actor.child->focus.pos.y + 20.0f;
|
||||
eye.z = this->actor.child->focus.pos.z + 150.0f * Math_CosS(yaw);
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.child->focus.pos, &eye);
|
||||
subCamEye.x = this->actor.child->focus.pos.x + 150.0f * Math_SinS(yaw);
|
||||
subCamEye.y = this->actor.child->focus.pos.y + 20.0f;
|
||||
subCamEye.z = this->actor.child->focus.pos.z + 150.0f * Math_CosS(yaw);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.child->focus.pos, &subCamEye);
|
||||
this->actor.params = GEKKO_DEFEAT;
|
||||
this->timer = 38;
|
||||
this->actionFunc = EnPametfrog_DefeatGekko;
|
||||
@@ -925,15 +925,15 @@ void EnPametfrog_DefeatGekko(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnPametfrog_SetupDefeatSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
Vec3f eye;
|
||||
Vec3f subCamEye;
|
||||
s16 yaw = Actor_YawToPoint(&this->actor, &this->actor.home.pos);
|
||||
s16 yawDiff = this->actor.yawTowardsPlayer - yaw;
|
||||
|
||||
yaw = yawDiff > 0 ? yaw - 0x2000 : yaw + 0x2000;
|
||||
eye.x = this->actor.world.pos.x + Math_SinS(yaw) * 150.0f;
|
||||
eye.y = this->actor.world.pos.y + 20.0f;
|
||||
eye.z = this->actor.world.pos.z + Math_CosS(yaw) * 150.0f;
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.world.pos, &eye);
|
||||
subCamEye.x = this->actor.world.pos.x + Math_SinS(yaw) * 150.0f;
|
||||
subCamEye.y = this->actor.world.pos.y + 20.0f;
|
||||
subCamEye.z = this->actor.world.pos.z + Math_CosS(yaw) * 150.0f;
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &this->actor.world.pos, &subCamEye);
|
||||
this->timer = 20;
|
||||
this->actionFunc = EnPametfrog_DefeatSnapper;
|
||||
}
|
||||
@@ -952,7 +952,7 @@ void EnPametfrog_SetupSpawnFrog(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
static Vec3f sAccel = { 0.0f, -0.5f, 0.0f };
|
||||
static Color_RGBA8 primColor = { 250, 250, 250, 255 };
|
||||
static Color_RGBA8 envColor = { 180, 180, 180, 255 };
|
||||
s16 yaw = BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)));
|
||||
s16 yaw = BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)));
|
||||
Vec3f vec1;
|
||||
Vec3f vel;
|
||||
s32 i;
|
||||
@@ -1007,7 +1007,7 @@ void EnPametfrog_SetupCutscene(EnPametfrog* this) {
|
||||
void EnPametfrog_PlayCutscene(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
|
||||
ActorCutscene_Start(this->cutscene, &this->actor);
|
||||
this->camId = ActorCutscene_GetCurrentCamera(this->cutscene);
|
||||
this->subCamId = ActorCutscene_GetCurrentCamera(this->cutscene);
|
||||
func_800B724C(globalCtx, &this->actor, 7);
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
if (this->actor.params == GEKKO_PRE_SNAPPER) {
|
||||
@@ -1166,8 +1166,8 @@ void EnPametfrog_Stun(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnPametfrog_SetupCallSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
Vec3f eye;
|
||||
Vec3f at;
|
||||
Vec3f subCamEye;
|
||||
Vec3f subCamAt;
|
||||
s16 yawDiff;
|
||||
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoCallAnim, 3.0f);
|
||||
@@ -1183,15 +1183,15 @@ void EnPametfrog_SetupCallSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
at.x = this->actor.world.pos.x;
|
||||
at.z = this->actor.world.pos.z;
|
||||
at.y = this->actor.world.pos.y + 45.0f;
|
||||
eye.x = (Math_SinS(this->actor.shape.rot.y) * 90.0f) + at.x;
|
||||
eye.z = (Math_CosS(this->actor.shape.rot.y) * 90.0f) + at.z;
|
||||
eye.y = at.y + 4.0f;
|
||||
subCamAt.x = this->actor.world.pos.x;
|
||||
subCamAt.z = this->actor.world.pos.z;
|
||||
subCamAt.y = this->actor.world.pos.y + 45.0f;
|
||||
subCamEye.x = (Math_SinS(this->actor.shape.rot.y) * 90.0f) + subCamAt.x;
|
||||
subCamEye.z = (Math_CosS(this->actor.shape.rot.y) * 90.0f) + subCamAt.z;
|
||||
subCamEye.y = subCamAt.y + 4.0f;
|
||||
|
||||
// Zooms in on Gekko
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &at, &eye);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &subCamAt, &subCamEye);
|
||||
this->timer = 0;
|
||||
this->actor.hintId = 0x5F;
|
||||
this->actionFunc = EnPametfrog_CallSnapper;
|
||||
@@ -1204,26 +1204,26 @@ void EnPametfrog_CallSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnPametfrog_SetupSnapperSpawn(EnPametfrog* this, GlobalContext* globalCtx) {
|
||||
Vec3f at;
|
||||
Vec3f eye;
|
||||
Vec3f subCamAt;
|
||||
Vec3f subCamEye;
|
||||
s16 yaw;
|
||||
|
||||
EnPametfrog_PlaceSnapper(this, globalCtx);
|
||||
at.x = this->actor.child->world.pos.x;
|
||||
at.z = this->actor.child->world.pos.z;
|
||||
at.y = this->actor.child->floorHeight + 50.0f;
|
||||
subCamAt.x = this->actor.child->world.pos.x;
|
||||
subCamAt.z = this->actor.child->world.pos.z;
|
||||
subCamAt.y = this->actor.child->floorHeight + 50.0f;
|
||||
if ((s16)(Actor_YawToPoint(&this->actor, &this->actor.home.pos) - this->actor.shape.rot.y) > 0) {
|
||||
yaw = this->actor.child->shape.rot.y - 0x1000;
|
||||
} else {
|
||||
yaw = this->actor.child->shape.rot.y + 0x1000;
|
||||
}
|
||||
|
||||
eye.x = (Math_SinS(yaw) * 500.0f) + at.x;
|
||||
eye.y = at.y + 55.0f;
|
||||
eye.z = (Math_CosS(yaw) * 500.0f) + at.z;
|
||||
subCamEye.x = (Math_SinS(yaw) * 500.0f) + subCamAt.x;
|
||||
subCamEye.y = subCamAt.y + 55.0f;
|
||||
subCamEye.z = (Math_CosS(yaw) * 500.0f) + subCamAt.z;
|
||||
|
||||
// Zooms in on Snapper spawn point
|
||||
Play_CameraSetAtEye(globalCtx, this->camId, &at, &eye);
|
||||
Play_CameraSetAtEye(globalCtx, this->subCamId, &subCamAt, &subCamEye);
|
||||
this->quake = Quake_Add(GET_ACTIVE_CAM(globalCtx), 6);
|
||||
Quake_SetSpeed(this->quake, 18000);
|
||||
Quake_SetQuakeValues(this->quake, 2, 0, 0, 0);
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef struct EnPametfrog {
|
||||
/* 0x2B4 */ s16 quake;
|
||||
/* 0x2B6 */ s16 timer;
|
||||
/* 0x2B8 */ s16 spinYaw;
|
||||
/* 0x2BA */ s16 camId;
|
||||
/* 0x2BA */ s16 subCamId;
|
||||
/* 0x2BC */ s16 freezeTimer;
|
||||
/* 0x2C0 */ f32 wallRotation;
|
||||
/* 0x2C4 */ f32 unk_2C4;
|
||||
|
||||
@@ -537,7 +537,8 @@ s32 func_80AF81E8(EnPm* this, GlobalContext* globalCtx) {
|
||||
case 4:
|
||||
case 6:
|
||||
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)),
|
||||
this->actor.child);
|
||||
}
|
||||
this->unk_378++;
|
||||
ret = true;
|
||||
@@ -549,7 +550,7 @@ s32 func_80AF81E8(EnPm* this, GlobalContext* globalCtx) {
|
||||
if ((gSaveContext.weekEventReg[86] & 8) && (this->unk_378 == 3)) {
|
||||
ActorCutscene_Stop(sp2A);
|
||||
} else {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
}
|
||||
this->unk_378++;
|
||||
ret = true;
|
||||
@@ -579,7 +580,7 @@ s32 func_80AF8348(EnPm* this, GlobalContext* globalCtx) {
|
||||
case 4:
|
||||
case 6:
|
||||
case 8:
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
|
||||
this->unk_378++;
|
||||
ret = true;
|
||||
break;
|
||||
@@ -589,7 +590,8 @@ s32 func_80AF8348(EnPm* this, GlobalContext* globalCtx) {
|
||||
case 5:
|
||||
case 7:
|
||||
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
|
||||
func_800E0308(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
|
||||
Camera_SetTargetActor(Play_GetCamera(globalCtx, ActorCutscene_GetCurrentCamera(sp2A)),
|
||||
this->actor.child);
|
||||
}
|
||||
this->unk_378++;
|
||||
ret = true;
|
||||
|
||||
@@ -1164,7 +1164,7 @@ void EnPoSisters_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, temp_s7->r, temp_s7->g, temp_s7->b, phi_s5);
|
||||
|
||||
Matrix_InsertTranslation(this->unk_22C[i].x, this->unk_22C[i].y, this->unk_22C[i].z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(0, BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx))), 0, MTXMODE_APPLY);
|
||||
Matrix_InsertRotation(0, BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), 0, MTXMODE_APPLY);
|
||||
|
||||
if (this->actionFunc == func_80B1BA90) {
|
||||
f32 phi_f0;
|
||||
|
||||
@@ -404,7 +404,7 @@ void func_80B2D300(EnPoh* this, GlobalContext* globalCtx) {
|
||||
|
||||
this->unk_18E++;
|
||||
if (this->unk_18E < 8) {
|
||||
sp38 = func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) + 0x4800;
|
||||
sp38 = Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x4800;
|
||||
if (this->unk_18E < 5) {
|
||||
sp3A = (this->unk_18E * 0x1000) - 0x4000;
|
||||
sp44.y = (Math_SinS(sp3A) * 23.0f) + (this->actor.world.pos.y + 40.0f);
|
||||
@@ -1006,7 +1006,8 @@ void func_80B2F37C(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 170, 255, this->unk_197);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->unk_194, this->unk_195, this->unk_196, 255);
|
||||
|
||||
Matrix_InsertYRotation_f((func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f((Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 32768),
|
||||
MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_po_DL_003850);
|
||||
|
||||
@@ -939,7 +939,7 @@ s32 func_80A87B48(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
case 1:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
sp3E = BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)));
|
||||
sp3E = BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)));
|
||||
Math_Vec3f_Copy(&sp4C, &gZeroVec3f);
|
||||
sp4C.z = 40.0f;
|
||||
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, sp3E, &sp4C, &sp40);
|
||||
|
||||
@@ -296,7 +296,7 @@ void EnWaterEffect_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Matrix_InsertTranslation(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW);
|
||||
|
||||
if (ptr->unk_00 == 1) {
|
||||
Matrix_RotateY(func_800DFC68(GET_ACTIVE_CAM(globalCtx)), MTXMODE_APPLY);
|
||||
Matrix_RotateY(Camera_GetInputDirYaw(GET_ACTIVE_CAM(globalCtx)), MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
}
|
||||
@@ -535,7 +535,7 @@ void func_80A5A184(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (ptr->unk_2A >= 2) {
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
} else {
|
||||
Matrix_RotateY(func_800DFC68(GET_ACTIVE_CAM(globalCtx)), MTXMODE_APPLY);
|
||||
Matrix_RotateY(Camera_GetInputDirYaw(GET_ACTIVE_CAM(globalCtx)), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_Scale(ptr->unk_2C.x, ptr->unk_2C.y, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
@@ -268,7 +268,7 @@ void ObjAqua_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjAqua* this = THIS;
|
||||
s32 framesTemp;
|
||||
s32 pad;
|
||||
s16 yaw = func_800DFCDC(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
s16 yaw = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
s32 actionFuncTemp = this->actionFunc == func_80ACBDFC;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -35,7 +35,7 @@ void ObjFunen_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY((s16)(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) - 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - 0x8000), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ void ObjKinoko_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
thisx->scale.y = thisx->scale.x;
|
||||
thisx->scale.z = thisx->scale.x;
|
||||
thisx->shape.rot.y = func_800DFCDC(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
thisx->shape.rot.y = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,8 @@ void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
Matrix_InsertTranslation(0.0f, OBJ_SYOKUDAI_FLAME_HEIGHT, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)) - thisx->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - thisx->shape.rot.y),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(flameScale, flameScale, flameScale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL);
|
||||
|
||||
@@ -222,7 +222,7 @@ void func_808DC454(ObjectKankyo* this, GlobalContext* globalCtx) {
|
||||
this->unk_14C[i].unk_08 = globalCtx->view.eye.z + (spC8 * 120.0f);
|
||||
this->unk_14C[i].unk_0C = (Rand_ZeroOne() - 0.5f) * (2.0f * temp_120);
|
||||
|
||||
temp_f22 = (func_800DFCB4(GET_ACTIVE_CAM(globalCtx)) * 0.004f) + 60.0f;
|
||||
temp_f22 = (Camera_GetCamDirPitch(GET_ACTIVE_CAM(globalCtx)) * 0.004f) + 60.0f;
|
||||
if (temp_f22 < 20.0f) {
|
||||
temp_f22 = 20.0f;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ void func_808DC454(ObjectKankyo* this, GlobalContext* globalCtx) {
|
||||
this->unk_14C[i].unk_10 -=
|
||||
this->unk_14C[i].unk_18 - (spC0 * 3.0f * (globalCtx->envCtx.windSpeed / 100.0f));
|
||||
|
||||
temp_f22 = (-func_800DFCB4(GET_ACTIVE_CAM(globalCtx)) * 0.012f) + 40.0f;
|
||||
temp_f22 = (-Camera_GetCamDirPitch(GET_ACTIVE_CAM(globalCtx)) * 0.012f) + 40.0f;
|
||||
if (temp_f22 < -40.0f) {
|
||||
temp_f22 = -40.0f;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ void func_808DD3C8(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
f32 temp_f2;
|
||||
f32 tempf;
|
||||
|
||||
if ((globalCtx->cameraPtrs[MAIN_CAM]->flags2 & 0x100) || ((u8)globalCtx->envCtx.unk_E2 == 0)) {
|
||||
if ((globalCtx->cameraPtrs[CAM_ID_MAIN]->flags2 & 0x100) || ((u8)globalCtx->envCtx.unk_E2 == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ void func_808DD970(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (globalCtx->sceneNum == SCENE_KYOJINNOMA) {
|
||||
phi_f26 = 1.0f;
|
||||
} else {
|
||||
tempA = func_800E031C(GET_ACTIVE_CAM(globalCtx));
|
||||
tempA = Camera_GetWaterYPos(GET_ACTIVE_CAM(globalCtx));
|
||||
if (tempA != BGCHECK_Y_MIN) {
|
||||
tempA -= globalCtx->view.eye.y;
|
||||
phi_f26 = tempA / 4000.0f;
|
||||
@@ -602,7 +602,7 @@ void func_808DD970(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
phi_f26 = CLAMP_MAX(phi_f26, 1.0f);
|
||||
|
||||
if (!(globalCtx->cameraPtrs[MAIN_CAM]->flags2 & 0x100) || (phi_f26 == 0.0f)) {
|
||||
if (!(globalCtx->cameraPtrs[CAM_ID_MAIN]->flags2 & 0x100) || (phi_f26 == 0.0f)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user