1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-16 21:05:12 +00:00

Document Camera Settings (#994)

* Document Settings

* Clean Up z64Camera.h

* Add comment
This commit is contained in:
engineer124 2021-11-02 02:10:03 +11:00 committed by GitHub
parent dcb8357f72
commit 7e09accf0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 795 additions and 793 deletions

View file

@ -207,8 +207,8 @@ void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) {
BgHidanCurtainParams* hcParams = &sHCParams[this->size];
f32 riseProgress;
if ((globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_ITEM0) ||
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_ITEM2)) {
if ((globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_SLOW_CHEST_CS) ||
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TURN_AROUND)) {
this->collider.base.atFlags &= ~AT_HIT;
} else {
if (this->collider.base.atFlags & AT_HIT) {

View file

@ -131,7 +131,7 @@ void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_16A == 0) {
this->unk_16A = 3;
}
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_16A != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);

View file

@ -266,7 +266,7 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
if (this->unk_169 == 0) {
this->unk_169 = 3;
}
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_169 != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
@ -319,7 +319,7 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx) {
if (this->unk_169 == 0) {
this->unk_169 = 3;
}
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_169 != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);

View file

@ -114,7 +114,7 @@ void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_168 == 0) {
this->unk_168 = 3;
}
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_168 != 0) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);

View file

@ -191,7 +191,7 @@ 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_HIDAN1);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM);
} else if (!tempIsRiding && this->isLinkRiding) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}

View file

@ -138,9 +138,9 @@ 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_TEPPEN);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DIRECTED_YAW);
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) &&
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TEPPEN)) {
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_DIRECTED_YAW)) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
this->unk_16B = this->dyna.unk_160;

View file

@ -189,7 +189,7 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
this->actionFunc = func_808A3E54;
mainCamChildIdx = globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx;
if ((mainCamChildIdx != SUBCAM_FREE) && (globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_DEMO1)) {
if ((mainCamChildIdx != SUBCAM_FREE) && (globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_CS_TWISTED_HALLWAY)) {
OnePointCutscene_EndCutscene(globalCtx, mainCamChildIdx);
}
OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, MAIN_CAM);

View file

@ -210,7 +210,7 @@ void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) {
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_MORI1);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_FOREST_BIRDS_EYE);
}
} else if (sCamSetting != CAM_SET_NONE) {
osSyncPrintf("camera changed (previous) ... \n");

View file

@ -63,7 +63,7 @@ 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_SHADES);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BOSS_BONGO);
} else {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}

View file

