Decompile and Document Camera z_play functions (#933)

* Document z_play camera functions

* cleanup function names

* PR Suggestion

* Fix master merge, add comments

* fix merge

* small fix

Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
engineer124
2022-08-09 20:01:55 -04:00
committed by GitHub
co-authored by angie
parent b716e76d3e
commit a80637fd59
36 changed files with 432 additions and 240 deletions
+18 -18
View File
@@ -690,7 +690,7 @@ s32 func_800B874C(Actor* actor, PlayState* play, f32 xzRange, f32 yRange);
s32 func_800B8804(Actor* actor, PlayState* play, f32 xzRange);
s32 func_800B886C(Actor* actor, PlayState* play);
void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y);
s32 func_800B8934(PlayState* play, Actor* actor);
s32 Actor_OnScreen(PlayState* play, Actor* actor);
s32 Actor_HasParent(Actor* actor, PlayState* play);
s32 Actor_PickUp(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, s32 getItemId);
@@ -1105,8 +1105,8 @@ Camera* Camera_Alloc(View* view, CollisionContext* bg, PlayState* play);
void Camera_Free(Camera* camera);
void Camera_Init(Camera* camera, View* view, CollisionContext* bg, PlayState* play);
// void func_800DDFE0(void);
void func_800DE0EC(Camera* camera, Actor* actor);
// s32 func_800DE308(Camera* camera, UNK_TYPE2 uParm2);
void Camera_InitPlayerSettings(Camera* camera, Player* player);
s32 Camera_ChangeStatus(Camera* camera, s16 status);
// void func_800DE324(void);
// void func_800DE62C(void);
// void func_800DE840(void);
@@ -1127,7 +1127,7 @@ void Camera_GetCamDir(Vec3s* dst, Camera* camera);
s16 Camera_GetCamDirPitch(Camera* camera);
s16 Camera_GetCamDirYaw(Camera* camera);
void Camera_AddQuake(Camera* camera, s32 arg1, s16 y, s32 countdown);
void func_800DFD78(Camera* camera, s32 paramFlag, void* value);
s32 Camera_SetViewParam(Camera* camera, s32 viewFlag, void* param);
// UNK_TYPE4 func_800DFEF0(s32 param_1, u16 param_2);
// UNK_TYPE4 func_800DFF18(Camera* iParm1, UNK_TYPE2 uParm2);
// UNK_TYPE4 func_800DFF34(s32 param_1);
@@ -1135,7 +1135,7 @@ void func_800DFD78(Camera* camera, s32 paramFlag, void* value);
s16 Camera_SetFlags(Camera* iParm1, s16 flags);
s16 Camera_ClearFlags(Camera* camera, s16 flags);
s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 bgCamDataId, f32 arg3, s16 timer1, s16 timer2, s16 timer3);
// UNK_TYPE4 func_800E007C(Camera* param_1, Camera* param_2);
s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
// UNK_TYPE4 func_800E01AC(void);
Vec3f* Camera_GetQuakeOffset(Vec3f* dst, Camera* camera);
// void func_800E01DC(s32 param_1, u32 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
@@ -2574,18 +2574,18 @@ void func_80165690(void);
// void func_80165EC0(void);
// void func_80166060(void);
Gfx* func_801660B8(PlayState* play, Gfx* gfx);
void Play_Fini(GameState* thisx);
void Play_Destroy(GameState* thisx);
// void func_801663C4(void);
// void func_80166644(void);
// void func_801668B4(void);
void func_80166968(PlayState* play, Camera* camera);
void func_80166B30(PlayState* play);
void func_80167814(PlayState* play);
void Play_Update(PlayState* play);
void func_80167DE4(PlayState* play);
// void func_80167F0C(void);
void Play_Draw(PlayState* play);
void func_80168DAC(PlayState* play);
void Play_Update(PlayState* play);
void Play_Main(PlayState* play);
s32 Play_InCsMode(PlayState* play);
f32 func_80169100(PlayState* play, MtxF* mtx, CollisionPoly** arg2, s32* arg3, Vec3f* feetPosPtr);
// void func_801691F0(void);
@@ -2593,19 +2593,19 @@ void* Play_LoadScene(PlayState* play, RomFile* entry);
void func_8016927C(PlayState* play, s16 sParm2);
// void func_801692C4(PlayState* play, UNK_TYPE1 uParm2);
// void Play_SceneInit(PlayState* play, s32 sceneIndex, UNK_TYPE1 param_3);
UNK_RET func_80169474(PlayState* play, Vec3f* v1, Vec3f* v2);
s32 Play_CreateSubCamera(PlayState* play);
s32 Play_GetActiveCamId(PlayState* play);
void Play_CameraChangeStatus(PlayState* play, s16 camId, s16 status);
void Play_GetScreenPos(PlayState* play, Vec3f* worldPos, Vec3f* screenPos);
s16 Play_CreateSubCamera(PlayState* play);
s16 Play_GetActiveCamId(PlayState* play);
s32 Play_ChangeCameraStatus(PlayState* play, s16 camId, s16 status);
void Play_ClearCamera(PlayState* play, s16 camId);
Camera* Play_GetCamera(PlayState* play, s16 camId);
s32 Play_CameraSetAtEye(PlayState* play, s16 camId, Vec3f* at, Vec3f* eye);
void Play_CameraSetAtEyeUp(PlayState* play, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up);
void Play_CameraSetFov(PlayState* play, s16 camId, f32 fov);
void Play_CameraSetRoll(PlayState* play, s16 camId, s16 roll);
s32 Play_SetCameraAtEye(PlayState* play, s16 camId, Vec3f* at, Vec3f* eye);
s32 Play_SetCameraAtEyeUp(PlayState* play, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up);
s32 Play_SetCameraFov(PlayState* play, s16 camId, f32 fov);
s32 Play_SetCameraRoll(PlayState* play, s16 camId, s16 roll);
void Play_CopyCamera(PlayState* play, s16 dstCamId, s16 srcCamId);
// void func_80169A50(void);
void Play_CameraChangeSetting(PlayState* play, s16 camId, s16 setting);
s32 func_80169A50(PlayState* play, s16 camId, Player* player, s16 setting);
s32 Play_ChangeCameraSetting(PlayState* play, s16 camId, s16 setting);
void func_80169AFC(PlayState* play, s16 camId, s16 arg2);
u16 Play_GetActorCsCamSetting(PlayState* play, s32 csCamDataIndex);
Vec3s* Play_GetActorCsCamFuncData(PlayState* play, s32 csCamDataIndex);
+17 -19
View File
@@ -393,11 +393,7 @@ void func_800B4B50(Actor* actor, Lights* mapper, PlayState* play) {
void Actor_GetProjectedPos(PlayState* play, Vec3f* worldPos, Vec3f* projectedPos, f32* invW) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, worldPos, projectedPos, invW);
if (*invW < 1.0f) {
*invW = 1.0f;
} else {
*invW = 1.0f / *invW;
}
*invW = (*invW < 1.0f) ? 1.0f : (1.0f / *invW);
}
void Target_SetPos(TargetContext* targetCtx, s32 index, f32 x, f32 y, f32 z) {
@@ -507,11 +503,11 @@ void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play) {
Actor_GetProjectedPos(play, &targetCtx->targetCenterPos, &projectedPos, &invW);
projectedPos.x = (160 * (projectedPos.x * invW)) * var1;
projectedPos.x = CLAMP(projectedPos.x, -320.0f, 320.0f);
projectedPos.x = ((SCREEN_WIDTH / 2) * (projectedPos.x * invW)) * var1;
projectedPos.x = CLAMP(projectedPos.x, -SCREEN_WIDTH, SCREEN_WIDTH);
projectedPos.y = (120 * (projectedPos.y * invW)) * var1;
projectedPos.y = CLAMP(projectedPos.y, -240.0f, 240.0f);
projectedPos.y = ((SCREEN_HEIGHT / 2) * (projectedPos.y * invW)) * var1;
projectedPos.y = CLAMP(projectedPos.y, -SCREEN_HEIGHT, SCREEN_HEIGHT);
projectedPos.z = projectedPos.z * var1;
@@ -588,8 +584,8 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
PlayState* play = (PlayState*)gameState;
Actor* sp68 = NULL;
s32 category;
Vec3f sp58;
f32 sp54;
Vec3f projectedPos;
f32 invW;
if ((player->unk_730 != 0) && (player->unk_AE3[player->unk_ADE] == 2)) {
targetCtx->unk_94 = NULL;
@@ -641,8 +637,9 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
}
if (actor != NULL && targetCtx->unk4B == 0) {
Actor_GetProjectedPos(play, &actor->focus.pos, &sp58, &sp54);
if ((sp58.z <= 0.0f) || (fabsf(sp58.x * sp54) >= 1.0f) || (fabsf(sp58.y * sp54) >= 1.0f)) {
Actor_GetProjectedPos(play, &actor->focus.pos, &projectedPos, &invW);
if ((projectedPos.z <= 0.0f) || (fabsf(projectedPos.x * invW) >= 1.0f) ||
(fabsf(projectedPos.y * invW) >= 1.0f)) {
actor = NULL;
}
}
@@ -1963,14 +1960,15 @@ s32 func_800B886C(Actor* actor, PlayState* play) {
void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y) {
Vec3f projectedPos;
f32 w;
f32 invW;
Actor_GetProjectedPos(play, &actor->focus.pos, &projectedPos, &w);
*x = PROJECTED_TO_SCREEN_X(projectedPos, w);
*y = PROJECTED_TO_SCREEN_Y(projectedPos, w);
Actor_GetProjectedPos(play, &actor->focus.pos, &projectedPos, &invW);
*x = PROJECTED_TO_SCREEN_X(projectedPos, invW);
*y = PROJECTED_TO_SCREEN_Y(projectedPos, invW);
}
s32 func_800B8934(PlayState* play, Actor* actor) {
s32 Actor_OnScreen(PlayState* play, Actor* actor) {
Vec3f projectedPos;
f32 invW;
s32 pad[2];
@@ -4058,7 +4056,7 @@ s32 func_800BD2B4(PlayState* play, Actor* actor, s16* arg2, f32 arg3, u16 (*text
} else if (*arg2) {
*arg2 = arg5(play, actor);
return false;
} else if (!func_800B8934(play, actor)) {
} else if (!Actor_OnScreen(play, actor)) {
return false;
} else if (!func_800B8614(actor, play, arg3)) {
return false;
+4 -4
View File
@@ -372,9 +372,9 @@ s32 Camera_GetWaterBoxBgCamSetting(Camera* camera, f32* waterY) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DE0E0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DE0EC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_InitPlayerSettings.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DE308.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_ChangeStatus.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DE324.s")
@@ -416,7 +416,7 @@ s32 Camera_GetWaterBoxBgCamSetting(Camera* camera, f32* waterY) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_AddQuake.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFD78.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_SetViewParam.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DFEF0.s")
@@ -432,7 +432,7 @@ s32 Camera_GetWaterBoxBgCamSetting(Camera* camera, f32* waterY) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_ChangeDoorCam.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E007C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_Copy.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E01AC.s")
+1 -1
View File
@@ -17,7 +17,7 @@ GameStateOverlay gGameStateOverlayTable[] = {
GAMESTATE_OVERLAY_INTERNAL(TitleSetup_Init, TitleSetup_Destroy, sizeof(GameState)),
GAMESTATE_OVERLAY(select, MapSelect_Init, MapSelect_Destroy, sizeof(MapSelectState)),
GAMESTATE_OVERLAY(title, Title_Init, Title_Destroy, sizeof(TitleContext)),
GAMESTATE_OVERLAY_INTERNAL(Play_Init, Play_Fini, sizeof(PlayState)),
GAMESTATE_OVERLAY_INTERNAL(Play_Init, Play_Destroy, sizeof(PlayState)),
GAMESTATE_OVERLAY(opening, Opening_Init, Opening_Destroy, sizeof(OpeningContext)),
GAMESTATE_OVERLAY(file_choose, FileChoose_Init, FileChoose_Destroy, sizeof(FileChooseContext)),
GAMESTATE_OVERLAY(daytelop, Daytelop_Init, Daytelop_Destroy, sizeof(DaytelopContext)),
+9 -9
View File
@@ -379,22 +379,22 @@ void Lights_GlowCheck(PlayState* play) {
LightPoint* params = &light->info->params.point;
if (light->info->type == LIGHT_POINT_GLOW) {
Vec3f pos;
Vec3f worldPos;
Vec3f projectedPos;
f32 invW;
pos.x = params->x;
pos.y = params->y;
pos.z = params->z;
Actor_GetProjectedPos(play, &pos, &projectedPos, &invW);
worldPos.x = params->x;
worldPos.y = params->y;
worldPos.z = params->z;
Actor_GetProjectedPos(play, &worldPos, &projectedPos, &invW);
params->drawGlow = 0;
if ((projectedPos.z > 1) && (fabsf(projectedPos.x * invW) < 1) && (fabsf(projectedPos.y * invW) < 1)) {
s32 wX = PROJECTED_TO_SCREEN_X(projectedPos, invW);
s32 wY = PROJECTED_TO_SCREEN_Y(projectedPos, invW);
s32 wZ = (s32)((projectedPos.z * invW) * 16352) + 16352;
s32 zBuf = func_80178A94(wX, wY);
s32 screenPosX = PROJECTED_TO_SCREEN_X(projectedPos, invW);
s32 screenPosY = PROJECTED_TO_SCREEN_Y(projectedPos, invW);
s32 wZ = (s32)((projectedPos.z * invW) * 16352.0f) + 16352;
s32 zBuf = func_80178A94(screenPosX, screenPosY);
if (wZ < zBuf) {
params->drawGlow = 1;
+198 -20
View File
@@ -34,7 +34,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_801660B8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Fini.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_801663C4.s")
@@ -46,7 +46,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80166B30.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80167814.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Update.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80167DE4.s")
@@ -56,7 +56,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80168DAC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Update.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Main.s")
s32 Play_InCsMode(PlayState* this) {
return (this->csCtx.state != 0) || Player_InCsMode(this);
@@ -74,39 +74,217 @@ s32 Play_InCsMode(PlayState* this) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_SceneInit.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169474.s")
void Play_GetScreenPos(PlayState* this, Vec3f* worldPos, Vec3f* screenPos) {
f32 invW;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CreateSubCamera.s")
// screenPos temporarily stores the projectedPos
Actor_GetProjectedPos(this, worldPos, screenPos, &invW);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetActiveCamId.s")
screenPos->x = (SCREEN_WIDTH / 2) + (screenPos->x * invW * (SCREEN_WIDTH / 2));
screenPos->y = (SCREEN_HEIGHT / 2) - (screenPos->y * invW * (SCREEN_HEIGHT / 2));
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraChangeStatus.s")
s16 Play_CreateSubCamera(PlayState* this) {
s16 subCamId;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_ClearCamera.s")
for (subCamId = CAM_ID_SUB_FIRST; subCamId < NUM_CAMS; subCamId++) {
if (this->cameraPtrs[subCamId] == NULL) {
break;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_ClearAllSubCameras.s")
// if no subCameras available
if (subCamId == NUM_CAMS) {
return CAM_ID_NONE;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetCamera.s")
this->cameraPtrs[subCamId] = &this->subCameras[subCamId - CAM_ID_SUB_FIRST];
Camera_Init(this->cameraPtrs[subCamId], &this->view, &this->colCtx, this);
this->cameraPtrs[subCamId]->camId = subCamId;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetAtEye.s")
return subCamId;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetAtEyeUp.s")
s16 Play_GetActiveCamId(PlayState* this) {
return this->activeCamId;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetFov.s")
s32 Play_ChangeCameraStatus(PlayState* this, s16 camId, s16 status) {
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetRoll.s")
if (status == CAM_STATUS_ACTIVE) {
this->activeCamId = camIdx;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CopyCamera.s")
return Camera_ChangeStatus(this->cameraPtrs[camIdx], status);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169A50.s")
void Play_ClearCamera(PlayState* this, s16 camId) {
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraChangeSetting.s")
if (this->cameraPtrs[camIdx] != NULL) {
Camera_ChangeStatus(this->cameraPtrs[camIdx], CAM_STATUS_INACTIVE);
this->cameraPtrs[camIdx] = NULL;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169AFC.s")
void Play_ClearAllSubCameras(PlayState* this) {
s16 subCamId;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraGetUID.s")
for (subCamId = CAM_ID_SUB_FIRST; subCamId < NUM_CAMS; subCamId++) {
if (this->cameraPtrs[subCamId] != NULL) {
Play_ClearCamera(this, subCamId);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169BF8.s")
this->activeCamId = CAM_ID_MAIN;
}
Camera* Play_GetCamera(PlayState* this, s16 camId) {
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
return this->cameraPtrs[camIdx];
}
/**
* @return bit-packed success if each of the params were applied
*/
s32 Play_SetCameraAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye) {
s32 successfullySet = 0;
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
Camera* camera = this->cameraPtrs[camIdx];
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_AT, at);
successfullySet <<= 1;
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye);
camera->dist = Math3D_Distance(at, eye);
if (camera->focalActor != NULL) {
camera->atActorOffset.x = at->x - camera->focalActor->world.pos.x;
camera->atActorOffset.y = at->y - camera->focalActor->world.pos.y;
camera->atActorOffset.z = at->z - camera->focalActor->world.pos.z;
} else {
camera->atActorOffset.x = camera->atActorOffset.y = camera->atActorOffset.z = 0.0f;
}
camera->atLerpStepScale = 0.01f;
return successfullySet;
}
/**
* @return bit-packed success if each of the params were applied
*/
s32 Play_SetCameraAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) {
s32 successfullySet = 0;
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
Camera* camera = this->cameraPtrs[camIdx];
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_AT, at);
successfullySet <<= 1;
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye);
successfullySet <<= 1;
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_UP, up);
camera->dist = Math3D_Distance(at, eye);
if (camera->focalActor != NULL) {
camera->atActorOffset.x = at->x - camera->focalActor->world.pos.x;
camera->atActorOffset.y = at->y - camera->focalActor->world.pos.y;
camera->atActorOffset.z = at->z - camera->focalActor->world.pos.z;
} else {
camera->atActorOffset.x = camera->atActorOffset.y = camera->atActorOffset.z = 0.0f;
}
camera->atLerpStepScale = 0.01f;
return successfullySet;
}
/**
* @return true if the fov was successfully set
*/
s32 Play_SetCameraFov(PlayState* this, s16 camId, f32 fov) {
s32 successfullySet = Camera_SetViewParam(this->cameraPtrs[camId], CAM_VIEW_FOV, &fov) & 1;
if (1) {}
return successfullySet;
}
s32 Play_SetCameraRoll(PlayState* this, s16 camId, s16 roll) {
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
Camera* camera = this->cameraPtrs[camIdx];
camera->roll = roll;
return 1;
}
void Play_CopyCamera(PlayState* this, s16 destCamId, s16 srcCamId) {
s16 srcCamId2 = (srcCamId == CAM_ID_NONE) ? this->activeCamId : srcCamId;
s16 destCamId1 = (destCamId == CAM_ID_NONE) ? this->activeCamId : destCamId;
Camera_Copy(this->cameraPtrs[destCamId1], this->cameraPtrs[srcCamId2]);
}
// Same as Play_ChangeCameraSetting but also calls Camera_InitPlayerSettings
s32 func_80169A50(PlayState* this, s16 camId, Player* player, s16 setting) {
Camera* camera;
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
camera = this->cameraPtrs[camIdx];
Camera_InitPlayerSettings(camera, player);
return Camera_ChangeSetting(camera, setting);
}
s32 Play_ChangeCameraSetting(PlayState* this, s16 camId, s16 setting) {
return Camera_ChangeSetting(Play_GetCamera(this, camId), setting);
}
// Related to bosses and fishing
void func_80169AFC(PlayState* this, s16 camId, s16 timer) {
s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId;
s16 i;
Play_ClearCamera(this, camIdx);
for (i = CAM_ID_SUB_FIRST; i < NUM_CAMS; i++) {
if (this->cameraPtrs[i] != NULL) {
Play_ClearCamera(this, i);
}
}
if (timer <= 0) {
Play_ChangeCameraStatus(this, CAM_ID_MAIN, CAM_STATUS_ACTIVE);
this->cameraPtrs[CAM_ID_MAIN]->childCamId = this->cameraPtrs[CAM_ID_MAIN]->doorTimer2 = 0;
}
}
s16 Play_GetCameraUID(PlayState* this, s16 camId) {
Camera* camera = this->cameraPtrs[camId];
if (camera != NULL) {
return camera->uid;
} else {
return -1;
}
}
// Unused in both MM and OoT, purpose is very unclear
s16 func_80169BF8(PlayState* this, s16 camId, s16 uid) {
Camera* camera = this->cameraPtrs[camId];
if (camera != NULL) {
return 0;
} else if (camera->uid != uid) {
return 0;
} else if (camera->status != CAM_STATUS_ACTIVE) {
return 2;
} else {
return 1;
}
}
u16 Play_GetActorCsCamSetting(PlayState* this, s32 csCamDataIndex) {
ActorCsCamInfo* actorCsCamList = &this->actorCsCamList[csCamDataIndex];
+2 -2
View File
@@ -706,8 +706,8 @@ void func_80123E90(PlayState* play, Actor* actor) {
player->unk_730 = actor;
player->unk_A78 = actor;
player->stateFlags1 |= PLAYER_STATE1_10000;
func_800DFD78(Play_GetCamera(play, CAM_ID_MAIN), 8, actor);
Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), 9);
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, actor);
Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_FOLLOWTARGET);
}
s32 func_80123F14(PlayState* play) {
+8 -8
View File
@@ -1634,8 +1634,8 @@ void func_809DD934(Boss02* this, PlayState* play) {
if (player->stateFlags1 & 0x100) {
Cutscene_Start(play, &play->csCtx);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
func_8016566C(150);
this->unk_1D14 = 0;
this->subCamAtVel = 0.0f;
@@ -2032,7 +2032,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
this->unk_1D54 = Math_SinS(this->unk_1D14 * 1512) * this->unk_1D58;
Matrix_RotateZF(this->unk_1D54, MTXMODE_APPLY);
Matrix_MultVecY(1.0f, &this->subCamUp);
Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
Play_SetCameraAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
ShrinkWindow_SetLetterboxTarget(27);
}
}
@@ -2060,8 +2060,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
}
Cutscene_Start(play, &play->csCtx);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->unk_1D20 = 2;
this->unk_1D1C = 0;
@@ -2157,8 +2157,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
if (ActorCutscene_GetCurrentIndex() == -1) {
Cutscene_Start(play, &play->csCtx);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->unk_1D20 = 101;
this->unk_1D1C = 0;
this->subCamAtVel = 1.0f;
@@ -2238,7 +2238,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
if ((this->unk_1D20 != 0) && (this->subCamId != SUB_CAM_ID_DONE)) {
subCamEye = this->subCamEye;
subCamEye.y += sp58 * D_809DF5B0;
Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &subCamEye, &this->subCamUp);
Play_SetCameraAtEyeUp(play, this->subCamId, &this->subCamAt, &subCamEye, &this->subCamUp);
this->subCamUp.z = this->subCamUp.x = 0.0f;
this->subCamUp.y = 1.0f;
ShrinkWindow_SetLetterboxTarget(27);
+10 -10
View File
@@ -1151,8 +1151,8 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 7);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->actor.world.rot.y = -0x7B30;
this->prevPlayerPos.y = 1850.0f;
@@ -1409,8 +1409,8 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
}
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_CameraSetFov(play, this->subCamId, this->subCamFov);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraFov(play, this->subCamId, this->subCamFov);
}
}
@@ -1451,8 +1451,8 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 1);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->unk_2BE = Math_FAtan2F(this->actor.world.pos.z, this->actor.world.pos.x);
// Player is above water && Player is standing on ground
@@ -1643,7 +1643,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
}
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
@@ -1665,8 +1665,8 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 1);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->csState = 1;
this->unk_2BE = 0xBB8;
@@ -1734,7 +1734,7 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
}
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
+4 -4
View File
@@ -260,8 +260,8 @@ void func_809EC568(Boss04* this, PlayState* play) {
this->unk_704 = 0;
Cutscene_Start(play, &play->csCtx);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
func_800B7298(play, &this->actor, 7);
player->actor.world.pos.x = this->unk_6E8;
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
@@ -405,8 +405,8 @@ void func_809EC568(Boss04* this, PlayState* play) {
}
Math_Vec3f_Copy(&subCamAt, &this->subCamAt);
subCamAt.y += Math_SinS(this->subCamAtOscillator * 0x4000) * this->subCamAtOscillator * 1.5f;
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &this->subCamEye);
Play_CameraSetFov(play, this->subCamId, this->subCamFov);
Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &this->subCamEye);
Play_SetCameraFov(play, this->subCamId, this->subCamFov);
Math_ApproachF(&this->subCamFov, 60.0f, 0.1f, 1.0f);
}
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
+3 -3
View File
@@ -201,8 +201,8 @@ void func_809F24C8(Boss06* this, PlayState* play) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 7);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
D_809F4970->unk_151 = 1;
this->unk_1C9 = 1;
this->unk_1C8 = 1;
@@ -340,7 +340,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
if (this->subCamId != SUB_CAM_ID_DONE) {
ShrinkWindow_SetLetterboxTarget(27);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
#else
@@ -515,11 +515,11 @@ void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, PlayState* play2) {
worldPos.y = this->effects[i].posBase.y + this->effects[i].posOffset.y;
worldPos.z = this->effects[i].posBase.z + this->effects[i].posOffset.z;
func_80169474(play, &worldPos, &screenPos); // unnamed Play_ function, func_800C016C from OoT
Play_GetScreenPos(play, &worldPos, &screenPos);
// checking if particle is on screen
if (screenPos.x >= 0.0f && screenPos.x < SCREEN_WIDTH && screenPos.y >= 0.0f &&
screenPos.y < SCREEN_HEIGHT) {
if ((screenPos.x >= 0.0f) && (screenPos.x < SCREEN_WIDTH) && (screenPos.y >= 0.0f) &&
(screenPos.y < SCREEN_HEIGHT)) {
Matrix_Translate(worldPos.x, worldPos.y, worldPos.z, MTXMODE_NEW);
scaleAlpha = this->effects[i].alpha / 50.0f;
if (scaleAlpha > 1.0f) {
@@ -604,11 +604,11 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, PlayState* play2) {
worldPos.y = this->effects[i].posBase.y + this->effects[i].posOffset.y;
worldPos.z = this->effects[i].posBase.z + this->effects[i].posOffset.z;
func_80169474(play, &worldPos, &screenPos); // unnamed Play_ function, func_800C016C from OoT
Play_GetScreenPos(play, &worldPos, &screenPos);
// checking if effect is on screen
if (screenPos.x >= 0.0f && screenPos.x < SCREEN_WIDTH && screenPos.y >= 0.0f &&
screenPos.y < SCREEN_HEIGHT) {
if ((screenPos.x >= 0.0f) && (screenPos.x < SCREEN_WIDTH) && (screenPos.y >= 0.0f) &&
(screenPos.y < SCREEN_HEIGHT)) {
Matrix_Translate(worldPos.x, worldPos.y, worldPos.z, MTXMODE_NEW);
alphaScale = this->effects[i].alpha / 50.0f;
if (alphaScale > 1.0f) {
+3 -2
View File
@@ -1152,9 +1152,10 @@ void DmStk_WaitForTelescope(DmStk* this, PlayState* play) {
Vec3f screenPos;
if (!(gSaveContext.save.weekEventReg[74] & 0x20)) {
func_80169474(play, &this->actor.world.pos, &screenPos);
Play_GetScreenPos(play, &this->actor.world.pos, &screenPos);
if (play->view.fovy < 25.0f) {
if ((screenPos.x >= 70.0f) && (screenPos.x < 250.0f) && (screenPos.y >= 30.0f) && (screenPos.y < 210.0f)) {
if ((screenPos.x >= 70.0f) && (screenPos.x < (SCREEN_WIDTH - 70.0f)) && (screenPos.y >= 30.0f) &&
(screenPos.y < (SCREEN_HEIGHT - 30.0f))) {
func_800FE484();
this->actionFunc = DmStk_StartTelescopeCutscene;
}
@@ -131,7 +131,7 @@ void EnBigokuta_SetupCutsceneCamera(EnBigokuta* this, PlayState* play, Vec3f* su
ActorCutscene_Start(this->picto.actor.cutscene, &this->picto.actor);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->picto.actor.cutscene);
Play_CameraSetAtEye(play, this->subCamId, subCamAt, subCamEye);
Play_SetCameraAtEye(play, this->subCamId, subCamAt, subCamEye);
angle = BINANG_SUB(Actor_YawToPoint(&this->picto.actor, subCamEye), this->picto.actor.home.rot.y);
if (angle > 0) {
@@ -150,7 +150,7 @@ void EnBigokuta_MoveCamera(EnBigokuta* this, PlayState* play) {
Math_Vec3f_StepTo(&subCam->eye, &this->subCamEye, 20.0f);
Math_Vec3f_StepTo(&subCam->at, &this->subCamAt, 20.0f);
Play_CameraSetAtEye(play, this->subCamId, &subCam->at, &subCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCam->eye);
}
void EnBigokuta_ResetCamera(EnBigokuta* this, PlayState* play) {
@@ -158,7 +158,7 @@ void EnBigokuta_ResetCamera(EnBigokuta* this, PlayState* play) {
if (this->subCamId != SUB_CAM_ID_DONE) {
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->picto.actor.cutscene);
}
@@ -278,7 +278,7 @@ void EnBigpo_LowerCutsceneSubCamera(EnBigpo* this, PlayState* play) {
subCam->eye.x -= 1.5f * Math_SinS(this->actor.yawTowardsPlayer);
subCam->eye.z -= 1.5f * Math_CosS(this->actor.yawTowardsPlayer);
}
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye);
}
}
@@ -338,7 +338,7 @@ void EnBigpo_SpawnCutsceneStage1(EnBigpo* this, PlayState* play) {
subCamEye.x = ((this->actor.world.pos.x - this->fires[0].pos.x) * 1.8f) + this->actor.world.pos.x;
subCamEye.y = this->actor.world.pos.y + 150.0f;
subCamEye.z = ((this->actor.world.pos.z - this->fires[0].pos.z) * 1.8f) + this->actor.world.pos.z;
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
}
this->actionFunc = EnBigpo_SpawnCutsceneStage2;
}
@@ -460,7 +460,7 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, PlayState* play) {
this->idleTimer--;
if (this->idleTimer == 0) {
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = SUB_CAM_ID_DONE;
if (this->actor.params == ENBIGPO_SUMMONED) {
dampe = SubS_FindActor(play, NULL, ACTORCAT_NPC, ACTOR_EN_TK);
@@ -957,7 +957,7 @@ void EnBigpo_SetupFlameCirclePositions(EnBigpo* this, PlayState* play) {
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;
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
}
this->actionFunc = EnBigpo_DoNothing;
@@ -795,7 +795,7 @@ void EnBigslime_UpdateCameraGrabPlayer(EnBigslime* this, PlayState* play) {
Math_StepToF(&subCamAt.y, GBT_ROOM_5_MIN_Y + 87.5f, 10.0f);
Math_StepToF(&subCamAt.z, this->actor.world.pos.z, 10.0f);
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye);
}
/**
@@ -810,7 +810,7 @@ void EnBigslime_JerkCameraPlayerHit(EnBigslime* this, PlayState* play) {
Math_Vec3f_Diff(&subCam->eye, &subCam->at, &subCamEye);
Math_Vec3f_Scale(&subCamEye, 0.9f);
Math_Vec3f_Sum(&subCamEye, &subCam->at, &subCamEye);
Play_CameraSetAtEye(play, this->subCamId, &subCam->at, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye);
}
/**
@@ -828,7 +828,7 @@ void EnBigslime_UpdateCameraIntroCs(EnBigslime* this, PlayState* play, s32 notic
subCamEye.z = Math_CosS(yawOffset) * zoom + subCam->at.z;
subCamEye.y = subCam->at.y + -4.0f + (noticeTimer * 2.0f);
Play_CameraSetAtEye(play, this->subCamId, &subCam->at, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye);
}
/**
@@ -836,7 +836,7 @@ void EnBigslime_UpdateCameraIntroCs(EnBigslime* this, PlayState* play, s32 notic
* center of the roof. This is used when the minislimes merges into bigslime.
*/
void EnBigslime_UpdateCameraFormingBigslime(EnBigslime* this, PlayState* play) {
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &Play_GetCamera(play, this->subCamId)->eye);
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &Play_GetCamera(play, this->subCamId)->eye);
}
void EnBigslime_EndCutscene(EnBigslime* this, PlayState* play) {
@@ -844,7 +844,7 @@ void EnBigslime_EndCutscene(EnBigslime* this, PlayState* play) {
if (this->subCamId != SUB_CAM_ID_DONE) {
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->cutscene);
this->cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
@@ -1495,7 +1495,7 @@ void EnBigslime_SetupCutsceneGrabPlayer(EnBigslime* this, PlayState* play) {
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
s16 yaw;
Play_CameraSetAtEye(play, this->subCamId, &mainCam->at, &mainCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &mainCam->at, &mainCam->eye);
this->grabPlayerTimer = 15;
this->wavySurfaceTimer = 0;
this->bigslimeCollider[0].base.atFlags &= ~AT_ON;
@@ -2343,7 +2343,7 @@ void EnBigslime_SetupCutsceneDefeat(EnBigslime* this, PlayState* play) {
subCamEye.x = (Math_SinS(yawOffset) * 250.0f) + subCamAt.x;
subCamEye.y = subCamAt.y + 60.0f;
subCamEye.z = (Math_CosS(yawOffset) * 250.0f) + subCamAt.z;
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye);
for (i = 0; i < MINISLIME_NUM_SPAWN; i++) {
this->minislime[i]->actor.params = MINISLIME_DEFEAT_IDLE;
@@ -2370,7 +2370,7 @@ void EnBigslime_CutsceneDefeat(EnBigslime* this, PlayState* play) {
subCamAt.x = this->actor.world.pos.x;
subCamAt.y = this->actor.world.pos.y + 40.0f;
subCamAt.z = this->actor.world.pos.z;
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCam->eye);
}
}
@@ -2410,7 +2410,7 @@ void EnBigslime_GekkoDespawn(EnBigslime* this, PlayState* play) {
Math_Vec3f_Diff(&subCam->eye, &this->subCamDistToFrog, &subCamEye);
subCamEye.y -= 1.8f;
subCamAt.y -= 1.7f;
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye);
}
}
@@ -2466,7 +2466,7 @@ void EnBigslime_FrogSpawn(EnBigslime* this, PlayState* play) {
subCamEye.x = subCam->at.x + (this->subCamDistToFrog.x * subCamZoom);
subCamEye.z = subCam->at.z + (this->subCamDistToFrog.z * subCamZoom);
subCamEye.y = subCam->at.y + (this->subCamDistToFrog.y * subCamZoom);
Play_CameraSetAtEye(play, this->subCamId, &subCam->at, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye);
if (this->spawnFrogTimer == 0) {
EnBigslime_EndCutscene(this, play);
@@ -558,8 +558,8 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
case 1:
Cutscene_Start(play, &play->csCtx);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
func_800B7298(play, &this->actor, 4);
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
this->subCamEye.x = mainCam->eye.x;
@@ -595,7 +595,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
}
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
@@ -365,7 +365,7 @@ void func_8089ABF4(EnDinofos* this, PlayState* play) {
if (this->subCamId != SUB_CAM_ID_DONE) {
Camera* subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->actor.cutscene);
if (this->actor.colChkInfo.health == 0) {
@@ -488,7 +488,7 @@ void func_8089B288(EnDinofos* this, PlayState* play) {
this->unk_290--;
Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, this->unk_2AC);
Math_Vec3f_StepTo(&subCam->at, &this->unk_2C8, this->unk_2A8);
Play_CameraSetAtEye(play, this->subCamId, &subCam->at, &subCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCam->eye);
if (this->unk_290 == 0) {
func_8089B320(this);
}
@@ -522,7 +522,7 @@ void func_8089B3D4(EnDinofos* this, PlayState* play) {
subCamAt.y = subCam->at.y;
}
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCam->eye);
if (this->actor.bgCheckFlags & 1) {
func_8089B4A4(this);
}
@@ -547,7 +547,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) {
this->unk_290++;
if (this->unk_290 < 8) {
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye);
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye);
}
if (this->skelAnime.curFrame > 35.0f) {
@@ -556,7 +556,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) {
}
Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, 10.0f);
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye);
Play_SetCameraAtEye(play, 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);
}
@@ -1215,7 +1215,7 @@ void func_8089D318(EnDinofos* this, PlayState* play) {
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(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
func_8089CFAC(this);
} else {
func_8089B100(this, play);
@@ -449,7 +449,7 @@ void EnDragon_SetSubCamEyeAt(EnDragon* this, PlayState* play, Vec3f subCamEye, V
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
Math_Vec3f_Copy(&this->subCamEye, &subCamEye);
Math_Vec3f_Copy(&this->subCamAt, &subCamAt);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
void EnDragon_SetupGrab(EnDragon* this, PlayState* play) {
@@ -823,7 +823,7 @@ void func_80B2A094(EnFish2* this, PlayState* play) {
Math_Vec3f_Copy(&this->subCamAt, &subCamEye);
}
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
if ((this->unk_350 == NULL) || (this->unk_350->update == NULL)) {
this->unk_350 = NULL;
this->unk_2B0++;
@@ -857,7 +857,7 @@ void func_80B2A23C(EnFish2* this, PlayState* play) {
Math_Vec3f_Copy(&this->subCamAt, &subCamAt);
}
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
if ((this->unk_2B4 == 0) && (D_80B2B2E4 == 3)) {
D_80B2B2E0 = D_80B2B2EC = D_80B2B2E4 = 0;

Some files were not shown because too many files have changed in this diff Show More