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

Macros: PLAYER -> GET_PLAYER(globalCtx), ACTIVE_CAM -> GET_ACTIVE_CAM(globalCtx) (#921)

* PLAYER -> GET_PLAYER(globalCtx)

* ACTIVE_CAM -> GET_ACTIVE_CAM(globalCtx)

* PR Suggestions

* formatter

* Add brackets

* remove from actorfixer.py

* Bring back actorfixer.py change
This commit is contained in:
engineer124 2021-08-31 20:22:03 +10:00 committed by GitHub
parent f8498478c4
commit 1117783731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
281 changed files with 1013 additions and 979 deletions

View file

@ -3463,12 +3463,10 @@ s32 Camera_KeepOn4(Camera* camera) {
KeepOn4_Unk20* unk20 = &keep4->unk_20;
s32 pad;
f32 playerHeight;
Player* player;
Player* player = GET_PLAYER(camera->globalCtx);
s16 angleCnt;
s32 i;
player = (Player*)camera->globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head;
if (camera->animState == 0 || camera->animState == 0xA || camera->animState == 0x14) {
if (camera->globalCtx->view.unk_124 == 0) {
camera->unk_14C |= 0x20;
@ -7528,7 +7526,7 @@ Vec3s Camera_Update(Camera* camera) {
*/
void Camera_Finish(Camera* camera) {
Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM];
Player* player = (Player*)camera->globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head;
Player* player = GET_PLAYER(camera->globalCtx);
if (camera->timer == 0) {
Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, CAM_STAT_ACTIVE);
@ -8098,7 +8096,7 @@ s16 func_8005B1A4(Camera* camera) {
camera->unk_14C |= 0x8;
if ((camera->thisIdx == MAIN_CAM) && (camera->globalCtx->activeCamera != MAIN_CAM)) {
camera->globalCtx->cameraPtrs[camera->globalCtx->activeCamera]->unk_14C |= 0x8;
GET_ACTIVE_CAM(camera->globalCtx)->unk_14C |= 0x8;
return camera->globalCtx->activeCamera;
}