1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +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

@ -329,7 +329,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628);
camera = ACTIVE_CAM;
camera = GET_ACTIVE_CAM(globalCtx);
sp9C = (camera->setting == CAM_SET_PREREND0);
polygon1 = &room->mesh->polygon1;
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
@ -384,7 +384,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
BgImage* bgImage;
s32 i;
camera = ACTIVE_CAM;
camera = GET_ACTIVE_CAM(globalCtx);
camId = camera->camDataIdx;
// jfifid
camId2 = func_80041C10(&globalCtx->colCtx, camId, BGCHECK_SCENE)[2].y;
@ -392,7 +392,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
camId = camId2;
}
player = PLAYER;
player = GET_PLAYER(globalCtx);
player->actor.params = (player->actor.params & 0xFF00) | camId;
bgImage = SEGMENTED_TO_VIRTUAL(polygon1->multi.list);
@ -424,7 +424,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752);
camera = ACTIVE_CAM;
camera = GET_ACTIVE_CAM(globalCtx);
sp98 = (camera->setting == CAM_SET_PREREND0);
polygon1 = &room->mesh->polygon1;
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
@ -589,7 +589,7 @@ s32 func_800973FC(GlobalContext* globalCtx, RoomContext* roomCtx) {
gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->unk_34);
Scene_ExecuteCommands(globalCtx, roomCtx->curRoom.segment);
Player_SetBootData(globalCtx, PLAYER);
Player_SetBootData(globalCtx, GET_PLAYER(globalCtx));
Actor_SpawnTransitionActors(globalCtx, &globalCtx->actorCtx);
return 1;