1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Document Camera BgCamData (#1232)

* Document bgCamData

* More changes and cleanup

* More docs

* Clarify comments

* PR Feedback, rename bgcheck functions

* remove fallthrough cleanup (other pr that deals with that)

* PR Suggestions

* bug report

* bgCamDataIndexBeforeUnderwater

* PR/Discord Discussions

* Missed some

* sync function header args

* Another suggestion

* cleanup

* Comments

* Change bgCamData to s16 for now

* PR suggestions

* the

* use "info"

* Missed a suggestion

* Discord Discussion

* Revert bgCamFuncData to Vec3s

* format
This commit is contained in:
engineer124 2022-06-17 11:25:42 -07:00 committed by GitHub
parent 08c8126ba5
commit 849fdbf9ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 384 additions and 330 deletions

View file

@ -416,7 +416,8 @@ void func_80996C60(DoorShutter* this, PlayState* play) {
DoorShutter_SetupAction(this, func_80997004);
this->unk_16C = sp38;
this->unk_170 = 0.0f;
Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34, 10);
Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->dyna.actor, player->doorBgCamIndex, 0.0f, 12, sp34,
10);
}
}

View file

@ -57,7 +57,7 @@ static Vec3f sRupeePositions[] = {
{ 0.0f, 0.0f, -30.0f }, { 55.0f, 0.0f, -30.0f }, { 55.0f, 0.0f, 30.0f }, { 55.0f, 0.0f, 90.0f },
};
static s32 sCamDataIdxs[] = {
static s32 sBgCamIndices[] = {
7, 7, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 4, 4, 5, 6,
};
@ -410,7 +410,7 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) {
if (this->type != 5) {
path = this->path * 2;
if ((sCamDataIdxs[path] == activeCam->camDataIdx) || (sCamDataIdxs[path + 1] == activeCam->camDataIdx)) {
if ((sBgCamIndices[path] == activeCam->bgCamIndex) || (sBgCamIndices[path + 1] == activeCam->bgCamIndex)) {
if (!sPlayerIsCaught) {
if ((this->actionFunc == EnHeishi1_Walk) || (this->actionFunc == EnHeishi1_Wait)) {
Vec3f searchBallVel;

View file

@ -564,7 +564,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
if ((this->actor.colChkInfo.health == 0) && sDeathFlag) {
this->csMode = 0x18;
this->unk_448 = &player->actor;
this->unk_46A = 1;
this->doorBgCamIndex = 1;
sDeathFlag = false;
}
if ((this->invincibilityTimer == 0) && (this->actor.colChkInfo.health != 0) &&

View file

@ -4372,9 +4372,9 @@ s32 func_80839800(Player* this, PlayState* play) {
}
if (doorShutter->dyna.actor.category == ACTORCAT_DOOR) {
this->unk_46A = play->transiActorCtx.list[(u16)doorShutter->dyna.actor.params >> 10]
.sides[(doorDirection > 0) ? 0 : 1]
.effects;
this->doorBgCamIndex = play->transiActorCtx.list[(u16)doorShutter->dyna.actor.params >> 10]
.sides[(doorDirection > 0) ? 0 : 1]
.bgCamIndex;
Actor_DisableLens(play);
}
@ -4446,7 +4446,7 @@ s32 func_80839800(Player* this, PlayState* play) {
Camera_ChangeDoorCam(Play_GetCamera(play, CAM_ID_MAIN), doorActor,
play->transiActorCtx.list[(u16)doorActor->params >> 10]
.sides[(doorDirection > 0) ? 0 : 1]
.effects,
.bgCamIndex,
0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
}
}
@ -4837,7 +4837,7 @@ s32 func_8083AD4C(PlayState* play, Player* this) {
s32 func_8083ADD4(PlayState* play, Player* this) {
if (this->unk_6AD == 3) {
func_80835C58(play, this, func_80852E14, 0);
if (this->unk_46A != 0) {
if (this->doorBgCamIndex != 0) {
this->stateFlags1 |= PLAYER_STATE1_29;
}
func_80832318(this);