mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-08 01:21:52 +00:00
Document Sub-Cameras (#989)
* Copying SubCam Changes from PR 908, made it to the end of bosses * Finish copying over PR * format * More cleanup * clean-up * PR Suggestions, Clean-Up, Improvement in CS * Remove substructs from fd/fd2 * format * Improve fishing * minor fix * Make CutsceneCameraDir more general * `sActiveCamMove` -> `sCamMove` * Fix conflict with object kankyo * Add CAM_ID_MAIN to object_kankyo * Improve cam cutscenes further * Revert cutscene cmd names (better for a separate PR) * At -> LookAt in the context of Cutscenes * Missed naming in diving game * Format * Fill in Ganon2 Names (now that it's matching) * format * `sActiveCamId` -> `sReturnToCamId` * activeCamId -> returnToCamId * Discord Discussions * FIRST * Move macro to bottom, comments * More suggestions * PR suggestion, cleanup comment * Oops * add comments * Adjust comment * Change edge-case * whoops Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
92aef346f2
commit
bf56c94f0f
143 changed files with 2778 additions and 2768 deletions
|
@ -380,7 +380,7 @@ void func_80A87CEC(EnJj *this, GlobalContext *globalCtx) {
|
|||
globalCtx->csCtx.segment = &D_80A88164;
|
||||
gSaveContext.cutsceneTrigger = (u8)1U;
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, (s32) temp_v1->bgId);
|
||||
func_8005B1A4(globalCtx->cameraPtrs[globalCtx->activeCamera]);
|
||||
func_8005B1A4(globalCtx->cameraPtrs[globalCtx->activeCamId]);
|
||||
gSaveContext.unkEDA = (u16) (gSaveContext.unkEDA | 0x400);
|
||||
func_80078884((u16)0x4802U);
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ Easy things to sort out:
|
|||
|
||||
- We can remove the casts from `(u8)1U` and just leave `1`.
|
||||
|
||||
- `globalCtx->cameraPtrs[globalCtx->activeCamera]` has a macro: it is `GET_ACTIVE_CAM(globalCtx)`, so this line can be written as
|
||||
- `globalCtx->cameraPtrs[globalCtx->activeCamId]` has a macro: it is `GET_ACTIVE_CAM(globalCtx)`, so this line can be written as
|
||||
```C
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
```
|
||||
|
|
|
@ -1001,8 +1001,8 @@ VecSph* OLib_Vec3fToVecSph(VecSph* dest, Vec3f* vec);
|
|||
VecSph* OLib_Vec3fToVecSphGeo(VecSph* arg0, Vec3f* arg1);
|
||||
VecSph* OLib_Vec3fDiffToVecSphGeo(VecSph* arg0, Vec3f* a, Vec3f* b);
|
||||
Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b);
|
||||
s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 parentCamIdx);
|
||||
s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camIdx);
|
||||
s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 camId);
|
||||
s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camId);
|
||||
s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor);
|
||||
s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32 sfxId);
|
||||
void OnePointCutscene_EnableAttention(void);
|
||||
|
@ -1514,7 +1514,7 @@ s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3
|
|||
s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up);
|
||||
s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov);
|
||||
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll);
|
||||
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2);
|
||||
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 destCamId, s16 srcCamId);
|
||||
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting);
|
||||
s32 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 setting);
|
||||
void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorLists[ACTORCAT_PLAYER].head)
|
||||
|
||||
#define GET_ACTIVE_CAM(globalCtx) ((globalCtx)->cameraPtrs[(globalCtx)->activeCamera])
|
||||
#define GET_ACTIVE_CAM(globalCtx) ((globalCtx)->cameraPtrs[(globalCtx)->activeCamId])
|
||||
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == LINK_AGE_ADULT)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == LINK_AGE_CHILD)
|
||||
|
|
|
@ -301,12 +301,12 @@ typedef struct {
|
|||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x10 */ u16 frames;
|
||||
/* 0x12 */ u16 unk_12;
|
||||
/* 0x14 */ s32 unk_14;
|
||||
/* 0x14 */ s32 subCamId;
|
||||
/* 0x18 */ u16 unk_18;
|
||||
/* 0x1A */ u8 unk_1A;
|
||||
/* 0x1B */ u8 unk_1B;
|
||||
/* 0x1C */ CutsceneCameraPoint* cameraFocus;
|
||||
/* 0x20 */ CutsceneCameraPoint* cameraPosition;
|
||||
/* 0x1C */ CutsceneCameraPoint* subCamLookAtPoints;
|
||||
/* 0x20 */ CutsceneCameraPoint* subCamEyePoints;
|
||||
/* 0x24 */ CsCmdActorAction* linkAction;
|
||||
/* 0x28 */ CsCmdActorAction* npcActions[10]; // "npcdemopnt"
|
||||
} CutsceneContext; // size = 0x50
|
||||
|
@ -1164,10 +1164,10 @@ typedef struct GlobalContext {
|
|||
/* 0x000B0 */ void* sceneSegment;
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x001E0 */ Camera mainCamera;
|
||||
/* 0x0034C */ Camera subCameras[NUM_CAMS - SUBCAM_FIRST];
|
||||
/* 0x0034C */ Camera subCameras[NUM_CAMS - CAM_ID_SUB_FIRST];
|
||||
/* 0x00790 */ Camera* cameraPtrs[NUM_CAMS];
|
||||
/* 0x007A0 */ s16 activeCamera;
|
||||
/* 0x007A2 */ s16 nextCamera;
|
||||
/* 0x007A0 */ s16 activeCamId;
|
||||
/* 0x007A2 */ s16 nextCamId;
|
||||
/* 0x007A4 */ SequenceContext sequenceCtx;
|
||||
/* 0x007A8 */ LightContext lightCtx;
|
||||
/* 0x007B8 */ FrameAdvanceContext frameAdvCtx;
|
||||
|
|
|
@ -15,15 +15,17 @@
|
|||
#define CAM_STAT_UNK100 0x100
|
||||
|
||||
#define NUM_CAMS 4
|
||||
#define MAIN_CAM 0
|
||||
#define SUBCAM_FIRST 1
|
||||
#define SUBCAM_FREE 0
|
||||
#define SUBCAM_NONE -1
|
||||
#define SUBCAM_ACTIVE -1
|
||||
|
||||
// Camera IDs are indices into `GlobalContext.cameraPtrs`
|
||||
#define CAM_ID_MAIN 0 // The index of the main camera
|
||||
#define CAM_ID_SUB_FIRST 1 // The index sub cameras start at
|
||||
#define CAM_ID_NONE -1 // Used to indicate no camera. Can be used to default to the active camera in some scenarios
|
||||
|
||||
#define SUB_CAM_ID_DONE 0 // Used in some actors for variables holding sub camera IDs to indicate "subcam is finished"
|
||||
|
||||
#define ONEPOINT_CS_INFO(camera) (&camera->paramData.uniq9.csInfo)
|
||||
#define PARENT_CAM(cam) ((cam)->globalCtx->cameraPtrs[(cam)->parentCamIdx])
|
||||
#define CHILD_CAM(cam) ((cam)->globalCtx->cameraPtrs[(cam)->childCamIdx])
|
||||
#define PARENT_CAM(cam) ((cam)->globalCtx->cameraPtrs[(cam)->parentCamId])
|
||||
#define CHILD_CAM(cam) ((cam)->globalCtx->cameraPtrs[(cam)->childCamId])
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ CAM_SET_NONE,
|
||||
|
@ -1379,7 +1381,7 @@ typedef struct {
|
|||
/* 0x148 */ s16 camDataIdx;
|
||||
/* 0x14A */ s16 unk_14A;
|
||||
/* 0x14C */ s16 unk_14C;
|
||||
/* 0x14E */ s16 childCamIdx;
|
||||
/* 0x14E */ s16 childCamId;
|
||||
/* 0x150 */ s16 waterDistortionTimer;
|
||||
/* 0x152 */ s16 distortionFlags;
|
||||
/* 0x154 */ s16 prevSetting;
|
||||
|
@ -1389,8 +1391,8 @@ typedef struct {
|
|||
/* 0x15C */ s16 paramFlags;
|
||||
/* 0x15E */ s16 animState;
|
||||
/* 0x160 */ s16 timer;
|
||||
/* 0x162 */ s16 parentCamIdx;
|
||||
/* 0x164 */ s16 thisIdx;
|
||||
/* 0x162 */ s16 parentCamId;
|
||||
/* 0x164 */ s16 camId;
|
||||
/* 0x166 */ s16 prevCamDataIdx;
|
||||
/* 0x168 */ s16 csId;
|
||||
/* 0x16A */ s16 unk_16A;
|
||||
|
|
|
@ -23,7 +23,7 @@ typedef struct {
|
|||
/* 0x0C */ Vec3f eye;
|
||||
/* 0x18 */ s16 roll;
|
||||
/* 0x1A */ s16 fov;
|
||||
} CutsceneCameraAngle; // size = 0x1C
|
||||
} CutsceneCameraDirection; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ CutsceneCameraPoint* atPoints;
|
||||
|
|
|
@ -522,7 +522,7 @@ typedef struct Player {
|
|||
/* 0x045C */ Vec3f unk_45C;
|
||||
/* 0x0468 */ char unk_468[0x002];
|
||||
/* 0x046A */ s16 unk_46A;
|
||||
/* 0x046C */ s16 unk_46C;
|
||||
/* 0x046C */ s16 subCamId;
|
||||
/* 0x046E */ char unk_46E[0x02A];
|
||||
/* 0x0498 */ ColliderCylinder cylinder;
|
||||
/* 0x04E4 */ ColliderQuad meleeWeaponQuads[2];
|
||||
|
|
|
@ -1010,7 +1010,7 @@ void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
|
|||
|
||||
void func_8002DE74(GlobalContext* globalCtx, Player* player) {
|
||||
if ((globalCtx->roomCtx.curRoom.unk_03 != 4) && func_800C0CB8(globalCtx)) {
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, MAIN_CAM), CAM_SET_HORSE);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -722,7 +722,7 @@ void Camera_CopyDataToRegs(Camera* camera, s16 mode) {
|
|||
s32 i;
|
||||
|
||||
if (PREG(82)) {
|
||||
osSyncPrintf("camera: res: stat (%d/%d/%d)\n", camera->thisIdx, camera->setting, mode);
|
||||
osSyncPrintf("camera: res: stat (%d/%d/%d)\n", camera->camId, camera->setting, mode);
|
||||
}
|
||||
|
||||
values = sCameraSettings[camera->setting].cameraModes[mode].values;
|
||||
|
@ -3345,7 +3345,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
|||
if (RELOAD_PARAMS(camera)) {
|
||||
if (camera->globalCtx->view.unk_124 == 0) {
|
||||
camera->unk_14C |= 0x20;
|
||||
camera->globalCtx->view.unk_124 = camera->thisIdx | 0x50;
|
||||
camera->globalCtx->view.unk_124 = camera->camId | 0x50;
|
||||
return 1;
|
||||
}
|
||||
camera->unk_14C &= ~0x20;
|
||||
|
@ -3525,7 +3525,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
|||
if (camera->globalCtx->view.unk_124 == 0) {
|
||||
camera->unk_14C |= 0x20;
|
||||
camera->unk_14C &= ~(0x4 | 0x2);
|
||||
camera->globalCtx->view.unk_124 = camera->thisIdx | 0x50;
|
||||
camera->globalCtx->view.unk_124 = camera->camId | 0x50;
|
||||
return 1;
|
||||
}
|
||||
rwData->unk_14 = *temp_s0;
|
||||
|
@ -3538,7 +3538,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
|||
camera->animState = 20;
|
||||
camera->unk_14C |= 0x20;
|
||||
camera->unk_14C &= ~(0x4 | 0x2);
|
||||
camera->globalCtx->view.unk_124 = camera->thisIdx | 0x50;
|
||||
camera->globalCtx->view.unk_124 = camera->camId | 0x50;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -4205,7 +4205,7 @@ s32 Camera_Subj3(Camera* camera) {
|
|||
playerHeight = Player_GetHeight(camera->player);
|
||||
|
||||
if (camera->globalCtx->view.unk_124 == 0) {
|
||||
camera->globalCtx->view.unk_124 = camera->thisIdx | 0x50;
|
||||
camera->globalCtx->view.unk_124 = camera->camId | 0x50;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -4334,7 +4334,7 @@ s32 Camera_Subj4(Camera* camera) {
|
|||
}
|
||||
|
||||
if (camera->globalCtx->view.unk_124 == 0) {
|
||||
camera->globalCtx->view.unk_124 = (camera->thisIdx | 0x50);
|
||||
camera->globalCtx->view.unk_124 = (camera->camId | 0x50);
|
||||
rwData->unk_24 = camera->xzSpeed;
|
||||
return true;
|
||||
}
|
||||
|
@ -5137,7 +5137,7 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
}
|
||||
} else {
|
||||
// We've gone through all the keyframes.
|
||||
if (camera->thisIdx != MAIN_CAM) {
|
||||
if (camera->camId != CAM_ID_MAIN) {
|
||||
camera->timer = 0;
|
||||
}
|
||||
return true;
|
||||
|
@ -5475,20 +5475,20 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
break;
|
||||
case 19: {
|
||||
// Change the parent camera (or default)'s mode to normal
|
||||
s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx;
|
||||
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
|
||||
|
||||
Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1);
|
||||
}
|
||||
case 18: {
|
||||
// copy the current camera to the parent (or default)'s camera.
|
||||
s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx;
|
||||
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
|
||||
Camera* cam = camera->globalCtx->cameraPtrs[camIdx];
|
||||
|
||||
*eye = *eyeNext;
|
||||
Camera_Copy(cam, camera);
|
||||
}
|
||||
default:
|
||||
if (camera->thisIdx != MAIN_CAM) {
|
||||
if (camera->camId != CAM_ID_MAIN) {
|
||||
camera->timer = 0;
|
||||
}
|
||||
}
|
||||
|
@ -5911,7 +5911,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
D_8011D6AC[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D6AC;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D6AC);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
|
||||
} else {
|
||||
camera->timer += D_8011D6AC[2].timerInit;
|
||||
|
@ -5921,7 +5921,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
D_8011D724[1].timerInit = camera->timer - 1;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D724;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D724);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
|
||||
} else {
|
||||
camera->timer += D_8011D724[2].timerInit;
|
||||
|
@ -5944,7 +5944,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
|
||||
D_8011D79C[1].timerInit = camera->timer - 1;
|
||||
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
|
||||
} else {
|
||||
camera->timer += D_8011D79C[2].timerInit + D_8011D79C[3].timerInit;
|
||||
|
@ -5955,7 +5955,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
D_8011D83C[0].timerInit = camera->timer;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D83C;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D83C);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
|
||||
} else {
|
||||
camera->timer += D_8011D83C[1].timerInit;
|
||||
|
@ -5969,7 +5969,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
D_8011D88C[0].timerInit = camera->timer;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D88C;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D88C);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
|
||||
} else {
|
||||
camera->timer += D_8011D88C[1].timerInit;
|
||||
|
@ -5987,7 +5987,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
D_8011D8DC[1].timerInit = (s16)(eyeTargetDist * 0.005f) + 8;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D8DC;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D8DC);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
|
||||
} else {
|
||||
camera->timer += D_8011D8DC[1].timerInit + D_8011D8DC[2].timerInit;
|
||||
|
@ -6024,7 +6024,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
}
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D954;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D954);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
|
||||
} else {
|
||||
camera->timer += D_8011D954[2].timerInit + D_8011D954[3].timerInit;
|
||||
|
@ -6049,7 +6049,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
}
|
||||
ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D9F4;
|
||||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D9F4);
|
||||
if (camera->parentCamIdx != MAIN_CAM) {
|
||||
if (camera->parentCamId != CAM_ID_MAIN) {
|
||||
if (camera->globalCtx->state.frames & 1) {
|
||||
D_8011D9F4[0].rollTargetInit = -D_8011D9F4[0].rollTargetInit;
|
||||
D_8011D9F4[1].rollTargetInit = -D_8011D9F4[1].rollTargetInit;
|
||||
|
@ -6111,7 +6111,7 @@ s32 Camera_Demo6(Camera* camera) {
|
|||
s16 stateTimers[4];
|
||||
Demo6ReadWriteData* rwData = &camera->paramData.demo6.rwData;
|
||||
|
||||
mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM);
|
||||
mainCam = Gameplay_GetCamera(camera->globalCtx, CAM_ID_MAIN);
|
||||
camFocus = camera->target;
|
||||
stateTimers[1] = 0x37;
|
||||
stateTimers[2] = 0x46;
|
||||
|
@ -6216,7 +6216,7 @@ s32 Camera_Demo9(Camera* camera) {
|
|||
f32* camFOV = &camera->fov;
|
||||
Demo9ReadWriteData* rwData = &camera->paramData.demo9.rwData;
|
||||
|
||||
mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM);
|
||||
mainCam = Gameplay_GetCamera(camera->globalCtx, CAM_ID_MAIN);
|
||||
mainCamPlayerPosRot = &mainCam->playerPosRot;
|
||||
if (RELOAD_PARAMS(camera) || R_RELOAD_CAM_PARAMS) {
|
||||
values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
|
@ -6306,7 +6306,7 @@ s32 Camera_Demo9(Camera* camera) {
|
|||
if (rwData->finishAction == 0x2000) {
|
||||
// finish action = 0x2000, run OnePointCs 0x3FC (Dramatic Return to Link)
|
||||
onePointTimer = onePointCamData->initTimer < 50 ? 5 : onePointCamData->initTimer / 5;
|
||||
OnePointCutscene_Init(camera->globalCtx, 1020, onePointTimer, NULL, camera->parentCamIdx);
|
||||
OnePointCutscene_Init(camera->globalCtx, 1020, onePointTimer, NULL, camera->parentCamId);
|
||||
}
|
||||
} else {
|
||||
// finish action = 0x1000, copy the current camera's values to the
|
||||
|
@ -7019,7 +7019,7 @@ void Camera_InitPlayerSettings(Camera* camera, Player* player) {
|
|||
Camera_QRegInit();
|
||||
osSyncPrintf(VT_FGCOL(BLUE) "camera: personalize ---" VT_RST "\n");
|
||||
|
||||
if (camera->thisIdx == MAIN_CAM) {
|
||||
if (camera->camId == CAM_ID_MAIN) {
|
||||
Camera_UpdateWater(camera);
|
||||
}
|
||||
}
|
||||
|
@ -7035,7 +7035,7 @@ s16 Camera_ChangeStatus(Camera* camera, s16 status) {
|
|||
}
|
||||
|
||||
if (PREG(82)) {
|
||||
osSyncPrintf("camera: res: stat (%d/%d/%d)\n", camera->thisIdx, camera->setting, camera->mode);
|
||||
osSyncPrintf("camera: res: stat (%d/%d/%d)\n", camera->camId, camera->setting, camera->mode);
|
||||
}
|
||||
|
||||
if (status == CAM_STAT_ACTIVE && camera->status != CAM_STAT_ACTIVE) {
|
||||
|
@ -7058,7 +7058,7 @@ void Camera_PrintSettings(Camera* camera) {
|
|||
char sp48[8];
|
||||
s32 i;
|
||||
|
||||
if ((OREG(0) & 1) && (camera->globalCtx->activeCamera == camera->thisIdx) && !gDbgCamEnabled) {
|
||||
if ((OREG(0) & 1) && (camera->globalCtx->activeCamId == camera->camId) && !gDbgCamEnabled) {
|
||||
for (i = 0; i < NUM_CAMS; i++) {
|
||||
if (camera->globalCtx->cameraPtrs[i] == NULL) {
|
||||
sp58[i] = '-';
|
||||
|
@ -7090,7 +7090,7 @@ void Camera_PrintSettings(Camera* camera) {
|
|||
sp58[i] = '\0';
|
||||
sp48[i] = '\0';
|
||||
|
||||
sp48[camera->globalCtx->activeCamera] = 'a';
|
||||
sp48[camera->globalCtx->activeCamId] = 'a';
|
||||
func_8006376C(3, 0x16, 5, sp58);
|
||||
func_8006376C(3, 0x16, 1, sp48);
|
||||
func_8006376C(3, 0x17, 5, "S:");
|
||||
|
@ -7260,7 +7260,7 @@ s32 Camera_UpdateHotRoom(Camera* camera) {
|
|||
s32 Camera_DbgChangeMode(Camera* camera) {
|
||||
s32 changeDir = 0;
|
||||
|
||||
if (!gDbgCamEnabled && camera->globalCtx->activeCamera == MAIN_CAM) {
|
||||
if (!gDbgCamEnabled && camera->globalCtx->activeCamId == CAM_ID_MAIN) {
|
||||
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) {
|
||||
osSyncPrintf("attention sound URGENCY\n");
|
||||
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
|
||||
|
@ -7387,7 +7387,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
QuakeCamCalc quake;
|
||||
Player* player;
|
||||
|
||||
player = camera->globalCtx->cameraPtrs[MAIN_CAM]->player;
|
||||
player = camera->globalCtx->cameraPtrs[CAM_ID_MAIN]->player;
|
||||
|
||||
if (R_DBG_CAM_UPDATE) {
|
||||
osSyncPrintf("camera: in %x\n", camera);
|
||||
|
@ -7494,7 +7494,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3)) {
|
||||
sCameraInterfaceFlags = 0;
|
||||
Camera_UpdateInterface(sCameraInterfaceFlags);
|
||||
} else if ((D_8011D3F0 != 0) && (camera->thisIdx == MAIN_CAM)) {
|
||||
} else if ((D_8011D3F0 != 0) && (camera->camId == CAM_ID_MAIN)) {
|
||||
D_8011D3F0--;
|
||||
sCameraInterfaceFlags = 0x3200;
|
||||
Camera_UpdateInterface(sCameraInterfaceFlags);
|
||||
|
@ -7626,13 +7626,13 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
* When the camera's timer is 0, change the camera to its parent
|
||||
*/
|
||||
void Camera_Finish(Camera* camera) {
|
||||
Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM];
|
||||
Camera* mainCam = camera->globalCtx->cameraPtrs[CAM_ID_MAIN];
|
||||
Player* player = GET_PLAYER(camera->globalCtx);
|
||||
|
||||
if (camera->timer == 0) {
|
||||
Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamId, CAM_STAT_ACTIVE);
|
||||
|
||||
if ((camera->parentCamIdx == MAIN_CAM) && (camera->csId != 0)) {
|
||||
if ((camera->parentCamId == CAM_ID_MAIN) && (camera->csId != 0)) {
|
||||
player->actor.freezeTimer = 0;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_29;
|
||||
|
||||
|
@ -7644,23 +7644,23 @@ void Camera_Finish(Camera* camera) {
|
|||
mainCam->unk_14C |= 8;
|
||||
}
|
||||
|
||||
if (CHILD_CAM(camera)->parentCamIdx == camera->thisIdx) {
|
||||
CHILD_CAM(camera)->parentCamIdx = camera->parentCamIdx;
|
||||
if (CHILD_CAM(camera)->parentCamId == camera->camId) {
|
||||
CHILD_CAM(camera)->parentCamId = camera->parentCamId;
|
||||
}
|
||||
|
||||
if (PARENT_CAM(camera)->childCamIdx == camera->thisIdx) {
|
||||
PARENT_CAM(camera)->childCamIdx = camera->childCamIdx;
|
||||
if (PARENT_CAM(camera)->childCamId == camera->camId) {
|
||||
PARENT_CAM(camera)->childCamId = camera->childCamId;
|
||||
}
|
||||
|
||||
if (PARENT_CAM(camera)->thisIdx == MAIN_CAM) {
|
||||
if (PARENT_CAM(camera)->camId == CAM_ID_MAIN) {
|
||||
PARENT_CAM(camera)->animState = 0;
|
||||
}
|
||||
|
||||
camera->childCamIdx = camera->parentCamIdx = SUBCAM_FREE;
|
||||
camera->childCamId = camera->parentCamId = CAM_ID_MAIN;
|
||||
camera->timer = -1;
|
||||
camera->globalCtx->envCtx.fillScreen = false;
|
||||
|
||||
Gameplay_ClearCamera(camera->globalCtx, camera->thisIdx);
|
||||
Gameplay_ClearCamera(camera->globalCtx, camera->camId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7871,7 +7871,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
|||
}
|
||||
|
||||
osSyncPrintf(VT_SGR("1") "%06u:" VT_RST " camera: change camera[%d] set %s\n", camera->globalCtx->state.frames,
|
||||
camera->thisIdx, sCameraSettingNames[camera->setting]);
|
||||
camera->camId, sCameraSettingNames[camera->setting]);
|
||||
|
||||
return setting;
|
||||
}
|
||||
|
@ -7901,7 +7901,7 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) {
|
|||
//! @bug: This is likely checking the wrong value. The actual return of Camera_ChangeSettingFlags or
|
||||
// camDataIdx would make more sense.
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera ID (%d) !! (%d|%d|%d)\n" VT_RST, camDataIdx,
|
||||
camera->thisIdx, 0x32, newCameraSetting);
|
||||
camera->camId, 0x32, newCameraSetting);
|
||||
}
|
||||
return 0x80000000 | camDataIdx;
|
||||
}
|
||||
|
@ -8197,10 +8197,10 @@ s32 func_8005B198(void) {
|
|||
s16 func_8005B1A4(Camera* camera) {
|
||||
camera->unk_14C |= 0x8;
|
||||
|
||||
if ((camera->thisIdx == MAIN_CAM) && (camera->globalCtx->activeCamera != MAIN_CAM)) {
|
||||
if ((camera->camId == CAM_ID_MAIN) && (camera->globalCtx->activeCamId != CAM_ID_MAIN)) {
|
||||
GET_ACTIVE_CAM(camera->globalCtx)->unk_14C |= 0x8;
|
||||
return camera->globalCtx->activeCamera;
|
||||
return camera->globalCtx->activeCamId;
|
||||
}
|
||||
|
||||
return camera->thisIdx;
|
||||
return camera->camId;
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ void* D_8011E304[] = {
|
|||
u16 D_8015FCC0;
|
||||
u16 D_8015FCC2;
|
||||
u16 D_8015FCC4;
|
||||
s16 D_8015FCC6;
|
||||
s16 sReturnToCamId;
|
||||
u8 D_8015FCC8;
|
||||
s16 sQuakeIndex;
|
||||
u16 D_8015FCCC; // only written to, never read
|
||||
|
@ -1330,8 +1330,8 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs
|
|||
}
|
||||
}
|
||||
|
||||
// Command 0x1 & 0x5: Camera Positions
|
||||
s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cmd, u8 relativeToLink) {
|
||||
// Command 0x1 & 0x5: Camera Eye Points
|
||||
s32 Cutscene_Command_CameraEyePoints(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cmd, u8 relativeToLink) {
|
||||
s32 shouldContinue = 1;
|
||||
CsCmdBase* cmdBase = (CsCmdBase*)cmd;
|
||||
s32 size;
|
||||
|
@ -1342,16 +1342,16 @@ s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext*
|
|||
if ((cmdBase->startFrame < csCtx->frames) && (csCtx->frames < cmdBase->endFrame) &&
|
||||
((csCtx->unk_18 < cmdBase->startFrame) || (csCtx->unk_18 >= 0xF000))) {
|
||||
csCtx->unk_1B = 1;
|
||||
csCtx->cameraPosition = (CutsceneCameraPoint*)cmd;
|
||||
csCtx->subCamEyePoints = (CutsceneCameraPoint*)cmd;
|
||||
if (csCtx->unk_1A != 0) {
|
||||
csCtx->unk_18 = cmdBase->startFrame;
|
||||
if (D_8015FCC8 != 0) {
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_CS_0);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Gameplay_GetCamera(globalCtx, csCtx->unk_14));
|
||||
Camera_SetCSParams(Gameplay_GetCamera(globalCtx, csCtx->unk_14), csCtx->cameraFocus,
|
||||
csCtx->cameraPosition, GET_PLAYER(globalCtx), relativeToLink);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->subCamId, CAM_SET_CS_0);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sReturnToCamId, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Gameplay_GetCamera(globalCtx, csCtx->subCamId));
|
||||
Camera_SetCSParams(Gameplay_GetCamera(globalCtx, csCtx->subCamId), csCtx->subCamLookAtPoints,
|
||||
csCtx->subCamEyePoints, GET_PLAYER(globalCtx), relativeToLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1367,8 +1367,8 @@ s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext*
|
|||
return size;
|
||||
}
|
||||
|
||||
// Command 0x2 & 0x6: Camera Focus Points
|
||||
s32 Cutscene_Command_CameraFocus(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cmd, u8 relativeToLink) {
|
||||
// Command 0x2 & 0x6: Camera At Points
|
||||
s32 Cutscene_Command_CameraLookAtPoints(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cmd, u8 relativeToLink) {
|
||||
s32 shouldContinue = 1;
|
||||
CsCmdBase* cmdBase = (CsCmdBase*)cmd;
|
||||
s32 size;
|
||||
|
@ -1379,16 +1379,16 @@ s32 Cutscene_Command_CameraFocus(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
if ((cmdBase->startFrame < csCtx->frames) && (csCtx->frames < cmdBase->endFrame) &&
|
||||
((D_8015FCC0 < cmdBase->startFrame) || (D_8015FCC0 >= 0xF000))) {
|
||||
csCtx->unk_1A = 1;
|
||||
csCtx->cameraFocus = (CutsceneCameraPoint*)cmd;
|
||||
csCtx->subCamLookAtPoints = (CutsceneCameraPoint*)cmd;
|
||||
if (csCtx->unk_1B != 0) {
|
||||
D_8015FCC0 = cmdBase->startFrame;
|
||||
if (D_8015FCC8 != 0) {
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_CS_0);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Gameplay_GetCamera(globalCtx, csCtx->unk_14));
|
||||
Camera_SetCSParams(Gameplay_GetCamera(globalCtx, csCtx->unk_14), csCtx->cameraFocus,
|
||||
csCtx->cameraPosition, GET_PLAYER(globalCtx), relativeToLink);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->subCamId, CAM_SET_CS_0);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sReturnToCamId, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Gameplay_GetCamera(globalCtx, csCtx->subCamId));
|
||||
Camera_SetCSParams(Gameplay_GetCamera(globalCtx, csCtx->subCamId), csCtx->subCamLookAtPoints,
|
||||
csCtx->subCamEyePoints, GET_PLAYER(globalCtx), relativeToLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1410,7 +1410,7 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
|||
s32 size;
|
||||
Vec3f sp3C;
|
||||
Vec3f sp30;
|
||||
Camera* sp2C;
|
||||
Camera* subCam;
|
||||
f32 sp28;
|
||||
|
||||
cmd += 8;
|
||||
|
@ -1419,25 +1419,25 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
|||
if ((cmdBase->startFrame < csCtx->frames) && (csCtx->frames < cmdBase->endFrame) &&
|
||||
((D_8015FCC2 < cmdBase->startFrame) || (D_8015FCC2 >= 0xF000))) {
|
||||
csCtx->unk_1B = 1;
|
||||
csCtx->cameraPosition = (CutsceneCameraPoint*)cmd;
|
||||
csCtx->subCamEyePoints = (CutsceneCameraPoint*)cmd;
|
||||
if (csCtx->unk_1A != 0) {
|
||||
D_8015FCC2 = cmdBase->startFrame;
|
||||
if (D_8015FCC8 != 0) {
|
||||
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
|
||||
sp2C->player = NULL;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
|
||||
sp28 = csCtx->cameraFocus->cameraRoll * 1.40625f;
|
||||
Camera_SetParam(sp2C, 64, &sp28);
|
||||
sp3C.x = csCtx->cameraFocus->pos.x;
|
||||
sp3C.y = csCtx->cameraFocus->pos.y;
|
||||
sp3C.z = csCtx->cameraFocus->pos.z;
|
||||
sp30.x = csCtx->cameraPosition->pos.x;
|
||||
sp30.y = csCtx->cameraPosition->pos.y;
|
||||
sp30.z = csCtx->cameraPosition->pos.z;
|
||||
Gameplay_CameraSetAtEye(globalCtx, csCtx->unk_14, &sp3C, &sp30);
|
||||
Gameplay_CameraSetFov(globalCtx, csCtx->unk_14, csCtx->cameraPosition->viewAngle);
|
||||
subCam = Gameplay_GetCamera(globalCtx, csCtx->subCamId);
|
||||
subCam->player = NULL;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->subCamId, CAM_SET_FREE0);
|
||||
sp28 = csCtx->subCamLookAtPoints->cameraRoll * 1.40625f;
|
||||
Camera_SetParam(subCam, 64, &sp28);
|
||||
sp3C.x = csCtx->subCamLookAtPoints->pos.x;
|
||||
sp3C.y = csCtx->subCamLookAtPoints->pos.y;
|
||||
sp3C.z = csCtx->subCamLookAtPoints->pos.z;
|
||||
sp30.x = csCtx->subCamEyePoints->pos.x;
|
||||
sp30.y = csCtx->subCamEyePoints->pos.y;
|
||||
sp30.z = csCtx->subCamEyePoints->pos.z;
|
||||
Gameplay_CameraSetAtEye(globalCtx, csCtx->subCamId, &sp3C, &sp30);
|
||||
Gameplay_CameraSetFov(globalCtx, csCtx->subCamId, csCtx->subCamEyePoints->viewAngle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1453,7 +1453,7 @@ s32 Cutscene_Command_08(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
|||
s32 size;
|
||||
Vec3f sp3C;
|
||||
Vec3f sp30;
|
||||
Camera* sp2C;
|
||||
Camera* subCam;
|
||||
f32 sp28;
|
||||
|
||||
cmd += 8;
|
||||
|
@ -1462,23 +1462,23 @@ s32 Cutscene_Command_08(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
|||
if ((cmdBase->startFrame < csCtx->frames) && (csCtx->frames < cmdBase->endFrame) &&
|
||||
((D_8015FCC4 < cmdBase->startFrame) || (D_8015FCC4 >= 0xF000))) {
|
||||
csCtx->unk_1A = 1;
|
||||
csCtx->cameraFocus = (CutsceneCameraPoint*)cmd;
|
||||
csCtx->subCamLookAtPoints = (CutsceneCameraPoint*)cmd;
|
||||
if (csCtx->unk_1B != 0) {
|
||||
D_8015FCC4 = cmdBase->startFrame;
|
||||
if (D_8015FCC8 != 0) {
|
||||
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
|
||||
sp2C->player = NULL;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
|
||||
sp3C.x = csCtx->cameraFocus->pos.x;
|
||||
sp3C.y = csCtx->cameraFocus->pos.y;
|
||||
sp3C.z = csCtx->cameraFocus->pos.z;
|
||||
sp30.x = csCtx->cameraPosition->pos.x;
|
||||
sp30.y = csCtx->cameraPosition->pos.y;
|
||||
sp30.z = csCtx->cameraPosition->pos.z;
|
||||
Gameplay_CameraSetAtEye(globalCtx, csCtx->unk_14, &sp3C, &sp30);
|
||||
Gameplay_CameraSetFov(globalCtx, csCtx->unk_14, csCtx->cameraPosition->viewAngle);
|
||||
subCam = Gameplay_GetCamera(globalCtx, csCtx->subCamId);
|
||||
subCam->player = NULL;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->subCamId, CAM_SET_FREE0);
|
||||
sp3C.x = csCtx->subCamLookAtPoints->pos.x;
|
||||
sp3C.y = csCtx->subCamLookAtPoints->pos.y;
|
||||
sp3C.z = csCtx->subCamLookAtPoints->pos.z;
|
||||
sp30.x = csCtx->subCamEyePoints->pos.x;
|
||||
sp30.y = csCtx->subCamEyePoints->pos.y;
|
||||
sp30.z = csCtx->subCamEyePoints->pos.z;
|
||||
Gameplay_CameraSetAtEye(globalCtx, csCtx->subCamId, &sp3C, &sp30);
|
||||
Gameplay_CameraSetFov(globalCtx, csCtx->subCamId, csCtx->subCamEyePoints->viewAngle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1859,16 +1859,16 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
}
|
||||
break;
|
||||
case CS_CMD_CAM_EYE:
|
||||
cutscenePtr += Cutscene_Command_CameraPositions(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
cutscenePtr += Cutscene_Command_CameraEyePoints(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
break;
|
||||
case CS_CMD_CAM_EYE_REL_TO_PLAYER:
|
||||
cutscenePtr += Cutscene_Command_CameraPositions(globalCtx, csCtx, (void*)cutscenePtr, 1);
|
||||
cutscenePtr += Cutscene_Command_CameraEyePoints(globalCtx, csCtx, (void*)cutscenePtr, 1);
|
||||
break;
|
||||
case CS_CMD_CAM_AT:
|
||||
cutscenePtr += Cutscene_Command_CameraFocus(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
cutscenePtr += Cutscene_Command_CameraLookAtPoints(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
break;
|
||||
case CS_CMD_CAM_AT_REL_TO_PLAYER:
|
||||
cutscenePtr += Cutscene_Command_CameraFocus(globalCtx, csCtx, (void*)cutscenePtr, 1);
|
||||
cutscenePtr += Cutscene_Command_CameraLookAtPoints(globalCtx, csCtx, (void*)cutscenePtr, 1);
|
||||
break;
|
||||
case CS_CMD_07:
|
||||
cutscenePtr += Cutscene_Command_07(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
|
@ -1967,12 +1967,12 @@ void func_80068DC0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
case 0x028E:
|
||||
case 0x0292:
|
||||
case 0x0476:
|
||||
Gameplay_CopyCamera(globalCtx, D_8015FCC6, csCtx->unk_14);
|
||||
Gameplay_CopyCamera(globalCtx, sReturnToCamId, csCtx->subCamId);
|
||||
}
|
||||
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, csCtx->unk_14);
|
||||
func_8005B1A4(globalCtx->cameraPtrs[D_8015FCC6]);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sReturnToCamId, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, csCtx->subCamId);
|
||||
func_8005B1A4(globalCtx->cameraPtrs[sReturnToCamId]);
|
||||
}
|
||||
|
||||
Audio_SetCutsceneFlag(0);
|
||||
|
@ -2011,10 +2011,10 @@ void func_80068ECC(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
D_8015FCC4 = 0xFFFF;
|
||||
csCtx->unk_1A = 0;
|
||||
csCtx->unk_1B = 0;
|
||||
D_8015FCC6 = globalCtx->activeCamera;
|
||||
sReturnToCamId = globalCtx->activeCamId;
|
||||
|
||||
if (D_8015FCC8 != 0) {
|
||||
csCtx->unk_14 = Gameplay_CreateSubCamera(globalCtx);
|
||||
csCtx->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
}
|
||||
|
||||
if (gSaveContext.cutsceneTrigger == 0) {
|
||||
|
|
|
@ -223,7 +223,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
|||
sp54.y = player->actor.world.pos.y + 100.0f;
|
||||
sp54.z = player->actor.world.pos.z;
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, globalCtx->activeCamera, &player->actor.world.pos, &sp54);
|
||||
Gameplay_CameraSetAtEye(globalCtx, globalCtx->activeCamId, &player->actor.world.pos, &sp54);
|
||||
} else {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x,
|
||||
D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0,
|
||||
|
|
|
@ -3275,13 +3275,13 @@ void Message_Update(GlobalContext* globalCtx) {
|
|||
}
|
||||
if (globalCtx->csCtx.state == 0) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("day_time=%x active_camera=%d ", gSaveContext.cutsceneIndex, globalCtx->activeCamera);
|
||||
osSyncPrintf("day_time=%x active_camera=%d ", gSaveContext.cutsceneIndex, globalCtx->activeCamId);
|
||||
|
||||
if (msgCtx->textId != 0x2061 && msgCtx->textId != 0x2025 && msgCtx->textId != 0x208C &&
|
||||
((msgCtx->textId < 0x88D || msgCtx->textId >= 0x893) || msgCtx->choiceIndex != 0) &&
|
||||
(msgCtx->textId != 0x3055 && gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
osSyncPrintf("=== day_time=%x ", ((void)0, gSaveContext.cutsceneIndex));
|
||||
if (globalCtx->activeCamera == MAIN_CAM) {
|
||||
if (globalCtx->activeCamId == CAM_ID_MAIN) {
|
||||
if (gSaveContext.unk_13EE == 0 || gSaveContext.unk_13EE == 1 || gSaveContext.unk_13EE == 2) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -230,9 +230,9 @@ void Gameplay_Init(GameState* thisx) {
|
|||
Camera_ChangeStatus(&globalCtx->subCameras[i], CAM_STAT_UNK100);
|
||||
}
|
||||
|
||||
globalCtx->cameraPtrs[MAIN_CAM] = &globalCtx->mainCamera;
|
||||
globalCtx->cameraPtrs[MAIN_CAM]->uid = 0;
|
||||
globalCtx->activeCamera = MAIN_CAM;
|
||||
globalCtx->cameraPtrs[CAM_ID_MAIN] = &globalCtx->mainCamera;
|
||||
globalCtx->cameraPtrs[CAM_ID_MAIN]->uid = 0;
|
||||
globalCtx->activeCamId = CAM_ID_MAIN;
|
||||
func_8005AC48(&globalCtx->mainCamera, 0xFF);
|
||||
Sram_Init(globalCtx, &globalCtx->sramCtx);
|
||||
func_80112098(globalCtx);
|
||||
|
@ -1047,14 +1047,14 @@ skip:
|
|||
s32 pad3[5];
|
||||
s32 i;
|
||||
|
||||
globalCtx->nextCamera = globalCtx->activeCamera;
|
||||
globalCtx->nextCamId = globalCtx->activeCamId;
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3806);
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_CAMS; i++) {
|
||||
if ((i != globalCtx->nextCamera) && (globalCtx->cameraPtrs[i] != NULL)) {
|
||||
if ((i != globalCtx->nextCamId) && (globalCtx->cameraPtrs[i] != NULL)) {
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3809);
|
||||
}
|
||||
|
@ -1063,7 +1063,7 @@ skip:
|
|||
}
|
||||
}
|
||||
|
||||
Camera_Update(globalCtx->cameraPtrs[globalCtx->nextCamera]);
|
||||
Camera_Update(globalCtx->cameraPtrs[globalCtx->nextCamId]);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3814);
|
||||
|
@ -1547,7 +1547,7 @@ void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
|
|||
s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) {
|
||||
s16 i;
|
||||
|
||||
for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
|
||||
for (i = CAM_ID_SUB_FIRST; i < NUM_CAMS; i++) {
|
||||
if (globalCtx->cameraPtrs[i] == NULL) {
|
||||
break;
|
||||
}
|
||||
|
@ -1555,38 +1555,38 @@ s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) {
|
|||
|
||||
if (i == NUM_CAMS) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: fulled sub camera system area\n" VT_RST);
|
||||
return SUBCAM_NONE;
|
||||
return CAM_ID_NONE;
|
||||
}
|
||||
|
||||
osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " create new sub camera [%d] " VT_BGCOL(
|
||||
CYAN) " " VT_RST "\n",
|
||||
i);
|
||||
|
||||
globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - SUBCAM_FIRST];
|
||||
globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - CAM_ID_SUB_FIRST];
|
||||
Camera_Init(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
globalCtx->cameraPtrs[i]->thisIdx = i;
|
||||
globalCtx->cameraPtrs[i]->camId = i;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
s16 Gameplay_GetActiveCamId(GlobalContext* globalCtx) {
|
||||
return globalCtx->activeCamera;
|
||||
return globalCtx->activeCamId;
|
||||
}
|
||||
|
||||
s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status) {
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
|
||||
if (status == CAM_STAT_ACTIVE) {
|
||||
globalCtx->activeCamera = camIdx;
|
||||
globalCtx->activeCamId = camIdx;
|
||||
}
|
||||
|
||||
return Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], status);
|
||||
}
|
||||
|
||||
void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) {
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
|
||||
if (camIdx == MAIN_CAM) {
|
||||
if (camIdx == CAM_ID_MAIN) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: never clear camera !!\n" VT_RST);
|
||||
}
|
||||
|
||||
|
@ -1602,26 +1602,26 @@ void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) {
|
|||
}
|
||||
|
||||
void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx) {
|
||||
s16 i;
|
||||
s16 subCamId;
|
||||
|
||||
for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
|
||||
if (globalCtx->cameraPtrs[i] != NULL) {
|
||||
Gameplay_ClearCamera(globalCtx, i);
|
||||
for (subCamId = CAM_ID_SUB_FIRST; subCamId < NUM_CAMS; subCamId++) {
|
||||
if (globalCtx->cameraPtrs[subCamId] != NULL) {
|
||||
Gameplay_ClearCamera(globalCtx, subCamId);
|
||||
}
|
||||
}
|
||||
|
||||
globalCtx->activeCamera = MAIN_CAM;
|
||||
globalCtx->activeCamId = CAM_ID_MAIN;
|
||||
}
|
||||
|
||||
Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId) {
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
|
||||
return globalCtx->cameraPtrs[camIdx];
|
||||
}
|
||||
|
||||
s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye) {
|
||||
s32 ret = 0;
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
Camera* camera = globalCtx->cameraPtrs[camIdx];
|
||||
Player* player;
|
||||
|
||||
|
@ -1647,7 +1647,7 @@ s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3
|
|||
|
||||
s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) {
|
||||
s32 ret = 0;
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
Camera* camera = globalCtx->cameraPtrs[camIdx];
|
||||
Player* player;
|
||||
|
||||
|
@ -1681,7 +1681,7 @@ s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov) {
|
|||
}
|
||||
|
||||
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) {
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
Camera* camera = globalCtx->cameraPtrs[camIdx];
|
||||
|
||||
camera->roll = roll;
|
||||
|
@ -1689,16 +1689,16 @@ s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2) {
|
||||
s16 camIdx2 = (camId2 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId2;
|
||||
s16 camIdx1 = (camId1 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId1;
|
||||
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 destCamId, s16 srcCamId) {
|
||||
s16 srcCamId2 = (srcCamId == CAM_ID_NONE) ? globalCtx->activeCamId : srcCamId;
|
||||
s16 destCamId1 = (destCamId == CAM_ID_NONE) ? globalCtx->activeCamId : destCamId;
|
||||
|
||||
Camera_Copy(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]);
|
||||
Camera_Copy(globalCtx->cameraPtrs[destCamId1], globalCtx->cameraPtrs[srcCamId2]);
|
||||
}
|
||||
|
||||
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting) {
|
||||
Camera* camera;
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
|
||||
camera = globalCtx->cameraPtrs[camIdx];
|
||||
Camera_InitPlayerSettings(camera, player);
|
||||
|
@ -1710,12 +1710,12 @@ s32 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 settin
|
|||
}
|
||||
|
||||
void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
|
||||
s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
|
||||
s16 camIdx = (camId == CAM_ID_NONE) ? globalCtx->activeCamId : camId;
|
||||
s16 i;
|
||||
|
||||
Gameplay_ClearCamera(globalCtx, camIdx);
|
||||
|
||||
for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
|
||||
for (i = CAM_ID_SUB_FIRST; i < NUM_CAMS; i++) {
|
||||
if (globalCtx->cameraPtrs[i] != NULL) {
|
||||
osSyncPrintf(
|
||||
VT_COL(RED, WHITE) "camera control: error: return to main, other camera left. %d cleared!!\n" VT_RST,
|
||||
|
@ -1725,10 +1725,10 @@ void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
|
|||
}
|
||||
|
||||
if (arg2 <= 0) {
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx = globalCtx->cameraPtrs[MAIN_CAM]->parentCamIdx = SUBCAM_FREE;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
globalCtx->cameraPtrs[CAM_ID_MAIN]->childCamId = globalCtx->cameraPtrs[CAM_ID_MAIN]->parentCamId = CAM_ID_MAIN;
|
||||
} else {
|
||||
OnePointCutscene_Init(globalCtx, 1020, arg2, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 1020, arg2, NULL, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -616,8 +616,8 @@ void func_8008EEAC(GlobalContext* globalCtx, Actor* actor) {
|
|||
this->unk_664 = actor;
|
||||
this->unk_684 = actor;
|
||||
this->stateFlags1 |= PLAYER_STATE1_16;
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, actor);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), 2);
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, CAM_ID_MAIN), 8, actor);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, CAM_ID_MAIN), CAM_MODE_FOLLOWTARGET);
|
||||
}
|
||||
|
||||
s32 func_8008EF30(GlobalContext* globalCtx) {
|
||||
|
|
|
@ -148,13 +148,13 @@ s16 Quake_GetFreeIndex(void) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
QuakeRequest* Quake_AddImpl(Camera* cam, u32 callbackIdx) {
|
||||
QuakeRequest* Quake_AddImpl(Camera* camera, u32 callbackIdx) {
|
||||
s16 idx = Quake_GetFreeIndex();
|
||||
QuakeRequest* req = &sQuakeRequest[idx];
|
||||
|
||||
__osMemset(req, 0, sizeof(QuakeRequest));
|
||||
req->cam = cam;
|
||||
req->camPtrIdx = cam->thisIdx;
|
||||
req->cam = camera;
|
||||
req->camPtrIdx = camera->camId;
|
||||
req->callbackIdx = callbackIdx;
|
||||
req->unk_1C = 1;
|
||||
req->randIdx = ((s16)(Rand_ZeroOne() * (f32)0x10000) & ~3) + idx;
|
||||
|
@ -291,8 +291,8 @@ void Quake_Init(void) {
|
|||
sQuakeRequestCount = 0;
|
||||
}
|
||||
|
||||
s16 Quake_Add(Camera* cam, u32 callbackIdx) {
|
||||
return Quake_AddImpl(cam, callbackIdx)->randIdx;
|
||||
s16 Quake_Add(Camera* camera, u32 callbackIdx) {
|
||||
return Quake_AddImpl(camera, callbackIdx)->randIdx;
|
||||
}
|
||||
|
||||
u32 Quake_RemoveFromIdx(s16 idx) {
|
||||
|
@ -347,8 +347,8 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) {
|
|||
req->camPtrIdx);
|
||||
Quake_Remove(req);
|
||||
} else {
|
||||
temp = &camera->thisIdx;
|
||||
eq = req->cam->thisIdx != *temp;
|
||||
temp = &camera->camId;
|
||||
eq = req->cam->camId != *temp;
|
||||
absSpeedDiv = ABS(req->speed) / (f32)0x8000;
|
||||
if (sQuakeCallbacks[req->callbackIdx](req, &shake) == 0) {
|
||||
Quake_Remove(req);
|
||||
|
|
|
@ -307,7 +307,7 @@ void func_8009638C(Gfx** displayList, void* source, void* tlut, u16 width, u16 h
|
|||
|
||||
// Room Draw Polygon Type 1 - Single Format
|
||||
void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
Camera* camera;
|
||||
Camera* activeCam;
|
||||
Gfx* spA8;
|
||||
PolygonType1* polygon1;
|
||||
PolygonDlist* polygonDlist;
|
||||
|
@ -318,8 +318,8 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
|
|||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628);
|
||||
|
||||
camera = GET_ACTIVE_CAM(globalCtx);
|
||||
isFixedCamera = camera->setting == CAM_SET_PREREND_FIXED;
|
||||
activeCam = GET_ACTIVE_CAM(globalCtx);
|
||||
isFixedCamera = (activeCam->setting == CAM_SET_PREREND_FIXED);
|
||||
polygon1 = &room->mesh->polygon1;
|
||||
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
|
||||
drawBg = (flags & 1) && isFixedCamera && polygon1->single.source && !(SREG(25) & 1);
|
||||
|
@ -341,7 +341,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
|
|||
{
|
||||
Vec3f sp60;
|
||||
spA8 = POLY_OPA_DISP;
|
||||
Camera_GetSkyboxOffset(&sp60, camera);
|
||||
Camera_GetSkyboxOffset(&sp60, activeCam);
|
||||
func_8009638C(&spA8, polygon1->single.source, polygon1->single.tlut, polygon1->single.width,
|
||||
polygon1->single.height, polygon1->single.fmt, polygon1->single.siz,
|
||||
polygon1->single.mode0, polygon1->single.tlutCount,
|
||||
|
@ -364,34 +364,33 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
|
|||
}
|
||||
|
||||
BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
|
||||
Camera* camera;
|
||||
s32 camId;
|
||||
s16 camId2;
|
||||
Camera* activeCam = GET_ACTIVE_CAM(globalCtx);
|
||||
s32 camDataIdx;
|
||||
s16 camDataIdx2;
|
||||
Player* player;
|
||||
BgImage* bgImage;
|
||||
s32 i;
|
||||
|
||||
camera = GET_ACTIVE_CAM(globalCtx);
|
||||
camId = camera->camDataIdx;
|
||||
camDataIdx = activeCam->camDataIdx;
|
||||
// jfifid
|
||||
camId2 = func_80041C10(&globalCtx->colCtx, camId, BGCHECK_SCENE)[2].y;
|
||||
if (camId2 >= 0) {
|
||||
camId = camId2;
|
||||
camDataIdx2 = func_80041C10(&globalCtx->colCtx, camDataIdx, BGCHECK_SCENE)[2].y;
|
||||
if (camDataIdx2 >= 0) {
|
||||
camDataIdx = camDataIdx2;
|
||||
}
|
||||
|
||||
player = GET_PLAYER(globalCtx);
|
||||
player->actor.params = (player->actor.params & 0xFF00) | camId;
|
||||
player->actor.params = (player->actor.params & 0xFF00) | camDataIdx;
|
||||
|
||||
bgImage = SEGMENTED_TO_VIRTUAL(polygon1->multi.list);
|
||||
for (i = 0; i < polygon1->multi.count; i++) {
|
||||
if (bgImage->id == camId) {
|
||||
if (bgImage->id == camDataIdx) {
|
||||
return bgImage;
|
||||
}
|
||||
bgImage++;
|
||||
}
|
||||
|
||||
// "z_room.c: Data consistent with camera id does not exist camid=%d"
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "z_room.c:カメラIDに一致するデータが存在しません camid=%d\n" VT_RST, camId);
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "z_room.c:カメラIDに一致するデータが存在しません camid=%d\n" VT_RST, camDataIdx);
|
||||
LogUtils_HungupThread("../z_room.c", 726);
|
||||
|
||||
return NULL;
|
||||
|
@ -399,7 +398,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
|
|||
|
||||
// Room Draw Polygon Type 1 - Multi Format
|
||||
void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
Camera* camera;
|
||||
Camera* activeCam;
|
||||
Gfx* gfx;
|
||||
PolygonType1* polygon1;
|
||||
BgImage* bgImage;
|
||||
|
@ -411,8 +410,8 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
|
|||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752);
|
||||
|
||||
camera = GET_ACTIVE_CAM(globalCtx);
|
||||
isFixedCamera = camera->setting == CAM_SET_PREREND_FIXED;
|
||||
activeCam = GET_ACTIVE_CAM(globalCtx);
|
||||
isFixedCamera = (activeCam->setting == CAM_SET_PREREND_FIXED);
|
||||
polygon1 = &room->mesh->polygon1;
|
||||
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
|
||||
bgImage = func_80096A74(polygon1, globalCtx);
|
||||
|
@ -436,7 +435,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
|
|||
Vec3f skyboxOffset;
|
||||
|
||||
gfx = POLY_OPA_DISP;
|
||||
Camera_GetSkyboxOffset(&skyboxOffset, camera);
|
||||
Camera_GetSkyboxOffset(&skyboxOffset, activeCam);
|
||||
func_8009638C(&gfx, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height, bgImage->fmt,
|
||||
bgImage->siz, bgImage->mode0, bgImage->tlutCount,
|
||||
(skyboxOffset.x + skyboxOffset.z) * 1.2f + skyboxOffset.y * 0.6f,
|
||||
|
|
|
@ -178,7 +178,7 @@ void func_8086C054(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
if (this->dyna.actor.xzDistToPlayer < 250.0f) {
|
||||
BgBdanObjects_SetContactRu1(this, 1);
|
||||
this->timer = 20;
|
||||
OnePointCutscene_Init(globalCtx, 3070, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3070, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
player->actor.world.pos.x = -1130.0f;
|
||||
player->actor.world.pos.y = -1025.0f;
|
||||
player->actor.world.pos.z = -3300.0f;
|
||||
|
@ -255,7 +255,7 @@ void func_8086C3D8(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
|
||||
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + 140.0f;
|
||||
this->actionFunc = func_8086C5BC;
|
||||
OnePointCutscene_Init(globalCtx, 3080, -99, this->dyna.actor.child, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3080, -99, this->dyna.actor.child, CAM_ID_MAIN);
|
||||
player->actor.world.pos.x = -1130.0f;
|
||||
player->actor.world.pos.y = -1025.0f;
|
||||
player->actor.world.pos.z = -3500.0f;
|
||||
|
@ -328,7 +328,7 @@ void func_8086C76C(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
if (func_8004356C(&this->dyna)) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
this->actionFunc = func_8086C7D0;
|
||||
OnePointCutscene_Init(globalCtx, 3090, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3090, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -352,13 +352,13 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->switchFlag == 0) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
this->cameraSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(globalCtx->cameraPtrs[MAIN_CAM], 4);
|
||||
this->cameraSetting = globalCtx->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(globalCtx->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
this->switchFlag = 10;
|
||||
}
|
||||
} else {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
if (!func_8004356C(&this->dyna)) {
|
||||
if (this->switchFlag != 0) {
|
||||
this->switchFlag--;
|
||||
|
@ -366,8 +366,8 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->switchFlag == 0) {
|
||||
if (1) {}
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], this->cameraSetting);
|
||||
func_8005ACFC(globalCtx->cameraPtrs[MAIN_CAM], 4);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], this->cameraSetting);
|
||||
func_8005ACFC(globalCtx->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
}
|
||||
}
|
||||
this->dyna.actor.world.pos.y =
|
||||
|
@ -416,7 +416,7 @@ void func_8086CB10(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
this->timer = 50;
|
||||
this->actionFunc = func_8086CB8C;
|
||||
this->dyna.actor.home.pos.y -= 200.0f;
|
||||
OnePointCutscene_Init(globalCtx, 3100, 51, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3100, 51, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,8 @@ void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
if (this->timer == 0) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
|
||||
this->actionFunc = BgBdanObjects_DoNothing;
|
||||
Gameplay_CopyCamera(globalCtx, MAIN_CAM, SUBCAM_ACTIVE);
|
||||
// Using `CAM_ID_NONE` here defaults to the active camera
|
||||
Gameplay_CopyCamera(globalCtx, CAM_ID_MAIN, CAM_ID_NONE);
|
||||
} else {
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ void BgDdanJd_Idle(BgDdanJd* this, GlobalContext* globalCtx) {
|
|||
this->state = STATE_GO_MIDDLE_FROM_BOTTOM;
|
||||
this->idleTimer = 0;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE;
|
||||
OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
if (this->idleTimer == 0) {
|
||||
this->idleTimer = IDLE_FRAMES;
|
||||
|
@ -160,7 +160,7 @@ void BgDdanJd_Move(BgDdanJd* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE;
|
||||
this->idleTimer = 0;
|
||||
this->actionFunc = BgDdanJd_Idle;
|
||||
OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else if (Math_StepToF(&this->dyna.actor.world.pos.y, this->targetY, this->ySpeed)) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_PILLAR_MOVE_STOP);
|
||||
this->actionFunc = BgDdanJd_Idle;
|
||||
|
|
|
@ -103,7 +103,7 @@ void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) {
|
|||
if ((explosive != NULL) && (this->prevExplosive != NULL) && (explosive != this->prevExplosive) &&
|
||||
(Math_Vec3f_DistXZ(&this->prevExplosivePos, &explosive->world.pos) > 80.0f)) {
|
||||
BgDdanKd_SetupAction(this, BgDdanKd_LowerStairs);
|
||||
OnePointCutscene_Init(globalCtx, 3050, 999, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3050, 999, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
|
|
|
@ -161,14 +161,14 @@ void BgDodoago_WaitExplosives(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
BgDodoago_SetupAction(this, BgDodoago_OpenJaw);
|
||||
OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else if (globalCtx->roomCtx.unk_74[this->state] == 0) {
|
||||
OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, CAM_ID_MAIN);
|
||||
BgDodoago_SetupAction(this, BgDodoago_LightOneEye);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
OnePointCutscene_Init(globalCtx, 3065, 20, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3065, 20, &this->dyna.actor, CAM_ID_MAIN);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sTimer += 30;
|
||||
|
|
|
@ -292,9 +292,9 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
globalCtx->envCtx.unk_BF = 2;
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
OnePointCutscene_Init(globalCtx, 8603, -99, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 8603, -99, NULL, CAM_ID_MAIN);
|
||||
} else {
|
||||
OnePointCutscene_Init(globalCtx, 8604, -99, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 8604, -99, NULL, CAM_ID_MAIN);
|
||||
};
|
||||
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
|
||||
|
|
|
@ -248,7 +248,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s16 i;
|
||||
Gfx* phi_s2;
|
||||
Gfx* phi_s1;
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
Actor* actor;
|
||||
BgGanonOtyuka* platform;
|
||||
BossGanon* ganondorf;
|
||||
|
@ -282,7 +282,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
platform = (BgGanonOtyuka*)actor;
|
||||
|
||||
if (platform->dyna.actor.projectedPos.z > spBC) {
|
||||
if (camera->eye.y > platform->dyna.actor.world.pos.y) {
|
||||
if (mainCam->eye.y > platform->dyna.actor.world.pos.y) {
|
||||
phi_s2 = sPlatformTopDL;
|
||||
} else {
|
||||
phi_s2 = sPlatformBottomDL;
|
||||
|
@ -293,7 +293,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (platform->isFalling) {
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(platform->dyna.actor.shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(platform->dyna.actor.shape.rot.z), MTXMODE_APPLY);
|
||||
if (camera->eye.y > platform->dyna.actor.world.pos.y) {
|
||||
if (mainCam->eye.y > platform->dyna.actor.world.pos.y) {
|
||||
phi_s1 = sPlatformBottomDL;
|
||||
} else {
|
||||
phi_s1 = sPlatformTopDL;
|
||||
|
|
|
@ -108,7 +108,7 @@ void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, GlobalContext* globalCtx) {
|
|||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params) && !Player_InCsMode(globalCtx)) {
|
||||
this->counter = 25;
|
||||
this->actionFunc = BgHakaHuta_Open;
|
||||
OnePointCutscene_Init(globalCtx, 6001, 999, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 6001, 999, &this->dyna.actor, CAM_ID_MAIN);
|
||||
if (this->unk_16A == 2) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_FIREFLY,
|
||||
(this->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(this->dyna.actor.shape.rot.y) +
|
||||
|
|
|
@ -94,7 +94,7 @@ void BgHakaShip_WaitForSong(BgHakaShip* this, GlobalContext* globalCtx) {
|
|||
this->counter = 130;
|
||||
this->actionFunc = BgHakaShip_CutsceneStationary;
|
||||
osSyncPrintf("シーン 外輪船 ... アァクション!!\n");
|
||||
OnePointCutscene_Init(globalCtx, 3390, 999, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3390, 999, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ void func_80883000(BgHakaZou* this, GlobalContext* globalCtx) {
|
|||
if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
|
||||
this->timer = 20;
|
||||
this->actionFunc = func_80883144;
|
||||
OnePointCutscene_Init(globalCtx, 3400, 999, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3400, 999, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else if (this->dyna.actor.params == 2) {
|
||||
func_80882E54(this, globalCtx);
|
||||
this->dyna.actor.draw = NULL;
|
||||
|
|
|
@ -321,13 +321,13 @@ void BgHeavyBlock_Wait(BgHeavyBlock* this, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->dyna.actor.params & 0xFF) {
|
||||
case HEAVYBLOCK_BREAKABLE:
|
||||
OnePointCutscene_Init(globalCtx, 4020, 270, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4020, 270, &this->dyna.actor, CAM_ID_MAIN);
|
||||
break;
|
||||
case HEAVYBLOCK_UNBREAKABLE:
|
||||
OnePointCutscene_Init(globalCtx, 4021, 220, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4021, 220, &this->dyna.actor, CAM_ID_MAIN);
|
||||
break;
|
||||
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
|
||||
OnePointCutscene_Init(globalCtx, 4022, 210, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4022, 210, &this->dyna.actor, CAM_ID_MAIN);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,11 +127,11 @@ void BgHidanCurtain_WaitForSwitchOn(BgHidanCurtain* this, GlobalContext* globalC
|
|||
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
|
||||
if (this->type == 1) {
|
||||
this->actionFunc = BgHidanCurtain_WaitForCutscene;
|
||||
OnePointCutscene_Init(globalCtx, 3350, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3350, -99, &this->actor, CAM_ID_MAIN);
|
||||
this->timer = 50;
|
||||
} else if (this->type == 3) {
|
||||
this->actionFunc = BgHidanCurtain_WaitForCutscene;
|
||||
OnePointCutscene_Init(globalCtx, 3360, 60, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3360, 60, &this->actor, CAM_ID_MAIN);
|
||||
this->timer = 30;
|
||||
} else {
|
||||
this->actionFunc = BgHidanCurtain_TurnOff;
|
||||
|
@ -205,8 +205,8 @@ void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
BgHidanCurtainParams* hcParams = &sHCParams[this->size];
|
||||
f32 riseProgress;
|
||||
|
||||
if ((globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_SLOW_CHEST_CS) ||
|
||||
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TURN_AROUND)) {
|
||||
if ((globalCtx->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_SLOW_CHEST_CS) ||
|
||||
(globalCtx->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_TURN_AROUND)) {
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
} else {
|
||||
if (this->collider.base.atFlags & AT_HIT) {
|
||||
|
|
|
@ -129,10 +129,10 @@ void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->unk_16A == 0) {
|
||||
this->unk_16A = 3;
|
||||
}
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
if (this->unk_16A != 0) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16A = 0;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ void BgHidanFwbig_UpdatePosition(BgHidanFwbig* this) {
|
|||
void BgHidanFwbig_WaitForSwitch(BgHidanFwbig* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
|
||||
this->actionFunc = BgHidanFwbig_WaitForCs;
|
||||
OnePointCutscene_Init(globalCtx, 3340, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3340, -99, &this->actor, CAM_ID_MAIN);
|
||||
this->timer = 35;
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void BgHidanFwbig_WaitForPlayer(BgHidanFwbig* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (player->actor.world.pos.x < 1150.0f) {
|
||||
this->actionFunc = BgHidanFwbig_Rise;
|
||||
OnePointCutscene_Init(globalCtx, 3290, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3290, -99, &this->actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ void func_80888734(BgHidanHamstep* this) {
|
|||
|
||||
void func_808887C4(BgHidanHamstep* this, GlobalContext* globalCtx) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
OnePointCutscene_Init(globalCtx, 3310, 100, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3310, 100, &this->dyna.actor, CAM_ID_MAIN);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH);
|
||||
this->collider.base.acFlags = AC_NONE;
|
||||
BgHidanHamstep_SetupAction(this, 1);
|
||||
|
|
|
@ -264,10 +264,10 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_169 = 0;
|
||||
}
|
||||
|
@ -317,10 +317,10 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_169 = 0;
|
||||
}
|
||||
|
|
|
@ -112,10 +112,10 @@ void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->unk_168 == 0) {
|
||||
this->unk_168 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
if (this->unk_168 != 0) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_168 = 0;
|
||||
}
|
||||
|
|
|
@ -189,9 +189,9 @@ void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
tempIsRiding = func_8004356C(&this->dyna) ? true : false;
|
||||
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
|
||||
if (tempIsRiding) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!tempIsRiding && this->isLinkRiding) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
}
|
||||
this->isLinkRiding = tempIsRiding;
|
||||
|
|
|
@ -143,7 +143,7 @@ void BgJyaBombchuiwa_SetupWaitForExplosion(BgJyaBombchuiwa* this, GlobalContext*
|
|||
void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {
|
||||
if ((this->collider.base.acFlags & AC_HIT) || (this->timer > 0)) {
|
||||
if (this->timer == 0) {
|
||||
OnePointCutscene_Init(globalCtx, 3410, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3410, -99, &this->actor, CAM_ID_MAIN);
|
||||
}
|
||||
this->timer++;
|
||||
if (this->timer > 10) {
|
||||
|
|
|
@ -80,7 +80,7 @@ void func_80899880(BgJyaKanaami* this) {
|
|||
void func_80899894(BgJyaKanaami* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || this->unk_16A > 0) {
|
||||
if (this->dyna.actor.world.pos.x > -1000.0f && this->unk_16A == 0) {
|
||||
OnePointCutscene_Init(globalCtx, 3450, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3450, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
this->unk_16A += 1;
|
||||
if (this->unk_16A >= 0xA) {
|
||||
|
|
|
@ -95,7 +95,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx) {
|
|||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || (this->moveDelay > 0)) {
|
||||
this->moveDelay++;
|
||||
if (this->moveDelay >= 20) {
|
||||
OnePointCutscene_Init(globalCtx, 3430, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3430, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
BgJyaLift_SetupMove(this);
|
||||
}
|
||||
}
|
||||
|
@ -136,10 +136,10 @@ void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DIRECTED_YAW);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW);
|
||||
} else if (((this->dyna.unk_160 & 4) == 0) && (this->unk_16B & 4) &&
|
||||
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
(globalCtx->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16B = this->dyna.unk_160;
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) {
|
|||
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
|
||||
BgJyaMegami_SetupExplode(this);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
|
||||
OnePointCutscene_Init(globalCtx, 3440, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3440, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
if (this->lightTimer < 8) {
|
||||
this->crumbleIndex = 0;
|
||||
|
|
|
@ -93,7 +93,7 @@ void BgMizuShutter_Destroy(BgMizuShutter* thisx, GlobalContext* globalCtx) {
|
|||
void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) {
|
||||
if (ABS(this->dyna.actor.world.rot.x) > 0x2C60) {
|
||||
OnePointCutscene_Init(globalCtx, 4510, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4510, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ void BgMizuWater_WaitForAction(BgMizuWater* this, GlobalContext* globalCtx) {
|
|||
waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(this->actor.params, globalCtx);
|
||||
if (waterLevelActionIndex != 0) {
|
||||
if (prevSwitchFlag != sWaterLevels[waterLevelActionIndex].switchFlag) {
|
||||
OnePointCutscene_Init(globalCtx, 3120, -100 - waterLevelActionIndex, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3120, -100 - waterLevelActionIndex, NULL, CAM_ID_MAIN);
|
||||
this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag;
|
||||
this->targetY = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY;
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ void BgMoriBigst_StalfosFight(BgMoriBigst* this, GlobalContext* globalCtx) {
|
|||
if ((this->dyna.actor.home.rot.z == 0) &&
|
||||
((this->dyna.actor.home.pos.y - 5.0f) <= GET_PLAYER(globalCtx)->actor.world.pos.y)) {
|
||||
BgMoriBigst_SetupFall(this, globalCtx);
|
||||
OnePointCutscene_Init(globalCtx, 3220, 72, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3220, 72, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
|
||||
BgMoriBigst_SetupLanding(this, globalCtx);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
|
||||
OnePointCutscene_Init(globalCtx, 1020, 8, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 1020, 8, &this->dyna.actor, CAM_ID_MAIN);
|
||||
func_8002DF38(globalCtx, NULL, 0x3C);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,8 +168,8 @@ void BgMoriElevator_MoveIntoGround(BgMoriElevator* this, GlobalContext* globalCt
|
|||
|
||||
void func_808A1CF4(BgMoriElevator* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = BgMoriElevator_MoveAboveGround;
|
||||
OnePointCutscene_Init(globalCtx, 3230, 70, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 1020, 15, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3230, 70, &this->dyna.actor, CAM_ID_MAIN);
|
||||
OnePointCutscene_Init(globalCtx, 1020, 15, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
|
||||
void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -136,7 +136,7 @@ void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx) {
|
|||
if (this->gateTimer > 30) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
|
||||
BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateOpen);
|
||||
OnePointCutscene_Init(globalCtx, 6010, 20, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 6010, 20, &this->dyna.actor, CAM_ID_MAIN);
|
||||
sUnkTimer++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ void BgMoriHineri_SpawnBossKeyChest(BgMoriHineri* this, GlobalContext* globalCtx
|
|||
void BgMoriHineri_DoNothing(BgMoriHineri* this, GlobalContext* globalCtx);
|
||||
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx);
|
||||
|
||||
static s16 sNextCamIdx = SUBCAM_NONE;
|
||||
static s16 sSubCamId = CAM_ID_NONE;
|
||||
|
||||
const ActorInit Bg_Mori_Hineri_InitVars = {
|
||||
ACTOR_BG_MORI_HINERI,
|
||||
|
@ -170,14 +170,14 @@ void func_808A3C8C(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
|
||||
f0 = 1100.0f - (player->actor.world.pos.z - this->dyna.actor.world.pos.z);
|
||||
this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f;
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON1);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
if (this->dyna.actor.params != 0) {
|
||||
this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z;
|
||||
}
|
||||
}
|
||||
|
||||
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
|
||||
s16 mainCamChildIdx;
|
||||
s16 mainCamChildId;
|
||||
|
||||
if ((Flags_GetSwitch(globalCtx, this->switchFlag) &&
|
||||
(this->dyna.actor.params == 0 || this->dyna.actor.params == 2)) ||
|
||||
|
@ -186,34 +186,34 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.draw = BgMoriHineri_DrawHallAndRoom;
|
||||
this->actionFunc = func_808A3E54;
|
||||
|
||||
mainCamChildIdx = globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx;
|
||||
if ((mainCamChildIdx != SUBCAM_FREE) &&
|
||||
(globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_CS_TWISTED_HALLWAY)) {
|
||||
OnePointCutscene_EndCutscene(globalCtx, mainCamChildIdx);
|
||||
mainCamChildId = globalCtx->cameraPtrs[CAM_ID_MAIN]->childCamId;
|
||||
if ((mainCamChildId != CAM_ID_MAIN) &&
|
||||
(globalCtx->cameraPtrs[mainCamChildId]->setting == CAM_SET_CS_TWISTED_HALLWAY)) {
|
||||
OnePointCutscene_EndCutscene(globalCtx, mainCamChildId);
|
||||
}
|
||||
OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, MAIN_CAM);
|
||||
sNextCamIdx = OnePointCutscene_Init(globalCtx, 3261, 40, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, CAM_ID_MAIN);
|
||||
sSubCamId = OnePointCutscene_Init(globalCtx, 3261, 40, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) {
|
||||
s8 objBankIndex;
|
||||
|
||||
if (globalCtx->activeCamera == sNextCamIdx) {
|
||||
if (sNextCamIdx != MAIN_CAM) {
|
||||
if (globalCtx->activeCamId == sSubCamId) {
|
||||
if (sSubCamId != SUB_CAM_ID_DONE) {
|
||||
objBankIndex = this->dyna.actor.objBankIndex;
|
||||
this->dyna.actor.objBankIndex = this->moriHineriObjIdx;
|
||||
this->moriHineriObjIdx = objBankIndex;
|
||||
this->dyna.actor.params ^= 1;
|
||||
sNextCamIdx = MAIN_CAM;
|
||||
sSubCamId = SUB_CAM_ID_DONE;
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
} else {
|
||||
this->dyna.actor.draw = NULL;
|
||||
this->actionFunc = func_808A3D58;
|
||||
sNextCamIdx = SUBCAM_NONE;
|
||||
sSubCamId = CAM_ID_NONE;
|
||||
}
|
||||
}
|
||||
if ((sNextCamIdx >= SUBCAM_FIRST) &&
|
||||
if ((sSubCamId >= CAM_ID_SUB_FIRST) &&
|
||||
((GET_ACTIVE_CAM(globalCtx)->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) {
|
||||
func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG);
|
||||
}
|
||||
|
|
|
@ -119,10 +119,10 @@ void BgMoriIdomizu_Main(BgMoriIdomizu* this, GlobalContext* globalCtx) {
|
|||
this->targetWaterLevel = 184.0f;
|
||||
}
|
||||
if (switchFlagSet && !this->prevSwitchFlagSet) {
|
||||
OnePointCutscene_Init(globalCtx, 3240, 70, thisx, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3240, 70, thisx, CAM_ID_MAIN);
|
||||
this->drainTimer = 90;
|
||||
} else if (!switchFlagSet && this->prevSwitchFlagSet) {
|
||||
OnePointCutscene_Init(globalCtx, 3240, 70, thisx, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3240, 70, thisx, CAM_ID_MAIN);
|
||||
this->drainTimer = 90;
|
||||
thisx->world.pos.y = 0.0f;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ void BgMoriRakkatenjo_Rest(BgMoriRakkatenjo* this, GlobalContext* globalCtx);
|
|||
void BgMoriRakkatenjo_SetupRise(BgMoriRakkatenjo* this);
|
||||
void BgMoriRakkatenjo_Rise(BgMoriRakkatenjo* this, GlobalContext* globalCtx);
|
||||
|
||||
static s16 sCamSetting = 0;
|
||||
static s16 sCamSetting = CAM_SET_NONE;
|
||||
|
||||
const ActorInit Bg_Mori_Rakkatenjo_InitVars = {
|
||||
ACTOR_BG_MORI_RAKKATENJO,
|
||||
|
@ -74,7 +74,7 @@ void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionHeader_GetVirtual(&gMoriRakkatenjoCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
BgMoriRakkatenjo_SetupWaitForMoriTex(this);
|
||||
sCamSetting = 0;
|
||||
sCamSetting = CAM_SET_NONE;
|
||||
}
|
||||
|
||||
void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -206,14 +206,14 @@ void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (BgMoriRakkatenjo_IsLinkUnder(this, globalCtx)) {
|
||||
if (sCamSetting == CAM_SET_NONE) {
|
||||
osSyncPrintf("camera changed (mori rakka tenjyo) ... \n");
|
||||
sCamSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
|
||||
Camera_SetCameraData(globalCtx->cameraPtrs[MAIN_CAM], 1, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FOREST_BIRDS_EYE);
|
||||
sCamSetting = globalCtx->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_SetCameraData(globalCtx->cameraPtrs[CAM_ID_MAIN], 1, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||
}
|
||||
} else if (sCamSetting != CAM_SET_NONE) {
|
||||
osSyncPrintf("camera changed (previous) ... \n");
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON1);
|
||||
sCamSetting = 0;
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
sCamSetting = CAM_SET_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ void BgPoEvent_BlockWait(BgPoEvent* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.pos.y = 833.0f;
|
||||
if (sPuzzleState == 0x3F) {
|
||||
if (this->type == 1) {
|
||||
OnePointCutscene_Init(globalCtx, 3150, 65, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3150, 65, NULL, CAM_ID_MAIN);
|
||||
}
|
||||
this->timer = 45;
|
||||
this->actionFunc = BgPoEvent_BlockShake;
|
||||
|
@ -340,7 +340,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0,
|
||||
this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300);
|
||||
if (amy != NULL) {
|
||||
OnePointCutscene_Init(globalCtx, 3170, 30, amy, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3170, 30, amy, CAM_ID_MAIN);
|
||||
}
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
gSaveContext.timer1State = 0xA;
|
||||
|
@ -536,12 +536,12 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, GlobalContext* globalCtx) {
|
|||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_PO_SISTERS, thisx->world.pos.x,
|
||||
thisx->world.pos.y - 40.0f, thisx->world.pos.z, 0, thisx->shape.rot.y, 0,
|
||||
thisx->params + ((this->type - 1) << 8));
|
||||
OnePointCutscene_Init(globalCtx, 3160, 80, thisx, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3160, 80, thisx, CAM_ID_MAIN);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
|
||||
} else {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH2);
|
||||
OnePointCutscene_Init(globalCtx, 3160, 35, thisx, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3160, 35, thisx, CAM_ID_MAIN);
|
||||
}
|
||||
if (thisx->parent != NULL) {
|
||||
thisx->parent->child = NULL;
|
||||
|
|
|
@ -70,7 +70,7 @@ void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) {
|
|||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->state = WATERFALL_OPENING_ANIMATED;
|
||||
this->timer = 40;
|
||||
OnePointCutscene_Init(globalCtx, 4100, -99, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4100, -99, NULL, CAM_ID_MAIN);
|
||||
}
|
||||
} else if (this->state == WATERFALL_OPENING_IDLE) {
|
||||
this->timer--;
|
||||
|
|
|
@ -315,7 +315,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, GlobalContext* globalCtx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
OnePointCutscene_Init(globalCtx, 4120, 170, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4120, 170, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ void func_808B2970(BgSpot11Oasis* this) {
|
|||
|
||||
void func_808B2980(BgSpot11Oasis* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetEnv(globalCtx, 5) && func_808B280C(globalCtx)) {
|
||||
OnePointCutscene_Init(globalCtx, 4150, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4150, -99, &this->actor, CAM_ID_MAIN);
|
||||
func_808B29E0(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ void func_808B30C0(BgSpot12Gate* this) {
|
|||
void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
|
||||
func_808B3134(this);
|
||||
OnePointCutscene_Init(globalCtx, 4160, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4160, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ void func_808B357C(BgSpot12Saku* this, GlobalContext* globalCtx) {
|
|||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
|
||||
func_808B35E4(this);
|
||||
this->timer = 20;
|
||||
OnePointCutscene_Init(globalCtx, 4170, -99, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4170, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -410,7 +410,7 @@ void func_808B57E0(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
|
|||
currentBomb = sPlayerBomb;
|
||||
if (currentBomb->timer > 0) {
|
||||
sTimer = currentBomb->timer + 20;
|
||||
OnePointCutscene_Init(globalCtx, 4180, sTimer, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4180, sTimer, NULL, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_11) {
|
||||
|
@ -440,7 +440,7 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
|
|||
|
||||
func_808B561C(this, globalCtx);
|
||||
|
||||
OnePointCutscene_Init(globalCtx, 4180, 50, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4180, 50, NULL, CAM_ID_MAIN);
|
||||
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_23);
|
||||
|
|
|
@ -176,7 +176,7 @@ void func_808B7AEC(BgSpot18Basket* this) {
|
|||
|
||||
void func_808B7AFC(BgSpot18Basket* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
OnePointCutscene_Init(globalCtx, 4220, 80, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4220, 80, &this->dyna.actor, CAM_ID_MAIN);
|
||||
func_808B7B58(this);
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ void func_808B7BCC(BgSpot18Basket* this, GlobalContext* globalCtx) {
|
|||
if (positionDiff > 120.0f && positionDiff < 200.0f) {
|
||||
if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.ac->world.pos.x,
|
||||
this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) {
|
||||
OnePointCutscene_Init(globalCtx, 4210, 240, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4210, 240, &this->dyna.actor, CAM_ID_MAIN);
|
||||
func_808B7D38(this);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void func_808B9618(BgSpot18Shutter* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_808B9698;
|
||||
} else {
|
||||
this->actionFunc = func_808B971C;
|
||||
OnePointCutscene_Init(globalCtx, 4221, 140, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4221, 140, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,9 +61,9 @@ void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx) {
|
|||
if (1) {}
|
||||
|
||||
if (func_80043590(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BOSS_BONGO);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_BOSS_BONGO);
|
||||
} else {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
||||
if (func_8004356C(&this->dyna) && (player->fallDistance > 1000.0f)) {
|
||||
|
|
|
@ -139,7 +139,7 @@ void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
|
|||
this->timer = 260;
|
||||
this->dyna.actor.draw = BgYdanHasi_Draw;
|
||||
this->actionFunc = BgYdanHasi_UpdateThreeBlocks;
|
||||
OnePointCutscene_Init(globalCtx, 3040, 30, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3040, 30, &this->dyna.actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ void func_808BF078(BgYdanMaruta* this, GlobalContext* globalCtx) {
|
|||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
this->actionFunc = func_808BF108;
|
||||
OnePointCutscene_Init(globalCtx, 3010, 50, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3010, 50, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
|
|
@ -402,7 +402,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, GlobalContext* globalCtx) {
|
|||
} else if (player->heldItemActionParam == PLAYER_AP_STICK && player->unk_860 != 0) {
|
||||
func_8002DBD0(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
|
||||
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
|
||||
OnePointCutscene_Init(globalCtx, 3020, 40, &this->dyna.actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3020, 40, &this->dyna.actor, CAM_ID_MAIN);
|
||||
Math_Vec3f_Copy(&this->dyna.actor.home.pos, &player->meleeWeaponInfo[0].tip);
|
||||
BgYdanSp_BurnWeb(this, globalCtx);
|
||||
}
|
||||
|
|
|
@ -238,14 +238,13 @@ void BossDodongo_SetupIntroCutscene(BossDodongo* this, GlobalContext* globalCtx)
|
|||
|
||||
void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
||||
f32 phi_f0;
|
||||
Camera* camera;
|
||||
Player* player;
|
||||
Vec3f sp60;
|
||||
Vec3f sp54;
|
||||
Vec3f sp48;
|
||||
Camera* mainCam;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Vec3f subCamEye;
|
||||
Vec3f subCamAt;
|
||||
Vec3f subCamUp;
|
||||
|
||||
player = GET_PLAYER(globalCtx);
|
||||
camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
if (this->unk_196 != 0) {
|
||||
this->unk_196--;
|
||||
|
@ -272,14 +271,14 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
Gameplay_ClearAllSubCameras(globalCtx);
|
||||
this->cutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->cutsceneCamera, 7);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->csState = 2;
|
||||
this->unk_196 = 0x3C;
|
||||
this->unk_198 = 160;
|
||||
player->actor.world.pos.y = -1023.76f;
|
||||
this->cameraEye.y = player->actor.world.pos.y - 480.0f + 50.0f;
|
||||
this->subCamEye.y = player->actor.world.pos.y - 480.0f + 50.0f;
|
||||
case 2:
|
||||
if (this->unk_198 >= 131) {
|
||||
player->actor.world.pos.x = -890.0f;
|
||||
|
@ -288,12 +287,12 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
player->actor.speedXZ = 0.0f;
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = 0x3FFF;
|
||||
|
||||
this->cameraEye.x = -890.0f;
|
||||
this->cameraEye.z = player->actor.world.pos.z - 100.0f;
|
||||
this->subCamEye.x = -890.0f;
|
||||
this->subCamEye.z = player->actor.world.pos.z - 100.0f;
|
||||
|
||||
this->cameraAt.x = player->actor.world.pos.x;
|
||||
this->cameraAt.y = player->actor.world.pos.y + 20.0f;
|
||||
this->cameraAt.z = player->actor.world.pos.z;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = player->actor.world.pos.y + 20.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
if (this->unk_198 == 110) {
|
||||
|
@ -323,14 +322,14 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_196 == 0) {
|
||||
Math_SmoothStepToF(&this->cameraEye.x, this->vec.x + 30.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.y, this->vec.y, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, this->vec.z + 10.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, this->vec.x + 30.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, this->vec.y, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, this->vec.z + 10.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_204, 1.0f, 1.0f, 0.02f, 0.0f);
|
||||
} else {
|
||||
this->cameraAt.x = player->actor.world.pos.x;
|
||||
this->cameraAt.y = player->actor.world.pos.y + 20.0f;
|
||||
this->cameraAt.z = player->actor.world.pos.z;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = player->actor.world.pos.y + 20.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
|
@ -357,10 +356,10 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
case 3:
|
||||
BossDodongo_Walk(this, globalCtx);
|
||||
Math_SmoothStepToF(&this->unk_20C, sinf(this->unk_19E * 0.05f) * 0.1f, 1.0f, 0.01f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.x, this->vec.x + 90.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.y, this->vec.y + 50.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, this->vec.z, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.y, this->vec.y - 10.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, this->vec.x + 90.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, this->vec.y + 50.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, this->vec.z, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, this->vec.y - 10.0f, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_204, 1.0f, 1.0f, 0.02f, 0.0f);
|
||||
if (fabsf(player->actor.world.pos.x - this->actor.world.pos.x) < 200.0f) {
|
||||
this->csState = 4;
|
||||
|
@ -380,16 +379,16 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
phi_f0 = 0.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->cameraEye.x, player->actor.world.pos.x + phi_f0 + 70.0f, 0.2f,
|
||||
Math_SmoothStepToF(&this->subCamEye.x, player->actor.world.pos.x + phi_f0 + 70.0f, 0.2f,
|
||||
this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.y, player->actor.world.pos.y + 10.0f, 0.2f, this->unk_204 * 20.0f,
|
||||
Math_SmoothStepToF(&this->subCamEye.y, player->actor.world.pos.y + 10.0f, 0.2f, this->unk_204 * 20.0f,
|
||||
0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, player->actor.world.pos.z - 60.0f, 0.2f, this->unk_204 * 20.0f,
|
||||
Math_SmoothStepToF(&this->subCamEye.z, player->actor.world.pos.z - 60.0f, 0.2f, this->unk_204 * 20.0f,
|
||||
0.0f);
|
||||
|
||||
Math_SmoothStepToF(&this->cameraAt.x, this->vec.x, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.y, this->vec.y, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.z, this->vec.z, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->vec.x, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, this->vec.y, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->vec.z, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_204, 1.0f, 1.0f, 0.02f, 0.0f);
|
||||
|
||||
if (this->unk_196 == 0) {
|
||||
|
@ -411,11 +410,11 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_198 == 0) {
|
||||
camera->eye = this->cameraEye;
|
||||
camera->eyeNext = this->cameraEye;
|
||||
camera->at = this->cameraAt;
|
||||
func_800C08AC(globalCtx, this->cutsceneCamera, 0);
|
||||
this->cutsceneCamera = 0;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
BossDodongo_SetupWalk(this);
|
||||
|
@ -427,26 +426,26 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->cutsceneCamera != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (this->unk_1B6 != 0) {
|
||||
this->unk_1B6--;
|
||||
}
|
||||
|
||||
sp60.x = this->cameraEye.x;
|
||||
subCamEye.x = this->subCamEye.x;
|
||||
phi_f0 = sinf((this->unk_1B6 * 3.1415f * 90.0f) / 180.0f);
|
||||
sp60.y = (this->unk_1B6 * phi_f0 * 0.7f) + this->cameraEye.y;
|
||||
sp60.z = this->cameraEye.z;
|
||||
subCamEye.y = (this->unk_1B6 * phi_f0 * 0.7f) + this->subCamEye.y;
|
||||
subCamEye.z = this->subCamEye.z;
|
||||
|
||||
sp54.x = this->cameraAt.x;
|
||||
subCamAt.x = this->subCamAt.x;
|
||||
phi_f0 = sinf((this->unk_1B6 * 3.1415f * 90.0f) / 180.0f);
|
||||
sp54.y = (this->unk_1B6 * phi_f0 * 0.7f) + this->cameraAt.y;
|
||||
sp54.z = this->cameraAt.z;
|
||||
subCamAt.y = (this->unk_1B6 * phi_f0 * 0.7f) + this->subCamAt.y;
|
||||
subCamAt.z = this->subCamAt.z;
|
||||
|
||||
sp48.x = this->unk_20C;
|
||||
sp48.y = 1.0f;
|
||||
sp48.z = this->unk_20C;
|
||||
subCamUp.x = this->unk_20C;
|
||||
subCamUp.y = 1.0f;
|
||||
subCamUp.z = this->unk_20C;
|
||||
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->cutsceneCamera, &sp54, &sp60, &sp48);
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->subCamId, &subCamAt, &subCamEye, &subCamUp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -676,7 +675,7 @@ void BossDodongo_Walk(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_WALK);
|
||||
}
|
||||
|
||||
if (this->cutsceneCamera == 0) {
|
||||
if (this->subCamId == SUB_CAM_ID_DONE) {
|
||||
func_80033E88(&this->actor, globalCtx, 4, 10);
|
||||
} else {
|
||||
this->unk_1B6 = 10;
|
||||
|
@ -1295,7 +1294,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
f32 sp178;
|
||||
s16 i;
|
||||
Vec3f effectPos;
|
||||
Camera* camera;
|
||||
Camera* mainCam;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
@ -1305,16 +1304,16 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
this->csState = 5;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
this->cutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_UNK3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->cutsceneCamera, CAM_STAT_ACTIVE);
|
||||
camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
this->cameraEye.x = camera->eye.x;
|
||||
this->cameraEye.y = camera->eye.y;
|
||||
this->cameraEye.z = camera->eye.z;
|
||||
this->cameraAt.x = camera->at.x;
|
||||
this->cameraAt.y = camera->at.y;
|
||||
this->cameraAt.z = camera->at.z;
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_UNK3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
mainCam = Gameplay_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;
|
||||
break;
|
||||
case 5:
|
||||
tempSin = Math_SinS(this->actor.shape.rot.y - 0x1388) * 150.0f;
|
||||
|
@ -1324,12 +1323,12 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->unk_208, 0.07f, 1.0f, 0.005f, 0.0f);
|
||||
tempSin = Math_SinS(this->actor.world.rot.y) * 230.0f;
|
||||
tempCos = Math_CosS(this->actor.world.rot.y) * 230.0f;
|
||||
Math_SmoothStepToF(&this->cameraEye.x, this->actor.world.pos.x + tempSin, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, this->actor.world.pos.z + tempCos, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraAt.y, this->actor.focus.pos.y - 70.0f, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, this->actor.world.pos.x + tempSin, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, this->actor.world.pos.z + tempCos, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, this->actor.focus.pos.y - 70.0f, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.1f);
|
||||
if (Animation_OnFrame(&this->skelAnime, Animation_GetLastFrame(&object_kingdodongo_Anim_002D0C))) {
|
||||
Animation_Change(&this->skelAnime, &object_kingdodongo_Anim_003CF8, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&object_kingdodongo_Anim_003CF8), ANIMMODE_ONCE, -1.0f);
|
||||
|
@ -1339,9 +1338,9 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
Math_SmoothStepToF(&this->cameraAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraAt.y, (this->actor.world.pos.y - 70.0f) + 130.0f, 0.2f, 20.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, (this->actor.world.pos.y - 70.0f) + 130.0f, 0.2f, 20.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.1f);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, Animation_GetLastFrame(&object_kingdodongo_Anim_003CF8))) {
|
||||
Animation_Change(&this->skelAnime, &object_kingdodongo_Anim_00DF38, 1.0f, 30.0f, 59.0f, ANIMMODE_ONCE,
|
||||
|
@ -1356,11 +1355,11 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 7:
|
||||
this->unk_1C4 += 0x7D0;
|
||||
Math_SmoothStepToF(&this->cameraAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.y, (this->actor.world.pos.y - 70.0f) + 130.0f, 0.2f, 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.x, -890.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, -3304.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, (this->actor.world.pos.y - 70.0f) + 130.0f, 0.2f, 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, -890.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, -3304.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->unk_204, 1.0f, 1.0f, 0.1f, 0.0f);
|
||||
if (this->unk_1DA == 1) {
|
||||
this->csState = 8;
|
||||
|
@ -1436,8 +1435,8 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_1DA == 884) {
|
||||
Animation_Change(&this->skelAnime, &object_kingdodongo_Anim_0042A8, 1.0f, 0.0f,
|
||||
(f32)Animation_GetLastFrame(&object_kingdodongo_Anim_0042A8), ANIMMODE_LOOP, -20.0f);
|
||||
tempSin = this->cameraEye.x - this->actor.world.pos.x;
|
||||
tempCos = this->cameraEye.z - this->actor.world.pos.z;
|
||||
tempSin = this->subCamEye.x - this->actor.world.pos.x;
|
||||
tempCos = this->subCamEye.z - this->actor.world.pos.z;
|
||||
this->unk_22C = sqrtf(SQ(tempSin) + SQ(tempCos));
|
||||
this->unk_230 = Math_FAtan2F(tempSin, tempCos);
|
||||
this->unk_1DC = 350;
|
||||
|
@ -1542,9 +1541,9 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->unk_238, 0.0f, 0.05f, 40.0f, 0.0f);
|
||||
}
|
||||
Math_SmoothStepToF(&this->unk_234, 0.0f, 0.2f, 17.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.y, (this->actor.world.pos.y - 70.0f) + 130.0f, 0.2f, 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->actor.world.pos.x, 0.2f, 30.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, (this->actor.world.pos.y - 70.0f) + 130.0f, 0.2f, 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->actor.world.pos.z, 0.2f, 30.0f, 0.0f);
|
||||
if (this->csState == 9) {
|
||||
if (this->unk_1DA < 0x2C6) {
|
||||
Vec3f spAC[] = { { -390.0f, 0.0f, -3304.0f },
|
||||
|
@ -1565,10 +1564,10 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
sp78 = &sp7C[this->unk_1A0];
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->cameraEye.x, sp78->x, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.y, player->actor.world.pos.y + 30.0f, 0.1f,
|
||||
Math_SmoothStepToF(&this->subCamEye.x, sp78->x, 0.2f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, player->actor.world.pos.y + 30.0f, 0.1f,
|
||||
this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, sp78->z, 0.1f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, sp78->z, 0.1f, this->unk_204 * 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_204, 1.0f, 1.0f, 0.02f, 0.0f);
|
||||
} else {
|
||||
if (this->unk_1A2 == 0) {
|
||||
|
@ -1579,9 +1578,9 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->unk_22C, 220.0f, 0.1f, 5.0f, 0.1f);
|
||||
tempSin = sinf(this->unk_230) * (*this).unk_22C;
|
||||
tempCos = cosf(this->unk_230) * (*this).unk_22C;
|
||||
Math_SmoothStepToF(&this->cameraEye.x, this->actor.world.pos.x + tempSin, 0.2f, 50.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 50.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, this->actor.world.pos.z + tempCos, 0.2f, 50.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, this->actor.world.pos.x + tempSin, 0.2f, 50.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 50.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, this->actor.world.pos.z + tempCos, 0.2f, 50.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_23C, 0.0f, 0.2f, 0.01f, 0.0f);
|
||||
}
|
||||
} else {
|
||||
|
@ -1592,8 +1591,8 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->unk_23C, 0.5f, 0.2f, 0.05f, 0.0f);
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->cameraEye.x, -890.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->cameraEye.z, -3304.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, -890.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, -3304.0f, 0.1f, this->unk_204 * 5.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->unk_204, 1.0f, 1.0f, 0.05f, 0.0f);
|
||||
}
|
||||
|
||||
|
@ -1605,15 +1604,15 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
Math_CosS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
}
|
||||
if (this->unk_1DA == 600) {
|
||||
camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera->eye = this->cameraEye;
|
||||
camera->eyeNext = this->cameraEye;
|
||||
camera->at = this->cameraAt;
|
||||
func_800C08AC(globalCtx, this->cutsceneCamera, 0);
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->unk_1BC = 0;
|
||||
this->cutsceneCamera = MAIN_CAM;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->csState = 100;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, -890.0f, -1523.76f,
|
||||
|
@ -1635,8 +1634,8 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (this->cutsceneCamera != MAIN_CAM) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &this->cameraAt, &this->cameraEye);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ typedef struct BossDodongo {
|
|||
/* 0x01AE */ s16 unk_1AE;
|
||||
/* 0x01B0 */ s16 unk_1B0;
|
||||
/* 0x01B2 */ char unk_1B2[0x2];
|
||||
/* 0x01B4 */ s16 cutsceneCamera;
|
||||
/* 0x01B4 */ s16 subCamId;
|
||||
/* 0x01B6 */ s16 unk_1B6;
|
||||
/* 0x01B8 */ s16 playerYawInRange;
|
||||
/* 0x01BA */ s16 playerPosInRange;
|
||||
|
@ -93,8 +93,8 @@ typedef struct BossDodongo {
|
|||
/* 0x0404 */ Vec3f unk_404;
|
||||
/* 0x0410 */ Vec3f unk_410;
|
||||
/* 0x041C */ Vec3f mouthPos;
|
||||
/* 0x0428 */ Vec3f cameraEye;
|
||||
/* 0x0434 */ Vec3f cameraAt;
|
||||
/* 0x0428 */ Vec3f subCamEye;
|
||||
/* 0x0434 */ Vec3f subCamAt;
|
||||
/* 0x0440 */ ColliderJntSph collider;
|
||||
/* 0x0460 */ ColliderJntSphElement items[19];
|
||||
/* 0x0920 */ BossDodongoEffect effects[BOSS_DODONGO_EFFECT_COUNT];
|
||||
|
|
|
@ -140,33 +140,33 @@ void BossFd_SpawnFireBreath(BossFdEffect* effect, Vec3f* position, Vec3f* veloci
|
|||
}
|
||||
}
|
||||
|
||||
void BossFd_SetCameraSpeed(BossFd* this, f32 speedMod) {
|
||||
this->camData.eyeVel.x = fabsf(this->camData.eye.x - this->camData.nextEye.x) * speedMod;
|
||||
this->camData.eyeVel.y = fabsf(this->camData.eye.y - this->camData.nextEye.y) * speedMod;
|
||||
this->camData.eyeVel.z = fabsf(this->camData.eye.z - this->camData.nextEye.z) * speedMod;
|
||||
this->camData.atVel.x = fabsf(this->camData.at.x - this->camData.nextAt.x) * speedMod;
|
||||
this->camData.atVel.y = fabsf(this->camData.at.y - this->camData.nextAt.y) * speedMod;
|
||||
this->camData.atVel.z = fabsf(this->camData.at.z - this->camData.nextAt.z) * speedMod;
|
||||
void BossFd_SetCameraSpeed(BossFd* this, f32 velFactor) {
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEye.x - this->subCamEyeNext.x) * velFactor;
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEye.y - this->subCamEyeNext.y) * velFactor;
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEye.z - this->subCamEyeNext.z) * velFactor;
|
||||
this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * velFactor;
|
||||
this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * velFactor;
|
||||
this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * velFactor;
|
||||
}
|
||||
|
||||
void BossFd_UpdateCamera(BossFd* this, GlobalContext* globalCtx) {
|
||||
if (this->introCamera != SUBCAM_FREE) {
|
||||
Math_ApproachF(&this->camData.eye.x, this->camData.nextEye.x, this->camData.eyeMaxVel.x,
|
||||
this->camData.eyeVel.x * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.eye.y, this->camData.nextEye.y, this->camData.eyeMaxVel.y,
|
||||
this->camData.eyeVel.y * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.eye.z, this->camData.nextEye.z, this->camData.eyeMaxVel.z,
|
||||
this->camData.eyeVel.z * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.at.x, this->camData.nextAt.x, this->camData.atMaxVel.x,
|
||||
this->camData.atVel.x * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.at.y, this->camData.nextAt.y, this->camData.atMaxVel.y,
|
||||
this->camData.atVel.y * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.at.z, this->camData.nextAt.z, this->camData.atMaxVel.z,
|
||||
this->camData.atVel.z * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.speedMod, 1.0f, 1.0f, this->camData.accel);
|
||||
this->camData.at.y += this->camData.yMod;
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->introCamera, &this->camData.at, &this->camData.eye);
|
||||
Math_ApproachZeroF(&this->camData.yMod, 1.0f, 0.1f);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x,
|
||||
this->subCamEyeVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamEyeMaxVelFrac.y,
|
||||
this->subCamEyeVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z,
|
||||
this->subCamEyeVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x,
|
||||
this->subCamAtVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z,
|
||||
this->subCamAtVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel);
|
||||
this->subCamAt.y += this->subCamAtYOffset;
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
Math_ApproachZeroF(&this->subCamAtYOffset, 1.0f, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->introState != BFD_CS_NONE) {
|
||||
Player* player2 = GET_PLAYER(globalCtx);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
switch (this->introState) {
|
||||
case BFD_CS_WAIT:
|
||||
|
@ -316,44 +316,44 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
this->introState = BFD_CS_START;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->introCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->introCamera, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
player2->actor.world.pos.x = 380.0f;
|
||||
player2->actor.world.pos.y = 100.0f;
|
||||
player2->actor.world.pos.z = 0.0f;
|
||||
player2->actor.shape.rot.y = player2->actor.world.rot.y = -0x4000;
|
||||
player2->actor.speedXZ = 0.0f;
|
||||
this->camData.eye.x = player2->actor.world.pos.x - 70.0f;
|
||||
this->camData.eye.y = player2->actor.world.pos.y + 40.0f;
|
||||
this->camData.eye.z = player2->actor.world.pos.z + 70.0f;
|
||||
this->camData.at.x = player2->actor.world.pos.x;
|
||||
this->camData.at.y = player2->actor.world.pos.y + 30.0f;
|
||||
this->camData.at.z = player2->actor.world.pos.z;
|
||||
this->camData.nextEye.x = player2->actor.world.pos.x - 50.0f + 18.0f;
|
||||
this->camData.nextEye.y = player2->actor.world.pos.y + 40;
|
||||
this->camData.nextEye.z = player2->actor.world.pos.z + 50.0f - 18.0f;
|
||||
this->camData.nextAt.x = player2->actor.world.pos.x;
|
||||
this->camData.nextAt.y = player2->actor.world.pos.y + 50.0f;
|
||||
this->camData.nextAt.z = player2->actor.world.pos.z;
|
||||
this->subCamEye.x = player2->actor.world.pos.x - 70.0f;
|
||||
this->subCamEye.y = player2->actor.world.pos.y + 40.0f;
|
||||
this->subCamEye.z = player2->actor.world.pos.z + 70.0f;
|
||||
this->subCamAt.x = player2->actor.world.pos.x;
|
||||
this->subCamAt.y = player2->actor.world.pos.y + 30.0f;
|
||||
this->subCamAt.z = player2->actor.world.pos.z;
|
||||
this->subCamEyeNext.x = player2->actor.world.pos.x - 50.0f + 18.0f;
|
||||
this->subCamEyeNext.y = player2->actor.world.pos.y + 40;
|
||||
this->subCamEyeNext.z = player2->actor.world.pos.z + 50.0f - 18.0f;
|
||||
this->subCamAtNext.x = player2->actor.world.pos.x;
|
||||
this->subCamAtNext.y = player2->actor.world.pos.y + 50.0f;
|
||||
this->subCamAtNext.z = player2->actor.world.pos.z;
|
||||
BossFd_SetCameraSpeed(this, 1.0f);
|
||||
this->camData.atMaxVel.x = this->camData.atMaxVel.y = this->camData.atMaxVel.z = 0.05f;
|
||||
this->camData.eyeMaxVel.x = this->camData.eyeMaxVel.y = this->camData.eyeMaxVel.z = 0.05f;
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f;
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.05f;
|
||||
this->timers[0] = 0;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.0f;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
this->introState = BFD_CS_EMERGE;
|
||||
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
||||
this->camData.nextEye.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
||||
this->camData.nextEye.z = player2->actor.world.pos.z + 200.0f - 150.0f;
|
||||
this->camData.nextAt.x = 0.0f;
|
||||
this->camData.nextAt.y = 120.0f;
|
||||
this->camData.nextAt.z = 0.0f;
|
||||
this->subCamEyeNext.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
||||
this->subCamEyeNext.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
||||
this->subCamEyeNext.z = player2->actor.world.pos.z + 200.0f - 150.0f;
|
||||
this->subCamAtNext.x = 0.0f;
|
||||
this->subCamAtNext.y = 120.0f;
|
||||
this->subCamAtNext.z = 0.0f;
|
||||
BossFd_SetCameraSpeed(this, 0.5f);
|
||||
this->camData.eyeMaxVel.x = this->camData.eyeMaxVel.y = this->camData.eyeMaxVel.z = 0.1f;
|
||||
this->camData.atMaxVel.x = this->camData.atMaxVel.y = this->camData.atMaxVel.z = 0.1f;
|
||||
this->camData.accel = 0.005f;
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.1f;
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f;
|
||||
this->subCamAccel = 0.005f;
|
||||
this->timers[0] = 0;
|
||||
this->holeIndex = 1;
|
||||
this->targetPosition.x = sHoleLocations[this->holeIndex].x;
|
||||
|
@ -371,7 +371,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case BFD_CS_START:
|
||||
if (this->timers[0] == 0) {
|
||||
this->camData.accel = 0.0010000002f;
|
||||
this->subCamAccel = 0.0010000002f;
|
||||
this->timers[0] = 100;
|
||||
this->introState = BFD_CS_LOOK_LINK;
|
||||
}
|
||||
|
@ -388,46 +388,46 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
|
||||
Math_ApproachF(&this->camData.shake, 2.0f, 1.0f, 0.8 * 0.01f);
|
||||
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
|
||||
Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f);
|
||||
}
|
||||
if (this->timers[0] == 40) {
|
||||
func_8002DF54(globalCtx, &this->actor, 0x13);
|
||||
}
|
||||
if (this->timers[0] == 0) {
|
||||
this->introState = BFD_CS_LOOK_GROUND;
|
||||
this->camData.nextAt.y = player2->actor.world.pos.y + 10.0f;
|
||||
this->camData.atMaxVel.y = 0.2f;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.02f;
|
||||
this->subCamAtNext.y = player2->actor.world.pos.y + 10.0f;
|
||||
this->subCamAtMaxVelFrac.y = 0.2f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.02f;
|
||||
this->timers[0] = 70;
|
||||
this->work[BFD_MOVE_TIMER] = 0;
|
||||
}
|
||||
break;
|
||||
case BFD_CS_LOOK_GROUND:
|
||||
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
|
||||
Math_ApproachF(&this->camData.shake, 2.0f, 1.0f, 0.8 * 0.01f);
|
||||
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
|
||||
Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f);
|
||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (this->timers[0] == 0) {
|
||||
this->introState = BFD_CS_COLLAPSE;
|
||||
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f;
|
||||
this->camData.nextEye.y = player2->actor.world.pos.y + 100.0f;
|
||||
this->camData.nextEye.z = player2->actor.world.pos.z + 200.0f;
|
||||
this->camData.nextAt.x = player2->actor.world.pos.x;
|
||||
this->camData.nextAt.y = player2->actor.world.pos.y - 150.0f;
|
||||
this->camData.nextAt.z = player2->actor.world.pos.z - 50.0f;
|
||||
this->subCamEyeNext.x = player2->actor.world.pos.x + 100.0f + 300.0f;
|
||||
this->subCamEyeNext.y = player2->actor.world.pos.y + 100.0f;
|
||||
this->subCamEyeNext.z = player2->actor.world.pos.z + 200.0f;
|
||||
this->subCamAtNext.x = player2->actor.world.pos.x;
|
||||
this->subCamAtNext.y = player2->actor.world.pos.y - 150.0f;
|
||||
this->subCamAtNext.z = player2->actor.world.pos.z - 50.0f;
|
||||
BossFd_SetCameraSpeed(this, 0.1f);
|
||||
this->timers[0] = 170;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.0f;
|
||||
func_8002DF54(globalCtx, &this->actor, 0x14);
|
||||
}
|
||||
break;
|
||||
case BFD_CS_COLLAPSE:
|
||||
this->camData.accel = 0.005f;
|
||||
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
|
||||
Math_ApproachF(&this->camData.shake, 2.0f, 1.0f, 0.8 * 0.01f);
|
||||
this->subCamAccel = 0.005f;
|
||||
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
|
||||
Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f);
|
||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (this->timers[0] == 100) {
|
||||
|
@ -435,17 +435,17 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->timers[0] == 0) {
|
||||
this->introState = BFD_CS_EMERGE;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
||||
this->camData.nextEye.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
||||
this->camData.nextEye.z = player2->actor.world.pos.z + 200.0f - 150.0f;
|
||||
this->camData.nextAt.x = 0.0f;
|
||||
this->camData.nextAt.y = 120.0f;
|
||||
this->camData.nextAt.z = 0.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamEyeNext.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
||||
this->subCamEyeNext.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
||||
this->subCamEyeNext.z = player2->actor.world.pos.z + 200.0f - 150.0f;
|
||||
this->subCamAtNext.x = 0.0f;
|
||||
this->subCamAtNext.y = 120.0f;
|
||||
this->subCamAtNext.z = 0.0f;
|
||||
BossFd_SetCameraSpeed(this, 0.5f);
|
||||
this->camData.atMaxVel.x = this->camData.atMaxVel.y = this->camData.atMaxVel.z = 0.1f;
|
||||
this->camData.eyeMaxVel.x = this->camData.eyeMaxVel.y = this->camData.eyeMaxVel.z = 0.1f;
|
||||
this->camData.accel = 0.005f;
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f;
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.1f;
|
||||
this->subCamAccel = 0.005f;
|
||||
this->timers[0] = 0;
|
||||
this->holeIndex = 1;
|
||||
this->targetPosition.x = sHoleLocations[this->holeIndex].x;
|
||||
|
@ -461,24 +461,24 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case BFD_CS_EMERGE:
|
||||
osSyncPrintf("WAY_SPD X = %f\n", this->camData.atVel.x);
|
||||
osSyncPrintf("WAY_SPD Y = %f\n", this->camData.atVel.y);
|
||||
osSyncPrintf("WAY_SPD Z = %f\n", this->camData.atVel.z);
|
||||
osSyncPrintf("WAY_SPD X = %f\n", this->subCamAtVel.x);
|
||||
osSyncPrintf("WAY_SPD Y = %f\n", this->subCamAtVel.y);
|
||||
osSyncPrintf("WAY_SPD Z = %f\n", this->subCamAtVel.z);
|
||||
if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
if (this->timers[3] == 190) {
|
||||
this->camData.atMaxVel.x = this->camData.atMaxVel.y = this->camData.atMaxVel.z = 0.05f;
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f;
|
||||
this->platformSignal = VBSIMA_KILL;
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
}
|
||||
if (this->actor.world.pos.y > 120.0f) {
|
||||
this->camData.nextAt = this->actor.world.pos;
|
||||
this->camData.atVel.x = 190.0f;
|
||||
this->camData.atVel.y = 85.56f;
|
||||
this->camData.atVel.z = 25.0f;
|
||||
this->subCamAtNext = this->actor.world.pos;
|
||||
this->subCamAtVel.x = 190.0f;
|
||||
this->subCamAtVel.y = 85.56f;
|
||||
this->subCamAtVel.z = 25.0f;
|
||||
} else {
|
||||
// the following `temp` stuff is probably fake but is required to match
|
||||
// it's optimized to 1.0f because sp1CF is false at this point, but the 0.1f ends up in rodata
|
||||
|
@ -486,8 +486,8 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
if (!sp1CF) {
|
||||
temp = 1.0f;
|
||||
}
|
||||
Math_ApproachF(&this->camData.shake, 2.0f, temp, 0.1 * 0.08f);
|
||||
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
|
||||
Math_ApproachF(&this->subCamShake, 2.0f, temp, 0.1 * 0.08f);
|
||||
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
|
||||
}
|
||||
if (this->timers[3] == 160) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
|
@ -497,10 +497,10 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
if (this->timers[3] <= 100) {
|
||||
this->camData.eyeVel.x = this->camData.eyeVel.y = this->camData.eyeVel.z = 2.0f;
|
||||
this->camData.nextEye.x = player2->actor.world.pos.x + 50.0f;
|
||||
this->camData.nextEye.y = player2->actor.world.pos.y + 50.0f;
|
||||
this->camData.nextEye.z = player2->actor.world.pos.z + 50.0f;
|
||||
this->subCamEyeVel.x = this->subCamEyeVel.y = this->subCamEyeVel.z = 2.0f;
|
||||
this->subCamEyeNext.x = player2->actor.world.pos.x + 50.0f;
|
||||
this->subCamEyeNext.y = player2->actor.world.pos.y + 50.0f;
|
||||
this->subCamEyeNext.z = player2->actor.world.pos.z + 50.0f;
|
||||
}
|
||||
if (this->work[BFD_ACTION_STATE] == BOSSFD_FLY_HOLE) {
|
||||
switch (this->introFlyState) {
|
||||
|
@ -514,7 +514,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case INTRO_FLY_CAMERA:
|
||||
this->targetPosition = this->camData.eye;
|
||||
this->targetPosition = this->subCamEye;
|
||||
if (this->timers[5] == 0) {
|
||||
this->timers[0] = 0;
|
||||
this->holeIndex = 7;
|
||||
|
@ -534,11 +534,12 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("this->timer[2] = %d\n", this->timers[2]);
|
||||
osSyncPrintf("this->timer[5] = %d\n", this->timers[5]);
|
||||
if (this->timers[2] == 0) {
|
||||
mainCam->eye = this->camData.eye;
|
||||
mainCam->eyeNext = this->camData.eye;
|
||||
mainCam->at = this->camData.at;
|
||||
func_800C08AC(globalCtx, this->introCamera, 0);
|
||||
this->introState = this->introFlyState = this->introCamera = BFD_CS_NONE;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
// BFD_CS_NONE / BOSSFD_FLY_MAIN / SUB_CAM_ID_DONE
|
||||
this->introState = this->introFlyState = this->subCamId = 0;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->actionFunc = BossFd_Wait;
|
||||
|
|
|
@ -73,22 +73,6 @@ typedef struct {
|
|||
/* 0x1E0 */ Vec3f head;
|
||||
} BossFdMane; // size = 0x1EC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f eye;
|
||||
/* 0x0C */ Vec3f at;
|
||||
/* 0x18 */ Vec3f pad[2];
|
||||
/* 0x30 */ Vec3f eyeVel;
|
||||
/* 0x3C */ Vec3f atVel;
|
||||
/* 0x48 */ Vec3f nextEye;
|
||||
/* 0x54 */ Vec3f eyeMaxVel;
|
||||
/* 0x60 */ Vec3f nextAt;
|
||||
/* 0x6C */ Vec3f atMaxVel;
|
||||
/* 0x78 */ f32 speedMod;
|
||||
/* 0x7C */ f32 accel;
|
||||
/* 0x80 */ f32 yMod;
|
||||
/* 0x84 */ f32 shake;
|
||||
} BossFdCam; // size = 0x88
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ BFD_ACTION_STATE,
|
||||
/* 1 */ BFD_MOVE_TIMER,
|
||||
|
@ -175,8 +159,21 @@ typedef struct BossFd {
|
|||
/* 0x13F4 */ Vec3f headPos;
|
||||
/* 0x1400 */ s16 introFlyState;
|
||||
/* 0x1402 */ s16 introState;
|
||||
/* 0x1404 */ s16 introCamera;
|
||||
/* 0x1408 */ BossFdCam camData;
|
||||
/* 0x1404 */ s16 subCamId;
|
||||
/* 0x1408 */ Vec3f subCamEye;
|
||||
/* 0x1414 */ Vec3f subCamAt;
|
||||
/* 0x1420 */ Vec3f subCamUp;
|
||||
/* 0x142C */ Vec3f pad;
|
||||
/* 0x1438 */ Vec3f subCamEyeVel;
|
||||
/* 0x1444 */ Vec3f subCamAtVel;
|
||||
/* 0x1450 */ Vec3f subCamEyeNext;
|
||||
/* 0x145C */ Vec3f subCamEyeMaxVelFrac;
|
||||
/* 0x1468 */ Vec3f subCamAtNext;
|
||||
/* 0x1474 */ Vec3f subCamAtMaxVelFrac;
|
||||
/* 0x1480 */ f32 subCamVelFactor;
|
||||
/* 0x1484 */ f32 subCamAccel;
|
||||
/* 0x1488 */ f32 subCamAtYOffset;
|
||||
/* 0x148C */ f32 subCamShake;
|
||||
/* 0x1490 */ ColliderJntSph collider;
|
||||
/* 0x14B0 */ ColliderJntSphElement elements[19];
|
||||
/* 0x1970 */ BossFdEffect effects[BOSSFD_EFFECT_COUNT];
|
||||
|
|
|
@ -616,23 +616,23 @@ void BossFd2_SetupDeath(BossFd2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void BossFd2_UpdateCamera(BossFd2* this, GlobalContext* globalCtx) {
|
||||
if (this->deathCamera != SUBCAM_FREE) {
|
||||
Math_ApproachF(&this->camData.eye.x, this->camData.nextEye.x, this->camData.eyeMaxVel.x,
|
||||
this->camData.eyeVel.x * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.eye.y, this->camData.nextEye.y, this->camData.eyeMaxVel.y,
|
||||
this->camData.eyeVel.y * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.eye.z, this->camData.nextEye.z, this->camData.eyeMaxVel.z,
|
||||
this->camData.eyeVel.z * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.at.x, this->camData.nextAt.x, this->camData.atMaxVel.x,
|
||||
this->camData.atVel.x * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.at.y, this->camData.nextAt.y, this->camData.atMaxVel.y,
|
||||
this->camData.atVel.y * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.at.z, this->camData.nextAt.z, this->camData.atMaxVel.z,
|
||||
this->camData.atVel.z * this->camData.speedMod);
|
||||
Math_ApproachF(&this->camData.speedMod, 1.0f, 1.0f, this->camData.accel);
|
||||
this->camData.at.y += this->camData.yMod;
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->deathCamera, &this->camData.at, &this->camData.eye);
|
||||
Math_ApproachF(&this->camData.yMod, 0.0f, 1.0f, 0.1f);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x,
|
||||
this->subCamEyeVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamEyeMaxVelFrac.y,
|
||||
this->subCamEyeVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z,
|
||||
this->subCamEyeVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x,
|
||||
this->subCamAtVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z,
|
||||
this->subCamAtVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel);
|
||||
this->subCamAt.y += this->subCamAtYOffset;
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
Math_ApproachF(&this->subCamAtYOffset, 0.0f, 1.0f, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -641,7 +641,7 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
|
|||
Vec3f sp70;
|
||||
Vec3f sp64;
|
||||
BossFd* bossFd = (BossFd*)this->actor.parent;
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
f32 pad3;
|
||||
f32 pad2;
|
||||
f32 pad1;
|
||||
|
@ -654,26 +654,26 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
|
|||
this->deathState = DEATH_RETREAT;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
this->deathCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->deathCamera, CAM_STAT_ACTIVE);
|
||||
this->camData.eye = mainCam->eye;
|
||||
this->camData.at = mainCam->at;
|
||||
this->camData.eyeVel.x = 100.0f;
|
||||
this->camData.eyeVel.y = 100.0f;
|
||||
this->camData.eyeVel.z = 100.0f;
|
||||
this->camData.atVel.x = 100.0f;
|
||||
this->camData.atVel.y = 100.0f;
|
||||
this->camData.atVel.z = 100.0f;
|
||||
this->camData.accel = 0.02f;
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamEye = mainCam->eye;
|
||||
this->subCamAt = mainCam->at;
|
||||
this->subCamEyeVel.x = 100.0f;
|
||||
this->subCamEyeVel.y = 100.0f;
|
||||
this->subCamEyeVel.z = 100.0f;
|
||||
this->subCamAtVel.x = 100.0f;
|
||||
this->subCamAtVel.y = 100.0f;
|
||||
this->subCamAtVel.z = 100.0f;
|
||||
this->subCamAccel = 0.02f;
|
||||
this->timers[0] = 0;
|
||||
this->work[FD2_HOLE_COUNTER] = 0;
|
||||
this->camData.eyeMaxVel.x = 0.1f;
|
||||
this->camData.eyeMaxVel.y = 0.1f;
|
||||
this->camData.eyeMaxVel.z = 0.1f;
|
||||
this->camData.atMaxVel.x = 0.1f;
|
||||
this->camData.atMaxVel.y = 0.1f;
|
||||
this->camData.atMaxVel.z = 0.1f;
|
||||
this->subCamEyeMaxVelFrac.x = 0.1f;
|
||||
this->subCamEyeMaxVelFrac.y = 0.1f;
|
||||
this->subCamEyeMaxVelFrac.z = 0.1f;
|
||||
this->subCamAtMaxVelFrac.x = 0.1f;
|
||||
this->subCamAtMaxVelFrac.y = 0.1f;
|
||||
this->subCamAtMaxVelFrac.z = 0.1f;
|
||||
case DEATH_RETREAT:
|
||||
this->work[FD2_HOLE_COUNTER]++;
|
||||
if (this->work[FD2_HOLE_COUNTER] < 15) {
|
||||
|
@ -697,13 +697,13 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
|
|||
sp70.y = 0.0f;
|
||||
sp70.z = 250.0f;
|
||||
Matrix_MultVec3f(&sp70, &sp64);
|
||||
this->camData.nextEye.x = this->actor.world.pos.x + sp64.x;
|
||||
this->camData.nextEye.y = 140.0f;
|
||||
this->camData.nextEye.z = this->actor.world.pos.z + sp64.z;
|
||||
this->subCamEyeNext.x = this->actor.world.pos.x + sp64.x;
|
||||
this->subCamEyeNext.y = 140.0f;
|
||||
this->subCamEyeNext.z = this->actor.world.pos.z + sp64.z;
|
||||
if (this->actor.focus.pos.y >= 90.0f) {
|
||||
this->camData.nextAt.y = this->actor.focus.pos.y;
|
||||
this->camData.nextAt.x = this->actor.focus.pos.x;
|
||||
this->camData.nextAt.z = this->actor.focus.pos.z;
|
||||
this->subCamAtNext.y = this->actor.focus.pos.y;
|
||||
this->subCamAtNext.x = this->actor.focus.pos.x;
|
||||
this->subCamAtNext.z = this->actor.focus.pos.z;
|
||||
}
|
||||
if (this->timers[0] == 0) {
|
||||
if (Animation_OnFrame(skelAnime, 20.0f)) {
|
||||
|
@ -723,7 +723,7 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
|
|||
this->deathState = DEATH_FD_BODY;
|
||||
bossFd->handoffSignal = FD2_SIGNAL_DEATH;
|
||||
this->work[FD2_ACTION_STATE] = 0;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
} else {
|
||||
Math_ApproachF(&this->actor.world.pos.y, -100.0f, 1.0f, 5.0f);
|
||||
}
|
||||
|
@ -731,54 +731,54 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
|
|||
case DEATH_FD_BODY:
|
||||
if (bossFd->actor.world.pos.y < 80.0f) {
|
||||
if (bossFd->actor.world.rot.x > 0x3000) {
|
||||
this->camData.nextAt = bossFd->actor.world.pos;
|
||||
this->camData.nextAt.y = 80.0f;
|
||||
this->camData.nextEye.x = bossFd->actor.world.pos.x;
|
||||
this->camData.nextEye.y = 150.0f;
|
||||
this->camData.nextEye.z = bossFd->actor.world.pos.z + 300.0f;
|
||||
this->subCamAtNext = bossFd->actor.world.pos;
|
||||
this->subCamAtNext.y = 80.0f;
|
||||
this->subCamEyeNext.x = bossFd->actor.world.pos.x;
|
||||
this->subCamEyeNext.y = 150.0f;
|
||||
this->subCamEyeNext.z = bossFd->actor.world.pos.z + 300.0f;
|
||||
}
|
||||
} else {
|
||||
this->camData.nextAt = bossFd->actor.world.pos;
|
||||
this->camData.nextEye.x = this->actor.world.pos.x;
|
||||
Math_ApproachF(&this->camData.nextEye.y, 200.0f, 1.0f, 2.0f);
|
||||
Math_ApproachF(&this->camData.nextEye.z, bossFd->actor.world.pos.z + 200.0f, 1.0f, 3.0f);
|
||||
this->subCamAtNext = bossFd->actor.world.pos;
|
||||
this->subCamEyeNext.x = this->actor.world.pos.x;
|
||||
Math_ApproachF(&this->subCamEyeNext.y, 200.0f, 1.0f, 2.0f);
|
||||
Math_ApproachF(&this->subCamEyeNext.z, bossFd->actor.world.pos.z + 200.0f, 1.0f, 3.0f);
|
||||
if (this->work[FD2_ACTION_STATE] == 0) {
|
||||
this->work[FD2_ACTION_STATE]++;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.02f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.02f;
|
||||
func_8002DF54(globalCtx, &bossFd->actor, 1);
|
||||
}
|
||||
}
|
||||
if ((bossFd->work[BFD_ACTION_STATE] == BOSSFD_BONES_FALL) && (bossFd->timers[0] == 5)) {
|
||||
this->deathState = DEATH_FD_SKULL;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.02f;
|
||||
this->camData.nextEye.y = 150.0f;
|
||||
this->camData.nextEye.z = bossFd->actor.world.pos.z + 300.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.02f;
|
||||
this->subCamEyeNext.y = 150.0f;
|
||||
this->subCamEyeNext.z = bossFd->actor.world.pos.z + 300.0f;
|
||||
}
|
||||
break;
|
||||
case DEATH_FD_SKULL:
|
||||
Math_ApproachF(&this->camData.nextAt.y, 100.0, 1.0f, 100.0f);
|
||||
this->camData.nextAt.x = 0.0f;
|
||||
this->camData.nextAt.z = 0.0f;
|
||||
this->camData.nextEye.x = 0.0f;
|
||||
this->camData.nextEye.y = 140.0f;
|
||||
Math_ApproachF(&this->camData.nextEye.z, 220.0f, 0.5f, 1.15f);
|
||||
Math_ApproachF(&this->subCamAtNext.y, 100.0, 1.0f, 100.0f);
|
||||
this->subCamAtNext.x = 0.0f;
|
||||
this->subCamAtNext.z = 0.0f;
|
||||
this->subCamEyeNext.x = 0.0f;
|
||||
this->subCamEyeNext.y = 140.0f;
|
||||
Math_ApproachF(&this->subCamEyeNext.z, 220.0f, 0.5f, 1.15f);
|
||||
if (bossFd->work[BFD_CAM_SHAKE_TIMER] != 0) {
|
||||
bossFd->work[BFD_CAM_SHAKE_TIMER]--;
|
||||
cameraShake = bossFd->work[BFD_CAM_SHAKE_TIMER] / 0.5f;
|
||||
if (cameraShake >= 20.0f) {
|
||||
cameraShake = 20.0f;
|
||||
}
|
||||
this->camData.yMod = (bossFd->work[BFD_CAM_SHAKE_TIMER] & 1) ? cameraShake : -cameraShake;
|
||||
this->subCamAtYOffset = (bossFd->work[BFD_CAM_SHAKE_TIMER] & 1) ? cameraShake : -cameraShake;
|
||||
}
|
||||
if (bossFd->work[BFD_ACTION_STATE] == BOSSFD_SKULL_BURN) {
|
||||
this->deathState = DEATH_FINISH;
|
||||
mainCam->eye = this->camData.eye;
|
||||
mainCam->eyeNext = this->camData.eye;
|
||||
mainCam->at = this->camData.at;
|
||||
func_800C08AC(globalCtx, this->deathCamera, 0);
|
||||
this->deathCamera = 0;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f,
|
||||
|
|
|
@ -23,22 +23,6 @@ typedef struct {
|
|||
/* 0x190 */ Vec3f head;
|
||||
} BossFd2Mane; // size = 0x19C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f eye;
|
||||
/* 0x0C */ Vec3f at;
|
||||
/* 0x18 */ Vec3f pad[2];
|
||||
/* 0x30 */ Vec3f eyeVel;
|
||||
/* 0x3C */ Vec3f atVel;
|
||||
/* 0x48 */ Vec3f nextEye;
|
||||
/* 0x54 */ Vec3f eyeMaxVel;
|
||||
/* 0x60 */ Vec3f nextAt;
|
||||
/* 0x6C */ Vec3f atMaxVel;
|
||||
/* 0x78 */ f32 speedMod;
|
||||
/* 0x7C */ f32 accel;
|
||||
/* 0x80 */ f32 yMod;
|
||||
/* 0x84 */ f32 shake;
|
||||
} BossFd2Cam; // size = 0x88
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FD2_TURN_TO_LINK,
|
||||
/* 1 */ FD2_ACTION_STATE,
|
||||
|
@ -83,8 +67,21 @@ typedef struct BossFd2 {
|
|||
/* 0x1388 */ char unk_1388[4];
|
||||
/* 0x138C */ f32 jawOpening;
|
||||
/* 0x1390 */ s16 deathState;
|
||||
/* 0x1392 */ s16 deathCamera;
|
||||
/* 0x1394 */ BossFd2Cam camData;
|
||||
/* 0x1392 */ s16 subCamId;
|
||||
/* 0x1394 */ Vec3f subCamEye;
|
||||
/* 0x13A0 */ Vec3f subCamAt;
|
||||
/* 0x13AC */ Vec3f subCamUp;
|
||||
/* 0x13B8 */ Vec3f pad;
|
||||
/* 0x13C4 */ Vec3f subCamEyeVel;
|
||||
/* 0x13D0 */ Vec3f subCamAtVel;
|
||||
/* 0x13DC */ Vec3f subCamEyeNext;
|
||||
/* 0x13E8 */ Vec3f subCamEyeMaxVelFrac;
|
||||
/* 0x13F4 */ Vec3f subCamAtNext;
|
||||
/* 0x1400 */ Vec3f subCamAtMaxVelFrac;
|
||||
/* 0x140C */ f32 subCamVelFactor;
|
||||
/* 0x1410 */ f32 subCamAccel;
|
||||
/* 0x1414 */ f32 subCamAtYOffset;
|
||||
/* 0x1418 */ f32 subCamShake;
|
||||
/* 0x141C */ ColliderJntSph collider;
|
||||
/* 0x143C */ ColliderJntSphElement elements[9];
|
||||
} BossFd2; // size = 0x167C
|
||||
|
|
|
@ -560,7 +560,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->csCamIndex = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||
this->csCamFov = 60.0f;
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->csTimer == 120) {
|
||||
mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->csCamEye;
|
||||
mainCam->eyeNext = this->csCamEye;
|
||||
mainCam->at = this->csCamAt;
|
||||
|
@ -1236,7 +1236,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx)
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->csCamIndex = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||
|
||||
this->actor.world.pos.x = 0.0f;
|
||||
|
@ -1507,7 +1507,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx)
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->csCamIndex = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime2_Anim_00ADDC, 0.0f);
|
||||
this->fwork[1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_00EA00);
|
||||
|
@ -1782,7 +1782,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx)
|
|||
this->csCamAt.z = (sZelda->actor.world.pos.z - 25.0f) + 80.0f;
|
||||
|
||||
if (this->csTimer > 50) {
|
||||
mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
mainCam->eye = this->csCamEye;
|
||||
mainCam->eyeNext = this->csCamEye;
|
||||
|
@ -4708,7 +4708,7 @@ void BossGanon_UpdateEffects(GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (eff->type == GDF_EFF_LIGHTNING) {
|
||||
if (eff->unk_3C == 0.0f) {
|
||||
eff->unk_44 = BINANG_TO_RAD_ALT(Camera_GetInputDirYaw(Gameplay_GetCamera(globalCtx, MAIN_CAM)));
|
||||
eff->unk_44 = BINANG_TO_RAD_ALT(Camera_GetInputDirYaw(Gameplay_GetCamera(globalCtx, CAM_ID_MAIN)));
|
||||
} else {
|
||||
eff->unk_44 = M_PI / 2;
|
||||
}
|
||||
|
|
|
@ -196,9 +196,9 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
if (Object_IsLoaded(&globalCtx->objectCtx, objectIdx)) {
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->unk_39E = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->unk_39C = 1;
|
||||
sZelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 970.0f,
|
||||
1086.0f, -200.0f, 0, 0, 0, 1);
|
||||
|
@ -207,13 +207,13 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sZelda->actor.world.pos.y = 1086.0f;
|
||||
sZelda->actor.world.pos.z = -214.0f;
|
||||
sZelda->actor.shape.rot.y = -0x7000;
|
||||
this->unk_3BC.x = 0.0f;
|
||||
this->unk_3BC.y = 1.0f;
|
||||
this->unk_3BC.z = 0.0f;
|
||||
this->subCamUp.x = 0.0f;
|
||||
this->subCamUp.y = 1.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
this->unk_398 = 0;
|
||||
this->unk_3A4.x = 0.0f;
|
||||
this->unk_3A4.y = 1400.0f;
|
||||
this->unk_3A4.z = 1600.0f;
|
||||
this->subCamEye.x = 0.0f;
|
||||
this->subCamEye.y = 1400.0f;
|
||||
this->subCamEye.z = 1600.0f;
|
||||
player->actor.world.pos.x = 970.0f;
|
||||
player->actor.world.pos.y = 1086.0f;
|
||||
player->actor.world.pos.z = -186.0f;
|
||||
|
@ -222,7 +222,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
// fake, tricks the compiler into allocating more stack
|
||||
if (zero) {
|
||||
this->unk_3A4.x *= 2.0;
|
||||
this->subCamEye.x *= 2.0;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
@ -232,12 +232,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
}
|
||||
this->unk_339 = 3;
|
||||
Math_ApproachF(&this->unk_3A4.x, 1500.0f, 0.1f, this->unk_410.x * 1500.0f);
|
||||
Math_ApproachF(&this->unk_3A4.z, -160.0f, 0.1f, this->unk_410.x * 1760.0f);
|
||||
Math_ApproachF(&this->subCamEye.x, 1500.0f, 0.1f, this->unk_410.x * 1500.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, -160.0f, 0.1f, this->unk_410.x * 1760.0f);
|
||||
Math_ApproachF(&this->unk_410.x, 0.0075f, 1.0f, 0.0001f);
|
||||
this->unk_3B0.x = -200.0f;
|
||||
this->unk_3B0.y = 1086.0f;
|
||||
this->unk_3B0.z = -200.0f;
|
||||
this->subCamAt.x = -200.0f;
|
||||
this->subCamAt.y = 1086.0f;
|
||||
this->subCamAt.z = -200.0f;
|
||||
if (this->unk_398 == 150) {
|
||||
Message_StartTextbox(globalCtx, 0x70D3, NULL);
|
||||
}
|
||||
|
@ -270,17 +270,17 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sZelda->unk_3C8 = 2;
|
||||
func_8002DF54(globalCtx, &this->actor, 0x4F);
|
||||
}
|
||||
this->unk_3A4.x = 930.0f;
|
||||
this->unk_3A4.y = 1129.0f;
|
||||
this->unk_3A4.z = -181.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.z = (player->actor.world.pos.z - 15.0f) + 5.0f;
|
||||
this->subCamEye.x = 930.0f;
|
||||
this->subCamEye.y = 1129.0f;
|
||||
this->subCamEye.z = -181.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.z = (player->actor.world.pos.z - 15.0f) + 5.0f;
|
||||
if (this->unk_398 > 104) {
|
||||
Math_ApproachF(&this->unk_3B0.y, player->actor.world.pos.y + 47.0f + 7.0f + 15.0f, 0.1f,
|
||||
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 47.0f + 7.0f + 15.0f, 0.1f,
|
||||
this->unk_410.x);
|
||||
Math_ApproachF(&this->unk_410.x, 2.0f, 1.0f, 0.1f);
|
||||
} else {
|
||||
this->unk_3B0.y = player->actor.world.pos.y + 47.0f + 7.0f;
|
||||
this->subCamAt.y = player->actor.world.pos.y + 47.0f + 7.0f;
|
||||
}
|
||||
if ((this->unk_398 > 170) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
this->unk_39C = 3;
|
||||
|
@ -289,7 +289,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
Math_ApproachF(&this->unk_3B0.y, player->actor.world.pos.y + 47.0f + 7.0f, 0.1f, 2.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 47.0f + 7.0f, 0.1f, 2.0f);
|
||||
this->unk_339 = 4;
|
||||
if (this->unk_398 == 10) {
|
||||
func_80078914(&D_80906D6C, NA_SE_EV_STONE_BOUND);
|
||||
|
@ -309,17 +309,17 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 4:
|
||||
this->unk_339 = 4;
|
||||
Math_ApproachF(&this->unk_3A4.x, -360.0f, 0.1f, this->unk_410.x * 1290.0f);
|
||||
Math_ApproachF(&this->unk_3A4.z, -20.0f, 0.1f, this->unk_410.x * 170.0f);
|
||||
Math_ApproachF(&this->subCamEye.x, -360.0f, 0.1f, this->unk_410.x * 1290.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, -20.0f, 0.1f, this->unk_410.x * 170.0f);
|
||||
Math_ApproachF(&this->unk_410.x, 0.04f, 1.0f, 0.0005f);
|
||||
if (this->unk_398 == 100) {
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
camera->eye = this->unk_3A4;
|
||||
camera->eyeNext = this->unk_3A4;
|
||||
camera->at = this->unk_3B0;
|
||||
func_800C08AC(globalCtx, this->unk_39E, 0);
|
||||
this->unk_39E = 0;
|
||||
camera->eye = this->subCamEye;
|
||||
camera->eyeNext = this->subCamEye;
|
||||
camera->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->unk_39C = 5;
|
||||
|
@ -333,9 +333,9 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_39C = 10;
|
||||
this->unk_398 = 0;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_39E = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -348,12 +348,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sZelda->actor.world.pos.z = -186.0f;
|
||||
player->actor.shape.rot.y = -0x4000;
|
||||
sZelda->actor.shape.rot.y = -0x5000;
|
||||
this->unk_3A4.x = 410.0f;
|
||||
this->unk_3A4.y = 1096.0f;
|
||||
this->unk_3A4.z = -110.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x + 10.0f;
|
||||
this->unk_3B0.y = (player->actor.world.pos.y + 200.0f) - 160.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->subCamEye.x = 410.0f;
|
||||
this->subCamEye.y = 1096.0f;
|
||||
this->subCamEye.z = -110.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x + 10.0f;
|
||||
this->subCamAt.y = (player->actor.world.pos.y + 200.0f) - 160.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
if (this->unk_398 >= 20) {
|
||||
func_80078884(NA_SE_EN_GOMA_LAST - SFX_FLAG);
|
||||
Math_ApproachF(&this->unk_324, 255.0f, 1.0f, 10.0f);
|
||||
|
@ -385,12 +385,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sZelda->actor.world.pos.z = -186.0f;
|
||||
player->actor.shape.rot.y = -0x4000;
|
||||
sZelda->actor.shape.rot.y = -0x5000;
|
||||
this->unk_3A4.x = 450.0f;
|
||||
this->unk_3A4.y = 1121.0f;
|
||||
this->unk_3A4.z = -158.0f;
|
||||
this->unk_3B0.x = (player->actor.world.pos.x - 20.0f) + 2.0f;
|
||||
this->unk_3B0.y = ((player->actor.world.pos.y + 200.0f) - 151.0f) - 2.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z + 2.0f;
|
||||
this->subCamEye.x = 450.0f;
|
||||
this->subCamEye.y = 1121.0f;
|
||||
this->subCamEye.z = -158.0f;
|
||||
this->subCamAt.x = (player->actor.world.pos.x - 20.0f) + 2.0f;
|
||||
this->subCamAt.y = ((player->actor.world.pos.y + 200.0f) - 151.0f) - 2.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z + 2.0f;
|
||||
if (this->unk_398 == 10) {
|
||||
func_80078914(&D_80906D6C, NA_SE_EV_STONE_BOUND);
|
||||
}
|
||||
|
@ -409,11 +409,11 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->actor.world.pos.y = 1009.0f;
|
||||
this->actor.shape.yOffset = 7000.0f;
|
||||
this->actor.world.rot.y = 0x5000;
|
||||
this->unk_3A4.x = -60.0f;
|
||||
this->unk_3A4.y = 1106.0f;
|
||||
this->unk_3A4.z = -200.0f;
|
||||
this->unk_3B0.x = this->unk_3B0.z = -200.0f;
|
||||
this->unk_3B0.y = this->actor.world.pos.y + 70.0f;
|
||||
this->subCamEye.x = -60.0f;
|
||||
this->subCamEye.y = 1106.0f;
|
||||
this->subCamEye.z = -200.0f;
|
||||
this->subCamAt.x = this->subCamAt.z = -200.0f;
|
||||
this->subCamAt.y = this->actor.world.pos.y + 70.0f;
|
||||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
globalCtx->envCtx.unk_BE = globalCtx->envCtx.unk_BD = 0;
|
||||
this->unk_339 = 0;
|
||||
|
@ -433,7 +433,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->unk_398 >= 30) {
|
||||
Math_ApproachF(&this->actor.world.pos.y, 1289.0f, 0.1f, 10.0f);
|
||||
this->unk_3B0.y = this->actor.world.pos.y + 70.0f;
|
||||
this->subCamAt.y = this->actor.world.pos.y + 70.0f;
|
||||
}
|
||||
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_ganon_anime3_Anim_002E6C, 0.0f);
|
||||
|
@ -456,25 +456,25 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sZelda->actor.world.pos.x = 724.0f;
|
||||
sZelda->actor.world.pos.y = 1086.0f;
|
||||
sZelda->actor.world.pos.z = -186.0f;
|
||||
this->unk_3A4.x = this->actor.world.pos.x + -10.0f;
|
||||
this->unk_3A4.y = this->actor.world.pos.y + 80.0f;
|
||||
this->unk_3A4.z = this->actor.world.pos.z + 50.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = player->actor.world.pos.y;
|
||||
this->unk_3B0.z = player->actor.world.pos.z - 200.0f;
|
||||
this->subCamEye.x = this->actor.world.pos.x + -10.0f;
|
||||
this->subCamEye.y = this->actor.world.pos.y + 80.0f;
|
||||
this->subCamEye.z = this->actor.world.pos.z + 50.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = player->actor.world.pos.y;
|
||||
this->subCamAt.z = player->actor.world.pos.z - 200.0f;
|
||||
if (this->unk_398 == 20) {
|
||||
func_8002DF54(globalCtx, &this->actor, 0x1E);
|
||||
}
|
||||
if (this->unk_398 == 60) {
|
||||
this->unk_3A4.x = (this->actor.world.pos.x + 200.0f) - 154.0f;
|
||||
this->unk_3A4.y = this->actor.world.pos.y + 60.0f;
|
||||
this->unk_3A4.z = this->actor.world.pos.z - 15.0f;
|
||||
this->subCamEye.x = (this->actor.world.pos.x + 200.0f) - 154.0f;
|
||||
this->subCamEye.y = this->actor.world.pos.y + 60.0f;
|
||||
this->subCamEye.z = this->actor.world.pos.z - 15.0f;
|
||||
this->unk_39C = 15;
|
||||
this->unk_398 = 0;
|
||||
this->unk_3B0.y = this->actor.world.pos.y + 77.0f + 100.0f;
|
||||
this->subCamAt.y = this->actor.world.pos.y + 77.0f + 100.0f;
|
||||
this->unk_314 = 2;
|
||||
this->unk_3B0.z = this->actor.world.pos.z + 5.0f;
|
||||
this->unk_3B0.x = this->actor.world.pos.x;
|
||||
this->subCamAt.z = this->actor.world.pos.z + 5.0f;
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
}
|
||||
if ((globalCtx->gameplayFrames % 32) == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BREATH);
|
||||
|
@ -485,7 +485,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BREATH);
|
||||
}
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_ApproachF(&this->unk_3B0.y, this->actor.world.pos.y + 77.0f, 0.05f, 5.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 77.0f, 0.05f, 5.0f);
|
||||
if (this->unk_398 >= 50) {
|
||||
if (this->unk_398 == 50) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_000BFC, 0.0f);
|
||||
|
@ -528,9 +528,9 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_0028A8, 0.0f);
|
||||
this->unk_194 = 1000.0f;
|
||||
}
|
||||
Math_ApproachF(&this->unk_3A4.x, (this->actor.world.pos.x + 200.0f) - 90.0f, 0.1f, 6.3999996f);
|
||||
Math_ApproachF(&this->unk_3A4.y, ((this->actor.world.pos.y + 60.0f) - 60.0f) - 70.0f, 0.1f, 13.0f);
|
||||
Math_ApproachF(&this->unk_3B0.y, this->actor.world.pos.y + 40.0f, 0.1f, 3.6999998f);
|
||||
Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 200.0f) - 90.0f, 0.1f, 6.3999996f);
|
||||
Math_ApproachF(&this->subCamEye.y, ((this->actor.world.pos.y + 60.0f) - 60.0f) - 70.0f, 0.1f, 13.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 40.0f, 0.1f, 3.6999998f);
|
||||
if (this->unk_398 == 30) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BIGMASIC);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_THROW_BIG);
|
||||
|
@ -539,11 +539,11 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sp8D = true;
|
||||
}
|
||||
if (this->unk_398 >= 60) {
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
camera->eye = this->unk_3A4;
|
||||
camera->eyeNext = this->unk_3A4;
|
||||
camera->at = this->unk_3B0;
|
||||
camera->eye = this->subCamEye;
|
||||
camera->eyeNext = this->subCamEye;
|
||||
camera->at = this->subCamAt;
|
||||
this->unk_39C = 17;
|
||||
this->unk_398 = 0;
|
||||
this->unk_337 = 2;
|
||||
|
@ -556,29 +556,29 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
// fake, tricks the compiler into using stack the way we need it to
|
||||
if (zero) {
|
||||
Math_ApproachF(&this->unk_3B0.y, 0.0f, 0.0f, 0.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
this->unk_339 = 6;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_3A4.x = player->actor.world.pos.x - 40.0f;
|
||||
this->unk_3A4.y = player->actor.world.pos.y + 40.0f;
|
||||
this->unk_3A4.z = player->actor.world.pos.z + 20.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = (player->actor.world.pos.y + 10.0f + 60.0f) - 30.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->subCamEye.x = player->actor.world.pos.x - 40.0f;
|
||||
this->subCamEye.y = player->actor.world.pos.y + 40.0f;
|
||||
this->subCamEye.z = player->actor.world.pos.z + 20.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = (player->actor.world.pos.y + 10.0f + 60.0f) - 30.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
if (this->unk_398 == 25) {
|
||||
this->unk_39C = 18;
|
||||
this->unk_398 = 0;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_010380, 0.0f);
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) - 50.0f;
|
||||
this->unk_3A4.y = this->actor.world.pos.y;
|
||||
this->unk_3A4.z = this->actor.world.pos.z;
|
||||
this->unk_3B0.x = this->actor.world.pos.x + 50.0f;
|
||||
this->unk_3B0.y = this->actor.world.pos.y + 60.0f;
|
||||
this->unk_3B0.z = this->actor.world.pos.z;
|
||||
this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) - 50.0f;
|
||||
this->subCamEye.y = this->actor.world.pos.y;
|
||||
this->subCamEye.z = this->actor.world.pos.z;
|
||||
this->subCamAt.x = this->actor.world.pos.x + 50.0f;
|
||||
this->subCamAt.y = this->actor.world.pos.y + 60.0f;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
this->actor.world.rot.y = 0x4000;
|
||||
}
|
||||
break;
|
||||
|
@ -588,8 +588,8 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_GANON_BOSS);
|
||||
}
|
||||
Math_ApproachF(&this->unk_30C, 7.0f, 1.0f, 0.1f);
|
||||
Math_ApproachF(&this->unk_3A4.x, (this->actor.world.pos.x + 500.0f) - 350.0f, 0.1f, 1.0f);
|
||||
Math_ApproachF(&this->unk_3B0.x, this->actor.world.pos.x, 0.1f, 1.0f);
|
||||
Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 500.0f) - 350.0f, 0.1f, 1.0f);
|
||||
Math_ApproachF(&this->subCamAt.x, this->actor.world.pos.x, 0.1f, 1.0f);
|
||||
Math_ApproachF(&this->unk_228, 1.0f, 0.1f, 0.02f);
|
||||
if (this->unk_398 == 65) {
|
||||
this->unk_39C = 19;
|
||||
|
@ -621,13 +621,13 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.y = 1086.0f;
|
||||
player->actor.world.pos.z = -266.0f;
|
||||
player->actor.shape.rot.y = -0x4000;
|
||||
this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) - 200.0f;
|
||||
this->unk_3A4.y = (player->actor.world.pos.y + 40.0f) - 30.0f;
|
||||
this->unk_3A4.z = (player->actor.world.pos.z - 20.0f) + 100.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) + 30.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->unk_3BC.x = 0.8f;
|
||||
this->subCamEye.x = (player->actor.world.pos.x - 40.0f) - 200.0f;
|
||||
this->subCamEye.y = (player->actor.world.pos.y + 40.0f) - 30.0f;
|
||||
this->subCamEye.z = (player->actor.world.pos.z - 20.0f) + 100.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) + 30.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
this->subCamUp.x = 0.8f;
|
||||
if (this->actor.world.pos.y <= 1099.0f) {
|
||||
this->actor.world.pos.y = 1099.0f;
|
||||
this->unk_39C = 21;
|
||||
|
@ -654,7 +654,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_398 < 60) {
|
||||
this->unk_339 = 7;
|
||||
}
|
||||
this->unk_3BC.x = 0.0f;
|
||||
this->subCamUp.x = 0.0f;
|
||||
this->actor.world.pos.y = 1099.0f;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_ApproachZeroF(&this->unk_30C, 1.0f, 0.1f);
|
||||
|
@ -669,12 +669,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40);
|
||||
}
|
||||
this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f;
|
||||
this->unk_3A4.y = this->actor.world.pos.y;
|
||||
this->unk_3A4.z = this->actor.world.pos.z;
|
||||
this->unk_3B0.x = this->actor.world.pos.x;
|
||||
this->unk_3B0.z = this->actor.world.pos.z;
|
||||
this->unk_3B0.y = (this->unk_1B8.y + 60.0f) - 40.0f;
|
||||
this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f;
|
||||
this->subCamEye.y = this->actor.world.pos.y;
|
||||
this->subCamEye.z = this->actor.world.pos.z;
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
this->subCamAt.y = (this->unk_1B8.y + 60.0f) - 40.0f;
|
||||
if (this->unk_398 > 166 && this->unk_398 < 173) {
|
||||
this->unk_312 = 2;
|
||||
}
|
||||
|
@ -703,12 +703,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
func_80078884(NA_SE_EN_MGANON_SWORD);
|
||||
func_80078884(NA_SE_EN_MGANON_ROAR);
|
||||
}
|
||||
this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) + 6.0f;
|
||||
this->unk_3A4.y = player->actor.world.pos.y + 40.0f;
|
||||
this->unk_3A4.z = (player->actor.world.pos.z + 20.0f) - 7.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 2.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->subCamEye.x = (player->actor.world.pos.x - 40.0f) + 6.0f;
|
||||
this->subCamEye.y = player->actor.world.pos.y + 40.0f;
|
||||
this->subCamEye.z = (player->actor.world.pos.z + 20.0f) - 7.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 2.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
if (this->unk_398 == 228) {
|
||||
func_80078884(NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
func_8002DF54(globalCtx, &this->actor, 0x56);
|
||||
|
@ -739,10 +739,10 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
if (1) {
|
||||
BossGanon2Effect* effects = globalCtx->specialEffects;
|
||||
|
||||
this->unk_3B0 = effects[0].position;
|
||||
this->unk_3A4.x = effects[0].position.x + 70.0f;
|
||||
this->unk_3A4.y = effects[0].position.y - 30.0f;
|
||||
this->unk_3A4.z = effects[0].position.z + 70.0f;
|
||||
this->subCamAt = effects[0].position;
|
||||
this->subCamEye.x = effects[0].position.x + 70.0f;
|
||||
this->subCamEye.y = effects[0].position.y - 30.0f;
|
||||
this->subCamEye.z = effects[0].position.z + 70.0f;
|
||||
}
|
||||
if ((this->unk_398 & 3) == 0) {
|
||||
func_80078884(NA_SE_IT_SWORD_SWING);
|
||||
|
@ -755,12 +755,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 25:
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) + 80.0f;
|
||||
this->unk_3A4.y = player->actor.world.pos.y + 40.0f + 10.0f;
|
||||
this->unk_3A4.z = player->actor.world.pos.z + 20.0f + 10.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x - 20.0f;
|
||||
this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 3.0f;
|
||||
this->unk_3B0.z = (player->actor.world.pos.z - 40.0f) - 10.0f;
|
||||
this->subCamEye.x = (player->actor.world.pos.x - 40.0f) + 80.0f;
|
||||
this->subCamEye.y = player->actor.world.pos.y + 40.0f + 10.0f;
|
||||
this->subCamEye.z = player->actor.world.pos.z + 20.0f + 10.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x - 20.0f;
|
||||
this->subCamAt.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 3.0f;
|
||||
this->subCamAt.z = (player->actor.world.pos.z - 40.0f) - 10.0f;
|
||||
if (this->unk_398 == 10) {
|
||||
BossGanon2Effect* effects = globalCtx->specialEffects;
|
||||
|
||||
|
@ -777,13 +777,13 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
case 26:
|
||||
this->unk_3A4.x = sZelda->actor.world.pos.x + 100.0f + 30.0f;
|
||||
this->unk_3A4.y = sZelda->actor.world.pos.y + 10.0f;
|
||||
this->unk_3A4.z = sZelda->actor.world.pos.z + 5.0f;
|
||||
this->unk_3B0.x = sZelda->actor.world.pos.x;
|
||||
this->unk_3B0.y = sZelda->actor.world.pos.y + 30.0f;
|
||||
this->unk_3B0.z = sZelda->actor.world.pos.z - 20.0f;
|
||||
this->unk_3BC.z = -0.5f;
|
||||
this->subCamEye.x = sZelda->actor.world.pos.x + 100.0f + 30.0f;
|
||||
this->subCamEye.y = sZelda->actor.world.pos.y + 10.0f;
|
||||
this->subCamEye.z = sZelda->actor.world.pos.z + 5.0f;
|
||||
this->subCamAt.x = sZelda->actor.world.pos.x;
|
||||
this->subCamAt.y = sZelda->actor.world.pos.y + 30.0f;
|
||||
this->subCamAt.z = sZelda->actor.world.pos.z - 20.0f;
|
||||
this->subCamUp.z = -0.5f;
|
||||
if (this->unk_398 == 13) {
|
||||
sZelda->unk_3C8 = 6;
|
||||
}
|
||||
|
@ -793,26 +793,26 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 27:
|
||||
this->unk_3BC.z = 0.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
if (this->unk_398 == 4) {
|
||||
func_8002DF54(globalCtx, &this->actor, 0x58);
|
||||
}
|
||||
this->unk_3A4.x = player->actor.world.pos.x - 20.0f;
|
||||
this->unk_3A4.y = player->actor.world.pos.y + 50.0f;
|
||||
this->unk_3A4.z = player->actor.world.pos.z;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = player->actor.world.pos.y + 50.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->subCamEye.x = player->actor.world.pos.x - 20.0f;
|
||||
this->subCamEye.y = player->actor.world.pos.y + 50.0f;
|
||||
this->subCamEye.z = player->actor.world.pos.z;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = player->actor.world.pos.y + 50.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
if (this->unk_398 == 26) {
|
||||
D_8090EB30 = globalCtx->actorCtx.actorLists[ACTORCAT_ITEMACTION].head;
|
||||
while (D_8090EB30 != NULL) {
|
||||
if (D_8090EB30->id == ACTOR_EN_ELF) {
|
||||
this->unk_3A4.x = D_8090EB30->world.pos.x - 30.0f;
|
||||
this->unk_3A4.y = D_8090EB30->world.pos.y;
|
||||
this->unk_3A4.z = D_8090EB30->world.pos.z;
|
||||
this->unk_3B0.x = D_8090EB30->world.pos.x;
|
||||
this->unk_3B0.y = D_8090EB30->world.pos.y;
|
||||
this->unk_3B0.z = D_8090EB30->world.pos.z;
|
||||
this->subCamEye.x = D_8090EB30->world.pos.x - 30.0f;
|
||||
this->subCamEye.y = D_8090EB30->world.pos.y;
|
||||
this->subCamEye.z = D_8090EB30->world.pos.z;
|
||||
this->subCamAt.x = D_8090EB30->world.pos.x;
|
||||
this->subCamAt.y = D_8090EB30->world.pos.y;
|
||||
this->subCamAt.z = D_8090EB30->world.pos.z;
|
||||
break;
|
||||
}
|
||||
D_8090EB30 = D_8090EB30->next;
|
||||
|
@ -826,12 +826,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Message_StartTextbox(globalCtx, 0x70D6, NULL);
|
||||
}
|
||||
if (D_8090EB30 != NULL) {
|
||||
this->unk_3A4.x = D_8090EB30->world.pos.x - 20.0f;
|
||||
this->unk_3A4.y = D_8090EB30->world.pos.y;
|
||||
this->unk_3A4.z = D_8090EB30->world.pos.z;
|
||||
Math_ApproachF(&this->unk_3B0.x, D_8090EB30->world.pos.x, 0.2f, 50.0f);
|
||||
Math_ApproachF(&this->unk_3B0.y, D_8090EB30->world.pos.y, 0.2f, 50.0f);
|
||||
Math_ApproachF(&this->unk_3B0.z, D_8090EB30->world.pos.z, 0.2f, 50.0f);
|
||||
this->subCamEye.x = D_8090EB30->world.pos.x - 20.0f;
|
||||
this->subCamEye.y = D_8090EB30->world.pos.y;
|
||||
this->subCamEye.z = D_8090EB30->world.pos.z;
|
||||
Math_ApproachF(&this->subCamAt.x, D_8090EB30->world.pos.x, 0.2f, 50.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, D_8090EB30->world.pos.y, 0.2f, 50.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, D_8090EB30->world.pos.z, 0.2f, 50.0f);
|
||||
if ((this->unk_398 > 40) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
this->unk_39C = 29;
|
||||
this->unk_398 = 0;
|
||||
|
@ -847,12 +847,12 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 29:
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_3A4.x = (((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f) - 60.0f;
|
||||
this->unk_3B0.x = this->actor.world.pos.x;
|
||||
this->unk_3B0.z = this->actor.world.pos.z;
|
||||
this->unk_3A4.y = this->actor.world.pos.y;
|
||||
this->unk_3A4.z = this->actor.world.pos.z + 10.0f;
|
||||
this->unk_3B0.y = (this->unk_1B8.y + 60.0f) - 40.0f;
|
||||
this->subCamEye.x = (((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f) - 60.0f;
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
this->subCamEye.y = this->actor.world.pos.y;
|
||||
this->subCamEye.z = this->actor.world.pos.z + 10.0f;
|
||||
this->subCamAt.y = (this->unk_1B8.y + 60.0f) - 40.0f;
|
||||
player->actor.shape.rot.y = -0x4000;
|
||||
player->actor.world.pos.x = 140.0f;
|
||||
player->actor.world.pos.z = -196.0f;
|
||||
|
@ -860,13 +860,13 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MGANON_ROAR);
|
||||
}
|
||||
if (Animation_OnFrame(&this->skelAnime, this->unk_194)) {
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
camera->eye = this->unk_3A4;
|
||||
camera->eyeNext = this->unk_3A4;
|
||||
camera->at = this->unk_3B0;
|
||||
func_800C08AC(globalCtx, this->unk_39E, 0);
|
||||
this->unk_39E = 0;
|
||||
camera->eye = this->subCamEye;
|
||||
camera->eyeNext = this->subCamEye;
|
||||
camera->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->unk_39C = 0;
|
||||
|
@ -883,19 +883,20 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BODY_SPARK - SFX_FLAG);
|
||||
}
|
||||
|
||||
if (this->unk_39E != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
// fake, tricks the compiler into putting some pointers on the stack
|
||||
if (zero) {
|
||||
osSyncPrintf(NULL, 0, 0);
|
||||
}
|
||||
this->unk_3B0.y += this->unk_41C;
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->unk_39E, &this->unk_3B0, &this->unk_3A4, &this->unk_3BC);
|
||||
this->subCamAt.y += this->unk_41C;
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
|
||||
}
|
||||
}
|
||||
|
||||
void func_808FF898(BossGanon2* this, GlobalContext* globalCtx) {
|
||||
if ((this->unk_312 != 0) && (this->unk_39E == 0)) {
|
||||
if ((this->unk_312 != 0) && (this->subCamId == SUB_CAM_ID_DONE)) {
|
||||
Actor* actor = globalCtx->actorCtx.actorLists[ACTORCAT_PROP].head;
|
||||
|
||||
while (actor != NULL) {
|
||||
if (actor->id == ACTOR_DEMO_GJ) {
|
||||
DemoGj* gj = (DemoGj*)actor;
|
||||
|
@ -1269,15 +1270,15 @@ void func_80900818(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
Camera* sp4C;
|
||||
Camera* mainCam1;
|
||||
Player* player;
|
||||
Camera* temp_v0;
|
||||
Camera* temp_v0_2;
|
||||
Camera* mainCam2;
|
||||
Camera* mainCam3;
|
||||
s32 pad;
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
|
||||
sp4C = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
mainCam1 = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
player = GET_PLAYER(globalCtx);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_398++;
|
||||
|
@ -1286,13 +1287,13 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
switch (this->unk_39C) {
|
||||
case 0:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_39E = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->unk_39C = 1;
|
||||
this->unk_3A4 = sp4C->eye;
|
||||
this->unk_3B0 = sp4C->at;
|
||||
this->subCamEye = mainCam1->eye;
|
||||
this->subCamAt = mainCam1->at;
|
||||
this->unk_1A2[0] = 300;
|
||||
this->unk_1A2[1] = 100;
|
||||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
|
@ -1305,12 +1306,12 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sp5C.y = 0.0f;
|
||||
sp5C.z = 250.0f;
|
||||
Matrix_MultVec3f(&sp5C, &sp50);
|
||||
Math_ApproachF(&this->unk_3A4.x, this->actor.world.pos.x + sp50.x, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->unk_3A4.y, 1136.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->unk_3A4.z, this->actor.world.pos.z + sp50.z, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->unk_3B0.x, this->unk_1B8.x, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->unk_3B0.y, this->unk_1B8.y, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->unk_3B0.z, this->unk_1B8.z, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + sp50.x, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, 1136.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + sp50.z, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamAt.x, this->unk_1B8.x, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, this->unk_1B8.y, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, this->unk_1B8.z, 0.2f, 100.0f);
|
||||
if (this->unk_1A2[1] == 0) {
|
||||
this->unk_39C = 2;
|
||||
this->unk_1A2[1] = 90;
|
||||
|
@ -1318,24 +1319,24 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 2:
|
||||
this->unk_1A2[0] = 300;
|
||||
this->unk_3A4.x = sZelda->actor.world.pos.x - 100.0f;
|
||||
this->unk_3A4.y = sZelda->actor.world.pos.y + 30.0f;
|
||||
this->unk_3A4.z = (sZelda->actor.world.pos.z + 30.0f) - 60.0f;
|
||||
this->unk_3B0.x = sZelda->actor.world.pos.x;
|
||||
this->unk_3B0.y = sZelda->actor.world.pos.y + 30.0f;
|
||||
this->unk_3B0.z = sZelda->actor.world.pos.z - 10.0f;
|
||||
this->subCamEye.x = sZelda->actor.world.pos.x - 100.0f;
|
||||
this->subCamEye.y = sZelda->actor.world.pos.y + 30.0f;
|
||||
this->subCamEye.z = (sZelda->actor.world.pos.z + 30.0f) - 60.0f;
|
||||
this->subCamAt.x = sZelda->actor.world.pos.x;
|
||||
this->subCamAt.y = sZelda->actor.world.pos.y + 30.0f;
|
||||
this->subCamAt.z = sZelda->actor.world.pos.z - 10.0f;
|
||||
Math_ApproachZeroF(&this->unk_324, 1.0f, 5.0f);
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 1.0f / 51);
|
||||
if (this->unk_1A2[1] == 80) {
|
||||
Message_StartTextbox(globalCtx, 0x70D7, NULL);
|
||||
}
|
||||
if ((this->unk_1A2[1] < 30) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
temp_v0 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
temp_v0->eye = this->unk_3A4;
|
||||
temp_v0->eyeNext = this->unk_3A4;
|
||||
temp_v0->at = this->unk_3B0;
|
||||
func_800C08AC(globalCtx, this->unk_39E, 0);
|
||||
this->unk_39E = 0;
|
||||
mainCam2 = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam2->eye = this->subCamEye;
|
||||
mainCam2->eyeNext = this->subCamEye;
|
||||
mainCam2->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->unk_39C = 3;
|
||||
|
@ -1343,9 +1344,9 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 10:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_39E = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->unk_39C = 11;
|
||||
this->unk_334 = 1;
|
||||
func_8002DF54(globalCtx, &this->actor, 0x60);
|
||||
|
@ -1354,28 +1355,28 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.x = sZelda->actor.world.pos.x + 50.0f + 10.0f;
|
||||
player->actor.world.pos.z = sZelda->actor.world.pos.z - 25.0f;
|
||||
player->actor.shape.rot.y = -0x8000;
|
||||
this->unk_3A4.x = (player->actor.world.pos.x + 100.0f) - 80.0f;
|
||||
this->unk_3A4.y = (player->actor.world.pos.y + 60.0f) - 40.0f;
|
||||
this->unk_3A4.z = player->actor.world.pos.z - 110.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = (player->actor.world.pos.y + 60.0f) - 25.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->subCamEye.x = (player->actor.world.pos.x + 100.0f) - 80.0f;
|
||||
this->subCamEye.y = (player->actor.world.pos.y + 60.0f) - 40.0f;
|
||||
this->subCamEye.z = player->actor.world.pos.z - 110.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = (player->actor.world.pos.y + 60.0f) - 25.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
if (this->unk_398 == 80) {
|
||||
temp_v0_2 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
temp_v0_2->eye = this->unk_3A4;
|
||||
temp_v0_2->eyeNext = this->unk_3A4;
|
||||
temp_v0_2->at = this->unk_3B0;
|
||||
mainCam3 = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam3->eye = this->subCamEye;
|
||||
mainCam3->eyeNext = this->subCamEye;
|
||||
mainCam3->at = this->subCamAt;
|
||||
this->unk_39C = 3;
|
||||
func_800C08AC(globalCtx, this->unk_39E, 0);
|
||||
this->unk_39E = 0;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->unk_39E != 0) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->unk_39E, &this->unk_3B0, &this->unk_3A4);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
|
||||
switch (this->unk_1AC) {
|
||||
|
@ -1455,7 +1456,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Player* player;
|
||||
f32 temp_f14;
|
||||
f32 temp_f12;
|
||||
Camera* temp_v0_2;
|
||||
Camera* mainCam;
|
||||
s16 temp_a0_2;
|
||||
f32 phi_f0;
|
||||
s32 phi_a1;
|
||||
|
@ -1464,16 +1465,16 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_398++;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
this->unk_3BC.x = 0.0f;
|
||||
this->unk_3BC.y = 1.0f;
|
||||
this->unk_3BC.z = 0.0f;
|
||||
this->subCamUp.x = 0.0f;
|
||||
this->subCamUp.y = 1.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
|
||||
switch (this->unk_39C) {
|
||||
case 0:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_39E = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->unk_39C = 1;
|
||||
this->unk_398 = 0;
|
||||
|
@ -1520,12 +1521,12 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
sZelda->actor.world.pos.x = 340.0f;
|
||||
sZelda->actor.world.pos.z = -250.0f;
|
||||
sZelda->actor.world.rot.y = sZelda->actor.shape.rot.y = -0x2000;
|
||||
this->unk_3A4.x = 250;
|
||||
this->unk_3A4.y = 1150.0f;
|
||||
this->unk_3A4.z = 0.0f;
|
||||
this->unk_3B0.x = this->unk_1B8.x;
|
||||
this->unk_3B0.y = this->unk_1B8.y;
|
||||
this->unk_3B0.z = this->unk_1B8.z;
|
||||
this->subCamEye.x = 250;
|
||||
this->subCamEye.y = 1150.0f;
|
||||
this->subCamEye.z = 0.0f;
|
||||
this->subCamAt.x = this->unk_1B8.x;
|
||||
this->subCamAt.y = this->unk_1B8.y;
|
||||
this->subCamAt.z = this->unk_1B8.z;
|
||||
if (this->unk_398 > 135) {
|
||||
this->unk_39C = 2;
|
||||
this->unk_398 = 0;
|
||||
|
@ -1535,12 +1536,12 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_339 = 22;
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 0.1f);
|
||||
func_80078884(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
|
||||
this->unk_3A4.x = 250;
|
||||
this->unk_3A4.y = 1150.0f;
|
||||
this->unk_3A4.z = 0.0f;
|
||||
Math_ApproachF(&this->unk_3B0.x, sZelda->actor.world.pos.x, 0.2f, 20.0f);
|
||||
Math_ApproachF(&this->unk_3B0.y, sZelda->actor.world.pos.y + 50.0f, 0.2f, 10.0f);
|
||||
Math_ApproachF(&this->unk_3B0.z, sZelda->actor.world.pos.z, 0.2f, 20.0f);
|
||||
this->subCamEye.x = 250;
|
||||
this->subCamEye.y = 1150.0f;
|
||||
this->subCamEye.z = 0.0f;
|
||||
Math_ApproachF(&this->subCamAt.x, sZelda->actor.world.pos.x, 0.2f, 20.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, sZelda->actor.world.pos.y + 50.0f, 0.2f, 10.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, sZelda->actor.world.pos.z, 0.2f, 20.0f);
|
||||
if (this->unk_398 == 50) {
|
||||
this->unk_39C = 3;
|
||||
this->unk_398 = 0;
|
||||
|
@ -1549,12 +1550,12 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
case 3:
|
||||
this->unk_339 = 22;
|
||||
func_80078884(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
|
||||
this->unk_3A4.x = 330.0f;
|
||||
this->unk_3A4.y = 1120.0f;
|
||||
this->unk_3A4.z = -150.0f;
|
||||
this->unk_3B0.x = sZelda->actor.world.pos.x;
|
||||
this->unk_3B0.y = sZelda->actor.world.pos.y + 40.0f;
|
||||
this->unk_3B0.z = sZelda->actor.world.pos.z;
|
||||
this->subCamEye.x = 330.0f;
|
||||
this->subCamEye.y = 1120.0f;
|
||||
this->subCamEye.z = -150.0f;
|
||||
this->subCamAt.x = sZelda->actor.world.pos.x;
|
||||
this->subCamAt.y = sZelda->actor.world.pos.y + 40.0f;
|
||||
this->subCamAt.z = sZelda->actor.world.pos.z;
|
||||
if (this->unk_398 == 10) {
|
||||
Message_StartTextbox(globalCtx, 0x70D8, NULL);
|
||||
}
|
||||
|
@ -1600,19 +1601,19 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_30C = 10.0f;
|
||||
player->actor.world.pos.x = 250.0f;
|
||||
player->actor.world.pos.z = 30.0f;
|
||||
this->unk_3A4.x = player->actor.world.pos.x - 50.0f;
|
||||
this->unk_3A4.y = player->actor.world.pos.y + 50.0f;
|
||||
this->unk_3A4.z = player->actor.world.pos.z + 40.0f;
|
||||
this->unk_3B0.x = player->actor.world.pos.x;
|
||||
this->unk_3B0.y = player->actor.world.pos.y + 40.0f;
|
||||
this->unk_3B0.z = player->actor.world.pos.z;
|
||||
this->subCamEye.x = player->actor.world.pos.x - 50.0f;
|
||||
this->subCamEye.y = player->actor.world.pos.y + 50.0f;
|
||||
this->subCamEye.z = player->actor.world.pos.z + 40.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = player->actor.world.pos.y + 40.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
if (this->unk_398 == 166) {
|
||||
temp_v0_2 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
temp_v0_2->eye = this->unk_3A4;
|
||||
temp_v0_2->eyeNext = this->unk_3A4;
|
||||
temp_v0_2->at = this->unk_3B0;
|
||||
func_800C08AC(globalCtx, this->unk_39E, 0);
|
||||
this->unk_39E = 0;
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->unk_39C = 6;
|
||||
|
@ -1626,9 +1627,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
if ((ABS(temp_a0_2) < 0x2000) && (sqrtf(SQ(temp_f14) + SQ(temp_f12)) < 70.0f) &&
|
||||
(player->meleeWeaponState != 0) && (player->heldItemActionParam == PLAYER_AP_SWORD_MASTER)) {
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->unk_39E = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->unk_39C = 7;
|
||||
this->unk_398 = 0;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon2_Anim_003B1C, 0.0f);
|
||||
|
@ -1656,42 +1657,42 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
func_8090109C(this, globalCtx);
|
||||
}
|
||||
if ((this->unk_398 >= 34) && (this->unk_398 < 40)) {
|
||||
this->unk_3A4.x = 269.0f;
|
||||
this->unk_3A4.y = 1112.0f;
|
||||
this->unk_3A4.z = -28.0f;
|
||||
this->unk_3B0.x = 234.0f;
|
||||
this->unk_3B0.y = 1117.0f;
|
||||
this->unk_3B0.z = -11.0f;
|
||||
this->subCamEye.x = 269.0f;
|
||||
this->subCamEye.y = 1112.0f;
|
||||
this->subCamEye.z = -28.0f;
|
||||
this->subCamAt.x = 234.0f;
|
||||
this->subCamAt.y = 1117.0f;
|
||||
this->subCamAt.z = -11.0f;
|
||||
} else {
|
||||
if (this->unk_398 < 30) {
|
||||
phi_a1 = 0;
|
||||
} else if (this->unk_398 < 43) {
|
||||
phi_a1 = 1;
|
||||
} else {
|
||||
this->unk_3BC.z = -0.8f;
|
||||
this->subCamUp.z = -0.8f;
|
||||
player->actor.world.pos.x = 200.0f;
|
||||
player->actor.world.pos.z = 10.0f;
|
||||
phi_a1 = 2;
|
||||
}
|
||||
this->unk_3A4.x = D_8090702C[phi_a1].x + (player->actor.world.pos.x - 50.0f);
|
||||
this->unk_3A4.y = D_8090702C[phi_a1].y + (player->actor.world.pos.y + 50.0f);
|
||||
this->unk_3A4.z = D_8090702C[phi_a1].z + (player->actor.world.pos.z + 40.0f);
|
||||
this->unk_3B0.x = D_80907050[phi_a1].x + player->actor.world.pos.x;
|
||||
this->unk_3B0.y = D_80907050[phi_a1].y + (player->actor.world.pos.y + 40.0f);
|
||||
this->unk_3B0.z = D_80907050[phi_a1].z + player->actor.world.pos.z;
|
||||
this->subCamEye.x = D_8090702C[phi_a1].x + (player->actor.world.pos.x - 50.0f);
|
||||
this->subCamEye.y = D_8090702C[phi_a1].y + (player->actor.world.pos.y + 50.0f);
|
||||
this->subCamEye.z = D_8090702C[phi_a1].z + (player->actor.world.pos.z + 40.0f);
|
||||
this->subCamAt.x = D_80907050[phi_a1].x + player->actor.world.pos.x;
|
||||
this->subCamAt.y = D_80907050[phi_a1].y + (player->actor.world.pos.y + 40.0f);
|
||||
this->subCamAt.z = D_80907050[phi_a1].z + player->actor.world.pos.z;
|
||||
}
|
||||
if (this->unk_398 > 80) {
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->unk_39C = 75;
|
||||
this->unk_398 = 0;
|
||||
this->unk_3A4.x = 112.0f;
|
||||
this->unk_3A4.y = 1146.0f;
|
||||
this->unk_3A4.z = 202.0f;
|
||||
this->unk_3B0.x = 110.0f;
|
||||
this->unk_3B0.y = 1144.0f;
|
||||
this->unk_3B0.z = 177.0f;
|
||||
this->subCamEye.x = 112.0f;
|
||||
this->subCamEye.y = 1146.0f;
|
||||
this->subCamEye.z = 202.0f;
|
||||
this->subCamAt.x = 110.0f;
|
||||
this->subCamAt.y = 1144.0f;
|
||||
this->subCamAt.z = 177.0f;
|
||||
player->actor.world.pos.x = 200.0f;
|
||||
this->unk_3BC.z = 0.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
}
|
||||
break;
|
||||
case 75:
|
||||
|
@ -1726,12 +1727,12 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_398 = 0;
|
||||
this->unk_194 = 1000.0f;
|
||||
}
|
||||
this->unk_3A4.x = 250;
|
||||
this->unk_3A4.y = 1150.0f;
|
||||
this->unk_3A4.z = 0.0f;
|
||||
this->unk_3B0.x = this->unk_1B8.x;
|
||||
this->unk_3B0.y = this->unk_1B8.y;
|
||||
this->unk_3B0.z = this->unk_1B8.z;
|
||||
this->subCamEye.x = 250;
|
||||
this->subCamEye.y = 1150.0f;
|
||||
this->subCamEye.z = 0.0f;
|
||||
this->subCamAt.x = this->unk_1B8.x;
|
||||
this->subCamAt.y = this->unk_1B8.y;
|
||||
this->subCamAt.z = this->unk_1B8.z;
|
||||
if ((this->unk_398 < 1000) && ((this->unk_398 % 16) == 0)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MGANON_SWORD);
|
||||
}
|
||||
|
@ -1746,12 +1747,12 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 9:
|
||||
this->unk_339 = 24;
|
||||
this->unk_3A4.x = 330.0f;
|
||||
this->unk_3A4.y = 1120.0f;
|
||||
this->unk_3A4.z = -150.0f;
|
||||
this->unk_3B0.x = sZelda->actor.world.pos.x;
|
||||
this->unk_3B0.y = sZelda->actor.world.pos.y + 40.0f;
|
||||
this->unk_3B0.z = sZelda->actor.world.pos.z;
|
||||
this->subCamEye.x = 330.0f;
|
||||
this->subCamEye.y = 1120.0f;
|
||||
this->subCamEye.z = -150.0f;
|
||||
this->subCamAt.x = sZelda->actor.world.pos.x;
|
||||
this->subCamAt.y = sZelda->actor.world.pos.y + 40.0f;
|
||||
this->subCamAt.z = sZelda->actor.world.pos.z;
|
||||
if (this->unk_398 > 60) {
|
||||
this->unk_39C = 10;
|
||||
this->unk_398 = 0;
|
||||
|
@ -1760,9 +1761,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 10:
|
||||
this->unk_339 = 24;
|
||||
Math_ApproachF(&this->unk_3A4.x, 290.0f, 0.05f, this->unk_410.x);
|
||||
Math_ApproachF(&this->unk_3A4.y, 1130.0f, 0.05f, this->unk_410.x * 0.25f);
|
||||
Math_ApproachF(&this->unk_3A4.z, -260.0f, 0.05f, this->unk_410.x * 1.25f);
|
||||
Math_ApproachF(&this->subCamEye.x, 290.0f, 0.05f, this->unk_410.x);
|
||||
Math_ApproachF(&this->subCamEye.y, 1130.0f, 0.05f, this->unk_410.x * 0.25f);
|
||||
Math_ApproachF(&this->subCamEye.z, -260.0f, 0.05f, this->unk_410.x * 1.25f);
|
||||
if ((this->unk_398 >= 40) && (this->unk_398 <= 110)) {
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 0.02f);
|
||||
Math_ApproachF(&this->unk_384, 10.0f, 0.1f, 0.2f);
|
||||
|
@ -1771,10 +1772,10 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachZeroF(&this->unk_384, 1.0f, 0.2f);
|
||||
}
|
||||
if (this->unk_398 > 130) {
|
||||
Math_ApproachF(&this->unk_3B0.y, (sZelda->actor.world.pos.y + 40.0f + 10.0f) - 20.0f, 0.1f,
|
||||
Math_ApproachF(&this->subCamAt.y, (sZelda->actor.world.pos.y + 40.0f + 10.0f) - 20.0f, 0.1f,
|
||||
this->unk_410.x);
|
||||
} else {
|
||||
Math_ApproachF(&this->unk_3B0.y, sZelda->actor.world.pos.y + 40.0f + 10.0f, 0.05f,
|
||||
Math_ApproachF(&this->subCamAt.y, sZelda->actor.world.pos.y + 40.0f + 10.0f, 0.05f,
|
||||
this->unk_410.x * 0.25f);
|
||||
}
|
||||
Math_ApproachF(&this->unk_410.x, 1.0f, 1.0f, 0.01f);
|
||||
|
@ -1799,8 +1800,8 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->unk_39E != 0) {
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->unk_39E, &this->unk_3B0, &this->unk_3A4, &this->unk_3BC);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
|
||||
}
|
||||
|
||||
switch (this->unk_1AC) {
|
||||
|
@ -2056,7 +2057,7 @@ void BossGanon2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->unk_424.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->unk_444.base);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->unk_444.base);
|
||||
if (this->unk_39E == 0) {
|
||||
if (this->subCamId == SUB_CAM_ID_DONE) {
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->unk_444.base);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,11 +79,11 @@ typedef struct BossGanon2 {
|
|||
/* 0x0394 */ f32 unk_394;
|
||||
/* 0x0398 */ u32 unk_398;
|
||||
/* 0x039C */ s16 unk_39C;
|
||||
/* 0x039E */ s16 unk_39E;
|
||||
/* 0x039E */ s16 subCamId;
|
||||
/* 0x03A0 */ char unk_3A0[0x4];
|
||||
/* 0x03A4 */ Vec3f unk_3A4;
|
||||
/* 0x03B0 */ Vec3f unk_3B0;
|
||||
/* 0x03BC */ Vec3f unk_3BC;
|
||||
/* 0x03A4 */ Vec3f subCamEye;
|
||||
/* 0x03B0 */ Vec3f subCamAt;
|
||||
/* 0x03BC */ Vec3f subCamUp;
|
||||
/* 0x03C8 */ char unk_3C8[0x48];
|
||||
/* 0x0410 */ Vec3f unk_410;
|
||||
/* 0x041C */ f32 unk_41C;
|
||||
|
|
|
@ -942,7 +942,7 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
f32 camZ;
|
||||
f32 pad;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
osSyncPrintf("PYP %f\n", player->actor.floorHeight);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
@ -956,35 +956,35 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
case DEATH_START:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
this->deathCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
osSyncPrintf("7\n");
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->deathCamera, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
osSyncPrintf("8\n");
|
||||
this->deathState = DEATH_THROES;
|
||||
player->actor.speedXZ = 0.0f;
|
||||
this->timers[0] = 50;
|
||||
this->cameraEye = camera->eye;
|
||||
this->cameraAt = camera->at;
|
||||
this->cameraNextEye.x = this->targetPos.x;
|
||||
this->cameraNextEye.y = GND_BOSSROOM_CENTER_Y + 83.0f;
|
||||
this->cameraNextEye.z = (this->targetPos.z + 100.0f) + 50;
|
||||
this->cameraNextAt.x = this->targetPos.x;
|
||||
this->cameraNextAt.y = this->targetPos.y - 10.0f;
|
||||
this->cameraNextAt.z = this->targetPos.z;
|
||||
this->cameraEyeVel.x = fabsf(camera->eye.x - this->cameraNextEye.x);
|
||||
this->cameraEyeVel.y = fabsf(camera->eye.y - this->cameraNextEye.y);
|
||||
this->cameraEyeVel.z = fabsf(camera->eye.z - this->cameraNextEye.z);
|
||||
this->cameraAtVel.x = fabsf(camera->at.x - this->cameraNextAt.x);
|
||||
this->cameraAtVel.y = fabsf(camera->at.y - this->cameraNextAt.y);
|
||||
this->cameraAtVel.z = fabsf(camera->at.z - this->cameraNextAt.z);
|
||||
this->cameraAccel = 0.02f;
|
||||
this->cameraEyeMaxVel.x = this->cameraEyeMaxVel.y = this->cameraEyeMaxVel.z = 0.05f;
|
||||
this->subCamEye = mainCam->eye;
|
||||
this->subCamAt = mainCam->at;
|
||||
this->subCamEyeNext.x = this->targetPos.x;
|
||||
this->subCamEyeNext.y = GND_BOSSROOM_CENTER_Y + 83.0f;
|
||||
this->subCamEyeNext.z = (this->targetPos.z + 100.0f) + 50;
|
||||
this->subCamAtNext.x = this->targetPos.x;
|
||||
this->subCamAtNext.y = this->targetPos.y - 10.0f;
|
||||
this->subCamAtNext.z = this->targetPos.z;
|
||||
this->subCamEyeVel.x = fabsf(mainCam->eye.x - this->subCamEyeNext.x);
|
||||
this->subCamEyeVel.y = fabsf(mainCam->eye.y - this->subCamEyeNext.y);
|
||||
this->subCamEyeVel.z = fabsf(mainCam->eye.z - this->subCamEyeNext.z);
|
||||
this->subCamAtVel.x = fabsf(mainCam->at.x - this->subCamAtNext.x);
|
||||
this->subCamAtVel.y = fabsf(mainCam->at.y - this->subCamAtNext.y);
|
||||
this->subCamAtVel.z = fabsf(mainCam->at.z - this->subCamAtNext.z);
|
||||
this->subCamAccel = 0.02f;
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.05f;
|
||||
this->work[GND_ACTION_STATE] = DEATH_SPASM;
|
||||
this->timers[0] = 150;
|
||||
this->cameraAtMaxVel.x = 0.2f;
|
||||
this->cameraAtMaxVel.y = 0.2f;
|
||||
this->cameraAtMaxVel.z = 0.2f;
|
||||
this->subCamAtMaxVelFrac.x = 0.2f;
|
||||
this->subCamAtMaxVelFrac.y = 0.2f;
|
||||
this->subCamAtMaxVelFrac.z = 0.2f;
|
||||
case DEATH_THROES:
|
||||
switch (this->work[GND_ACTION_STATE]) {
|
||||
case DEATH_SPASM:
|
||||
|
@ -1006,18 +1006,18 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
|
||||
Math_ApproachF(&this->cameraNextEye.z, this->targetPos.z + 60.0f, 0.02f, 0.5f);
|
||||
Math_ApproachF(&this->subCamEyeNext.z, this->targetPos.z + 60.0f, 0.02f, 0.5f);
|
||||
Math_ApproachF(&this->actor.world.pos.y, GND_BOSSROOM_CENTER_Y + 133.0f, 0.05f, 100.0f);
|
||||
this->actor.world.pos.y += Math_SinS(this->work[GND_VARIANCE_TIMER] * 1500);
|
||||
this->cameraNextAt.x = this->targetPos.x;
|
||||
this->cameraNextAt.y = this->targetPos.y - 10.0f;
|
||||
this->cameraNextAt.z = this->targetPos.z;
|
||||
this->subCamAtNext.x = this->targetPos.x;
|
||||
this->subCamAtNext.y = this->targetPos.y - 10.0f;
|
||||
this->subCamAtNext.z = this->targetPos.z;
|
||||
if (this->timers[0] == 0) {
|
||||
this->deathState = DEATH_WARP;
|
||||
this->timers[0] = 350;
|
||||
this->timers[1] = 50;
|
||||
this->fwork[GND_CAMERA_ZOOM] = 300.0f;
|
||||
this->cameraNextEye.y = GND_BOSSROOM_CENTER_Y + 233.0f;
|
||||
this->subCamEyeNext.y = GND_BOSSROOM_CENTER_Y + 233.0f;
|
||||
player->actor.world.pos.x = GND_BOSSROOM_CENTER_X - 200.0f;
|
||||
player->actor.world.pos.z = GND_BOSSROOM_CENTER_Z;
|
||||
holdCamera = true;
|
||||
|
@ -1040,13 +1040,13 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
this->fwork[GND_CAMERA_ANGLE] += 0x78;
|
||||
camX = Math_SinS(this->fwork[GND_CAMERA_ANGLE]) * this->fwork[GND_CAMERA_ZOOM];
|
||||
camZ = Math_CosS(this->fwork[GND_CAMERA_ANGLE]) * this->fwork[GND_CAMERA_ZOOM];
|
||||
this->cameraEye.x = GND_BOSSROOM_CENTER_X + camX;
|
||||
this->cameraEye.y = this->cameraNextEye.y;
|
||||
this->cameraEye.z = GND_BOSSROOM_CENTER_Z + camZ;
|
||||
this->cameraAt.x = GND_BOSSROOM_CENTER_X;
|
||||
this->cameraAt.y = GND_BOSSROOM_CENTER_Y + 23.0f;
|
||||
this->cameraAt.z = GND_BOSSROOM_CENTER_Z;
|
||||
Math_ApproachF(&this->cameraNextEye.y, GND_BOSSROOM_CENTER_Y + 33.0f, 0.05f, 0.5f);
|
||||
this->subCamEye.x = GND_BOSSROOM_CENTER_X + camX;
|
||||
this->subCamEye.y = this->subCamEyeNext.y;
|
||||
this->subCamEye.z = GND_BOSSROOM_CENTER_Z + camZ;
|
||||
this->subCamAt.x = GND_BOSSROOM_CENTER_X;
|
||||
this->subCamAt.y = GND_BOSSROOM_CENTER_Y + 23.0f;
|
||||
this->subCamAt.z = GND_BOSSROOM_CENTER_Z;
|
||||
Math_ApproachF(&this->subCamEyeNext.y, GND_BOSSROOM_CENTER_Y + 33.0f, 0.05f, 0.5f);
|
||||
Math_ApproachF(&this->fwork[GND_CAMERA_ZOOM], 170.0f, 0.05f, 1.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.x, GND_BOSSROOM_CENTER_X, 0.05f, 1.5f);
|
||||
Math_ApproachF(&this->actor.world.pos.y, GND_BOSSROOM_CENTER_Y + 83.0f, 0.05f, 1.0f);
|
||||
|
@ -1070,12 +1070,12 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
holdCamera = true;
|
||||
bodyDecayLevel = 2;
|
||||
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y + 83.0f;
|
||||
this->cameraEye.x = GND_BOSSROOM_CENTER_X;
|
||||
this->cameraEye.y = GND_BOSSROOM_CENTER_Y + 83.0f;
|
||||
this->cameraEye.z = GND_BOSSROOM_CENTER_Z + 50.0f;
|
||||
this->cameraAt.x = GND_BOSSROOM_CENTER_X;
|
||||
this->cameraAt.y = GND_BOSSROOM_CENTER_Y + 103.0f;
|
||||
this->cameraAt.z = GND_BOSSROOM_CENTER_Z;
|
||||
this->subCamEye.x = GND_BOSSROOM_CENTER_X;
|
||||
this->subCamEye.y = GND_BOSSROOM_CENTER_Y + 83.0f;
|
||||
this->subCamEye.z = GND_BOSSROOM_CENTER_Z + 50.0f;
|
||||
this->subCamAt.x = GND_BOSSROOM_CENTER_X;
|
||||
this->subCamAt.y = GND_BOSSROOM_CENTER_Y + 103.0f;
|
||||
this->subCamAt.z = GND_BOSSROOM_CENTER_Z;
|
||||
if (this->timers[0] == 0) {
|
||||
this->deathState = DEATH_DISINTEGRATE;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gPhantomGanonLastPoseAnim, -10.0f);
|
||||
|
@ -1086,9 +1086,9 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
case DEATH_DISINTEGRATE:
|
||||
holdCamera = true;
|
||||
bodyDecayLevel = 3;
|
||||
Math_ApproachZeroF(&this->cameraEye.y, 0.05f, 1.0f); // approaches GND_BOSSROOM_CENTER_Y + 33.0f
|
||||
Math_ApproachF(&this->cameraEye.z, GND_BOSSROOM_CENTER_Z + 170.0f, 0.05f, 2.0f);
|
||||
Math_ApproachF(&this->cameraAt.y, GND_BOSSROOM_CENTER_Y + 53.0f, 0.05f, 1.0f);
|
||||
Math_ApproachZeroF(&this->subCamEye.y, 0.05f, 1.0f); // approaches GND_BOSSROOM_CENTER_Y + 33.0f
|
||||
Math_ApproachF(&this->subCamEye.z, GND_BOSSROOM_CENTER_Z + 170.0f, 0.05f, 2.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, GND_BOSSROOM_CENTER_Y + 53.0f, 0.05f, 1.0f);
|
||||
if (this->timers[0] == 0) {
|
||||
this->timers[0] = 250;
|
||||
this->deathState = DEATH_FINISH;
|
||||
|
@ -1103,17 +1103,17 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
}
|
||||
|
||||
Math_ApproachZeroF(&this->cameraEye.y, 0.05f, 1.0f); // GND_BOSSROOM_CENTER_Y + 33.0f
|
||||
Math_ApproachF(&this->cameraEye.z, GND_BOSSROOM_CENTER_Z + 170.0f, 0.05f, 2.0f);
|
||||
Math_ApproachF(&this->cameraAt.y, GND_BOSSROOM_CENTER_Y + 53.0f, 0.05f, 1.0f);
|
||||
Math_ApproachZeroF(&this->subCamEye.y, 0.05f, 1.0f); // GND_BOSSROOM_CENTER_Y + 33.0f
|
||||
Math_ApproachF(&this->subCamEye.z, GND_BOSSROOM_CENTER_Z + 170.0f, 0.05f, 2.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, GND_BOSSROOM_CENTER_Y + 53.0f, 0.05f, 1.0f);
|
||||
if (this->timers[0] == 0) {
|
||||
EnfHG* horse = (EnfHG*)this->actor.child;
|
||||
|
||||
camera->eye = this->cameraEye;
|
||||
camera->eyeNext = this->cameraEye;
|
||||
camera->at = this->cameraAt;
|
||||
func_800C08AC(globalCtx, this->deathCamera, 0);
|
||||
this->deathCamera = 0;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X,
|
||||
|
@ -1198,24 +1198,24 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->deathCamera != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (!holdCamera) {
|
||||
Math_ApproachF(&this->cameraEye.x, this->cameraNextEye.x, this->cameraEyeMaxVel.x,
|
||||
this->cameraEyeVel.x * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraEye.y, this->cameraNextEye.y, this->cameraEyeMaxVel.y,
|
||||
this->cameraEyeVel.y * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraEye.z, this->cameraNextEye.z, this->cameraEyeMaxVel.z,
|
||||
this->cameraEyeVel.z * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.x, this->cameraNextAt.x, this->cameraAtMaxVel.x,
|
||||
this->cameraAtVel.x * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.y, this->cameraNextAt.y, this->cameraAtMaxVel.y,
|
||||
this->cameraAtVel.y * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.z, this->cameraNextAt.z, this->cameraAtMaxVel.z,
|
||||
this->cameraAtVel.z * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, this->cameraAccel);
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x,
|
||||
this->subCamEyeVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamEyeMaxVelFrac.y,
|
||||
this->subCamEyeVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z,
|
||||
this->subCamEyeVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x,
|
||||
this->subCamAtVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z,
|
||||
this->subCamAtVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel);
|
||||
}
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->deathCamera, &this->cameraAt, &this->cameraEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,18 +76,18 @@ typedef struct BossGanondrof {
|
|||
/* 0x0200 */ Vec3f spearTip;
|
||||
/* 0x020C */ Vec3f targetPos;
|
||||
/* 0x0218 */ Vec3f bodyPartsPos[27]; // only 25 used
|
||||
/* 0x035C */ s16 deathCamera;
|
||||
/* 0x035C */ s16 subCamId;
|
||||
/* 0x035E */ s16 deathState;
|
||||
/* 0x0360 */ Vec3f cameraEye;
|
||||
/* 0x036C */ Vec3f cameraAt;
|
||||
/* 0x0378 */ Vec3f cameraEyeVel;
|
||||
/* 0x0384 */ Vec3f cameraAtVel;
|
||||
/* 0x0390 */ Vec3f cameraNextEye;
|
||||
/* 0x039C */ Vec3f cameraEyeMaxVel;
|
||||
/* 0x03A8 */ Vec3f cameraNextAt;
|
||||
/* 0x03B4 */ Vec3f cameraAtMaxVel;
|
||||
/* 0x03C0 */ f32 cameraSpeedMod;
|
||||
/* 0x03C4 */ f32 cameraAccel;
|
||||
/* 0x0360 */ Vec3f subCamEye;
|
||||
/* 0x036C */ Vec3f subCamAt;
|
||||
/* 0x0378 */ Vec3f subCamEyeVel;
|
||||
/* 0x0384 */ Vec3f subCamAtVel;
|
||||
/* 0x0390 */ Vec3f subCamEyeNext;
|
||||
/* 0x039C */ Vec3f subCamEyeMaxVelFrac;
|
||||
/* 0x03A8 */ Vec3f subCamAtNext;
|
||||
/* 0x03B4 */ Vec3f subCamAtMaxVelFrac;
|
||||
/* 0x03C0 */ f32 subCamVelFactor;
|
||||
/* 0x03C4 */ f32 subCamAccel;
|
||||
/* 0x03C8 */ f32 legRotY;
|
||||
/* 0x03CC */ f32 legRotZ;
|
||||
/* 0x03D0 */ f32 legSplitY;
|
||||
|
|
|
@ -621,17 +621,16 @@ void BossGoma_UpdateCeilingMovement(BossGoma* this, GlobalContext* globalCtx, f3
|
|||
|
||||
void BossGoma_SetupEncounterState4(BossGoma* this, GlobalContext* globalCtx) {
|
||||
Player* player;
|
||||
Camera* camera;
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
player = GET_PLAYER(globalCtx);
|
||||
this->actionState = 4;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
this->subCameraId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCameraId, 7);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_UNK3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
Animation_Change(&this->skelanime, &gGohmaEyeRollAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGohmaEyeRollAnim),
|
||||
ANIMMODE_ONCE, 0.0f);
|
||||
this->currentAnimFrameCount = Animation_GetLastFrame(&gGohmaEyeRollAnim);
|
||||
|
@ -648,15 +647,15 @@ void BossGoma_SetupEncounterState4(BossGoma* this, GlobalContext* globalCtx) {
|
|||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(globalCtx)->actor) + 0x8000;
|
||||
|
||||
// room entrance, closer to room center
|
||||
this->subCameraEye.x = 90.0f;
|
||||
this->subCameraEye.z = 170.0f;
|
||||
this->subCameraEye.y = camera->eye.y + 20.0f;
|
||||
this->subCamEye.x = 90.0f;
|
||||
this->subCamEye.z = 170.0f;
|
||||
this->subCamEye.y = mainCam->eye.y + 20.0f;
|
||||
|
||||
this->framesUntilNextAction = 50;
|
||||
|
||||
this->subCameraAt.x = this->actor.world.pos.x;
|
||||
this->subCameraAt.y = this->actor.world.pos.y;
|
||||
this->subCameraAt.z = this->actor.world.pos.z;
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAt.y = this->actor.world.pos.y;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
}
|
||||
|
@ -669,7 +668,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, GlobalContext* globalCtx) {
|
|||
* Skips the door and look-at-Gohma puzzle if the player already reached the boss card part before
|
||||
*/
|
||||
void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
||||
Camera* cam;
|
||||
Camera* mainCam;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 pad[2];
|
||||
|
||||
|
@ -693,10 +692,10 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
case 1: // player entered the room
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->subCameraId = Gameplay_CreateSubCamera(globalCtx);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
osSyncPrintf("MAKE CAMERA !!! 1 !!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCameraId, 7);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->actionState = 2;
|
||||
// ceiling center
|
||||
this->actor.world.pos.x = -150.0f;
|
||||
|
@ -706,13 +705,13 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.x = 150.0f;
|
||||
player->actor.world.pos.z = 300.0f;
|
||||
// near ceiling center
|
||||
this->subCameraEye.x = -350.0f;
|
||||
this->subCameraEye.y = -310.0f;
|
||||
this->subCameraEye.z = -350.0f;
|
||||
this->subCamEye.x = -350.0f;
|
||||
this->subCamEye.y = -310.0f;
|
||||
this->subCamEye.z = -350.0f;
|
||||
// below room entrance
|
||||
this->subCameraAt.x = player->actor.world.pos.x;
|
||||
this->subCameraAt.y = player->actor.world.pos.y - 200.0f + 25.0f;
|
||||
this->subCameraAt.z = player->actor.world.pos.z;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = player->actor.world.pos.y - 200.0f + 25.0f;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
this->framesUntilNextAction = 50;
|
||||
this->timer = 80;
|
||||
this->frameCount = 0;
|
||||
|
@ -728,22 +727,22 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->framesUntilNextAction == 0) {
|
||||
// (-20, 25, -65) is towards room center
|
||||
Math_ApproachF(&this->subCameraEye.x, player->actor.world.pos.x - 20.0f, 0.049999997f,
|
||||
this->subCameraFollowSpeed * 50.0f);
|
||||
Math_ApproachF(&this->subCameraEye.y, player->actor.world.pos.y + 25.0f, 0.099999994f,
|
||||
this->subCameraFollowSpeed * 130.0f);
|
||||
Math_ApproachF(&this->subCameraEye.z, player->actor.world.pos.z - 65.0f, 0.049999997f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraFollowSpeed, 0.29999998f, 1.0f, 0.0050000004f);
|
||||
Math_ApproachF(&this->subCamEye.x, player->actor.world.pos.x - 20.0f, 0.049999997f,
|
||||
this->subCamFollowSpeed * 50.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, player->actor.world.pos.y + 25.0f, 0.099999994f,
|
||||
this->subCamFollowSpeed * 130.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, player->actor.world.pos.z - 65.0f, 0.049999997f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamFollowSpeed, 0.29999998f, 1.0f, 0.0050000004f);
|
||||
if (this->timer == 0) {
|
||||
Math_ApproachF(&this->subCameraAt.y, player->actor.world.pos.y + 35.0f, 0.099999994f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 35.0f, 0.099999994f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
}
|
||||
this->subCameraAt.x = player->actor.world.pos.x;
|
||||
this->subCameraAt.z = player->actor.world.pos.z;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, 0, &this->subCameraAt, &this->subCameraEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, CAM_ID_MAIN, &this->subCamAt, &this->subCamEye);
|
||||
|
||||
if (this->frameCount == 176) {
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f,
|
||||
|
@ -760,12 +759,12 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->frameCount >= 228) {
|
||||
cam = Gameplay_GetCamera(globalCtx, 0);
|
||||
cam->eye = this->subCameraEye;
|
||||
cam->eyeNext = this->subCameraEye;
|
||||
cam->at = this->subCameraAt;
|
||||
func_800C08AC(globalCtx, this->subCameraId, 0);
|
||||
this->subCameraId = 0;
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->actionState = 3;
|
||||
|
@ -798,12 +797,12 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->framesUntilNextAction <= 40) {
|
||||
// (22, -25, 45) is towards room entrance
|
||||
Math_ApproachF(&this->subCameraEye.x, this->actor.world.pos.x + 22.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCameraEye.y, this->actor.world.pos.y - 25.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCameraEye.z, this->actor.world.pos.z + 45.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCameraAt.x, this->actor.world.pos.x, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCameraAt.y, this->actor.world.pos.y + 5.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCameraAt.z, this->actor.world.pos.z, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + 22.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, this->actor.world.pos.y - 25.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + 45.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamAt.x, this->actor.world.pos.x, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 5.0f, 0.2f, 100.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, this->actor.world.pos.z, 0.2f, 100.0f);
|
||||
|
||||
if (this->framesUntilNextAction == 30) {
|
||||
globalCtx->envCtx.unk_BF = 4;
|
||||
|
@ -824,7 +823,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelanime, &gGohmaWalkAnim, 2.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGohmaWalkAnim), ANIMMODE_LOOP, -5.0f);
|
||||
this->framesUntilNextAction = 30;
|
||||
this->subCameraFollowSpeed = 0.0f;
|
||||
this->subCamFollowSpeed = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -832,15 +831,15 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
case 5: // running on the ceiling
|
||||
// (98, 0, 85) is towards room entrance
|
||||
Math_ApproachF(&this->subCameraEye.x, this->actor.world.pos.x + 8.0f + 90.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraEye.y, player->actor.world.pos.y, 0.1f, this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraEye.z, this->actor.world.pos.z + 45.0f + 40.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraFollowSpeed, 1.0f, 1.0f, 0.05f);
|
||||
this->subCameraAt.x = this->actor.world.pos.x;
|
||||
this->subCameraAt.y = this->actor.world.pos.y;
|
||||
this->subCameraAt.z = this->actor.world.pos.z;
|
||||
Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + 8.0f + 90.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, player->actor.world.pos.y, 0.1f, this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + 45.0f + 40.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamFollowSpeed, 1.0f, 1.0f, 0.05f);
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAt.y = this->actor.world.pos.y;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
|
||||
if (this->framesUntilNextAction < 0) {
|
||||
//! @bug ? unreachable, timer is >= 0
|
||||
|
@ -868,15 +867,15 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 9: // falling from the ceiling
|
||||
Math_ApproachF(&this->subCameraEye.x, this->actor.world.pos.x + 8.0f + 90.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraEye.y, player->actor.world.pos.y + 10.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraEye.z, this->actor.world.pos.z + 45.0f + 40.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
this->subCameraAt.x = this->actor.world.pos.x;
|
||||
this->subCameraAt.y = this->actor.world.pos.y;
|
||||
this->subCameraAt.z = this->actor.world.pos.z;
|
||||
Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + 8.0f + 90.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, player->actor.world.pos.y + 10.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + 45.0f + 40.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAt.y = this->actor.world.pos.y;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
Math_ApproachS(&this->actor.shape.rot.x, 0, 2, 0xBB8);
|
||||
Math_ApproachS(&this->actor.world.rot.y,
|
||||
|
@ -895,25 +894,25 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 130: // focus Gohma on the ground
|
||||
Math_ApproachF(&this->subCameraEye.x, this->actor.world.pos.x + 8.0f + 90.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraEye.y, player->actor.world.pos.y + 10.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCameraEye.z, this->actor.world.pos.z + 45.0f + 40.0f, 0.1f,
|
||||
this->subCameraFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + 8.0f + 90.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, player->actor.world.pos.y + 10.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + 45.0f + 40.0f, 0.1f,
|
||||
this->subCamFollowSpeed * 30.0f);
|
||||
Math_ApproachS(&this->actor.shape.rot.x, 0, 2, 0xBB8);
|
||||
Math_ApproachS(&this->actor.world.rot.y,
|
||||
Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(globalCtx)->actor), 2, 0x7D0);
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
this->subCameraAt.x = this->actor.world.pos.x;
|
||||
this->subCameraAt.z = this->actor.world.pos.z;
|
||||
this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAt.z = this->actor.world.pos.z;
|
||||
|
||||
if (this->framesUntilNextAction != 0) {
|
||||
f32 s = sinf(this->framesUntilNextAction * 3.1415f * 0.5f);
|
||||
|
||||
this->subCameraAt.y = this->framesUntilNextAction * s * 0.7f + this->actor.world.pos.y;
|
||||
this->subCamAt.y = this->framesUntilNextAction * s * 0.7f + this->actor.world.pos.y;
|
||||
} else {
|
||||
Math_ApproachF(&this->subCameraAt.y, this->actor.focus.pos.y, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, this->actor.focus.pos.y, 0.1f, 10.0f);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
|
||||
|
@ -938,28 +937,28 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
case 140:
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
Math_ApproachF(&this->subCameraAt.y, this->actor.focus.pos.y, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, this->actor.focus.pos.y, 0.1f, 10.0f);
|
||||
|
||||
if (this->framesUntilNextAction == 0) {
|
||||
this->framesUntilNextAction = 30;
|
||||
this->actionState = 150;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_UNK3);
|
||||
}
|
||||
break;
|
||||
|
||||
case 150:
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
Math_SmoothStepToF(&this->subCameraEye.x, this->actor.world.pos.x + 150.0f, 0.2f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraEye.z, this->actor.world.pos.z + 220.0f, 0.2f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, this->actor.world.pos.x + 150.0f, 0.2f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, this->actor.world.pos.z + 220.0f, 0.2f, 100.0f, 0.1f);
|
||||
|
||||
if (this->framesUntilNextAction == 0) {
|
||||
cam = Gameplay_GetCamera(globalCtx, 0);
|
||||
cam->eye = this->subCameraEye;
|
||||
cam->eyeNext = this->subCameraEye;
|
||||
cam->at = this->subCameraAt;
|
||||
func_800C08AC(globalCtx, this->subCameraId, 0);
|
||||
this->subCameraId = 0;
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
BossGoma_SetupFloorMain(this);
|
||||
this->disableGameplayLogic = false;
|
||||
this->patienceTimer = 200;
|
||||
|
@ -969,8 +968,8 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->subCameraId != 0) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCameraId, &this->subCameraAt, &this->subCameraEye);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -990,7 +989,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
Vec3f vel2 = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f accel2 = { 0.0f, -0.5f, 0.0f };
|
||||
Vec3f pos;
|
||||
Camera* camera;
|
||||
Camera* mainCam;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Vec3f childPos;
|
||||
s16 i;
|
||||
|
@ -1055,18 +1054,18 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
this->actionState = 1;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
this->subCameraId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCameraId, 7);
|
||||
camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
this->subCameraEye.x = camera->eye.x;
|
||||
this->subCameraEye.y = camera->eye.y;
|
||||
this->subCameraEye.z = camera->eye.z;
|
||||
this->subCameraAt.x = camera->at.x;
|
||||
this->subCameraAt.y = camera->at.y;
|
||||
this->subCameraAt.z = camera->at.z;
|
||||
dx = this->subCameraEye.x - this->actor.world.pos.x;
|
||||
dz = this->subCameraEye.z - this->actor.world.pos.z;
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_UNK3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
mainCam = Gameplay_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;
|
||||
dx = this->subCamEye.x - this->actor.world.pos.x;
|
||||
dz = this->subCamEye.z - this->actor.world.pos.z;
|
||||
this->defeatedCameraEyeDist = sqrtf(SQ(dx) + SQ(dz));
|
||||
this->defeatedCameraEyeAngle = Math_FAtan2F(dx, dz);
|
||||
this->timer = 270;
|
||||
|
@ -1101,12 +1100,12 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
dx = dx * this->defeatedCameraEyeDist;
|
||||
dz = cosf(this->defeatedCameraEyeAngle);
|
||||
dz = dz * this->defeatedCameraEyeDist;
|
||||
Math_SmoothStepToF(&this->subCameraEye.x, this->actor.world.pos.x + dx, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraEye.z, this->actor.world.pos.z + dz, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraAt.x, this->firstTailLimbWorldPos.x, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraAt.y, this->actor.focus.pos.y, 0.5f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraAt.z, this->firstTailLimbWorldPos.z, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, this->actor.world.pos.x + dx, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, this->actor.world.pos.y + 20.0f, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, this->actor.world.pos.z + dz, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->firstTailLimbWorldPos.x, 0.2f, 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, this->actor.focus.pos.y, 0.5f, 100.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->firstTailLimbWorldPos.z, 0.2f, 50.0f, 0.1f);
|
||||
|
||||
if (this->timer == 80) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
|
@ -1114,24 +1113,24 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->timer == 0) {
|
||||
this->actionState = 2;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 3);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_UNK3);
|
||||
this->timer = 70;
|
||||
this->decayingProgress = 0;
|
||||
this->subCameraFollowSpeed = 0.0f;
|
||||
this->subCamFollowSpeed = 0.0f;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
Math_SmoothStepToF(&this->subCameraEye.x, camera->eye.x, 0.2f, this->subCameraFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraEye.y, camera->eye.y, 0.2f, this->subCameraFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraEye.z, camera->eye.z, 0.2f, this->subCameraFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraAt.x, camera->at.x, 0.2f, this->subCameraFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraAt.y, camera->at.y, 0.2f, this->subCameraFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraAt.z, camera->at.z, 0.2f, this->subCameraFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCameraFollowSpeed, 1.0f, 1.0f, 0.02f, 0.0f);
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
Math_SmoothStepToF(&this->subCamEye.x, mainCam->eye.x, 0.2f, this->subCamFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.y, mainCam->eye.y, 0.2f, this->subCamFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamEye.z, mainCam->eye.z, 0.2f, this->subCamFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, mainCam->at.x, 0.2f, this->subCamFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, mainCam->at.y, 0.2f, this->subCamFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, mainCam->at.z, 0.2f, this->subCamFollowSpeed * 50.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->subCamFollowSpeed, 1.0f, 1.0f, 0.02f, 0.0f);
|
||||
|
||||
if (this->timer == 0) {
|
||||
childPos = roomCenter;
|
||||
|
@ -1175,12 +1174,12 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->timer == 0) {
|
||||
if (Math_SmoothStepToF(&this->actor.scale.y, 0, 1.0f, 0.00075f, 0.0f) <= 0.001f) {
|
||||
camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
camera->eye = this->subCameraEye;
|
||||
camera->eyeNext = this->subCameraEye;
|
||||
camera->at = this->subCameraAt;
|
||||
func_800C08AC(globalCtx, this->subCameraId, 0);
|
||||
this->subCameraId = 0;
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -1191,8 +1190,8 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->subCameraId != 0) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCameraId, &this->subCameraAt, &this->subCameraEye);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
|
||||
if (this->blinkTimer != 0) {
|
||||
|
|
|
@ -117,7 +117,7 @@ typedef struct BossGoma {
|
|||
/* 0x01B6 */ s16 doNotMoveThisFrame;
|
||||
/* 0x01B8 */ s16 visualState;
|
||||
/* 0x01BA */ s16 invincibilityFrames;
|
||||
/* 0x01BC */ s16 subCameraId;
|
||||
/* 0x01BC */ s16 subCamId;
|
||||
/* 0x01BE */ s16 disableGameplayLogic;
|
||||
/* 0x01C0 */ s16 decayingProgress; // when defeated, textures are progressively cleared
|
||||
/* 0x01C2 */ s16 noBackfaceCulling;
|
||||
|
@ -136,7 +136,7 @@ typedef struct BossGoma {
|
|||
/* 0x0204 */ f32 mainEnvColor[3];
|
||||
/* 0x0210 */ f32 eyeEnvColor[3];
|
||||
/* 0x021C */ f32 currentAnimFrameCount; // not used consistently
|
||||
/* 0x0220 */ f32 subCameraFollowSpeed;
|
||||
/* 0x0220 */ f32 subCamFollowSpeed;
|
||||
/* 0x0224 */ f32 eyeIrisScaleY;
|
||||
/* 0x0228 */ f32 defeatedCameraEyeDist;
|
||||
/* 0x022C */ f32 defeatedCameraEyeAngle;
|
||||
|
@ -145,8 +145,8 @@ typedef struct BossGoma {
|
|||
/* 0x026C */ Vec3f firstTailLimbWorldPos;
|
||||
/* 0x0278 */ Vec3f rightHandBackLimbWorldPos;
|
||||
/* 0x0284 */ Vec3f leftHandBackLimbWorldPos;
|
||||
/* 0x0290 */ Vec3f subCameraEye;
|
||||
/* 0x029C */ Vec3f subCameraAt;
|
||||
/* 0x0290 */ Vec3f subCamEye;
|
||||
/* 0x029C */ Vec3f subCamAt;
|
||||
/* 0x02A8 */ Vec3f defeatedLimbPositions[100]; // only 85/86 first indices actually used
|
||||
/* 0x0758 */ u8 deadLimbsState[100]; // only 85/90 first indices actually used
|
||||
/* 0x07BC */ ColliderJntSph collider;
|
||||
|
|
|
@ -413,8 +413,8 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 indS0;
|
||||
s16 indS1;
|
||||
Camera* camera1;
|
||||
Camera* camera2;
|
||||
Camera* mainCam1;
|
||||
Camera* mainCam2;
|
||||
BossMo* otherTent = (BossMo*)this->otherTent;
|
||||
f32 maxSwingRateX;
|
||||
f32 maxSwingLagX;
|
||||
|
@ -767,7 +767,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachS(&player->actor.shape.rot.y, this->grabPosRot.rot.y, 2, 0x7D0);
|
||||
Math_ApproachS(&player->actor.shape.rot.z, this->grabPosRot.rot.z, 2, 0x7D0);
|
||||
if (this->timers[0] == 0) {
|
||||
camera1 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
mainCam1 = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
this->work[MO_TENT_ACTION_STATE] = MO_TENT_SHAKE;
|
||||
this->tentMaxAngle = .001f;
|
||||
this->fwork[MO_TENT_SWING_RATE_X] = this->fwork[MO_TENT_SWING_RATE_Z] =
|
||||
|
@ -777,14 +777,14 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
this->sfxTimer = 30;
|
||||
Audio_ResetIncreasingTranspose();
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->csCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamera, CAM_STAT_ACTIVE);
|
||||
this->cameraEye = camera1->eye;
|
||||
this->cameraAt = camera1->at;
|
||||
this->cameraYaw = Math_FAtan2F(this->cameraEye.x - this->actor.world.pos.x,
|
||||
this->cameraEye.z - this->actor.world.pos.z);
|
||||
this->cameraYawRate = 0;
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamEye = mainCam1->eye;
|
||||
this->subCamAt = mainCam1->at;
|
||||
this->subCamYaw = Math_FAtan2F(this->subCamEye.x - this->actor.world.pos.x,
|
||||
this->subCamEye.z - this->actor.world.pos.z);
|
||||
this->subCamYawRate = 0;
|
||||
goto tent_shake;
|
||||
}
|
||||
}
|
||||
|
@ -845,21 +845,21 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
this->timers[0] = 75;
|
||||
}
|
||||
}
|
||||
if (this->csCamera != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
sp138.x = 0;
|
||||
sp138.y = 100.0f;
|
||||
sp138.z = 200.0f;
|
||||
this->cameraYaw -= this->cameraYawRate;
|
||||
Math_ApproachF(&this->cameraYawRate, 0.01, 1.0f, 0.002f);
|
||||
Matrix_RotateY(this->cameraYaw, MTXMODE_NEW);
|
||||
this->subCamYaw -= this->subCamYawRate;
|
||||
Math_ApproachF(&this->subCamYawRate, 0.01, 1.0f, 0.002f);
|
||||
Matrix_RotateY(this->subCamYaw, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp138, &sp12C);
|
||||
Math_ApproachF(&this->cameraEye.x, this->actor.world.pos.x + sp12C.x, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->cameraEye.y, this->actor.world.pos.y + sp12C.y, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->cameraEye.z, this->actor.world.pos.z + sp12C.z, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->cameraAt.x, player->actor.world.pos.x, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->cameraAt.y, player->actor.world.pos.y, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->cameraAt.z, player->actor.world.pos.z, 0.5f, 50.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->csCamera, &this->cameraAt, &this->cameraEye);
|
||||
Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + sp12C.x, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, this->actor.world.pos.y + sp12C.y, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + sp12C.z, 0.1f, 10.0f);
|
||||
Math_ApproachF(&this->subCamAt.x, player->actor.world.pos.x, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, player->actor.world.pos.z, 0.5f, 50.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
break;
|
||||
case MO_TENT_CUT:
|
||||
|
@ -891,18 +891,18 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case MO_TENT_RETREAT:
|
||||
if (this->csCamera != 0) {
|
||||
Math_ApproachF(&this->cameraAt.x, player->actor.world.pos.x, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->cameraAt.y, player->actor.world.pos.y, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->cameraAt.z, player->actor.world.pos.z, 0.5f, 50.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->csCamera, &this->cameraAt, &this->cameraEye);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Math_ApproachF(&this->subCamAt.x, player->actor.world.pos.x, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y, 0.5f, 50.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, player->actor.world.pos.z, 0.5f, 50.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
if (player->actor.world.pos.y <= 42.0f) {
|
||||
camera2 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera2->eye = this->cameraEye;
|
||||
camera2->eyeNext = this->cameraEye;
|
||||
camera2->at = this->cameraAt;
|
||||
func_800C08AC(globalCtx, this->csCamera, 0);
|
||||
this->csCamera = 0;
|
||||
mainCam2 = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam2->eye = this->subCamEye;
|
||||
mainCam2->eyeNext = this->subCamEye;
|
||||
mainCam2->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
}
|
||||
}
|
||||
|
@ -1201,16 +1201,16 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
f32 sp7C;
|
||||
f32 sp78;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
Vec3f bubblePos;
|
||||
Vec3f bubblePos2;
|
||||
Camera* camera2;
|
||||
Camera* mainCam2;
|
||||
f32 pad50;
|
||||
f32 pad4C;
|
||||
f32 pad48;
|
||||
|
||||
if (this->csState < MO_INTRO_REVEAL) {
|
||||
this->cameraZoom = 80.0f;
|
||||
this->subCamFov = 80.0f;
|
||||
}
|
||||
switch (this->csState) {
|
||||
case MO_INTRO_WAIT:
|
||||
|
@ -1228,9 +1228,9 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
// checks if Link is on one of the four platforms
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->csCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamera, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->csState = MO_INTRO_START;
|
||||
this->timers[2] = 50;
|
||||
|
@ -1248,19 +1248,19 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.z = -130.0f;
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = 0;
|
||||
player->actor.speedXZ = 0.0f;
|
||||
this->cameraEye.x = -424.0f;
|
||||
this->cameraEye.y = -190.0f;
|
||||
this->cameraEye.z = 180.0f;
|
||||
this->cameraAt.x = player->actor.world.pos.x;
|
||||
this->cameraAt.y = -330.0f;
|
||||
this->cameraAt.z = 0.0f;
|
||||
this->subCamEye.x = -424.0f;
|
||||
this->subCamEye.y = -190.0f;
|
||||
this->subCamEye.z = 180.0f;
|
||||
this->subCamAt.x = player->actor.world.pos.x;
|
||||
this->subCamAt.y = -330.0f;
|
||||
this->subCamAt.z = 0.0f;
|
||||
if (this->timers[2] == 0) {
|
||||
this->csState = MO_INTRO_SWIM;
|
||||
this->work[MO_TENT_MOVE_TIMER] = 0;
|
||||
} else if (this->timers[2] < 50) {
|
||||
bubblePos.x = (this->cameraEye.x + 20.0f) + 10.0f;
|
||||
bubblePos.x = (this->subCamEye.x + 20.0f) + 10.0f;
|
||||
bubblePos.y = -250.0f;
|
||||
bubblePos.z = this->cameraEye.z;
|
||||
bubblePos.z = this->subCamEye.z;
|
||||
EffectSsBubble_Spawn(globalCtx, &bubblePos, 0.0f, 10.0f, 50.0f, Rand_ZeroFloat(0.05f) + 0.13f);
|
||||
}
|
||||
if (this->timers[2] == 40) {
|
||||
|
@ -1268,41 +1268,41 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case MO_INTRO_SWIM:
|
||||
Math_ApproachF(&this->cameraYawShake, 0.1f, 1.0f, 0.002f);
|
||||
Math_ApproachF(&this->subCamYawShake, 0.1f, 1.0f, 0.002f);
|
||||
this->targetPos = cutsceneTargets[this->targetIndex];
|
||||
if (this->targetIndex == 5) {
|
||||
tempY = Math_SinS(this->work[MO_TENT_MOVE_TIMER] * 0x500) * 20.0f;
|
||||
} else {
|
||||
tempY = Math_SinS(this->work[MO_TENT_MOVE_TIMER] * 0x500) * 5.0f;
|
||||
}
|
||||
dx = this->targetPos.x - this->cameraEye.x;
|
||||
dy = this->targetPos.y - this->cameraEye.y + tempY;
|
||||
dz = this->targetPos.z - this->cameraEye.z;
|
||||
dx = this->targetPos.x - this->subCamEye.x;
|
||||
dy = this->targetPos.y - this->subCamEye.y + tempY;
|
||||
dz = this->targetPos.z - this->subCamEye.z;
|
||||
tempY = Math_FAtan2F(dx, dz);
|
||||
tempX = Math_FAtan2F(dy, sqrtf(SQ(dx) + SQ(dz)));
|
||||
Math_ApproachS(&this->actor.world.rot.y, RAD_TO_BINANG(tempY), 5, this->cameraYawRate);
|
||||
Math_ApproachS(&this->actor.world.rot.x, RAD_TO_BINANG(tempX), 5, this->cameraYawRate);
|
||||
Math_ApproachS(&this->actor.world.rot.y, RAD_TO_BINANG(tempY), 5, this->subCamYawRate);
|
||||
Math_ApproachS(&this->actor.world.rot.x, RAD_TO_BINANG(tempX), 5, this->subCamYawRate);
|
||||
if (this->work[MO_TENT_MOVE_TIMER] == 150) {
|
||||
this->cameraAtVel.x = fabsf(this->cameraAt.x - player->actor.world.pos.x);
|
||||
this->cameraAtVel.y = fabsf(this->cameraAt.y - player->actor.world.pos.y);
|
||||
this->cameraAtVel.z = fabsf(this->cameraAt.z - player->actor.world.pos.z);
|
||||
this->subCamAtVel.x = fabsf(this->subCamAt.x - player->actor.world.pos.x);
|
||||
this->subCamAtVel.y = fabsf(this->subCamAt.y - player->actor.world.pos.y);
|
||||
this->subCamAtVel.z = fabsf(this->subCamAt.z - player->actor.world.pos.z);
|
||||
}
|
||||
if (this->work[MO_TENT_MOVE_TIMER] >= 150) {
|
||||
Math_ApproachF(&this->cameraAt.x, player->actor.world.pos.x, 0.1f,
|
||||
this->cameraAtVel.x * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.y, player->actor.world.pos.y + 50.0f, 0.1f,
|
||||
this->cameraAtVel.y * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.z, player->actor.world.pos.z, 0.1f,
|
||||
this->cameraAtVel.z * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraSpeedMod, 0.02f, 1.0f, 0.001f);
|
||||
Math_ApproachF(&this->subCamAt.x, player->actor.world.pos.x, 0.1f,
|
||||
this->subCamAtVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 50.0f, 0.1f,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.z, player->actor.world.pos.z, 0.1f,
|
||||
this->subCamAtVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 0.02f, 1.0f, 0.001f);
|
||||
}
|
||||
if (this->work[MO_TENT_MOVE_TIMER] == 190) {
|
||||
func_80078914(&sAudioZeroVec, NA_SE_EN_MOFER_BUBLE_DEMO);
|
||||
}
|
||||
if ((this->work[MO_TENT_MOVE_TIMER] > 150) && (this->work[MO_TENT_MOVE_TIMER] < 180)) {
|
||||
bubblePos2.x = (this->cameraEye.x + 20.0f) + 10.0f;
|
||||
bubblePos2.x = (this->subCamEye.x + 20.0f) + 10.0f;
|
||||
bubblePos2.y = -250.0f;
|
||||
bubblePos2.z = this->cameraEye.z;
|
||||
bubblePos2.z = this->subCamEye.z;
|
||||
EffectSsBubble_Spawn(globalCtx, &bubblePos2, 0.0f, 10.0f, 50.0f, Rand_ZeroFloat(0.05f) + 0.13f);
|
||||
}
|
||||
sp7C = (f32)0x1000;
|
||||
|
@ -1326,14 +1326,14 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
if (this->targetIndex < 5) {
|
||||
if (sqrtf(SQ(dx) + SQ(dz) + SQ(dy)) < 40.0f) {
|
||||
this->targetIndex++;
|
||||
this->cameraYawRate = 0.0f;
|
||||
this->subCamYawRate = 0.0f;
|
||||
}
|
||||
} else {
|
||||
sp80 = 1.5f;
|
||||
sp7C = (f32)0x600;
|
||||
}
|
||||
Math_ApproachF(&this->actor.speedXZ, sp80, 1.0f, sp78);
|
||||
Math_ApproachF(&this->cameraYawRate, sp7C, 1.0f, 128.0f);
|
||||
Math_ApproachF(&this->subCamYawRate, sp7C, 1.0f, 128.0f);
|
||||
if (this->work[MO_TENT_MOVE_TIMER] == 525) {
|
||||
func_8002DF54(globalCtx, &this->actor, 2);
|
||||
}
|
||||
|
@ -1345,11 +1345,11 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.z = -210.0f;
|
||||
player->actor.world.rot.y = -0x8000;
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y;
|
||||
this->cameraYawShake = 0.0f;
|
||||
this->subCamYawShake = 0.0f;
|
||||
sMorphaTent1->baseAlpha = 150.0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->timers[2] = 200;
|
||||
this->cameraZoom = 60.0f;
|
||||
this->subCamFov = 60.0f;
|
||||
this->actor.world.pos = sMorphaTent1->actor.world.pos;
|
||||
this->work[MO_TENT_ACTION_STATE] = MO_CORE_INTRO_REVEAL;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
|
@ -1363,33 +1363,33 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
case MO_INTRO_REVEAL:
|
||||
if (this->timers[2] >= 160) {
|
||||
this->cameraEye.x = 150.0f;
|
||||
this->cameraEye.y = 60.0f;
|
||||
this->cameraEye.z = -230.0f;
|
||||
this->cameraAt.x = 170.0f;
|
||||
this->cameraAt.y = 40.0;
|
||||
this->cameraAt.z = -280.0f;
|
||||
this->subCamEye.x = 150.0f;
|
||||
this->subCamEye.y = 60.0f;
|
||||
this->subCamEye.z = -230.0f;
|
||||
this->subCamAt.x = 170.0f;
|
||||
this->subCamAt.y = 40.0;
|
||||
this->subCamAt.z = -280.0f;
|
||||
sMorphaTent1->xSwing = 0xCEC;
|
||||
sMorphaTent1->fwork[MO_TENT_SWING_RATE_X] = 0.0f;
|
||||
sMorphaTent1->fwork[MO_TENT_SWING_LAG_X] = 1000.0f;
|
||||
sMorphaTent1->fwork[MO_TENT_SWING_SIZE_X] = 2500.0f;
|
||||
if (this->timers[2] == 160) {
|
||||
this->cameraNextAt.y = 65.0f;
|
||||
this->cameraNextAt.z = -280.0f;
|
||||
this->cameraEyeVel.x = fabsf(this->cameraEye.x - 150.0f) * 0.1f;
|
||||
this->cameraEyeVel.y = fabsf(this->cameraEye.y - 60.0f) * 0.1f;
|
||||
this->cameraEyeVel.z = fabsf(this->cameraEye.z - -260.0f) * 0.1f;
|
||||
this->cameraNextEye.x = 150.0f;
|
||||
this->cameraNextEye.y = 60.0f;
|
||||
this->cameraNextEye.z = -260.0f;
|
||||
this->cameraNextAt.x = 155.0f;
|
||||
this->cameraAtMaxVel.x = this->cameraAtMaxVel.y = this->cameraAtMaxVel.z = 0.1f;
|
||||
this->cameraAtVel.x = fabsf(this->cameraAt.x - this->cameraNextAt.x) * 0.1f;
|
||||
this->cameraAtVel.y = fabsf(this->cameraAt.y - this->cameraNextAt.y) * 0.1f;
|
||||
this->cameraAtVel.z = fabsf(this->cameraAt.z - this->cameraNextAt.z) * 0.1f;
|
||||
this->cameraEyeMaxVel.x = this->cameraEyeMaxVel.y = this->cameraEyeMaxVel.z = 0.1f;
|
||||
this->cameraSpeedMod = 0.0f;
|
||||
this->cameraAccel = 0.01f;
|
||||
this->subCamAtNext.y = 65.0f;
|
||||
this->subCamAtNext.z = -280.0f;
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEye.x - 150.0f) * 0.1f;
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEye.y - 60.0f) * 0.1f;
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEye.z - -260.0f) * 0.1f;
|
||||
this->subCamEyeNext.x = 150.0f;
|
||||
this->subCamEyeNext.y = 60.0f;
|
||||
this->subCamEyeNext.z = -260.0f;
|
||||
this->subCamAtNext.x = 155.0f;
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f;
|
||||
this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * 0.1f;
|
||||
this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.1f;
|
||||
this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.1f;
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.1f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.01f;
|
||||
this->tentMaxAngle = 0.001f;
|
||||
this->tentSpeed = 0.0f;
|
||||
sp9F = 1;
|
||||
|
@ -1398,25 +1398,25 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
sp9F = 1;
|
||||
}
|
||||
if (this->timers[2] == 50) {
|
||||
this->cameraNextAt.x = 160.0f;
|
||||
this->cameraNextAt.y = 58.0f;
|
||||
this->cameraNextAt.z = -247.0f;
|
||||
this->cameraEyeVel.x = fabsf(this->cameraEye.x - 111.0f) * 0.1f;
|
||||
this->cameraEyeVel.y = fabsf(this->cameraEye.y - 133.0f) * 0.1f;
|
||||
this->cameraEyeVel.z = fabsf(this->cameraEye.z - -191.0f) * 0.1f;
|
||||
this->subCamAtNext.x = 160.0f;
|
||||
this->subCamAtNext.y = 58.0f;
|
||||
this->subCamAtNext.z = -247.0f;
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEye.x - 111.0f) * 0.1f;
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEye.y - 133.0f) * 0.1f;
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEye.z - -191.0f) * 0.1f;
|
||||
if (1) {}
|
||||
this->csState = MO_INTRO_FINISH;
|
||||
this->timers[2] = 110;
|
||||
this->cameraNextEye.x = 111.0f;
|
||||
this->cameraNextEye.y = 133.0f;
|
||||
this->cameraNextEye.z = -191.0f;
|
||||
this->cameraAtVel.x = fabsf(this->cameraAt.x - this->cameraNextAt.x) * 0.1f;
|
||||
this->cameraAtVel.y = fabsf(this->cameraAt.y - this->cameraNextAt.y) * 0.1f;
|
||||
this->cameraAtVel.z = fabsf(this->cameraAt.z - this->cameraNextAt.z) * 0.1f;
|
||||
this->cameraEyeMaxVel.y = 0.03f;
|
||||
this->cameraAtMaxVel.y = 0.03f;
|
||||
this->cameraSpeedMod = 0.0f;
|
||||
this->cameraAccel = 0.01f;
|
||||
this->subCamEyeNext.x = 111.0f;
|
||||
this->subCamEyeNext.y = 133.0f;
|
||||
this->subCamEyeNext.z = -191.0f;
|
||||
this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * 0.1f;
|
||||
this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.1f;
|
||||
this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.1f;
|
||||
this->subCamEyeMaxVelFrac.y = 0.03f;
|
||||
this->subCamAtMaxVelFrac.y = 0.03f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.01f;
|
||||
}
|
||||
if (this->timers[2] == 150) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
|
@ -1429,23 +1429,24 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case MO_INTRO_FINISH:
|
||||
sp9F = 1;
|
||||
this->cameraNextEye.x = 111.0f;
|
||||
this->cameraNextEye.y = 133.0f;
|
||||
this->cameraNextEye.z = -191.0f;
|
||||
this->cameraNextAt.x = 160.0f;
|
||||
this->cameraNextAt.y = 58.0f;
|
||||
this->cameraNextAt.z = -247.0f;
|
||||
this->subCamEyeNext.x = 111.0f;
|
||||
this->subCamEyeNext.y = 133.0f;
|
||||
this->subCamEyeNext.z = -191.0f;
|
||||
this->subCamAtNext.x = 160.0f;
|
||||
this->subCamAtNext.y = 58.0f;
|
||||
this->subCamAtNext.z = -247.0f;
|
||||
if (this->timers[2] == 100) {
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_RETREAT;
|
||||
sMorphaTent1->timers[0] = 50;
|
||||
}
|
||||
if (this->timers[2] == 20) {
|
||||
camera2 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
camera2->eye = this->cameraEye;
|
||||
camera2->eyeNext = this->cameraEye;
|
||||
camera2->at = this->cameraAt;
|
||||
func_800C08AC(globalCtx, this->csCamera, 0);
|
||||
this->csState = this->csCamera = MO_BATTLE;
|
||||
mainCam2 = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam2->eye = this->subCamEye;
|
||||
mainCam2->eyeNext = this->subCamEye;
|
||||
mainCam2->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
// MO_BATTLE / SUB_CAM_ID_DONE
|
||||
this->csState = this->subCamId = 0;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
}
|
||||
|
@ -1458,35 +1459,35 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
sMorphaTent1->actor.speedXZ = 0.0f;
|
||||
sMorphaTent1->actor.shape.rot.y = sMorphaTent1->actor.yawTowardsPlayer;
|
||||
}
|
||||
if (this->csCamera != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (sp9F) {
|
||||
Math_ApproachF(&this->cameraEye.x, this->cameraNextEye.x, this->cameraEyeMaxVel.x,
|
||||
this->cameraEyeVel.x * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraEye.y, this->cameraNextEye.y, this->cameraEyeMaxVel.y,
|
||||
this->cameraEyeVel.y * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraEye.z, this->cameraNextEye.z, this->cameraEyeMaxVel.z,
|
||||
this->cameraEyeVel.z * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.x, this->cameraNextAt.x, this->cameraAtMaxVel.x,
|
||||
this->cameraAtVel.x * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.y, this->cameraNextAt.y, this->cameraAtMaxVel.y,
|
||||
this->cameraAtVel.y * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraAt.z, this->cameraNextAt.z, this->cameraAtMaxVel.z,
|
||||
this->cameraAtVel.z * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, this->cameraAccel);
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x,
|
||||
this->subCamEyeVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamEyeMaxVelFrac.y,
|
||||
this->subCamEyeVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z,
|
||||
this->subCamEyeVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x,
|
||||
this->subCamAtVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z,
|
||||
this->subCamAtVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel);
|
||||
} else if (this->csState < MO_INTRO_REVEAL) {
|
||||
func_8002D908(&this->actor);
|
||||
this->cameraEye.x += this->actor.velocity.x;
|
||||
this->cameraEye.y += this->actor.velocity.y;
|
||||
this->cameraEye.z += this->actor.velocity.z;
|
||||
this->subCamEye.x += this->actor.velocity.x;
|
||||
this->subCamEye.y += this->actor.velocity.y;
|
||||
this->subCamEye.z += this->actor.velocity.z;
|
||||
}
|
||||
this->cameraUp.x = this->cameraUp.z =
|
||||
sinf(this->work[MO_TENT_VAR_TIMER] * 0.03f) * this->cameraYawShake * (-2.0f);
|
||||
this->cameraUp.y = 1.0f;
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->csCamera, &this->cameraAt, &this->cameraEye, &this->cameraUp);
|
||||
camera->eye = this->cameraEye;
|
||||
camera->eyeNext = this->cameraEye;
|
||||
camera->at = this->cameraAt;
|
||||
Gameplay_CameraSetFov(globalCtx, this->csCamera, this->cameraZoom);
|
||||
this->subCamUp.x = this->subCamUp.z =
|
||||
sinf(this->work[MO_TENT_VAR_TIMER] * 0.03f) * this->subCamYawShake * (-2.0f);
|
||||
this->subCamUp.y = 1.0f;
|
||||
Gameplay_CameraSetAtEyeUp(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
Gameplay_CameraSetFov(globalCtx, this->subCamId, this->subCamFov);
|
||||
}
|
||||
|
||||
if ((this->csState > MO_INTRO_START) && (this->work[MO_TENT_MOVE_TIMER] > 540)) {
|
||||
|
@ -1505,7 +1506,7 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
f32 sp7C;
|
||||
Vec3f sp70;
|
||||
Vec3f sp64;
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
Vec3f velocity;
|
||||
Vec3f pos;
|
||||
|
||||
|
@ -1513,17 +1514,17 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
case MO_DEATH_START:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->csCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamera, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->csState = MO_DEATH_MO_CORE_BURST;
|
||||
this->cameraEye = camera->eye;
|
||||
this->subCamEye = mainCam->eye;
|
||||
this->timers[0] = 90;
|
||||
dx = this->actor.world.pos.x - this->cameraEye.x;
|
||||
dz = this->actor.world.pos.z - this->cameraEye.z;
|
||||
this->cameraYaw = Math_FAtan2F(dx, dz);
|
||||
this->cameraDist = sqrtf(SQ(dx) + SQ(dz));
|
||||
this->cameraYawRate = 0.0f;
|
||||
dx = this->actor.world.pos.x - this->subCamEye.x;
|
||||
dz = this->actor.world.pos.z - this->subCamEye.z;
|
||||
this->subCamYaw = Math_FAtan2F(dx, dz);
|
||||
this->subCamDist = sqrtf(SQ(dx) + SQ(dz));
|
||||
this->subCamYawRate = 0.0f;
|
||||
case MO_DEATH_MO_CORE_BURST:
|
||||
this->baseAlpha = 0.0f;
|
||||
if (this->timers[0] & 4) {
|
||||
|
@ -1536,15 +1537,15 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&this->actor.scale.x, sp80, 0.5f, 0.002f);
|
||||
this->actor.scale.z = this->actor.scale.x;
|
||||
Math_ApproachF(&this->actor.scale.y, sp7C, 0.5f, 0.002f);
|
||||
this->cameraYaw += this->cameraYawRate;
|
||||
this->subCamYaw += this->subCamYawRate;
|
||||
if (this->timers[0] >= 30) {
|
||||
Math_ApproachF(&this->cameraYawRate, 0.05f, 1.0f, 0.002f);
|
||||
Math_ApproachF(&this->subCamYawRate, 0.05f, 1.0f, 0.002f);
|
||||
} else {
|
||||
Math_ApproachF(&this->cameraYawRate, 0.0f, 1.0f, 0.002f);
|
||||
Math_ApproachF(&this->subCamYawRate, 0.0f, 1.0f, 0.002f);
|
||||
}
|
||||
Math_ApproachF(&this->actor.world.pos.y, 150.0f, 0.05f, 5.0f);
|
||||
Math_ApproachF(&this->cameraEye.y, 100.0f, 0.05f, 2.0f);
|
||||
this->cameraAt = this->cameraNextAt = this->actor.world.pos;
|
||||
Math_ApproachF(&this->subCamEye.y, 100.0f, 0.05f, 2.0f);
|
||||
this->subCamAt = this->subCamAtNext = this->actor.world.pos;
|
||||
if (this->timers[0] > 20) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MOFER_DEAD - SFX_FLAG);
|
||||
}
|
||||
|
@ -1567,22 +1568,22 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->timers[0] == 0) {
|
||||
this->csState = MO_DEATH_DRAIN_WATER_1;
|
||||
this->cameraDist = 490.0f;
|
||||
this->subCamDist = 490.0f;
|
||||
this->actor.world.pos.y = -1000.0f;
|
||||
this->fwork[MO_TENT_SWING_SIZE_X] = 15.0f;
|
||||
this->cameraYaw = 0.0f;
|
||||
this->cameraEye.x = 490.0f;
|
||||
this->cameraEye.y = 50.0f;
|
||||
this->cameraEye.z = 0.0f;
|
||||
this->cameraAt.x = 0;
|
||||
this->cameraAt.y = -100.0f;
|
||||
this->cameraAt.z = 0.0f;
|
||||
this->subCamYaw = 0.0f;
|
||||
this->subCamEye.x = 490.0f;
|
||||
this->subCamEye.y = 50.0f;
|
||||
this->subCamEye.z = 0.0f;
|
||||
this->subCamAt.x = 0;
|
||||
this->subCamAt.y = -100.0f;
|
||||
this->subCamAt.z = 0.0f;
|
||||
this->work[MO_TENT_VAR_TIMER] = this->work[MO_TENT_MOVE_TIMER] = 0;
|
||||
this->cameraAtMaxVel.y = 0.05f;
|
||||
this->cameraAtVel.y = 4.0f;
|
||||
this->cameraSpeedMod = 0.0f;
|
||||
this->cameraAccel = 0.02f;
|
||||
this->cameraNextAt.y = 320.0f;
|
||||
this->subCamAtMaxVelFrac.y = 0.05f;
|
||||
this->subCamAtVel.y = 4.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.02f;
|
||||
this->subCamAtNext.y = 320.0f;
|
||||
if (1) {}
|
||||
this->timers[0] = 100;
|
||||
sMorphaTent1->drawActor = true;
|
||||
|
@ -1616,36 +1617,36 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
case MO_DEATH_DRAIN_WATER_1:
|
||||
if (this->timers[0] == 0) {
|
||||
this->csState = MO_DEATH_DRAIN_WATER_2;
|
||||
this->cameraAt.y = -200.0f;
|
||||
this->cameraNextAt.y = 320.0f;
|
||||
this->cameraAtMaxVel.y = 0.05f;
|
||||
this->cameraAtVel.y = 4.0f;
|
||||
this->cameraSpeedMod = 0.0f;
|
||||
this->cameraAccel = 0.0f;
|
||||
this->subCamAt.y = -200.0f;
|
||||
this->subCamAtNext.y = 320.0f;
|
||||
this->subCamAtMaxVelFrac.y = 0.05f;
|
||||
this->subCamAtVel.y = 4.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
this->subCamAccel = 0.0f;
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_DEATH_1;
|
||||
this->timers[0] = 125;
|
||||
sMorphaTent1->fwork[MO_TENT_MAX_STRETCH] = 3.7000003f;
|
||||
this->cameraYaw = 0.5f;
|
||||
this->cameraDist = 200.0f;
|
||||
this->subCamYaw = 0.5f;
|
||||
this->subCamDist = 200.0f;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case MO_DEATH_DRAIN_WATER_2:
|
||||
if (this->timers[0] == 0) {
|
||||
this->cameraAccel = 0.02f;
|
||||
this->subCamAccel = 0.02f;
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_DEATH_2;
|
||||
this->csState = MO_DEATH_CEILING;
|
||||
sMorphaTent1->timers[0] = 120;
|
||||
this->timers[0] = 150;
|
||||
}
|
||||
case MO_DEATH_CEILING:
|
||||
Math_ApproachF(&this->cameraYaw, 0.0f, 0.05f, 0.0029999996f);
|
||||
Math_ApproachF(&this->cameraDist, 490.0f, 0.1f, 1.0f);
|
||||
Math_ApproachF(&this->subCamYaw, 0.0f, 0.05f, 0.0029999996f);
|
||||
Math_ApproachF(&this->subCamDist, 490.0f, 0.1f, 1.0f);
|
||||
if (this->timers[0] == 0) {
|
||||
this->csState = MO_DEATH_DROPLET;
|
||||
this->timers[0] = 140;
|
||||
this->cameraYawRate = 0.0f;
|
||||
this->cameraSpeed = 0.0f;
|
||||
this->subCamYawRate = 0.0f;
|
||||
this->subCamSpeed = 0.0f;
|
||||
}
|
||||
break;
|
||||
case MO_DEATH_DROPLET:
|
||||
|
@ -1656,35 +1657,35 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
sMorphaTent1->tentSpeed = sMorphaTent1->tentMaxAngle;
|
||||
}
|
||||
if (this->timers[0] == 0) {
|
||||
if (-100.0f < this->cameraEye.y) {
|
||||
Math_ApproachF(&this->cameraEye.y, sMorphaTent1->actor.world.pos.y - 100.0f, 0.1f, 2000.0f);
|
||||
if (-100.0f < this->subCamEye.y) {
|
||||
Math_ApproachF(&this->subCamEye.y, sMorphaTent1->actor.world.pos.y - 100.0f, 0.1f, 2000.0f);
|
||||
} else {
|
||||
Math_ApproachF(&this->cameraEye.y, -200.0f, 0.1f, 2000.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, -200.0f, 0.1f, 2000.0f);
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->cameraAt.y, (sMorphaTent1->actor.world.pos.y - 50.0f) + 30.0f, 0.5f, 2000.0f);
|
||||
this->cameraNextAt.y = this->cameraAt.y;
|
||||
Math_ApproachF(&this->subCamAt.y, (sMorphaTent1->actor.world.pos.y - 50.0f) + 30.0f, 0.5f, 2000.0f);
|
||||
this->subCamAtNext.y = this->subCamAt.y;
|
||||
} else {
|
||||
Math_ApproachF(&this->cameraEye.y, 300.0f, 0.05f, this->cameraSpeed);
|
||||
Math_ApproachF(&this->subCamEye.y, 300.0f, 0.05f, this->subCamSpeed);
|
||||
}
|
||||
Math_ApproachF(&this->cameraYaw, -M_PI / 2.0f, 0.05f, this->cameraYawRate);
|
||||
Math_ApproachF(&this->cameraSpeed, 3.0f, 1.0f, 0.05f);
|
||||
Math_ApproachF(&this->cameraYawRate, 0.012999999f, 1.0f, 0.0005f);
|
||||
Math_ApproachF(&this->subCamYaw, -M_PI / 2.0f, 0.05f, this->subCamYawRate);
|
||||
Math_ApproachF(&this->subCamSpeed, 3.0f, 1.0f, 0.05f);
|
||||
Math_ApproachF(&this->subCamYawRate, 0.012999999f, 1.0f, 0.0005f);
|
||||
if (sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_DEATH_6) {
|
||||
Math_ApproachF(&this->cameraDist, 200.0f, 0.02f, this->cameraSpeed);
|
||||
Math_ApproachF(&this->subCamDist, 200.0f, 0.02f, this->subCamSpeed);
|
||||
if (sMorphaTent1->timers[0] == 0) {
|
||||
this->csState = MO_DEATH_FINISH;
|
||||
camera->eye = this->cameraEye;
|
||||
camera->eyeNext = this->cameraEye;
|
||||
camera->at = this->cameraAt;
|
||||
func_800C08AC(globalCtx, this->csCamera, 0);
|
||||
this->csCamera = 0;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sMorphaTent1->actor.world.pos.y = -1000.0f;
|
||||
}
|
||||
} else {
|
||||
Math_ApproachF(&this->cameraDist, 150.0f, 0.05f, this->cameraSpeed);
|
||||
Math_ApproachF(&this->subCamDist, 150.0f, 0.05f, this->subCamSpeed);
|
||||
}
|
||||
break;
|
||||
case MO_DEATH_FINISH:
|
||||
|
@ -1712,21 +1713,21 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
Math_ApproachF(&this->fwork[MO_TENT_SWING_SIZE_X], 0.0f, 0.1f, 0.05f);
|
||||
|
||||
sp70.x = this->cameraDist;
|
||||
sp70.x = this->subCamDist;
|
||||
sp70.y = 0.0f;
|
||||
sp70.z = 0.0f;
|
||||
Matrix_RotateY(this->cameraYaw, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->subCamYaw, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp70, &sp64);
|
||||
this->cameraEye.x = sp64.x + this->cameraAt.x;
|
||||
this->cameraEye.z = sp64.z + this->cameraAt.z;
|
||||
this->subCamEye.x = sp64.x + this->subCamAt.x;
|
||||
this->subCamEye.z = sp64.z + this->subCamAt.z;
|
||||
one = 1; // Super fake, but it works
|
||||
if (this->csCamera != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (one) {
|
||||
Math_ApproachF(&this->cameraAt.y, this->cameraNextAt.y, this->cameraAtMaxVel.y,
|
||||
this->cameraAtVel.y * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, this->cameraAccel);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel);
|
||||
}
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->csCamera, &this->cameraAt, &this->cameraEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1770,8 +1771,9 @@ void BossMo_CoreCollisionCheck(BossMo* this, GlobalContext* globalCtx) {
|
|||
this->actor.colChkInfo.health -= damage;
|
||||
this->hitCount++;
|
||||
if ((s8)this->actor.colChkInfo.health <= 0) {
|
||||
if (((sMorphaTent1->csCamera == 0) && (sMorphaTent2 == NULL)) ||
|
||||
((sMorphaTent1->csCamera == 0) && (sMorphaTent2 != NULL) && (sMorphaTent2->csCamera == 0))) {
|
||||
if (((sMorphaTent1->subCamId == SUB_CAM_ID_DONE) && (sMorphaTent2 == NULL)) ||
|
||||
((sMorphaTent1->subCamId == SUB_CAM_ID_DONE) && (sMorphaTent2 != NULL) &&
|
||||
(sMorphaTent2->subCamId == SUB_CAM_ID_DONE))) {
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->csState = MO_DEATH_START;
|
||||
|
@ -2661,7 +2663,7 @@ void BossMo_DrawCore(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BossMo_DrawWater(this, globalCtx);
|
||||
}
|
||||
|
||||
if ((this->csCamera != 0) && (this->csState < MO_INTRO_REVEAL)) {
|
||||
if ((this->subCamId != SUB_CAM_ID_DONE) && (this->csState < MO_INTRO_REVEAL)) {
|
||||
f32 sp8C;
|
||||
f32 sp88;
|
||||
f32 sp84;
|
||||
|
@ -2681,9 +2683,9 @@ void BossMo_DrawCore(Actor* thisx, GlobalContext* globalCtx) {
|
|||
(s16)sMorphaTent1->waterTex1y, 32, 32, 1, (s16)sMorphaTent1->waterTex2x,
|
||||
(s16)sMorphaTent1->waterTex2y, 32, 32));
|
||||
|
||||
sp8C = this->cameraAt.x - this->cameraEye.x;
|
||||
sp88 = this->cameraAt.y - this->cameraEye.y;
|
||||
sp84 = this->cameraAt.z - this->cameraEye.z;
|
||||
sp8C = this->subCamAt.x - this->subCamEye.x;
|
||||
sp88 = this->subCamAt.y - this->subCamEye.y;
|
||||
sp84 = this->subCamAt.z - this->subCamEye.z;
|
||||
temp = SQ(sp8C) + SQ(sp84);
|
||||
sp7C = Math_FAtan2F(sp8C, sp84);
|
||||
sp78 = -Math_FAtan2F(sp88, sqrtf(temp));
|
||||
|
@ -2695,9 +2697,9 @@ void BossMo_DrawCore(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_RotateY(sp7C, MTXMODE_NEW);
|
||||
Matrix_RotateX(sp78, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp6C, &sp60);
|
||||
sp8C = sp60.x + this->cameraEye.x;
|
||||
sp88 = sp60.y + this->cameraEye.y;
|
||||
sp84 = sp60.z + this->cameraEye.z;
|
||||
sp8C = sp60.x + this->subCamEye.x;
|
||||
sp88 = sp60.y + this->subCamEye.y;
|
||||
sp84 = sp60.z + this->subCamEye.z;
|
||||
Matrix_Translate(sp8C, sp88, sp84, MTXMODE_NEW);
|
||||
Matrix_RotateY(sp7C, MTXMODE_APPLY);
|
||||
Matrix_RotateX(sp78, MTXMODE_APPLY);
|
||||
|
|
|
@ -100,28 +100,28 @@ typedef struct BossMo {
|
|||
/* 0x0D68 */ f32 tentSpeed;
|
||||
/* 0x0D6C */ f32 tentPulse;
|
||||
/* 0x0D70 */ Vec3f tentPos[41];
|
||||
/* 0x0F5C */ f32 cameraZoom;
|
||||
/* 0x0F5C */ f32 subCamFov;
|
||||
/* 0x0F60 */ s16 csState;
|
||||
/* 0x0F62 */ s16 csCamera;
|
||||
/* 0x0F62 */ s16 subCamId;
|
||||
/* 0x0F64 */ s16 targetIndex;
|
||||
/* 0x0F68 */ Vec3f cameraEye;
|
||||
/* 0x0F74 */ Vec3f cameraAt;
|
||||
/* 0x0F80 */ Vec3f cameraUp;
|
||||
/* 0x0F68 */ Vec3f subCamEye;
|
||||
/* 0x0F74 */ Vec3f subCamAt;
|
||||
/* 0x0F80 */ Vec3f subCamUp;
|
||||
/* 0x0F8C */ char unk_F8C[0x18];
|
||||
/* 0x0FA4 */ Vec3f cameraEyeVel;
|
||||
/* 0x0FB0 */ Vec3f cameraAtVel;
|
||||
/* 0x0FBC */ Vec3f cameraNextEye;
|
||||
/* 0x0FC8 */ Vec3f cameraEyeMaxVel;
|
||||
/* 0x0FD4 */ Vec3f cameraNextAt;
|
||||
/* 0x0FE0 */ Vec3f cameraAtMaxVel;
|
||||
/* 0x0FEC */ f32 cameraSpeedMod;
|
||||
/* 0x0FF0 */ f32 cameraAccel;
|
||||
/* 0x0FA4 */ Vec3f subCamEyeVel;
|
||||
/* 0x0FB0 */ Vec3f subCamAtVel;
|
||||
/* 0x0FBC */ Vec3f subCamEyeNext;
|
||||
/* 0x0FC8 */ Vec3f subCamEyeMaxVelFrac;
|
||||
/* 0x0FD4 */ Vec3f subCamAtNext;
|
||||
/* 0x0FE0 */ Vec3f subCamAtMaxVelFrac;
|
||||
/* 0x0FEC */ f32 subCamVelFactor;
|
||||
/* 0x0FF0 */ f32 subCamAccel;
|
||||
/* 0x0FF4 */ char unk_FF4[8];
|
||||
/* 0x0FFC */ f32 cameraDist;
|
||||
/* 0x1000 */ f32 cameraSpeed;
|
||||
/* 0x1004 */ f32 cameraYaw;
|
||||
/* 0x1008 */ f32 cameraYawRate;
|
||||
/* 0x100C */ f32 cameraYawShake;
|
||||
/* 0x0FFC */ f32 subCamDist;
|
||||
/* 0x1000 */ f32 subCamSpeed;
|
||||
/* 0x1004 */ f32 subCamYaw;
|
||||
/* 0x1008 */ f32 subCamYawRate;
|
||||
/* 0x100C */ f32 subCamYawShake;
|
||||
/* 0x1010 */ Vec3f tentTipPos;
|
||||
/* 0x101C */ ColliderJntSph tentCollider;
|
||||
/* 0x103C */ ColliderJntSphElement tentElements[19];
|
||||
|
|
|
@ -196,13 +196,13 @@ static Vec3f sRoomCenter = { ROOM_CENTER_X, ROOM_CENTER_Y, ROOM_CENTER_Z };
|
|||
static Vec3f sHandOffsets[2];
|
||||
static s16 sHandYawOffsets[2];
|
||||
|
||||
static s16 sCutsceneCamera;
|
||||
static Vec3f sCameraAt = { ROOM_CENTER_X + 50.0f, ROOM_CENTER_Y + 0.0f, ROOM_CENTER_Z + 0.0f };
|
||||
static Vec3f sCameraEye = { ROOM_CENTER_X + 150.0f, ROOM_CENTER_Y + 100.0f, ROOM_CENTER_Z + 0.0f };
|
||||
static Vec3f sCameraAtVel = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f sCameraEyeVel = { 0.0f, 0.0f, 0.0f };
|
||||
static s16 sSubCamId;
|
||||
static Vec3f sSubCamAt = { ROOM_CENTER_X + 50.0f, ROOM_CENTER_Y + 0.0f, ROOM_CENTER_Z + 0.0f };
|
||||
static Vec3f sSubCamEye = { ROOM_CENTER_X + 150.0f, ROOM_CENTER_Y + 100.0f, ROOM_CENTER_Z + 0.0f };
|
||||
static Vec3f sSubCamAtVel = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f sSubCamEyeVel = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
static Vec3f sCameraAtPoints[] = {
|
||||
static Vec3f sSubCamAtPoints[] = {
|
||||
{ ROOM_CENTER_X - 50.0f, ROOM_CENTER_Y + 300.0f, ROOM_CENTER_Z + 0.0f },
|
||||
{ ROOM_CENTER_X + 150.0f, ROOM_CENTER_Y + 300.0f, ROOM_CENTER_Z + 100.0f },
|
||||
{ ROOM_CENTER_X + 0.0f, ROOM_CENTER_Y + 600.0f, ROOM_CENTER_Z + 100.0f },
|
||||
|
@ -213,7 +213,7 @@ static Vec3f sCameraAtPoints[] = {
|
|||
{ ROOM_CENTER_X - 60.0f, ROOM_CENTER_Y + 180.0f, ROOM_CENTER_Z + 730.0f },
|
||||
};
|
||||
|
||||
static Vec3f sCameraEyePoints[] = {
|
||||
static Vec3f sSubCamEyePoints[] = {
|
||||
{ ROOM_CENTER_X + 250.0f, ROOM_CENTER_Y + 800.0f, ROOM_CENTER_Z + 800.0f },
|
||||
{ ROOM_CENTER_X - 150.0f, ROOM_CENTER_Y + 700.0f, ROOM_CENTER_Z + 1400.0f },
|
||||
{ ROOM_CENTER_X + 250.0f, ROOM_CENTER_Y + 100.0f, ROOM_CENTER_Z + 750.0f },
|
||||
|
@ -374,15 +374,15 @@ void BossSst_HeadSetupIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
sCutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_ACTIVE);
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
sSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_ACTIVE);
|
||||
Math_Vec3f_Copy(&sSubCamAt, &player->actor.world.pos);
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
sCameraEye.z = ROOM_CENTER_Z - 100.0f;
|
||||
sSubCamEye.z = ROOM_CENTER_Z - 100.0f;
|
||||
}
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &sCameraAt, &sCameraEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->actionFunc = BossSst_HeadIntro;
|
||||
}
|
||||
|
@ -407,13 +407,13 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
player->stateFlags1 &= ~PLAYER_STATE1_5;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sCameraAt.y += 30.0f;
|
||||
sCameraAt.z += 300.0f;
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &sCameraAt, &sCameraEye);
|
||||
Gameplay_CopyCamera(globalCtx, MAIN_CAM, sCutsceneCamera);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, sCutsceneCamera);
|
||||
sSubCamAt.y += 30.0f;
|
||||
sSubCamAt.z += 300.0f;
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
Gameplay_CopyCamera(globalCtx, CAM_ID_MAIN, sSubCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, sSubCamId);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_77);
|
||||
BossSst_HeadSetupNeutral(this);
|
||||
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
|
@ -430,7 +430,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
player->currentYaw = -0x8000;
|
||||
}
|
||||
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
Math_Vec3f_Copy(&sSubCamAt, &player->actor.world.pos);
|
||||
if (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (!this->ready) {
|
||||
sFloor->dyna.actor.params = BONGOFLOOR_HIT;
|
||||
|
@ -442,17 +442,17 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
sHands[LEFT]->actor.draw = BossSst_DrawHand;
|
||||
this->actor.draw = BossSst_DrawHead;
|
||||
this->timer = 178;
|
||||
sCameraAt.x = ROOM_CENTER_X - 23.0f;
|
||||
sCameraAt.y = ROOM_CENTER_Y + 0.0f;
|
||||
sCameraAt.z = ROOM_CENTER_Z + 0.0f;
|
||||
sSubCamAt.x = ROOM_CENTER_X - 23.0f;
|
||||
sSubCamAt.y = ROOM_CENTER_Y + 0.0f;
|
||||
sSubCamAt.z = ROOM_CENTER_Z + 0.0f;
|
||||
} else {
|
||||
this->timer = 546;
|
||||
}
|
||||
}
|
||||
} else if (this->timer >= 478) {
|
||||
sCameraEye.x += 10.0f;
|
||||
sCameraEye.y += 10.0f;
|
||||
sCameraEye.z -= 10.0f;
|
||||
sSubCamEye.x += 10.0f;
|
||||
sSubCamEye.y += 10.0f;
|
||||
sSubCamEye.z -= 10.0f;
|
||||
} else if (this->timer >= 448) {
|
||||
if (this->timer == 460) {
|
||||
sHands[RIGHT]->actor.draw = BossSst_DrawHand;
|
||||
|
@ -463,94 +463,94 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
BossSst_HandSetupDownbeat(sHands[RIGHT]);
|
||||
}
|
||||
if (this->timer > 460) {
|
||||
sCameraEye.x -= 40.0f;
|
||||
sCameraEye.y -= 40.0f;
|
||||
sCameraEye.z += 20.0f;
|
||||
sSubCamEye.x -= 40.0f;
|
||||
sSubCamEye.y -= 40.0f;
|
||||
sSubCamEye.z += 20.0f;
|
||||
} else if (this->timer == 460) {
|
||||
sCameraAt.x = sHands[RIGHT]->actor.home.pos.x + 0.0f;
|
||||
sCameraAt.y = sHands[RIGHT]->actor.home.pos.y - 20.0f;
|
||||
sCameraAt.z = sHands[RIGHT]->actor.home.pos.z + 10.0f;
|
||||
sCameraEye.x = sHands[RIGHT]->actor.home.pos.x + 150.0f;
|
||||
sCameraEye.y = sHands[RIGHT]->actor.home.pos.y + 100.0f;
|
||||
sCameraEye.z = sHands[RIGHT]->actor.home.pos.z + 80.0f;
|
||||
sSubCamAt.x = sHands[RIGHT]->actor.home.pos.x + 0.0f;
|
||||
sSubCamAt.y = sHands[RIGHT]->actor.home.pos.y - 20.0f;
|
||||
sSubCamAt.z = sHands[RIGHT]->actor.home.pos.z + 10.0f;
|
||||
sSubCamEye.x = sHands[RIGHT]->actor.home.pos.x + 150.0f;
|
||||
sSubCamEye.y = sHands[RIGHT]->actor.home.pos.y + 100.0f;
|
||||
sSubCamEye.z = sHands[RIGHT]->actor.home.pos.z + 80.0f;
|
||||
}
|
||||
} else {
|
||||
if (this->timer >= 372) {
|
||||
introStateTimer = this->timer - 372;
|
||||
tempo = 6;
|
||||
if (this->timer == 447) {
|
||||
sCameraAt = player->actor.world.pos;
|
||||
sCameraEye.x = ROOM_CENTER_X - 200.0f;
|
||||
sCameraEye.y = ROOM_CENTER_Y + 160.0f;
|
||||
sCameraEye.z = ROOM_CENTER_Z - 190.0f;
|
||||
sSubCamAt = player->actor.world.pos;
|
||||
sSubCamEye.x = ROOM_CENTER_X - 200.0f;
|
||||
sSubCamEye.y = ROOM_CENTER_Y + 160.0f;
|
||||
sSubCamEye.z = ROOM_CENTER_Z - 190.0f;
|
||||
} else if (introStateTimer == 11) {
|
||||
sCameraAt.x = sHands[RIGHT]->actor.home.pos.x + 30.0f;
|
||||
sCameraAt.y = sHands[RIGHT]->actor.home.pos.y + 0.0f;
|
||||
sCameraAt.z = sHands[RIGHT]->actor.home.pos.z + 20.0f;
|
||||
sCameraEye.x = sHands[RIGHT]->actor.home.pos.x + 100.0f;
|
||||
sCameraEye.y = sHands[RIGHT]->actor.home.pos.y + 10.0f;
|
||||
sCameraEye.z = sHands[RIGHT]->actor.home.pos.z - 210.0f;
|
||||
sSubCamAt.x = sHands[RIGHT]->actor.home.pos.x + 30.0f;
|
||||
sSubCamAt.y = sHands[RIGHT]->actor.home.pos.y + 0.0f;
|
||||
sSubCamAt.z = sHands[RIGHT]->actor.home.pos.z + 20.0f;
|
||||
sSubCamEye.x = sHands[RIGHT]->actor.home.pos.x + 100.0f;
|
||||
sSubCamEye.y = sHands[RIGHT]->actor.home.pos.y + 10.0f;
|
||||
sSubCamEye.z = sHands[RIGHT]->actor.home.pos.z - 210.0f;
|
||||
} else if (introStateTimer == 62) {
|
||||
sCameraAt.x = sHands[LEFT]->actor.home.pos.x + 0.0f;
|
||||
sCameraAt.y = sHands[LEFT]->actor.home.pos.y + 50.0f;
|
||||
sCameraAt.z = sHands[LEFT]->actor.home.pos.z + 100.0f;
|
||||
sCameraEye.x = sHands[LEFT]->actor.home.pos.x + 110.0f;
|
||||
sCameraEye.y = sHands[LEFT]->actor.home.pos.y + 180.0f;
|
||||
sCameraEye.z = sHands[LEFT]->actor.home.pos.z - 70.0f;
|
||||
sSubCamAt.x = sHands[LEFT]->actor.home.pos.x + 0.0f;
|
||||
sSubCamAt.y = sHands[LEFT]->actor.home.pos.y + 50.0f;
|
||||
sSubCamAt.z = sHands[LEFT]->actor.home.pos.z + 100.0f;
|
||||
sSubCamEye.x = sHands[LEFT]->actor.home.pos.x + 110.0f;
|
||||
sSubCamEye.y = sHands[LEFT]->actor.home.pos.y + 180.0f;
|
||||
sSubCamEye.z = sHands[LEFT]->actor.home.pos.z - 70.0f;
|
||||
}
|
||||
} else if (this->timer >= 304) {
|
||||
introStateTimer = this->timer - 304;
|
||||
tempo = 5;
|
||||
if (introStateTimer == 11) {
|
||||
sCameraAt.x = sHands[RIGHT]->actor.home.pos.x + 40.0f;
|
||||
sCameraAt.y = sHands[RIGHT]->actor.home.pos.y - 90.0f;
|
||||
sCameraAt.z = sHands[RIGHT]->actor.home.pos.z - 40.0f;
|
||||
sCameraEye.x = sHands[RIGHT]->actor.home.pos.x - 20.0f;
|
||||
sCameraEye.y = sHands[RIGHT]->actor.home.pos.y + 210.0f;
|
||||
sCameraEye.z = sHands[RIGHT]->actor.home.pos.z + 170.0f;
|
||||
sSubCamAt.x = sHands[RIGHT]->actor.home.pos.x + 40.0f;
|
||||
sSubCamAt.y = sHands[RIGHT]->actor.home.pos.y - 90.0f;
|
||||
sSubCamAt.z = sHands[RIGHT]->actor.home.pos.z - 40.0f;
|
||||
sSubCamEye.x = sHands[RIGHT]->actor.home.pos.x - 20.0f;
|
||||
sSubCamEye.y = sHands[RIGHT]->actor.home.pos.y + 210.0f;
|
||||
sSubCamEye.z = sHands[RIGHT]->actor.home.pos.z + 170.0f;
|
||||
} else if (this->timer == 368) {
|
||||
sCameraAt.x = sHands[LEFT]->actor.home.pos.x - 20.0f;
|
||||
sCameraAt.y = sHands[LEFT]->actor.home.pos.y + 0.0f;
|
||||
sCameraAt.z = sHands[LEFT]->actor.home.pos.z + 0.0f;
|
||||
sCameraEye.x = sHands[LEFT]->actor.home.pos.x - 70.0f;
|
||||
sCameraEye.y = sHands[LEFT]->actor.home.pos.y + 170.0f;
|
||||
sCameraEye.z = sHands[LEFT]->actor.home.pos.z + 150.0f;
|
||||
sSubCamAt.x = sHands[LEFT]->actor.home.pos.x - 20.0f;
|
||||
sSubCamAt.y = sHands[LEFT]->actor.home.pos.y + 0.0f;
|
||||
sSubCamAt.z = sHands[LEFT]->actor.home.pos.z + 0.0f;
|
||||
sSubCamEye.x = sHands[LEFT]->actor.home.pos.x - 70.0f;
|
||||
sSubCamEye.y = sHands[LEFT]->actor.home.pos.y + 170.0f;
|
||||
sSubCamEye.z = sHands[LEFT]->actor.home.pos.z + 150.0f;
|
||||
}
|
||||
} else if (this->timer >= 244) {
|
||||
introStateTimer = this->timer - 244;
|
||||
tempo = 4;
|
||||
if (introStateTimer == 11) {
|
||||
sCameraAt.x = sHands[RIGHT]->actor.home.pos.x + 30.0f;
|
||||
sCameraAt.y = sHands[RIGHT]->actor.home.pos.y + 70.0f;
|
||||
sCameraAt.z = sHands[RIGHT]->actor.home.pos.z + 40.0f;
|
||||
sCameraEye.x = sHands[RIGHT]->actor.home.pos.x + 110.0f;
|
||||
sCameraEye.y = sHands[RIGHT]->actor.home.pos.y - 140.0f;
|
||||
sCameraEye.z = sHands[RIGHT]->actor.home.pos.z - 10.0f;
|
||||
sSubCamAt.x = sHands[RIGHT]->actor.home.pos.x + 30.0f;
|
||||
sSubCamAt.y = sHands[RIGHT]->actor.home.pos.y + 70.0f;
|
||||
sSubCamAt.z = sHands[RIGHT]->actor.home.pos.z + 40.0f;
|
||||
sSubCamEye.x = sHands[RIGHT]->actor.home.pos.x + 110.0f;
|
||||
sSubCamEye.y = sHands[RIGHT]->actor.home.pos.y - 140.0f;
|
||||
sSubCamEye.z = sHands[RIGHT]->actor.home.pos.z - 10.0f;
|
||||
} else if (this->timer == 300) {
|
||||
sCameraAt.x = sHands[LEFT]->actor.home.pos.x - 20.0f;
|
||||
sCameraAt.y = sHands[LEFT]->actor.home.pos.y - 80.0f;
|
||||
sCameraAt.z = sHands[LEFT]->actor.home.pos.z + 320.0f;
|
||||
sCameraEye.x = sHands[LEFT]->actor.home.pos.x - 130.0f;
|
||||
sCameraEye.y = sHands[LEFT]->actor.home.pos.y + 130.0f;
|
||||
sCameraEye.z = sHands[LEFT]->actor.home.pos.z - 150.0f;
|
||||
sSubCamAt.x = sHands[LEFT]->actor.home.pos.x - 20.0f;
|
||||
sSubCamAt.y = sHands[LEFT]->actor.home.pos.y - 80.0f;
|
||||
sSubCamAt.z = sHands[LEFT]->actor.home.pos.z + 320.0f;
|
||||
sSubCamEye.x = sHands[LEFT]->actor.home.pos.x - 130.0f;
|
||||
sSubCamEye.y = sHands[LEFT]->actor.home.pos.y + 130.0f;
|
||||
sSubCamEye.z = sHands[LEFT]->actor.home.pos.z - 150.0f;
|
||||
}
|
||||
} else if (this->timer >= 192) {
|
||||
introStateTimer = this->timer - 192;
|
||||
tempo = 3;
|
||||
if (this->timer == 240) {
|
||||
sCameraAt.x = sHands[LEFT]->actor.home.pos.x - 190.0f;
|
||||
sCameraAt.y = sHands[LEFT]->actor.home.pos.y - 110.0f;
|
||||
sCameraAt.z = sHands[LEFT]->actor.home.pos.z + 40.0f;
|
||||
sCameraEye.x = sHands[LEFT]->actor.home.pos.x + 120.0f;
|
||||
sCameraEye.y = sHands[LEFT]->actor.home.pos.y + 130.0f;
|
||||
sCameraEye.z = sHands[LEFT]->actor.home.pos.z + 50.0f;
|
||||
sSubCamAt.x = sHands[LEFT]->actor.home.pos.x - 190.0f;
|
||||
sSubCamAt.y = sHands[LEFT]->actor.home.pos.y - 110.0f;
|
||||
sSubCamAt.z = sHands[LEFT]->actor.home.pos.z + 40.0f;
|
||||
sSubCamEye.x = sHands[LEFT]->actor.home.pos.x + 120.0f;
|
||||
sSubCamEye.y = sHands[LEFT]->actor.home.pos.y + 130.0f;
|
||||
sSubCamEye.z = sHands[LEFT]->actor.home.pos.z + 50.0f;
|
||||
} else if (introStateTimer == 12) {
|
||||
sCameraAt.x = sRoomCenter.x + 50.0f;
|
||||
sCameraAt.y = sRoomCenter.y - 90.0f;
|
||||
sCameraAt.z = sRoomCenter.z - 200.0f;
|
||||
sCameraEye.x = sRoomCenter.x + 50.0f;
|
||||
sCameraEye.y = sRoomCenter.y + 350.0f;
|
||||
sCameraEye.z = sRoomCenter.z + 150.0f;
|
||||
sSubCamAt.x = sRoomCenter.x + 50.0f;
|
||||
sSubCamAt.y = sRoomCenter.y - 90.0f;
|
||||
sSubCamAt.z = sRoomCenter.z - 200.0f;
|
||||
sSubCamEye.x = sRoomCenter.x + 50.0f;
|
||||
sSubCamEye.y = sRoomCenter.y + 350.0f;
|
||||
sSubCamEye.z = sRoomCenter.z + 150.0f;
|
||||
}
|
||||
} else if (this->timer >= 148) {
|
||||
introStateTimer = this->timer - 148;
|
||||
|
@ -565,33 +565,33 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
if (this->timer <= 198) {
|
||||
revealStateTimer = 198 - this->timer;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_77) && (revealStateTimer <= 44)) {
|
||||
sCameraAt.x += 492.0f * 0.01f;
|
||||
sCameraAt.y += 200.0f * 0.01f;
|
||||
sCameraEye.x -= 80.0f * 0.01f;
|
||||
sCameraEye.y -= 360.0f * 0.01f;
|
||||
sCameraEye.z += 1000.0f * 0.01f;
|
||||
sSubCamAt.x += 492.0f * 0.01f;
|
||||
sSubCamAt.y += 200.0f * 0.01f;
|
||||
sSubCamEye.x -= 80.0f * 0.01f;
|
||||
sSubCamEye.y -= 360.0f * 0.01f;
|
||||
sSubCamEye.z += 1000.0f * 0.01f;
|
||||
} else if (this->timer <= 20) {
|
||||
sCameraAt.y -= 700.0f * 0.01f;
|
||||
sCameraAt.z += 900.0f * 0.01f;
|
||||
sCameraEye.x += 650.0f * 0.01f;
|
||||
sCameraEye.y += 400.0f * 0.01f;
|
||||
sCameraEye.z += 1550.0f * 0.01f;
|
||||
sSubCamAt.y -= 700.0f * 0.01f;
|
||||
sSubCamAt.z += 900.0f * 0.01f;
|
||||
sSubCamEye.x += 650.0f * 0.01f;
|
||||
sSubCamEye.y += 400.0f * 0.01f;
|
||||
sSubCamEye.z += 1550.0f * 0.01f;
|
||||
this->vVanish = true;
|
||||
this->actor.flags |= ACTOR_FLAG_7;
|
||||
} else if (revealStateTimer < 40) {
|
||||
sCameraAt.x += 125.0f * 0.01f;
|
||||
sCameraAt.y += 350.0f * 0.01f;
|
||||
sCameraAt.z += 500.0f * 0.01f;
|
||||
sCameraEye.x += 200.0f * 0.01f;
|
||||
sCameraEye.y -= 850.0f * 0.01f;
|
||||
sSubCamAt.x += 125.0f * 0.01f;
|
||||
sSubCamAt.y += 350.0f * 0.01f;
|
||||
sSubCamAt.z += 500.0f * 0.01f;
|
||||
sSubCamEye.x += 200.0f * 0.01f;
|
||||
sSubCamEye.y -= 850.0f * 0.01f;
|
||||
} else if (revealStateTimer >= 45) {
|
||||
if (revealStateTimer < 85) {
|
||||
sCameraAt.x -= 250.0f * 0.01f;
|
||||
sCameraAt.y += 425.0f * 0.01f;
|
||||
sCameraAt.z -= 1200.0f * 0.01f;
|
||||
sCameraEye.x -= 650.0f * 0.01f;
|
||||
sCameraEye.y += 125.0f * 0.01f;
|
||||
sCameraEye.z -= 350.0f * 0.01f;
|
||||
sSubCamAt.x -= 250.0f * 0.01f;
|
||||
sSubCamAt.y += 425.0f * 0.01f;
|
||||
sSubCamAt.z -= 1200.0f * 0.01f;
|
||||
sSubCamEye.x -= 650.0f * 0.01f;
|
||||
sSubCamEye.y += 125.0f * 0.01f;
|
||||
sSubCamEye.z -= 350.0f * 0.01f;
|
||||
} else if (revealStateTimer == 85) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
|
@ -612,7 +612,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->actionFunc != BossSst_HeadNeutral) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &sCameraAt, &sCameraEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -956,46 +956,46 @@ void BossSst_HeadRecover(BossSst* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void BossSst_SetCameraTargets(f32 cameraSpeedMod, s32 targetIndex) {
|
||||
Vec3f* nextAt = &sCameraAtPoints[targetIndex];
|
||||
Vec3f* nextEye = &sCameraEyePoints[targetIndex];
|
||||
void BossSst_SetCameraTargets(f32 subCamVelFactor, s32 targetIndex) {
|
||||
Vec3f* subCamAtNext = &sSubCamAtPoints[targetIndex];
|
||||
Vec3f* subCamEyeNext = &sSubCamEyePoints[targetIndex];
|
||||
|
||||
if (targetIndex != 0) {
|
||||
Math_Vec3f_Copy(&sCameraAt, &sCameraAtPoints[targetIndex - 1]);
|
||||
Math_Vec3f_Copy(&sCameraEye, &sCameraEyePoints[targetIndex - 1]);
|
||||
Math_Vec3f_Copy(&sSubCamAt, &sSubCamAtPoints[targetIndex - 1]);
|
||||
Math_Vec3f_Copy(&sSubCamEye, &sSubCamEyePoints[targetIndex - 1]);
|
||||
}
|
||||
|
||||
sCameraAtVel.x = (nextAt->x - sCameraAt.x) * cameraSpeedMod;
|
||||
sCameraAtVel.y = (nextAt->y - sCameraAt.y) * cameraSpeedMod;
|
||||
sCameraAtVel.z = (nextAt->z - sCameraAt.z) * cameraSpeedMod;
|
||||
sSubCamAtVel.x = (subCamAtNext->x - sSubCamAt.x) * subCamVelFactor;
|
||||
sSubCamAtVel.y = (subCamAtNext->y - sSubCamAt.y) * subCamVelFactor;
|
||||
sSubCamAtVel.z = (subCamAtNext->z - sSubCamAt.z) * subCamVelFactor;
|
||||
|
||||
sCameraEyeVel.x = (nextEye->x - sCameraEye.x) * cameraSpeedMod;
|
||||
sCameraEyeVel.y = (nextEye->y - sCameraEye.y) * cameraSpeedMod;
|
||||
sCameraEyeVel.z = (nextEye->z - sCameraEye.z) * cameraSpeedMod;
|
||||
sSubCamEyeVel.x = (subCamEyeNext->x - sSubCamEye.x) * subCamVelFactor;
|
||||
sSubCamEyeVel.y = (subCamEyeNext->y - sSubCamEye.y) * subCamVelFactor;
|
||||
sSubCamEyeVel.z = (subCamEyeNext->z - sSubCamEye.z) * subCamVelFactor;
|
||||
}
|
||||
|
||||
void BossSst_UpdateDeathCamera(BossSst* this, GlobalContext* globalCtx) {
|
||||
Vec3f cameraAt;
|
||||
Vec3f cameraEye;
|
||||
Vec3f subCamAt;
|
||||
Vec3f subCamEye;
|
||||
f32 sn;
|
||||
f32 cs;
|
||||
|
||||
sCameraAt.x += sCameraAtVel.x;
|
||||
sCameraAt.y += sCameraAtVel.y;
|
||||
sCameraAt.z += sCameraAtVel.z;
|
||||
sCameraEye.x += sCameraEyeVel.x;
|
||||
sCameraEye.y += sCameraEyeVel.y;
|
||||
sCameraEye.z += sCameraEyeVel.z;
|
||||
sSubCamAt.x += sSubCamAtVel.x;
|
||||
sSubCamAt.y += sSubCamAtVel.y;
|
||||
sSubCamAt.z += sSubCamAtVel.z;
|
||||
sSubCamEye.x += sSubCamEyeVel.x;
|
||||
sSubCamEye.y += sSubCamEyeVel.y;
|
||||
sSubCamEye.z += sSubCamEyeVel.z;
|
||||
|
||||
sn = Math_SinS(this->actor.shape.rot.y);
|
||||
cs = Math_CosS(this->actor.shape.rot.y);
|
||||
cameraAt.x = this->actor.world.pos.x + (sCameraAt.z * sn) + (sCameraAt.x * cs);
|
||||
cameraAt.y = this->actor.home.pos.y - 140.0f + sCameraAt.y;
|
||||
cameraAt.z = this->actor.world.pos.z + (sCameraAt.z * cs) - (sCameraAt.x * sn);
|
||||
cameraEye.x = this->actor.world.pos.x + (sCameraEye.z * sn) + (sCameraEye.x * cs);
|
||||
cameraEye.y = this->actor.home.pos.y - 140.0f + sCameraEye.y;
|
||||
cameraEye.z = this->actor.world.pos.z + (sCameraEye.z * cs) - (sCameraEye.x * sn);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &cameraAt, &cameraEye);
|
||||
subCamAt.x = this->actor.world.pos.x + (sSubCamAt.z * sn) + (sSubCamAt.x * cs);
|
||||
subCamAt.y = this->actor.home.pos.y - 140.0f + sSubCamAt.y;
|
||||
subCamAt.z = this->actor.world.pos.z + (sSubCamAt.z * cs) - (sSubCamAt.x * sn);
|
||||
subCamEye.x = this->actor.world.pos.x + (sSubCamEye.z * sn) + (sSubCamEye.x * cs);
|
||||
subCamEye.y = this->actor.home.pos.y - 140.0f + sSubCamEye.y;
|
||||
subCamEye.z = this->actor.world.pos.z + (sSubCamEye.z * cs) - (sSubCamEye.x * sn);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &subCamAt, &subCamEye);
|
||||
}
|
||||
|
||||
void BossSst_HeadSetupDeath(BossSst* this, GlobalContext* globalCtx) {
|
||||
|
@ -1012,13 +1012,13 @@ void BossSst_HeadSetupDeath(BossSst* this, GlobalContext* globalCtx) {
|
|||
sHands[LEFT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
sHands[RIGHT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
sCutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_ACTIVE);
|
||||
Gameplay_CopyCamera(globalCtx, sCutsceneCamera, MAIN_CAM);
|
||||
sSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_ACTIVE);
|
||||
Gameplay_CopyCamera(globalCtx, sSubCamId, CAM_ID_MAIN);
|
||||
func_8002DF54(globalCtx, &player->actor, 8);
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
Math_Vec3f_Copy(&sCameraEye, &GET_ACTIVE_CAM(globalCtx)->eye);
|
||||
Math_Vec3f_Copy(&sSubCamEye, &GET_ACTIVE_CAM(globalCtx)->eye);
|
||||
this->actionFunc = BossSst_HeadDeath;
|
||||
}
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ void BossSst_HeadDeath(BossSst* this, GlobalContext* globalCtx) {
|
|||
BossSst_HandSetupThrash(sHands[RIGHT]);
|
||||
BossSst_HeadSetupThrash(this);
|
||||
} else if (this->timer > 48) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &this->actor.focus.pos, &sCameraEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &this->actor.focus.pos, &sSubCamEye);
|
||||
Math_StepToF(&this->radius, -350.0f, 10.0f);
|
||||
} else if (this->timer == 48) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
@ -1044,8 +1044,8 @@ void BossSst_HeadDeath(BossSst* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.z = sRoomCenter.z + (400.0f * Math_CosS(this->actor.shape.rot.y)) -
|
||||
(Math_SinS(this->actor.shape.rot.y) * -120.0f);
|
||||
player->actor.shape.rot.y = Actor_WorldYawTowardPoint(&player->actor, &sRoomCenter);
|
||||
func_8002DBD0(&this->actor, &sCameraEye, &GET_ACTIVE_CAM(globalCtx)->eye);
|
||||
func_8002DBD0(&this->actor, &sCameraAt, &GET_ACTIVE_CAM(globalCtx)->at);
|
||||
func_8002DBD0(&this->actor, &sSubCamEye, &GET_ACTIVE_CAM(globalCtx)->eye);
|
||||
func_8002DBD0(&this->actor, &sSubCamAt, &GET_ACTIVE_CAM(globalCtx)->at);
|
||||
this->radius = -350.0f;
|
||||
this->actor.world.pos.x = sRoomCenter.x - (Math_SinS(this->actor.shape.rot.y) * 350.0f);
|
||||
this->actor.world.pos.z = sRoomCenter.z - (Math_CosS(this->actor.shape.rot.y) * 350.0f);
|
||||
|
@ -1110,12 +1110,12 @@ void BossSst_HeadDarken(BossSst* this, GlobalContext* globalCtx) {
|
|||
|
||||
void BossSst_HeadSetupFall(BossSst* this) {
|
||||
this->actor.speedXZ = 1.0f;
|
||||
Math_Vec3f_Copy(&sCameraAt, &sCameraAtPoints[3]);
|
||||
Math_Vec3f_Copy(&sCameraEye, &sCameraEyePoints[3]);
|
||||
sCameraAtVel.x = 0.0f;
|
||||
sCameraAtVel.z = 0.0f;
|
||||
sCameraAtVel.y = -50.0f;
|
||||
Math_Vec3f_Copy(&sCameraEyeVel, &sZeroVec);
|
||||
Math_Vec3f_Copy(&sSubCamAt, &sSubCamAtPoints[3]);
|
||||
Math_Vec3f_Copy(&sSubCamEye, &sSubCamEyePoints[3]);
|
||||
sSubCamAtVel.x = 0.0f;
|
||||
sSubCamAtVel.z = 0.0f;
|
||||
sSubCamAtVel.y = -50.0f;
|
||||
Math_Vec3f_Copy(&sSubCamEyeVel, &sZeroVec);
|
||||
this->actionFunc = BossSst_HeadFall;
|
||||
}
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ void BossSst_HeadFall(BossSst* this, GlobalContext* globalCtx) {
|
|||
BossSst_HeadSetupMelt(this);
|
||||
}
|
||||
|
||||
if (sCameraAt.y > 200.0f) {
|
||||
if (sSubCamAt.y > 200.0f) {
|
||||
BossSst_UpdateDeathCamera(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
@ -1175,10 +1175,10 @@ void BossSst_HeadFinish(BossSst* this, GlobalContext* globalCtx) {
|
|||
if (this->effectMode == BONGO_NULL) {
|
||||
if (this->timer < -170) {
|
||||
BossSst_UpdateDeathCamera(this, globalCtx);
|
||||
Gameplay_CopyCamera(globalCtx, MAIN_CAM, sCutsceneCamera);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, sCutsceneCamera);
|
||||
Gameplay_CopyCamera(globalCtx, CAM_ID_MAIN, sSubCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, sSubCamId);
|
||||
func_8002DF54(globalCtx, &GET_PLAYER(globalCtx)->actor, 7);
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
|
@ -1510,7 +1510,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 0x39);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamDist = 800.0f;
|
||||
this->subCamYaw = M_PI;
|
||||
|
@ -1568,7 +1568,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->subCamId != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (this->unk_5F9 == 0) {
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
} else {
|
||||
|
@ -1715,13 +1715,13 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->timers[2] == 1) {
|
||||
Camera* cam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
cam->eye = this->subCamEye;
|
||||
cam->eyeNext = this->subCamEye;
|
||||
cam->at = this->subCamAt;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->csState2 = this->subCamId;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
|
@ -1778,7 +1778,7 @@ void BossTw_TwinrovaSetupIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
||||
u8 updateCam = 0;
|
||||
u8 updateCam = false;
|
||||
s16 i;
|
||||
Vec3f sp90;
|
||||
Vec3f sp84;
|
||||
|
@ -1806,30 +1806,30 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 0x39);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamEye.x = 0.0f;
|
||||
this->subCamEye.y = 350;
|
||||
this->subCamEye.z = 200;
|
||||
|
||||
this->subCamEyeTarget.x = 450;
|
||||
this->subCamEyeTarget.y = 900;
|
||||
this->subCamEyeNext.x = 450;
|
||||
this->subCamEyeNext.y = 900;
|
||||
|
||||
this->subCamAt.x = 0;
|
||||
this->subCamAt.y = 270;
|
||||
this->subCamAt.z = 0;
|
||||
|
||||
this->subCamAtTarget.x = 0;
|
||||
this->subCamAtTarget.y = 240;
|
||||
this->subCamAtTarget.z = 140;
|
||||
this->subCamAtNext.x = 0;
|
||||
this->subCamAtNext.y = 240;
|
||||
this->subCamAtNext.z = 140;
|
||||
|
||||
this->subCamEyeTarget.z = 530;
|
||||
this->subCamEyeStep.x = fabsf(this->subCamEyeTarget.x - this->subCamEye.x);
|
||||
this->subCamEyeStep.y = fabsf(this->subCamEyeTarget.y - this->subCamEye.y);
|
||||
this->subCamEyeStep.z = fabsf(this->subCamEyeTarget.z - this->subCamEye.z);
|
||||
this->subCamAtStep.x = fabsf(this->subCamAtTarget.x - this->subCamAt.x);
|
||||
this->subCamAtStep.y = fabsf(this->subCamAtTarget.y - this->subCamAt.y);
|
||||
this->subCamAtStep.z = fabsf(this->subCamAtTarget.z - this->subCamAt.z);
|
||||
this->subCamEyeNext.z = 530;
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEyeNext.x - this->subCamEye.x);
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEyeNext.y - this->subCamEye.y);
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEyeNext.z - this->subCamEye.z);
|
||||
this->subCamAtVel.x = fabsf(this->subCamAtNext.x - this->subCamAt.x);
|
||||
this->subCamAtVel.y = fabsf(this->subCamAtNext.y - this->subCamAt.y);
|
||||
this->subCamAtVel.z = fabsf(this->subCamAtNext.z - this->subCamAt.z);
|
||||
|
||||
this->subCamDistStep = 0.05f;
|
||||
this->work[CS_TIMER_1] = 0;
|
||||
|
@ -1837,7 +1837,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 1:
|
||||
updateCam = 1;
|
||||
updateCam = true;
|
||||
|
||||
if (this->work[CS_TIMER_1] == 30) {
|
||||
Message_StartTextbox(globalCtx, 0x6048, NULL);
|
||||
|
@ -1891,20 +1891,20 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
if (this->work[CS_TIMER_1] > 50) {
|
||||
this->csState2 = 3;
|
||||
|
||||
this->subCamEyeTarget.x = -30;
|
||||
this->subCamEyeTarget.y = 260;
|
||||
this->subCamEyeTarget.z = 530;
|
||||
this->subCamEyeNext.x = -30;
|
||||
this->subCamEyeNext.y = 260;
|
||||
this->subCamEyeNext.z = 530;
|
||||
|
||||
this->subCamAtTarget.x = 0.0f;
|
||||
this->subCamAtTarget.y = 265;
|
||||
this->subCamAtTarget.z = 580;
|
||||
this->subCamAtNext.x = 0.0f;
|
||||
this->subCamAtNext.y = 265;
|
||||
this->subCamAtNext.z = 580;
|
||||
|
||||
this->subCamEyeStep.x = fabsf(this->subCamEyeTarget.x - this->subCamEye.x);
|
||||
this->subCamEyeStep.y = fabsf(this->subCamEyeTarget.y - this->subCamEye.y);
|
||||
this->subCamEyeStep.z = fabsf(this->subCamEyeTarget.z - this->subCamEye.z);
|
||||
this->subCamAtStep.x = fabsf(this->subCamAtTarget.x - this->subCamAt.x);
|
||||
this->subCamAtStep.y = fabsf(this->subCamAtTarget.y - this->subCamAt.y);
|
||||
this->subCamAtStep.z = fabsf(this->subCamAtTarget.z - this->subCamAt.z);
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEyeNext.x - this->subCamEye.x);
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEyeNext.y - this->subCamEye.y);
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEyeNext.z - this->subCamEye.z);
|
||||
this->subCamAtVel.x = fabsf(this->subCamAtNext.x - this->subCamAt.x);
|
||||
this->subCamAtVel.y = fabsf(this->subCamAtNext.y - this->subCamAt.y);
|
||||
this->subCamAtVel.z = fabsf(this->subCamAtNext.z - this->subCamAt.z);
|
||||
this->subCamUpdateRate = 0;
|
||||
this->subCamDistStep = 0.1f;
|
||||
this->work[CS_TIMER_1] = 0;
|
||||
|
@ -1913,7 +1913,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
|
||||
case 3:
|
||||
SkelAnime_Update(&sKoumePtr->skelAnime);
|
||||
updateCam = 1;
|
||||
updateCam = true;
|
||||
Math_ApproachF(&sKoumePtr->actor.world.pos.y, 240.0f, 0.05f, 5.0f);
|
||||
Math_ApproachF(&this->subCamUpdateRate, 1.0f, 1.0f, 0.02f);
|
||||
|
||||
|
@ -1925,20 +1925,20 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->csState2 = 4;
|
||||
this->actor.speedXZ = 0;
|
||||
|
||||
this->subCamEyeTarget.x = -80.0f;
|
||||
this->subCamEyeTarget.y = 260.0f;
|
||||
this->subCamEyeTarget.z = 430.0f;
|
||||
this->subCamEyeNext.x = -80.0f;
|
||||
this->subCamEyeNext.y = 260.0f;
|
||||
this->subCamEyeNext.z = 430.0f;
|
||||
|
||||
this->subCamAtTarget.x = sKoumePtr->actor.world.pos.x;
|
||||
this->subCamAtTarget.y = sKoumePtr->actor.world.pos.y + 20.0f;
|
||||
this->subCamAtTarget.z = sKoumePtr->actor.world.pos.z;
|
||||
this->subCamAtNext.x = sKoumePtr->actor.world.pos.x;
|
||||
this->subCamAtNext.y = sKoumePtr->actor.world.pos.y + 20.0f;
|
||||
this->subCamAtNext.z = sKoumePtr->actor.world.pos.z;
|
||||
|
||||
this->subCamEyeStep.x = fabsf(this->subCamEyeTarget.x - this->subCamEye.x);
|
||||
this->subCamEyeStep.y = fabsf(this->subCamEyeTarget.y - this->subCamEye.y);
|
||||
this->subCamEyeStep.z = fabsf(this->subCamEyeTarget.z - this->subCamEye.z);
|
||||
this->subCamAtStep.x = fabsf(this->subCamAtTarget.x - this->subCamAt.x);
|
||||
this->subCamAtStep.y = fabsf(this->subCamAtTarget.y - this->subCamAt.y);
|
||||
this->subCamAtStep.z = fabsf(this->subCamAtTarget.z - this->subCamAt.z);
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEyeNext.x - this->subCamEye.x);
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEyeNext.y - this->subCamEye.y);
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEyeNext.z - this->subCamEye.z);
|
||||
this->subCamAtVel.x = fabsf(this->subCamAtNext.x - this->subCamAt.x);
|
||||
this->subCamAtVel.y = fabsf(this->subCamAtNext.y - this->subCamAt.y);
|
||||
this->subCamAtVel.z = fabsf(this->subCamAtNext.z - this->subCamAt.z);
|
||||
this->subCamUpdateRate = 0.0f;
|
||||
this->subCamDistStep = 0.05f;
|
||||
Animation_MorphToPlayOnce(&sKoumePtr->skelAnime, &object_tw_Anim_000AAC, 0.0f);
|
||||
|
@ -1948,9 +1948,9 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 4:
|
||||
updateCam = 1;
|
||||
updateCam = true;
|
||||
SkelAnime_Update(&sKoumePtr->skelAnime);
|
||||
this->subCamAtTarget.y = 20.0f + sKoumePtr->actor.world.pos.y;
|
||||
this->subCamAtNext.y = 20.0f + sKoumePtr->actor.world.pos.y;
|
||||
Math_ApproachF(&sKoumePtr->actor.world.pos.y, 350, 0.1f, this->actor.speedXZ);
|
||||
Math_ApproachF(&this->actor.speedXZ, 9.0f, 1.0f, 0.9f);
|
||||
Math_ApproachF(&this->subCamUpdateRate, 1.0f, 1.0f, 0.02f);
|
||||
|
@ -2057,18 +2057,18 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->work[CS_TIMER_1] >= 0x33) {
|
||||
this->csState2 = 11;
|
||||
this->subCamEyeTarget.x = -30;
|
||||
this->subCamEyeTarget.y = 260;
|
||||
this->subCamEyeTarget.z = -530;
|
||||
this->subCamAtTarget.x = 0;
|
||||
this->subCamAtTarget.y = 265;
|
||||
this->subCamAtTarget.z = -580;
|
||||
this->subCamEyeStep.x = fabsf(this->subCamEyeTarget.x - this->subCamEye.x);
|
||||
this->subCamEyeStep.y = fabsf(this->subCamEyeTarget.y - this->subCamEye.y);
|
||||
this->subCamEyeStep.z = fabsf(this->subCamEyeTarget.z - this->subCamEye.z);
|
||||
this->subCamAtStep.x = fabsf(this->subCamAtTarget.x - this->subCamAt.x);
|
||||
this->subCamAtStep.y = fabsf(this->subCamAtTarget.y - this->subCamAt.y);
|
||||
this->subCamAtStep.z = fabsf(this->subCamAtTarget.z - this->subCamAt.z);
|
||||
this->subCamEyeNext.x = -30;
|
||||
this->subCamEyeNext.y = 260;
|
||||
this->subCamEyeNext.z = -530;
|
||||
this->subCamAtNext.x = 0;
|
||||
this->subCamAtNext.y = 265;
|
||||
this->subCamAtNext.z = -580;
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEyeNext.x - this->subCamEye.x);
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEyeNext.y - this->subCamEye.y);
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEyeNext.z - this->subCamEye.z);
|
||||
this->subCamAtVel.x = fabsf(this->subCamAtNext.x - this->subCamAt.x);
|
||||
this->subCamAtVel.y = fabsf(this->subCamAtNext.y - this->subCamAt.y);
|
||||
this->subCamAtVel.z = fabsf(this->subCamAtNext.z - this->subCamAt.z);
|
||||
this->subCamUpdateRate = 0;
|
||||
this->subCamDistStep = 0.1f;
|
||||
this->work[CS_TIMER_1] = 0;
|
||||
|
@ -2077,7 +2077,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
|
||||
case 11:
|
||||
SkelAnime_Update(&sKotakePtr->skelAnime);
|
||||
updateCam = 1;
|
||||
updateCam = true;
|
||||
Math_ApproachF(&sKotakePtr->actor.world.pos.y, 240.0f, 0.05f, 5.0f);
|
||||
Math_ApproachF(&this->subCamUpdateRate, 1.0f, 1.0f, 0.02f);
|
||||
|
||||
|
@ -2089,20 +2089,20 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->csState2 = 12;
|
||||
this->actor.speedXZ = 0;
|
||||
|
||||
this->subCamEyeTarget.y = 260.0f;
|
||||
this->subCamEyeTarget.x = -80.0f;
|
||||
this->subCamEyeTarget.z = -430.0f;
|
||||
this->subCamEyeNext.y = 260.0f;
|
||||
this->subCamEyeNext.x = -80.0f;
|
||||
this->subCamEyeNext.z = -430.0f;
|
||||
|
||||
this->subCamAtTarget.x = sKotakePtr->actor.world.pos.x;
|
||||
this->subCamAtTarget.y = sKotakePtr->actor.world.pos.y + 20.0f;
|
||||
this->subCamAtTarget.z = sKotakePtr->actor.world.pos.z;
|
||||
this->subCamAtNext.x = sKotakePtr->actor.world.pos.x;
|
||||
this->subCamAtNext.y = sKotakePtr->actor.world.pos.y + 20.0f;
|
||||
this->subCamAtNext.z = sKotakePtr->actor.world.pos.z;
|
||||
|
||||
this->subCamEyeStep.x = fabsf(this->subCamEyeTarget.x - this->subCamEye.x);
|
||||
this->subCamEyeStep.y = fabsf(this->subCamEyeTarget.y - this->subCamEye.y);
|
||||
this->subCamEyeStep.z = fabsf(this->subCamEyeTarget.z - this->subCamEye.z);
|
||||
this->subCamAtStep.x = fabsf(this->subCamAtTarget.x - this->subCamAt.x);
|
||||
this->subCamAtStep.y = fabsf(this->subCamAtTarget.y - this->subCamAt.y);
|
||||
this->subCamAtStep.z = fabsf(this->subCamAtTarget.z - this->subCamAt.z);
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEyeNext.x - this->subCamEye.x);
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEyeNext.y - this->subCamEye.y);
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEyeNext.z - this->subCamEye.z);
|
||||
this->subCamAtVel.x = fabsf(this->subCamAtNext.x - this->subCamAt.x);
|
||||
this->subCamAtVel.y = fabsf(this->subCamAtNext.y - this->subCamAt.y);
|
||||
this->subCamAtVel.z = fabsf(this->subCamAtNext.z - this->subCamAt.z);
|
||||
this->subCamUpdateRate = 0;
|
||||
this->subCamDistStep = 0.05f;
|
||||
Animation_MorphToPlayOnce(&sKotakePtr->skelAnime, &object_tw_Anim_000AAC, 0);
|
||||
|
@ -2112,9 +2112,9 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 12:
|
||||
updateCam = 1;
|
||||
updateCam = true;
|
||||
SkelAnime_Update(&sKotakePtr->skelAnime);
|
||||
this->subCamAtTarget.y = sKotakePtr->actor.world.pos.y + 20.0f;
|
||||
this->subCamAtNext.y = sKotakePtr->actor.world.pos.y + 20.0f;
|
||||
Math_ApproachF(&sKotakePtr->actor.world.pos.y, 350, 0.1f, this->actor.speedXZ);
|
||||
Math_ApproachF(&this->actor.speedXZ, 9.0f, 1.0f, 0.9f);
|
||||
Math_ApproachF(&this->subCamUpdateRate, 1.0f, 1.0f, 0.02f);
|
||||
|
@ -2189,7 +2189,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->workf[UNK_F9] = -M_PI / 2.0f;
|
||||
this->workf[UNK_F10] = 0.0f;
|
||||
|
||||
this->subCamEyeStep.x = 0.0f;
|
||||
this->subCamEyeVel.x = 0.0f;
|
||||
this->spawnPortalAlpha = 0.0f;
|
||||
}
|
||||
} else {
|
||||
|
@ -2233,14 +2233,14 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->work[CS_TIMER_1] >= 160) {
|
||||
if (this->work[CS_TIMER_1] == 160) {
|
||||
this->subCamEyeStep.x = 0.0f;
|
||||
this->subCamEyeVel.x = 0.0f;
|
||||
}
|
||||
Math_ApproachF(&this->subCamEye.x, 0.0f, 0.05f, this->subCamEyeStep.x * 0.5f);
|
||||
Math_ApproachF(&this->subCamEye.z, 1000.0f, 0.05f, this->subCamEyeStep.x);
|
||||
Math_ApproachF(&this->subCamEyeStep.x, 40.0f, 1.0f, 1);
|
||||
Math_ApproachF(&this->subCamEye.x, 0.0f, 0.05f, this->subCamEyeVel.x * 0.5f);
|
||||
Math_ApproachF(&this->subCamEye.z, 1000.0f, 0.05f, this->subCamEyeVel.x);
|
||||
Math_ApproachF(&this->subCamEyeVel.x, 40.0f, 1.0f, 1);
|
||||
} else {
|
||||
Math_ApproachF(&this->subCamEye.x, 300.0f, 0.05f, this->subCamEyeStep.x);
|
||||
Math_ApproachF(&this->subCamEyeStep.x, 5.0f, 1.0f, 0.5f);
|
||||
Math_ApproachF(&this->subCamEye.x, 300.0f, 0.05f, this->subCamEyeVel.x);
|
||||
Math_ApproachF(&this->subCamEyeVel.x, 5.0f, 1.0f, 0.5f);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] < 200) {
|
||||
|
@ -2280,13 +2280,13 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] == 260) {
|
||||
Camera* cam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
cam->eye = this->subCamEye;
|
||||
cam->eyeNext = this->subCamEye;
|
||||
cam->at = this->subCamAt;
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->csState2 = this->subCamId;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
|
@ -2295,20 +2295,20 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->subCamId != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (updateCam) {
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeTarget.x, this->subCamDistStep,
|
||||
this->subCamEyeStep.x * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeTarget.y, this->subCamDistStep,
|
||||
this->subCamEyeStep.y * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeTarget.z, this->subCamDistStep,
|
||||
this->subCamEyeStep.z * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtTarget.x, this->subCamDistStep,
|
||||
this->subCamAtStep.x * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtTarget.y, this->subCamDistStep,
|
||||
this->subCamAtStep.y * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtTarget.z, this->subCamDistStep,
|
||||
this->subCamAtStep.z * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamDistStep,
|
||||
this->subCamEyeVel.x * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamDistStep,
|
||||
this->subCamEyeVel.y * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamDistStep,
|
||||
this->subCamEyeVel.z * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamDistStep,
|
||||
this->subCamAtVel.x * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamDistStep,
|
||||
this->subCamAtVel.y * this->subCamUpdateRate);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamDistStep,
|
||||
this->subCamAtVel.z * this->subCamUpdateRate);
|
||||
}
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
|
@ -2618,7 +2618,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
s16 i;
|
||||
Vec3f spD0;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->work[UNK_S8] += 20;
|
||||
|
@ -2697,7 +2697,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamEye = mainCam->eye;
|
||||
this->subCamAt = mainCam->at;
|
||||
|
@ -2815,13 +2815,13 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
Actor_SetScale(&sKoumePtr->actor, sKoumePtr->actor.scale.x);
|
||||
Actor_SetScale(&sKotakePtr->actor, sKoumePtr->actor.scale.x);
|
||||
if (this->work[CS_TIMER_2] >= 1020) {
|
||||
mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
mainCam->eye = this->subCamEye;
|
||||
mainCam->eyeNext = this->subCamEye;
|
||||
mainCam->at = this->subCamAt;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
this->csState2 = 4;
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
|
@ -2840,7 +2840,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (this->subCamId) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
if (1) {}
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
|
|
|
@ -121,11 +121,11 @@ typedef struct BossTw {
|
|||
/* 0x0624 */ Vec3f subCamEye2;
|
||||
/* 0x0630 */ Vec3f subCamAt2;
|
||||
/* 0x063C */ char unused_63C[0x18];
|
||||
/* 0x0654 */ Vec3f subCamEyeStep;
|
||||
/* 0x0660 */ Vec3f subCamAtStep;
|
||||
/* 0x066C */ Vec3f subCamEyeTarget;
|
||||
/* 0x0654 */ Vec3f subCamEyeVel;
|
||||
/* 0x0660 */ Vec3f subCamAtVel;
|
||||
/* 0x066C */ Vec3f subCamEyeNext;
|
||||
/* 0x0678 */ char unused_678[0xC];
|
||||
/* 0x0684 */ Vec3f subCamAtTarget;
|
||||
/* 0x0684 */ Vec3f subCamAtNext;
|
||||
/* 0x0690 */ char unused_690[0xC];
|
||||
/* 0x069C */ f32 subCamUpdateRate;
|
||||
/* 0x06A0 */ f32 subCamDistStep;
|
||||
|
|
|
@ -376,18 +376,18 @@ static DamageTable sDamageTable[] = {
|
|||
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
static u8 sKillBari = 0;
|
||||
static u8 sBodyBari[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static s16 sCsCamera = 0;
|
||||
static s16 sSubCamId = SUB_CAM_ID_DONE;
|
||||
|
||||
static BossVaEffect sEffects[BOSS_VA_EFFECT_COUNT];
|
||||
static u8 sBodyState;
|
||||
static u8 sFightPhase;
|
||||
static s8 sCsState;
|
||||
static Vec3f sCameraEye;
|
||||
static Vec3f sCameraAt;
|
||||
static Vec3f sCameraNextEye;
|
||||
static Vec3f sCameraNextAt;
|
||||
static Vec3f sCameraEyeMaxVel;
|
||||
static Vec3f sCameraAtMaxVel;
|
||||
static Vec3f sSubCamEye;
|
||||
static Vec3f sSubCamAt;
|
||||
static Vec3f sSubCamEyeNext;
|
||||
static Vec3f sSubCamAtNext;
|
||||
static Vec3f sSubCamEyeMaxVelFrac;
|
||||
static Vec3f sSubCamAtMaxVelFrac;
|
||||
static s16 sDoorState;
|
||||
static u8 sPhase3StopMoving;
|
||||
static Vec3s sZapperRot;
|
||||
|
@ -649,16 +649,16 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
globalCtx->envCtx.screenFillColor[2] = 0xBE;
|
||||
globalCtx->envCtx.screenFillColor[3] = 0xD2;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
sCsCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCsCamera, CAM_STAT_ACTIVE);
|
||||
sCameraNextEye.x = sCameraEye.x = 140.0f;
|
||||
sCameraNextEye.y = sCameraEye.y = 205.0f;
|
||||
sCameraNextEye.z = sCameraEye.z = -20.0f;
|
||||
sCameraNextAt.x = sCameraAt.x = 10.0f;
|
||||
sCameraNextAt.y = sCameraAt.y = 50.0f;
|
||||
sCameraNextAt.z = sCameraAt.z = -220.0f;
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCsCamera, &sCameraAt, &sCameraEye);
|
||||
sSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_ACTIVE);
|
||||
sSubCamEyeNext.x = sSubCamEye.x = 140.0f;
|
||||
sSubCamEyeNext.y = sSubCamEye.y = 205.0f;
|
||||
sSubCamEyeNext.z = sSubCamEye.z = -20.0f;
|
||||
sSubCamAtNext.x = sSubCamAt.x = 10.0f;
|
||||
sSubCamAtNext.y = sSubCamAt.y = 50.0f;
|
||||
sSubCamAtNext.z = sSubCamAt.z = -220.0f;
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
this->timer = 20;
|
||||
|
||||
for (i = BOSSVA_BARI_LOWER_5; i >= BOSSVA_BARI_UPPER_1; i--) {
|
||||
|
@ -670,7 +670,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
sInitRot[i].y + this->actor.world.rot.y, sInitRot[i].z + this->actor.world.rot.z, i);
|
||||
}
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
|
||||
} else {
|
||||
sCsState = INTRO_START;
|
||||
|
@ -790,21 +790,21 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case INTRO_LOOK_DOOR:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
if (sCsCamera == SUBCAM_FREE) {
|
||||
sCsCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
if (sSubCamId == SUB_CAM_ID_DONE) {
|
||||
sSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
}
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCsCamera, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_ACTIVE);
|
||||
|
||||
sCameraNextEye.x = sCameraEye.x = 13.0f;
|
||||
sCameraNextEye.y = sCameraEye.y = 124.0f;
|
||||
sCameraNextEye.z = sCameraEye.z = 167.0f;
|
||||
sSubCamEyeNext.x = sSubCamEye.x = 13.0f;
|
||||
sSubCamEyeNext.y = sSubCamEye.y = 124.0f;
|
||||
sSubCamEyeNext.z = sSubCamEye.z = 167.0f;
|
||||
|
||||
sCameraNextAt.x = sCameraAt.x = player->actor.world.pos.x;
|
||||
sCameraNextAt.y = sCameraAt.y = player->actor.world.pos.y;
|
||||
sCameraNextAt.z = sCameraAt.z = player->actor.world.pos.z;
|
||||
sSubCamAtNext.x = sSubCamAt.x = player->actor.world.pos.x;
|
||||
sSubCamAtNext.y = sSubCamAt.y = player->actor.world.pos.y;
|
||||
sSubCamAtNext.z = sSubCamAt.z = player->actor.world.pos.z;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
|
||||
this->timer = 10;
|
||||
sCsState++;
|
||||
|
@ -832,21 +832,21 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case INTRO_SPAWN_BARI:
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
if (sCsCamera == SUBCAM_FREE) {
|
||||
sCsCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
if (sSubCamId == SUB_CAM_ID_DONE) {
|
||||
sSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
}
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCsCamera, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_ACTIVE);
|
||||
|
||||
sCameraNextEye.x = sCameraEye.x = 13.0f;
|
||||
sCameraNextEye.y = sCameraEye.y = 124.0f;
|
||||
sCameraNextEye.z = sCameraEye.z = 167.0f;
|
||||
sSubCamEyeNext.x = sSubCamEye.x = 13.0f;
|
||||
sSubCamEyeNext.y = sSubCamEye.y = 124.0f;
|
||||
sSubCamEyeNext.z = sSubCamEye.z = 167.0f;
|
||||
|
||||
sCameraNextAt.x = sCameraAt.x = player->actor.world.pos.x;
|
||||
sCameraNextAt.y = sCameraAt.y = player->actor.world.pos.y;
|
||||
sCameraNextAt.z = sCameraAt.z = player->actor.world.pos.z;
|
||||
sSubCamAtNext.x = sSubCamAt.x = player->actor.world.pos.x;
|
||||
sSubCamAtNext.y = sSubCamAt.y = player->actor.world.pos.y;
|
||||
sSubCamAtNext.z = sSubCamAt.z = player->actor.world.pos.z;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
|
||||
for (i = BOSSVA_BARI_LOWER_5; i >= BOSSVA_BARI_UPPER_1; i--) {
|
||||
Actor_SpawnAsChild(
|
||||
|
@ -860,16 +860,16 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
sCsState++;
|
||||
break;
|
||||
case INTRO_REVERSE_CAMERA:
|
||||
sCameraNextEye.x = -92.0f;
|
||||
sCameraNextEye.y = 22.0f;
|
||||
sCameraNextEye.z = 360.0f;
|
||||
sCameraNextAt.x = 63.0f;
|
||||
sCameraNextAt.y = 104.0f;
|
||||
sCameraNextAt.z = 248.0f;
|
||||
Math_SmoothStepToF(&sCameraEyeMaxVel.x, 7.0f, 0.3f, 0.7f, 0.05f);
|
||||
sCameraEyeMaxVel.z = sCameraEyeMaxVel.x;
|
||||
sCameraEyeMaxVel.y = sCameraEyeMaxVel.z;
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel;
|
||||
sSubCamEyeNext.x = -92.0f;
|
||||
sSubCamEyeNext.y = 22.0f;
|
||||
sSubCamEyeNext.z = 360.0f;
|
||||
sSubCamAtNext.x = 63.0f;
|
||||
sSubCamAtNext.y = 104.0f;
|
||||
sSubCamAtNext.z = 248.0f;
|
||||
Math_SmoothStepToF(&sSubCamEyeMaxVelFrac.x, 7.0f, 0.3f, 0.7f, 0.05f);
|
||||
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
|
||||
sSubCamEyeMaxVelFrac.y = sSubCamEyeMaxVelFrac.z;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
|
||||
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
|
@ -878,25 +878,25 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case INTRO_SUPPORT_CAMERA:
|
||||
sCameraNextEye.x = sCameraEye.x = 140.0f;
|
||||
sCameraNextEye.y = sCameraEye.y = 205.0f;
|
||||
sCameraNextEye.z = sCameraEye.z = -20.0f;
|
||||
sSubCamEyeNext.x = sSubCamEye.x = 140.0f;
|
||||
sSubCamEyeNext.y = sSubCamEye.y = 205.0f;
|
||||
sSubCamEyeNext.z = sSubCamEye.z = -20.0f;
|
||||
|
||||
sCameraNextAt.x = sCameraAt.x = 10.0f;
|
||||
sCameraNextAt.y = sCameraAt.y = 247.0f;
|
||||
sCameraNextAt.z = sCameraAt.z = -220.0f;
|
||||
sSubCamAtNext.x = sSubCamAt.x = 10.0f;
|
||||
sSubCamAtNext.y = sSubCamAt.y = 247.0f;
|
||||
sSubCamAtNext.z = sSubCamAt.z = -220.0f;
|
||||
|
||||
sCsState++;
|
||||
this->timer = 1;
|
||||
break;
|
||||
case INTRO_BODY_SOUND:
|
||||
sCameraNextAt.x = 10.0f;
|
||||
sCameraNextAt.y = 247.0f;
|
||||
sCameraNextAt.z = -220.0f;
|
||||
Math_SmoothStepToF(&sCameraEyeMaxVel.x, 7.0f, 0.3f, 0.7f, 0.05f);
|
||||
sCameraEyeMaxVel.z = sCameraEyeMaxVel.x;
|
||||
sCameraEyeMaxVel.y = sCameraEyeMaxVel.z;
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel;
|
||||
sSubCamAtNext.x = 10.0f;
|
||||
sSubCamAtNext.y = 247.0f;
|
||||
sSubCamAtNext.z = -220.0f;
|
||||
Math_SmoothStepToF(&sSubCamEyeMaxVelFrac.x, 7.0f, 0.3f, 0.7f, 0.05f);
|
||||
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
|
||||
sSubCamEyeMaxVelFrac.y = sSubCamEyeMaxVelFrac.z;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
|
||||
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
|
@ -907,11 +907,11 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
case INTRO_LOOK_SUPPORT:
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
sCameraNextAt.x = 10.0f;
|
||||
sCameraNextAt.y = 50.0f;
|
||||
sCameraNextAt.z = -220.0f;
|
||||
sSubCamAtNext.x = 10.0f;
|
||||
sSubCamAtNext.y = 50.0f;
|
||||
sSubCamAtNext.z = -220.0f;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
|
||||
sCsState++;
|
||||
sCsState++;
|
||||
|
@ -919,13 +919,13 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case INTRO_CALL_BARI:
|
||||
Math_SmoothStepToF(&sCameraEyeMaxVel.x, 14.0f, 0.3f, 1.0f, 0.25f);
|
||||
Math_SmoothStepToF(&sSubCamEyeMaxVelFrac.x, 14.0f, 0.3f, 1.0f, 0.25f);
|
||||
|
||||
sCameraEyeMaxVel.y = sCameraEyeMaxVel.x * 0.7f;
|
||||
sCameraEyeMaxVel.z = sCameraEyeMaxVel.x;
|
||||
sSubCamEyeMaxVelFrac.y = sSubCamEyeMaxVelFrac.x * 0.7f;
|
||||
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel;
|
||||
sCameraAtMaxVel.z = sCameraAtMaxVel.z * 1.75f;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
|
||||
sSubCamAtMaxVelFrac.z = sSubCamAtMaxVelFrac.z * 1.75f;
|
||||
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
|
@ -953,9 +953,9 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
Math_SmoothStepToS(&this->unk_1F2, 0x280, 1, 0x32, 0);
|
||||
Math_SmoothStepToF(&sCameraEyeMaxVel.x, 14.0f, 0.3f, 1.0f, 0.25f);
|
||||
sCameraEyeMaxVel.z = sCameraEyeMaxVel.x;
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel;
|
||||
Math_SmoothStepToF(&sSubCamEyeMaxVelFrac.x, 14.0f, 0.3f, 1.0f, 0.25f);
|
||||
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
|
||||
if (this->timer >= 45000) {
|
||||
globalCtx->envCtx.unk_BF = 1;
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
@ -965,15 +965,15 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->timer += this->unk_1F2;
|
||||
if (this->timer >= 65536) {
|
||||
sCameraEyeMaxVel.y = sCameraAtMaxVel.y = 9.8f;
|
||||
sSubCamEyeMaxVelFrac.y = sSubCamAtMaxVelFrac.y = 9.8f;
|
||||
sCsState++;
|
||||
|
||||
sCameraNextEye.x = 10.0f;
|
||||
sCameraNextEye.z = 0.0f;
|
||||
sSubCamEyeNext.x = 10.0f;
|
||||
sSubCamEyeNext.z = 0.0f;
|
||||
|
||||
sCameraNextAt.x = 10.0f;
|
||||
sCameraNextAt.y = 140.0f;
|
||||
sCameraNextAt.z = -200.0f;
|
||||
sSubCamAtNext.x = 10.0f;
|
||||
sSubCamAtNext.y = 140.0f;
|
||||
sSubCamAtNext.z = -200.0f;
|
||||
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_76)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
|
@ -986,10 +986,10 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->timer = 40;
|
||||
} else {
|
||||
sCameraEyeMaxVel.y = 1.6f;
|
||||
sCameraNextEye.y = 5.0f;
|
||||
sCameraNextEye.x = Math_SinS(this->timer) * 200.0f;
|
||||
sCameraNextEye.z = (Math_CosS(this->timer) * 200.0f) + -200.0f;
|
||||
sSubCamEyeMaxVelFrac.y = 1.6f;
|
||||
sSubCamEyeNext.y = 5.0f;
|
||||
sSubCamEyeNext.x = Math_SinS(this->timer) * 200.0f;
|
||||
sSubCamEyeNext.z = (Math_CosS(this->timer) * 200.0f) + -200.0f;
|
||||
}
|
||||
break;
|
||||
case INTRO_TITLE:
|
||||
|
@ -1011,10 +1011,10 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
case INTRO_FINISH:
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
Gameplay_ClearCamera(globalCtx, sCsCamera);
|
||||
sCsCamera = 0;
|
||||
Gameplay_ClearCamera(globalCtx, sSubCamId);
|
||||
sSubCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sCsState++;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_76);
|
||||
|
@ -1035,14 +1035,14 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->unk_1B0 += 0xCE4;
|
||||
this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150;
|
||||
if ((sCsCamera != 0) && (sCsState <= INTRO_TITLE)) {
|
||||
Math_SmoothStepToF(&sCameraEye.x, sCameraNextEye.x, 0.3f, sCameraEyeMaxVel.x, 0.075f);
|
||||
Math_SmoothStepToF(&sCameraEye.y, sCameraNextEye.y, 0.3f, sCameraEyeMaxVel.y, 0.075f);
|
||||
Math_SmoothStepToF(&sCameraEye.z, sCameraNextEye.z, 0.3f, sCameraEyeMaxVel.z, 0.075f);
|
||||
Math_SmoothStepToF(&sCameraAt.x, sCameraNextAt.x, 0.3f, sCameraAtMaxVel.x, 0.075f);
|
||||
Math_SmoothStepToF(&sCameraAt.y, sCameraNextAt.y, 0.3f, sCameraAtMaxVel.y, 0.075f);
|
||||
Math_SmoothStepToF(&sCameraAt.z, sCameraNextAt.z, 0.3f, sCameraAtMaxVel.z, 0.075f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCsCamera, &sCameraAt, &sCameraEye);
|
||||
if ((sSubCamId != SUB_CAM_ID_DONE) && (sCsState <= INTRO_TITLE)) {
|
||||
Math_SmoothStepToF(&sSubCamEye.x, sSubCamEyeNext.x, 0.3f, sSubCamEyeMaxVelFrac.x, 0.075f);
|
||||
Math_SmoothStepToF(&sSubCamEye.y, sSubCamEyeNext.y, 0.3f, sSubCamEyeMaxVelFrac.y, 0.075f);
|
||||
Math_SmoothStepToF(&sSubCamEye.z, sSubCamEyeNext.z, 0.3f, sSubCamEyeMaxVelFrac.z, 0.075f);
|
||||
Math_SmoothStepToF(&sSubCamAt.x, sSubCamAtNext.x, 0.3f, sSubCamAtMaxVelFrac.x, 0.075f);
|
||||
Math_SmoothStepToF(&sSubCamAt.y, sSubCamAtNext.y, 0.3f, sSubCamAtMaxVelFrac.y, 0.075f);
|
||||
Math_SmoothStepToF(&sSubCamAt.z, sSubCamAtNext.z, 0.3f, sSubCamAtMaxVelFrac.z, 0.075f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ void BossVa_SetupBodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
|
||||
void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
s32 sp7C;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 tmp16;
|
||||
|
@ -1535,24 +1535,24 @@ void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
case DEATH_START:
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
sCsCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCsCamera, CAM_STAT_ACTIVE);
|
||||
sSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sSubCamId, CAM_STAT_ACTIVE);
|
||||
|
||||
sCameraNextAt.x = this->actor.world.pos.x;
|
||||
sCameraNextAt.y = this->actor.world.pos.y;
|
||||
sCameraNextAt.z = this->actor.world.pos.z;
|
||||
sSubCamAtNext.x = this->actor.world.pos.x;
|
||||
sSubCamAtNext.y = this->actor.world.pos.y;
|
||||
sSubCamAtNext.z = this->actor.world.pos.z;
|
||||
|
||||
sCameraAt = camera->at;
|
||||
sSubCamAt = mainCam->at;
|
||||
|
||||
sCameraNextEye = sCameraEye = camera->eye;
|
||||
sSubCamEyeNext = sSubCamEye = mainCam->eye;
|
||||
|
||||
sCameraNextEye.y = 40.0f;
|
||||
sCameraNextAt.y = 140.0f;
|
||||
sSubCamEyeNext.y = 40.0f;
|
||||
sSubCamAtNext.y = 140.0f;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
|
||||
this->unk_1AC = Math_Vec3f_Yaw(&sCameraEye, &sCameraNextAt) - 0x100;
|
||||
this->unk_1AC = Math_Vec3f_Yaw(&sSubCamEye, &sSubCamAtNext) - 0x100;
|
||||
this->unk_1B0 = 15;
|
||||
globalCtx->envCtx.screenFillColor[0] = globalCtx->envCtx.screenFillColor[1] =
|
||||
globalCtx->envCtx.screenFillColor[2] = 0xFF;
|
||||
|
@ -1561,13 +1561,13 @@ void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
sCsState++;
|
||||
case DEATH_BODY_TUMORS:
|
||||
this->unk_1AC += 0x100;
|
||||
sCameraNextEye.x = (Math_SinS(this->unk_1AC) * (160.0f + this->unk_1A8)) + sCameraNextAt.x;
|
||||
sCameraNextEye.z = (Math_CosS(this->unk_1AC) * (160.0f + this->unk_1A8)) + sCameraNextAt.z;
|
||||
Math_SmoothStepToF(&sCameraEyeMaxVel.x, 16.0f, 0.4f, 1.5f, 0.5f);
|
||||
sCameraEyeMaxVel.z = sCameraEyeMaxVel.x;
|
||||
sCameraEyeMaxVel.y = sCameraEyeMaxVel.x * 0.5f;
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel;
|
||||
tmp16 = Rand_CenteredFloat(0.5f) + ((sCameraEyeMaxVel.x * 0.5f) + 0.6f);
|
||||
sSubCamEyeNext.x = (Math_SinS(this->unk_1AC) * (160.0f + this->unk_1A8)) + sSubCamAtNext.x;
|
||||
sSubCamEyeNext.z = (Math_CosS(this->unk_1AC) * (160.0f + this->unk_1A8)) + sSubCamAtNext.z;
|
||||
Math_SmoothStepToF(&sSubCamEyeMaxVelFrac.x, 16.0f, 0.4f, 1.5f, 0.5f);
|
||||
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
|
||||
sSubCamEyeMaxVelFrac.y = sSubCamEyeMaxVelFrac.x * 0.5f;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
|
||||
tmp16 = Rand_CenteredFloat(0.5f) + ((sSubCamEyeMaxVelFrac.x * 0.5f) + 0.6f);
|
||||
if (((globalCtx->gameplayFrames % 4) == 0) && (this->unk_1B0 != 0)) {
|
||||
for (i = 6; i > 1; i--) {
|
||||
BossVa_Tumor(globalCtx, this, 1, tmp16, 0.0f, 0.0f, TUMOR_BODY, i, true);
|
||||
|
@ -1580,7 +1580,7 @@ void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_1B0 == 0) {
|
||||
sCsState++;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
}
|
||||
break;
|
||||
case DEATH_CORE_DEAD:
|
||||
|
@ -1606,36 +1606,36 @@ void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
sCameraNextAt.x = this->actor.world.pos.x;
|
||||
sCameraNextAt.y = this->actor.world.pos.y + 30.0f;
|
||||
sCameraNextAt.z = this->actor.world.pos.z;
|
||||
sSubCamAtNext.x = this->actor.world.pos.x;
|
||||
sSubCamAtNext.y = this->actor.world.pos.y + 30.0f;
|
||||
sSubCamAtNext.z = this->actor.world.pos.z;
|
||||
|
||||
sCameraNextEye.x = (Math_SinS(player->actor.shape.rot.y) * -130.0f) + player->actor.world.pos.x;
|
||||
sCameraNextEye.z = (Math_CosS(player->actor.shape.rot.y) * -130.0f) + player->actor.world.pos.z;
|
||||
sCameraNextEye.y = player->actor.world.pos.y + 55.0f;
|
||||
sSubCamEyeNext.x = (Math_SinS(player->actor.shape.rot.y) * -130.0f) + player->actor.world.pos.x;
|
||||
sSubCamEyeNext.z = (Math_CosS(player->actor.shape.rot.y) * -130.0f) + player->actor.world.pos.z;
|
||||
sSubCamEyeNext.y = player->actor.world.pos.y + 55.0f;
|
||||
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel = sZeroVec;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac = sZeroVec;
|
||||
|
||||
sCsState++;
|
||||
this->timer = 133;
|
||||
}
|
||||
break;
|
||||
case DEATH_MUSIC:
|
||||
Math_SmoothStepToF(&sCameraEyeMaxVel.x, 1.5f, 0.3f, 0.05f, 0.015f);
|
||||
sCameraEyeMaxVel.z = sCameraEyeMaxVel.x;
|
||||
sCameraEyeMaxVel.y = sCameraEyeMaxVel.z;
|
||||
sCameraAtMaxVel = sCameraEyeMaxVel;
|
||||
Math_SmoothStepToF(&sSubCamEyeMaxVelFrac.x, 1.5f, 0.3f, 0.05f, 0.015f);
|
||||
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
|
||||
sSubCamEyeMaxVelFrac.y = sSubCamEyeMaxVelFrac.z;
|
||||
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
|
||||
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
Gameplay_ClearCamera(globalCtx, sCsCamera);
|
||||
sCsCamera = 0;
|
||||
Gameplay_ClearCamera(globalCtx, sSubCamId);
|
||||
sSubCamId = SUB_CAM_ID_DONE;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
|
||||
camera->eyeNext = camera->eye = sCameraEye;
|
||||
mainCam->eyeNext = mainCam->eye = sSubCamEye;
|
||||
|
||||
camera->at = sCameraAt;
|
||||
mainCam->at = sSubCamAt;
|
||||
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sCsState++;
|
||||
|
@ -1659,14 +1659,14 @@ void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (sCsCamera != 0) {
|
||||
Math_SmoothStepToF(&sCameraEye.x, sCameraNextEye.x, 0.3f, sCameraEyeMaxVel.x, 0.15f);
|
||||
Math_SmoothStepToF(&sCameraEye.y, sCameraNextEye.y, 0.3f, sCameraEyeMaxVel.y, 0.15f);
|
||||
Math_SmoothStepToF(&sCameraEye.z, sCameraNextEye.z, 0.3f, sCameraEyeMaxVel.z, 0.15f);
|
||||
Math_SmoothStepToF(&sCameraAt.x, sCameraNextAt.x, 0.3f, sCameraAtMaxVel.x, 0.15f);
|
||||
Math_SmoothStepToF(&sCameraAt.y, sCameraNextAt.y, 0.3f, sCameraAtMaxVel.y, 0.15f);
|
||||
Math_SmoothStepToF(&sCameraAt.z, sCameraNextAt.z, 0.3f, sCameraAtMaxVel.z, 0.15f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCsCamera, &sCameraAt, &sCameraEye);
|
||||
if (sSubCamId != SUB_CAM_ID_DONE) {
|
||||
Math_SmoothStepToF(&sSubCamEye.x, sSubCamEyeNext.x, 0.3f, sSubCamEyeMaxVelFrac.x, 0.15f);
|
||||
Math_SmoothStepToF(&sSubCamEye.y, sSubCamEyeNext.y, 0.3f, sSubCamEyeMaxVelFrac.y, 0.15f);
|
||||
Math_SmoothStepToF(&sSubCamEye.z, sSubCamEyeNext.z, 0.3f, sSubCamEyeMaxVelFrac.z, 0.15f);
|
||||
Math_SmoothStepToF(&sSubCamAt.x, sSubCamAtNext.x, 0.3f, sSubCamAtMaxVelFrac.x, 0.15f);
|
||||
Math_SmoothStepToF(&sSubCamAt.y, sSubCamAtNext.y, 0.3f, sSubCamAtMaxVelFrac.y, 0.15f);
|
||||
Math_SmoothStepToF(&sSubCamAt.z, sSubCamAtNext.z, 0.3f, sSubCamAtMaxVelFrac.z, 0.15f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, sSubCamId, &sSubCamAt, &sSubCamEye);
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
@ -1818,11 +1818,11 @@ void BossVa_SupportCut(BossVa* this, GlobalContext* globalCtx) {
|
|||
|
||||
switch (sCsState) {
|
||||
case DEATH_SHELL_BURST:
|
||||
sCameraEye = sCameraNextEye;
|
||||
sCameraAt = sCameraNextAt;
|
||||
Math_SmoothStepToF(&sCameraEye.x, sCameraNextAt.x, 1.0f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&sCameraEye.z, sCameraNextAt.z, 1.0f, 10.0f, 0.0f);
|
||||
sCameraEye.y += 20.0f;
|
||||
sSubCamEye = sSubCamEyeNext;
|
||||
sSubCamAt = sSubCamAtNext;
|
||||
Math_SmoothStepToF(&sSubCamEye.x, sSubCamAtNext.x, 1.0f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&sSubCamEye.z, sSubCamAtNext.z, 1.0f, 10.0f, 0.0f);
|
||||
sSubCamEye.y += 20.0f;
|
||||
sCsState++;
|
||||
|
||||
case DEATH_CORE_TUMORS:
|
||||
|
@ -2209,11 +2209,11 @@ void BossVa_ZapperDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((this->actor.params - BOSSVA_ZAPPER_1 + DEATH_ZAPPER_1) == sCsState) {
|
||||
sCameraAt.x = this->zapNeckPos.x;
|
||||
sCameraEye.y = sCameraAt.y = this->zapNeckPos.y;
|
||||
sCameraAt.z = this->zapNeckPos.z;
|
||||
sCameraEye.x = (Math_CosS(-(this->actor.shape.rot.y + this->unk_1B0)) * sp3C) + this->zapNeckPos.x;
|
||||
sCameraEye.z = (Math_SinS(-(this->actor.shape.rot.y + this->unk_1B0)) * sp3C) + this->zapNeckPos.z;
|
||||
sSubCamAt.x = this->zapNeckPos.x;
|
||||
sSubCamEye.y = sSubCamAt.y = this->zapNeckPos.y;
|
||||
sSubCamAt.z = this->zapNeckPos.z;
|
||||
sSubCamEye.x = (Math_CosS(-(this->actor.shape.rot.y + this->unk_1B0)) * sp3C) + this->zapNeckPos.x;
|
||||
sSubCamEye.z = (Math_SinS(-(this->actor.shape.rot.y + this->unk_1B0)) * sp3C) + this->zapNeckPos.z;
|
||||
this->unk_1B0 += 0x15E;
|
||||
}
|
||||
} else {
|
||||
|
@ -3511,7 +3511,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) {
|
|||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
u8 materialFlag = 0;
|
||||
BossVaEffect* effectHead = effect;
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, sCsCamera);
|
||||
Camera* subCam = Gameplay_GetCamera(globalCtx, sSubCamId);
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_boss_va.c", 4953);
|
||||
|
||||
|
@ -3603,8 +3603,8 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) {
|
|||
materialFlag++;
|
||||
}
|
||||
|
||||
if ((effect->mode != TUMOR_BODY) || ((Math_Vec3f_DistXZ(&camera->eye, &effect->pos) -
|
||||
Math_Vec3f_DistXZ(&camera->eye, &parent->actor.world.pos)) < 10.0f)) {
|
||||
if ((effect->mode != TUMOR_BODY) || ((Math_Vec3f_DistXZ(&subCam->eye, &effect->pos) -
|
||||
Math_Vec3f_DistXZ(&subCam->eye, &parent->actor.world.pos)) < 10.0f)) {
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ void DoorShutter_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void DoorShutter_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void func_8099803C(GlobalContext* globalCtx, s16 y, s16 countdown, s16 arg3);
|
||||
void func_8099803C(GlobalContext* globalCtx, s16 y, s16 countdown, s16 camId);
|
||||
void DoorShutter_SetupType(DoorShutter* this, GlobalContext* globalCtx);
|
||||
void func_80996A54(DoorShutter* this, GlobalContext* globalCtx);
|
||||
void func_80996B00(DoorShutter* this, GlobalContext* globalCtx);
|
||||
|
@ -416,7 +416,8 @@ void func_80996C60(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
DoorShutter_SetupAction(this, func_80997004);
|
||||
this->unk_16C = sp38;
|
||||
this->unk_170 = 0.0f;
|
||||
Camera_ChangeDoorCam(globalCtx->cameraPtrs[MAIN_CAM], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34, 10);
|
||||
Camera_ChangeDoorCam(globalCtx->cameraPtrs[CAM_ID_MAIN], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34,
|
||||
10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -571,7 +572,7 @@ void func_809973E8(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
10, false);
|
||||
}
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
|
||||
quakeId = Quake_Add(Gameplay_GetCamera(globalCtx, 0), 3);
|
||||
quakeId = Quake_Add(Gameplay_GetCamera(globalCtx, CAM_ID_MAIN), 3);
|
||||
Quake_SetSpeed(quakeId, -32536);
|
||||
Quake_SetQuakeValues(quakeId, 2, 0, 0, 0);
|
||||
Quake_SetCountdown(quakeId, 10);
|
||||
|
@ -603,7 +604,7 @@ void func_809975C0(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->unk_164 = 10;
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
|
||||
func_8099803C(globalCtx, 2, 10, parent->subCameraId);
|
||||
func_8099803C(globalCtx, 2, 10, parent->subCamId);
|
||||
Actor_SpawnFloorDustRing(globalCtx, &this->dyna.actor, &this->dyna.actor.world.pos, 70.0f, 20, 8.0f, 500,
|
||||
10, true);
|
||||
}
|
||||
|
|
|
@ -465,7 +465,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
OnePointCutscene_Init(globalCtx, 0x25E7, 999, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 0x25E7, 999, &this->actor, CAM_ID_MAIN);
|
||||
func_8002DF54(globalCtx, &this->actor, 10);
|
||||
|
||||
player->unk_450.x = this->actor.world.pos.x;
|
||||
|
@ -556,7 +556,7 @@ void func_80999EE0(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (this->rutoWarpState == WARP_BLUE_RUTO_STATE_3) {
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
sRutoWarpSubCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sRutoWarpSubCamId, CAM_STAT_ACTIVE);
|
||||
|
@ -579,8 +579,9 @@ void func_80999FE4(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_LINK_WARP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
OnePointCutscene_Init(globalCtx, 0x25E9, 999, &this->actor, MAIN_CAM);
|
||||
Gameplay_CopyCamera(globalCtx, -1, sRutoWarpSubCamId);
|
||||
OnePointCutscene_Init(globalCtx, 0x25E9, 999, &this->actor, CAM_ID_MAIN);
|
||||
// Using `CAM_ID_NONE` here defaults to the active camera
|
||||
Gameplay_CopyCamera(globalCtx, CAM_ID_NONE, sRutoWarpSubCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sRutoWarpSubCamId, CAM_STAT_WAIT);
|
||||
this->rutoWarpState = WARP_BLUE_RUTO_STATE_WARPING;
|
||||
DoorWarp1_SetupAction(this, DoorWarp1_RutoWarpOut);
|
||||
|
@ -648,7 +649,7 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
if (DoorWarp1_PlayerInRange(this, globalCtx)) {
|
||||
player = GET_PLAYER(globalCtx);
|
||||
|
||||
OnePointCutscene_Init(globalCtx, 0x25E8, 999, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 0x25E8, 999, &this->actor, CAM_ID_MAIN);
|
||||
func_8002DF54(globalCtx, &this->actor, 10);
|
||||
player->unk_450.x = this->actor.world.pos.x;
|
||||
player->unk_450.z = this->actor.world.pos.z;
|
||||
|
|
|
@ -640,8 +640,8 @@ void func_809BE26C(EnBigokuta* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->unk_198 == 0 && Math_StepToF(&this->actor.scale.y, 0.0f, 0.001f)) {
|
||||
Flags_SetClear(globalCtx, this->actor.room);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
func_8005ACFC(globalCtx->cameraPtrs[MAIN_CAM], 4);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
func_8005ACFC(globalCtx->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 50, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xB0);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -777,8 +777,8 @@ void EnBigokuta_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
func_809BD2E4(this);
|
||||
func_809BE568(this);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BIG_OCTO);
|
||||
func_8005AD1C(globalCtx->cameraPtrs[MAIN_CAM], 4);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO);
|
||||
func_8005AD1C(globalCtx->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
|
||||
if (this->cylinder[0].base.atFlags & AT_ON) {
|
||||
if (this->actionFunc != func_809BE058) {
|
||||
|
|
|
@ -307,7 +307,7 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx)
|
|||
this->actor.textId = 0x1B;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
OnePointCutscene_Init(globalCtx, 8010, -99, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 8010, -99, NULL, CAM_ID_MAIN);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = EnBomBowMan_SetupChooseShowPrize;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ void func_809C41FC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x1B;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
OnePointCutscene_Init(globalCtx, 8010, -99, NULL, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 8010, -99, NULL, CAM_ID_MAIN);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = EnBomBowMan_SetupChooseShowPrize;
|
||||
} else {
|
||||
|
|
|
@ -52,7 +52,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
EnBomChu* chu;
|
||||
Vec3f chuPosDiff;
|
||||
|
||||
if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_CHU_BOWLING) {
|
||||
if (globalCtx->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_CHU_BOWLING) {
|
||||
chu = (EnBomChu*)globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
|
||||
|
||||
while (chu != NULL) {
|
||||
|
@ -70,38 +70,38 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, NULL, 8);
|
||||
chu->timer = 1;
|
||||
|
||||
this->camId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->camId, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
|
||||
this->unk_1C8.x = this->unk_1C8.y = this->unk_1C8.z = 0.1f;
|
||||
this->unk_1A4.x = this->unk_1A4.y = this->unk_1A4.z = 0.1f;
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f;
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.1f;
|
||||
|
||||
this->unk_180.x = this->unk_168.x = globalCtx->view.at.x;
|
||||
this->unk_180.y = this->unk_168.y = globalCtx->view.at.y;
|
||||
this->unk_180.z = this->unk_168.z = globalCtx->view.at.z;
|
||||
this->subCamAt.x = this->viewAt.x = globalCtx->view.at.x;
|
||||
this->subCamAt.y = this->viewAt.y = globalCtx->view.at.y;
|
||||
this->subCamAt.z = this->viewAt.z = globalCtx->view.at.z;
|
||||
|
||||
this->unk_18C.x = this->unk_174.x = globalCtx->view.eye.x;
|
||||
this->unk_18C.y = this->unk_174.y = globalCtx->view.eye.y;
|
||||
this->unk_18C.z = this->unk_174.z = globalCtx->view.eye.z;
|
||||
this->subCamEye.x = this->viewEye.x = globalCtx->view.eye.x;
|
||||
this->subCamEye.y = this->viewEye.y = globalCtx->view.eye.y;
|
||||
this->subCamEye.z = this->viewEye.z = globalCtx->view.eye.z;
|
||||
|
||||
this->unk_1BC.x = 20.0f;
|
||||
this->unk_1BC.y = 100.0f;
|
||||
this->unk_1BC.z = -800.0f;
|
||||
this->subCamAtNext.x = 20.0f;
|
||||
this->subCamAtNext.y = 100.0f;
|
||||
this->subCamAtNext.z = -800.0f;
|
||||
|
||||
this->unk_198.x = 20.0f;
|
||||
this->unk_198.y = 50.0f;
|
||||
this->unk_198.z = -485.0f;
|
||||
this->subCamEyeNext.x = 20.0f;
|
||||
this->subCamEyeNext.y = 50.0f;
|
||||
this->subCamEyeNext.z = -485.0f;
|
||||
|
||||
this->unk_1B0.x = fabsf(this->unk_18C.x - this->unk_198.x) * 0.02f;
|
||||
this->unk_1B0.y = fabsf(this->unk_18C.y - this->unk_198.y) * 0.02f;
|
||||
this->unk_1B0.z = fabsf(this->unk_18C.z - this->unk_198.z) * 0.02f;
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEye.x - this->subCamEyeNext.x) * 0.02f;
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEye.y - this->subCamEyeNext.y) * 0.02f;
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEye.z - this->subCamEyeNext.z) * 0.02f;
|
||||
|
||||
this->unk_1D4.x = fabsf(this->unk_180.x - this->unk_1BC.x) * 0.02f;
|
||||
this->unk_1D4.y = fabsf(this->unk_180.y - this->unk_1BC.y) * 0.02f;
|
||||
this->unk_1D4.z = fabsf(this->unk_180.z - this->unk_1BC.z) * 0.02f;
|
||||
this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * 0.02f;
|
||||
this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.02f;
|
||||
this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.02f;
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
this->actor.textId = 0xF;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_154 = TEXT_STATE_EVENT;
|
||||
|
@ -118,24 +118,27 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnBomBowlPit_CameraDollyIn(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
||||
if (this->camId != SUBCAM_FREE) {
|
||||
Math_ApproachF(&this->unk_180.x, this->unk_1BC.x, this->unk_1C8.x, this->unk_1D4.x);
|
||||
Math_ApproachF(&this->unk_180.y, this->unk_1BC.y, this->unk_1C8.y, this->unk_1D4.y);
|
||||
Math_ApproachF(&this->unk_180.z, this->unk_1BC.z, this->unk_1C8.z, this->unk_1D4.z);
|
||||
Math_ApproachF(&this->unk_18C.x, this->unk_198.x, this->unk_1A4.x, this->unk_1B0.x);
|
||||
Math_ApproachF(&this->unk_18C.y, this->unk_198.y, this->unk_1A4.y, this->unk_1B0.y);
|
||||
Math_ApproachF(&this->unk_18C.z, this->unk_198.z, this->unk_1A4.z, this->unk_1B0.z);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x, this->subCamAtVel.x);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y, this->subCamAtVel.y);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z, this->subCamAtVel.z);
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x, this->subCamEyeVel.x);
|
||||
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamEyeMaxVelFrac.y, this->subCamEyeVel.y);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z, this->subCamEyeVel.z);
|
||||
}
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
|
||||
if ((this->unk_154 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
|
||||
if ((fabsf(this->unk_18C.x - this->unk_198.x) < 5.0f) && (fabsf(this->unk_18C.y - this->unk_198.y) < 5.0f) &&
|
||||
(fabsf(this->unk_18C.z - this->unk_198.z) < 5.0f) && (fabsf(this->unk_180.x - this->unk_1BC.x) < 5.0f) &&
|
||||
(fabsf(this->unk_180.y - this->unk_1BC.y) < 5.0f) && (fabsf(this->unk_180.z - this->unk_1BC.z) < 5.0f)) {
|
||||
if ((fabsf(this->subCamEye.x - this->subCamEyeNext.x) < 5.0f) &&
|
||||
(fabsf(this->subCamEye.y - this->subCamEyeNext.y) < 5.0f) &&
|
||||
(fabsf(this->subCamEye.z - this->subCamEyeNext.z) < 5.0f) &&
|
||||
(fabsf(this->subCamAt.x - this->subCamAtNext.x) < 5.0f) &&
|
||||
(fabsf(this->subCamAt.y - this->subCamAtNext.y) < 5.0f) &&
|
||||
(fabsf(this->subCamAt.z - this->subCamAtNext.z) < 5.0f)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->timer = 30;
|
||||
this->actionFunc = EnBomBowlPit_SpawnPrize;
|
||||
|
@ -164,8 +167,8 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
Gameplay_ClearCamera(globalCtx, this->camId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, this->subCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = EnBomBowlPit_GivePrize;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct EnBomBowlPit {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ EnBomBowlPitActionFunc actionFunc;
|
||||
/* 0x0150 */ u16 unk_150;
|
||||
/* 0x0152 */ s16 camId;
|
||||
/* 0x0152 */ s16 subCamId;
|
||||
/* 0x0154 */ s16 unk_154;
|
||||
/* 0x0156 */ s16 exItemDone; // Set by EnExItem?
|
||||
/* 0x0158 */ s16 timer;
|
||||
|
@ -21,16 +21,16 @@ typedef struct EnBomBowlPit {
|
|||
/* 0x015C */ s16 start;
|
||||
/* 0x0160 */ s32 getItemId;
|
||||
/* 0x0164 */ u8 status;
|
||||
/* 0x0168 */ Vec3f unk_168; // set and not used?
|
||||
/* 0x0174 */ Vec3f unk_174; // set and not used?
|
||||
/* 0x0180 */ Vec3f unk_180; // camera at (start)
|
||||
/* 0x018C */ Vec3f unk_18C; // camera eye (start)
|
||||
/* 0x0198 */ Vec3f unk_198; // camera eye (end)
|
||||
/* 0x01A4 */ Vec3f unk_1A4; // camera eye (scales)
|
||||
/* 0x01B0 */ Vec3f unk_1B0; // camera eye (maxsteps)
|
||||
/* 0x01BC */ Vec3f unk_1BC; // camera at (end)
|
||||
/* 0x01C8 */ Vec3f unk_1C8; // camera at (scales)
|
||||
/* 0x01D4 */ Vec3f unk_1D4; // camera eye (maxsteps)
|
||||
/* 0x0168 */ Vec3f viewAt; // set and not used
|
||||
/* 0x0174 */ Vec3f viewEye; // set and not used
|
||||
/* 0x0180 */ Vec3f subCamAt;
|
||||
/* 0x018C */ Vec3f subCamEye;
|
||||
/* 0x0198 */ Vec3f subCamEyeNext;
|
||||
/* 0x01A4 */ Vec3f subCamEyeMaxVelFrac;
|
||||
/* 0x01B0 */ Vec3f subCamEyeVel;
|
||||
/* 0x01BC */ Vec3f subCamAtNext;
|
||||
/* 0x01C8 */ Vec3f subCamAtMaxVelFrac;
|
||||
/* 0x01D4 */ Vec3f subCamAtVel;
|
||||
/* 0x01E0 */ EnExItem* exItem;
|
||||
/* 0x01E4 */ char unk_1E4[0x3520];
|
||||
} EnBomBowlPit; // size = 0x3704
|
||||
|
|
|
@ -248,7 +248,7 @@ void EnBox_Fall(EnBox* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.shape.rot.z = 0;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
|
||||
EnBox_SetupAction(this, EnBox_WaitOpen);
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->unk_1AC);
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->subCamId);
|
||||
}
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_COFFIN_CAP_BOUND, &this->dyna.actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -271,7 +271,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_1A8 >= 0) {
|
||||
EnBox_SetupAction(this, EnBox_Fall);
|
||||
this->unk_1AC = OnePointCutscene_Init(globalCtx, 4500, 9999, &this->dyna.actor, MAIN_CAM);
|
||||
this->subCamId = OnePointCutscene_Init(globalCtx, 4500, 9999, &this->dyna.actor, CAM_ID_MAIN);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else if (this->unk_1A8 >= -11) {
|
||||
this->unk_1A8++;
|
||||
|
|
|
@ -33,7 +33,7 @@ typedef struct EnBox {
|
|||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ SkelAnime skelanime;
|
||||
/* 0x01A8 */ s32 unk_1A8; // related to animation delays for types 3 and 8
|
||||
/* 0x01AC */ s32 unk_1AC;
|
||||
/* 0x01AC */ s32 subCamId;
|
||||
/* 0x01B0 */ f32 unk_1B0; // 0-1, rotation-related, apparently unused (in z_en_box.c at least)
|
||||
/* 0x01B4 */ EnBoxActionFunc actionFunc;
|
||||
/* 0x01B8 */ Vec3s jointTable[5];
|
||||
|
|
|
@ -576,51 +576,51 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
if (this->state < CLEAR_TAG_STATE_LASER) {
|
||||
// Play the Arwing cutscene.
|
||||
osSyncPrintf("DEMO_MODE %d\n", this->cutsceneMode);
|
||||
osSyncPrintf("CAMERA_NO %d\n", this->cameraId);
|
||||
osSyncPrintf("CAMERA_NO %d\n", this->subCamId);
|
||||
|
||||
if (this->cutsceneMode != CLEAR_TAG_CUTSCENE_MODE_NONE) {
|
||||
f32 cutsceneCameraCircleX;
|
||||
f32 cutsceneCameraCircleZ;
|
||||
f32 subCamCircleX;
|
||||
f32 subCamCircleZ;
|
||||
s16 cutsceneTimer;
|
||||
Vec3f cutsceneCameraAtTarget;
|
||||
Vec3f cutsceneCameraEyeTarget;
|
||||
Vec3f subCamEyeNext;
|
||||
Vec3f subCamAtNext;
|
||||
|
||||
switch (this->cutsceneMode) {
|
||||
case CLEAR_TAG_CUTSCENE_MODE_SETUP:
|
||||
// Initializes Arwing cutscene camera data.
|
||||
this->cutsceneMode = CLEAR_TAG_CUTSCENE_MODE_PLAY;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->cameraId, CAM_STAT_ACTIVE);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
case CLEAR_TAG_CUTSCENE_MODE_PLAY:
|
||||
// Update the Arwing cutscene camera to spin around in a circle.
|
||||
cutsceneTimer = this->frameCounter * 128;
|
||||
cutsceneCameraCircleX = Math_SinS(cutsceneTimer) * 200.0f;
|
||||
cutsceneCameraCircleZ = Math_CosS(cutsceneTimer) * 200.0f;
|
||||
cutsceneCameraAtTarget.x = this->actor.world.pos.x + cutsceneCameraCircleX;
|
||||
cutsceneCameraAtTarget.y = 200.0f;
|
||||
cutsceneCameraAtTarget.z = this->actor.world.pos.z + cutsceneCameraCircleZ;
|
||||
cutsceneCameraEyeTarget = this->actor.world.pos;
|
||||
subCamCircleX = Math_SinS(cutsceneTimer) * 200.0f;
|
||||
subCamCircleZ = Math_CosS(cutsceneTimer) * 200.0f;
|
||||
subCamEyeNext.x = this->actor.world.pos.x + subCamCircleX;
|
||||
subCamEyeNext.y = 200.0f;
|
||||
subCamEyeNext.z = this->actor.world.pos.z + subCamCircleZ;
|
||||
subCamAtNext = this->actor.world.pos;
|
||||
break;
|
||||
}
|
||||
|
||||
// Make the Arwing cutscene camera approach the target.
|
||||
if (this->cameraId != SUBCAM_FREE) {
|
||||
Math_ApproachF(&this->cutsceneCameraAt.x, cutsceneCameraAtTarget.x, 0.1f, 500.0f);
|
||||
Math_ApproachF(&this->cutsceneCameraAt.y, cutsceneCameraAtTarget.y, 0.1f, 500.0f);
|
||||
Math_ApproachF(&this->cutsceneCameraAt.z, cutsceneCameraAtTarget.z, 0.1f, 500.0f);
|
||||
Math_ApproachF(&this->cutsceneCameraEye.x, cutsceneCameraEyeTarget.x, 0.2f, 500.0f);
|
||||
Math_ApproachF(&this->cutsceneCameraEye.y, cutsceneCameraEyeTarget.y, 0.2f, 500.0f);
|
||||
Math_ApproachF(&this->cutsceneCameraEye.z, cutsceneCameraEyeTarget.z, 0.2f, 500.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->cutsceneCameraEye,
|
||||
&this->cutsceneCameraAt);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Math_ApproachF(&this->subCamEye.x, subCamEyeNext.x, 0.1f, 500.0f);
|
||||
Math_ApproachF(&this->subCamEye.y, subCamEyeNext.y, 0.1f, 500.0f);
|
||||
Math_ApproachF(&this->subCamEye.z, subCamEyeNext.z, 0.1f, 500.0f);
|
||||
Math_ApproachF(&this->subCamAt.x, subCamAtNext.x, 0.2f, 500.0f);
|
||||
Math_ApproachF(&this->subCamAt.y, subCamAtNext.y, 0.2f, 500.0f);
|
||||
Math_ApproachF(&this->subCamAt.z, subCamAtNext.z, 0.2f, 500.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
|
||||
// Cutscene has finished.
|
||||
if (this->cutsceneTimer == 1) {
|
||||
func_800C08AC(globalCtx, this->cameraId, 0);
|
||||
this->cutsceneMode = this->cameraId = SUBCAM_FREE;
|
||||
func_800C08AC(globalCtx, this->subCamId, 0);
|
||||
// CLEAR_TAG_CUTSCENE_MODE_NONE / SUB_CAM_ID_DONE
|
||||
this->cutsceneMode = this->subCamId = 0;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,9 +65,9 @@ typedef struct EnClearTag {
|
|||
/* 0x0188 */ Vec3f floorTangent;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ u8 cutsceneMode;
|
||||
/* 0x01E2 */ s16 cameraId;
|
||||
/* 0x01E4 */ Vec3f cutsceneCameraAt;
|
||||
/* 0x01F0 */ Vec3f cutsceneCameraEye;
|
||||
/* 0x01E2 */ s16 subCamId;
|
||||
/* 0x01E4 */ Vec3f subCamEye;
|
||||
/* 0x01F0 */ Vec3f subCamAt;
|
||||
/* 0x01FC */ s16 cutsceneTimer;
|
||||
/* 0x01FE */ char unk_1FE[0x06];
|
||||
} EnClearTag; // size = 0x0204
|
||||
|
|
|
@ -458,13 +458,13 @@ void EnDaiku_InitSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
this->subCamEyeInit.z = this->subCamEye.z = this->actor.world.pos.z + eyePosDeltaWorld.z;
|
||||
|
||||
if (1) {}
|
||||
this->subCamAtTarget.x = this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAtTarget.y = this->subCamAt.y = this->actor.world.pos.y + 60.0f;
|
||||
this->subCamAtNext.x = this->subCamAt.x = this->actor.world.pos.x;
|
||||
this->subCamAtNext.y = this->subCamAt.y = this->actor.world.pos.y + 60.0f;
|
||||
if (1) {}
|
||||
this->subCamAtTarget.z = this->subCamAt.z = this->actor.world.pos.z;
|
||||
this->subCamAtNext.z = this->subCamAt.z = this->actor.world.pos.z;
|
||||
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
|
@ -475,13 +475,13 @@ void EnDaiku_InitSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
void EnDaiku_UpdateSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
||||
this->subCamAtTarget.x = this->actor.world.pos.x;
|
||||
this->subCamAtTarget.y = this->actor.world.pos.y + 60.0f;
|
||||
this->subCamAtTarget.z = this->actor.world.pos.z;
|
||||
this->subCamAtNext.x = this->actor.world.pos.x;
|
||||
this->subCamAtNext.y = this->actor.world.pos.y + 60.0f;
|
||||
this->subCamAtNext.z = this->actor.world.pos.z;
|
||||
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->subCamAtTarget.x, 1.0f, 1000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, this->subCamAtTarget.y, 1.0f, 1000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->subCamAtTarget.z, 1.0f, 1000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.x, this->subCamAtNext.x, 1.0f, 1000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.y, this->subCamAtNext.y, 1.0f, 1000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->subCamAt.z, this->subCamAtNext.z, 1.0f, 1000.0f, 0.0f);
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
Vec3f vec;
|
||||
|
||||
Gameplay_ClearCamera(globalCtx, this->subCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
this->subCamActive = false;
|
||||
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
|
|
|
@ -25,7 +25,7 @@ typedef struct EnDaiku {
|
|||
/* 0x0204 */ s32 subCamId;
|
||||
/* 0x0208 */ s16 rotYtowardsPath;
|
||||
/* 0x020C */ Vec3f subCamEyeInit;
|
||||
/* 0x0218 */ Vec3f subCamAtTarget;
|
||||
/* 0x0218 */ Vec3f subCamAtNext;
|
||||
/* 0x0224 */ Vec3f subCamEye;
|
||||
/* 0x0230 */ Vec3f subCamAt;
|
||||
/* 0x023C */ s32 stateFlags;
|
||||
|
|
|
@ -298,38 +298,39 @@ void func_809EE194(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
void EnDivingGame_SetupRupeeThrow(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->spawnRuppyTimer = 10;
|
||||
this->unk_2F4.x = -210.0f;
|
||||
this->unk_2F4.y = -80.0f;
|
||||
this->unk_2F4.z = -1020.0f;
|
||||
this->unk_2D0.x = -280.0f;
|
||||
this->unk_2D0.y = -20.0f;
|
||||
this->unk_2D0.z = -240.0f;
|
||||
this->subCamAtNext.x = -210.0f;
|
||||
this->subCamAtNext.y = -80.0f;
|
||||
this->subCamAtNext.z = -1020.0f;
|
||||
this->subCamEyeNext.x = -280.0f;
|
||||
this->subCamEyeNext.y = -20.0f;
|
||||
this->subCamEyeNext.z = -240.0f;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->rupeesLeftToThrow = 5;
|
||||
} else {
|
||||
this->rupeesLeftToThrow = 10;
|
||||
}
|
||||
this->unk_2DC.x = this->unk_2DC.y = this->unk_2DC.z = this->unk_300.x = this->unk_300.y = this->unk_300.z = 0.1f;
|
||||
this->camLookAt.x = globalCtx->view.at.x;
|
||||
this->camLookAt.y = globalCtx->view.at.y;
|
||||
this->camLookAt.z = globalCtx->view.at.z;
|
||||
this->camEye.x = globalCtx->view.eye.x;
|
||||
this->camEye.y = globalCtx->view.eye.y + 80.0f;
|
||||
this->camEye.z = globalCtx->view.eye.z + 250.0f;
|
||||
this->unk_2E8.x = fabsf(this->camEye.x - this->unk_2D0.x) * 0.04f;
|
||||
this->unk_2E8.y = fabsf(this->camEye.y - this->unk_2D0.y) * 0.04f;
|
||||
this->unk_2E8.z = fabsf(this->camEye.z - this->unk_2D0.z) * 0.04f;
|
||||
this->unk_30C.x = fabsf(this->camLookAt.x - this->unk_2F4.x) * 0.04f;
|
||||
this->unk_30C.y = fabsf(this->camLookAt.y - this->unk_2F4.y) * 0.04f;
|
||||
this->unk_30C.z = fabsf(this->camLookAt.z - this->unk_2F4.z) * 0.04f;
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->camLookAt, &this->camEye);
|
||||
this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z =
|
||||
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f;
|
||||
this->subCamAt.x = globalCtx->view.at.x;
|
||||
this->subCamAt.y = globalCtx->view.at.y;
|
||||
this->subCamAt.z = globalCtx->view.at.z;
|
||||
this->subCamEye.x = globalCtx->view.eye.x;
|
||||
this->subCamEye.y = globalCtx->view.eye.y + 80.0f;
|
||||
this->subCamEye.z = globalCtx->view.eye.z + 250.0f;
|
||||
this->subCamEyeVel.x = fabsf(this->subCamEye.x - this->subCamEyeNext.x) * 0.04f;
|
||||
this->subCamEyeVel.y = fabsf(this->subCamEye.y - this->subCamEyeNext.y) * 0.04f;
|
||||
this->subCamEyeVel.z = fabsf(this->subCamEye.z - this->subCamEyeNext.z) * 0.04f;
|
||||
this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * 0.04f;
|
||||
this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.04f;
|
||||
this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.04f;
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
Gameplay_CameraSetFov(globalCtx, this->subCamId, globalCtx->mainCamera.fov);
|
||||
this->csCameraTimer = 60;
|
||||
this->subCamTimer = 60;
|
||||
this->actionFunc = EnDivingGame_RupeeThrow;
|
||||
this->unk_318 = 0.0f;
|
||||
this->subCamVelFactor = 0.0f;
|
||||
}
|
||||
|
||||
// Throws rupee when this->spawnRuppyTimer == 0
|
||||
|
@ -338,15 +339,20 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
if (func_800C0DB4(globalCtx, &this->actor.projectedPos)) {
|
||||
Audio_SetExtraFilter(0);
|
||||
}
|
||||
if (this->subCamId != 0) {
|
||||
Math_ApproachF(&this->camEye.x, this->unk_2D0.x, this->unk_2DC.x, this->unk_2E8.x * this->unk_318);
|
||||
Math_ApproachF(&this->camEye.z, this->unk_2D0.z, this->unk_2DC.z, this->unk_2E8.z * this->unk_318);
|
||||
Math_ApproachF(&this->camLookAt.x, this->unk_2F4.x, this->unk_300.x, this->unk_30C.x * this->unk_318);
|
||||
Math_ApproachF(&this->camLookAt.y, this->unk_2F4.y, this->unk_300.y, this->unk_30C.y * this->unk_318);
|
||||
Math_ApproachF(&this->camLookAt.z, this->unk_2F4.z, this->unk_300.z, this->unk_30C.z * this->unk_318);
|
||||
Math_ApproachF(&this->unk_318, 1.0f, 1.0f, 0.02f);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x,
|
||||
this->subCamEyeVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z,
|
||||
this->subCamEyeVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x,
|
||||
this->subCamAtVel.x * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y,
|
||||
this->subCamAtVel.y * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z,
|
||||
this->subCamAtVel.z * this->subCamVelFactor);
|
||||
Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, 0.02f);
|
||||
}
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->camLookAt, &this->camEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
if (!this->allRupeesThrown && this->spawnRuppyTimer == 0) {
|
||||
this->spawnRuppyTimer = 5;
|
||||
EnDivingGame_SpawnRuppy(this, globalCtx);
|
||||
|
@ -361,12 +367,14 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
this->allRupeesThrown = true;
|
||||
}
|
||||
}
|
||||
if (this->csCameraTimer == 0 ||
|
||||
((fabsf(this->camEye.x - this->unk_2D0.x) < 2.0f) && (fabsf(this->camEye.y - this->unk_2D0.y) < 2.0f) &&
|
||||
(fabsf(this->camEye.z - this->unk_2D0.z) < 2.0f) && (fabsf(this->camLookAt.x - this->unk_2F4.x) < 2.0f) &&
|
||||
(fabsf(this->camLookAt.y - this->unk_2F4.y) < 2.0f) && (fabsf(this->camLookAt.z - this->unk_2F4.z) < 2.0f))) {
|
||||
if (this->subCamTimer == 0 || ((fabsf(this->subCamEye.x - this->subCamEyeNext.x) < 2.0f) &&
|
||||
(fabsf(this->subCamEye.y - this->subCamEyeNext.y) < 2.0f) &&
|
||||
(fabsf(this->subCamEye.z - this->subCamEyeNext.z) < 2.0f) &&
|
||||
(fabsf(this->subCamAt.x - this->subCamAtNext.x) < 2.0f) &&
|
||||
(fabsf(this->subCamAt.y - this->subCamAtNext.y) < 2.0f) &&
|
||||
(fabsf(this->subCamAt.z - this->subCamAtNext.z) < 2.0f))) {
|
||||
if (this->unk_2A2 != 0) {
|
||||
this->csCameraTimer = 70;
|
||||
this->subCamTimer = 70;
|
||||
this->unk_2A2 = 2;
|
||||
this->actionFunc = func_809EE780;
|
||||
} else {
|
||||
|
@ -380,23 +388,23 @@ void EnDivingGame_SetupUnderwaterViewCs(EnDivingGame* this, GlobalContext* globa
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_296 == 0) {
|
||||
this->unk_2A2 = 1;
|
||||
this->csCameraTimer = 100;
|
||||
this->subCamTimer = 100;
|
||||
this->actionFunc = EnDivingGame_RupeeThrow;
|
||||
this->camLookAt.x = this->unk_2F4.x = -210.0f;
|
||||
this->camLookAt.y = this->unk_2F4.y = -80.0f;
|
||||
this->camLookAt.z = this->unk_2F4.z = -1020.0f;
|
||||
this->camEye.x = this->unk_2D0.x = -280.0f;
|
||||
this->camEye.y = this->unk_2D0.y = -20.0f;
|
||||
this->camEye.z = this->unk_2D0.z = -240.0f;
|
||||
this->subCamAt.x = this->subCamAtNext.x = -210.0f;
|
||||
this->subCamAt.y = this->subCamAtNext.y = -80.0f;
|
||||
this->subCamAt.z = this->subCamAtNext.z = -1020.0f;
|
||||
this->subCamEye.x = this->subCamEyeNext.x = -280.0f;
|
||||
this->subCamEye.y = this->subCamEyeNext.y = -20.0f;
|
||||
this->subCamEye.z = this->subCamEyeNext.z = -240.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// EnDivingGame_SayStartAndWait ?
|
||||
void func_809EE780(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->csCameraTimer == 0) {
|
||||
if (this->subCamTimer == 0) {
|
||||
Gameplay_ClearCamera(globalCtx, this->subCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, CAM_ID_MAIN, CAM_STAT_ACTIVE);
|
||||
this->actor.textId = 0x405A;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
|
@ -483,8 +491,8 @@ void EnDivingGame_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
Vec3f pos;
|
||||
|
||||
if (this->csCameraTimer != 0) {
|
||||
this->csCameraTimer--;
|
||||
if (this->subCamTimer != 0) {
|
||||
this->subCamTimer--;
|
||||
}
|
||||
if (this->unk_296 != 0) {
|
||||
this->unk_296--;
|
||||
|
|
|
@ -18,7 +18,7 @@ typedef struct EnDivingGame {
|
|||
/* 0x028A */ Vec3s vec_28A;
|
||||
/* 0x0290 */ s16 unk_290; // counter that only goes up
|
||||
/* 0x0292 */ s16 unk_292;
|
||||
/* 0x0294 */ s16 csCameraTimer;
|
||||
/* 0x0294 */ s16 subCamTimer;
|
||||
/* 0x0296 */ s16 unk_296; // read by ExRuppy // timer?
|
||||
/* 0x0298 */ s16 eyeTimer;
|
||||
/* 0x029A */ s16 spawnRuppyTimer;
|
||||
|
@ -31,15 +31,15 @@ typedef struct EnDivingGame {
|
|||
/* 0x02A8 */ s16 state; // minigameState? 0: default, 1: waiting to give the scale, 2: minigame started
|
||||
/* 0x02AA */ s16 extraWinCount; // counts how many times you have beaten the minigame **after** you got the scale. ExRuppy will reset it to zero if a 500 rupee is spawned.
|
||||
/* 0x02AC */ char unk_2AC[0xC]; // probably another Vec3f, but unused.
|
||||
/* 0x02B8 */ Vec3f camLookAt;
|
||||
/* 0x02C4 */ Vec3f camEye;
|
||||
/* 0x02D0 */ Vec3f unk_2D0;
|
||||
/* 0x02DC */ Vec3f unk_2DC;
|
||||
/* 0x02E8 */ Vec3f unk_2E8;
|
||||
/* 0x02F4 */ Vec3f unk_2F4;
|
||||
/* 0x0300 */ Vec3f unk_300;
|
||||
/* 0x030C */ Vec3f unk_30C;
|
||||
/* 0x0318 */ f32 unk_318;
|
||||
/* 0x02B8 */ Vec3f subCamAt;
|
||||
/* 0x02C4 */ Vec3f subCamEye;
|
||||
/* 0x02D0 */ Vec3f subCamEyeNext;
|
||||
/* 0x02DC */ Vec3f subCamEyeMaxVelFrac;
|
||||
/* 0x02E8 */ Vec3f subCamEyeVel;
|
||||
/* 0x02F4 */ Vec3f subCamAtNext;
|
||||
/* 0x0300 */ Vec3f subCamAtMaxVelFrac;
|
||||
/* 0x030C */ Vec3f subCamAtVel;
|
||||
/* 0x0318 */ f32 subCamVelFactor;
|
||||
/* 0x031C */ char unk_31C; // unused
|
||||
/* 0x031D */ u8 notPlayingMinigame; // flag
|
||||
/* 0x031E */ u8 allRupeesThrown; // flag
|
||||
|
|
|
@ -97,7 +97,7 @@ void EnDntDemo_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
// "jiji jiji jiji jiji jiji" [onomatopoeia for the scrub sound?]
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ じじじじじじじじじじい ☆☆☆☆☆ %x\n" VT_RST, this->leader);
|
||||
}
|
||||
this->subCamera = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actionFunc = EnDntDemo_Judge;
|
||||
}
|
||||
|
@ -124,8 +124,8 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnDntDemo_Results;
|
||||
} else if ((this->actor.xzDistToPlayer > 30.0f) || (Player_GetMask(globalCtx) == 0)) {
|
||||
this->debugArrowTimer++;
|
||||
if (this->subCamera != SUBCAM_FREE) {
|
||||
this->subCamera = SUBCAM_FREE;
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
}
|
||||
if (this->judgeTimer != 0) {
|
||||
for (i = 0; i < 9; i++) {
|
||||
|
@ -134,8 +134,8 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
this->judgeTimer = 0;
|
||||
}
|
||||
} else {
|
||||
if ((Player_GetMask(globalCtx) != 0) && (this->subCamera == SUBCAM_FREE)) {
|
||||
this->subCamera = OnePointCutscene_Init(globalCtx, 2220, -99, &this->scrubs[3]->actor, MAIN_CAM);
|
||||
if ((Player_GetMask(globalCtx) != 0) && (this->subCamId == SUB_CAM_ID_DONE)) {
|
||||
this->subCamId = OnePointCutscene_Init(globalCtx, 2220, -99, &this->scrubs[3]->actor, CAM_ID_MAIN);
|
||||
}
|
||||
this->debugArrowTimer = 0;
|
||||
if (this->judgeTimer == 40) {
|
||||
|
@ -169,10 +169,10 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
this->prize = DNT_PRIZE_NUTS;
|
||||
this->leader->stageSignal = DNT_LEADER_SIGNAL_UP;
|
||||
reaction = DNT_SIGNAL_LOOK;
|
||||
if (this->subCamera != SUBCAM_FREE) {
|
||||
this->subCamera = SUBCAM_FREE;
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
reaction = DNT_SIGNAL_LOOK;
|
||||
OnePointCutscene_Init(globalCtx, 2340, -99, &this->leader->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 2340, -99, &this->leader->actor, CAM_ID_MAIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -209,9 +209,9 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_COURTYARD);
|
||||
break;
|
||||
case DNT_ACTION_ATTACK:
|
||||
if (this->subCamera != SUBCAM_FREE) {
|
||||
this->subCamera = SUBCAM_FREE;
|
||||
OnePointCutscene_Init(globalCtx, 2350, -99, &this->scrubs[3]->actor, MAIN_CAM);
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
OnePointCutscene_Init(globalCtx, 2350, -99, &this->scrubs[3]->actor, CAM_ID_MAIN);
|
||||
}
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
break;
|
||||
|
|
|
@ -18,7 +18,7 @@ typedef struct EnDntDemo {
|
|||
/* 0x0158 */ s16 leaderSignal;
|
||||
/* 0x015A */ s16 action;
|
||||
/* 0x015C */ s16 prize;
|
||||
/* 0x015E */ s16 subCamera;
|
||||
/* 0x015E */ s16 subCamId;
|
||||
/* 0x0160 */ Vec3f scrubPos[9];
|
||||
/* 0x01CC */ Vec3f leaderPos;
|
||||
/* 0x01D8 */ struct EnDntNomal* scrubs[9];
|
||||
|
|
|
@ -118,7 +118,7 @@ void EnDntJiji_Wait(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Gameplay_InCsMode(globalCtx) &&
|
||||
!(player->stateFlags1 & PLAYER_STATE1_11)) {
|
||||
OnePointCutscene_Init(globalCtx, 2230, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 2230, -99, &this->actor, CAM_ID_MAIN);
|
||||
this->timer = 0;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = EnDntJiji_SetupUnburrow;
|
||||
|
|
|
@ -249,7 +249,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, GlobalContext* globalCtx) {
|
|||
if (!LINK_IS_ADULT && !GET_ITEMGETINF(ITEMGETINF_1D)) {
|
||||
this->hitCounter++;
|
||||
if (this->hitCounter >= 3) {
|
||||
OnePointCutscene_Init(globalCtx, 4140, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4140, -99, &this->actor, CAM_ID_MAIN);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
this->timer4 = 50;
|
||||
this->actionFunc = EnDntNomal_SetupTargetUnburrow;
|
||||
|
|
|
@ -365,7 +365,7 @@ void func_809FE638(EnDu* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_29)) {
|
||||
OnePointCutscene_Init(globalCtx, 3330, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 3330, -99, &this->actor, CAM_ID_MAIN);
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x7FFF;
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
EnDu_SetupAction(this, func_809FE6CC);
|
||||
|
|
|
@ -177,7 +177,7 @@ void EnFhgFire_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnFhgFire_LightningStrike(EnFhgFire* this, GlobalContext* globalCtx) {
|
||||
Camera* camera = Gameplay_GetCamera(globalCtx, 0);
|
||||
Camera* mainCam = Gameplay_GetCamera(globalCtx, CAM_ID_MAIN);
|
||||
s16 i;
|
||||
|
||||
switch (this->work[FHGFIRE_FIRE_MODE]) {
|
||||
|
@ -187,7 +187,7 @@ void EnFhgFire_LightningStrike(EnFhgFire* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case STRIKE_BURST:
|
||||
this->actor.shape.rot.y =
|
||||
Camera_GetInputDirYaw(camera) + 0x8000 * (this->work[FHGFIRE_VARIANCE_TIMER] & 0xFF);
|
||||
Camera_GetInputDirYaw(mainCam) + 0x8000 * (this->work[FHGFIRE_VARIANCE_TIMER] & 0xFF);
|
||||
Math_ApproachF(&this->fwork[FHGFIRE_SCALE], 1.0f, 1.0f, 0.2f);
|
||||
|
||||
if (this->work[FHGFIRE_TIMER] == 0) {
|
||||
|
@ -218,7 +218,7 @@ void EnFhgFire_LightningStrike(EnFhgFire* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case STRIKE_TRAILS:
|
||||
this->actor.shape.rot.y =
|
||||
Camera_GetInputDirYaw(camera) + (this->work[FHGFIRE_VARIANCE_TIMER] & 0xFF) * 0x8000;
|
||||
Camera_GetInputDirYaw(mainCam) + (this->work[FHGFIRE_VARIANCE_TIMER] & 0xFF) * 0x8000;
|
||||
|
||||
Math_ApproachF(&this->fwork[FHGFIRE_SCALE], 0.0f, 1.0f, 0.2f);
|
||||
if (this->work[FHGFIRE_TIMER] == 30) {
|
||||
|
|
|
@ -615,7 +615,7 @@ void EnFr_Idle(EnFr* this, GlobalContext* globalCtx) {
|
|||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
}
|
||||
|
||||
OnePointCutscene_Init(globalCtx, 4110, ~0x62, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4110, ~0x62, &this->actor, CAM_ID_MAIN);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
player->actor.world.pos.x = this->actor.world.pos.x; // x = 990.0f
|
||||
player->actor.world.pos.y = this->actor.world.pos.y; // y = 205.0f
|
||||
|
|
|
@ -420,7 +420,7 @@ void func_80A3F0E4(EnGo* this) {
|
|||
s32 EnGo_IsCameraModified(EnGo* this, GlobalContext* globalCtx) {
|
||||
f32 xyzDistSq;
|
||||
s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
Camera* camera = globalCtx->cameraPtrs[MAIN_CAM];
|
||||
Camera* mainCam = globalCtx->cameraPtrs[CAM_ID_MAIN];
|
||||
|
||||
if (fabsf(yawDiff) > 10920.0f) {
|
||||
return 0;
|
||||
|
@ -428,13 +428,13 @@ s32 EnGo_IsCameraModified(EnGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
xyzDistSq = (this->actor.scale.x / 0.01f) * 10000.0f;
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DIRECTED_YAW);
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
||||
xyzDistSq *= 4.8f;
|
||||
}
|
||||
|
||||
if (fabsf(this->actor.xyzDistToPlayerSq) > xyzDistSq) {
|
||||
if (camera->setting == CAM_SET_DIRECTED_YAW) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_NORMAL0);
|
||||
if (mainCam->setting == CAM_SET_DIRECTED_YAW) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -774,7 +774,7 @@ void EnGo_CurledUp(EnGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
EnGo_SetupAction(this, EnGo_WakeUp);
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, CAM_ID_MAIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -866,7 +866,7 @@ void EnGo_BiggoronActionFunc(EnGo* this, GlobalContext* globalCtx) {
|
|||
EnGo_SetupAction(this, EnGo_Eyedrops);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
gSaveContext.timer2State = 0;
|
||||
OnePointCutscene_Init(globalCtx, 4190, -99, &this->actor, MAIN_CAM);
|
||||
OnePointCutscene_Init(globalCtx, 4190, -99, &this->actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue