mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 22:44:30 +00:00
More Camera Flags (#1453)
* Generic Camera Flags * New flag names * Add flags to functions * Finish flag docs * More docs * More cleanup * More clarity * Better shrinkwindow flag docs * Improve name * CAM_INTERFACE_FLAGS * Better approach to edge cases * Change ordering for consistency * Oops * Add masks to macro * PR/Discord discussions * cleanup comment * Oops * PR Suggestions * More PR Feedback * More PR Suggestions * More Camera Flags * PR Suggestions * More flag style change * Small cleanup * More flag docs * Another flag * Fix flags * sync names with other PRs * more fixes * fix comments * update with hud visibility mode docs * missed one * fix comments * Roman PR Suggestions * interfaceField * small fix * letterbox cleanup * cleanup * fix macro arg * fix func declaration * many more docs * better docs? * missed some * oops, revert * add flags to name * cleanup * flag * double signal * simplify cam func name * more suggestions * PR Suggestion
This commit is contained in:
parent
d1df4e4c7e
commit
81a3c3da32
37 changed files with 531 additions and 461 deletions
|
@ -1039,7 +1039,7 @@ void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
|
|||
|
||||
void func_8002DE74(PlayState* play, Player* player) {
|
||||
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && Play_CamIsNotFixed(play)) {
|
||||
Camera_ChangeSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2985,7 +2985,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
|
|||
|
||||
if ((player != NULL) && (actor == player->unk_664)) {
|
||||
func_8008EDF0(player);
|
||||
Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), 0);
|
||||
Camera_RequestMode(Play_GetCamera(play, Play_GetActiveCamId(play)), CAM_MODE_NORMAL);
|
||||
}
|
||||
|
||||
if (actor == actorCtx->targetCtx.arrowPointedActor) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1530,7 +1530,7 @@ s32 CutsceneCmd_UpdateCamEyeSpline(PlayState* play, CutsceneContext* csCtx, u8*
|
|||
csCtx->camEyeSplinePointsAppliedFrame = cmd->startFrame;
|
||||
|
||||
if (gUseCutsceneCam) {
|
||||
Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_CS_0);
|
||||
Play_RequestCameraSetting(play, csCtx->subCamId, CAM_SET_CS_0);
|
||||
Play_ChangeCameraStatus(play, sReturnToCamId, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Play_GetCamera(play, csCtx->subCamId));
|
||||
|
@ -1569,7 +1569,7 @@ s32 CutsceneCmd_UpdateCamAtSpline(PlayState* play, CutsceneContext* csCtx, u8* s
|
|||
gCamAtSplinePointsAppliedFrame = cmd->startFrame;
|
||||
|
||||
if (gUseCutsceneCam) {
|
||||
Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_CS_0);
|
||||
Play_RequestCameraSetting(play, csCtx->subCamId, CAM_SET_CS_0);
|
||||
Play_ChangeCameraStatus(play, sReturnToCamId, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Play_GetCamera(play, csCtx->subCamId));
|
||||
|
@ -1616,7 +1616,7 @@ s32 CutsceneCmd_SetCamEye(PlayState* play, CutsceneContext* csCtx, u8* script, u
|
|||
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_FREE0);
|
||||
Play_RequestCameraSetting(play, csCtx->subCamId, CAM_SET_FREE0);
|
||||
|
||||
roll = csCtx->camAtPoints->cameraRoll * 1.40625f;
|
||||
Camera_SetViewParam(subCam, CAM_VIEW_ROLL, &roll);
|
||||
|
@ -1664,7 +1664,7 @@ s32 CutsceneCmd_SetCamAt(PlayState* play, CutsceneContext* csCtx, u8* script, u8
|
|||
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE);
|
||||
Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_FREE0);
|
||||
Play_RequestCameraSetting(play, csCtx->subCamId, CAM_SET_FREE0);
|
||||
|
||||
at.x = csCtx->camAtPoints->pos.x;
|
||||
at.y = csCtx->camAtPoints->pos.y;
|
||||
|
@ -2254,7 +2254,7 @@ void CutsceneHandler_StopScript(PlayState* play, CutsceneContext* csCtx) {
|
|||
|
||||
Play_ChangeCameraStatus(play, sReturnToCamId, CAM_STAT_ACTIVE);
|
||||
Play_ClearCamera(play, csCtx->subCamId);
|
||||
func_8005B1A4(play->cameraPtrs[sReturnToCamId]);
|
||||
Camera_SetFinishedFlag(play->cameraPtrs[sReturnToCamId]);
|
||||
}
|
||||
|
||||
Audio_SetCutsceneFlag(0);
|
||||
|
|
|
@ -1703,7 +1703,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
|||
Vec3f windDirection = { 0.0f, 0.0f, 0.0f };
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(play->cameraPtrs[CAM_ID_MAIN]->stateFlags & CAM_STATE_8) &&
|
||||
if (!(play->cameraPtrs[CAM_ID_MAIN]->stateFlags & CAM_STATE_CAMERA_IN_WATER) &&
|
||||
(play->envCtx.precipitation[PRECIP_SNOW_CUR] == 0)) {
|
||||
OPEN_DISPS(gfxCtx, "../z_kankyo.c", 2799);
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spD0.pitch = 0x3E8;
|
||||
|
||||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
subCam->roll = 0;
|
||||
|
@ -344,22 +344,22 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
|
||||
case 1010:
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &childCam->at, &childCam->eye);
|
||||
Play_SetCameraFov(play, subCamId, childCam->fov);
|
||||
Play_SetCameraRoll(play, subCamId, childCam->roll);
|
||||
break;
|
||||
|
||||
case 9601: // Leaving a crawlspace forwards
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_ChangeCameraSetting(play, CAM_ID_MAIN, mainCam->prevSetting);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_RequestCameraSetting(play, CAM_ID_MAIN, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(subCam, sCrawlspaceActionParam | 0x1000, sCrawlspaceTimer,
|
||||
sCrawlspaceAtPoints, sCrawlspaceForwardsEyePoints);
|
||||
break;
|
||||
|
||||
case 9602: // Leaving a crawlspace backwards
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_ChangeCameraSetting(play, CAM_ID_MAIN, mainCam->prevSetting);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_RequestCameraSetting(play, CAM_ID_MAIN, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(subCam, sCrawlspaceActionParam | 0x1000, sCrawlspaceTimer,
|
||||
sCrawlspaceAtPoints, sCrawlspaceBackwardsEyePoints);
|
||||
break;
|
||||
|
@ -378,7 +378,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spB4.x = -1979.0f;
|
||||
spB4.y = 703.0f;
|
||||
spB4.z = -269.0f;
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 6;
|
||||
subCam->fov = 75.0f;
|
||||
|
@ -486,7 +486,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
|
||||
case 3050:
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_5);
|
||||
OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||
|
@ -514,7 +514,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
case 3120:
|
||||
csInfo->keyFrames = D_80121954[-(timer + 101)];
|
||||
subCam->timer = 100;
|
||||
subCam->stateFlags |= CAM_STATE_1;
|
||||
subCam->stateFlags |= CAM_STATE_CHECK_WATER;
|
||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121954[0]);
|
||||
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
|
@ -527,7 +527,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
subCam->stateFlags |= CAM_STATE_1;
|
||||
subCam->stateFlags |= CAM_STATE_CHECK_WATER;
|
||||
break;
|
||||
|
||||
case 3140:
|
||||
|
@ -548,7 +548,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spB4.x = 1729.0f;
|
||||
spB4.y = 995.0f;
|
||||
spB4.z = -1405.0f;
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0x50;
|
||||
subCam->fov = 55.0f;
|
||||
|
@ -564,7 +564,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Actor_GetWorld(&spA0, &player->actor);
|
||||
spD0.yaw = OnePointCutscene_Vec3fYaw(&spC0, &spA0.pos) - 0x7D0;
|
||||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
Play_CopyCamera(play, CAM_ID_MAIN, subCamId);
|
||||
subCam->roll = -1;
|
||||
|
@ -579,7 +579,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spD0.yaw = spA0.rot.y;
|
||||
spD0.r = 150.0f;
|
||||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 55.0f;
|
||||
|
@ -594,7 +594,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spD0.yaw = spA0.rot.y;
|
||||
spD0.pitch = -0xAF0;
|
||||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 60.0f;
|
||||
|
@ -602,8 +602,8 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
|
||||
case 3190:
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
Player_SetCsAction(play, actor, PLAYER_CSACTION_12);
|
||||
break;
|
||||
|
||||
|
@ -614,7 +614,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spB4.x = 80.0f;
|
||||
spB4.y = 445.0f;
|
||||
spB4.z = -1425.0f;
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0x1E;
|
||||
subCam->fov = 75.0f;
|
||||
|
@ -644,7 +644,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
spD0.yaw = spA0.rot.y + 0x7FFF;
|
||||
spD0.r = 300.0f;
|
||||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 45.0f;
|
||||
|
@ -679,7 +679,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
|
||||
case 6001:
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
Actor_GetWorld(&spA0, actor);
|
||||
if (spA0.pos.z > -750.0f) {
|
||||
|
@ -695,7 +695,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
|
||||
case 3400:
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||
OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4);
|
||||
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos);
|
||||
|
@ -718,7 +718,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
|
||||
case 3310:
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE);
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
||||
|
||||
|
@ -884,7 +884,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCount = ARRAY_COUNT(D_801227B4);
|
||||
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
break;
|
||||
|
||||
case 4150:
|
||||
|
@ -892,7 +892,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCount = ARRAY_COUNT(D_801228A4);
|
||||
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
||||
|
@ -901,7 +901,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012296C);
|
||||
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
||||
|
@ -910,7 +910,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122A0C);
|
||||
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
||||
|
@ -919,7 +919,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122A5C);
|
||||
|
||||
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
||||
|
@ -928,7 +928,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122B9C);
|
||||
|
||||
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(mainCam, CAM_MODE_NORMAL);
|
||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
subCam->data2 = 0xC;
|
||||
} else {
|
||||
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1358,7 +1358,7 @@ s32 OnePointCutscene_Attention(PlayState* play, Actor* actor) {
|
|||
parentCam = play->cameraPtrs[CAM_ID_MAIN];
|
||||
if (parentCam->mode == CAM_MODE_FOLLOW_BOOMERANG) {
|
||||
osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: change mode BOOKEEPON -> NORMAL\n" VT_RST);
|
||||
Camera_ChangeMode(parentCam, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(parentCam, CAM_MODE_NORMAL);
|
||||
}
|
||||
|
||||
// Finds the camera of the first actor attention demo with a lower category actor, or the first non-attention demo
|
||||
|
|
|
@ -25,8 +25,8 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn);
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
void Play_ChangeViewpointBgCamIndex(PlayState* this) {
|
||||
Camera_ChangeBgCamIndex(GET_ACTIVE_CAM(this), this->viewpoint - 1);
|
||||
void Play_RequestViewpointBgCam(PlayState* this) {
|
||||
Camera_RequestBgCam(GET_ACTIVE_CAM(this), this->viewpoint - 1);
|
||||
}
|
||||
|
||||
void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
|
||||
|
@ -42,7 +42,7 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
|
|||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
Play_ChangeViewpointBgCamIndex(this);
|
||||
Play_RequestViewpointBgCam(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,8 +255,9 @@ void Play_Init(GameState* thisx) {
|
|||
this->cameraPtrs[CAM_ID_MAIN] = &this->mainCamera;
|
||||
this->cameraPtrs[CAM_ID_MAIN]->uid = 0;
|
||||
this->activeCamId = CAM_ID_MAIN;
|
||||
Camera_OverwriteStateFlags(&this->mainCamera, CAM_STATE_0 | CAM_STATE_1 | CAM_STATE_2 | CAM_STATE_3 | CAM_STATE_4 |
|
||||
CAM_STATE_5 | CAM_STATE_6 | CAM_STATE_7);
|
||||
Camera_OverwriteStateFlags(&this->mainCamera, CAM_STATE_CHECK_BG_ALT | CAM_STATE_CHECK_WATER | CAM_STATE_CHECK_BG |
|
||||
CAM_STATE_EXTERNAL_FINISHED | CAM_STATE_CAM_FUNC_FINISH |
|
||||
CAM_STATE_LOCK_MODE | CAM_STATE_DISTORTION | CAM_STATE_PLAY_INIT);
|
||||
Sram_Init(this, &this->sramCtx);
|
||||
Regs_InitData(this);
|
||||
Message_Init(this);
|
||||
|
@ -412,12 +413,12 @@ void Play_Init(GameState* thisx) {
|
|||
|
||||
player = GET_PLAYER(this);
|
||||
Camera_InitDataUsingPlayer(&this->mainCamera, player);
|
||||
Camera_ChangeMode(&this->mainCamera, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(&this->mainCamera, CAM_MODE_NORMAL);
|
||||
|
||||
playerStartBgCamIndex = player->actor.params & 0xFF;
|
||||
if (playerStartBgCamIndex != 0xFF) {
|
||||
osSyncPrintf("player has start camera ID (" VT_FGCOL(BLUE) "%d" VT_RST ")\n", playerStartBgCamIndex);
|
||||
Camera_ChangeBgCamIndex(&this->mainCamera, playerStartBgCamIndex);
|
||||
Camera_RequestBgCam(&this->mainCamera, playerStartBgCamIndex);
|
||||
}
|
||||
|
||||
if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT) {
|
||||
|
@ -943,7 +944,7 @@ void Play_Update(PlayState* this) {
|
|||
}
|
||||
}
|
||||
|
||||
Play_ChangeViewpointBgCamIndex(this);
|
||||
Play_RequestViewpointBgCam(this);
|
||||
}
|
||||
|
||||
PLAY_LOG(3708);
|
||||
|
@ -1643,11 +1644,11 @@ s32 Play_InitCameraDataUsingPlayer(PlayState* this, s16 camId, Player* player, s
|
|||
|
||||
camera = this->cameraPtrs[camIdx];
|
||||
Camera_InitDataUsingPlayer(camera, player);
|
||||
return Camera_ChangeSetting(camera, setting);
|
||||
return Camera_RequestSetting(camera, setting);
|
||||
}
|
||||
|
||||
s32 Play_ChangeCameraSetting(PlayState* this, s16 camId, s16 setting) {
|
||||
return Camera_ChangeSetting(Play_GetCamera(this, camId), setting);
|
||||
s32 Play_RequestCameraSetting(PlayState* this, s16 camId, s16 setting) {
|
||||
return Camera_RequestSetting(Play_GetCamera(this, camId), setting);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -626,7 +626,7 @@ void func_8008EEAC(PlayState* play, Actor* actor) {
|
|||
this->unk_684 = actor;
|
||||
this->stateFlags1 |= PLAYER_STATE1_16;
|
||||
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, actor);
|
||||
Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_Z_TARGET_FRIENDLY);
|
||||
Camera_RequestMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_Z_TARGET_FRIENDLY);
|
||||
}
|
||||
|
||||
s32 func_8008EF30(PlayState* play) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue