1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-09 00:00:44 +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

@ -77,7 +77,7 @@ void EnXc_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnXc_CalculateHeadTurn(EnXc* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
this->npcInfo.unk_18 = player->actor.world.pos;
this->npcInfo.unk_14 = kREG(16) - 3.0f;
@ -284,7 +284,7 @@ void func_80B3CA38(EnXc* this, GlobalContext* globalCtx) {
s32 EnXc_MinuetCS(EnXc* this, GlobalContext* globalCtx) {
if (this->actor.params == SHEIK_TYPE_MINUET) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
f32 z = player->actor.world.pos.z;
if (z < -2225.0f) {
if (!Gameplay_InCsMode(globalCtx)) {
@ -314,7 +314,7 @@ s32 EnXc_BoleroCS(EnXc* this, GlobalContext* globalCtx) {
PosRot* posRot;
if (this->actor.params == SHEIK_TYPE_BOLERO) {
player = PLAYER;
player = GET_PLAYER(globalCtx);
posRot = &player->actor.world;
if ((posRot->pos.x > -784.0f) && (posRot->pos.x < -584.0f) && (posRot->pos.y > 447.0f) &&
(posRot->pos.y < 647.0f) && (posRot->pos.z > -446.0f) && (posRot->pos.z < -246.0f) &&
@ -343,7 +343,7 @@ void EnXc_SetupSerenadeAction(EnXc* this, GlobalContext* globalCtx) {
s32 EnXc_SerenadeCS(EnXc* this, GlobalContext* globalCtx) {
if (this->actor.params == SHEIK_TYPE_SERENADE) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s32 stateFlags = player->stateFlags1;
if (CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !(gSaveContext.eventChkInf[5] & 4) && !(stateFlags & 0x20000000) &&
!Gameplay_InCsMode(globalCtx)) {
@ -549,7 +549,7 @@ void func_80B3D48C(EnXc* this, GlobalContext* globalCtx) {
if (linkAction != NULL) {
yaw = linkAction->urot.y + 0x8000;
} else {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
yaw = player->actor.world.rot.y + 0x8000;
}