mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-09 14:06:54 +00:00
Document OnePointCutscene Init Field (#1465)
* player csmode enum * cleanup * missed one, player2 * spell out enum name * use CSMODE_MAX for data * doc OnePointDemo Field * PR Suggestions * another suggestion * duplicate word * adjust comment * cleanup comments * oops
This commit is contained in:
parent
985dd7f520
commit
905b7087de
4 changed files with 433 additions and 420 deletions
|
@ -50,26 +50,28 @@
|
|||
#define CAM_HUD_VISIBILITY_MASK (0xF << CAM_HUD_VISIBILITY_SHIFT)
|
||||
#define CAM_HUD_VISIBILITY(hudVisibility) (((hudVisibility) & 0xF) << CAM_HUD_VISIBILITY_SHIFT)
|
||||
|
||||
//! @note: since `interfaceField` can only have `0 - 0xF` values,
|
||||
//! there is no cam value mapped to `HUD_VISIBILITY_NOTHING_INSTANT`.
|
||||
//! @note: since 0 means `HUD_VISIBILITY_ALL`,
|
||||
//! there is no cam value mapped to `HUD_VISIBILITY_NO_CHANGE`.
|
||||
#define CAM_HUD_VISIBILITY_ALL CAM_HUD_VISIBILITY(0) // HUD_VISIBILITY_ALL
|
||||
#define CAM_HUD_VISIBILITY_NOTHING CAM_HUD_VISIBILITY(HUD_VISIBILITY_NOTHING)
|
||||
#define CAM_HUD_VISIBILITY_NOTHING_ALT CAM_HUD_VISIBILITY(HUD_VISIBILITY_NOTHING_ALT)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS_FORCE CAM_HUD_VISIBILITY(HUD_VISIBILITY_HEARTS_FORCE)
|
||||
#define CAM_HUD_VISIBILITY_A CAM_HUD_VISIBILITY(HUD_VISIBILITY_A)
|
||||
#define CAM_HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE CAM_HUD_VISIBILITY(HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE)
|
||||
#define CAM_HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE CAM_HUD_VISIBILITY(HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE)
|
||||
#define CAM_HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS CAM_HUD_VISIBILITY(HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS)
|
||||
#define CAM_HUD_VISIBILITY_B CAM_HUD_VISIBILITY(HUD_VISIBILITY_B)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS_MAGIC CAM_HUD_VISIBILITY(HUD_VISIBILITY_HEARTS_MAGIC)
|
||||
#define CAM_HUD_VISIBILITY_B_ALT CAM_HUD_VISIBILITY(HUD_VISIBILITY_B_ALT)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS CAM_HUD_VISIBILITY(HUD_VISIBILITY_HEARTS)
|
||||
#define CAM_HUD_VISIBILITY_A_B_MINIMAP CAM_HUD_VISIBILITY(HUD_VISIBILITY_A_B_MINIMAP)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS_MAGIC_FORCE CAM_HUD_VISIBILITY(HUD_VISIBILITY_HEARTS_MAGIC_FORCE)
|
||||
// These defines exist to clarify exactly which HUD visibility modes are supported by the camera system. While most of
|
||||
// them map 1 to 1 with their HUD visibility counterparts, not all HUD visibility mode values will work as expected if
|
||||
// used directly. Notably:
|
||||
// - CAM_HUD_VISIBILITY_ALL (0) maps to HUD_VISIBILITY_ALL (50), not HUD_VISIBILITY_NO_CHANGE (0)
|
||||
// - HUD_VISIBILITY_NOTHING_INSTANT (52) has no CAM_HUD_VISIBILITY_* mapping,
|
||||
// because camera HUD visibility values are restricted to the 0-0xF range
|
||||
#define CAM_HUD_VISIBILITY_ALL (0) // HUD_VISIBILITY_ALL
|
||||
#define CAM_HUD_VISIBILITY_NOTHING (HUD_VISIBILITY_NOTHING)
|
||||
#define CAM_HUD_VISIBILITY_NOTHING_ALT (HUD_VISIBILITY_NOTHING_ALT)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS_FORCE (HUD_VISIBILITY_HEARTS_FORCE)
|
||||
#define CAM_HUD_VISIBILITY_A (HUD_VISIBILITY_A)
|
||||
#define CAM_HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE (HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE)
|
||||
#define CAM_HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE (HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE)
|
||||
#define CAM_HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS (HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS)
|
||||
#define CAM_HUD_VISIBILITY_B (HUD_VISIBILITY_B)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS_MAGIC (HUD_VISIBILITY_HEARTS_MAGIC)
|
||||
#define CAM_HUD_VISIBILITY_B_ALT (HUD_VISIBILITY_B_ALT)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS (HUD_VISIBILITY_HEARTS)
|
||||
#define CAM_HUD_VISIBILITY_A_B_MINIMAP (HUD_VISIBILITY_A_B_MINIMAP)
|
||||
#define CAM_HUD_VISIBILITY_HEARTS_MAGIC_FORCE (HUD_VISIBILITY_HEARTS_MAGIC_FORCE)
|
||||
// Unique to camera, does not change hud visibility mode (similar effect as HUD_VISIBILITY_NO_CHANGE)
|
||||
#define CAM_HUD_VISIBILITY_IGNORE CAM_HUD_VISIBILITY(0xF)
|
||||
#define CAM_HUD_VISIBILITY_IGNORE (0xF)
|
||||
|
||||
/**
|
||||
* letterboxFlag: Determines the size of the letter-box window. See CAM_LETTERBOX_* defines.
|
||||
|
@ -80,7 +82,7 @@
|
|||
* funcFlags: Custom flags for functions
|
||||
*/
|
||||
#define CAM_INTERFACE_FIELD(letterboxFlag, hudVisibilityMode, funcFlags) \
|
||||
(((letterboxFlag) & CAM_LETTERBOX_MASK) | (hudVisibilityMode) | ((funcFlags) & 0xFF))
|
||||
(((letterboxFlag) & CAM_LETTERBOX_MASK) | CAM_HUD_VISIBILITY(hudVisibilityMode) | ((funcFlags) & 0xFF))
|
||||
|
||||
// Camera behaviorFlags. Flags specifically for settings, modes, and bgCam
|
||||
// Used to store current state, only CAM_BEHAVIOR_SETTING_1 and CAM_BEHAVIOR_BG_2 are read from and used in logic
|
||||
|
@ -1249,13 +1251,22 @@ typedef enum {
|
|||
|
||||
#define ONEPOINT_CS_GET_ACTION(onePointCsFull) ((onePointCsFull)->actionFlags & 0x1F)
|
||||
|
||||
/** initFlags
|
||||
* & 0x00FF = atInitFlags
|
||||
* & 0xFF00 = eyeInitFlags
|
||||
#define ONEPOINT_CS_INIT_FIELD_NONE 0xFF
|
||||
#define ONEPOINT_CS_INIT_FIELD_ACTORCAT(actorCat) (0x80 | ((actorCat) & 0x0F))
|
||||
#define ONEPOINT_CS_INIT_FIELD_HUD_VISIBILITY(camHudVisibility) (0xC0 | ((camHudVisibility) & 0x0F))
|
||||
#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csMode) ((csMode) & 0x7F)
|
||||
|
||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(field) ((field & 0xF0) == 0x80)
|
||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(field) ((field & 0xF0) == 0xC0)
|
||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_PLAYER_CS(field) !(field & 0x80)
|
||||
|
||||
/** viewFlags
|
||||
* & 0x00FF = atFlags
|
||||
* & 0xFF00 = eyeFlags
|
||||
* 0x1: Direct Copy of atTargetInit
|
||||
* if initFlags & 0x6060: use head for focus point
|
||||
* if viewFlags & 0x6060: use head for focus point
|
||||
* 0x2: Add atTargetInit to view's lookAt
|
||||
* if initFlags & 0x6060: use world for focus point
|
||||
* if viewFlags & 0x6060: use world for focus point
|
||||
* 0x3: Add atTargetInit to camera's at
|
||||
* 0x4: Don't update targets?
|
||||
* 0x8: flag to use atTagetInit as f32 pitch, yaw, r
|
||||
|
@ -1264,8 +1275,8 @@ typedef enum {
|
|||
*/
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 actionFlags;
|
||||
/* 0x01 */ u8 unk_01;
|
||||
/* 0x02 */ s16 initFlags;
|
||||
/* 0x01 */ u8 initField;
|
||||
/* 0x02 */ s16 viewFlags;
|
||||
/* 0x04 */ s16 timerInit;
|
||||
/* 0x06 */ s16 rollTargetInit;
|
||||
/* 0x08 */ f32 fovTargetInit;
|
||||
|
|
|
@ -783,9 +783,9 @@ void Camera_UpdateInterface(s16 interfaceField) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((interfaceField & CAM_HUD_VISIBILITY_MASK) != CAM_HUD_VISIBILITY_IGNORE) {
|
||||
if ((interfaceField & CAM_HUD_VISIBILITY_MASK) != CAM_HUD_VISIBILITY(CAM_HUD_VISIBILITY_IGNORE)) {
|
||||
hudVisibilityMode = (interfaceField & CAM_HUD_VISIBILITY_MASK) >> CAM_HUD_VISIBILITY_SHIFT;
|
||||
if (hudVisibilityMode == (CAM_HUD_VISIBILITY_ALL >> CAM_HUD_VISIBILITY_SHIFT)) {
|
||||
if (hudVisibilityMode == CAM_HUD_VISIBILITY_ALL) {
|
||||
hudVisibilityMode = HUD_VISIBILITY_ALL;
|
||||
}
|
||||
if (sCameraHudVisibilityMode != hudVisibilityMode) {
|
||||
|
@ -5204,8 +5204,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
VecGeo scratchGeo;
|
||||
VecGeo playerTargetOffset;
|
||||
s16 action;
|
||||
s16 atInitFlags;
|
||||
s16 eyeInitFlags;
|
||||
s16 atFlags;
|
||||
s16 eyeFlags;
|
||||
s16 pad2;
|
||||
PosRot targethead;
|
||||
PosRot playerhead;
|
||||
|
@ -5257,19 +5257,21 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
rwData->curKeyFrame = &ONEPOINT_CS_INFO(camera)->keyFrames[rwData->curKeyFrameIdx];
|
||||
rwData->keyFrameTimer = rwData->curKeyFrame->timerInit;
|
||||
|
||||
if (rwData->curKeyFrame->unk_01 != 0xFF) {
|
||||
if ((rwData->curKeyFrame->unk_01 & 0xF0) == 0x80) {
|
||||
D_8011D3AC = rwData->curKeyFrame->unk_01 & 0xF;
|
||||
} else if ((rwData->curKeyFrame->unk_01 & 0xF0) == 0xC0) {
|
||||
if (rwData->curKeyFrame->initField != ONEPOINT_CS_INIT_FIELD_NONE) {
|
||||
if (ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(rwData->curKeyFrame->initField)) {
|
||||
D_8011D3AC = rwData->curKeyFrame->initField & 0xF;
|
||||
} else if (ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(rwData->curKeyFrame->initField)) {
|
||||
Camera_UpdateInterface(
|
||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, CAM_HUD_VISIBILITY(rwData->curKeyFrame->unk_01), 0));
|
||||
} else if (camera->player->stateFlags1 & PLAYER_STATE1_27 &&
|
||||
player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8);
|
||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||
} else {
|
||||
osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->unk_01);
|
||||
func_8002DF38(camera->play, camera->target, rwData->curKeyFrame->unk_01);
|
||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, rwData->curKeyFrame->initField, 0));
|
||||
} else { // initField is of type PlayerCsMode
|
||||
if ((camera->player->stateFlags1 & PLAYER_STATE1_27) &&
|
||||
(player->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||
func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8);
|
||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||
} else {
|
||||
osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->initField);
|
||||
func_8002DF38(camera->play, camera->target, rwData->curKeyFrame->initField);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -5283,29 +5285,29 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
rwData->isNewKeyFrame = false;
|
||||
}
|
||||
|
||||
atInitFlags = rwData->curKeyFrame->initFlags & 0xFF;
|
||||
if (atInitFlags == 1) {
|
||||
atFlags = rwData->curKeyFrame->viewFlags & 0xFF;
|
||||
if (atFlags == 1) {
|
||||
rwData->atTarget = rwData->curKeyFrame->atTargetInit;
|
||||
} else if (atInitFlags == 2) {
|
||||
} else if (atFlags == 2) {
|
||||
if (rwData->isNewKeyFrame) {
|
||||
rwData->atTarget.x = camera->play->view.at.x + rwData->curKeyFrame->atTargetInit.x;
|
||||
rwData->atTarget.y = camera->play->view.at.y + rwData->curKeyFrame->atTargetInit.y;
|
||||
rwData->atTarget.z = camera->play->view.at.z + rwData->curKeyFrame->atTargetInit.z;
|
||||
}
|
||||
} else if (atInitFlags == 3) {
|
||||
} else if (atFlags == 3) {
|
||||
if (rwData->isNewKeyFrame) {
|
||||
rwData->atTarget.x = camera->at.x + rwData->curKeyFrame->atTargetInit.x;
|
||||
rwData->atTarget.y = camera->at.y + rwData->curKeyFrame->atTargetInit.y;
|
||||
rwData->atTarget.z = camera->at.z + rwData->curKeyFrame->atTargetInit.z;
|
||||
}
|
||||
} else if (atInitFlags == 4 || atInitFlags == 0x84) {
|
||||
} else if (atFlags == 4 || atFlags == 0x84) {
|
||||
if (camera->target != NULL && camera->target->update != NULL) {
|
||||
Actor_GetFocus(&targethead, camera->target);
|
||||
Actor_GetFocus(&playerhead, &camera->player->actor);
|
||||
playerhead.pos.x = playerPosRot.pos.x;
|
||||
playerhead.pos.z = playerPosRot.pos.z;
|
||||
OLib_Vec3fDiffToVecGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos);
|
||||
if (atInitFlags & (s16)0x8080) {
|
||||
if (atFlags & (s16)0x8080) {
|
||||
scratchGeo.pitch = CAM_DEG_TO_BINANG(rwData->curKeyFrame->atTargetInit.x);
|
||||
scratchGeo.yaw = CAM_DEG_TO_BINANG(rwData->curKeyFrame->atTargetInit.y);
|
||||
scratchGeo.r = rwData->curKeyFrame->atTargetInit.z;
|
||||
|
@ -5323,9 +5325,9 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->target = NULL;
|
||||
rwData->atTarget = camera->at;
|
||||
}
|
||||
} else if (atInitFlags & 0x6060) {
|
||||
if (!(atInitFlags & 4) || rwData->isNewKeyFrame) {
|
||||
if (atInitFlags & 0x2020) {
|
||||
} else if (atFlags & 0x6060) {
|
||||
if (!(atFlags & 4) || rwData->isNewKeyFrame) {
|
||||
if (atFlags & 0x2020) {
|
||||
focusActor = &camera->player->actor;
|
||||
} else if (camera->target != NULL && camera->target->update != NULL) {
|
||||
focusActor = camera->target;
|
||||
|
@ -5335,15 +5337,15 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
}
|
||||
|
||||
if (focusActor != NULL) {
|
||||
if ((atInitFlags & 0xF) == 1) {
|
||||
if ((atFlags & 0xF) == 1) {
|
||||
Actor_GetFocus(&atFocusPosRot, focusActor);
|
||||
} else if ((atInitFlags & 0xF) == 2) {
|
||||
} else if ((atFlags & 0xF) == 2) {
|
||||
Actor_GetWorld(&atFocusPosRot, focusActor);
|
||||
} else {
|
||||
Actor_GetWorldPosShapeRot(&atFocusPosRot, focusActor);
|
||||
}
|
||||
|
||||
if (atInitFlags & (s16)0x8080) {
|
||||
if (atFlags & (s16)0x8080) {
|
||||
scratchGeo.pitch = CAM_DEG_TO_BINANG(rwData->curKeyFrame->atTargetInit.x);
|
||||
scratchGeo.yaw = CAM_DEG_TO_BINANG(rwData->curKeyFrame->atTargetInit.y);
|
||||
scratchGeo.r = rwData->curKeyFrame->atTargetInit.z;
|
||||
|
@ -5365,36 +5367,35 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
rwData->atTarget = *at;
|
||||
}
|
||||
|
||||
eyeInitFlags = rwData->curKeyFrame->initFlags & 0xFF00;
|
||||
if (eyeInitFlags == 0x100) {
|
||||
eyeFlags = rwData->curKeyFrame->viewFlags & 0xFF00;
|
||||
if (eyeFlags == 0x100) {
|
||||
rwData->eyeTarget = rwData->curKeyFrame->eyeTargetInit;
|
||||
} else if (eyeInitFlags == 0x200) {
|
||||
} else if (eyeFlags == 0x200) {
|
||||
if (rwData->isNewKeyFrame) {
|
||||
rwData->eyeTarget.x = camera->play->view.eye.x + rwData->curKeyFrame->eyeTargetInit.x;
|
||||
rwData->eyeTarget.y = camera->play->view.eye.y + rwData->curKeyFrame->eyeTargetInit.y;
|
||||
rwData->eyeTarget.z = camera->play->view.eye.z + rwData->curKeyFrame->eyeTargetInit.z;
|
||||
}
|
||||
} else if (eyeInitFlags == 0x300) {
|
||||
} else if (eyeFlags == 0x300) {
|
||||
if (rwData->isNewKeyFrame) {
|
||||
rwData->eyeTarget.x = camera->eyeNext.x + rwData->curKeyFrame->eyeTargetInit.x;
|
||||
rwData->eyeTarget.y = camera->eyeNext.y + rwData->curKeyFrame->eyeTargetInit.y;
|
||||
rwData->eyeTarget.z = camera->eyeNext.z + rwData->curKeyFrame->eyeTargetInit.z;
|
||||
}
|
||||
} else if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 ||
|
||||
eyeInitFlags == (s16)0x8500) {
|
||||
} else if (eyeFlags == 0x400 || eyeFlags == (s16)0x8400 || eyeFlags == 0x500 || eyeFlags == (s16)0x8500) {
|
||||
if (camera->target != NULL && camera->target->update != NULL) {
|
||||
Actor_GetFocus(&targethead, camera->target);
|
||||
Actor_GetFocus(&playerhead, &camera->player->actor);
|
||||
playerhead.pos.x = playerPosRot.pos.x;
|
||||
playerhead.pos.z = playerPosRot.pos.z;
|
||||
OLib_Vec3fDiffToVecGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos);
|
||||
if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) {
|
||||
if (eyeFlags == 0x400 || eyeFlags == (s16)0x8400) {
|
||||
eyeLookAtPos = targethead.pos;
|
||||
} else {
|
||||
eyeLookAtPos = rwData->atTarget;
|
||||
}
|
||||
|
||||
if (eyeInitFlags & (s16)0x8080) {
|
||||
if (eyeFlags & (s16)0x8080) {
|
||||
scratchGeo.pitch = CAM_DEG_TO_BINANG(rwData->curKeyFrame->eyeTargetInit.x);
|
||||
scratchGeo.yaw = CAM_DEG_TO_BINANG(rwData->curKeyFrame->eyeTargetInit.y);
|
||||
scratchGeo.r = rwData->curKeyFrame->eyeTargetInit.z;
|
||||
|
@ -5412,9 +5413,9 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->target = NULL;
|
||||
rwData->eyeTarget = *eyeNext;
|
||||
}
|
||||
} else if (eyeInitFlags & 0x6060) {
|
||||
if (!(eyeInitFlags & 0x400) || rwData->isNewKeyFrame) {
|
||||
if (eyeInitFlags & 0x2020) {
|
||||
} else if (eyeFlags & 0x6060) {
|
||||
if (!(eyeFlags & 0x400) || rwData->isNewKeyFrame) {
|
||||
if (eyeFlags & 0x2020) {
|
||||
focusActor = &camera->player->actor;
|
||||
} else if (camera->target != NULL && camera->target->update != NULL) {
|
||||
focusActor = camera->target;
|
||||
|
@ -5424,10 +5425,10 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
}
|
||||
|
||||
if (focusActor != NULL) {
|
||||
if ((eyeInitFlags & 0xF00) == 0x100) {
|
||||
if ((eyeFlags & 0xF00) == 0x100) {
|
||||
// head
|
||||
Actor_GetFocus(&eyeFocusPosRot, focusActor);
|
||||
} else if ((eyeInitFlags & 0xF00) == 0x200) {
|
||||
} else if ((eyeFlags & 0xF00) == 0x200) {
|
||||
// world
|
||||
Actor_GetWorld(&eyeFocusPosRot, focusActor);
|
||||
} else {
|
||||
|
@ -5435,7 +5436,7 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor);
|
||||
}
|
||||
|
||||
if (eyeInitFlags & (s16)0x8080) {
|
||||
if (eyeFlags & (s16)0x8080) {
|
||||
scratchGeo.pitch = CAM_DEG_TO_BINANG(rwData->curKeyFrame->eyeTargetInit.x);
|
||||
scratchGeo.yaw = CAM_DEG_TO_BINANG(rwData->curKeyFrame->eyeTargetInit.y);
|
||||
scratchGeo.r = rwData->curKeyFrame->eyeTargetInit.z;
|
||||
|
@ -5458,10 +5459,10 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
rwData->eyeTarget = *eyeNext;
|
||||
}
|
||||
|
||||
if (rwData->curKeyFrame->initFlags == 2) {
|
||||
if (rwData->curKeyFrame->viewFlags == 2) {
|
||||
rwData->fovTarget = camera->play->view.fovy;
|
||||
rwData->rollTarget = 0;
|
||||
} else if (rwData->curKeyFrame->initFlags == 0) {
|
||||
} else if (rwData->curKeyFrame->viewFlags == 0) {
|
||||
rwData->fovTarget = camera->fov;
|
||||
rwData->rollTarget = camera->roll;
|
||||
} else {
|
||||
|
@ -6805,8 +6806,8 @@ s32 Camera_Special6(Camera* camera) {
|
|||
// Change "screens"
|
||||
camera->player->actor.freezeTimer = 12;
|
||||
// Overwrite hud visibility to CAM_HUD_VISIBILITY_HEARTS_FORCE
|
||||
sCameraInterfaceField =
|
||||
(sCameraInterfaceField & (u16)~CAM_HUD_VISIBILITY_MASK) | CAM_HUD_VISIBILITY_HEARTS_FORCE;
|
||||
sCameraInterfaceField = (sCameraInterfaceField & (u16)~CAM_HUD_VISIBILITY_MASK) |
|
||||
CAM_HUD_VISIBILITY(CAM_HUD_VISIBILITY_HEARTS_FORCE);
|
||||
rwData->initalPlayerY = playerPosRot->pos.y;
|
||||
rwData->animTimer = 12;
|
||||
*eyeNext = bgCamPos;
|
||||
|
@ -6842,7 +6843,8 @@ s32 Camera_Special6(Camera* camera) {
|
|||
} else {
|
||||
// Camera following player on the x axis.
|
||||
// Overwrite hud visibility to CAM_HUD_VISIBILITY_ALL
|
||||
sCameraInterfaceField = (sCameraInterfaceField & (u16)~CAM_HUD_VISIBILITY_MASK) | CAM_HUD_VISIBILITY_ALL;
|
||||
sCameraInterfaceField =
|
||||
(sCameraInterfaceField & (u16)~CAM_HUD_VISIBILITY_MASK) | CAM_HUD_VISIBILITY(CAM_HUD_VISIBILITY_ALL);
|
||||
eyePosCalc = *eyeNext;
|
||||
eyePosCalc.x += (playerPosRot->pos.x - eyePosCalc.x) * 0.5f;
|
||||
eyePosCalc.y += (playerPosRot->pos.y - rwData->initalPlayerY) * 0.2f;
|
||||
|
|
|
@ -2676,12 +2676,12 @@ s32 sDemo5PrevSfxFrame = -200;
|
|||
// target is player, far from eye
|
||||
OnePointCsFull D_8011D6AC[] = {
|
||||
{
|
||||
// initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
|
||||
// initFlags & 0xFF00 (eye): none
|
||||
// viewFlags & 0x00FF (at): 2, atTarget is view lookAt + atInit
|
||||
// viewFlags & 0xFF00 (eye): none
|
||||
// action: 15, copy at, eye, roll, fov to camera
|
||||
// result: eye remains in the same location, at is View's lookAt
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0002,
|
||||
1,
|
||||
0,
|
||||
|
@ -2691,12 +2691,12 @@ OnePointCsFull D_8011D6AC[] = {
|
|||
{ 0.0f, 0.0f, 0.0f },
|
||||
},
|
||||
{
|
||||
// initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit
|
||||
// initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit
|
||||
// viewFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit
|
||||
// viewFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit
|
||||
// action: interpolate eye and at.
|
||||
// result: eye and at's y interpolate to become +20 from their current location.
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0303,
|
||||
19,
|
||||
0,
|
||||
|
@ -2706,11 +2706,11 @@ OnePointCsFull D_8011D6AC[] = {
|
|||
{ 0.0f, 20.0f, 0.0f },
|
||||
},
|
||||
{
|
||||
// initFlags & 0x00FF (at): 0 none
|
||||
// initFlags & 0xFF00 (eye): 0 none
|
||||
// viewFlags & 0x00FF (at): 0 none
|
||||
// viewFlags & 0xFF00 (eye): 0 none
|
||||
// action: 18, copy this camera to default camera.
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2725,7 +2725,7 @@ OnePointCsFull D_8011D6AC[] = {
|
|||
OnePointCsFull D_8011D724[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x2424,
|
||||
1,
|
||||
0,
|
||||
|
@ -2736,7 +2736,7 @@ OnePointCsFull D_8011D724[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x2121,
|
||||
19,
|
||||
0,
|
||||
|
@ -2747,7 +2747,7 @@ OnePointCsFull D_8011D724[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2762,7 +2762,7 @@ OnePointCsFull D_8011D724[] = {
|
|||
OnePointCsFull D_8011D79C[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0002,
|
||||
1,
|
||||
0,
|
||||
|
@ -2773,7 +2773,7 @@ OnePointCsFull D_8011D79C[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0303,
|
||||
19,
|
||||
0,
|
||||
|
@ -2784,7 +2784,7 @@ OnePointCsFull D_8011D79C[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0303,
|
||||
9,
|
||||
0,
|
||||
|
@ -2795,7 +2795,7 @@ OnePointCsFull D_8011D79C[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2810,7 +2810,7 @@ OnePointCsFull D_8011D79C[] = {
|
|||
OnePointCsFull D_8011D83C[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x2141,
|
||||
20,
|
||||
0,
|
||||
|
@ -2821,7 +2821,7 @@ OnePointCsFull D_8011D83C[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2838,7 +2838,7 @@ OnePointCsFull D_8011D83C[] = {
|
|||
OnePointCsFull D_8011D88C[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0303,
|
||||
20,
|
||||
0,
|
||||
|
@ -2849,7 +2849,7 @@ OnePointCsFull D_8011D88C[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2864,7 +2864,7 @@ OnePointCsFull D_8011D88C[] = {
|
|||
OnePointCsFull D_8011D8DC[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0404,
|
||||
20,
|
||||
1,
|
||||
|
@ -2875,7 +2875,7 @@ OnePointCsFull D_8011D8DC[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x2121,
|
||||
5,
|
||||
0,
|
||||
|
@ -2886,7 +2886,7 @@ OnePointCsFull D_8011D8DC[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2901,7 +2901,7 @@ OnePointCsFull D_8011D8DC[] = {
|
|||
OnePointCsFull D_8011D954[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0xC1C1,
|
||||
20,
|
||||
0,
|
||||
|
@ -2912,7 +2912,7 @@ OnePointCsFull D_8011D954[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x05B1,
|
||||
5,
|
||||
0,
|
||||
|
@ -2923,7 +2923,7 @@ OnePointCsFull D_8011D954[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x2121,
|
||||
5,
|
||||
2,
|
||||
|
@ -2934,7 +2934,7 @@ OnePointCsFull D_8011D954[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
@ -2949,7 +2949,7 @@ OnePointCsFull D_8011D954[] = {
|
|||
OnePointCsFull D_8011D9F4[] = {
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0504,
|
||||
20,
|
||||
2,
|
||||
|
@ -2960,7 +2960,7 @@ OnePointCsFull D_8011D9F4[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x2121,
|
||||
5,
|
||||
2,
|
||||
|
@ -2971,7 +2971,7 @@ OnePointCsFull D_8011D9F4[] = {
|
|||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
ONEPOINT_CS_INIT_FIELD_NONE,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue