1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 07:21:19 +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

@ -197,7 +197,7 @@ void EnHonotrap_InitFlame(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->actor.shape.shadowAlpha = 128;
this->targetPos = PLAYER->actor.world.pos;
this->targetPos = GET_PLAYER(globalCtx)->actor.world.pos;
this->targetPos.y += 10.0f;
this->flameScroll = Rand_ZeroOne() * 511.0f;
EnHonotrap_SetupFlame(this);
@ -370,7 +370,7 @@ void EnHonotrap_FlameMove(EnHonotrap* this, GlobalContext* globalCtx) {
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 7.0f, 10.0f, 0.0f, 0x1D);
if (this->collider.tris.base.atFlags & AT_BOUNCED) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
Vec3f shieldNorm;
Vec3f tempVel;
Vec3f shieldVec;
@ -421,7 +421,7 @@ void EnHonotrap_FlameChase(EnHonotrap* this, GlobalContext* globalCtx) {
func_8002D7EC(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 7.0f, 10.0f, 0.0f, 0x1D);
if (this->collider.cyl.base.atFlags & AT_BOUNCED) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
Vec3s shieldRot;
Matrix_MtxFToYXZRotS(&player->shieldMf, &shieldRot, false);
@ -519,7 +519,8 @@ void EnHonotrap_DrawFlame(Actor* thisx, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, this->flameScroll, 0x20, 0x80));
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000) *
(M_PI / 0x8000),
MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 1024),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);