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

@ -247,7 +247,7 @@ void EnTp_Head_SetupApproachPlayer(EnTp* this) {
}
void EnTp_Head_ApproachPlayer(EnTp* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y + 30.0f, 1.0f, 0.5f, 0.0f);
Audio_PlaySoundGeneral(NA_SE_EN_TAIL_FLY - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
@ -382,7 +382,7 @@ void EnTp_Head_SetupTakeOff(EnTp* this) {
*/
void EnTp_Head_TakeOff(EnTp* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
Math_SmoothStepToF(&this->actor.speedXZ, 2.5f, 0.1f, 0.2f, 0.0f);
Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y + 85.0f + this->horizontalVariation, 1.0f,
@ -438,7 +438,7 @@ void EnTp_Head_SetupWait(EnTp* this) {
* Awaken and rise from the ground when Player is closer than 200
*/
void EnTp_Head_Wait(EnTp* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s16 yaw;
this->unk_15C--;
@ -660,7 +660,7 @@ void EnTp_Update(Actor* thisx, GlobalContext* globalCtx) {
Vec3f kiraPos;
Color_RGBA8 kiraPrimColor = { 0, 0, 255, 255 };
Color_RGBA8 kiraEnvColor = { 0, 0, 0, 0 };
Player* player = PLAYER;
Player* player = GET_PLAYER(globalCtx);
s16 yawToWall;
if (player->stateFlags1 & 0x4000000) { // Shielding