1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 22:11:16 +00:00

Document Viewpoints and Scene Cam Types (#1285)

* 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

* Indoor BgCamData

* Change bgCamData to s16 for now

* PR suggestions

* the

* use "info"

* Missed a suggestion

* Update and sync docs

* More docs

* Even more docs

* Revert macro

* Add comment

* Better comments

* More cleanup

* Better Cam Scene Docs

* Small change

* Market -> Pivot

* "only"

* swap

* Better comment

* Another comment

* to

* Implement suggestions from discord

* Discord Discussion

* Revert bgCamFuncData to Vec3s

* cleanup

* Remaining cleanup

* docs cleanup

* format

* More docs

* Improve notes

* Cleanup

* Change enum

* PR Suggestions

* Improve comment

* Rephrase

* Implement discussion from discord

* Discord discussion

* fixed to locked

* Update comments

* Few more comments

* Update include/z64.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Update include/z64camera.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Better comments

* PR Suggestions

* rm numbers

* Update src/code/z_play.c

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
engineer124 2022-06-20 20:31:53 -04:00 committed by GitHub
parent 6d52684020
commit d88a23f4a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 105 additions and 60 deletions

View file

@ -1083,7 +1083,13 @@ void func_80A0461C(EnElf* this, PlayState* play) {
} else {
arrowPointedActor = play->actorCtx.targetCtx.arrowPointedActor;
if ((player->stateFlags1 & PLAYER_STATE1_10) || ((YREG(15) & 0x10) && func_800BC56C(play, 2))) {
// `R_SCENE_CAM_TYPE` is not a bit field, but this conditional checks for a specific bit.
// This `& 0x10` check will pass for either `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT`, `SCENE_CAM_TYPE_FIXED`, or
// `SCENE_CAM_TYPE_SHOOTING_GALLERY`.
// However, of these three, only `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT` is used with `VIEWPOINT_PIVOT`,
// so here the bit check is equivalent to checking for `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT`.
if ((player->stateFlags1 & PLAYER_STATE1_10) ||
((R_SCENE_CAM_TYPE & 0x10) && Play_CheckViewpoint(play, VIEWPOINT_PIVOT))) {
temp = 12;
this->unk_2C0 = 100;
} else if (arrowPointedActor == NULL || arrowPointedActor->category == ACTORCAT_NPC) {