1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 14:01:15 +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

@ -308,7 +308,7 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
Vec3f sp44 = D_80AE4918;
Color_RGBA8 sp40 = D_80AE4924;
Color_RGBA8 sp3C = D_80AE4928;
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s32 pad;
s16 sp32 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->unk_30E - this->unk_310;
@ -329,7 +329,7 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
if (!(this->unk_312 & 0x80)) {
player->actor.freezeTimer = 40;
func_8008EEAC(globalCtx, &this->actor);
PLAYER->unk_684 = &this->actor;
GET_PLAYER(globalCtx)->unk_684 = &this->actor;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
}
this->unk_306 = 0x3C;
@ -374,7 +374,7 @@ void func_80AE2F50(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2FD0(EnRd* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s32 pad;
s16 targetY = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
@ -472,7 +472,7 @@ void func_80AE33F0(EnRd* this) {
void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
if (SkelAnime_Update(&this->skelAnime)) {
this->unk_304++;
@ -551,7 +551,7 @@ void func_80AE3834(EnRd* this, GlobalContext* globalCtx) {
Vec3f sp34 = D_80AE492C;
Color_RGBA8 sp30 = D_80AE4938;
Color_RGBA8 sp2C = D_80AE493C;
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s16 temp_v0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->unk_30E - this->unk_310;
if (ABS(temp_v0) < 0x2008) {
@ -608,7 +608,7 @@ void func_80AE3A8C(EnRd* this) {
}
void func_80AE3B18(EnRd* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
if (this->actor.speedXZ < 0.0f) {
this->actor.speedXZ += 0.15f;
@ -738,7 +738,7 @@ void func_80AE3F9C(EnRd* this, GlobalContext* globalCtx) {
void func_80AE4114(EnRd* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
if ((gSaveContext.unk_1422 != 0) && (this->actor.shape.rot.x == 0) && (this->unk_318 == 0) &&
(this->unk_31B != 9) && (this->unk_31B != 10) && (this->unk_31B != 1)) {
@ -789,7 +789,7 @@ void func_80AE4114(EnRd* this, GlobalContext* globalCtx) {
void EnRd_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnRd* this = THIS;
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s32 pad2;
func_80AE4114(this, globalCtx);