@ -779,7 +779,7 @@ 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_TAKO);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BIG_OCTO);
func_8005AD1C(globalCtx->cameraPtrs[MAIN_CAM], 4);
if (this->cylinder[0].base.atFlags & AT_ON) {

View file

@ -54,7 +54,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
EnBomChu* chu;
Vec3f chuPosDiff;
if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_FIXED1) {
if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_CHU_BOWLING) {
chu = (EnBomChu*)globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
while (chu != NULL) {

View file

@ -429,12 +429,12 @@ s32 EnGo_IsCameraModified(EnGo* this, GlobalContext* globalCtx) {
xyzDist = (this->actor.scale.x / 0.01f) * 10000.0f;
if ((this->actor.params & 0xF0) == 0x90) {
Camera_ChangeSetting(camera, CAM_SET_TEPPEN);
Camera_ChangeSetting(camera, CAM_SET_DIRECTED_YAW);
xyzDist *= 4.8f;
}
if (fabsf(this->actor.xyzDistToPlayerSq) > xyzDist) {
if (camera->setting == CAM_SET_TEPPEN) {
if (camera->setting == CAM_SET_DIRECTED_YAW) {
Camera_ChangeSetting(camera, CAM_SET_NORMAL0);
}
return 0;

View file

@ -1127,9 +1127,9 @@ s32 EnGo2_IsCameraModified(EnGo2* this, GlobalContext* globalCtx) {
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
if (EnGo2_IsWakingUp(this)) {
Camera_ChangeSetting(camera, CAM_SET_TEPPEN);
Camera_ChangeSetting(camera, CAM_SET_DIRECTED_YAW);
func_8005AD1C(camera, 4);
} else if (!EnGo2_IsWakingUp(this) && (camera->setting == CAM_SET_TEPPEN)) {
} else if (!EnGo2_IsWakingUp(this) && (camera->setting == CAM_SET_DIRECTED_YAW)) {
Camera_ChangeSetting(camera, CAM_SET_DUNGEON1);
func_8005ACFC(camera, 4);
}

View file

@ -73,7 +73,7 @@ void EnWallTubo_DetectChu(EnWallTubo* this, GlobalContext* globalCtx) {
s16 quakeIndex;
if (this->chuGirl->minigamePlayStatus != 0) {
if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_FIXED1) {
if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_CHU_BOWLING) {
chu = (EnBomChu*)globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
while (chu != NULL) {

View file

@ -194,7 +194,7 @@ void EnZl4_SetCsCameraMove(GlobalContext* globalCtx, s16 index) {
Camera* activeCam = GET_ACTIVE_CAM(globalCtx);
Player* player = GET_PLAYER(globalCtx);
Camera_ChangeSetting(activeCam, CAM_SET_DEMO0);
Camera_ChangeSetting(activeCam, CAM_SET_CS_0);
Camera_ResetAnim(activeCam);
Camera_SetCSParams(activeCam, sCsCameraMove[index].atPoints, sCsCameraMove[index].eyePoints, player,
sCsCameraMove[index].relativeToPlayer);

View file

@ -756,9 +756,9 @@ void ObjBean_WaitForPlayer(ObjBean* this, GlobalContext* globalCtx) {
if (func_8004356C(&this->dyna)) { // Player is standing on
ObjBean_SetupFly(this);
if (globalCtx->sceneNum == SCENE_SPOT10) { // Lost woods
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_LIFTBEAN);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BEAN_LOST_WOODS);
} else {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_UFOBEAN);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BEAN_GENERIC);
}
}
ObjBean_UpdatePosition(this);
@ -783,7 +783,7 @@ void ObjBean_Fly(ObjBean* this, GlobalContext* globalCtx) {
this->dyna.actor.flags &= ~0x10; // Never stop updating (disable)
camera = globalCtx->cameraPtrs[MAIN_CAM];
if ((camera->setting == CAM_SET_LIFTBEAN) || (camera->setting == CAM_SET_UFOBEAN)) {
if ((camera->setting == CAM_SET_BEAN_LOST_WOODS) || (camera->setting == CAM_SET_BEAN_GENERIC)) {
Camera_ChangeSetting(camera, CAM_SET_NORMAL0);
}
@ -792,14 +792,14 @@ void ObjBean_Fly(ObjBean* this, GlobalContext* globalCtx) {
func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG);
if (globalCtx->sceneNum == SCENE_SPOT10) {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_LIFTBEAN);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BEAN_LOST_WOODS);
} else {
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_UFOBEAN);
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_BEAN_GENERIC);
}
} else if (this->stateFlags & BEAN_STATE_PLAYER_ON_TOP) {
camera = globalCtx->cameraPtrs[MAIN_CAM];
if ((camera->setting == CAM_SET_LIFTBEAN) || (camera->setting == CAM_SET_UFOBEAN)) {
if ((camera->setting == CAM_SET_BEAN_LOST_WOODS) || (camera->setting == CAM_SET_BEAN_GENERIC)) {
Camera_ChangeSetting(camera, CAM_SET_NORMAL0);
}
}

View file

@ -2667,7 +2667,7 @@ void func_80835DE4(GlobalContext* globalCtx, Player* this, PlayerFunc674 func, s
void func_80835E44(GlobalContext* globalCtx, s16 camSetting) {
if (!func_800C0CB8(globalCtx)) {
if (camSetting == CAM_SET_SCENE1) {
if (camSetting == CAM_SET_SCENE_TRANSITION) {
Interface_ChangeAlpha(2);
}
} else {
@ -2676,7 +2676,7 @@ void func_80835E44(GlobalContext* globalCtx, s16 camSetting) {
}
void func_80835EA4(GlobalContext* globalCtx, s32 arg1) {
func_80835E44(globalCtx, CAM_SET_ITEM2);
func_80835E44(globalCtx, CAM_SET_TURN_AROUND);
Camera_SetCameraData(Gameplay_GetCamera(globalCtx, 0), 4, 0, 0, arg1, 0, 0);
}
@ -5944,7 +5944,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
func_808322D0(globalCtx, this, this->ageProperties->unk_98);
func_80832F54(globalCtx, this, 0x28F);
chest->unk_1F4 = 1;
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_ITEM0);
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_SLOW_CHEST_CS);
} else {
func_80832264(globalCtx, this, &gPlayerAnim_002DF8);
chest->unk_1F4 = -1;
@ -9639,7 +9639,7 @@ void func_808486A8(GlobalContext* globalCtx, Player* this) {
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), CAM_MODE_NORMAL);
} else if (!(this->stateFlags1 & 0x100000)) {
if ((this->actor.parent != NULL) && (this->stateFlags3 & 0x80)) {
camMode = CAM_MODE_FOOKSHOT;
camMode = CAM_MODE_HOOKSHOT;
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, this->actor.parent);
} else if (func_8084377C == this->func_674) {
camMode = CAM_MODE_STILL;
@ -9650,7 +9650,7 @@ void func_808486A8(GlobalContext* globalCtx, Player* this) {
camMode = CAM_MODE_TALK;
} else if (this->stateFlags1 & 0x10000) {
if (this->stateFlags1 & 0x2000000) {
camMode = CAM_MODE_BOOMFOLLLOW;
camMode = CAM_MODE_FOLLOWBOOMERANG;
} else {
camMode = CAM_MODE_FOLLOWTARGET;
}
@ -9661,7 +9661,7 @@ void func_808486A8(GlobalContext* globalCtx, Player* this) {
} else if (this->stateFlags1 & 0x1000) {
camMode = CAM_MODE_CHARGE;
} else if (this->stateFlags1 & 0x2000000) {
camMode = CAM_MODE_BOOMFOLLLOW;
camMode = CAM_MODE_FOLLOWBOOMERANG;
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, this->boomerangActor);
} else if (this->stateFlags1 & 0x6000) {
if (func_80833B2C(this)) {