diff --git a/docs/STYLE.md b/docs/STYLE.md index 10db9c8e1e..ae274dc467 100644 --- a/docs/STYLE.md +++ b/docs/STYLE.md @@ -150,19 +150,19 @@ All compound flag lists (e.g. `ACTOR_FLAG_HOSTILE | ACTOR_FLAG_FRIENDLY`) should ## Play2 -In some particular instances, IDO requires the function argument `play` to be cast to a second variable of the same type to match. In these particular instances, the function argument should be renamed to `play2` and than this `play2` just assigned to a stack variable called `play`. This cast should occur before the actor `THIS` cast is made. For example in `z_en_firefly.c` +In some particular instances, IDO requires the function argument `play` to be cast to a second variable of the same type to match. In these particular instances, the function argument should be renamed to `play2` and than this `play2` just assigned to a stack variable called `play`. This cast should occur before the actor recast is made. For example in `z_en_firefly.c` ```c void EnFirefly_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; ``` -In other places the cast is actually not explictly needed, but a stack `pad` variable is still needed. For this there should just be a stack variable called `pad` of type `s32` before the actor `THIS` cast. For example in `z_bg_goron_oyu` +In other places the cast is actually not explictly needed, but a stack `pad` variable is still needed. For this there should just be a stack variable called `pad` of type `s32` before the actor recast. For example in `z_bg_goron_oyu` ```c void BgGoronOyu_Init(Actor* thisx, PlayState* play) { s32 pad; - BgGoronOyu* this = THIS; + BgGoronOyu* this = (BgGoronOyu*)thisx; CollisionHeader* colHeader = NULL; ``` diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index 54244f33cc..92b1d4b67f 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -3,8 +3,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnAObj*)thisx) - void EnAObj_Init(Actor* thisx, PlayState* play); void EnAObj_Destroy(Actor* thisx, PlayState* play); void EnAObj_Update(Actor* thisx, PlayState* play); @@ -50,7 +48,7 @@ static InitChainEntry sInitChain[] = { }; void EnAObj_Init(Actor* thisx, PlayState* play) { - EnAObj* this = THIS; + EnAObj* this = (EnAObj*)thisx; this->actor.textId = AOBJ_GET_TEXTID(&this->actor); this->actor.params = AOBJ_GET_TYPE(&this->actor); @@ -63,7 +61,7 @@ void EnAObj_Init(Actor* thisx, PlayState* play) { } void EnAObj_Destroy(Actor* thisx, PlayState* play) { - EnAObj* this = THIS; + EnAObj* this = (EnAObj*)thisx; Collider_DestroyCylinder(play, &this->collision); } @@ -89,7 +87,7 @@ void EnAObj_Talk(EnAObj* this, PlayState* play) { } void EnAObj_Update(Actor* thisx, PlayState* play) { - EnAObj* this = THIS; + EnAObj* this = (EnAObj*)thisx; this->actionFunc(this, play); Actor_SetFocus(&this->actor, 45.0f); diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 0be9a94a1c..e7058ba3b5 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnItem00*)thisx) - void EnItem00_Init(Actor* thisx, PlayState* play); void EnItem00_Destroy(Actor* thisx, PlayState* play); void EnItem00_Update(Actor* thisx, PlayState* play); @@ -74,7 +72,7 @@ void EnItem00_SetObject(EnItem00* this, PlayState* play, f32* shadowOffset, f32* } void EnItem00_Init(Actor* thisx, PlayState* play) { - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; s32 pad; f32 shadowOffset = 980.0f; f32 shadowScale = 6.0f; @@ -312,7 +310,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { } void EnItem00_Destroy(Actor* thisx, PlayState* play) { - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -489,7 +487,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) { } void EnItem00_Update(Actor* thisx, PlayState* play) { - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; s32 pad; Player* player = GET_PLAYER(play); s32 sp38 = player->stateFlags3 & PLAYER_STATE3_1000; @@ -703,7 +701,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { void EnItem00_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; if (!(this->unk14E & this->unk150)) { switch (this->actor.params) { diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c index 7f27355e3a..e1526784e7 100644 --- a/src/code/z_fbdemo_fade.c +++ b/src/code/z_fbdemo_fade.c @@ -6,8 +6,6 @@ #include "z64math.h" #include "z64save.h" -#define THIS ((TransitionFade*)thisx) - typedef enum TransitionFadeDirection { /* 0 */ TRANS_FADE_DIR_IN, /* 1 */ TRANS_FADE_DIR_OUT @@ -37,7 +35,7 @@ TransitionProfile TransitionFade_Profile = { }; void TransitionFade_Start(void* thisx) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; switch (this->type) { case TRANS_FADE_TYPE_NONE: @@ -59,7 +57,7 @@ void TransitionFade_Start(void* thisx) { } void* TransitionFade_Init(void* thisx) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; bzero(this, sizeof(TransitionFade)); return this; @@ -71,7 +69,7 @@ void TransitionFade_Destroy(void* thisx) { void TransitionFade_Update(void* thisx, s32 updateRate) { s32 alpha; s16 newAlpha; - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; switch (this->type) { case TRANS_FADE_TYPE_NONE: @@ -79,7 +77,7 @@ void TransitionFade_Update(void* thisx, s32 updateRate) { case TRANS_FADE_TYPE_ONE_WAY: //! FAKE: - THIS->timer += updateRate; + ((TransitionFade*)thisx)->timer += updateRate; if (this->timer >= ((void)0, gSaveContext.transFadeDuration)) { this->timer = ((void)0, gSaveContext.transFadeDuration); @@ -114,7 +112,7 @@ void TransitionFade_Update(void* thisx, s32 updateRate) { } void TransitionFade_Draw(void* thisx, Gfx** gfxP) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; Gfx* gfx; Color_RGBA8_u32* color = &this->color; @@ -128,19 +126,19 @@ void TransitionFade_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionFade_IsDone(void* thisx) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; return this->isDone; } void TransitionFade_SetColor(void* thisx, u32 color) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; this->color.rgba = color; } void TransitionFade_SetType(void* thisx, s32 type) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; if (type == TRANS_INSTANCE_TYPE_FILL_OUT) { this->type = TRANS_FADE_TYPE_ONE_WAY; diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 164ab7e168..cfc272e92c 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ArmsHook*)thisx) - void ArmsHook_Init(Actor* thisx, PlayState* play); void ArmsHook_Destroy(Actor* thisx, PlayState* play); void ArmsHook_Update(Actor* thisx, PlayState* play); @@ -57,7 +55,7 @@ void ArmsHook_SetupAction(ArmsHook* this, ArmsHookActionFunc actionFunc) { } void ArmsHook_Init(Actor* thisx, PlayState* play) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; Collider_InitQuad(play, &this->collider); Collider_SetQuad(play, &this->collider, &this->actor, &D_808C1BC0); @@ -66,7 +64,7 @@ void ArmsHook_Init(Actor* thisx, PlayState* play) { } void ArmsHook_Destroy(Actor* thisx, PlayState* play) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; if (this->attachedActor != NULL) { this->attachedActor->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; @@ -294,7 +292,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { } void ArmsHook_Update(Actor* thisx, PlayState* play) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; this->actionFunc(this, play); this->unk1EC = this->unk1E0; @@ -308,7 +306,7 @@ Vec3f D_808C1C40 = { 0.0f, 500.0f, 0.0f }; Vec3f D_808C1C4C = { 0.0f, -500.0f, 0.0f }; void ArmsHook_Draw(Actor* thisx, PlayState* play) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; f32 f0; Player* player = GET_PLAYER(play); diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index b16dab8710..9510b192ba 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ArrowFire*)thisx) - void ArrowFire_Init(Actor* thisx, PlayState* play); void ArrowFire_Destroy(Actor* thisx, PlayState* play); void ArrowFire_Update(Actor* thisx, PlayState* play); @@ -64,7 +62,7 @@ void ArrowFire_SetupAction(ArrowFire* this, ArrowFireActionFunc actionFunc) { } void ArrowFire_Init(Actor* thisx, PlayState* play) { - ArrowFire* this = THIS; + ArrowFire* this = (ArrowFire*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->radius = 0; @@ -79,7 +77,7 @@ void ArrowFire_Init(Actor* thisx, PlayState* play) { } void ArrowFire_Destroy(Actor* thisx, PlayState* play) { - ArrowFire* this = THIS; + ArrowFire* this = (ArrowFire*)thisx; Magic_Reset(play); Collider_DestroyQuad(play, &this->collider1); @@ -239,7 +237,7 @@ void FireArrow_SetQuadVerticies(ArrowFire* this) { void ArrowFire_Draw(Actor* thisx, PlayState* play) { EnArrow* arrow; - ArrowFire* this = THIS; + ArrowFire* this = (ArrowFire*)thisx; u32 frames = play->state.frames; s32 pad; diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 2fffdcb6c8..8a85dfca0b 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ArrowIce*)thisx) - void ArrowIce_Init(Actor* thisx, PlayState* play); void ArrowIce_Destroy(Actor* thisx, PlayState* play); void ArrowIce_Update(Actor* thisx, PlayState* play); @@ -44,7 +42,7 @@ void ArrowIce_SetupAction(ArrowIce* this, ArrowIceActionFunc actionFunc) { } void ArrowIce_Init(Actor* thisx, PlayState* play) { - ArrowIce* this = THIS; + ArrowIce* this = (ArrowIce*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->radius = 0; @@ -174,7 +172,7 @@ void ArrowIce_Fly(ArrowIce* this, PlayState* play) { } void ArrowIce_Update(Actor* thisx, PlayState* play) { - ArrowIce* this = THIS; + ArrowIce* this = (ArrowIce*)thisx; if ((play->msgCtx.msgMode == MSGMODE_E) || (play->msgCtx.msgMode == MSGMODE_SONG_PLAYED)) { Actor_Kill(&this->actor); @@ -186,7 +184,7 @@ void ArrowIce_Update(Actor* thisx, PlayState* play) { void ArrowIce_Draw(Actor* thisx, PlayState* play) { s32 pad; - ArrowIce* this = THIS; + ArrowIce* this = (ArrowIce*)thisx; Actor* transform; u32 stateFrames = play->state.frames; EnArrow* arrow = (EnArrow*)this->actor.parent; diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 695a5fbec7..4302f9f63e 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ArrowLight*)thisx) - void ArrowLight_Init(Actor* thisx, PlayState* play); void ArrowLight_Destroy(Actor* thisx, PlayState* play); void ArrowLight_Update(Actor* thisx, PlayState* play); @@ -170,7 +168,7 @@ void ArrowLight_Fly(ArrowLight* this, PlayState* play) { } void ArrowLight_Update(Actor* thisx, PlayState* play) { - ArrowLight* this = THIS; + ArrowLight* this = (ArrowLight*)thisx; if ((play->msgCtx.msgMode == MSGMODE_E) || (play->msgCtx.msgMode == MSGMODE_SONG_PLAYED)) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c b/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c index a34924d836..534421e617 100644 --- a/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgAstrBombwall*)thisx) - void BgAstrBombwall_Init(Actor* thisx, PlayState* play); void BgAstrBombwall_Destroy(Actor* thisx, PlayState* play); void BgAstrBombwall_Update(Actor* thisx, PlayState* play); @@ -99,7 +97,7 @@ void BgAstrBombwall_InitCollider(ColliderTrisInit* init, Vec3f* pos, Vec3s* rot, void BgAstrBombwall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgAstrBombwall* this = THIS; + BgAstrBombwall* this = (BgAstrBombwall*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -120,7 +118,7 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) { } void BgAstrBombwall_Destroy(Actor* thisx, PlayState* play) { - BgAstrBombwall* this = THIS; + BgAstrBombwall* this = (BgAstrBombwall*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -194,7 +192,7 @@ void func_80C0A4BC(BgAstrBombwall* this, PlayState* play) { } void BgAstrBombwall_Update(Actor* thisx, PlayState* play) { - BgAstrBombwall* this = THIS; + BgAstrBombwall* this = (BgAstrBombwall*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.c b/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.c index e68157e129..3d695d383b 100644 --- a/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.c +++ b/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgBotihasira*)thisx) - void BgBotihasira_Init(Actor* thisx, PlayState* play); void BgBotihasira_Destroy(Actor* thisx, PlayState* play); void BgBotihasira_Update(Actor* thisx, PlayState* play2); @@ -52,7 +50,7 @@ static ColliderCylinderInit sCylinderInit = { void BgBotihasira_Init(Actor* thisx, PlayState* play) { s32 pad; - BgBotihasira* this = THIS; + BgBotihasira* this = (BgBotihasira*)thisx; CollisionHeader* colHeader = NULL; if (this->dyna.actor.params == 0) { @@ -67,7 +65,7 @@ void BgBotihasira_Init(Actor* thisx, PlayState* play) { } void BgBotihasira_Destroy(Actor* thisx, PlayState* play) { - BgBotihasira* this = THIS; + BgBotihasira* this = (BgBotihasira*)thisx; if (this->dyna.actor.params == 0) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -79,7 +77,7 @@ void BgBotihasira_DoNothing(BgBotihasira* this, PlayState* play) { void BgBotihasira_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgBotihasira* this = THIS; + BgBotihasira* this = (BgBotihasira*)thisx; this->actionFunc(this, play); if (this->dyna.actor.params != 0) { diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 2b5114d382..96bb0f2b38 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -17,8 +17,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgBreakwall*)thisx) - void BgBreakwall_Init(Actor* thisx, PlayState* play); void BgBreakwall_Update(Actor* thisx, PlayState* play); @@ -214,7 +212,7 @@ bool func_808B751C(BgBreakwall* this, PlayState* play) { void BgBreakwall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; BgBreakwallStruct* sp24 = &D_808B8140[BGBREAKWALL_GET_F(&this->dyna.actor)]; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -230,7 +228,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) { } void BgBreakwall_Destroy(Actor* thisx, PlayState* play) { - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; BgBreakwallStruct* temp_s1 = &D_808B8140[BGBREAKWALL_GET_F(&this->dyna.actor)]; if (temp_s1->unk_10 != NULL) { @@ -333,7 +331,7 @@ void func_808B7A10(BgBreakwall* this, PlayState* play) { } void BgBreakwall_Update(Actor* thisx, PlayState* play) { - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; this->actionFunc(this, play); } @@ -382,7 +380,7 @@ void func_808B7B54(Actor* thisx, PlayState* play) { } void func_808B7D34(Actor* thisx, PlayState* play) { - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; s32 sp48; s32 tempA; s32 tempB; @@ -414,7 +412,7 @@ void func_808B7D34(Actor* thisx, PlayState* play) { void BgBreakwall_Draw(Actor* thisx, PlayState* play) { s32 pad; - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; BgBreakwallStruct* temp_s2 = &D_808B8140[BGBREAKWALL_GET_F(&this->dyna.actor)]; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c b/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c index bf8b121e02..406372a701 100644 --- a/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c +++ b/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgCraceMovebg*)thisx) - void BgCraceMovebg_Init(Actor* thisx, PlayState* play); void BgCraceMovebg_Destroy(Actor* thisx, PlayState* play); void BgCraceMovebg_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sUnitVecZ = { 0.0f, 0.0f, 1.0f }; void BgCraceMovebg_Init(Actor* thisx, PlayState* play) { - BgCraceMovebg* this = THIS; + BgCraceMovebg* this = (BgCraceMovebg*)thisx; s32 i; s32 j; @@ -187,7 +185,7 @@ void BgCraceMovebg_OpeningDoor_DoNothing(BgCraceMovebg* this, PlayState* play) { } void BgCraceMovebg_Destroy(Actor* thisx, PlayState* play) { - BgCraceMovebg* this = THIS; + BgCraceMovebg* this = (BgCraceMovebg*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); if (!(this->stateFlags & BG_CRACE_MOVEBG_FLAG_ALREADY_LOADED)) { @@ -206,7 +204,7 @@ void BgCraceMovebg_Destroy(Actor* thisx, PlayState* play) { } void BgCraceMovebg_Update(Actor* thisx, PlayState* play) { - BgCraceMovebg* this = THIS; + BgCraceMovebg* this = (BgCraceMovebg*)thisx; s32 pad; Player* player = GET_PLAYER(play); s16 yawDiff; diff --git a/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c b/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c index 2a1f95e2b5..e3e45e5eba 100644 --- a/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c +++ b/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgCtowerGear*)thisx) - void BgCtowerGear_Init(Actor* thisx, PlayState* play); void BgCtowerGear_Destroy(Actor* thisx, PlayState* play); void BgCtowerGear_Update(Actor* thisx, PlayState* play); @@ -113,7 +111,7 @@ void BgCtowerGear_Splash(BgCtowerGear* this, PlayState* play) { } void BgCtowerGear_Init(Actor* thisx, PlayState* play) { - BgCtowerGear* this = THIS; + BgCtowerGear* this = (BgCtowerGear*)thisx; s32 type = BGCTOWERGEAR_GET_TYPE(&this->dyna.actor); Actor_SetScale(&this->dyna.actor, 0.1f); @@ -137,7 +135,7 @@ void BgCtowerGear_Init(Actor* thisx, PlayState* play) { } void BgCtowerGear_Destroy(Actor* thisx, PlayState* play) { - BgCtowerGear* this = THIS; + BgCtowerGear* this = (BgCtowerGear*)thisx; s32 type = BGCTOWERGEAR_GET_TYPE(&this->dyna.actor); if ((type == BGCTOWERGEAR_WATER_WHEEL) || (type == BGCTOWERGEAR_ORGAN)) { @@ -146,7 +144,7 @@ void BgCtowerGear_Destroy(Actor* thisx, PlayState* play) { } void BgCtowerGear_Update(Actor* thisx, PlayState* play) { - BgCtowerGear* this = THIS; + BgCtowerGear* this = (BgCtowerGear*)thisx; s32 type = BGCTOWERGEAR_GET_TYPE(&this->dyna.actor); if (type == BGCTOWERGEAR_CEILING_COG) { @@ -161,7 +159,7 @@ void BgCtowerGear_Update(Actor* thisx, PlayState* play) { } void BgCtowerGear_UpdateOrgan(Actor* thisx, PlayState* play) { - BgCtowerGear* this = THIS; + BgCtowerGear* this = (BgCtowerGear*)thisx; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_104)) { switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_104)]->id) { diff --git a/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c b/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c index 15142f177a..a0b80b93ea 100644 --- a/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c +++ b/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgCtowerRot*)thisx) - void BgCtowerRot_Init(Actor* thisx, PlayState* play); void BgCtowerRot_Destroy(Actor* thisx, PlayState* play); void BgCtowerRot_Update(Actor* thisx, PlayState* play); @@ -41,7 +39,7 @@ static Gfx* sDLists[] = { gClockTowerCorridorDL, gClockTowerStoneDoorMainDL, gCl void BgCtowerRot_Init(Actor* thisx, PlayState* play) { s32 pad; - BgCtowerRot* this = THIS; + BgCtowerRot* this = (BgCtowerRot*)thisx; Player* player; Vec3f offset; @@ -73,7 +71,7 @@ void BgCtowerRot_Init(Actor* thisx, PlayState* play) { } void BgCtowerRot_Destroy(Actor* thisx, PlayState* play) { - BgCtowerRot* this = THIS; + BgCtowerRot* this = (BgCtowerRot*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -136,13 +134,13 @@ void BgCtowerRot_SetupDoorClose(BgCtowerRot* this, PlayState* play) { } void BgCtowerRot_Update(Actor* thisx, PlayState* play) { - BgCtowerRot* this = THIS; + BgCtowerRot* this = (BgCtowerRot*)thisx; this->actionFunc(this, play); } void BgCtowerRot_Draw(Actor* thisx, PlayState* play) { - BgCtowerRot* this = THIS; + BgCtowerRot* this = (BgCtowerRot*)thisx; Gfx_DrawDListOpa(play, sDLists[this->dyna.actor.params]); if (this->dyna.actor.params == BGCTOWERROT_CORRIDOR) { diff --git a/src/overlays/actors/ovl_Bg_Danpei_Movebg/z_bg_danpei_movebg.c b/src/overlays/actors/ovl_Bg_Danpei_Movebg/z_bg_danpei_movebg.c index 9ac1e8dd23..d145421beb 100644 --- a/src/overlays/actors/ovl_Bg_Danpei_Movebg/z_bg_danpei_movebg.c +++ b/src/overlays/actors/ovl_Bg_Danpei_Movebg/z_bg_danpei_movebg.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgDanpeiMovebg*)thisx) - #define DANPEI_MOVEBG_FLAG_4 (1 << 2) #define DANPEI_MOVEBG_FLAG_8 (1 << 3) #define DANPEI_MOVEBG_FLAG_10 (1 << 4) @@ -68,7 +66,7 @@ s32 func_80AF6DE0(PlayState* this, ActorPathing* actorPathing) { } void BgDanpeiMovebg_Init(Actor* thisx, PlayState* play) { - BgDanpeiMovebg* this = THIS; + BgDanpeiMovebg* this = (BgDanpeiMovebg*)thisx; DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -102,13 +100,13 @@ void func_80AF6EA8(BgDanpeiMovebg* this, PlayState* play) { } void BgDanpeiMovebg_Destroy(Actor* thisx, PlayState* play) { - BgDanpeiMovebg* this = THIS; + BgDanpeiMovebg* this = (BgDanpeiMovebg*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgDanpeiMovebg_Update(Actor* thisx, PlayState* play) { - BgDanpeiMovebg* this = THIS; + BgDanpeiMovebg* this = (BgDanpeiMovebg*)thisx; this->actionFunc(this, play); this->prevFlags = this->flags; @@ -222,7 +220,7 @@ void func_80AF746C(BgDanpeiMovebg* this, PlayState* play) { } void func_80AF74CC(Actor* thisx, PlayState* play) { - BgDanpeiMovebg* this = THIS; + BgDanpeiMovebg* this = (BgDanpeiMovebg*)thisx; if (this->dList != NULL) { Gfx_DrawDListOpa(play, this->dList); diff --git a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c index 81b1bd1b50..d464e1deae 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgDblueBalance*)thisx) - void BgDblueBalance_Init(Actor* thisx, PlayState* play); void BgDblueBalance_Destroy(Actor* thisx, PlayState* play); void BgDblueBalance_Update(Actor* thisx, PlayState* play); @@ -303,7 +301,7 @@ bool func_80B82B00(s16 arg0, s16 arg1, s16 arg2) { void BgDblueBalance_Init(Actor* thisx, PlayState* play) { s32 pad; - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; s32 sp2C = BGDBLUEBALANCE_GET_300(&this->dyna.actor); s32 pad2; s32 isSwitchFlagSet = Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor)); @@ -350,7 +348,7 @@ void BgDblueBalance_Init(Actor* thisx, PlayState* play) { void BgDblueBalance_Destroy(Actor* thisx, PlayState* play) { s32 pad; - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; s32 sp1C = BGDBLUEBALANCE_GET_300(&this->dyna.actor); DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -533,7 +531,7 @@ void func_80B82DE0(BgDblueBalance* this, PlayState* play) { } void BgDblueBalance_Update(Actor* thisx, PlayState* play) { - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; this->unk_17A = this->unk_178; @@ -543,7 +541,7 @@ void BgDblueBalance_Update(Actor* thisx, PlayState* play) { } void func_80B8330C(Actor* thisx, PlayState* play) { - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; this->isSwitchPressed = DynaPolyActor_IsSwitchPressed(&this->dyna); this->isHeavySwitchPressed = DynaPolyActor_IsHeavySwitchPressed(&this->dyna); @@ -619,7 +617,7 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) { } void func_80B83518(Actor* thisx, PlayState* play) { - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; this->isSwitchFlagSet = Flags_GetSwitch(play, BGDBLUEBALANCE_GET_SWITCH_FLAG(&this->dyna.actor)); @@ -645,7 +643,7 @@ void func_80B83518(Actor* thisx, PlayState* play) { void BgDblueBalance_Draw(Actor* thisx, PlayState* play) { s32 pad; - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; BgDblueBalanceTypeInfo* ptr2 = &sTypeInfo[BGDBLUEBALANCE_GET_300(&this->dyna.actor)]; BgDblueBalance* sp38; Gfx* gfx; @@ -677,7 +675,7 @@ void BgDblueBalance_Draw(Actor* thisx, PlayState* play) { void func_80B83758(Actor* thisx, PlayState* play) { s32 pad; - BgDblueBalance* this = THIS; + BgDblueBalance* this = (BgDblueBalance*)thisx; f32 temp_f0; Gfx* gfx; s32 i; diff --git a/src/overlays/actors/ovl_Bg_Dblue_Elevator/z_bg_dblue_elevator.c b/src/overlays/actors/ovl_Bg_Dblue_Elevator/z_bg_dblue_elevator.c index afe9bb0900..b2efca3b81 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Elevator/z_bg_dblue_elevator.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Elevator/z_bg_dblue_elevator.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgDblueElevator*)thisx) - void BgDblueElevator_SpawnRipplesAndSplashes(BgDblueElevator* this, PlayState* play); void BgDblueElevator_CheckWaterBoxInfo(BgDblueElevator* this, PlayState* play2); s32 BgDblueElevator_GetWaterFlowFromCeiling(BgDblueElevator* this, PlayState* play); @@ -160,7 +158,7 @@ s32 BgDblueElevator_GetWaterFlowFromPipes(BgDblueElevator* this, PlayState* play } void BgDblueElevator_Init(Actor* thisx, PlayState* play2) { - BgDblueElevator* this = THIS; + BgDblueElevator* this = (BgDblueElevator*)thisx; PlayState* play = play2; s32 index = BG_DBLUE_ELEVATOR_GET_INDEX(&this->dyna.actor); BgDblueElevatorStruct1* ptr = &D_80B92960[index]; @@ -188,7 +186,7 @@ void BgDblueElevator_Init(Actor* thisx, PlayState* play2) { } void BgDblueElevator_Destroy(Actor* thisx, PlayState* play) { - BgDblueElevator* this = THIS; + BgDblueElevator* this = (BgDblueElevator*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -326,13 +324,13 @@ void BgDblueElevator_Move(BgDblueElevator* this, PlayState* play) { } void BgDblueElevator_Update(Actor* thisx, PlayState* play) { - BgDblueElevator* this = THIS; + BgDblueElevator* this = (BgDblueElevator*)thisx; this->actionFunc(this, play); } void BgDblueElevator_Draw(Actor* thisx, PlayState* play) { - BgDblueElevator* this = THIS; + BgDblueElevator* this = (BgDblueElevator*)thisx; Gfx_DrawDListOpa(play, gGreatBayTempleObjectElevatorDL); } diff --git a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c index 3a39ec61e8..74ad1e161d 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgDblueMovebg*)thisx) - void BgDblueMovebg_Init(Actor* thisx, PlayState* play); void BgDblueMovebg_Destroy(Actor* thisx, PlayState* play); void BgDblueMovebg_Update(Actor* thisx, PlayState* play); @@ -155,7 +153,7 @@ s32 func_80A29A80(PlayState* play, s32 switchFlagBase, s32 arg2) { void BgDblueMovebg_Init(Actor* thisx, PlayState* play) { s32 pad; - BgDblueMovebg* this = THIS; + BgDblueMovebg* this = (BgDblueMovebg*)thisx; s32 i; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -284,7 +282,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) { } void BgDblueMovebg_Destroy(Actor* thisx, PlayState* play) { - BgDblueMovebg* this = THIS; + BgDblueMovebg* this = (BgDblueMovebg*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); if ((this->unk_160 == 9) || (this->unk_160 == 8)) { @@ -715,7 +713,7 @@ void func_80A2B1A0(BgDblueMovebg* this, PlayState* play) { } void BgDblueMovebg_Update(Actor* thisx, PlayState* play) { - BgDblueMovebg* this = THIS; + BgDblueMovebg* this = (BgDblueMovebg*)thisx; this->actionFunc(this, play); @@ -727,7 +725,7 @@ void BgDblueMovebg_Update(Actor* thisx, PlayState* play) { } void func_80A2B274(Actor* thisx, PlayState* play) { - BgDblueMovebg* this = THIS; + BgDblueMovebg* this = (BgDblueMovebg*)thisx; s16 temp_v1; if (this != D_80A2BBF0) { @@ -747,7 +745,7 @@ void func_80A2B274(Actor* thisx, PlayState* play) { void func_80A2B308(Actor* thisx, PlayState* play) { s32 pad; - BgDblueMovebg* this = THIS; + BgDblueMovebg* this = (BgDblueMovebg*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -761,7 +759,7 @@ void func_80A2B308(Actor* thisx, PlayState* play) { void BgDblueMovebg_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgDblueMovebg* this = THIS; + BgDblueMovebg* this = (BgDblueMovebg*)thisx; s32 i; s32 j; Gfx* gfx; diff --git a/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c b/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c index 9235b00b3b..10dbab2b77 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgDblueWaterfall*)thisx) - void BgDblueWaterfall_Init(Actor* thisx, PlayState* play); void BgDblueWaterfall_Destroy(Actor* thisx, PlayState* play); void BgDblueWaterfall_Update(Actor* thisx, PlayState* play); @@ -89,7 +87,7 @@ s32 func_80B83D04(BgDblueWaterfall* this, PlayState* play) { } s32 func_80B83D58(Actor* thisx, PlayState* play) { - BgDblueWaterfall* this = THIS; + BgDblueWaterfall* this = (BgDblueWaterfall*)thisx; if (Flags_GetSwitch(play, BGDBLUEWATERFALL_GET_SWITCH_FLAG(&this->actor))) { return false; @@ -331,7 +329,7 @@ static InitChainEntry sInitChain[] = { void BgDblueWaterfall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgDblueWaterfall* this = THIS; + BgDblueWaterfall* this = (BgDblueWaterfall*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.shape.rot.z = 0; @@ -349,7 +347,7 @@ void BgDblueWaterfall_Init(Actor* thisx, PlayState* play) { } void BgDblueWaterfall_Destroy(Actor* thisx, PlayState* play) { - BgDblueWaterfall* this = THIS; + BgDblueWaterfall* this = (BgDblueWaterfall*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -576,14 +574,14 @@ void func_80B84F20(BgDblueWaterfall* this, PlayState* play) { } void BgDblueWaterfall_Update(Actor* thisx, PlayState* play) { - BgDblueWaterfall* this = THIS; + BgDblueWaterfall* this = (BgDblueWaterfall*)thisx; this->actionFunc(this, play); } void BgDblueWaterfall_Draw(Actor* thisx, PlayState* play) { s32 pad; - BgDblueWaterfall* this = THIS; + BgDblueWaterfall* this = (BgDblueWaterfall*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Dkjail_Ivy/z_bg_dkjail_ivy.c b/src/overlays/actors/ovl_Bg_Dkjail_Ivy/z_bg_dkjail_ivy.c index bc351e4ae7..dc65117a20 100644 --- a/src/overlays/actors/ovl_Bg_Dkjail_Ivy/z_bg_dkjail_ivy.c +++ b/src/overlays/actors/ovl_Bg_Dkjail_Ivy/z_bg_dkjail_ivy.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgDkjailIvy*)thisx) - void BgDkjailIvy_Init(Actor* thisx, PlayState* play); void BgDkjailIvy_Destroy(Actor* thisx, PlayState* play); void BgDkjailIvy_Update(Actor* thisx, PlayState* play); @@ -114,7 +112,7 @@ static InitChainEntry sInitChain[] = { void BgDkjailIvy_Init(Actor* thisx, PlayState* play) { s32 pad; - BgDkjailIvy* this = THIS; + BgDkjailIvy* this = (BgDkjailIvy*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -133,7 +131,7 @@ void BgDkjailIvy_Init(Actor* thisx, PlayState* play) { } void BgDkjailIvy_Destroy(Actor* thisx, PlayState* play) { - BgDkjailIvy* this = THIS; + BgDkjailIvy* this = (BgDkjailIvy*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -191,13 +189,13 @@ void BgDkjailIvy_FadeOut(BgDkjailIvy* this, PlayState* play) { } void BgDkjailIvy_Update(Actor* thisx, PlayState* play) { - BgDkjailIvy* this = THIS; + BgDkjailIvy* this = (BgDkjailIvy*)thisx; this->actionFunc(this, play); } void BgDkjailIvy_Draw(Actor* thisx, PlayState* play) { - BgDkjailIvy* this = THIS; + BgDkjailIvy* this = (BgDkjailIvy*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 24a537b415..bee7cce60f 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((BgDyYoseizo*)thisx) - void BgDyYoseizo_Init(Actor* thisx, PlayState* play); void BgDyYoseizo_Destroy(Actor* thisx, PlayState* play); void BgDyYoseizo_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ static AnimationHeader* sAnimations[GREATFAIRY_ANIM_MAX] = { }; void BgDyYoseizo_Init(Actor* thisx, PlayState* play) { - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; this->unk2EC = this->actor.world.pos.y + 40.0f; this->actor.focus.pos = this->actor.world.pos; @@ -539,7 +537,7 @@ void func_80A0BB08(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_Update(Actor* thisx, PlayState* play) { - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -550,7 +548,7 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play) { } s32 BgDyYoseizo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; if (limbIndex == GREAT_FAIRY_LIMB_TORSO) { rot->x += this->torsoRot.y; @@ -578,7 +576,7 @@ void BgDyYoseizo_Draw(Actor* thisx, PlayState* play) { gGreatFairyMouthClosedTex, gGreatFairyMouthOpenTex, }; - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; GreatFairyAppearance appearance = GREAT_FAIRY_APPEARANCE_MAGIC; // The differing eyes and hair colours diff --git a/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c b/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c index 9e1c78ff49..724cae2019 100644 --- a/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c +++ b/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgF40Block*)thisx) - void BgF40Block_Init(Actor* thisx, PlayState* play); void BgF40Block_Destroy(Actor* thisx, PlayState* play); void BgF40Block_Update(Actor* thisx, PlayState* play); @@ -225,7 +223,7 @@ void func_80BC4038(BgF40Block* this) { } void BgF40Block_Init(Actor* thisx, PlayState* play) { - BgF40Block* this = THIS; + BgF40Block* this = (BgF40Block*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -254,7 +252,7 @@ void BgF40Block_Init(Actor* thisx, PlayState* play) { } void BgF40Block_Destroy(Actor* thisx, PlayState* play) { - BgF40Block* this = THIS; + BgF40Block* this = (BgF40Block*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -365,7 +363,7 @@ void func_80BC457C(BgF40Block* this, PlayState* play) { } void BgF40Block_Update(Actor* thisx, PlayState* play) { - BgF40Block* this = THIS; + BgF40Block* this = (BgF40Block*)thisx; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Bg_F40_Flift/z_bg_f40_flift.c b/src/overlays/actors/ovl_Bg_F40_Flift/z_bg_f40_flift.c index e09679c1aa..3f89ad1770 100644 --- a/src/overlays/actors/ovl_Bg_F40_Flift/z_bg_f40_flift.c +++ b/src/overlays/actors/ovl_Bg_F40_Flift/z_bg_f40_flift.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgF40Flift*)thisx) - void BgF40Flift_Init(Actor* thisx, PlayState* play); void BgF40Flift_Destroy(Actor* thisx, PlayState* play); void BgF40Flift_Update(Actor* thisx, PlayState* play); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { }; void BgF40Flift_Init(Actor* thisx, PlayState* play) { - BgF40Flift* this = THIS; + BgF40Flift* this = (BgF40Flift*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -48,7 +46,7 @@ void BgF40Flift_Init(Actor* thisx, PlayState* play) { } void BgF40Flift_Destroy(Actor* thisx, PlayState* play) { - BgF40Flift* this = THIS; + BgF40Flift* this = (BgF40Flift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -85,7 +83,7 @@ void func_808D7714(BgF40Flift* this, PlayState* play) { } void BgF40Flift_Update(Actor* thisx, PlayState* play) { - BgF40Flift* this = THIS; + BgF40Flift* this = (BgF40Flift*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c b/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c index dc010e47e9..9ca9d357c8 100644 --- a/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c +++ b/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgF40Switch*)thisx) - void BgF40Switch_Init(Actor* thisx, PlayState* play); void BgF40Switch_Destroy(Actor* thisx, PlayState* play); void BgF40Switch_Update(Actor* thisx, PlayState* play); @@ -106,7 +104,7 @@ static InitChainEntry sInitChain[] = { }; void BgF40Switch_Init(Actor* thisx, PlayState* play) { - BgF40Switch* this = THIS; + BgF40Switch* this = (BgF40Switch*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->dyna.actor.scale.y = 0.165f; @@ -121,7 +119,7 @@ void BgF40Switch_Init(Actor* thisx, PlayState* play) { } void BgF40Switch_Destroy(Actor* thisx, PlayState* play) { - BgF40Switch* this = THIS; + BgF40Switch* this = (BgF40Switch*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -180,14 +178,14 @@ void BgF40Switch_IdleUnpressed(BgF40Switch* this, PlayState* play) { } void BgF40Switch_Update(Actor* thisx, PlayState* play) { - BgF40Switch* this = THIS; + BgF40Switch* this = (BgF40Switch*)thisx; BgF40Switch_CheckAll(this, play); this->actionFunc(this, play); } void BgF40Switch_Draw(Actor* thisx, PlayState* play) { - BgF40Switch* this = THIS; + BgF40Switch* this = (BgF40Switch*)thisx; Gfx_DrawDListOpa(play, gStoneTowerFloorSwitchDL); Gfx_DrawDListOpa(play, gStoneTowerFloorSwitchOutlineDL); diff --git a/src/overlays/actors/ovl_Bg_F40_Swlift/z_bg_f40_swlift.c b/src/overlays/actors/ovl_Bg_F40_Swlift/z_bg_f40_swlift.c index d2fb9647ea..4fa49f483e 100644 --- a/src/overlays/actors/ovl_Bg_F40_Swlift/z_bg_f40_swlift.c +++ b/src/overlays/actors/ovl_Bg_F40_Swlift/z_bg_f40_swlift.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgF40Swlift*)thisx) - void BgF40Swlift_Init(Actor* thisx, PlayState* play); void BgF40Swlift_Destroy(Actor* thisx, PlayState* play); void BgF40Swlift_Update(Actor* thisx, PlayState* play2); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { }; void BgF40Swlift_Init(Actor* thisx, PlayState* play) { - BgF40Swlift* this = THIS; + BgF40Swlift* this = (BgF40Swlift*)thisx; s32 index; s32 pad; @@ -62,14 +60,14 @@ void BgF40Swlift_Init(Actor* thisx, PlayState* play) { } void BgF40Swlift_Destroy(Actor* thisx, PlayState* play) { - BgF40Swlift* this = THIS; + BgF40Swlift* this = (BgF40Swlift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgF40Swlift_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgF40Swlift* this = THIS; + BgF40Swlift* this = (BgF40Swlift*)thisx; s32 i; for (i = 1; i < ARRAY_COUNT(sSwitchFlags); i++) { @@ -110,7 +108,7 @@ void BgF40Swlift_Update(Actor* thisx, PlayState* play2) { } void BgF40Swlift_Draw(Actor* thisx, PlayState* play) { - BgF40Swlift* this = THIS; + BgF40Swlift* this = (BgF40Swlift*)thisx; Gfx_DrawDListOpa(play, gStoneTowerVerticallyOscillatingPlatformDL); } diff --git a/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c b/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c index f581514d71..2cdc790537 100644 --- a/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c +++ b/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgFireWall*)thisx) - void BgFireWall_Init(Actor* thisx, PlayState* play); void BgFireWall_Destroy(Actor* thisx, PlayState* play); void BgFireWall_Update(Actor* thisx, PlayState* play2); @@ -61,7 +59,7 @@ static TexturePtr sFlameTextures[] = { }; void BgFireWall_Init(Actor* thisx, PlayState* play) { - BgFireWall* this = THIS; + BgFireWall* this = (BgFireWall*)thisx; this->unk_14C = this->actor.params; this->actor.scale.y = 0.005f; @@ -80,13 +78,13 @@ void BgFireWall_Init(Actor* thisx, PlayState* play) { } void BgFireWall_Destroy(Actor* thisx, PlayState* play) { - BgFireWall* this = THIS; + BgFireWall* this = (BgFireWall*)thisx; Collider_DestroyCylinder(play, &this->collider); } s32 func_809AC5C0(BgFireWall* thisx, PlayState* play) { - BgFireWall* this = THIS; + BgFireWall* this = (BgFireWall*)thisx; Player* player = GET_PLAYER(play); Vec3f sp1C; @@ -172,7 +170,7 @@ void func_809AC970(BgFireWall* this, PlayState* play) { void BgFireWall_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgFireWall* this = THIS; + BgFireWall* this = (BgFireWall*)thisx; this->actionFunc(this, play); if ((this->unk_14C == 0) || ((this->unk_14C != 0) && (this->actor.xzDistToPlayer < 240.0f))) { @@ -201,7 +199,7 @@ void BgFireWall_Update(Actor* thisx, PlayState* play2) { } void BgFireWall_Draw(Actor* thisx, PlayState* play) { - BgFireWall* this = THIS; + BgFireWall* this = (BgFireWall*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c b/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c index bd5a9394ec..7557a38f97 100644 --- a/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c +++ b/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgFuKaiten*)thisx) - void BgFuKaiten_Init(Actor* thisx, PlayState* play); void BgFuKaiten_Destroy(Actor* thisx, PlayState* play); void BgFuKaiten_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Bg_Fu_Kaiten_Profile = { void BgFuKaiten_Init(Actor* thisx, PlayState* play) { s32 pad; - BgFuKaiten* this = THIS; + BgFuKaiten* this = (BgFuKaiten*)thisx; CollisionHeader* header = NULL; Actor_SetScale(thisx, 1.0f); @@ -45,7 +43,7 @@ void BgFuKaiten_Init(Actor* thisx, PlayState* play) { } void BgFuKaiten_Destroy(Actor* thisx, PlayState* play) { - BgFuKaiten* this = THIS; + BgFuKaiten* this = (BgFuKaiten*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -68,7 +66,7 @@ void BgFuKaiten_UpdateHeight(BgFuKaiten* this) { } void BgFuKaiten_Update(Actor* thisx, PlayState* play) { - BgFuKaiten* this = THIS; + BgFuKaiten* this = (BgFuKaiten*)thisx; BgFuKaiten_UpdateRotation(this); BgFuKaiten_UpdateHeight(this); diff --git a/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c b/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c index 9afa6263fc..84a4480a67 100644 --- a/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c +++ b/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgFuMizu*)thisx) - void BgFuMizu_Init(Actor* thisx, PlayState* play); void BgFuMizu_Destroy(Actor* thisx, PlayState* play); void BgFuMizu_Update(Actor* thisx, PlayState* play); @@ -29,7 +27,7 @@ ActorProfile Bg_Fu_Mizu_Profile = { }; void BgFuMizu_Init(Actor* thisx, PlayState* play) { - BgFuMizu* this = THIS; + BgFuMizu* this = (BgFuMizu*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -42,7 +40,7 @@ void BgFuMizu_Init(Actor* thisx, PlayState* play) { } void BgFuMizu_Destroy(Actor* thisx, PlayState* play) { - BgFuMizu* this = THIS; + BgFuMizu* this = (BgFuMizu*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -62,7 +60,7 @@ s32 func_80ADABA4(BgFuMizu* this, PlayState* play) { void BgFuMizu_Update(Actor* thisx, PlayState* play) { f32 heightTarget; - BgFuMizu* this = THIS; + BgFuMizu* this = (BgFuMizu*)thisx; if (this->unk_160 == 0) { if (func_80ADABA4(this, play)) { diff --git a/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c b/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c index 0a4fe27d7c..85d23d5026 100644 --- a/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c +++ b/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgGoronOyu*)thisx) - void BgGoronOyu_Init(Actor* thisx, PlayState* play); void BgGoronOyu_Destroy(Actor* thisx, PlayState* play); void BgGoronOyu_Update(Actor* thisx, PlayState* play); @@ -148,7 +146,7 @@ void BgGoronOyu_SpawnEffects(BgGoronOyu* this, PlayState* play) { void BgGoronOyu_Init(Actor* thisx, PlayState* play) { s32 pad; - BgGoronOyu* this = THIS; + BgGoronOyu* this = (BgGoronOyu*)thisx; CollisionHeader* colHeader = NULL; Actor_SetScale(&this->dyna.actor, 0.1f); @@ -169,13 +167,13 @@ void BgGoronOyu_Init(Actor* thisx, PlayState* play) { } void BgGoronOyu_Destroy(Actor* thisx, PlayState* play) { - BgGoronOyu* this = THIS; + BgGoronOyu* this = (BgGoronOyu*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgGoronOyu_Update(Actor* thisx, PlayState* play) { - BgGoronOyu* this = THIS; + BgGoronOyu* this = (BgGoronOyu*)thisx; this->actionFunc(this, play); BgGoronOyu_SpawnEffects(this, play); diff --git a/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c b/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c index 07355809c6..e3f274b1eb 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHakaBombwall*)thisx) - void BgHakaBombwall_Init(Actor* thisx, PlayState* play); void BgHakaBombwall_Destroy(Actor* thisx, PlayState* play); void BgHakaBombwall_Update(Actor* thisx, PlayState* play); @@ -155,7 +153,7 @@ void func_80BD5E6C(BgHakaBombwall* this, PlayState* play) { void BgHakaBombwall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgHakaBombwall* this = THIS; + BgHakaBombwall* this = (BgHakaBombwall*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -172,7 +170,7 @@ void BgHakaBombwall_Init(Actor* thisx, PlayState* play) { } void BgHakaBombwall_Destroy(Actor* thisx, PlayState* play) { - BgHakaBombwall* this = THIS; + BgHakaBombwall* this = (BgHakaBombwall*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -224,7 +222,7 @@ void BgHakaBombwall_EndCutscene(BgHakaBombwall* this, PlayState* play) { } void BgHakaBombwall_Update(Actor* thisx, PlayState* play) { - BgHakaBombwall* this = THIS; + BgHakaBombwall* this = (BgHakaBombwall*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c b/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c index aaa5ef5fa1..6515d70944 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c +++ b/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgHakaCurtain*)thisx) - void BgHakaCurtain_Init(Actor* thisx, PlayState* play); void BgHakaCurtain_Destroy(Actor* thisx, PlayState* play); void BgHakaCurtain_Update(Actor* thisx, PlayState* play); @@ -46,7 +44,7 @@ static InitChainEntry sInitChain[] = { }; void BgHakaCurtain_Init(Actor* thisx, PlayState* play) { - BgHakaCurtain* this = THIS; + BgHakaCurtain* this = (BgHakaCurtain*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -59,7 +57,7 @@ void BgHakaCurtain_Init(Actor* thisx, PlayState* play) { } void BgHakaCurtain_Destroy(Actor* thisx, PlayState* play) { - BgHakaCurtain* this = THIS; + BgHakaCurtain* this = (BgHakaCurtain*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -122,7 +120,7 @@ void func_80B6DEA8(BgHakaCurtain* this, PlayState* play) { } void BgHakaCurtain_Update(Actor* thisx, PlayState* play) { - BgHakaCurtain* this = THIS; + BgHakaCurtain* this = (BgHakaCurtain*)thisx; CsCmdActorCue* cue; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_469)) { diff --git a/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.c b/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.c index 3170b4531a..b7797dcb65 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHakaTomb*)thisx) - void BgHakaTomb_Init(Actor* thisx, PlayState* play); void BgHakaTomb_Destroy(Actor* thisx, PlayState* play); void BgHakaTomb_Update(Actor* thisx, PlayState* play); @@ -42,7 +40,7 @@ static InitChainEntry sInitChain[] = { static Vec3f D_80BD68A4 = { 30.0f, 90.0f, 0.0f }; void BgHakaTomb_Init(Actor* thisx, PlayState* play) { - BgHakaTomb* this = THIS; + BgHakaTomb* this = (BgHakaTomb*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -52,7 +50,7 @@ void BgHakaTomb_Init(Actor* thisx, PlayState* play) { } void BgHakaTomb_Destroy(Actor* thisx, PlayState* play) { - BgHakaTomb* this = THIS; + BgHakaTomb* this = (BgHakaTomb*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -114,7 +112,7 @@ void BgHakaTomb_DoNothing(BgHakaTomb* this, PlayState* play) { } void BgHakaTomb_Update(Actor* thisx, PlayState* play) { - BgHakaTomb* this = THIS; + BgHakaTomb* this = (BgHakaTomb*)thisx; s32 pad; Vec3f vec; diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c b/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c index 3289177e96..897e815261 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHakuginBombwall*)thisx) - void BgHakuginBombwall_Init(Actor* thisx, PlayState* play); void BgHakuginBombwall_Destroy(Actor* thisx, PlayState* play); void BgHakuginBombwall_Update(Actor* thisx, PlayState* play); @@ -309,7 +307,7 @@ void func_80ABC7FC(BgHakuginBombwall* this, PlayState* play) { void BgHakuginBombwall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgHakuginBombwall* this = THIS; + BgHakuginBombwall* this = (BgHakuginBombwall*)thisx; BgHakuginBombwallStruct* ptr = &D_80ABCFC0[BGHAKUGIN_BOMBWALL_100(&this->dyna.actor)]; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -336,7 +334,7 @@ void BgHakuginBombwall_Init(Actor* thisx, PlayState* play) { } void BgHakuginBombwall_Destroy(Actor* thisx, PlayState* play) { - BgHakuginBombwall* this = THIS; + BgHakuginBombwall* this = (BgHakuginBombwall*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -421,7 +419,7 @@ void func_80ABCE60(BgHakuginBombwall* this, PlayState* play) { } void BgHakuginBombwall_Update(Actor* thisx, PlayState* play) { - BgHakuginBombwall* this = THIS; + BgHakuginBombwall* this = (BgHakuginBombwall*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c b/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c index 7240ea36a4..5a08be55c6 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgHakuginElvpole*)thisx) - void BgHakuginElvpole_Init(Actor* thisx, PlayState* play); void BgHakuginElvpole_Destroy(Actor* thisx, PlayState* play); void BgHakuginElvpole_Update(Actor* thisx, PlayState* play); @@ -33,7 +31,7 @@ ActorProfile Bg_Hakugin_Elvpole_Profile = { void BgHakuginElvpole_Init(Actor* thisx, PlayState* play) { s32 pad; CollisionHeader* colHeader = NULL; - BgHakuginElvpole* this = THIS; + BgHakuginElvpole* this = (BgHakuginElvpole*)thisx; Actor_SetScale(&this->dyna.actor, 0.1f); this->actionFunc = func_80ABD92C; @@ -52,7 +50,7 @@ void BgHakuginElvpole_Init(Actor* thisx, PlayState* play) { } void BgHakuginElvpole_Destroy(Actor* thisx, PlayState* play) { - BgHakuginElvpole* this = THIS; + BgHakuginElvpole* this = (BgHakuginElvpole*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -121,7 +119,7 @@ void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) { } void BgHakuginElvpole_Update(Actor* thisx, PlayState* play) { - BgHakuginElvpole* this = THIS; + BgHakuginElvpole* this = (BgHakuginElvpole*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c index eedc34640d..121d622272 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgHakuginPost*)thisx) - void BgHakuginPost_Init(Actor* thisx, PlayState* play); void BgHakuginPost_Destroy(Actor* thisx, PlayState* play); void BgHakuginPost_Update(Actor* thisx, PlayState* play); @@ -688,7 +686,7 @@ void func_80A9C854(BgHakuginPost* this, PlayState* play) { void BgHakuginPost_Init(Actor* thisx, PlayState* play) { static s32 D_80A9D8FC = 1; - BgHakuginPost* this = THIS; + BgHakuginPost* this = (BgHakuginPost*)thisx; if (D_80A9D8FC != 0) { D_80A9D8FC = 0; @@ -713,7 +711,7 @@ void BgHakuginPost_Init(Actor* thisx, PlayState* play) { } void BgHakuginPost_Destroy(Actor* thisx, PlayState* play) { - BgHakuginPost* this = THIS; + BgHakuginPost* this = (BgHakuginPost*)thisx; if (BGHAKUGINPOST_GET_7(&this->dyna.actor) == 7) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -951,7 +949,7 @@ void func_80A9D434(BgHakuginPost* this, PlayState* play) { } void BgHakuginPost_Update(Actor* thisx, PlayState* play) { - BgHakuginPost* this = THIS; + BgHakuginPost* this = (BgHakuginPost*)thisx; f32 temp; func_80A9B46C(this, play); @@ -1003,7 +1001,7 @@ void func_80A9D61C(Actor* thisx, PlayState* play) { object_hakugin_obj_DL_00D098, object_hakugin_obj_DL_00D098, }; - BgHakuginPost* this = THIS; + BgHakuginPost* this = (BgHakuginPost*)thisx; BgHakuginPostUnkStruct1* unkStruct1; BgHakuginPostUnkStruct2* unkStruct2; Vec3f sp68; diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c index da32f14da1..720dfd9da7 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgHakuginSwitch*)thisx) - void BgHakuginSwitch_Init(Actor* thisx, PlayState* play); void BgHakuginSwitch_Destroy(Actor* thisx, PlayState* play); void BgHakuginSwitch_Update(Actor* thisx, PlayState* play); @@ -115,7 +113,7 @@ void func_80B157C4(BgHakuginSwitch* this, u16 arg1) { void BgHakuginSwitch_Init(Actor* thisx, PlayState* play) { s32 pad; - BgHakuginSwitch* this = THIS; + BgHakuginSwitch* this = (BgHakuginSwitch*)thisx; s32 sp34 = BGHAKUGINSWITCH_GET_7(&this->dyna.actor); s32 sp30; s32 pad2; @@ -181,7 +179,7 @@ void BgHakuginSwitch_Init(Actor* thisx, PlayState* play) { } void BgHakuginSwitch_Destroy(Actor* thisx, PlayState* play) { - BgHakuginSwitch* this = THIS; + BgHakuginSwitch* this = (BgHakuginSwitch*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -488,7 +486,7 @@ void func_80B165E0(BgHakuginSwitch* this, PlayState* play) { void BgHakuginSwitch_Update(Actor* thisx, PlayState* play) { s32 pad; - BgHakuginSwitch* this = THIS; + BgHakuginSwitch* this = (BgHakuginSwitch*)thisx; f32 sp24; if (this->unk_1B2 > 0) { @@ -533,7 +531,7 @@ void BgHakuginSwitch_Update(Actor* thisx, PlayState* play) { } void BgHakuginSwitch_Draw(Actor* thisx, PlayState* play) { - BgHakuginSwitch* this = THIS; + BgHakuginSwitch* this = (BgHakuginSwitch*)thisx; Gfx_DrawDListOpa(play, this->unk_1A8); } diff --git a/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c b/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c index 5b560d7d9e..5adc24a26d 100644 --- a/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c +++ b/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIcefloe*)thisx) - void BgIcefloe_Init(Actor* thisx, PlayState* play); void BgIcefloe_Destroy(Actor* thisx, PlayState* play); void BgIcefloe_Update(Actor* thisx, PlayState* play); @@ -43,7 +41,7 @@ static InitChainEntry sInitChain[] = { static s32 numberSpawned; void BgIcefloe_Init(Actor* thisx, PlayState* play) { - BgIcefloe* this = THIS; + BgIcefloe* this = (BgIcefloe*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -68,7 +66,7 @@ void BgIcefloe_Init(Actor* thisx, PlayState* play) { } void BgIcefloe_Destroy(Actor* thisx, PlayState* play) { - BgIcefloe* this = THIS; + BgIcefloe* this = (BgIcefloe*)thisx; s32 i; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -163,7 +161,7 @@ void func_80AC4D2C(BgIcefloe* this, PlayState* play) { } void BgIcefloe_Update(Actor* thisx, PlayState* play) { - BgIcefloe* this = THIS; + BgIcefloe* this = (BgIcefloe*)thisx; if (!Play_InCsMode(play)) { this->actionFunc(this, play); @@ -171,7 +169,7 @@ void BgIcefloe_Update(Actor* thisx, PlayState* play) { } void BgIcefloe_Draw(Actor* thisx, PlayState* play) { - BgIcefloe* this = THIS; + BgIcefloe* this = (BgIcefloe*)thisx; Gfx_DrawDListOpa(play, gIcefloeIcePlatformDL); } diff --git a/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c b/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c index 06a0289599..cb78696e6b 100644 --- a/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c +++ b/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgIcicle*)thisx) - void BgIcicle_Init(Actor* thisx, PlayState* play); void BgIcicle_Destroy(Actor* thisx, PlayState* play); void BgIcicle_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ static InitChainEntry sInitChain[] = { void BgIcicle_Init(Actor* thisx, PlayState* play) { s32 pad; - BgIcicle* this = THIS; + BgIcicle* this = (BgIcicle*)thisx; s32 paramsHigh; s32 paramsMid; @@ -90,7 +88,7 @@ void BgIcicle_Init(Actor* thisx, PlayState* play) { } void BgIcicle_Destroy(Actor* thisx, PlayState* play) { - BgIcicle* this = THIS; + BgIcicle* this = (BgIcicle*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -230,7 +228,7 @@ void BgIcicle_UpdateAttacked(BgIcicle* this, PlayState* play) { void BgIcicle_Update(Actor* thisx, PlayState* play) { s32 pad; - BgIcicle* this = THIS; + BgIcicle* this = (BgIcicle*)thisx; BgIcicle_UpdateAttacked(this, play); this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c b/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c index 3b2402fee4..1871d448b3 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIkanaBlock*)thisx) - void BgIkanaBlock_Init(Actor* thisx, PlayState* play); void BgIkanaBlock_Destroy(Actor* thisx, PlayState* play); void BgIkanaBlock_Update(Actor* thisx, PlayState* play); @@ -181,7 +179,7 @@ s32 func_80B7EEB4(BgIkanaBlock* this, PlayState* play) { } void BgIkanaBlock_Init(Actor* thisx, PlayState* play) { - BgIkanaBlock* this = THIS; + BgIkanaBlock* this = (BgIkanaBlock*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -194,7 +192,7 @@ void BgIkanaBlock_Init(Actor* thisx, PlayState* play) { } void BgIkanaBlock_Destroy(Actor* thisx, PlayState* play) { - BgIkanaBlock* this = THIS; + BgIkanaBlock* this = (BgIkanaBlock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -343,7 +341,7 @@ void func_80B7F398(BgIkanaBlock* this, PlayState* play) { } void BgIkanaBlock_Update(Actor* thisx, PlayState* play) { - BgIkanaBlock* this = THIS; + BgIkanaBlock* this = (BgIkanaBlock*)thisx; if ((this->dyna.actor.shape.rot.x != this->unk_174.x) || (this->dyna.actor.shape.rot.y != this->unk_174.y) || (this->dyna.actor.shape.rot.z != this->unk_174.z)) { @@ -371,7 +369,7 @@ void BgIkanaBlock_Update(Actor* thisx, PlayState* play) { void func_80B7F564(Actor* thisx, PlayState* play) { s32 pad; - BgIkanaBlock* this = THIS; + BgIkanaBlock* this = (BgIkanaBlock*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c b/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c index ba106de13a..cece4a6233 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_UCODE_POINT_LIGHT_ENABLED) -#define THIS ((BgIkanaBombwall*)thisx) - void BgIkanaBombwall_Init(Actor* thisx, PlayState* play); void BgIkanaBombwall_Destroy(Actor* thisx, PlayState* play); void BgIkanaBombwall_Update(Actor* thisx, PlayState* play); @@ -233,7 +231,7 @@ void func_80BD4A14(BgIkanaBombwall* this, PlayState* play) { void BgIkanaBombwall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgIkanaBombwall* this = THIS; + BgIkanaBombwall* this = (BgIkanaBombwall*)thisx; s32 sp2C = BGIKANABOMBWALL_GET_100(&this->dyna.actor); CollisionHeader* colHeader; ColliderCylinderInit* cylinderInit; @@ -267,7 +265,7 @@ void BgIkanaBombwall_Init(Actor* thisx, PlayState* play) { } void BgIkanaBombwall_Destroy(Actor* thisx, PlayState* play) { - BgIkanaBombwall* this = THIS; + BgIkanaBombwall* this = (BgIkanaBombwall*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -365,7 +363,7 @@ void func_80BD5134(BgIkanaBombwall* this, PlayState* play) { } void BgIkanaBombwall_Update(Actor* thisx, PlayState* play) { - BgIkanaBombwall* this = THIS; + BgIkanaBombwall* this = (BgIkanaBombwall*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c b/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c index 15b41a4484..a418e08bff 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIkanaDharma*)thisx) - void BgIkanaDharma_Init(Actor* thisx, PlayState* play2); void BgIkanaDharma_Destroy(Actor* thisx, PlayState* play); void BgIkanaDharma_Update(Actor* thisx, PlayState* play); @@ -95,7 +93,7 @@ void BgIkanaDharma_SpawnEffects(BgIkanaDharma* this, PlayState* play) { void BgIkanaDharma_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgIkanaDharma* this = THIS; + BgIkanaDharma* this = (BgIkanaDharma*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->dyna.actor.scale.x = 0.3f; @@ -126,7 +124,7 @@ void BgIkanaDharma_Init(Actor* thisx, PlayState* play2) { } void BgIkanaDharma_Destroy(Actor* thisx, PlayState* play) { - BgIkanaDharma* this = THIS; + BgIkanaDharma* this = (BgIkanaDharma*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -215,7 +213,7 @@ void BgIkanaDharma_WaitForCutsceneToEnd(BgIkanaDharma* this, PlayState* play) { } void BgIkanaDharma_Update(Actor* thisx, PlayState* play) { - BgIkanaDharma* this = THIS; + BgIkanaDharma* this = (BgIkanaDharma*)thisx; this->actionFunc(this, play); if (this->actionFunc == BgIkanaDharma_WaitForHit) { @@ -258,7 +256,7 @@ void BgIkanaDharma_Update(Actor* thisx, PlayState* play) { } void BgIkanaDharma_Draw(Actor* thisx, PlayState* play) { - BgIkanaDharma* this = THIS; + BgIkanaDharma* this = (BgIkanaDharma*)thisx; Gfx_DrawDListOpa(play, gStoneTowerTemplePunchablePillarDL); } diff --git a/src/overlays/actors/ovl_Bg_Ikana_Mirror/z_bg_ikana_mirror.c b/src/overlays/actors/ovl_Bg_Ikana_Mirror/z_bg_ikana_mirror.c index f217184740..9924c21b30 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Mirror/z_bg_ikana_mirror.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Mirror/z_bg_ikana_mirror.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIkanaMirror*)thisx) - void BgIkanaMirror_Init(Actor* thisx, PlayState* play2); void BgIkanaMirror_Destroy(Actor* thisx, PlayState* play); void BgIkanaMirror_Update(Actor* thisx, PlayState* play); @@ -228,7 +226,7 @@ void BgIkanaMirror_SetQuadVertices(BgIkanaMirror* this) { void BgIkanaMirror_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgIkanaMirror* this = THIS; + BgIkanaMirror* this = (BgIkanaMirror*)thisx; ColliderTrisElementInit* element; Vec3f vertices[3]; s32 i; @@ -263,7 +261,7 @@ void BgIkanaMirror_Init(Actor* thisx, PlayState* play2) { } void BgIkanaMirror_Destroy(Actor* thisx, PlayState* play) { - BgIkanaMirror* this = THIS; + BgIkanaMirror* this = (BgIkanaMirror*)thisx; s32 i; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -370,14 +368,14 @@ void BgIkanaMirror_EmitLight(BgIkanaMirror* this, PlayState* play) { } void BgIkanaMirror_Update(Actor* thisx, PlayState* play) { - BgIkanaMirror* this = THIS; + BgIkanaMirror* this = (BgIkanaMirror*)thisx; this->actionFunc(this, play); } void BgIkanaMirror_Draw(Actor* thisx, PlayState* play) { s32 pad; - BgIkanaMirror* this = THIS; + BgIkanaMirror* this = (BgIkanaMirror*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Ikana_Ray/z_bg_ikana_ray.c b/src/overlays/actors/ovl_Bg_Ikana_Ray/z_bg_ikana_ray.c index d523a6c313..a7be92e94f 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Ray/z_bg_ikana_ray.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Ray/z_bg_ikana_ray.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgIkanaRay*)thisx) - void BgIkanaRay_Init(Actor* thisx, PlayState* play); void BgIkanaRay_Destroy(Actor* thisx, PlayState* play); void BgIkanaRay_Update(Actor* thisx, PlayState* play); @@ -61,7 +59,7 @@ static InitChainEntry sInitChain[] = { }; void BgIkanaRay_Init(Actor* thisx, PlayState* play) { - BgIkanaRay* this = THIS; + BgIkanaRay* this = (BgIkanaRay*)thisx; ColliderCylinder* collision = &this->collision; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -79,7 +77,7 @@ void BgIkanaRay_Init(Actor* thisx, PlayState* play) { } void BgIkanaRay_Destroy(Actor* thisx, PlayState* play) { - BgIkanaRay* this = THIS; + BgIkanaRay* this = (BgIkanaRay*)thisx; ColliderCylinder* collision = &this->collision; Collider_DestroyCylinder(play, collision); @@ -108,13 +106,13 @@ void BgIkanaRay_UpdateActivated(BgIkanaRay* this, PlayState* play) { } void BgIkanaRay_Update(Actor* thisx, PlayState* play) { - BgIkanaRay* this = THIS; + BgIkanaRay* this = (BgIkanaRay*)thisx; this->actionFunc(this, play); } void BgIkanaRay_Draw(Actor* thisx, PlayState* play) { - BgIkanaRay* this = THIS; + BgIkanaRay* this = (BgIkanaRay*)thisx; AnimatedMat_Draw(play, this->animatedTextures); Gfx_DrawDListXlu(play, object_ikana_obj_DL_001100); diff --git a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c index 5271c3db37..0e51231803 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgIkanaRotaryroom*)thisx) - void BgIkanaRotaryroom_Init(Actor* thisx, PlayState* play); void BgIkanaRotaryroom_Destroy(Actor* thisx, PlayState* play); void BgIkanaRotaryroom_Update(Actor* thisx, PlayState* play); @@ -703,7 +701,7 @@ s32 func_80B816A4(BgIkanaRotaryroom* this) { void BgIkanaRotaryroom_Init(Actor* thisx, PlayState* play) { s32 pad; - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; s32 sp34 = BGIKANAROTARYROOM_GET_1(&this->dyna.actor); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -741,7 +739,7 @@ void BgIkanaRotaryroom_Init(Actor* thisx, PlayState* play) { } void BgIkanaRotaryroom_Destroy(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(play, &this->collider); @@ -752,7 +750,7 @@ void func_80B818B4(BgIkanaRotaryroom* this) { } void func_80B818C8(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; s32 switchFlag; if (this->collider.base.acFlags & AC_HIT) { @@ -774,7 +772,7 @@ void func_80B81978(BgIkanaRotaryroom* this) { } void func_80B8198C(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; if (this->unk_204.unk_00 == NULL) { func_80B819DC(this); @@ -789,7 +787,7 @@ void func_80B819DC(BgIkanaRotaryroom* this) { } void func_80B819F0(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; if (CutsceneManager_IsNext(this->dyna.actor.csId)) { CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor); @@ -808,7 +806,7 @@ void func_80B81A64(BgIkanaRotaryroom* this) { } void func_80B81A80(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; s32 pad; s32 i; BgIkanaRotaryroomStruct1* ptr; @@ -846,7 +844,7 @@ void func_80B81B84(BgIkanaRotaryroom* this) { } void func_80B81BA0(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; s32 sp30 = 0; s32 i; @@ -918,7 +916,7 @@ void func_80B81DAC(BgIkanaRotaryroom* this) { void func_80B81DC8(Actor* thisx, PlayState* play) { s32 pad; - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; if (this->unk_584 > 10) { Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); @@ -938,7 +936,7 @@ void func_80B81DC8(Actor* thisx, PlayState* play) { } void BgIkanaRotaryroom_Update(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; BgIkanaRotaryroomStruct1* ptr; BgIkanaRotaryroomStruct1* ptr2; BgIkanaRotaryroomStruct2* ptr3; @@ -991,7 +989,7 @@ void BgIkanaRotaryroom_Update(Actor* thisx, PlayState* play) { } void BgIkanaRotaryroom_Draw(Actor* thisx, PlayState* play) { - BgIkanaRotaryroom* this = THIS; + BgIkanaRotaryroom* this = (BgIkanaRotaryroom*)thisx; s32 param = BGIKANAROTARYROOM_GET_1(&this->dyna.actor); if (!param) { diff --git a/src/overlays/actors/ovl_Bg_Ikana_Shutter/z_bg_ikana_shutter.c b/src/overlays/actors/ovl_Bg_Ikana_Shutter/z_bg_ikana_shutter.c index 28f2864731..a6c4bc8db2 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Shutter/z_bg_ikana_shutter.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Shutter/z_bg_ikana_shutter.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIkanaShutter*)thisx) - void BgIkanaShutter_Init(Actor* thisx, PlayState* play); void BgIkanaShutter_Destroy(Actor* thisx, PlayState* play); void BgIkanaShutter_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ bool BgIkanaShutter_AllSwitchesPressed(BgIkanaShutter* this, PlayState* play) { } void BgIkanaShutter_Init(Actor* thisx, PlayState* play) { - BgIkanaShutter* this = THIS; + BgIkanaShutter* this = (BgIkanaShutter*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -84,7 +82,7 @@ void BgIkanaShutter_Init(Actor* thisx, PlayState* play) { } void BgIkanaShutter_Destroy(Actor* thisx, PlayState* play) { - BgIkanaShutter* this = THIS; + BgIkanaShutter* this = (BgIkanaShutter*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -207,7 +205,7 @@ void BgIkanaShutter_DoNothing(BgIkanaShutter* this, PlayState* play) { } void BgIkanaShutter_Update(Actor* thisx, PlayState* play) { - BgIkanaShutter* this = THIS; + BgIkanaShutter* this = (BgIkanaShutter*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c b/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c index a183cc5feb..9627d56901 100644 --- a/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c +++ b/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgIkninSusceil*)thisx) - void BgIkninSusceil_Init(Actor* thisx, PlayState* play); void BgIkninSusceil_Destroy(Actor* thisx, PlayState* play); void BgIkninSusceil_Update(Actor* thisx, PlayState* play); @@ -116,7 +114,7 @@ s32 func_80C0A95C(BgIkninSusceil* this, PlayState* play) { } void BgIkninSusceil_Init(Actor* thisx, PlayState* play) { - BgIkninSusceil* this = THIS; + BgIkninSusceil* this = (BgIkninSusceil*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -126,7 +124,7 @@ void BgIkninSusceil_Init(Actor* thisx, PlayState* play) { } void BgIkninSusceil_Destroy(Actor* thisx, PlayState* play) { - BgIkninSusceil* this = THIS; + BgIkninSusceil* this = (BgIkninSusceil*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -227,7 +225,7 @@ void func_80C0AE5C(BgIkninSusceil* this, PlayState* play) { void BgIkninSusceil_Update(Actor* thisx, PlayState* play) { s32 pad; - BgIkninSusceil* this = THIS; + BgIkninSusceil* this = (BgIkninSusceil*)thisx; Player* player = GET_PLAYER(play); if ((this->unk168 == 0) && (this->unk166 > 0) && (player->stateFlags3 & PLAYER_STATE3_100) && @@ -262,7 +260,7 @@ void BgIkninSusceil_Update(Actor* thisx, PlayState* play) { } void BgIkninSusceil_Draw(Actor* thisx, PlayState* play) { - BgIkninSusceil* this = THIS; + BgIkninSusceil* this = (BgIkninSusceil*)thisx; AnimatedMat_Draw(play, this->animatedTexture); Gfx_DrawDListOpa(play, object_ikninside_obj_DL_00C308); diff --git a/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c b/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c index dcf823ecf4..762f79aaf7 100644 --- a/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c +++ b/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIkninside*)thisx) - void BgIkninside_Init(Actor* thisx, PlayState* play); void BgIkninside_Destroy(Actor* thisx, PlayState* play); void BgIkninside_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ static ColliderCylinderInit sCylinderInit = { }; void BgIkninside_Init(Actor* thisx, PlayState* play) { - BgIkninside* this = THIS; + BgIkninside* this = (BgIkninside*)thisx; CollisionHeader* colHeader = NULL; s32 pad; @@ -70,7 +68,7 @@ void BgIkninside_Init(Actor* thisx, PlayState* play) { } void BgIkninside_Destroy(Actor* thisx, PlayState* play) { - BgIkninside* this = THIS; + BgIkninside* this = (BgIkninside*)thisx; Collider_DestroyCylinder(play, &this->collider); DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -142,7 +140,7 @@ void func_80C072D0(BgIkninside* this, PlayState* play) { } void BgIkninside_Update(Actor* thisx, PlayState* play) { - BgIkninside* this = THIS; + BgIkninside* this = (BgIkninside*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c b/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c index d50e110745..25e5fcd019 100644 --- a/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c +++ b/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgIknvDoukutu*)thisx) - void BgIknvDoukutu_Init(Actor* thisx, PlayState* play); void BgIknvDoukutu_Destroy(Actor* thisx, PlayState* play); void BgIknvDoukutu_Update(Actor* thisx, PlayState* play); @@ -40,7 +38,7 @@ ActorProfile Bg_Iknv_Doukutu_Profile = { }; void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; CollisionHeader* colHeader = NULL; s32 pad; @@ -96,7 +94,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) { } void BgIknvDoukutu_Destroy(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; if ((BGIKNVDOUKUTU_GET_F(&this->dyna.actor) == BGIKNVDOUKUTU_F_1) || (BGIKNVDOUKUTU_GET_F(&this->dyna.actor) == BGIKNVDOUKUTU_F_2)) { @@ -156,13 +154,13 @@ void func_80BD73D0(BgIknvDoukutu* this, PlayState* play) { } void BgIknvDoukutu_Update(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; this->actionFunc(this, play); } void BgIknvDoukutu_Draw(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -184,7 +182,7 @@ void BgIknvDoukutu_Draw(Actor* thisx, PlayState* play) { } void func_80BD7538(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; GraphicsContext* gfxCtx; f32 sp54; @@ -218,7 +216,7 @@ void func_80BD7538(Actor* thisx, PlayState* play) { } void func_80BD7768(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -235,7 +233,7 @@ void func_80BD7768(Actor* thisx, PlayState* play) { } void func_80BD7820(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -251,7 +249,7 @@ void func_80BD7820(Actor* thisx, PlayState* play) { } void func_80BD78C4(Actor* thisx, PlayState* play) { - BgIknvDoukutu* this = THIS; + BgIknvDoukutu* this = (BgIknvDoukutu*)thisx; f32 sp30 = this->unk_160; s32 pad; diff --git a/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c b/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c index 98b24a0992..f09287a520 100644 --- a/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c +++ b/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgIknvObj*)thisx) - void BgIknvObj_Init(Actor* thisx, PlayState* play); void BgIknvObj_Destroy(Actor* thisx, PlayState* play); void BgIknvObj_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ static ColliderCylinderInit sCylinderInit = { void BgIknvObj_Init(Actor* thisx, PlayState* play) { s32 pad; - BgIknvObj* this = THIS; + BgIknvObj* this = (BgIknvObj*)thisx; CollisionHeader* colHeader = NULL; Actor_SetScale(&this->dyna.actor, 0.1f); @@ -97,7 +95,7 @@ void BgIknvObj_Init(Actor* thisx, PlayState* play) { } void BgIknvObj_Destroy(Actor* thisx, PlayState* play) { - BgIknvObj* this = THIS; + BgIknvObj* this = (BgIknvObj*)thisx; if (IKNV_OBJ_TYPE(this) != IKNV_OBJ_RAISED_DOOR) { if (IKNV_OBJ_TYPE(this) == IKNV_OBJ_SAKON_DOOR) { @@ -206,13 +204,13 @@ void BgIknvObj_DoNothing(BgIknvObj* this, PlayState* play) { } void BgIknvObj_Update(Actor* thisx, PlayState* play) { - BgIknvObj* this = THIS; + BgIknvObj* this = (BgIknvObj*)thisx; this->actionFunc(this, play); } void BgIknvObj_Draw(Actor* thisx, PlayState* play) { - BgIknvObj* this = THIS; + BgIknvObj* this = (BgIknvObj*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 8fe63207fa..419066883b 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgIngate*)thisx) - void BgIngate_Init(Actor* thisx, PlayState* play2); void BgIngate_Destroy(Actor* thisx, PlayState* play); void BgIngate_Update(Actor* thisx, PlayState* play); @@ -319,7 +317,7 @@ void func_809543D4(BgIngate* this, PlayState* play) { void BgIngate_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgIngate* this = THIS; + BgIngate* this = (BgIngate*)thisx; s32 phi_a2; Vec3s* sp38; Vec3f sp2C; @@ -372,7 +370,7 @@ void BgIngate_Init(Actor* thisx, PlayState* play2) { } void BgIngate_Destroy(Actor* thisx, PlayState* play) { - BgIngate* this = THIS; + BgIngate* this = (BgIngate*)thisx; if (this->unk160 & 8) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -380,7 +378,7 @@ void BgIngate_Destroy(Actor* thisx, PlayState* play) { } void BgIngate_Update(Actor* thisx, PlayState* play) { - BgIngate* this = THIS; + BgIngate* this = (BgIngate*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.c b/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.c index c4c897bdb9..b236554353 100644 --- a/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.c +++ b/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgInibsMovebg*)thisx) - void BgInibsMovebg_Init(Actor* thisx, PlayState* play); void BgInibsMovebg_Destroy(Actor* thisx, PlayState* play); void BgInibsMovebg_Draw(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void BgInibsMovebg_Init(Actor* thisx, PlayState* play) { - BgInibsMovebg* this = THIS; + BgInibsMovebg* this = (BgInibsMovebg*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -47,13 +45,13 @@ void BgInibsMovebg_Init(Actor* thisx, PlayState* play) { } void BgInibsMovebg_Destroy(Actor* thisx, PlayState* play) { - BgInibsMovebg* this = THIS; + BgInibsMovebg* this = (BgInibsMovebg*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgInibsMovebg_Draw(Actor* thisx, PlayState* play) { - BgInibsMovebg* this = THIS; + BgInibsMovebg* this = (BgInibsMovebg*)thisx; AnimatedMaterial* sandTexAnim; Gfx* opaDList; Gfx* xluDList; diff --git a/src/overlays/actors/ovl_Bg_Keikoku_Saku/z_bg_keikoku_saku.c b/src/overlays/actors/ovl_Bg_Keikoku_Saku/z_bg_keikoku_saku.c index e438a5f807..aff756914a 100644 --- a/src/overlays/actors/ovl_Bg_Keikoku_Saku/z_bg_keikoku_saku.c +++ b/src/overlays/actors/ovl_Bg_Keikoku_Saku/z_bg_keikoku_saku.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgKeikokuSaku*)thisx) - void BgKeikokuSaku_Init(Actor* thisx, PlayState* play); void BgKeikokuSaku_Destroy(Actor* thisx, PlayState* play); void BgKeikokuSaku_Update(Actor* thisx, PlayState* play); @@ -34,7 +32,7 @@ ActorProfile Bg_Keikoku_Saku_Profile = { void BgKeikokuSaku_Init(Actor* thisx, PlayState* play) { s32 pad; - BgKeikokuSaku* this = THIS; + BgKeikokuSaku* this = (BgKeikokuSaku*)thisx; CollisionHeader* colHeader = NULL; DynaPolyActor_Init(&this->dyna, 0); @@ -49,7 +47,7 @@ void BgKeikokuSaku_Init(Actor* thisx, PlayState* play) { } void BgKeikokuSaku_Destroy(Actor* thisx, PlayState* play) { - BgKeikokuSaku* this = THIS; + BgKeikokuSaku* this = (BgKeikokuSaku*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -77,7 +75,7 @@ void func_80A53994(BgKeikokuSaku* this, PlayState* play) { } void BgKeikokuSaku_Update(Actor* thisx, PlayState* play) { - BgKeikokuSaku* this = THIS; + BgKeikokuSaku* this = (BgKeikokuSaku*)thisx; if (this->timer) { this->timer--; diff --git a/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c b/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c index f23688c7f6..cec07ebedf 100644 --- a/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c +++ b/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgKeikokuSpr*)thisx) - void BgKeikokuSpr_Init(Actor* thisx, PlayState* play); void BgKeikokuSpr_Destroy(Actor* thisx, PlayState* play); void BgKeikokuSpr_Update(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void BgKeikokuSpr_Init(Actor* thisx, PlayState* play) { - BgKeikokuSpr* this = THIS; + BgKeikokuSpr* this = (BgKeikokuSpr*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); } diff --git a/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c b/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c index d1e7774c51..8c657d6ebf 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UCODE_POINT_LIGHT_ENABLED) -#define THIS ((BgKin2Bombwall*)thisx) - void BgKin2Bombwall_Init(Actor* thisx, PlayState* play); void BgKin2Bombwall_Destroy(Actor* thisx, PlayState* play); void BgKin2Bombwall_Update(Actor* thisx, PlayState* play); @@ -138,7 +136,7 @@ static InitChainEntry sInitChain[] = { }; void BgKin2Bombwall_Init(Actor* thisx, PlayState* play) { - BgKin2Bombwall* this = THIS; + BgKin2Bombwall* this = (BgKin2Bombwall*)thisx; ColliderCylinder* bombwallCollider; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -158,7 +156,7 @@ void BgKin2Bombwall_Init(Actor* thisx, PlayState* play) { } void BgKin2Bombwall_Destroy(Actor* thisx, PlayState* play) { - BgKin2Bombwall* this = THIS; + BgKin2Bombwall* this = (BgKin2Bombwall*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -211,13 +209,13 @@ void BgKin2Bombwall_EndCutscene(BgKin2Bombwall* this, PlayState* play) { } void BgKin2Bombwall_Update(Actor* thisx, PlayState* play) { - BgKin2Bombwall* this = THIS; + BgKin2Bombwall* this = (BgKin2Bombwall*)thisx; this->actionFunc(this, play); } void BgKin2Bombwall_Draw(Actor* thisx, PlayState* play) { - BgKin2Bombwall* this = THIS; + BgKin2Bombwall* this = (BgKin2Bombwall*)thisx; Gfx_DrawDListOpa(play, gOceanSpiderHouseBombableWallDL); Gfx_DrawDListXlu(play, gOceanSpiderHouseBombableWallCrackDL); diff --git a/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c b/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c index de0f8042eb..ad256217d6 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgKin2Fence*)thisx) - void BgKin2Fence_Init(Actor* thisx, PlayState* play); void BgKin2Fence_Destroy(Actor* thisx, PlayState* play); void BgKin2Fence_Update(Actor* thisx, PlayState* play); @@ -141,7 +139,7 @@ static InitChainEntry sInitChain[] = { }; void BgKin2Fence_Init(Actor* thisx, PlayState* play) { - BgKin2Fence* this = THIS; + BgKin2Fence* this = (BgKin2Fence*)thisx; s32 i = 0; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -165,7 +163,7 @@ void BgKin2Fence_Init(Actor* thisx, PlayState* play) { } void BgKin2Fence_Destroy(Actor* thisx, PlayState* play) { - BgKin2Fence* this = THIS; + BgKin2Fence* this = (BgKin2Fence*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(play, &this->collider); @@ -253,7 +251,7 @@ void BgKin2Fence_DoNothing(BgKin2Fence* this, PlayState* play) { } void BgKin2Fence_Update(Actor* thisx, PlayState* play) { - BgKin2Fence* this = THIS; + BgKin2Fence* this = (BgKin2Fence*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c b/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c index 7100d64e98..b1b3cbe561 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgKin2Picture*)thisx) - void BgKin2Picture_Init(Actor* thisx, PlayState* play); void BgKin2Picture_Destroy(Actor* thisx, PlayState* play); void BgKin2Picture_Update(Actor* thisx, PlayState* play); @@ -152,7 +150,7 @@ void BgKin2Picture_SpawnDust(BgKin2Picture* this, PlayState* play) { void BgKin2Picture_Init(Actor* thisx, PlayState* play) { s32 pad; - BgKin2Picture* this = THIS; + BgKin2Picture* this = (BgKin2Picture*)thisx; s32 skulltulaParams; Vec3f vertices[3]; s32 i; @@ -188,7 +186,7 @@ void BgKin2Picture_Init(Actor* thisx, PlayState* play) { } void BgKin2Picture_Destroy(Actor* thisx, PlayState* play) { - BgKin2Picture* this = THIS; + BgKin2Picture* this = (BgKin2Picture*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(play, &this->colliderTris); @@ -333,13 +331,13 @@ void BgKin2Picture_DoNothing(BgKin2Picture* this, PlayState* play) { } void BgKin2Picture_Update(Actor* thisx, PlayState* play) { - BgKin2Picture* this = THIS; + BgKin2Picture* this = (BgKin2Picture*)thisx; this->actionFunc(this, play); } void BgKin2Picture_Draw(Actor* thisx, PlayState* play) { - BgKin2Picture* this = THIS; + BgKin2Picture* this = (BgKin2Picture*)thisx; Gfx_DrawDListOpa(play, gOceanSpiderHouseSkullkidPaintingDL); } diff --git a/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c b/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c index 59980fc8f3..1889485f41 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgKin2Shelf*)thisx) - void BgKin2Shelf_Init(Actor* thisx, PlayState* play); void BgKin2Shelf_Destroy(Actor* thisx, PlayState* play); void BgKin2Shelf_Update(Actor* thisx, PlayState* play); @@ -191,7 +189,7 @@ bool func_80B6FF28(BgKin2Shelf* this, PlayState* play) { void BgKin2Shelf_Init(Actor* thisx, PlayState* play) { s32 pad; - BgKin2Shelf* this = THIS; + BgKin2Shelf* this = (BgKin2Shelf*)thisx; s32 sp24 = BGKIN2SHELF_GET_1(&this->dyna.actor); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -213,7 +211,7 @@ void BgKin2Shelf_Init(Actor* thisx, PlayState* play) { } void BgKin2Shelf_Destroy(Actor* thisx, PlayState* play) { - BgKin2Shelf* this = THIS; + BgKin2Shelf* this = (BgKin2Shelf*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -368,7 +366,7 @@ void func_80B704B4(BgKin2Shelf* this, PlayState* play) { } void BgKin2Shelf_Update(Actor* thisx, PlayState* play) { - BgKin2Shelf* this = THIS; + BgKin2Shelf* this = (BgKin2Shelf*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c b/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c index 71fbbec818..26397e406d 100644 --- a/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c +++ b/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgLadder*)thisx) - void BgLadder_Init(Actor* thisx, PlayState* play); void BgLadder_Destroy(Actor* thisx, PlayState* play); void BgLadder_Update(Actor* thisx, PlayState* play); @@ -44,7 +42,7 @@ static Gfx* sLadderDLists[] = { }; void BgLadder_Init(Actor* thisx, PlayState* play) { - BgLadder* this = THIS; + BgLadder* this = (BgLadder*)thisx; BgLadderSize size; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -82,7 +80,7 @@ void BgLadder_Init(Actor* thisx, PlayState* play) { } void BgLadder_Destroy(Actor* thisx, PlayState* play) { - BgLadder* this = THIS; + BgLadder* this = (BgLadder*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -123,13 +121,13 @@ void BgLadder_DoNothing(BgLadder* this, PlayState* play) { } void BgLadder_Update(Actor* thisx, PlayState* play) { - BgLadder* this = THIS; + BgLadder* this = (BgLadder*)thisx; this->action(this, play); } void BgLadder_Draw(Actor* thisx, PlayState* play) { - BgLadder* this = THIS; + BgLadder* this = (BgLadder*)thisx; s32 pad; Gfx* gfx; diff --git a/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c b/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c index ace7a3e8d8..a4b270aeae 100644 --- a/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c +++ b/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgLastBwall*)thisx) - typedef struct { /* 0x0 */ Vec3s* posOffsets; /* 0x4 */ s16* indices; @@ -145,7 +143,7 @@ void BgLastBwall_InitCollider(ColliderTrisInit* init, Vec3f* pos, Vec3s* rot, Co void BgLastBwall_Init(Actor* thisx, PlayState* play) { s32 pad; - BgLastBwall* this = THIS; + BgLastBwall* this = (BgLastBwall*)thisx; Actor_ProcessInitChain(&this->dyna.actor, D_80C18AC8); this->type = BGLASTBWALL_GET_TYPE(&this->dyna.actor); @@ -169,7 +167,7 @@ void BgLastBwall_Init(Actor* thisx, PlayState* play) { } void BgLastBwall_Destroy(Actor* thisx, PlayState* play) { - BgLastBwall* this = THIS; + BgLastBwall* this = (BgLastBwall*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -257,14 +255,14 @@ void BgLastBwall_DoNothing(BgLastBwall* this, PlayState* play) { } void BgLastBwall_Update(Actor* thisx, PlayState* play) { - BgLastBwall* this = THIS; + BgLastBwall* this = (BgLastBwall*)thisx; this->actionFunc(this, play); } void BgLastBwall_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgLastBwall* this = THIS; + BgLastBwall* this = (BgLastBwall*)thisx; Gfx_DrawDListOpa(play, D_80C18A48[this->type].dList); } diff --git a/src/overlays/actors/ovl_Bg_Lbfshot/z_bg_lbfshot.c b/src/overlays/actors/ovl_Bg_Lbfshot/z_bg_lbfshot.c index fb43f4db75..6f3ccf66d4 100644 --- a/src/overlays/actors/ovl_Bg_Lbfshot/z_bg_lbfshot.c +++ b/src/overlays/actors/ovl_Bg_Lbfshot/z_bg_lbfshot.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgLbfshot*)thisx) - void BgLbfshot_Init(Actor* thisx, PlayState* play); void BgLbfshot_Destroy(Actor* thisx, PlayState* play); void BgLbfshot_Draw(Actor* thisx, PlayState* play); @@ -32,7 +30,7 @@ static InitChainEntry sInitChain[] = { }; void BgLbfshot_Init(Actor* thisx, PlayState* play) { - BgLbfshot* this = THIS; + BgLbfshot* this = (BgLbfshot*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->dyna.actor.uncullZoneForward = 4000.0f; @@ -40,7 +38,7 @@ void BgLbfshot_Init(Actor* thisx, PlayState* play) { DynaPolyActor_LoadMesh(play, &this->dyna, &object_lbfshot_Colheader_0014D8); } void BgLbfshot_Destroy(Actor* thisx, PlayState* play) { - BgLbfshot* this = THIS; + BgLbfshot* this = (BgLbfshot*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } diff --git a/src/overlays/actors/ovl_Bg_Lotus/z_bg_lotus.c b/src/overlays/actors/ovl_Bg_Lotus/z_bg_lotus.c index 4ca75e086a..3292b8c31e 100644 --- a/src/overlays/actors/ovl_Bg_Lotus/z_bg_lotus.c +++ b/src/overlays/actors/ovl_Bg_Lotus/z_bg_lotus.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgLotus*)thisx) - void BgLotus_Init(Actor* thisx, PlayState* play); void BgLotus_Destroy(Actor* thisx, PlayState* play); void BgLotus_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ static InitChainEntry sInitChain[] = { }; void BgLotus_Init(Actor* thisx, PlayState* play) { - BgLotus* this = THIS; + BgLotus* this = (BgLotus*)thisx; s32 pad; s32 bgId; @@ -46,7 +44,7 @@ void BgLotus_Init(Actor* thisx, PlayState* play) { } void BgLotus_Destroy(Actor* thisx, PlayState* play) { - BgLotus* this = THIS; + BgLotus* this = (BgLotus*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -146,7 +144,7 @@ void func_80AD6B68(BgLotus* this, PlayState* play) { } void BgLotus_Update(Actor* thisx, PlayState* play) { - BgLotus* this = THIS; + BgLotus* this = (BgLotus*)thisx; s32 pad; WaterBox* waterBox; @@ -156,7 +154,7 @@ void BgLotus_Update(Actor* thisx, PlayState* play) { } void BgLotus_Draw(Actor* thisx, PlayState* play) { - BgLotus* this = THIS; + BgLotus* this = (BgLotus*)thisx; Gfx_DrawDListOpa(play, gLilyPadDL); } diff --git a/src/overlays/actors/ovl_Bg_Market_Step/z_bg_market_step.c b/src/overlays/actors/ovl_Bg_Market_Step/z_bg_market_step.c index 8ac1130906..77fbe0a33c 100644 --- a/src/overlays/actors/ovl_Bg_Market_Step/z_bg_market_step.c +++ b/src/overlays/actors/ovl_Bg_Market_Step/z_bg_market_step.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_20 | ACTOR_FLAG_UCODE_POINT_LIGHT_ENABLED) -#define THIS ((BgMarketStep*)thisx) - void BgMarketStep_Init(Actor* thisx, PlayState* play); void BgMarketStep_Draw(Actor* thisx, PlayState* play); @@ -44,7 +42,7 @@ Gfx* sBankAdvertisementsAndDoorDLs[] = { }; void BgMarketStep_Init(Actor* thisx, PlayState* play) { - BgMarketStep* this = THIS; + BgMarketStep* this = (BgMarketStep*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); } diff --git a/src/overlays/actors/ovl_Bg_Mbar_Chair/z_bg_mbar_chair.c b/src/overlays/actors/ovl_Bg_Mbar_Chair/z_bg_mbar_chair.c index b92a2703ca..870c999433 100644 --- a/src/overlays/actors/ovl_Bg_Mbar_Chair/z_bg_mbar_chair.c +++ b/src/overlays/actors/ovl_Bg_Mbar_Chair/z_bg_mbar_chair.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgMbarChair*)thisx) - void BgMbarChair_Init(Actor* thisx, PlayState* play); void BgMbarChair_Destroy(Actor* thisx, PlayState* play); void BgMbarChair_Update(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void BgMbarChair_Init(Actor* thisx, PlayState* play) { - BgMbarChair* this = THIS; + BgMbarChair* this = (BgMbarChair*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -44,7 +42,7 @@ void BgMbarChair_Init(Actor* thisx, PlayState* play) { } void BgMbarChair_Destroy(Actor* thisx, PlayState* play) { - BgMbarChair* this = THIS; + BgMbarChair* this = (BgMbarChair*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } diff --git a/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c b/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c index 4517adb697..c98aa7a28b 100644 --- a/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c +++ b/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((BgNumaHana*)thisx) - void BgNumaHana_Init(Actor* thisx, PlayState* play); void BgNumaHana_Destroy(Actor* thisx, PlayState* play); void BgNumaHana_Update(Actor* thisx, PlayState* play); @@ -140,7 +138,7 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) { s32 pad; DynaPolyActor* child; s32 type; - BgNumaHana* this = THIS; + BgNumaHana* this = (BgNumaHana*)thisx; type = BG_NUMA_HANA_GET_TYPE(&this->dyna.actor); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -190,7 +188,7 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) { } void BgNumaHana_Destroy(Actor* thisx, PlayState* play) { - BgNumaHana* this = THIS; + BgNumaHana* this = (BgNumaHana*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); if (BG_NUMA_HANA_GET_TYPE(&this->dyna.actor) == BG_NUMA_HANA_TYPE_NORMAL) { @@ -351,7 +349,7 @@ void BgNumaHana_OpenedIdle(BgNumaHana* this, PlayState* play) { void BgNumaHana_Update(Actor* thisx, PlayState* play) { s32 pad; - BgNumaHana* this = THIS; + BgNumaHana* this = (BgNumaHana*)thisx; s32 type = BG_NUMA_HANA_GET_TYPE(&this->dyna.actor); Vec3f firePos; @@ -375,7 +373,7 @@ void BgNumaHana_Update(Actor* thisx, PlayState* play) { void BgNumaHana_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BgNumaHana* this = THIS; + BgNumaHana* this = (BgNumaHana*)thisx; WoodenFlowerPetalPosRot* innerPetalPosRot; WoodenFlowerPetalPosRot* outerPetalPosRot; s32 objectSlot; diff --git a/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c b/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c index 63edc4c6f3..88b5bf5e7d 100644 --- a/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c +++ b/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgOpenShutter*)thisx) - void BgOpenShutter_Init(Actor* thisx, PlayState* play); void BgOpenShutter_Destroy(Actor* thisx, PlayState* play); void BgOpenShutter_Update(Actor* thisx, PlayState* play2); @@ -89,7 +87,7 @@ s8 func_80ACABA8(BgOpenShutter* this, PlayState* play) { } void BgOpenShutter_Init(Actor* thisx, PlayState* play) { - BgOpenShutter* this = THIS; + BgOpenShutter* this = (BgOpenShutter*)thisx; Actor_ProcessInitChain(&this->slidingDoor.dyna.actor, sInitChain); DynaPolyActor_Init(&this->slidingDoor.dyna, DYNA_TRANSFORM_POS); @@ -98,7 +96,7 @@ void BgOpenShutter_Init(Actor* thisx, PlayState* play) { } void BgOpenShutter_Destroy(Actor* thisx, PlayState* play) { - BgOpenShutter* this = THIS; + BgOpenShutter* this = (BgOpenShutter*)thisx; s32 transition = DOOR_GET_TRANSITION_ID(thisx); play->transitionActors.list[transition].id = -play->transitionActors.list[transition].id; @@ -167,7 +165,7 @@ void func_80ACAEF0(BgOpenShutter* this, PlayState* play) { } void BgOpenShutter_Update(Actor* thisx, PlayState* play2) { - BgOpenShutter* this = THIS; + BgOpenShutter* this = (BgOpenShutter*)thisx; PlayState* play = play2; s32 cueChannel; diff --git a/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.c b/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.c index e8121511c4..22d1fa7f2b 100644 --- a/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.c +++ b/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgOpenSpot*)thisx) - void BgOpenSpot_Init(Actor* thisx, PlayState* play); void BgOpenSpot_Destroy(Actor* thisx, PlayState* play); void BgOpenSpot_Update(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void BgOpenSpot_Init(Actor* thisx, PlayState* play) { - BgOpenSpot* this = THIS; + BgOpenSpot* this = (BgOpenSpot*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->texScrolls = Lib_SegmentedToVirtual(gSpotlightTexAnim); @@ -46,7 +44,7 @@ void BgOpenSpot_Destroy(Actor* thisx, PlayState* play) { } void BgOpenSpot_Update(Actor* thisx, PlayState* play) { - BgOpenSpot* this = THIS; + BgOpenSpot* this = (BgOpenSpot*)thisx; u32 cueId; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_125)) { diff --git a/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c b/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c index 6c57ead363..eaad738921 100644 --- a/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c +++ b/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c @@ -17,8 +17,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((BgSinkaiKabe*)thisx) - void BgSinkaiKabe_Init(Actor* thisx, PlayState* play); void BgSinkaiKabe_Destroy(Actor* thisx, PlayState* play); void BgSinkaiKabe_Update(Actor* thisx, PlayState* play); @@ -40,7 +38,7 @@ ActorProfile Bg_Sinkai_Kabe_Profile = { static s32 sCurrentPythonIndex = 0; void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) { - BgSinkaiKabe* this = THIS; + BgSinkaiKabe* this = (BgSinkaiKabe*)thisx; s32 pad; CollisionHeader* colHeader = NULL; Vec3f pos; @@ -111,7 +109,7 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) { } void BgSinkaiKabe_Destroy(Actor* thisx, PlayState* play) { - BgSinkaiKabe* this = THIS; + BgSinkaiKabe* this = (BgSinkaiKabe*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -146,7 +144,7 @@ void BgSinkaiKabe_WaitForPlayer(BgSinkaiKabe* this, PlayState* play) { } void BgSinkaiKabe_Update(Actor* thisx, PlayState* play) { - BgSinkaiKabe* this = THIS; + BgSinkaiKabe* this = (BgSinkaiKabe*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c index 8270b4ddfb..32ea38fd66 100644 --- a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c +++ b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpdweb*)thisx) - void BgSpdweb_Init(Actor* thisx, PlayState* play); void BgSpdweb_Destroy(Actor* thisx, PlayState* play); void BgSpdweb_Update(Actor* thisx, PlayState* play); @@ -144,7 +142,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpdweb_Init(Actor* thisx, PlayState* play) { - BgSpdweb* this = THIS; + BgSpdweb* this = (BgSpdweb*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->unk_161 = 0; @@ -175,7 +173,7 @@ void BgSpdweb_Init(Actor* thisx, PlayState* play) { } void BgSpdweb_Destroy(Actor* thisx, PlayState* play) { - BgSpdweb* this = THIS; + BgSpdweb* this = (BgSpdweb*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(play, &this->collider); @@ -485,7 +483,7 @@ void func_809CEEAC(BgSpdweb* this, PlayState* play) { } void BgSpdweb_Update(Actor* thisx, PlayState* play) { - BgSpdweb* this = THIS; + BgSpdweb* this = (BgSpdweb*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c b/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c index abcca806a6..76a4247f8e 100644 --- a/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c +++ b/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpoutFire*)thisx) - void BgSpoutFire_Init(Actor* thisx, PlayState* play); void BgSpoutFire_Destroy(Actor* thisx, PlayState* play); void BgSpoutFire_Update(Actor* thisx, PlayState* play); @@ -65,7 +63,7 @@ static s32 sTexturesDesegmented = false; void BgSpoutFire_Init(Actor* thisx, PlayState* play) { s32 i; - BgSpoutFire* this = THIS; + BgSpoutFire* this = (BgSpoutFire*)thisx; this->actor.scale.z = 1350.0f * 0.0001f; this->actor.scale.x = 1350.0f * 0.0001f; @@ -85,7 +83,7 @@ void BgSpoutFire_Init(Actor* thisx, PlayState* play) { } void BgSpoutFire_Destroy(Actor* thisx, PlayState* play) { - BgSpoutFire* this = THIS; + BgSpoutFire* this = (BgSpoutFire*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -168,7 +166,7 @@ void func_80A60E08(BgSpoutFire* this, PlayState* play) { void BgSpoutFire_Update(Actor* thisx, PlayState* play) { s32 pad; - BgSpoutFire* this = THIS; + BgSpoutFire* this = (BgSpoutFire*)thisx; this->flameTexIndex = (this->flameTexIndex + 1) % 8; if ((this->collider.base.atFlags & AT_HIT)) { @@ -185,7 +183,7 @@ void BgSpoutFire_Update(Actor* thisx, PlayState* play) { } void BgSpoutFire_Draw(Actor* thisx, PlayState* play) { - BgSpoutFire* this = THIS; + BgSpoutFire* this = (BgSpoutFire*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Tobira01/z_bg_tobira01.c b/src/overlays/actors/ovl_Bg_Tobira01/z_bg_tobira01.c index b44885479e..0fedc84041 100644 --- a/src/overlays/actors/ovl_Bg_Tobira01/z_bg_tobira01.c +++ b/src/overlays/actors/ovl_Bg_Tobira01/z_bg_tobira01.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BgTobira01*)thisx) - void BgTobira01_Init(Actor* thisx, PlayState* play); void BgTobira01_Destroy(Actor* thisx, PlayState* play); void BgTobira01_Update(Actor* thisx, PlayState* play); @@ -72,7 +70,7 @@ void BgTobira01_Action(BgTobira01* this, PlayState* play) { } void BgTobira01_Init(Actor* thisx, PlayState* play) { - BgTobira01* this = THIS; + BgTobira01* this = (BgTobira01*)thisx; DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); DynaPolyActor_LoadMesh(play, &this->dyna, &gGoronDoorCol); @@ -84,13 +82,13 @@ void BgTobira01_Init(Actor* thisx, PlayState* play) { } void BgTobira01_Destroy(Actor* thisx, PlayState* play) { - BgTobira01* this = THIS; + BgTobira01* this = (BgTobira01*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgTobira01_Update(Actor* thisx, PlayState* play) { - BgTobira01* this = THIS; + BgTobira01* this = (BgTobira01*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index 9f53e650eb..acb769428a 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgUmajump*)thisx) - void BgUmajump_Init(Actor* thisx, PlayState* play); void BgUmajump_Destroy(Actor* thisx, PlayState* play); void BgUmajump_Update(Actor* thisx, PlayState* play); @@ -79,7 +77,7 @@ void BgUmajump_CheckDistance(BgUmajump* this, PlayState* play) { } void BgUmajump_Init(Actor* thisx, PlayState* play) { - BgUmajump* this = THIS; + BgUmajump* this = (BgUmajump*)thisx; Actor_ProcessInitChain(thisx, sInitChain); @@ -118,13 +116,13 @@ void BgUmajump_Init(Actor* thisx, PlayState* play) { } void BgUmajump_Destroy(Actor* thisx, PlayState* play) { - BgUmajump* this = THIS; + BgUmajump* this = (BgUmajump*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void BgUmajump_Update(Actor* thisx, PlayState* play) { - BgUmajump* this = THIS; + BgUmajump* this = (BgUmajump*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->dyna.actor.objectSlot = this->objectSlot; @@ -175,7 +173,7 @@ void BgUmajump_Update(Actor* thisx, PlayState* play) { } void func_8091A5A0(Actor* thisx, PlayState* play) { - BgUmajump* this = THIS; + BgUmajump* this = (BgUmajump*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, play); @@ -209,7 +207,7 @@ void func_8091A5A0(Actor* thisx, PlayState* play) { } void BgUmajump_Draw(Actor* thisx, PlayState* play) { - BgUmajump* this = THIS; + BgUmajump* this = (BgUmajump*)thisx; if (this->dyna.bgId != BGACTOR_NEG_ONE) { Gfx_DrawDListOpa(play, gHorseJumpFenceDL); diff --git a/src/overlays/actors/ovl_Boss_01/z_boss_01.c b/src/overlays/actors/ovl_Boss_01/z_boss_01.c index e655f3150a..bcf2a0f91c 100644 --- a/src/overlays/actors/ovl_Boss_01/z_boss_01.c +++ b/src/overlays/actors/ovl_Boss_01/z_boss_01.c @@ -37,8 +37,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((Boss01*)thisx) - #define ODOLWA_EFFECT_COUNT 100 // This actor has an array of timers in its instance, but it only ever uses the first entry. @@ -867,7 +865,7 @@ void Boss01_SpawnDustAtFeet(Boss01* this, PlayState* play, u8 dustSpawnFrameMask } void Boss01_Init(Actor* thisx, PlayState* play) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; s32 pad; s16 i; @@ -2338,7 +2336,7 @@ s32 Boss01_ArePlayerAndActorFacing(Boss01* this, PlayState* play) { } void Boss01_Update(Actor* thisx, PlayState* play2) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; PlayState* play = play2; s32 i; Player* player = GET_PLAYER(play); @@ -2642,7 +2640,7 @@ void Boss01_DrawSwordTrail(Boss01* this, PlayState* play) { } s32 Boss01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; if (limbIndex == ODOLWA_LIMB_HEAD) { // The rot variable here is in model space, whereas the headRot variables are in world space. @@ -2801,7 +2799,7 @@ static s8 sLimbToBodyParts[] = { }; void Boss01_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; PlayState* play = play2; s8 bodyPartIndex; Vec3f pos; @@ -2881,7 +2879,7 @@ void Boss01_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* ro void Boss01_Draw(Actor* thisx, PlayState* play) { static Vec3f sDefaultPelvisColliderOffset = { 10000.0f, 10000.0f, 10000.0f }; - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; s32 pad; u8* tex = GRAPH_ALLOC(play->state.gfxCtx, ODOLWA_SHADOW_TEX_SIZE); @@ -2922,7 +2920,7 @@ void Boss01_Draw(Actor* thisx, PlayState* play) { } void Boss01_Afterimage_Draw(Actor* thisx, PlayState* play) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; s32 pad; Boss01* parent = (Boss01*)this->actor.parent; @@ -3304,7 +3302,7 @@ void Boss01_Bug_UpdateDamage(Boss01* this, PlayState* play) { } void Boss01_Bug_Update(Actor* thisx, PlayState* play) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; s32 pad; s32 i; @@ -3360,7 +3358,7 @@ s32 Boss01_Bug_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void Boss01_Bug_Draw(Actor* thisx, PlayState* play) { - Boss01* this = THIS; + Boss01* this = (Boss01*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c index 0e6c7dac5b..0a6f660353 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((Boss02*)thisx) - void Boss02_Init(Actor* thisx, PlayState* play); void Boss02_Destroy(Actor* thisx, PlayState* play); void Boss02_Twinmold_Update(Actor* thisx, PlayState* play); @@ -582,7 +580,7 @@ void func_809DA50C(s32 arg0, ColliderJntSph* collider, Vec3f* arg2) { } void Boss02_Init(Actor* thisx, PlayState* play) { - Boss02* this = THIS; + Boss02* this = (Boss02*)thisx; s32 i; s32 pad[2]; @@ -1173,7 +1171,7 @@ void func_809DBFB4(Boss02* this, PlayState* play) { } void Boss02_Tail_Update(Actor* thisx, PlayState* play) { - Boss02* this = THIS; + Boss02* this = (Boss02*)thisx; s32 pad; Vec3f pos; CollisionPoly* outPoly; @@ -1198,7 +1196,7 @@ void Boss02_Tail_Update(Actor* thisx, PlayState* play) { void Boss02_Twinmold_Update(Actor* thisx, PlayState* play) { Vec3f sp3C; - Boss02* this = THIS; + Boss02* this = (Boss02*)thisx; s32 pad; s16 i; @@ -1315,7 +1313,7 @@ void Boss02_Twinmold_Update(Actor* thisx, PlayState* play) { } void Boss02_BattleHandler_Update(Actor* thisx, PlayState* play) { - Boss02* this = THIS; + Boss02* this = (Boss02*)thisx; this->giantModeScaleFactor = sGiantModeScaleFactor; play->envCtx.sandstormState = SANDSTORM_D; @@ -1370,7 +1368,7 @@ Vec3f D_809DFAF4 = { -10000.0f, -100000.0f, -100000.0f }; void Boss02_Twinmold_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss02* this = THIS; + Boss02* this = (Boss02*)thisx; s32 i; s32 idx; Mtx* mtxHead = GRAPH_ALLOC(play->state.gfxCtx, 23 * sizeof(Mtx)); diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index 70cec6439b..b719f4b5ab 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -59,8 +59,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((Boss03*)thisx) - #define WORK_TIMER_UNK0_A 0 // used in func_809E34B8 #define WORK_TIMER_CURRENT_ACTION 0 #define WORK_TIMER_UNK0_C 0 // used in DeathCutscene @@ -446,7 +444,7 @@ void Boss03_SpawnDust(Boss03* this, PlayState* play) { } void Boss03_Init(Actor* thisx, PlayState* play2) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; s32 i; PlayState* play = play2; Vec3f sp70; @@ -532,7 +530,7 @@ void Boss03_Init(Actor* thisx, PlayState* play2) { } void Boss03_Destroy(Actor* thisx, PlayState* play) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; } /* Start of ActionFuncs section */ @@ -1947,7 +1945,7 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) { void Boss03_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; Actor* dblueActor; Player* player = GET_PLAYER(play); s32 i; @@ -2168,7 +2166,7 @@ void Boss03_SetObject(PlayState* play, s16 objectId) { } s32 Boss03_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; if ((limbIndex == GYORG_LIMB_UPPER_TRUNK) || (limbIndex == GYORG_LIMB_LOWER_TRUNK) || (limbIndex == GYORG_LIMB_TAIL)) { @@ -2245,7 +2243,7 @@ Vec3f D_809E91A8 = { 100000.0f, 100000.0f, 100000.0f }; Vec3f D_809E91B4 = { 300.0f, -100.0f, -200.0f }; void Boss03_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; s32 pad; s8 sphereElementIndex; Vec3f spherePos; @@ -2281,7 +2279,7 @@ void Boss03_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot } void Boss03_Draw(Actor* thisx, PlayState* play) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -2518,7 +2516,7 @@ void Boss03_DrawEffects(PlayState* play) { #define SEAWEED_FLAG_INTERACT_GYORG 2 void Boss03_SeaweedUpdate(Actor* thisx, PlayState* play) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; s16 i; s16 pad; s16 maxBendSpeed; @@ -2612,7 +2610,7 @@ Gfx* sGyorgSeaweedDLs[] = { }; void Boss03_SeaweedDraw(Actor* thisx, PlayState* play) { - Boss03* this = THIS; + Boss03* this = (Boss03*)thisx; s16 i; // Why 10 Mtxs? This seems to only use the first 6 elements Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, 10 * sizeof(Mtx)); diff --git a/src/overlays/actors/ovl_Boss_04/z_boss_04.c b/src/overlays/actors/ovl_Boss_04/z_boss_04.c index db6a13848c..22d8fea2c7 100644 --- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c +++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((Boss04*)thisx) - void Boss04_Init(Actor* thisx, PlayState* play2); void Boss04_Destroy(Actor* thisx, PlayState* play); void Boss04_Update(Actor* thisx, PlayState* play2); @@ -146,7 +144,7 @@ void Boss04_Init(Actor* thisx, PlayState* play2) { { 0.0f, 0.0f, 1000.0f }, }; PlayState* play = play2; - Boss04* this = THIS; + Boss04* this = (Boss04*)thisx; s32 i; CollisionPoly* spC0; Vec3f spB4; @@ -672,7 +670,7 @@ void func_809ED50C(Boss04* this) { void Boss04_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss04* this = THIS; + Boss04* this = (Boss04*)thisx; s16 temp_v0_8; s32 pad; @@ -772,7 +770,7 @@ void Boss04_Update(Actor* thisx, PlayState* play2) { } s32 Boss04_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss04* this = THIS; + Boss04* this = (Boss04*)thisx; if (limbIndex == KREG(32)) { if (!(this->unk_1F4 & 3)) { @@ -802,7 +800,7 @@ s32 Boss04_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void Boss04_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_809EE228 = { 0.0f, -200.0f, 0.0f }; static Vec3f D_809EE234 = { 0.0f, 720.0f, 0.0f }; - Boss04* this = THIS; + Boss04* this = (Boss04*)thisx; Vec3f sp18; if (limbIndex == WART_LIMB_ROOT) { @@ -815,7 +813,7 @@ void Boss04_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot } void Boss04_Draw(Actor* thisx, PlayState* play) { - Boss04* this = THIS; + Boss04* this = (Boss04*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Boss_05/z_boss_05.c b/src/overlays/actors/ovl_Boss_05/z_boss_05.c index 2731cec97a..f277a874ad 100644 --- a/src/overlays/actors/ovl_Boss_05/z_boss_05.c +++ b/src/overlays/actors/ovl_Boss_05/z_boss_05.c @@ -32,8 +32,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((Boss05*)thisx) - // This actor has an array of timers in its instance, but for the most part, it only uses the first entry #define TIMER_CURRENT_ACTION 0 #define TIMER_FALLING_HEAD_FALL 2 @@ -344,7 +342,7 @@ ActorProfile Boss_05_Profile = { void Boss05_Init(Actor* thisx, PlayState* play) { s32 pad; - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; CollisionHeader* colHeader = NULL; this->dyna.actor.attentionRangeType = ATTENTION_RANGE_3; @@ -450,7 +448,7 @@ void Boss05_Init(Actor* thisx, PlayState* play) { } void Boss05_Destroy(Actor* thisx, PlayState* play) { - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; if ((BIO_BABA_GET_TYPE(&this->dyna.actor) == BIO_BABA_TYPE_LILY_PAD) || (BIO_BABA_GET_TYPE(&this->dyna.actor) == BIO_BABA_TYPE_LILY_PAD_WITH_HEAD) || @@ -1308,7 +1306,7 @@ void Boss05_Fragment_Move(Boss05* this, PlayState* play) { void Boss05_Update(Actor* thisx, PlayState* play) { s32 pad; - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; s16 i; this->frameCounter++; @@ -1425,7 +1423,7 @@ static s8 sLimbIndexToLimbRotIndex[] = { s32 Boss05_LilyPadWithHead_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; s8 limbRotIndex; if (limbIndex == KREG(32)) { @@ -1459,7 +1457,7 @@ s32 Boss05_LilyPadWithHead_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx* void Boss05_LilyPad_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sHeadOffset = { 0.0f, -1400.0f, 600.0f }; - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; MtxF mf; Vec3f upperStemPos; Vec3f lowerStemPos; @@ -1500,7 +1498,7 @@ Vec3f sBioDekuBabaHeadColliderPos; void Boss05_Head_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sHeadColliderOffset = { 1600.0f, -300.0f, 0.0f }; static Vec3f sHeadOffset = { 700.0f, 0.0f, 0.0f }; - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; if (limbIndex == BIO_DEKU_BABA_HEAD_LIMB_BODY) { Matrix_MultVec3f(&sHeadColliderOffset, &sBioDekuBabaHeadColliderPos); @@ -1520,7 +1518,7 @@ void Boss05_Head_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void Boss05_Head_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; if ((limbIndex == BIO_DEKU_BABA_HEAD_LIMB_LOWER_JAW) || (limbIndex == BIO_DEKU_BABA_HEAD_LIMB_UPPER_JAW)) { Matrix_Scale(this->lowerJawScaleXZ, 1.0f, this->lowerJawScaleXZ, MTXMODE_APPLY); @@ -1555,7 +1553,7 @@ s32 Boss05_FallingHeadLilyPad_OverrideLimbDraw(PlayState* play, s32 limbIndex, G } void Boss05_FallingHeadLilyPad_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; if ((limbIndex >= BIO_DEKU_BABA_LILY_PAD_LIMB_MIDDLE_STEM) && (limbIndex <= BIO_DEKU_BABA_LILY_PAD_LIMB_RIGHT_LOWER_ARM)) { @@ -1583,7 +1581,7 @@ static BioDekuBabaHeadLimb sFragmentIndexToLimbIndex[BIO_BABA_TYPE_MAX - BIO_BAB s32 Boss05_Fragment_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; if (limbIndex != sFragmentIndexToLimbIndex[BIO_BABA_GET_FRAGMENT_INDEX(&this->dyna.actor)]) { *dList = NULL; @@ -1597,7 +1595,7 @@ s32 Boss05_Fragment_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList } void Boss05_Fragment_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; if (limbIndex != sFragmentIndexToLimbIndex[BIO_BABA_GET_FRAGMENT_INDEX(&this->dyna.actor)]) { Matrix_MultZero(&this->fragmentPos); @@ -1606,7 +1604,7 @@ void Boss05_Fragment_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V void Boss05_Draw(Actor* thisx, PlayState* play) { s32 pad; - Boss05* this = THIS; + Boss05* this = (Boss05*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Boss_06/z_boss_06.c b/src/overlays/actors/ovl_Boss_06/z_boss_06.c index 067e0a218b..429c584c33 100644 --- a/src/overlays/actors/ovl_Boss_06/z_boss_06.c +++ b/src/overlays/actors/ovl_Boss_06/z_boss_06.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((Boss06*)thisx) - void Boss06_Init(Actor* thisx, PlayState* play); void Boss06_Destroy(Actor* thisx, PlayState* play); void Boss06_Update(Actor* thisx, PlayState* play); @@ -147,7 +145,7 @@ f32 Boss06_RandZeroOne(void) { } void Boss06_Init(Actor* thisx, PlayState* play) { - Boss06* this = THIS; + Boss06* this = (Boss06*)thisx; u8* curtainTexture; s32 i; @@ -425,7 +423,7 @@ void Boss06_CurtainDestroyed(Boss06* this, PlayState* play) { } void Boss06_Update(Actor* thisx, PlayState* play) { - Boss06* this = THIS; + Boss06* this = (Boss06*)thisx; this->actionFunc(this, play); @@ -520,7 +518,7 @@ void Boss06_Update(Actor* thisx, PlayState* play) { void Boss06_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss06* this = THIS; + Boss06* this = (Boss06*)thisx; s32 i; f32 lightOrbOffsetZ = 0.0f; s16 lightRayBaseX; diff --git a/src/overlays/actors/ovl_Boss_07/z_boss_07.c b/src/overlays/actors/ovl_Boss_07/z_boss_07.c index 639543f867..817a042a8e 100644 --- a/src/overlays/actors/ovl_Boss_07/z_boss_07.c +++ b/src/overlays/actors/ovl_Boss_07/z_boss_07.c @@ -29,8 +29,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((Boss07*)thisx) - #define MAJORA_TENTACLE_COUNT 25 #define MAJORA_WHIP_LENGTH 44 #define MAJORA_EFFECT_COUNT 50 @@ -1342,7 +1340,7 @@ void Boss07_Init(Actor* thisx, PlayState* play2) { MAJORA_PARAMS(MAJORA_TYPE_REMAINS + MAJORA_REMAINS_TYPE_TWINMOLD), }; PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; s32 i; if (MAJORA_GET_TYPE(&this->actor) == MAJORA_TYPE_BATTLE_HANDLER) { @@ -1543,7 +1541,7 @@ void Boss07_Init(Actor* thisx, PlayState* play2) { void Boss07_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; switch (this->actor.params) { //! @bug this should be MAJORAS_MASK @@ -3108,7 +3106,7 @@ void Boss07_UpdateDamageEffects(Boss07* this, PlayState* play) { void Boss07_Wrath_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; s32 i; Player* player = GET_PLAYER(play); @@ -3491,7 +3489,7 @@ void Boss07_Wrath_DrawWhip(Boss07* this, PlayState* play, Vec3f* pos, Vec3f* rot } s32 Boss07_Wrath_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; if (limbIndex == MAJORAS_WRATH_LIMB_HEAD) { rot->x += this->cutsceneHeadRot.y; @@ -3584,7 +3582,7 @@ static s8 sWrathLimbToBodyParts[] = { void Boss07_Wrath_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sWhipOffset = { 1000.0f, 100.0f, 0.0f }; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; s8 bodyPartIndex; Vec3f colliderPos; MtxF curMtxF; @@ -3634,7 +3632,7 @@ void Boss07_Wrath_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void Boss07_Wrath_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; // This code allows the `incarnationArmScale` to scale up almost all of Wrath's limbs. However, in the final game, // this variable is always set to 1.0f for Wrath, meaning that this code effectively does nothing. @@ -3799,7 +3797,7 @@ void Boss07_BattleHandler_DrawIntroPlayerLightOrb(Boss07* this, PlayState* play) void Boss07_Wrath_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; u8* tex = GRAPH_ALLOC(play->state.gfxCtx, MAJORAS_WRATH_SHADOW_TEX_SIZE); OPEN_DISPS(play->state.gfxCtx); @@ -4856,7 +4854,7 @@ void Boss07_Incarnation_UpdateDamage(Boss07* this, PlayState* play) { void Boss07_IncarnationAfterimage_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; if (DECR(this->timers[0]) == 0) { Actor_Kill(&this->actor); @@ -4865,7 +4863,7 @@ void Boss07_IncarnationAfterimage_Update(Actor* thisx, PlayState* play2) { void Boss07_Incarnation_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; s32 i; s32 pad; @@ -4958,7 +4956,7 @@ void Boss07_Incarnation_Update(Actor* thisx, PlayState* play2) { void Boss07_IncarnationAfterimage_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; Boss07* parent = (Boss07*)this->actor.parent; OPEN_DISPS(play->state.gfxCtx); @@ -4974,7 +4972,7 @@ void Boss07_IncarnationAfterimage_Draw(Actor* thisx, PlayState* play2) { s32 Boss07_Incarnation_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; if (limbIndex == MAJORAS_INCARNATION_LIMB_EYESTALK) { rot->y += this->cutsceneHeadRot.x; @@ -5097,7 +5095,7 @@ static s8 sIncarnationLimbToBodyParts[] = { }; void Boss07_Incarnation_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; Vec3f colliderPos; s8 bodyPartIndex; @@ -5146,7 +5144,7 @@ void Boss07_Incarnation_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList } void Boss07_Incarnation_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; if (limbIndex == MAJORAS_INCARNATION_LIMB_MASK) { Matrix_Scale(this->incarnationMaskScaleX, this->incarnationMaskScaleY, 1.0f, MTXMODE_APPLY); @@ -5168,7 +5166,7 @@ void Boss07_Incarnation_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* void Boss07_Incarnation_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -6291,7 +6289,7 @@ void Boss07_Mask_UpdateDamage(Boss07* this, PlayState* play) { void Boss07_Mask_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; s32 i; Player* player = GET_PLAYER(play); Vec3f topLeftVertex; @@ -6680,7 +6678,7 @@ void Boss07_Mask_DrawBeam(Boss07* this, PlayState* play) { } void Boss07_Mask_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; if (limbIndex == MAJORAS_MASK_LIMB_FACE) { Matrix_MultVecX(500.0f, &this->tentacleBasePos); @@ -6690,7 +6688,7 @@ void Boss07_Mask_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s void Boss07_Mask_Draw(Actor* thisx, PlayState* play2) { static TexturePtr sMaskEyeTextures[] = { gMajorasMaskWithNormalEyesTex, gMajorasMaskWithDullEyesTex }; PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; f32 shakeScale; f32 rotX; f32 rotY; @@ -6778,7 +6776,7 @@ void Boss07_Projectile_Update(Actor* thisx, PlayState* play2) { f32 dz; f32 distToPlayerXZ; PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; Player* player = GET_PLAYER(play); this->frameCounter++; @@ -6833,7 +6831,7 @@ void Boss07_Projectile_Update(Actor* thisx, PlayState* play2) { void Boss07_Projectile_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -7204,7 +7202,7 @@ void Boss07_Remains_Stunned(Boss07* this, PlayState* play) { void Boss07_Remains_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; s32 i; this->frameCounter++; @@ -7229,7 +7227,7 @@ void Boss07_Remains_Update(Actor* thisx, PlayState* play2) { void Boss07_Remains_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; f32 shakeScale; f32 rotX; s32 pad; @@ -7555,7 +7553,7 @@ void Boss07_Top_UpdateDamage(Boss07* this, PlayState* play) { void Boss07_Top_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; this->frameCounter++; @@ -7590,7 +7588,7 @@ void Boss07_Top_Update(Actor* thisx, PlayState* play2) { void Boss07_Top_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -7614,7 +7612,7 @@ void Boss07_Top_Draw(Actor* thisx, PlayState* play2) { void Boss07_BattleHandler_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; Boss07_BattleHandler_UpdateEffects(play); @@ -7775,7 +7773,7 @@ void Boss07_BattleHandler_Update(Actor* thisx, PlayState* play2) { void Boss07_BattleHandler_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Boss07* this = THIS; + Boss07* this = (Boss07*)thisx; Boss07_BattleHandler_DrawEffects(play); Boss07_BattleHandler_DrawIntroPlayerLightOrb(this, play); diff --git a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c index 924ed022d0..a796c2b78c 100644 --- a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c +++ b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c @@ -22,8 +22,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((BossHakugin*)thisx) - #define GOHT_LIMB_DRAW_FLAG(limbIndex) (1 << ((limbIndex)-1)) void BossHakugin_Init(Actor* thisx, PlayState* play2); @@ -553,7 +551,7 @@ void BossHakugin_Init(Actor* thisx, PlayState* play2) { ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_STOP), }; PlayState* play = play2; - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; Actor** actorPtr; s32 pad; s32 i; @@ -631,7 +629,7 @@ void BossHakugin_Init(Actor* thisx, PlayState* play2) { } void BossHakugin_Destroy(Actor* thisx, PlayState* play) { - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; s32 pad; s32 i; @@ -2998,7 +2996,7 @@ void BossHakugin_UpdateElectricBalls(BossHakugin* this, PlayState* play) { void BossHakugin_Update(Actor* thisx, PlayState* play) { s32 pad; - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; Vec3s targetRot; Player* player = GET_PLAYER(play); @@ -3121,7 +3119,7 @@ s32 BossHakugin_OverrideLimbDraw(struct PlayState* play, s32 limbIndex, Gfx** dL Actor* thisx) { static s32 sCurrentMalfunctionType = GOHT_MALFUNCTION_NUM_TYPES - 1; static s32 sCurrentLimbIndex = GOHT_LIMB_FRONT_RIGHT_UPPER_LEG; - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; if (this->actionFunc == BossHakugin_DeathCutsceneCrushedByRocks) { if (limbIndex == GOHT_LIMB_ROOT) { @@ -3160,7 +3158,7 @@ s32 BossHakugin_OverrideLimbDraw(struct PlayState* play, s32 limbIndex, Gfx** dL } void BossHakugin_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; s8 bodyPartIndex; s32 i; f32 cos; @@ -3442,7 +3440,7 @@ void BossHakugin_DrawIce(BossHakugin* this, PlayState* play) { void BossHakugin_Draw(Actor* thisx, PlayState* play) { s32 pad; - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; u8* tex = GRAPH_ALLOC(play->state.gfxCtx, GOHT_SHADOW_TEX_SIZE); OPEN_DISPS(play->state.gfxCtx); @@ -3807,7 +3805,7 @@ void BossHakugin_UpdateCrushingRocksCollision(BossHakugin* this) { */ void BossHakugin_UpdateStationaryCrushingRocks(Actor* thisx, PlayState* play2) { PlayState* play = play2; - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; BossHakugin_UpdateCrushingRocksCollision(this); CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); @@ -3818,7 +3816,7 @@ void BossHakugin_UpdateStationaryCrushingRocks(Actor* thisx, PlayState* play2) { * Draws the rocks that crush Goht, both when they are falling down and after they become stationary. */ void BossHakugin_DrawCrushingRocks(Actor* thisx, PlayState* play) { - BossHakugin* this = THIS; + BossHakugin* this = (BossHakugin*)thisx; s32 i; GohtCrushingRock* crushingRock; diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index bf6f9b4c44..3ed93612f6 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DemoEffect*)thisx) - void DemoEffect_Init(Actor* thisx, PlayState* play); void DemoEffect_Destroy(Actor* thisx, PlayState* play); void DemoEffect_Update(Actor* thisx, PlayState* play); @@ -43,7 +41,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play) { GAMEPLAY_KEEP, GAMEPLAY_KEEP, GAMEPLAY_KEEP, GAMEPLAY_KEEP, }; s32 pad; - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 type = DEMO_EFFECT_GET_TYPE(&this->actor); s32 objectSlot; s32 pad2; @@ -108,7 +106,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play) { } void DemoEffect_Destroy(Actor* thisx, PlayState* play) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; switch (DEMO_EFFECT_GET_TYPE(&this->actor)) { case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE: @@ -263,14 +261,14 @@ void DemoEffect_ExpandLight(DemoEffect* this, PlayState* play) { } void DemoEffect_Update(Actor* thisx, PlayState* play) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; this->actionFunc(this, play); } s32 DemoEffect_OverrideLimbDrawTimewarp(PlayState* play, SkelCurve* skelCurve, s32 limbIndex, Actor* thisx) { s32 pad; - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; u32 frames = play->gameplayFrames; OPEN_DISPS(play->state.gfxCtx); @@ -297,7 +295,7 @@ s32 DemoEffect_OverrideLimbDrawTimewarp(PlayState* play, SkelCurve* skelCurve, s void DemoEffect_DrawTimewarp(Actor* thisx, PlayState* play) { GraphicsContext* gfxCtx = play->state.gfxCtx; - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; OPEN_DISPS(gfxCtx); @@ -311,7 +309,7 @@ void DemoEffect_DrawTimewarp(Actor* thisx, PlayState* play) { void DemoEffect_DrawLight(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s16 zRot = (this->timer * 0x400) & 0xFFFF; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c b/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c index 24c6fadf87..ed550c449d 100644 --- a/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c +++ b/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DemoGetitem*)thisx) - void DemoGetitem_Init(Actor* thisx, PlayState* play); void DemoGetitem_Destroy(Actor* thisx, PlayState* play); void DemoGetitem_Update(Actor* thisx, PlayState* play); @@ -45,7 +43,7 @@ void DemoGetitem_Init(Actor* thisx, PlayState* play) { s32 pad; s32 objectSlot; s32 itemIndex; - DemoGetitem* this = THIS; + DemoGetitem* this = (DemoGetitem*)thisx; itemIndex = DEMOGETITEM_ITEM_MASK_GREAT_FAIRY; if (DEMOGETITEM_GET_F(&this->actor) == 1) { @@ -113,13 +111,13 @@ void DemoGetitem_PerformCutsceneActions(DemoGetitem* this, PlayState* play) { } void DemoGetitem_Update(Actor* thisx, PlayState* play) { - DemoGetitem* this = THIS; + DemoGetitem* this = (DemoGetitem*)thisx; this->actionFunc(this, play); } void DemoGetitem_Draw(Actor* thisx, PlayState* play) { - DemoGetitem* this = THIS; + DemoGetitem* this = (DemoGetitem*)thisx; func_800B8050(&this->actor, play, 0); func_800B8118(&this->actor, play, 0); diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index ee1eafc2ff..aebd1aec6d 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DemoKankyo*)thisx) - void DemoKankyo_Init(Actor* thisx, PlayState* play); void DemoKankyo_Destroy(Actor* thisx, PlayState* play); void DemoKankyo_Update(Actor* thisx, PlayState* play); @@ -434,7 +432,7 @@ void DemoKakyo_MoonSparklesActionFunc(DemoKankyo* this, PlayState* play) { } void DemoKankyo_Init(Actor* thisx, PlayState* play) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s32 pad; s32 i; s32 objectSlot; @@ -483,20 +481,20 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) { } void DemoKankyo_Destroy(Actor* thisx, PlayState* play) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; Actor_Kill(&this->actor); } void DemoKankyo_Update(Actor* thisx, PlayState* play) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; this->actionFunc(this, play); } void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s16 i; f32 scaleAlpha; Vec3f worldPos; @@ -586,7 +584,7 @@ void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, PlayState* play2) { // draw, giants and moon void DemoKankyo_DrawMoonAndGiant(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s16 i; f32 alphaScale; @@ -661,7 +659,7 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, PlayState* play2) { } void DemoKankyo_Draw(Actor* thisx, PlayState* play) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; switch (this->actor.params) { case DEMO_KANKYO_TYPE_LOSTWOODS: diff --git a/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c b/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c index 30cca72ec1..dd2e76dbb0 100644 --- a/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c +++ b/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DemoMoonend*)thisx) - void DemoMoonend_Init(Actor* thisx, PlayState* play); void DemoMoonend_Destroy(Actor* thisx, PlayState* play); void DemoMoonend_Update(Actor* thisx, PlayState* play); @@ -33,7 +31,7 @@ ActorProfile Demo_Moonend_Profile = { }; void DemoMoonend_Init(Actor* thisx, PlayState* play) { - DemoMoonend* this = THIS; + DemoMoonend* this = (DemoMoonend*)thisx; Actor_SetScale(&this->actor, 0.1f); this->actionFunc = DemoMoonend_DoNothing; @@ -58,7 +56,7 @@ void DemoMoonend_Init(Actor* thisx, PlayState* play) { } void DemoMoonend_Destroy(Actor* thisx, PlayState* play) { - DemoMoonend* this = THIS; + DemoMoonend* this = (DemoMoonend*)thisx; if (DEMOMOONEND_GET_PARAM_F(thisx) != 1) { Keyframe_DestroyFlex(&this->kfSkelAnime); @@ -161,14 +159,14 @@ void func_80C17C48(DemoMoonend* this, PlayState* play) { } void DemoMoonend_Update(Actor* thisx, PlayState* play) { - DemoMoonend* this = THIS; + DemoMoonend* this = (DemoMoonend*)thisx; this->actionFunc(this, play); } s32 DemoMoonend_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 limbIndex, Gfx** dList, u8* flags, void* thisx, Vec3f* scale, Vec3s* rot, Vec3f* pos) { - DemoMoonend* this = THIS; + DemoMoonend* this = (DemoMoonend*)thisx; if (limbIndex == 2) { Matrix_Push(); @@ -180,7 +178,7 @@ s32 DemoMoonend_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 DemoMoonend_PostLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 limbIndex, Gfx** dList, u8* flags, void* thisx, Vec3f* scale, Vec3s* rot, Vec3f* pos) { - DemoMoonend* this = THIS; + DemoMoonend* this = (DemoMoonend*)thisx; if (limbIndex == 8) { Matrix_Pop(); @@ -190,7 +188,7 @@ s32 DemoMoonend_PostLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 } void DemoMoonend_Draw(Actor* thisx, PlayState* play) { - DemoMoonend* this = THIS; + DemoMoonend* this = (DemoMoonend*)thisx; Mtx* mtxStack; AnimatedMat_Draw(play, (AnimatedMaterial*)Lib_SegmentedToVirtual(object_moonend_Matanimheader_00B540)); diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index 8476f02fd6..4fedadab7d 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DemoShd*)thisx) - void DemoShd_Init(Actor* thisx, PlayState* play); void DemoShd_Destroy(Actor* thisx, PlayState* play); void DemoShd_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c b/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c index 485374df29..ff4c47fc8a 100644 --- a/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c +++ b/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DemoSyoten*)thisx) - void DemoSyoten_Init(Actor* thisx, PlayState* play); void DemoSyoten_Destroy(Actor* thisx, PlayState* play); void DemoSyoten_Update(Actor* thisx, PlayState* play); @@ -59,7 +57,7 @@ Color_RGBA8 D_80C17834[] = { void DemoSyoten_Init(Actor* thisx, PlayState* play) { s32 pad; - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; Actor_SetScale(&this->actor, 0.3f); @@ -128,7 +126,7 @@ void DemoSyoten_Init(Actor* thisx, PlayState* play) { } void DemoSyoten_Destroy(Actor* thisx, PlayState* play) { - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; if (DEMOSYOTEN_GET_F(&this->actor) == DEMOSYOTEN_F_0) { Keyframe_DestroyFlex(&this->kfSkelAnime); @@ -431,7 +429,7 @@ void func_80C17008(DemoSyoten* this, PlayState* play) { } void DemoSyoten_Update(Actor* thisx, PlayState* play) { - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; this->actionFunc(this, play); } @@ -439,7 +437,7 @@ void DemoSyoten_Update(Actor* thisx, PlayState* play) { s32 DemoSyoten_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 limbIndex, Gfx** dList, u8* flags, void* thisx, Vec3f* scale, Vec3s* rot, Vec3f* pos) { GraphicsContext* gfxCtx = play->state.gfxCtx; - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; OPEN_DISPS(gfxCtx); @@ -483,7 +481,7 @@ s32 DemoSyoten_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s void func_80C173B4(Actor* thisx, PlayState* play) { s32 pad; - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; Mtx* mtxStack; AnimatedMat_DrawXlu(play, Lib_SegmentedToVirtual(&object_syoten_Matanimheader_001298)); @@ -514,7 +512,7 @@ void func_80C17468(PlayState* play) { void DemoSyoten_Draw(Actor* thisx, PlayState* play) { s32 pad; - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -553,7 +551,7 @@ void DemoSyoten_Draw(Actor* thisx, PlayState* play) { void func_80C17690(Actor* thisx, PlayState* play) { s32 pad; - DemoSyoten* this = THIS; + DemoSyoten* this = (DemoSyoten*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 43fb561013..e514f5fa90 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((DemoTreLgt*)thisx) - void DemoTreLgt_Init(Actor* thisx, PlayState* play); void DemoTreLgt_Destroy(Actor* thisx, PlayState* play); void DemoTreLgt_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ static DemoTreLgtActionFunc sActionFuncs[] = { }; void DemoTreLgt_Init(Actor* thisx, PlayState* play) { - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; SkelCurve_Init(play, &this->skelCurve, &gBoxLightCurveSkel, sBoxLightAnimations[0]); this->colorAlpha1 = 255; @@ -79,7 +77,7 @@ void DemoTreLgt_Init(Actor* thisx, PlayState* play) { } void DemoTreLgt_Destroy(Actor* thisx, PlayState* play) { - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; SkelCurve_Destroy(play, &this->skelCurve); } @@ -136,14 +134,14 @@ void DemoTreLgt_Animate(DemoTreLgt* this, PlayState* play) { } void DemoTreLgt_Update(Actor* thisx, PlayState* play) { - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; sActionFuncs[this->action](this, play); } s32 DemoTreLgt_OverrideLimbDraw(PlayState* play, SkelCurve* skelCuve, s32 limbIndex, Actor* thisx) { s32 pad; - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -165,7 +163,7 @@ s32 DemoTreLgt_OverrideLimbDraw(PlayState* play, SkelCurve* skelCuve, s32 limbIn void DemoTreLgt_Draw(Actor* thisx, PlayState* play) { GraphicsContext* gfxCtx = play->state.gfxCtx; - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; OPEN_DISPS(gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c b/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c index ea184f1f02..71db1f5b23 100644 --- a/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c +++ b/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((DmAh*)thisx) - void DmAh_Init(Actor* thisx, PlayState* play); void DmAh_Destroy(Actor* thisx, PlayState* play); void DmAh_Update(Actor* thisx, PlayState* play); @@ -163,7 +161,7 @@ void DmAh_DoNothing(DmAh* this, PlayState* play) { } void DmAh_Init(Actor* thisx, PlayState* play) { - DmAh* this = THIS; + DmAh* this = (DmAh*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_ah_Skel_009E70, NULL, this->jointTable, this->morphTable, @@ -186,7 +184,7 @@ void DmAh_Destroy(Actor* thisx, PlayState* play) { } void DmAh_Update(Actor* thisx, PlayState* play) { - DmAh* this = THIS; + DmAh* this = (DmAh*)thisx; this->actionFunc(this, play); func_80C1D6E0(this, play); @@ -205,7 +203,7 @@ void DmAh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void DmAh_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - DmAh* this = THIS; + DmAh* this = (DmAh*)thisx; s32 stepRot; s32 overrideRot; @@ -252,7 +250,7 @@ static TexturePtr D_80C1DE28[] = { }; void DmAh_Draw(Actor* thisx, PlayState* play) { - DmAh* this = THIS; + DmAh* this = (DmAh*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Al/z_dm_al.c b/src/overlays/actors/ovl_Dm_Al/z_dm_al.c index 83551c2856..8fecab5a81 100644 --- a/src/overlays/actors/ovl_Dm_Al/z_dm_al.c +++ b/src/overlays/actors/ovl_Dm_Al/z_dm_al.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((DmAl*)thisx) - void DmAl_Init(Actor* thisx, PlayState* play); void DmAl_Destroy(Actor* thisx, PlayState* play); void DmAl_Update(Actor* thisx, PlayState* play); @@ -77,7 +75,7 @@ void DmAl_HandleCutscene(DmAl* this, PlayState* play) { } void DmAl_Init(Actor* thisx, PlayState* play) { - DmAl* this = THIS; + DmAl* this = (DmAl*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gMadameAromaSkel, NULL, this->jointTable, this->morphTable, @@ -93,7 +91,7 @@ void DmAl_Destroy(Actor* thisx, PlayState* play) { } void DmAl_Update(Actor* thisx, PlayState* play) { - DmAl* this = THIS; + DmAl* this = (DmAl*)thisx; this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); @@ -118,7 +116,7 @@ s32 DmAl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* ro } void DmAl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - DmAl* this = THIS; + DmAl* this = (DmAl*)thisx; switch (limbIndex) { case MADAME_AROMA_LIMB_SHAWL_MIDDLE: @@ -161,7 +159,7 @@ static Gfx* sDLists[] = { void DmAl_Draw(Actor* thisx, PlayState* play) { u32 i; - DmAl* this = THIS; + DmAl* this = (DmAl*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_An/z_dm_an.c b/src/overlays/actors/ovl_Dm_An/z_dm_an.c index 06c2e83acb..7d5a6edf10 100644 --- a/src/overlays/actors/ovl_Dm_An/z_dm_an.c +++ b/src/overlays/actors/ovl_Dm_An/z_dm_an.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((DmAn*)thisx) - void DmAn_Init(Actor* thisx, PlayState* play); void DmAn_Destroy(Actor* thisx, PlayState* play); void DmAn_Update(Actor* thisx, PlayState* play); @@ -311,7 +309,7 @@ void DmAn_DoNothing(DmAn* this, PlayState* play) { } void DmAn_Init(Actor* thisx, PlayState* play) { - DmAn* this = THIS; + DmAn* this = (DmAn*)thisx; this->an4ObjectSlot = SubS_GetObjectSlot(OBJECT_AN4, play); this->msmoObjectSlot = SubS_GetObjectSlot(OBJECT_MSMO, play); @@ -322,7 +320,7 @@ void DmAn_Destroy(Actor* thisx, PlayState* play) { } void DmAn_Update(Actor* thisx, PlayState* play) { - DmAn* this = THIS; + DmAn* this = (DmAn*)thisx; this->actionFunc(this, play); @@ -337,7 +335,7 @@ void DmAn_Update(Actor* thisx, PlayState* play) { void DmAn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad[2]; - DmAn* this = THIS; + DmAn* this = (DmAn*)thisx; s8 objectSlot = this->actor.objectSlot; s8 msmoObjectSlot = this->msmoObjectSlot; @@ -369,7 +367,7 @@ void DmAn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void DmAn_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - DmAn* this = THIS; + DmAn* this = (DmAn*)thisx; s16 stepRot; s16 overrideRot; @@ -424,7 +422,7 @@ void DmAn_Draw(Actor* thisx, PlayState* play) { gAnju1EyeSadTex, // DMAN_EYES_SAD gAnju1EyeRelievedClosedTex, // DMAN_EYES_RELIEVED_CLOSED }; - DmAn* this = THIS; + DmAn* this = (DmAn*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c b/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c index bb01351d3c..f707cc8774 100644 --- a/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c +++ b/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((DmBal*)thisx) - void DmBal_Init(Actor* thisx, PlayState* play); void DmBal_Destroy(Actor* thisx, PlayState* play); void DmBal_Update(Actor* thisx, PlayState* play); @@ -68,7 +66,7 @@ static AnimationInfo sAnimationInfo[TINGLE_CS_ANIM_MAX] = { }; void DmBal_Init(Actor* thisx, PlayState* play) { - DmBal* this = THIS; + DmBal* this = (DmBal*)thisx; this->actor.attentionRangeType = ATTENTION_RANGE_1; this->actor.uncullZoneForward = 3000.0f; @@ -174,7 +172,7 @@ void DmBal_SpawnPaper(DmBal* this, PlayState* play, Vec3f* pos, Vec3f* velocity, void DmBal_Update(Actor* thisx, PlayState* play) { s32 pad; - DmBal* this = THIS; + DmBal* this = (DmBal*)thisx; // Throw confetti if (Animation_OnFrame(&this->skelAnime, 29.0f) && (this->skelAnime.animation == &gTingleFloatThrowConfettiAnim)) { @@ -197,7 +195,7 @@ void DmBal_Update(Actor* thisx, PlayState* play) { } s32 DmBal_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - DmBal* this = THIS; + DmBal* this = (DmBal*)thisx; Vec3s rots; if (limbIndex == TINGLE_LIMB_BALLOON) { @@ -217,7 +215,7 @@ void DmBal_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, static TexturePtr sEyeTextures[] = { gTingleEyeOpenTex, gTingleEyeClosedTex }; void DmBal_Draw(Actor* thisx, PlayState* play) { - DmBal* this = THIS; + DmBal* this = (DmBal*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c index 65db95a779..967db3f26a 100644 --- a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c +++ b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar00*)thisx) - void DmChar00_Init(Actor* thisx, PlayState* play); void DmChar00_Destroy(Actor* thisx, PlayState* play); void DmChar00_Update(Actor* thisx, PlayState* play); @@ -664,7 +662,7 @@ void func_80AA5EBC(DmChar00* this, PlayState* play) { void DmChar00_Init(Actor* thisx, PlayState* play) { s32 pad; - DmChar00* this = THIS; + DmChar00* this = (DmChar00*)thisx; if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { Actor_Kill(thisx); @@ -1023,7 +1021,7 @@ void func_80AA695C(DmChar00* this, PlayState* play) { } void DmChar00_Update(Actor* thisx, PlayState* play) { - DmChar00* this = THIS; + DmChar00* this = (DmChar00*)thisx; SkelAnime_Update(&this->skelAnime); @@ -1036,7 +1034,7 @@ void DmChar00_Update(Actor* thisx, PlayState* play) { s32 DmChar00_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - DmChar00* this = THIS; + DmChar00* this = (DmChar00*)thisx; f32 sp28; Vec3f sp1C; @@ -1051,7 +1049,7 @@ s32 DmChar00_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f void DmChar00_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DmChar00* this = THIS; + DmChar00* this = (DmChar00*)thisx; s32 phi_a0; s32 pad; Gfx* gfx = GRAPH_ALLOC(play->state.gfxCtx, 4 * sizeof(Gfx)); diff --git a/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c b/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c index fb092eb7c0..7daf377a6a 100644 --- a/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c +++ b/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((DmChar01*)thisx) - void DmChar01_Init(Actor* thisx, PlayState* play); void DmChar01_Destroy(Actor* thisx, PlayState* play); void DmChar01_Update(Actor* thisx, PlayState* play2); @@ -54,7 +52,7 @@ static InitChainEntry sInitChain[] = { s16 D_80AAAAB4 = false; void DmChar01_Init(Actor* thisx, PlayState* play) { - DmChar01* this = THIS; + DmChar01* this = (DmChar01*)thisx; s32 i; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -149,7 +147,7 @@ void DmChar01_Init(Actor* thisx, PlayState* play) { } void DmChar01_Destroy(Actor* thisx, PlayState* play) { - DmChar01* this = THIS; + DmChar01* this = (DmChar01*)thisx; if (this->unk_34D) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -365,7 +363,7 @@ void func_80AA90F4(DmChar01* this, PlayState* play) { void DmChar01_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DmChar01* this = THIS; + DmChar01* this = (DmChar01*)thisx; this->actionFunc(this, play); @@ -397,7 +395,7 @@ void DmChar01_Draw(Actor* thisx, PlayState* play) { static s16 D_80AAAAC4 = 0; static s16 D_80AAAAC8 = 0; static s16 D_80AAAACC = 0; - DmChar01* this = THIS; + DmChar01* this = (DmChar01*)thisx; f32 temp_f12; f32 spBC; s32 i; diff --git a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c index 8029f63937..d9c97eec9e 100644 --- a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c +++ b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar02*)thisx) - void DmChar02_Init(Actor* thisx, PlayState* play); void DmChar02_Destroy(Actor* thisx, PlayState* play); void DmChar02_Update(Actor* thisx, PlayState* play); @@ -82,7 +80,7 @@ void DmChar02_PlaySfxForCutscenes(DmChar02* this, PlayState* play) { } void DmChar02_Init(Actor* thisx, PlayState* play) { - DmChar02* this = THIS; + DmChar02* this = (DmChar02*)thisx; if (gSaveContext.save.saveInfo.inventory.items[SLOT_OCARINA] == ITEM_NONE) { this->animIndex = DMCHAR02_ANIM_HIT_GROUND; @@ -143,7 +141,7 @@ void DmChar02_HandleCutscene(DmChar02* this, PlayState* play) { } void DmChar02_Update(Actor* thisx, PlayState* play) { - DmChar02* this = THIS; + DmChar02* this = (DmChar02*)thisx; SkelAnime_Update(&this->skelAnime); @@ -173,7 +171,7 @@ void DmChar02_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { void DmChar02_Draw(Actor* thisx, PlayState* play) { s32 pad[2]; - DmChar02* this = THIS; + DmChar02* this = (DmChar02*)thisx; s32 shouldDraw = false; if ((play->csCtx.state == CS_STATE_IDLE) && (this->actor.world.pos.y < 100.0f)) { diff --git a/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c b/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c index 8fabe23ce2..746a6341cc 100644 --- a/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c +++ b/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar03*)thisx) - void DmChar03_Init(Actor* thisx, PlayState* play); void DmChar03_Destroy(Actor* thisx, PlayState* play); void DmChar03_Update(Actor* thisx, PlayState* play); @@ -56,7 +54,7 @@ void DmChar03_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 anim } void DmChar03_Init(Actor* thisx, PlayState* play) { - DmChar03* this = THIS; + DmChar03* this = (DmChar03*)thisx; this->animIndex = DMCHAR03_ANIM_FALL_OVER; this->actor.lockOnArrowOffset = 3000.0f; @@ -147,7 +145,7 @@ void func_80AAB838(DmChar03* this, PlayState* play) { } void DmChar03_Update(Actor* thisx, PlayState* play) { - DmChar03* this = THIS; + DmChar03* this = (DmChar03*)thisx; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136) && (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_136)]->id == 2)) { @@ -169,7 +167,7 @@ void DmChar03_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void DmChar03_Draw(Actor* thisx, PlayState* play) { - DmChar03* this = THIS; + DmChar03* this = (DmChar03*)thisx; if (!this->unk_18E) { if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136) && diff --git a/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c b/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c index 747e5b84cc..e9b75e7e1a 100644 --- a/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c +++ b/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar04*)thisx) - void DmChar04_Init(Actor* thisx, PlayState* play); void DmChar04_Destroy(Actor* thisx, PlayState* play); void DmChar04_Update(Actor* thisx, PlayState* play); @@ -68,7 +66,7 @@ static Color_RGBAf sEnvColors[] = { }; void DmChar04_Init(Actor* thisx, PlayState* play) { - DmChar04* this = THIS; + DmChar04* this = (DmChar04*)thisx; this->primColors = sPrimColors[this->actor.params]; this->envColors = sEnvColors[this->actor.params]; @@ -111,7 +109,7 @@ void DmChar04_HandleCutscene(DmChar04* this, PlayState* play) { } void DmChar04_Update(Actor* thisx, PlayState* play) { - DmChar04* this = THIS; + DmChar04* this = (DmChar04*)thisx; SkelAnime_Update(&this->skelAnime); this->actionFunc(this, play); @@ -124,7 +122,7 @@ s32 DmChar04_OverrideLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3 PlayState* play = play2; f32 sp28; Vec3f sp1C; - DmChar04* this = THIS; + DmChar04* this = (DmChar04*)thisx; if (limbIndex == FAIRY_LIMB_6) { sp28 = ((Math_SinS(this->timer * 0x1000) * 0.1f) + 1.0f) * 0.012f * (this->actor.scale.x * (1.0f / 0.008f)); @@ -139,7 +137,7 @@ void DmChar04_Draw(Actor* thisx, PlayState* play) { Gfx* gfx = GRAPH_ALLOC(play->state.gfxCtx, 4 * sizeof(Gfx)); s32 alpha; s32 pad; - DmChar04* this = THIS; + DmChar04* this = (DmChar04*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c index ac12b6676c..4a733cc2ac 100644 --- a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c +++ b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar05*)thisx) - void DmChar05_Init(Actor* thisx, PlayState* play); void DmChar05_Destroy(Actor* thisx, PlayState* play); void DmChar05_Update(Actor* thisx, PlayState* play); @@ -81,7 +79,7 @@ void DmChar05_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 anim } void func_80AAC63C(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_010B0, NULL, NULL, NULL, 0); @@ -94,7 +92,7 @@ void func_80AAC63C(Actor* thisx, PlayState* play) { } void func_80AAC6E4(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_042B0, NULL, NULL, NULL, 0); @@ -103,7 +101,7 @@ void func_80AAC6E4(Actor* thisx, PlayState* play) { } void func_80AAC770(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_dmask_Skel_001D0, NULL, NULL, NULL, 0); @@ -112,7 +110,7 @@ void func_80AAC770(Actor* thisx, PlayState* play) { } void func_80AAC7FC(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_013D0, NULL, NULL, NULL, 0); @@ -121,13 +119,13 @@ void func_80AAC7FC(Actor* thisx, PlayState* play) { } void func_80AAC888(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; this->actionFunc = func_80AACA98; } void DmChar05_Init(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; this->animIndex = DMCHAR05_ANIM_0; this->unk_18E = 0; @@ -575,7 +573,7 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) { } void DmChar05_Update(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; func_80AACF04(this, play); if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_109)) { @@ -613,7 +611,7 @@ void DmChar05_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void func_80AAD998(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; s32 pad[2]; if (this->unk_18E == 0) { @@ -635,7 +633,7 @@ void func_80AAD998(Actor* thisx, PlayState* play) { } void func_80AADA90(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; if (this->unk_18E == 0) { if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_473) && @@ -650,7 +648,7 @@ void func_80AADA90(Actor* thisx, PlayState* play) { } void func_80AADB4C(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; if (this->unk_18E == 0) { if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518) && @@ -666,7 +664,7 @@ void func_80AADB4C(Actor* thisx, PlayState* play) { void func_80AADC00(Actor* thisx, PlayState* play) { s32 pad; - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; s32 cueChannel; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_559)) { @@ -686,7 +684,7 @@ void func_80AADC00(Actor* thisx, PlayState* play) { } void DmChar05_Draw(Actor* thisx, PlayState* play) { - DmChar05* this = THIS; + DmChar05* this = (DmChar05*)thisx; switch (DMCHAR05_GET(&this->actor)) { case DMCHAR05_0: diff --git a/src/overlays/actors/ovl_Dm_Char06/z_dm_char06.c b/src/overlays/actors/ovl_Dm_Char06/z_dm_char06.c index 136adc78ae..81b2e79c3e 100644 --- a/src/overlays/actors/ovl_Dm_Char06/z_dm_char06.c +++ b/src/overlays/actors/ovl_Dm_Char06/z_dm_char06.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar06*)thisx) - void DmChar06_Init(Actor* thisx, PlayState* play); void DmChar06_Destroy(Actor* thisx, PlayState* play); void DmChar06_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ void DmChar06_SetupAction(DmChar06* this, DmChar06ActionFunc actionFunc) { } void DmChar06_Init(Actor* thisx, PlayState* play) { - DmChar06* this = THIS; + DmChar06* this = (DmChar06*)thisx; SET_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE); Actor_SetScale(&this->actor, 1.0f); @@ -65,14 +63,14 @@ void DmChar06_HandleCutscene(DmChar06* this, PlayState* play) { } void DmChar06_Update(Actor* thisx, PlayState* play) { - DmChar06* this = THIS; + DmChar06* this = (DmChar06*)thisx; this->actionFunc(this, play); } void DmChar06_Draw(Actor* thisx, PlayState* play) { s32 pad; - DmChar06* this = THIS; + DmChar06* this = (DmChar06*)thisx; AnimatedMat_Draw(play, Lib_SegmentedToVirtual(object_yukiyama_Matanimheader_006868)); diff --git a/src/overlays/actors/ovl_Dm_Char07/z_dm_char07.c b/src/overlays/actors/ovl_Dm_Char07/z_dm_char07.c index c5a24b3bab..86db0af925 100644 --- a/src/overlays/actors/ovl_Dm_Char07/z_dm_char07.c +++ b/src/overlays/actors/ovl_Dm_Char07/z_dm_char07.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar07*)thisx) - void DmChar07_Init(Actor* thisx, PlayState* play); void DmChar07_Destroy(Actor* thisx, PlayState* play); void DmChar07_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ void DmChar07_SetupAction(DmChar07* this, DmChar07ActionFunc actionFunc) { } void DmChar07_Init(Actor* thisx, PlayState* play) { - DmChar07* this = THIS; + DmChar07* this = (DmChar07*)thisx; this->isStage = 0; Actor_SetScale(&this->dyna.actor, 1.0f); @@ -53,7 +51,7 @@ void DmChar07_Init(Actor* thisx, PlayState* play) { } void DmChar07_Destroy(Actor* thisx, PlayState* play) { - DmChar07* this = THIS; + DmChar07* this = (DmChar07*)thisx; if (this->isStage) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -64,13 +62,13 @@ void DmChar07_DoNothing(DmChar07* this, PlayState* play) { } void DmChar07_Update(Actor* thisx, PlayState* play) { - DmChar07* this = THIS; + DmChar07* this = (DmChar07*)thisx; this->actionFunc(this, play); } void DmChar07_Draw(Actor* thisx, PlayState* play) { - DmChar07* this = THIS; + DmChar07* this = (DmChar07*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c b/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c index f20404af8b..f33e396749 100644 --- a/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c +++ b/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((DmChar08*)thisx) - void DmChar08_Init(Actor* thisx, PlayState* play2); void DmChar08_Destroy(Actor* thisx, PlayState* play); void DmChar08_Update(Actor* thisx, PlayState* play); @@ -144,7 +142,7 @@ void DmChar08_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 anim void DmChar08_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DmChar08* this = THIS; + DmChar08* this = (DmChar08*)thisx; thisx->attentionRangeType = ATTENTION_RANGE_5; this->eyeMode = TURTLE_EYEMODE_CLOSED; @@ -243,7 +241,7 @@ void DmChar08_Init(Actor* thisx, PlayState* play2) { } void DmChar08_Destroy(Actor* thisx, PlayState* play) { - DmChar08* this = THIS; + DmChar08* this = (DmChar08*)thisx; if (this->dynapolyInitialized) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -1015,7 +1013,7 @@ void DmChar08_UpdateCollision(DmChar08* this, PlayState* play) { } void DmChar08_Update(Actor* thisx, PlayState* play) { - DmChar08* this = THIS; + DmChar08* this = (DmChar08*)thisx; this->dyna.actor.focus.pos.x = this->focusPos.x; this->dyna.actor.focus.pos.y = this->focusPos.y + this->dyna.actor.lockOnArrowOffset; @@ -1061,7 +1059,7 @@ s32 DmChar08_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void DmChar08_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - DmChar08* this = THIS; + DmChar08* this = (DmChar08*)thisx; Vec3f src; if (limbIndex == TURTLE_LIMB_SHELL) { @@ -1087,7 +1085,7 @@ void DmChar08_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void DmChar08_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - DmChar08* this = THIS; + DmChar08* this = (DmChar08*)thisx; f32 one; switch (limbIndex) { @@ -1144,7 +1142,7 @@ TexturePtr sBigTurtleEyeTextures[] = { void DmChar08_Draw(Actor* thisx, PlayState* play) { s32 pad; - DmChar08* this = THIS; + DmChar08* this = (DmChar08*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c index 35d186a2a6..0a47e35ee1 100644 --- a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c +++ b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmChar09*)thisx) - void DmChar09_Init(Actor* thisx, PlayState* play); void DmChar09_Destroy(Actor* thisx, PlayState* play); void DmChar09_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ void DmChar09_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 anim } void DmChar09_Init(Actor* thisx, PlayState* play) { - DmChar09* this = THIS; + DmChar09* this = (DmChar09*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); SkelAnime_Init(play, &this->skelAnime, &gBeeSkel, &gBeeFlyingAnim, this->jointTable, this->morphTable, @@ -207,7 +205,7 @@ void func_80AB24BC(DmChar09* this, PlayState* play) { } void DmChar09_Update(Actor* thisx, PlayState* play) { - DmChar09* this = THIS; + DmChar09* this = (DmChar09*)thisx; SkelAnime_Update(&this->skelAnime); this->actionFunc(this, play); @@ -219,14 +217,14 @@ void DmChar09_Update(Actor* thisx, PlayState* play) { } s32 DmChar09_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - DmChar09* this = THIS; + DmChar09* this = (DmChar09*)thisx; Matrix_Translate(this->unk_204, this->unk_208, this->unk_20C, MTXMODE_APPLY); return false; } void DmChar09_Draw(Actor* thisx, PlayState* play) { - DmChar09* this = THIS; + DmChar09* this = (DmChar09*)thisx; if ((play->csCtx.state != CS_STATE_IDLE) && this->unk_22E) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c b/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c index f88411bc18..a4ce2d16dd 100644 --- a/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c +++ b/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((DmGm*)thisx) - void DmGm_Init(Actor* thisx, PlayState* play); void DmGm_Destroy(Actor* thisx, PlayState* play); void DmGm_Update(Actor* thisx, PlayState* play); @@ -311,7 +309,7 @@ void DmGm_DoNothing(DmGm* this, PlayState* play) { } void DmGm_Init(Actor* thisx, PlayState* play) { - DmGm* this = THIS; + DmGm* this = (DmGm*)thisx; this->an4ObjectSlot = SubS_GetObjectSlot(OBJECT_AN4, play); this->msmoObjectSlot = SubS_GetObjectSlot(OBJECT_MSMO, play); @@ -322,7 +320,7 @@ void DmGm_Destroy(Actor* thisx, PlayState* play) { } void DmGm_Update(Actor* thisx, PlayState* play) { - DmGm* this = THIS; + DmGm* this = (DmGm*)thisx; this->actionFunc(this, play); @@ -337,7 +335,7 @@ void DmGm_Update(Actor* thisx, PlayState* play) { void DmGm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad[2]; - DmGm* this = THIS; + DmGm* this = (DmGm*)thisx; s8 objectSlot = this->actor.objectSlot; s8 msmoObjectSlot = this->msmoObjectSlot; @@ -369,7 +367,7 @@ void DmGm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void DmGm_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - DmGm* this = THIS; + DmGm* this = (DmGm*)thisx; s16 stepRot; s16 overrideRot; @@ -424,7 +422,7 @@ void DmGm_Draw(Actor* thisx, PlayState* play) { gAnju1EyeSadTex, // DMGM_EYES_SAD gAnju1EyeRelievedClosedTex, // DMGM_EYES_RELIEVED_CLOSED }; - DmGm* this = THIS; + DmGm* this = (DmGm*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Hina/z_dm_hina.c b/src/overlays/actors/ovl_Dm_Hina/z_dm_hina.c index f8e6e46325..a11fd9d6ed 100644 --- a/src/overlays/actors/ovl_Dm_Hina/z_dm_hina.c +++ b/src/overlays/actors/ovl_Dm_Hina/z_dm_hina.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmHina*)thisx) - void DmHina_Init(Actor* thisx, PlayState* play); void DmHina_Destroy(Actor* thisx, PlayState* play); void DmHina_Update(Actor* thisx, PlayState* play); @@ -34,7 +32,7 @@ ActorProfile Dm_Hina_Profile = { }; void DmHina_Init(Actor* thisx, PlayState* play) { - DmHina* this = THIS; + DmHina* this = (DmHina*)thisx; this->isDrawn = true; this->actionFunc = func_80A1F470; @@ -127,7 +125,7 @@ void func_80A1F75C(DmHina* this, PlayState* play) { } void DmHina_Update(Actor* thisx, PlayState* play) { - DmHina* this = THIS; + DmHina* this = (DmHina*)thisx; this->actionFunc(this, play); func_80A1F75C(this, play); @@ -160,7 +158,7 @@ void func_80A1F9AC(DmHina* this, PlayState* play) { } void DmHina_Draw(Actor* thisx, PlayState* play) { - DmHina* this = THIS; + DmHina* this = (DmHina*)thisx; f32 scale; if (this->isDrawn) { diff --git a/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c b/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c index a4a1c8b42f..2c197fe2d2 100644 --- a/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c +++ b/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((DmNb*)thisx) - void DmNb_Init(Actor* thisx, PlayState* play); void DmNb_Destroy(Actor* thisx, PlayState* play); void DmNb_Update(Actor* thisx, PlayState* play); @@ -77,7 +75,7 @@ void DmNb_HandleCutscene(DmNb* this, PlayState* play) { } void DmNb_Init(Actor* thisx, PlayState* play) { - DmNb* this = THIS; + DmNb* this = (DmNb*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gNbSkel, NULL, this->jointTable, this->morphTable, NB_LIMB_MAX); @@ -92,7 +90,7 @@ void DmNb_Destroy(Actor* thisx, PlayState* play) { } void DmNb_Update(Actor* thisx, PlayState* play) { - DmNb* this = THIS; + DmNb* this = (DmNb*)thisx; this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); @@ -103,7 +101,7 @@ void DmNb_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void DmNb_Draw(Actor* thisx, PlayState* play) { - DmNb* this = THIS; + DmNb* this = (DmNb*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, diff --git a/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c b/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c index 2155f5d00f..46c15025a3 100644 --- a/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c +++ b/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmOpstage*)thisx) - void DmOpstage_Init(Actor* thisx, PlayState* play); void DmOpstage_Destroy(Actor* thisx, PlayState* play); void DmOpstage_Update(Actor* thisx, PlayState* play); @@ -39,7 +37,7 @@ void DmOpstage_SetupAction(DmOpstage* this, DmOpstageActionFunc actionFunc) { } void DmOpstage_Init(Actor* thisx, PlayState* play) { - DmOpstage* this = THIS; + DmOpstage* this = (DmOpstage*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DmOpstage_SetupAction(this, DmOpstage_HandleCutscene); @@ -62,7 +60,7 @@ void DmOpstage_Init(Actor* thisx, PlayState* play) { } void DmOpstage_Destroy(Actor* thisx, PlayState* play) { - DmOpstage* this = THIS; + DmOpstage* this = (DmOpstage*)thisx; if (DMOPSTAGE_GET_TYPE(&this->dyna.actor) == DMOPSTAGE_TYPE_GROUND) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -92,7 +90,7 @@ void DmOpstage_HandleCutscene(DmOpstage* this, PlayState* play) { } void DmOpstage_Update(Actor* thisx, PlayState* play) { - DmOpstage* this = THIS; + DmOpstage* this = (DmOpstage*)thisx; this->actionFunc(this, play); if ((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneLayer == 0) && (play->csCtx.curFrame == 480)) { @@ -103,7 +101,7 @@ void DmOpstage_Update(Actor* thisx, PlayState* play) { } void DmOpstage_Draw(Actor* thisx, PlayState* play) { - DmOpstage* this = THIS; + DmOpstage* this = (DmOpstage*)thisx; if (DMOPSTAGE_GET_TYPE(&this->dyna.actor) > DMOPSTAGE_TYPE_GROUND) { // Assumption: worldPos is being manipulated by cutscene diff --git a/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c b/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c index 6219eaf431..8c13e74fb4 100644 --- a/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c +++ b/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmRavine*)thisx) - void DmRavine_Init(Actor* thisx, PlayState* play); void DmRavine_Destroy(Actor* thisx, PlayState* play); void DmRavine_DoNothing(DmRavine* this, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Dm_Ravine_Profile = { void DmRavine_Init(Actor* thisx, PlayState* play) { s32 pad; - DmRavine* this = THIS; + DmRavine* this = (DmRavine*)thisx; if (CHECK_WEEKEVENTREG_ALT(WEEKEVENTREG_ENTERED_GORMAN_TRACK) | cREG(0)) { Actor_Kill(&this->actor); @@ -52,7 +50,7 @@ void DmRavine_DoNothing(DmRavine* this, PlayState* play) { } void DmRavine_Update(Actor* thisx, PlayState* play) { - DmRavine* this = THIS; + DmRavine* this = (DmRavine*)thisx; RoomContext* roomCtx; switch (this->state) { diff --git a/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c b/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c index 39e6238aa0..2fb7165a16 100644 --- a/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c +++ b/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmSa*)thisx) - void DmSa_Init(Actor* thisx, PlayState* play); void DmSa_Destroy(Actor* thisx, PlayState* play); void DmSa_Update(Actor* thisx, PlayState* play); @@ -56,7 +54,7 @@ void DmSa_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 animInde } void DmSa_Init(Actor* thisx, PlayState* play) { - DmSa* this = THIS; + DmSa* this = (DmSa*)thisx; this->unk_2E0 = 0; this->alpha = 255; @@ -75,7 +73,7 @@ void DmSa_DoNothing(DmSa* this, PlayState* play) { } void DmSa_Update(Actor* thisx, PlayState* play) { - DmSa* this = THIS; + DmSa* this = (DmSa*)thisx; SkelAnime_Update(&this->skelAnime); this->alpha += 0; @@ -114,7 +112,7 @@ Gfx* func_80A2EBB0(GraphicsContext* gfxCtx, u32 alpha) { } void DmSa_Draw(Actor* thisx, PlayState* play) { - DmSa* this = THIS; + DmSa* this = (DmSa*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Statue/z_dm_statue.c b/src/overlays/actors/ovl_Dm_Statue/z_dm_statue.c index c49e3a4789..a3424f61c3 100644 --- a/src/overlays/actors/ovl_Dm_Statue/z_dm_statue.c +++ b/src/overlays/actors/ovl_Dm_Statue/z_dm_statue.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_PRESS_SWITCHES) -#define THIS ((DmStatue*)thisx) - void DmStatue_Init(Actor* thisx, PlayState* play); void DmStatue_Destroy(Actor* thisx, PlayState* play); void DmStatue_Update(Actor* thisx, PlayState* play); @@ -29,7 +27,7 @@ ActorProfile Dm_Statue_Profile = { }; void DmStatue_Init(Actor* thisx, PlayState* play) { - DmStatue* this = THIS; + DmStatue* this = (DmStatue*)thisx; Actor_SetScale(&this->actor, 10.0f); } diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index dadbbef46c..509433aae2 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((DmStk*)thisx) - void DmStk_Init(Actor* thisx, PlayState* play); void DmStk_Destroy(Actor* thisx, PlayState* play); void DmStk_Update(Actor* thisx, PlayState* play); @@ -1057,7 +1055,7 @@ void DmStk_PlaySfxForCutscenes(DmStk* this, PlayState* play) { void DmStk_Init(Actor* thisx, PlayState* play) { s32 pad; - DmStk* this = THIS; + DmStk* this = (DmStk*)thisx; this->shouldDraw = true; if (DM_STK_GET_TYPE(&this->actor) != DM_STK_TYPE_MAJORAS_MASK) { @@ -1809,7 +1807,7 @@ void DmStk_ClockTower_Idle(DmStk* this, PlayState* play) { } void DmStk_Update(Actor* thisx, PlayState* play) { - DmStk* this = THIS; + DmStk* this = (DmStk*)thisx; if (DM_STK_GET_TYPE(&this->actor) != DM_STK_TYPE_MAJORAS_MASK) { if (this->animIndex == SK_ANIM_CALL_DOWN_MOON_LOOP) { @@ -1886,7 +1884,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) { } s32 DmStk_OverrideLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - DmStk* this = THIS; + DmStk* this = (DmStk*)thisx; if (limbIndex == SKULL_KID_LIMB_RIGHT_HAND) { if ((this->handType == SK_HAND_TYPE_HOLDING_LINK_MASK_AND_FLUTE) || @@ -1922,7 +1920,7 @@ s32 DmStk_OverrideLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f void DmStk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { s32 pad; s32 pad2; - DmStk* this = THIS; + DmStk* this = (DmStk*)thisx; if (limbIndex == SKULL_KID_LIMB_HEAD) { Matrix_MultZero(&this->headPos); @@ -2080,13 +2078,13 @@ void DmStk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void DmStk_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - DmStk* this = THIS; + DmStk* this = (DmStk*)thisx; DmStk_PostLimbDraw(play, limbIndex, dList, rot, &this->actor, NULL); } void DmStk_Draw(Actor* thisx, PlayState* play) { - DmStk* this = THIS; + DmStk* this = (DmStk*)thisx; if (this->shouldDraw) { if (DM_STK_GET_TYPE(&this->actor) == DM_STK_TYPE_MAJORAS_MASK) { diff --git a/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c b/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c index 2665bf6193..7d08a5fd96 100644 --- a/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c +++ b/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((DmTag*)thisx) - void DmTag_Init(Actor* thisx, PlayState* play); void DmTag_Destroy(Actor* thisx, PlayState* play); void DmTag_Update(Actor* thisx, PlayState* play); @@ -119,7 +117,7 @@ s16 func_80C2247C(DmTag* this, s32 numCutscenes) { } s32 func_80C224D8(Actor* thisx, PlayState* play) { - DmTag* this = THIS; + DmTag* this = (DmTag*)thisx; Actor* sp30; Actor* sp2C; s16 csId = this->actor.csId; @@ -197,7 +195,7 @@ s32 func_80C224D8(Actor* thisx, PlayState* play) { } s32 func_80C227E8(Actor* thisx, PlayState* play) { - DmTag* this = THIS; + DmTag* this = (DmTag*)thisx; if (this->unk_1A4 == 0) { Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_WAIT); @@ -294,7 +292,7 @@ void DmTag_Destroy(Actor* thisx, PlayState* play) { } void DmTag_Update(Actor* thisx, PlayState* play) { - DmTag* this = THIS; + DmTag* this = (DmTag*)thisx; func_80C2291C(this, play); this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Dm_Tsg/z_dm_tsg.c b/src/overlays/actors/ovl_Dm_Tsg/z_dm_tsg.c index 5b7f2fae74..abf32e783a 100644 --- a/src/overlays/actors/ovl_Dm_Tsg/z_dm_tsg.c +++ b/src/overlays/actors/ovl_Dm_Tsg/z_dm_tsg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((DmTsg*)thisx) - void DmTsg_Init(Actor* thisx, PlayState* play); void DmTsg_Destroy(Actor* thisx, PlayState* play); void DmTsg_Update(Actor* thisx, PlayState* play); @@ -29,7 +27,7 @@ ActorProfile Dm_Tsg_Profile = { }; void DmTsg_Init(Actor* thisx, PlayState* play) { - DmTsg* this = THIS; + DmTsg* this = (DmTsg*)thisx; s32 i; if (gSaveContext.save.entrance == ENTRANCE(OPENING_DUNGEON, 0)) { @@ -47,7 +45,7 @@ void DmTsg_Destroy(Actor* thisx, PlayState* play) { } void DmTsg_Update(Actor* thisx, PlayState* play) { - DmTsg* this = THIS; + DmTsg* this = (DmTsg*)thisx; s32 cueChannel; s16 i; @@ -73,7 +71,7 @@ void DmTsg_Update(Actor* thisx, PlayState* play) { void DmTsg_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DmTsg* this = THIS; + DmTsg* this = (DmTsg*)thisx; s32 i; u32 j; diff --git a/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c b/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c index 9cad5d869d..f60d4a007a 100644 --- a/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c +++ b/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((DmZl*)thisx) - void DmZl_Init(Actor* thisx, PlayState* play); void DmZl_Destroy(Actor* thisx, PlayState* play); void DmZl_Update(Actor* thisx, PlayState* play); @@ -112,7 +110,7 @@ void DmZl_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 animInde void DmZl_Init(Actor* thisx, PlayState* play) { s32 pad; - DmZl* this = THIS; + DmZl* this = (DmZl*)thisx; this->animIndex = ZELDA_ANIM_FACING_AWAY; this->unk_2BA = 0; @@ -266,7 +264,7 @@ void DmZl_UpdateFace(DmZl* this) { } void DmZl_Update(Actor* thisx, PlayState* play) { - DmZl* this = THIS; + DmZl* this = (DmZl*)thisx; DmZl_UpdateFace(this); SkelAnime_Update(&this->skelAnime); @@ -279,7 +277,7 @@ s32 DmZl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void DmZl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - DmZl* this = THIS; + DmZl* this = (DmZl*)thisx; if (limbIndex == ZL4_LIMB_RIGHT_HAND) { if ((this->animIndex >= ZELDA_ANIM_GIVING_OCARINA_START) && (this->animIndex <= ZELDA_ANIM_PLAYING_OCARINA)) { @@ -293,7 +291,7 @@ void DmZl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void DmZl_Draw(Actor* thisx, PlayState* play) { - DmZl* this = THIS; + DmZl* this = (DmZl*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index b3235daaf7..2cd890f1d4 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((DoorAna*)thisx) - void DoorAna_Init(Actor* thisx, PlayState* play); void DoorAna_Destroy(Actor* thisx, PlayState* play); void DoorAna_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ void DoorAna_SetupAction(DoorAna* this, DoorAnaActionFunc actionFunction) { } void DoorAna_Init(Actor* thisx, PlayState* play) { - DoorAna* this = THIS; + DoorAna* this = (DoorAna*)thisx; s32 grottoType = DOORANA_GET_TYPE(&this->actor); this->actor.shape.rot.y = this->actor.shape.rot.z = 0; @@ -86,7 +84,7 @@ void DoorAna_Init(Actor* thisx, PlayState* play) { } void DoorAna_Destroy(Actor* thisx, PlayState* play) { - DoorAna* this = THIS; + DoorAna* this = (DoorAna*)thisx; s32 grottoType = DOORANA_GET_TYPE(&this->actor); if (grottoType == DOORANA_TYPE_HIDDEN_BOMB) { @@ -192,7 +190,7 @@ void DoorAna_GrabLink(DoorAna* this, PlayState* play) { } void DoorAna_Update(Actor* thisx, PlayState* play) { - DoorAna* this = THIS; + DoorAna* this = (DoorAna*)thisx; this->actionFunc(this, play); this->actor.shape.rot.y = BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play))); diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 1444dbcd36..379277f73d 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -22,8 +22,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((DoorShutter*)thisx) - void DoorShutter_Init(Actor* thisx, PlayState* play2); void DoorShutter_Destroy(Actor* thisx, PlayState* play); void DoorShutter_Update(Actor* thisx, PlayState* play); @@ -199,7 +197,7 @@ s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) { void DoorShutter_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; s32 sp24; s32 i; @@ -252,7 +250,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { } void DoorShutter_Destroy(Actor* thisx, PlayState* play) { - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; if (this->slidingDoor.dyna.actor.room >= 0) { s32 transitionActorId = DOOR_GET_TRANSITION_ID(&this->slidingDoor.dyna.actor); @@ -643,7 +641,7 @@ void func_808A1C50(DoorShutter* this, PlayState* play) { } void DoorShutter_Update(Actor* thisx, PlayState* play) { - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; Player* player = GET_PLAYER(play); if (!(player->stateFlags1 & @@ -682,7 +680,7 @@ s32 func_808A1D68(DoorShutter* this, PlayState* play) { void DoorShutter_Draw(Actor* thisx, PlayState* play) { s32 pad; - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; ShutterInfo* sp44; if (func_808A1D68(this, play)) { diff --git a/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c b/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c index 1286430aa6..9627e78ab4 100644 --- a/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c +++ b/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((DoorSpiral*)thisx) - void DoorSpiral_Init(Actor* thisx, PlayState* play); void DoorSpiral_Destroy(Actor* thisx, PlayState* play); void DoorSpiral_Update(Actor* thisx, PlayState* play); @@ -129,7 +127,7 @@ u8 func_809A2BF8(PlayState* play) { } void DoorSpiral_Init(Actor* thisx, PlayState* play) { - DoorSpiral* this = THIS; + DoorSpiral* this = (DoorSpiral*)thisx; s32 transitionId = DOOR_GET_TRANSITION_ID(thisx); s8 objectSlot; @@ -230,7 +228,7 @@ void func_809A3098(DoorSpiral* this, PlayState* play) { } void DoorSpiral_Update(Actor* thisx, PlayState* play) { - DoorSpiral* this = THIS; + DoorSpiral* this = (DoorSpiral*)thisx; Player* player = GET_PLAYER(play); if (!(player->stateFlags1 & @@ -242,7 +240,7 @@ void DoorSpiral_Update(Actor* thisx, PlayState* play) { void DoorSpiral_Draw(Actor* thisx, PlayState* play) { s32 pad; - DoorSpiral* this = THIS; + DoorSpiral* this = (DoorSpiral*)thisx; if (this->actor.objectSlot == this->objectSlot) { SpiralInfo* spiralInfo = &sSpiralInfoTable[this->unk148]; diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 360382488a..3e8b4efb08 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((DoorWarp1*)thisx) - void DoorWarp1_Init(Actor* thisx, PlayState* play); void DoorWarp1_Destroy(Actor* thisx, PlayState* play); void DoorWarp1_Update(Actor* thisx, PlayState* play); @@ -111,7 +109,7 @@ s32 func_808B866C(DoorWarp1* this, PlayState* play) { } void DoorWarp1_Init(Actor* thisx, PlayState* play) { - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; this->unk_1CC = 0; this->unk_202 = 0; @@ -171,7 +169,7 @@ void DoorWarp1_Init(Actor* thisx, PlayState* play) { void DoorWarp1_Destroy(Actor* thisx, PlayState* play) { s32 pad; - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; s16 i; LightContext_RemoveLight(play, &play->lightCtx, this->unk_1DC); @@ -907,7 +905,7 @@ void func_808BABF4(DoorWarp1* this, PlayState* play) { } void DoorWarp1_Update(Actor* thisx, PlayState* play) { - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; if (this->unk_203 == 0) { this->unk_204 = 1.0f; @@ -1088,7 +1086,7 @@ void func_808BB4F4(DoorWarp1* this, PlayState* play2) { } void DoorWarp1_Draw(Actor* thisx, PlayState* play) { - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; switch (DOORWARP1_GET_FF(&this->dyna.actor)) { case ENDOORWARP1_FF_0: diff --git a/src/overlays/actors/ovl_Eff_Change/z_eff_change.c b/src/overlays/actors/ovl_Eff_Change/z_eff_change.c index 30750f65c3..977235af26 100644 --- a/src/overlays/actors/ovl_Eff_Change/z_eff_change.c +++ b/src/overlays/actors/ovl_Eff_Change/z_eff_change.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EffChange*)thisx) - void EffChange_Init(Actor* thisx, PlayState* play); void EffChange_Destroy(Actor* thisx, PlayState* play); void EffChange_Update(Actor* thisx, PlayState* play); @@ -43,7 +41,7 @@ static u8 D_80A4C920[] = { }; void EffChange_Init(Actor* thisx, PlayState* play) { - EffChange* this = THIS; + EffChange* this = (EffChange*)thisx; this->actionFunc = func_80A4C5CC; this->actor.draw = EffChange_Draw; @@ -60,7 +58,7 @@ void EffChange_Init(Actor* thisx, PlayState* play) { } void EffChange_Destroy(Actor* thisx, PlayState* play) { - EffChange* this = THIS; + EffChange* this = (EffChange*)thisx; Keyframe_DestroyFlex(&this->kfSkelAnime); } @@ -119,7 +117,7 @@ void func_80A4C5CC(EffChange* this, PlayState* play) { } void EffChange_Update(Actor* thisx, PlayState* play) { - EffChange* this = THIS; + EffChange* this = (EffChange*)thisx; this->actionFunc(this, play); } @@ -127,7 +125,7 @@ void EffChange_Update(Actor* thisx, PlayState* play) { void EffChange_Draw(Actor* thisx, PlayState* play) { s32 pad; Mtx* mtxStack; - EffChange* this = THIS; + EffChange* this = (EffChange*)thisx; AnimatedMat_DrawStepXlu(play, Lib_SegmentedToVirtual(&gameplay_keep_Matanimheader_028FEC), this->step); mtxStack = GRAPH_ALLOC(play->state.gfxCtx, this->kfSkelAnime.skeleton->dListCount * sizeof(Mtx)); diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index e6b05bd0ba..0c70c00190 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EffDust*)thisx) - void EffDust_Init(Actor* thisx, PlayState* play); void EffDust_Destroy(Actor* thisx, PlayState* play); void EffDust_Update(Actor* thisx, PlayState* play); @@ -50,7 +48,7 @@ void func_80918B40(EffDust* this) { } void EffDust_Init(Actor* thisx, PlayState* play) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; u32 type = this->actor.params; func_80918B40(this); @@ -252,7 +250,7 @@ void func_80919230(EffDust* this, PlayState* play) { } void EffDust_Update(Actor* thisx, PlayState* play) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; this->actionFunc(this, play); } @@ -262,7 +260,7 @@ Gfx D_80919DB0[] = { }; void func_80919768(Actor* thisx, PlayState* play2) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; PlayState* play = play2; GraphicsContext* gfxCtx = play2->state.gfxCtx; f32* distanceTraveled; @@ -317,7 +315,7 @@ void func_80919768(Actor* thisx, PlayState* play2) { } void func_809199FC(Actor* thisx, PlayState* play2) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; PlayState* play = play2; GraphicsContext* gfxCtx = play2->state.gfxCtx; f32* distanceTraveled; @@ -374,7 +372,7 @@ void func_809199FC(Actor* thisx, PlayState* play2) { } void EffDust_Draw(Actor* thisx, PlayState* play) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; this->drawFunc(thisx, play); } diff --git a/src/overlays/actors/ovl_Eff_Kamejima_Wave/z_eff_kamejima_wave.c b/src/overlays/actors/ovl_Eff_Kamejima_Wave/z_eff_kamejima_wave.c index aab4e1687c..c913252dea 100644 --- a/src/overlays/actors/ovl_Eff_Kamejima_Wave/z_eff_kamejima_wave.c +++ b/src/overlays/actors/ovl_Eff_Kamejima_Wave/z_eff_kamejima_wave.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EffKamejimaWave*)thisx) - void EffKamejimaWave_Init(Actor* thisx, PlayState* play); void EffKamejimaWave_Destroy(Actor* thisx, PlayState* play); void EffKamejimaWave_Update(Actor* thisx, PlayState* play); @@ -45,7 +43,7 @@ s16 sVtxAlpha; AnimatedMaterial* D_80BCF1C4; void EffKamejimaWave_Init(Actor* thisx, PlayState* play) { - EffKamejimaWave* this = THIS; + EffKamejimaWave* this = (EffKamejimaWave*)thisx; Actor_SetScale(&this->actor, 0.2f); this->actor.scale.y = 0.0f; @@ -131,7 +129,7 @@ void func_80BCEDE0(EffKamejimaWave* this, PlayState* play) { } void EffKamejimaWave_Update(Actor* thisx, PlayState* play) { - EffKamejimaWave* this = THIS; + EffKamejimaWave* this = (EffKamejimaWave*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Eff_Lastday/z_eff_lastday.c b/src/overlays/actors/ovl_Eff_Lastday/z_eff_lastday.c index 5f64438a20..b285033620 100644 --- a/src/overlays/actors/ovl_Eff_Lastday/z_eff_lastday.c +++ b/src/overlays/actors/ovl_Eff_Lastday/z_eff_lastday.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EffLastday*)thisx) - void EffLastday_Init(Actor* thisx, PlayState* play2); void EffLastday_Destroy(Actor* thisx, PlayState* play); void EffLastday_Update(Actor* thisx, PlayState* play); @@ -42,7 +40,7 @@ ActorProfile Eff_Lastday_Profile = { void EffLastday_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EffLastday* this = THIS; + EffLastday* this = (EffLastday*)thisx; Actor_SetScale(&this->actor, 0.1f); switch (EFFLASTDAY_GET_F(&this->actor)) { @@ -217,7 +215,7 @@ void func_80BEBF78(EffLastday* this, PlayState* play) { } void EffLastday_Update(Actor* thisx, PlayState* play) { - EffLastday* this = THIS; + EffLastday* this = (EffLastday*)thisx; this->actionFunc(this, play); } @@ -232,7 +230,7 @@ void EffLastday_SetVtxAlpha(s16 alpha) { } void EffLastday_Draw(Actor* thisx, PlayState* play) { - EffLastday* this = THIS; + EffLastday* this = (EffLastday*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Eff_Stk/z_eff_stk.c b/src/overlays/actors/ovl_Eff_Stk/z_eff_stk.c index 873d9b14de..6df46b47b6 100644 --- a/src/overlays/actors/ovl_Eff_Stk/z_eff_stk.c +++ b/src/overlays/actors/ovl_Eff_Stk/z_eff_stk.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EffStk*)thisx) - void EffStk_Init(Actor* thisx, PlayState* play); void EffStk_Destroy(Actor* thisx, PlayState* play); void EffStk_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile Eff_Stk_Profile = { }; void EffStk_Init(Actor* thisx, PlayState* play) { - EffStk* this = THIS; + EffStk* this = (EffStk*)thisx; Actor_SetScale(&this->actor, 0.2f); this->actionFunc = func_80BF0DE0; @@ -71,13 +69,13 @@ void func_80BF0DE0(EffStk* this, PlayState* play) { } void EffStk_Update(Actor* thisx, PlayState* play) { - EffStk* this = THIS; + EffStk* this = (EffStk*)thisx; this->actionFunc(this, play); } void EffStk_Draw(Actor* thisx, PlayState* play) { - EffStk* this = THIS; + EffStk* this = (EffStk*)thisx; s32 pad; Camera* activeCam = GET_ACTIVE_CAM(play); Vec3f eye = activeCam->eye; diff --git a/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c b/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c index 58a9dc23cf..9d8541f762 100644 --- a/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c +++ b/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EffZoraband*)thisx) - void EffZoraband_Init(Actor* thisx, PlayState* play); void EffZoraband_Destroy(Actor* thisx, PlayState* play); void EffZoraband_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile Eff_Zoraband_Profile = { }; void EffZoraband_Init(Actor* thisx, PlayState* play) { - EffZoraband* this = THIS; + EffZoraband* this = (EffZoraband*)thisx; Actor_SetScale(&this->actor, 1.0f); this->actionFunc = EffZoraband_MikauFadeOut; @@ -67,14 +65,14 @@ void EffZoraband_MikauFadeOut(EffZoraband* this, PlayState* play) { } void EffZoraband_Update(Actor* thisx, PlayState* play) { - EffZoraband* this = THIS; + EffZoraband* this = (EffZoraband*)thisx; this->actionFunc(this, play); } void EffZoraband_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EffZoraband* this = THIS; + EffZoraband* this = (EffZoraband*)thisx; if (this->alpha != 0) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index 102c0287ec..e7245c4187 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ElfMsg*)thisx) - void ElfMsg_Init(Actor* thisx, PlayState* play); void ElfMsg_Destroy(Actor* thisx, PlayState* play); void ElfMsg_Update(Actor* thisx, PlayState* play); @@ -70,7 +68,7 @@ s32 func_8092DF9C(ElfMsg* this, PlayState* play) { } void ElfMsg_Init(Actor* thisx, PlayState* play) { - ElfMsg* this = THIS; + ElfMsg* this = (ElfMsg*)thisx; if (!func_8092DF9C(this, play)) { Actor_ProcessInitChain(&this->actor, sInitChain); @@ -132,7 +130,7 @@ void func_8092E284(ElfMsg* this, PlayState* play) { } void ElfMsg_Update(Actor* thisx, PlayState* play) { - ElfMsg* this = THIS; + ElfMsg* this = (ElfMsg*)thisx; if (func_8092DF9C(this, play) == 0) { if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index cf8cd83b94..6420317d1c 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ElfMsg2*)thisx) - void ElfMsg2_Init(Actor* thisx, PlayState* play); void ElfMsg2_Destroy(Actor* thisx, PlayState* play); void ElfMsg2_Update(Actor* thisx, PlayState* play); @@ -72,7 +70,7 @@ s32 func_8096EC4C(ElfMsg2* this, PlayState* play) { } void ElfMsg2_Init(Actor* thisx, PlayState* play) { - ElfMsg2* this = THIS; + ElfMsg2* this = (ElfMsg2*)thisx; if (!func_8096EC4C(this, play)) { if ((this->actor.home.rot.x > 0) && (this->actor.home.rot.x < 8)) { @@ -143,7 +141,7 @@ void func_8096EFD0(ElfMsg2* this, PlayState* play) { } void ElfMsg2_Update(Actor* thisx, PlayState* play) { - ElfMsg2* this = THIS; + ElfMsg2* this = (ElfMsg2*)thisx; if (!func_8096EC4C(this, play)) { this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c b/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c index 61975a1a9b..ea259fd02e 100644 --- a/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c +++ b/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ElfMsg3*)thisx) - void ElfMsg3_Init(Actor* thisx, PlayState* play); void ElfMsg3_Destroy(Actor* thisx, PlayState* play); void ElfMsg3_Update(Actor* thisx, PlayState* play); @@ -69,7 +67,7 @@ s32 func_80A2CD1C(ElfMsg3* this, PlayState* play) { } void ElfMsg3_Init(Actor* thisx, PlayState* play) { - ElfMsg3* this = THIS; + ElfMsg3* this = (ElfMsg3*)thisx; if (!func_80A2CD1C(this, play)) { Actor_ProcessInitChain(&this->actor, sInitChain); @@ -130,7 +128,7 @@ void func_80A2CF7C(ElfMsg3* this, PlayState* play) { } void ElfMsg3_Update(Actor* thisx, PlayState* play) { - ElfMsg3* this = THIS; + ElfMsg3* this = (ElfMsg3*)thisx; if (!func_80A2CD1C(this, play)) { if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { diff --git a/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c b/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c index 8701d2403d..803fb5f492 100644 --- a/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c +++ b/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ElfMsg4*)thisx) - void ElfMsg4_Init(Actor* thisx, PlayState* play); void ElfMsg4_Destroy(Actor* thisx, PlayState* play); void ElfMsg4_Update(Actor* thisx, PlayState* play); @@ -69,7 +67,7 @@ s32 func_80AFD380(ElfMsg4* this, PlayState* play) { } void ElfMsg4_Init(Actor* thisx, PlayState* play) { - ElfMsg4* this = THIS; + ElfMsg4* this = (ElfMsg4*)thisx; if (!func_80AFD380(this, play)) { Actor_ProcessInitChain(&this->actor, sInitChain); @@ -150,7 +148,7 @@ void func_80AFD770(ElfMsg4* this, PlayState* play) { void ElfMsg4_Update(Actor* thisx, PlayState* play) { Actor* bgActor; - ElfMsg4* this = THIS; + ElfMsg4* this = (ElfMsg4*)thisx; if (!func_80AFD380(this, play)) { bgActor = this->elfMsg5; diff --git a/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c b/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c index 88a1b8bcf1..f4e3561b17 100644 --- a/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c +++ b/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ElfMsg5*)thisx) - void ElfMsg5_Init(Actor* thisx, PlayState* play); void ElfMsg5_Destroy(Actor* thisx, PlayState* play); void ElfMsg5_Update(Actor* thisx, PlayState* play); @@ -66,7 +64,7 @@ s32 func_80AFD990(ElfMsg5* this, PlayState* play) { } void ElfMsg5_Init(Actor* thisx, PlayState* play) { - ElfMsg5* this = THIS; + ElfMsg5* this = (ElfMsg5*)thisx; if (!func_80AFD990(this, play)) { Actor_ProcessInitChain(&this->actor, sInitChainsInitChain); @@ -84,7 +82,7 @@ void func_80AFDB38(ElfMsg5* this, PlayState* play) { } void ElfMsg5_Update(Actor* thisx, PlayState* play) { - ElfMsg5* this = THIS; + ElfMsg5* this = (ElfMsg5*)thisx; if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || Flags_GetSwitch(play, -this->actor.home.rot.y - 1)) { diff --git a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c index 47e7ab4985..2787eb4bdc 100644 --- a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c +++ b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ElfMsg6*)thisx) - void ElfMsg6_Init(Actor* thisx, PlayState* play); void ElfMsg6_Destroy(Actor* thisx, PlayState* play); void ElfMsg6_Update(Actor* thisx, PlayState* play); @@ -124,7 +122,7 @@ s32 func_80BA16F4(ElfMsg6* this, PlayState* play) { } void ElfMsg6_Init(Actor* thisx, PlayState* play) { - ElfMsg6* this = THIS; + ElfMsg6* this = (ElfMsg6*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -409,7 +407,7 @@ void func_80BA21C4(ElfMsg6* this, PlayState* play) { } void ElfMsg6_Update(Actor* thisx, PlayState* play) { - ElfMsg6* this = THIS; + ElfMsg6* this = (ElfMsg6*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Ah/z_en_ah.c b/src/overlays/actors/ovl_En_Ah/z_en_ah.c index 18ad7452e0..f400b1cb25 100644 --- a/src/overlays/actors/ovl_En_Ah/z_en_ah.c +++ b/src/overlays/actors/ovl_En_Ah/z_en_ah.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnAh*)thisx) - void EnAh_Init(Actor* thisx, PlayState* play); void EnAh_Destroy(Actor* thisx, PlayState* play); void EnAh_Update(Actor* thisx, PlayState* play); @@ -535,7 +533,7 @@ void func_80BD3768(EnAh* this, PlayState* play) { } void EnAh_Init(Actor* thisx, PlayState* play) { - EnAh* this = THIS; + EnAh* this = (EnAh*)thisx; if (EnAh_FindActor(this, play, ACTORCAT_NPC, ACTOR_EN_AH)) { Actor_Kill(&this->actor); @@ -559,13 +557,13 @@ void EnAh_Init(Actor* thisx, PlayState* play) { } void EnAh_Destroy(Actor* thisx, PlayState* play) { - EnAh* this = THIS; + EnAh* this = (EnAh*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnAh_Update(Actor* thisx, PlayState* play) { - EnAh* this = THIS; + EnAh* this = (EnAh*)thisx; f32 radius; f32 height; @@ -591,7 +589,7 @@ void EnAh_Update(Actor* thisx, PlayState* play) { } void EnAh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnAh* this = THIS; + EnAh* this = (EnAh*)thisx; if (limbIndex == OBJECT_AH_LIMB_07) { Matrix_MultVec3f(&D_80BD3F00, &this->actor.focus.pos); @@ -600,7 +598,7 @@ void EnAh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnAh_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnAh* this = THIS; + EnAh* this = (EnAh*)thisx; s32 stepRot; s32 overrideRot; @@ -641,7 +639,7 @@ void EnAh_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnAh_Draw(Actor* thisx, PlayState* play) { - EnAh* this = THIS; + EnAh* this = (EnAh*)thisx; if (this->scheduleResult != 0) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index c478e0d234..e6eb108a37 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnAkindonuts*)thisx) - void EnAkindonuts_Init(Actor* thisx, PlayState* play); void EnAkindonuts_Destroy(Actor* thisx, PlayState* play); void EnAkindonuts_Update(Actor* thisx, PlayState* play); @@ -1688,7 +1686,7 @@ void func_80BEFD74(EnAkindonuts* this, PlayState* play) { void EnAkindonuts_Init(Actor* thisx, PlayState* play) { s32 pad; - EnAkindonuts* this = THIS; + EnAkindonuts* this = (EnAkindonuts*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gBusinessScrubSkel, &gBusinessScrubStandingAnim, this->jointTable, @@ -1720,13 +1718,13 @@ void EnAkindonuts_Init(Actor* thisx, PlayState* play) { } void EnAkindonuts_Destroy(Actor* thisx, PlayState* play) { - EnAkindonuts* this = THIS; + EnAkindonuts* this = (EnAkindonuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnAkindonuts_Update(Actor* thisx, PlayState* play) { - EnAkindonuts* this = THIS; + EnAkindonuts* this = (EnAkindonuts*)thisx; Actor_SetFocus(&this->actor, 60.0f); SkelAnime_Update(&this->skelAnime); @@ -1741,7 +1739,7 @@ void EnAkindonuts_Update(Actor* thisx, PlayState* play) { } s32 EnAkindonuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnAkindonuts* this = THIS; + EnAkindonuts* this = (EnAkindonuts*)thisx; if (((this->animIndex == ENAKINDONUTS_ANIM_4) && (this->unk_33E == 0)) || ((this->animIndex == ENAKINDONUTS_ANIM_8) && (this->unk_33E == 0)) || @@ -1797,7 +1795,7 @@ void EnAkindonuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnAkindonuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnAkindonuts* this = THIS; + EnAkindonuts* this = (EnAkindonuts*)thisx; if (((this->unk_33E == 1) || (this->unk_33E == 2)) && ((limbIndex == BUSINESS_SCRUB_LIMB_SCALP) || (limbIndex == BUSINESS_SCRUB_LIMB_HAIR))) { @@ -1816,7 +1814,7 @@ void EnAkindonuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx } void EnAkindonuts_Draw(Actor* thisx, PlayState* play) { - EnAkindonuts* this = THIS; + EnAkindonuts* this = (EnAkindonuts*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Al/z_en_al.c b/src/overlays/actors/ovl_En_Al/z_en_al.c index bca0125635..2b6669a3dc 100644 --- a/src/overlays/actors/ovl_En_Al/z_en_al.c +++ b/src/overlays/actors/ovl_En_Al/z_en_al.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnAl*)thisx) - void EnAl_Init(Actor* thisx, PlayState* play); void EnAl_Destroy(Actor* thisx, PlayState* play); void EnAl_Update(Actor* thisx, PlayState* play); @@ -622,7 +620,7 @@ s32 func_80BDE678(EnAl* this, s16* arg1, s16 arg2) { } s32 func_80BDE7FC(Actor* thisx, PlayState* play) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; s16 csId = func_80BDE484(this, 0); s32 pad2; s32 sp20 = false; @@ -668,7 +666,7 @@ s32 func_80BDE7FC(Actor* thisx, PlayState* play) { s32 func_80BDE92C(Actor* thisx, PlayState* play) { s32 pad; - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; Actor* sp1C = EnAl_FindActor(this, play, ACTORCAT_NPC, ACTOR_EN_GM); Actor* temp_v0 = EnAl_FindActor(this, play, ACTORCAT_NPC, ACTOR_EN_TOTO); @@ -715,7 +713,7 @@ s32 func_80BDE92C(Actor* thisx, PlayState* play) { } s32 func_80BDEA14(Actor* thisx, PlayState* play) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; s32 sp18 = false; switch (this->unk_4E6) { @@ -1104,7 +1102,7 @@ void func_80BDF6C4(EnAl* this, PlayState* play) { } void EnAl_Init(Actor* thisx, PlayState* play) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gMadameAromaSkel, NULL, this->jointTable, this->morphTable, @@ -1121,13 +1119,13 @@ void EnAl_Init(Actor* thisx, PlayState* play) { } void EnAl_Destroy(Actor* thisx, PlayState* play) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; Collider_DestroyCylinder(play, &this->unk_310); } void EnAl_Update(Actor* thisx, PlayState* play) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; func_80BDEC2C(this, play); @@ -1164,7 +1162,7 @@ s32 EnAl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnAl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; switch (limbIndex) { case MADAME_AROMA_LIMB_SHAWL_MIDDLE: @@ -1202,7 +1200,7 @@ void EnAl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnAl_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; s32 stepRot; s32 overrideRot; @@ -1232,7 +1230,7 @@ void EnAl_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnAl_Draw(Actor* thisx, PlayState* play) { - EnAl* this = THIS; + EnAl* this = (EnAl*)thisx; s32 i; if (this->scheduleResult != 0) { diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 022b62c5d8..fea5eb3f6f 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnAm*)thisx) - void EnAm_Init(Actor* thisx, PlayState* play); void EnAm_Destroy(Actor* thisx, PlayState* play); void EnAm_Update(Actor* thisx, PlayState* play); @@ -133,7 +131,7 @@ static InitChainEntry sInitChain[] = { }; void EnAm_Init(Actor* thisx, PlayState* play) { - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 300.0f / 7.0f); @@ -150,7 +148,7 @@ void EnAm_Init(Actor* thisx, PlayState* play) { } void EnAm_Destroy(Actor* thisx, PlayState* play) { - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; Collider_DestroyCylinder(play, &this->enemyCollider); Collider_DestroyCylinder(play, &this->interactCollider); @@ -469,7 +467,7 @@ s32 EnAm_UpdateDamage(EnAm* this, PlayState* play) { } void EnAm_Update(Actor* thisx, PlayState* play) { - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; s32 pad; if (EnAm_UpdateDamage(this, play) == false) { @@ -532,7 +530,7 @@ void EnAm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, s32 phi_s3; Vec3f* phi_s1; Vec3f* phi_s2; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; phi_s2 = 0; phi_s1 = 0; @@ -559,7 +557,7 @@ void EnAm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnAm_Draw(Actor* thisx, PlayState* play) { Gfx* gfx; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_An/z_en_an.c b/src/overlays/actors/ovl_En_An/z_en_an.c index b1f561c86d..a5f99840f1 100644 --- a/src/overlays/actors/ovl_En_An/z_en_an.c +++ b/src/overlays/actors/ovl_En_An/z_en_an.c @@ -16,8 +16,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnAn*)thisx) - void EnAn_Init(Actor* thisx, PlayState* play); void EnAn_Destroy(Actor* thisx, PlayState* play); void EnAn_Update(Actor* thisx, PlayState* play); @@ -1452,7 +1450,7 @@ s16 EnAn_GetChildCsId(EnAn* this, s32 numCutscenes) { } s32 EnAn_MsgEvent_ReceiveLetterFromPostman(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s16 csId = EnAn_GetCsId(this, 0); s32 ret = false; @@ -1498,7 +1496,7 @@ s32 EnAn_MsgEvent_ReceiveLetterFromPostman(Actor* thisx, PlayState* play) { } s32 EnAn_MsgEvent_AttendGoron(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s16 csId = EnAn_GetCsId(this, 0); s32 ret = false; @@ -1543,7 +1541,7 @@ s32 EnAn_MsgEvent_AttendGoron(Actor* thisx, PlayState* play) { } s32 EnAn_MsgEvent_GiveLunchToGranny(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s16 csId = EnAn_GetChildCsId(this, 0); s32 ret = false; @@ -1590,7 +1588,7 @@ s32 EnAn_MsgEvent_GiveLunchToGranny(Actor* thisx, PlayState* play) { // Only used if Player is using Kafei's Mask or if Human and Promised midnight meeting s32 EnAn_MsgEvent_MidnightMeeting(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; if (this->msgEventState == 0) { Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_WAIT); @@ -1606,7 +1604,7 @@ s32 EnAn_MsgEvent_MidnightMeeting(Actor* thisx, PlayState* play) { } s32 EnAn_MsgEvent_Cooking(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s32 ret = false; switch (this->msgEventState) { @@ -1636,7 +1634,7 @@ s32 EnAn_MsgEvent_Cooking(Actor* thisx, PlayState* play) { } s32 EnAn_MsgEvent_LaundryPool(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s32 ret = false; switch (this->msgEventState) { @@ -3377,7 +3375,7 @@ void EnAn_HandleCouplesMaskCutscene(EnAn* this, PlayState* play) { void EnAn_Init(Actor* thisx, PlayState* play) { s32 pad; - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s32 temp_v1; s32 watchedCouplesMaskCs; @@ -3412,13 +3410,13 @@ void EnAn_Init(Actor* thisx, PlayState* play) { } void EnAn_Destroy(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnAn_Update(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; if (EnAn_InitObjectSlots(this, play)) { return; @@ -3450,7 +3448,7 @@ void EnAn_Update(Actor* thisx, PlayState* play) { } void EnAn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; if (limbIndex == ANJU1_LIMB_HEAD) { static Vec3f D_80B58ED4 = { 1000.0f, 0.0f, 0.0f }; @@ -3469,7 +3467,7 @@ void EnAn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnAn_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; s32 stepRot; s32 overrideRot; @@ -3499,7 +3497,7 @@ void EnAn_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnAn_Draw(Actor* thisx, PlayState* play) { - EnAn* this = THIS; + EnAn* this = (EnAn*)thisx; if ((this->scheduleResult != ANJU_SCH_NONE) || this->forceDraw) { static TexturePtr sMouthTextures[ENAN_MOUTH_MAX] = { diff --git a/src/overlays/actors/ovl_En_And/z_en_and.c b/src/overlays/actors/ovl_En_And/z_en_and.c index b3a77c5f76..9c28346a47 100644 --- a/src/overlays/actors/ovl_En_And/z_en_and.c +++ b/src/overlays/actors/ovl_En_And/z_en_and.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnAnd*)thisx) - #define EYE_TEXTURES_COUNT 4 void EnAnd_Init(Actor* thisx, PlayState* play); @@ -116,7 +114,7 @@ void EnAnd_HandleCutscene(EnAnd* this, PlayState* play) { } void EnAnd_Init(Actor* thisx, PlayState* play) { - EnAnd* this = THIS; + EnAnd* this = (EnAnd*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gAndSkel, NULL, this->jointTable, this->morphTable, @@ -133,7 +131,7 @@ void EnAnd_Destroy(Actor* thisx, PlayState* play) { } void EnAnd_Update(Actor* thisx, PlayState* play) { - EnAnd* this = THIS; + EnAnd* this = (EnAnd*)thisx; this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); @@ -141,7 +139,7 @@ void EnAnd_Update(Actor* thisx, PlayState* play) { } void EnAnd_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnAnd* this = THIS; + EnAnd* this = (EnAnd*)thisx; s32 stepRot; s32 overrideRot; @@ -190,7 +188,7 @@ void EnAnd_Draw(Actor* thisx, PlayState* play) { gAndEyeClosedTex, gAndEyeOpeningTex, }; - EnAnd* this = THIS; + EnAnd* this = (EnAnd*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 4f9a52ab61..db7b2150ca 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnAni*)thisx) - // clang-format off #define ANI_STATE_STANDING (0) #define ANI_STATE_UNK (1 << 0) @@ -113,7 +111,7 @@ void EnAni_WaitForEyeOpen(EnAni* this) { void EnAni_Init(Actor* thisx, PlayState* play) { s32 pad; - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); @@ -152,7 +150,7 @@ void EnAni_Init(Actor* thisx, PlayState* play) { } void EnAni_Destroy(Actor* thisx, PlayState* play) { - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -274,7 +272,7 @@ void EnAni_HangInTree(EnAni* this, PlayState* play) { } void EnAni_Update(Actor* thisx, PlayState* play) { - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; f32 minVelocity; Collider_UpdateCylinder(&this->actor, &this->collider1); @@ -319,7 +317,7 @@ void EnAni_Update(Actor* thisx, PlayState* play) { } s32 EnAni_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; if (limbIndex == ANI_LIMB_HEAD) { rot->x += this->headRot.y; @@ -340,7 +338,7 @@ void EnAni_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnAni_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { gAniOpenEyeTex, gAniClosingEyeTex, gAniClosedEyeTex }; s32 pad; - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c index 1f50323a60..df8af5b062 100644 --- a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c +++ b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnAob01*)thisx) - void EnAob01_Init(Actor* thisx, PlayState* play); void EnAob01_Destroy(Actor* thisx, PlayState* play); void EnAob01_Update(Actor* thisx, PlayState* play); @@ -1100,7 +1098,7 @@ void EnAob01_InitializeDogTextOffsets(void) { void EnAob01_Init(Actor* thisx, PlayState* play) { s32 pad; - EnAob01* this = THIS; + EnAob01* this = (EnAob01*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gMamamuYanSkel, NULL, this->jointTable, this->morphTable, @@ -1142,7 +1140,7 @@ void EnAob01_Init(Actor* thisx, PlayState* play) { } void EnAob01_Destroy(Actor* thisx, PlayState* play) { - EnAob01* this = THIS; + EnAob01* this = (EnAob01*)thisx; if (!(this->stateFlags & ENAOB01_FLAG_STARTED_RACE)) { CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT); @@ -1152,14 +1150,14 @@ void EnAob01_Destroy(Actor* thisx, PlayState* play) { } void EnAob01_Update(Actor* thisx, PlayState* play) { - EnAob01* this = THIS; + EnAob01* this = (EnAob01*)thisx; this->actionFunc(this, play); EnAob01_UpdateCommon(this, play); } s32 EnAob01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnAob01* this = THIS; + EnAob01* this = (EnAob01*)thisx; TexturePtr eyeTextures[] = { gMamamuYanEyeOpenTex, gMamamuYanEyeHalfTex, @@ -1199,7 +1197,7 @@ s32 EnAob01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnAob01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sFocusOffset = { 0.0f, 0.0f, 0.0f }; - EnAob01* this = THIS; + EnAob01* this = (EnAob01*)thisx; if (limbIndex == MAMAMU_YAN_LIMB_HEAD) { Matrix_MultVec3f(&sFocusOffset, &this->actor.focus.pos); @@ -1211,7 +1209,7 @@ void EnAob01_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { void EnAob01_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnAob01* this = THIS; + EnAob01* this = (EnAob01*)thisx; Vec3f pos; Vec3f scale; diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index fb655869f1..7641cceae8 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnArrow*)thisx) - void EnArrow_Init(Actor* thisx, PlayState* play); void EnArrow_Destroy(Actor* thisx, PlayState* play); void EnArrow_Update(Actor* thisx, PlayState* play); @@ -121,7 +119,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) { { 255, 255, 170, 255 }, { 255, 255, 0, 0 }, }; - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (this->actor.params == -ARROW_TYPE_DEKU_NUT) { @@ -172,7 +170,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) { } void EnArrow_Destroy(Actor* thisx, PlayState* play) { - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; if (ARROW_IS_ARROW(this->actor.params)) { Effect_Destroy(play, this->unk_240); @@ -586,7 +584,7 @@ void EnArrow_Update(Actor* thisx, PlayState* play) { static Color_RGBA8 sPrimColor = { 255, 255, 100, 255 }; static Color_RGBA8 sEnvColor = { 255, 50, 0, 0 }; s32 pad; - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; Player* player = GET_PLAYER(play); if ((this->unk_263 != 0) || @@ -688,7 +686,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) { { 0.0f, 0.0f, 20.0f }, }, }; - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; s32 phi_v0; if (ARROW_IS_ARROW(this->actor.params)) { diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index 4e216da28c..51e1418bb9 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnAttackNiw*)thisx) - void EnAttackNiw_Init(Actor* thisx, PlayState* play); void EnAttackNiw_Destroy(Actor* thisx, PlayState* play); void EnAttackNiw_Update(Actor* thisx, PlayState* play); @@ -39,7 +37,7 @@ static InitChainEntry sInitChain[] = { }; void EnAttackNiw_Init(Actor* thisx, PlayState* play) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); @@ -65,7 +63,7 @@ void EnAttackNiw_Init(Actor* thisx, PlayState* play) { } void EnAttackNiw_Destroy(Actor* thisx, PlayState* play) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; EnNiw* parent = (EnNiw*)this->actor.parent; if ((this->actor.parent != NULL) && (this->actor.parent->update != NULL)) { @@ -347,7 +345,7 @@ void EnAttackNiw_FlyAway(EnAttackNiw* this, PlayState* play) { } void EnAttackNiw_Update(Actor* thisx, PlayState* play) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; s32 pad; EnNiw* parent; Player* player = GET_PLAYER(play); @@ -422,7 +420,7 @@ void EnAttackNiw_Update(Actor* thisx, PlayState* play) { } s32 EnAttackNiw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; if (limbIndex == NIW_LIMB_UPPER_BODY) { rot->y += TRUNCF_BINANG(this->upperBodyRotY); @@ -447,7 +445,7 @@ s32 EnAttackNiw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnAttackNiw_Draw(Actor* thisx, PlayState* play) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Az/z_en_az.c b/src/overlays/actors/ovl_En_Az/z_en_az.c index fd035f6aa5..9052f57a48 100644 --- a/src/overlays/actors/ovl_En_Az/z_en_az.c +++ b/src/overlays/actors/ovl_En_Az/z_en_az.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnAz*)thisx) - typedef struct { /* 0x0 */ s16 unk_0; /* 0x4 */ f32 unk_4; @@ -198,7 +196,7 @@ static InitChainEntry sInitChain[3] = { void EnAz_Init(Actor* thisx, PlayState* play2) { static s16 D_80A9914C[] = { 1, 0, 3, 2, 5, 4, -1 }; static s16 D_80A9915C[] = { 0, 1, 0, 1, 0, 1, 1 }; - EnAz* this = THIS; + EnAz* this = (EnAz*)thisx; PlayState* play = play2; s16 sp4E; s32 phi_v1; @@ -264,7 +262,7 @@ void EnAz_Init(Actor* thisx, PlayState* play2) { } SubS_FillCutscenesList(&this->actor, this->csIdList, ARRAY_COUNT(this->csIdList)); if (D_80A9913C == NULL) { - D_80A9913C = THIS; + D_80A9913C = (EnAz*)thisx; this->unk_374 |= 1; } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -417,7 +415,7 @@ void EnAz_Init(Actor* thisx, PlayState* play2) { } void EnAz_Destroy(Actor* thisx, PlayState* play2) { - EnAz* this = THIS; + EnAz* this = (EnAz*)thisx; if (gSaveContext.save.entrance != ENTRANCE(WATERFALL_RAPIDS, 1)) { gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP; @@ -1732,7 +1730,7 @@ void func_80A98414(EnAz* this, PlayState* play) { void EnAz_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnAz* this = THIS; + EnAz* this = (EnAz*)thisx; this->unk_374 &= ~0x100; if ((this->actor.bgCheckFlags & BGCHECKFLAG_WATER) && (this->actor.depthInWater > 22.0f)) { @@ -1888,7 +1886,7 @@ static TexturePtr sYoungerBrotherBeltTextures[] = { void EnAz_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnAz* this = THIS; + EnAz* this = (EnAz*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1969,7 +1967,7 @@ void EnAz_Draw(Actor* thisx, PlayState* play2) { } s32 EnAz_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnAz* this = THIS; + EnAz* this = (EnAz*)thisx; if ((limbIndex == BEAVER_OLDER_BROTHER_LIMB_NONE) && ((play->gameplayFrames % 2) != 0)) { *dList = NULL; @@ -1996,7 +1994,7 @@ void EnAz_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, static Vec3f D_80A99410 = { 700.0f, 0.0f, 0.0f }; static Vec3f D_80A9941C = { -500.0f, 0.0f, 0.0f }; static Vec3f D_80A99428 = { -1200.0f, 0.0f, 1000.0f }; - EnAz* this = THIS; + EnAz* this = (EnAz*)thisx; if (limbIndex == BEAVER_OLDER_BROTHER_LIMB_PELVIS) { Matrix_MultVec3f(&D_80A99410, &this->unk_3A8); diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index 701517422d..224523ef57 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBaba*)thisx) - #define BOMB_SHOP_LADY_STATE_END_CONVERSATION (1 << 0) #define BOMB_SHOP_LADY_STATE_VISIBLE (1 << 1) #define BOMB_SHOP_LADY_STATE_KNOCKED_OVER (1 << 2) // Don't track player @@ -725,7 +723,7 @@ void EnBaba_FaceForward(EnBaba* this, PlayState* play) { void EnBaba_Init(Actor* thisx, PlayState* play) { s32 pad; - EnBaba* this = THIS; + EnBaba* this = (EnBaba*)thisx; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -741,13 +739,13 @@ void EnBaba_Init(Actor* thisx, PlayState* play) { } void EnBaba_Destroy(Actor* thisx, PlayState* play) { - EnBaba* this = THIS; + EnBaba* this = (EnBaba*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnBaba_Update(Actor* thisx, PlayState* play) { - EnBaba* this = THIS; + EnBaba* this = (EnBaba*)thisx; this->actionFunc(this, play); @@ -756,7 +754,7 @@ void EnBaba_Update(Actor* thisx, PlayState* play) { } s32 EnBaba_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBaba* this = THIS; + EnBaba* this = (EnBaba*)thisx; if (limbIndex == BOMB_SHOP_LADY_LIMB_NECK) { Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -790,7 +788,7 @@ s32 EnBaba_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnBaba_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBaba* this = THIS; + EnBaba* this = (EnBaba*)thisx; Vec3f sp18 = { 0.0f, 0.0f, 0.0f }; if (limbIndex == BOMB_SHOP_LADY_LIMB_HEAD) { @@ -806,7 +804,7 @@ void EnBaba_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { void EnBaba_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnBaba* this = THIS; + EnBaba* this = (EnBaba*)thisx; Vec3f pos; Vec3f scale; diff --git a/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c b/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c index fbc618383b..a844dca686 100644 --- a/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c +++ b/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnBaguo*)thisx) - void EnBaguo_Init(Actor* thisx, PlayState* play); void EnBaguo_Destroy(Actor* thisx, PlayState* play); void EnBaguo_Update(Actor* thisx, PlayState* play); @@ -123,7 +121,7 @@ static DamageTable sDamageTable = { }; void EnBaguo_Init(Actor* thisx, PlayState* play) { - EnBaguo* this = THIS; + EnBaguo* this = (EnBaguo*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f); SkelAnime_Init(play, &this->skelAnime, &gNejironSkel, NULL, this->jointTable, this->morphTable, NEJIRON_LIMB_MAX); @@ -152,7 +150,7 @@ void EnBaguo_Init(Actor* thisx, PlayState* play) { } void EnBaguo_Destroy(Actor* thisx, PlayState* play) { - EnBaguo* this = THIS; + EnBaguo* this = (EnBaguo*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -366,7 +364,7 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, PlayState* play) { } void EnBaguo_Update(Actor* thisx, PlayState* play) { - EnBaguo* this = THIS; + EnBaguo* this = (EnBaguo*)thisx; Actor_SetFocus(&this->actor, 30.0f); EnBaguo_UpdateEffects(this, play); @@ -406,14 +404,14 @@ void EnBaguo_Update(Actor* thisx, PlayState* play) { } void EnBaguo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBaguo* this = THIS; + EnBaguo* this = (EnBaguo*)thisx; Collider_UpdateSpheres(limbIndex, &this->collider); } void EnBaguo_DrawBody(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { &gNejironEyeOpenTex, &gNejironEyeHalfTex, &gNejironEyeClosedTex }; - EnBaguo* this = THIS; + EnBaguo* this = (EnBaguo*)thisx; Gfx* gfx; s32 eyeIndex; void* virtualAddress; diff --git a/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c b/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c index b14c37fe3e..701e8de288 100644 --- a/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c +++ b/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnBaisen*)thisx) - void EnBaisen_Init(Actor* thisx, PlayState* play); void EnBaisen_Destroy(Actor* thisx, PlayState* play); void EnBaisen_Update(Actor* thisx, PlayState* play); @@ -77,7 +75,7 @@ static u8 sAnimationModes[ENBAISEN_ANIM_MAX] = { }; void EnBaisen_Init(Actor* thisx, PlayState* play) { - EnBaisen* this = THIS; + EnBaisen* this = (EnBaisen*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_bai_Skel_007908, &object_bai_Anim_0011C0, this->jointTable, @@ -110,7 +108,7 @@ void EnBaisen_Init(Actor* thisx, PlayState* play) { } void EnBaisen_Destroy(Actor* thisx, PlayState* play) { - EnBaisen* this = THIS; + EnBaisen* this = (EnBaisen*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -256,7 +254,7 @@ void func_80BE8AAC(EnBaisen* this, PlayState* play) { void EnBaisen_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBaisen* this = THIS; + EnBaisen* this = (EnBaisen*)thisx; SkelAnime_Update(&this->skelAnime); if (this->unusedCounter != 0) { @@ -284,7 +282,7 @@ void EnBaisen_Update(Actor* thisx, PlayState* play) { } s32 EnBaisen_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBaisen* this = THIS; + EnBaisen* this = (EnBaisen*)thisx; if (limbIndex == OBJECT_BAI_LIMB_09) { rot->x += this->headRotX; @@ -296,7 +294,7 @@ s32 EnBaisen_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void EnBaisen_Draw(Actor* thisx, PlayState* play) { - EnBaisen* this = THIS; + EnBaisen* this = (EnBaisen*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Bal/z_en_bal.c b/src/overlays/actors/ovl_En_Bal/z_en_bal.c index 1e0d28a53d..43923742bb 100644 --- a/src/overlays/actors/ovl_En_Bal/z_en_bal.c +++ b/src/overlays/actors/ovl_En_Bal/z_en_bal.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBal*)thisx) - void EnBal_Init(Actor* thisx, PlayState* play); void EnBal_Destroy(Actor* thisx, PlayState* play); void EnBal_Update(Actor* thisx, PlayState* play); @@ -193,7 +191,7 @@ static AnimationInfo sAnimationInfo[TINGLE_ANIM_MAX] = { }; void EnBal_Init(Actor* thisx, PlayState* play) { - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; s32 pad; f32 endFrame = Animation_GetLastFrame(&gTingleFloatIdleAnim); @@ -232,7 +230,7 @@ void EnBal_Init(Actor* thisx, PlayState* play) { } void EnBal_Destroy(Actor* thisx, PlayState* play) { - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; Collider_InitJntSph(play, &this->collider); } @@ -251,7 +249,7 @@ void EnBal_SetMainColliderToHead(EnBal* this) { s32 EnBal_ValidatePictograph(PlayState* play, Actor* thisx) { s32 pictoValid; - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; pictoValid = Snap_ValidatePictograph(play, &this->picto.actor, PICTO_VALID_TINGLE, &this->picto.actor.focus.pos, &this->picto.actor.shape.rot, 10.0f, 400.0f, 0x4000); @@ -1102,7 +1100,7 @@ void EnBal_TryBalloonPopped(EnBal* this, PlayState* play) { } void EnBal_Update(Actor* thisx, PlayState* play) { - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; this->actionFunc(this, play); EnBal_TryBalloonPopped(this, play); @@ -1122,7 +1120,7 @@ void EnBal_Update(Actor* thisx, PlayState* play) { } s32 EnBal_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; Vec3s balloonRot; if (limbIndex == TINGLE_LIMB_BALLOON) { @@ -1152,7 +1150,7 @@ s32 EnBal_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnBal_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; Collider_UpdateSpheres(limbIndex, &this->collider); if (limbIndex == TINGLE_LIMB_HEAD) { @@ -1161,7 +1159,7 @@ void EnBal_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnBal_Draw(Actor* thisx, PlayState* play) { - EnBal* this = THIS; + EnBal* this = (EnBal*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bat/z_en_bat.c b/src/overlays/actors/ovl_En_Bat/z_en_bat.c index 960366e28a..188a5890f7 100644 --- a/src/overlays/actors/ovl_En_Bat/z_en_bat.c +++ b/src/overlays/actors/ovl_En_Bat/z_en_bat.c @@ -11,8 +11,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnBat*)thisx) - #define BAD_BAT_FLAP_FRAME 5 void EnBat_Init(Actor* thisx, PlayState* play); @@ -126,7 +124,7 @@ s32 sNumberAttacking; //!< Limit number attacking player to at most `BAD_BAT_MAX s32 sAlreadySpawned; //!< used for those spawned with room -1 in Graveyard to avoid respawn on room change void EnBat_Init(Actor* thisx, PlayState* play) { - EnBat* this = THIS; + EnBat* this = (EnBat*)thisx; Actor_ProcessInitChain(thisx, sInitChain); Collider_InitAndSetSphere(play, &this->collider, thisx, &sSphereInit); @@ -173,7 +171,7 @@ void EnBat_Init(Actor* thisx, PlayState* play) { } void EnBat_Destroy(Actor* thisx, PlayState* play) { - EnBat* this = THIS; + EnBat* this = (EnBat*)thisx; Collider_DestroySphere(play, &this->collider); } @@ -452,7 +450,7 @@ void EnBat_UpdateDamage(EnBat* this, PlayState* play) { void EnBat_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBat* this = THIS; + EnBat* this = (EnBat*)thisx; if (this->actor.room == -1) { sAlreadySpawned = true; @@ -521,7 +519,7 @@ void EnBat_Update(Actor* thisx, PlayState* play) { } void EnBat_Draw(Actor* thisx, PlayState* play) { - EnBat* this = THIS; + EnBat* this = (EnBat*)thisx; Gfx* gfx; // Draw body and wings diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 026cddef9e..31839f6758 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnBb*)thisx) - void EnBb_Init(Actor* thisx, PlayState* play); void EnBb_Destroy(Actor* thisx, PlayState* play); void EnBb_Update(Actor* thisx, PlayState* play); @@ -120,7 +118,7 @@ static InitChainEntry sInitChain[] = { }; void EnBb_Init(Actor* thisx, PlayState* play) { - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_Init(play, &this->skelAnime, &gBubbleSkel, &gBubbleFlyingAnim, this->jointTable, this->morphTable, @@ -143,7 +141,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) { } void EnBb_Destroy(Actor* thisx, PlayState* play) { - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; Collider_DestroySphere(play, &this->collider); } @@ -562,7 +560,7 @@ void EnBb_UpdateDamage(EnBb* this, PlayState* play) { } void EnBb_Update(Actor* thisx, PlayState* play) { - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; EnBb_UpdateDamage(this, play); this->actionFunc(this, play); @@ -605,7 +603,7 @@ void EnBb_Update(Actor* thisx, PlayState* play) { } s32 EnBb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; if (this->bodyPartDrawStatus == BB_BODY_PART_DRAW_STATUS_BROKEN) { this->limbDList = *dList; @@ -645,7 +643,7 @@ static Vec3f sEffectsBodyPartOffset = { 1000.0f, -700.0f, 0.0f }; void EnBb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad; - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; MtxF* currentMatrixState; if (this->bodyPartDrawStatus == BB_BODY_PART_DRAW_STATUS_ALIVE) { @@ -686,7 +684,7 @@ void EnBb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnBb_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; MtxF* currentMatrixState; Gfx* gfx; diff --git a/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c b/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c index 93d51ea537..028ea6dd3d 100644 --- a/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c +++ b/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c @@ -17,8 +17,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBba01*)thisx) - void EnBba01_Init(Actor* thisx, PlayState* play); void EnBba01_Destroy(Actor* thisx, PlayState* play); void EnBba01_Update(Actor* thisx, PlayState* play); @@ -214,7 +212,7 @@ void EnBba01_Talk(EnHy* this, PlayState* play) { void EnBba01_Init(Actor* thisx, PlayState* play) { s32 pad; - EnBba01* this = THIS; + EnBba01* this = (EnBba01*)thisx; this->enHy.animObjectSlot = SubS_GetObjectSlot(OBJECT_BBA, play); this->enHy.headObjectSlot = SubS_GetObjectSlot(OBJECT_BBA, play); @@ -237,13 +235,13 @@ void EnBba01_Init(Actor* thisx, PlayState* play) { } void EnBba01_Destroy(Actor* thisx, PlayState* play) { - EnBba01* this = THIS; + EnBba01* this = (EnBba01*)thisx; Collider_DestroyCylinder(play, &this->enHy.collider); } void EnBba01_Update(Actor* thisx, PlayState* play) { - EnBba01* this = THIS; + EnBba01* this = (EnBba01*)thisx; EnBba01_TestIsTalking(this, play); this->enHy.actionFunc(&this->enHy, play); @@ -253,7 +251,7 @@ void EnBba01_Update(Actor* thisx, PlayState* play) { } s32 EnBba01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBba01* this = THIS; + EnBba01* this = (EnBba01*)thisx; s8 bodyPartIndex; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -299,7 +297,7 @@ s32 EnBba01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnBba01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBba01* this = THIS; + EnBba01* this = (EnBba01*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -321,7 +319,7 @@ void EnBba01_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnBba01_Draw(Actor* thisx, PlayState* play) { - EnBba01* this = THIS; + EnBba01* this = (EnBba01*)thisx; s32 i; u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, SUBS_SHADOW_TEX_SIZE); u8* shadowTexIter; diff --git a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c index 8b77ec02c8..0e6429942a 100644 --- a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c +++ b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnBbfall*)thisx) - void EnBbfall_Init(Actor* thisx, PlayState* play); void EnBbfall_Destroy(Actor* thisx, PlayState* play); void EnBbfall_Update(Actor* thisx, PlayState* play); @@ -149,7 +147,7 @@ static InitChainEntry sInitChain[] = { }; void EnBbfall_Init(Actor* thisx, PlayState* play) { - EnBbfall* this = THIS; + EnBbfall* this = (EnBbfall*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -167,7 +165,7 @@ void EnBbfall_Init(Actor* thisx, PlayState* play) { } void EnBbfall_Destroy(Actor* thisx, PlayState* play) { - EnBbfall* this = THIS; + EnBbfall* this = (EnBbfall*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -575,7 +573,7 @@ void EnBbfall_UpdateDamage(EnBbfall* this, PlayState* play) { } void EnBbfall_Update(Actor* thisx, PlayState* play) { - EnBbfall* this = THIS; + EnBbfall* this = (EnBbfall*)thisx; Sphere16* sphere; Vec3f diff; s32 i; @@ -642,7 +640,7 @@ void EnBbfall_Update(Actor* thisx, PlayState* play) { } s32 EnBbfall_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBbfall* this = THIS; + EnBbfall* this = (EnBbfall*)thisx; if (this->bodyPartDrawStatus == BBFALL_BODY_PART_DRAW_STATUS_BROKEN) { this->limbDList = *dList; @@ -682,7 +680,7 @@ static Vec3f sEffectsBodyPartOffset = { 1000.0f, -700.0f, 0.0f }; void EnBbfall_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad; - EnBbfall* this = THIS; + EnBbfall* this = (EnBbfall*)thisx; MtxF* currentMatrixState; if (this->bodyPartDrawStatus == BBFALL_BODY_PART_DRAW_STATUS_ALIVE) { @@ -723,7 +721,7 @@ void EnBbfall_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r void EnBbfall_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnBbfall* this = THIS; + EnBbfall* this = (EnBbfall*)thisx; MtxF* currentMatrixState; Gfx* gfx; s32 opacity; diff --git a/src/overlays/actors/ovl_En_Bee/z_en_bee.c b/src/overlays/actors/ovl_En_Bee/z_en_bee.c index 8789b85f70..3f8911a321 100644 --- a/src/overlays/actors/ovl_En_Bee/z_en_bee.c +++ b/src/overlays/actors/ovl_En_Bee/z_en_bee.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnBee*)thisx) - void EnBee_Init(Actor* thisx, PlayState* play); void EnBee_Destroy(Actor* thisx, PlayState* play); void EnBee_Update(Actor* thisx, PlayState* play); @@ -90,7 +88,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnBee_Init(Actor* thisx, PlayState* play) { - EnBee* this = THIS; + EnBee* this = (EnBee*)thisx; this->actor.colChkInfo.mass = 10; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); @@ -113,7 +111,7 @@ void EnBee_Init(Actor* thisx, PlayState* play) { } void EnBee_Destroy(Actor* thisx, PlayState* play) { - EnBee* this = THIS; + EnBee* this = (EnBee*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -249,7 +247,7 @@ void EnBee_UpdateDamage(EnBee* this, PlayState* play) { void EnBee_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBee* this = THIS; + EnBee* this = (EnBee*)thisx; SkelAnime_Update(&this->skelAnime); @@ -282,7 +280,7 @@ void EnBee_Update(Actor* thisx, PlayState* play) { } void EnBee_Draw(Actor* thisx, PlayState* play) { - EnBee* this = THIS; + EnBee* this = (EnBee*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bh/z_en_bh.c b/src/overlays/actors/ovl_En_Bh/z_en_bh.c index b109d44e55..ca05d46ffe 100644 --- a/src/overlays/actors/ovl_En_Bh/z_en_bh.c +++ b/src/overlays/actors/ovl_En_Bh/z_en_bh.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnBh*)thisx) - void EnBh_Init(Actor* thisx, PlayState* play); void EnBh_Destroy(Actor* thisx, PlayState* play); void EnBh_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile En_Bh_Profile = { }; void EnBh_Init(Actor* thisx, PlayState* play) { - EnBh* this = THIS; + EnBh* this = (EnBh*)thisx; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; Actor_SetScale(&this->actor, 0.01f); @@ -102,7 +100,7 @@ void func_80C22DEC(EnBh* this, PlayState* play) { } void EnBh_Update(Actor* thisx, PlayState* play) { - EnBh* this = THIS; + EnBh* this = (EnBh*)thisx; Actor_MoveWithoutGravity(&this->actor); DECR(this->timer2); @@ -112,7 +110,7 @@ void EnBh_Update(Actor* thisx, PlayState* play) { } void EnBh_Draw(Actor* thisx, PlayState* play) { - EnBh* this = THIS; + EnBh* this = (EnBh*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Matrix_RotateZS(this->unk1E2, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 2d6a951453..55c2a583da 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnBigokuta*)thisx) - void EnBigokuta_Init(Actor* thisx, PlayState* play); void EnBigokuta_Destroy(Actor* thisx, PlayState* play); void EnBigokuta_Update(Actor* thisx, PlayState* play); @@ -94,7 +92,7 @@ static InitChainEntry sInitChain[] = { }; void EnBigokuta_Init(Actor* thisx, PlayState* play) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; Actor_ProcessInitChain(&this->picto.actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gBigOctoSkel, &gBigOctoIdleAnim, this->jointTable, this->morphTable, @@ -122,7 +120,7 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) { } void EnBigokuta_Destroy(Actor* thisx, PlayState* play) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; Collider_DestroyCylinder(play, &this->shellCollider); Collider_DestroyCylinder(play, &this->bodyCollider); @@ -517,7 +515,7 @@ void EnBigokuta_CheckOneHitKill(EnBigokuta* this, PlayState* play) { void EnBigokuta_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; if (!EnBigokuta_IsInWater(this, play)) { Actor_Kill(&this->picto.actor); @@ -562,7 +560,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play) { s32 EnBigokuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { if (limbIndex == BIGOKUTA_LIMB_HEAD) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; s32 envColor; s16 rotX; f32 endFrame; @@ -592,7 +590,7 @@ s32 EnBigokuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec rot->x -= rotX; } } else if (limbIndex == BIGOKUTA_LIMB_CENTER_SNOUT) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; if (this->actionFunc == EnBigokuta_PlayDeathEffects) { if (this->timer < 5) { @@ -660,7 +658,7 @@ static Vec3f D_80AC45D0[] = { }; void EnBigokuta_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; s32 i; s8 bodyPartIndex = sLimbToBodyParts[limbIndex]; @@ -679,7 +677,7 @@ void EnBigokuta_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* void EnBigokuta_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index 837b1fd38f..7139597d82 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -14,8 +14,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnBigpamet*)thisx) - void EnBigpamet_Init(Actor* thisx, PlayState* play); void EnBigpamet_Destroy(Actor* thisx, PlayState* play); void EnBigpamet_Update(Actor* thisx, PlayState* play); @@ -138,7 +136,7 @@ Color_RGBA8 D_80A29788 = { 250, 250, 250, 255 }; Color_RGBA8 D_80A2978C = { 180, 180, 180, 255 }; void EnBigpamet_Init(Actor* thisx, PlayState* play) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -165,7 +163,7 @@ void EnBigpamet_Init(Actor* thisx, PlayState* play) { } void EnBigpamet_Destroy(Actor* thisx, PlayState* play) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -750,7 +748,7 @@ void func_80A29094(EnBigpamet* this) { void EnBigpamet_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; func_80A2768C(this); func_80A29028(this, play); @@ -813,7 +811,7 @@ void func_80A292A8(EnBigpamet* this, PlayState* play) { } s32 EnBigpamet_OverrideLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; if ((this->actionFunc == func_80A2855C) || (this->actionFunc == func_80A28A98)) { if (limbIndex == SNAPPER_LIMB_HEAD) { @@ -827,7 +825,7 @@ s32 EnBigpamet_OverrideLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnBigpamet_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; if (limbIndex == SNAPPER_LIMB_BODY) { this->unk_2AC = Matrix_GetCurrent()->yw; @@ -835,7 +833,7 @@ void EnBigpamet_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnBigpamet_Draw(Actor* thisx, PlayState* play) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -852,7 +850,7 @@ void EnBigpamet_Draw(Actor* thisx, PlayState* play) { } s32 EnBigpamet_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; if (limbIndex == SPIKED_SNAPPER_LIMB_BODY) { if (this->actionFunc == func_80A28D0C) { @@ -870,7 +868,7 @@ s32 EnBigpamet_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnBigpamet_PostLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; if (limbIndex == SPIKED_SNAPPER_LIMB_BODY) { this->unk_2AC = Matrix_GetCurrent()->yw; @@ -878,7 +876,7 @@ void EnBigpamet_PostLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void func_80A2966C(Actor* thisx, PlayState* play) { - EnBigpamet* this = THIS; + EnBigpamet* this = (EnBigpamet*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->spikedSnapperSkelAnime.skeleton, this->spikedSnapperSkelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index e3eadb4154..21c165b22d 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -13,8 +13,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | \ ACTOR_FLAG_IGNORE_QUAKE) -#define THIS ((EnBigpo*)thisx) - void EnBigpo_Init(Actor* thisx, PlayState* play2); void EnBigpo_Destroy(Actor* thisx, PlayState* play2); void EnBigpo_Update(Actor* thisx, PlayState* play); @@ -184,7 +182,7 @@ static Vec3f D_80B65084[] = { void EnBigpo_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; EnBigpoFireEffect* firesPtr; s32 i; @@ -239,7 +237,7 @@ void EnBigpo_Init(Actor* thisx, PlayState* play2) { void EnBigpo_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; s32 fireCount; if ((thisx->params != BIG_POE_TYPE_POSSIBLE_FIRE) && (thisx->params != BIG_POE_TYPE_CHOSEN_FIRE) && @@ -1156,7 +1154,7 @@ s32 EnBigpo_ApplyDamage(EnBigpo* this, PlayState* play) { } void EnBigpo_Update(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; s32 pad; ColliderCylinder* thisCollider; @@ -1224,7 +1222,7 @@ void EnBigpo_Update(Actor* thisx, PlayState* play) { * alt update func: the revealed fires under dampe's house */ void EnBigpo_UpdateFire(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; this->actor.shape.rot.y = BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play))); this->actionFunc(this, play); @@ -1232,7 +1230,7 @@ void EnBigpo_UpdateFire(Actor* thisx, PlayState* play) { s32 EnBigpo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; // not fully invisible if ((this->mainColor.a == 0) || (limbIndex == BIG_POE_LIMB_LANTERN) || ((this->actionFunc == EnBigpo_BurnAwayDeath) && (this->idleTimer >= 2))) { @@ -1242,7 +1240,7 @@ s32 EnBigpo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnBigpo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; s8 bodyPartIndex; Vec3f* v1ptr; // todo: figure out better names Vec3f* v2ptr; @@ -1294,7 +1292,7 @@ void EnBigpo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnBigpo_DrawMainBigpo(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); @@ -1336,7 +1334,7 @@ void EnBigpo_DrawMainBigpo(Actor* thisx, PlayState* play) { } void EnBigpo_DrawScoopSoul(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); @@ -1365,7 +1363,7 @@ void EnBigpo_DrawScoopSoul(Actor* thisx, PlayState* play) { } void EnBigpo_DrawLantern(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; f32 magnitude; f32 magnitude2; Gfx* gfx; @@ -1420,7 +1418,7 @@ void EnBigpo_DrawLantern(Actor* thisx, PlayState* play) { } void EnBigpo_DrawCircleFlames(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; s32 pad[3]; s16 fireRadius; MtxF* mtfxPtr; @@ -1464,7 +1462,7 @@ void EnBigpo_DrawCircleFlames(Actor* thisx, PlayState* play) { } void EnBigpo_RevealedFire(Actor* thisx, PlayState* play) { - EnBigpo* this = THIS; + EnBigpo* this = (EnBigpo*)thisx; EnBigpo* parent = (EnBigpo*)thisx->parent; s32 pad; diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index d811c02f67..15b9b858b8 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -16,8 +16,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnBigslime*)thisx) - void EnBigslime_Init(Actor* thisx, PlayState* play2); void EnBigslime_Destroy(Actor* thisx, PlayState* play); void EnBigslime_UpdateGekko(Actor* thisx, PlayState* play); @@ -321,7 +319,7 @@ void EnBigslime_Init(Actor* thisx, PlayState* play2) { WEEKEVENTREG_33_02, }; PlayState* play = play2; - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -383,7 +381,7 @@ void EnBigslime_Init(Actor* thisx, PlayState* play2) { } void EnBigslime_Destroy(Actor* thisx, PlayState* play) { - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; s32 i; for (i = 0; i < BIGSLIME_NUM_RING_FACES; i++) { @@ -2776,7 +2774,7 @@ void EnBigslime_UpdateEffects(EnBigslime* this) { } void EnBigslime_UpdateBigslime(Actor* thisx, PlayState* play) { - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; s32 i; Vec3f vtxMax; Vec3f vtxMin; @@ -2822,7 +2820,7 @@ void EnBigslime_UpdateBigslime(Actor* thisx, PlayState* play) { void EnBigslime_UpdateGekko(Actor* thisx, PlayState* play) { static s32 isGekkoOnGround = false; - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; Player* player; s32 pad; @@ -2985,7 +2983,7 @@ void EnBigslime_DrawBigslime(Actor* thisx, PlayState* play) { { 84, 0.45f }, { 90, 0.5f }, { 96, 0.6f }, { 102, 0.2f }, { 108, 0.4f }, { 114, 0.15f }, { 120, 0.35f }, { 126, 0.65f }, { 132, 0.25f }, { 138, 0.3f }, { 144, 0.15f }, { 150, 0.45f }, { 156, 0.3f }, { 161, 0.25f }, }; - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; EnBigslimeBubbles* bubblesInfoPtr; Vtx* dynamicVtx; MtxF* billboardMtxF; @@ -3069,7 +3067,7 @@ static s8 sLimbToBodyParts[GEKKO_LIMB_MAX] = { static Vec3f sRightFootOffsetRef = { 1500.0f, 2200.0f, 0.0f }; void EnBigslime_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; Vec3f rightFootOffset; if (limbIndex == GEKKO_LIMB_HEAD) { @@ -3091,7 +3089,7 @@ void EnBigslime_DrawGekko(Actor* thisx, PlayState* play) { static Color_RGBA8 sGekkoDamageColor = { 255, 0, 0, 0 }; static Color_RGBA8 sGekkoStunColor = { 0, 0, 255, 0 }; Vec3f gekkoPos; - EnBigslime* this = THIS; + EnBigslime* this = (EnBigslime*)thisx; s32 pad; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c index be939df12c..4f5777c98c 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBji01*)thisx) - void EnBji01_Init(Actor* thisx, PlayState* play); void EnBji01_Destroy(Actor* thisx, PlayState* play); void EnBji01_Update(Actor* thisx, PlayState* play); @@ -373,7 +371,7 @@ void func_809CD77C(EnBji01* this, PlayState* play) { } void EnBji01_Init(Actor* thisx, PlayState* play) { - EnBji01* this = THIS; + EnBji01* this = (EnBji01*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gShikashiSkel, &object_bji_Anim_000FDC, this->jointTable, @@ -411,14 +409,14 @@ void EnBji01_Init(Actor* thisx, PlayState* play) { } void EnBji01_Destroy(Actor* thisx, PlayState* play) { - EnBji01* this = THIS; + EnBji01* this = (EnBji01*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnBji01_Update(Actor* thisx, PlayState* play) { static s16 sBlinkSequence[] = { 0, 1, 2, 1, 0, 0 }; - EnBji01* this = THIS; + EnBji01* this = (EnBji01*)thisx; s32 pad; this->actionFunc(this, play); @@ -441,7 +439,7 @@ void EnBji01_Update(Actor* thisx, PlayState* play) { } s32 EnBji01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBji01* this = THIS; + EnBji01* this = (EnBji01*)thisx; if ((limbIndex == SHIKASHI_LIMB_NONE) && ((play->gameplayFrames % 2) != 0)) { *dList = NULL; @@ -472,7 +470,7 @@ s32 EnBji01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnBji01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_809CDCC8 = { 1088.0f, 1200.0f, 0.0f }; - EnBji01* this = THIS; + EnBji01* this = (EnBji01*)thisx; Vec3f sp20; s32 temp_f4 = 0; @@ -487,7 +485,7 @@ void EnBji01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro void EnBji01_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { object_bji_Tex_0049F0, object_bji_Tex_004E70, object_bji_Tex_005270 }; - EnBji01* this = THIS; + EnBji01* this = (EnBji01*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c index 4c379b1119..ce71c10228 100644 --- a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c +++ b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnBjt*)thisx) - void EnBjt_Init(Actor* thisx, PlayState* play); void EnBjt_Destroy(Actor* thisx, PlayState* play); void EnBjt_Update(Actor* thisx, PlayState* play); @@ -276,7 +274,7 @@ typedef enum { // msgevent callback/communication. Follow and choose parts of script to run s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); - EnBjt* this = THIS; + EnBjt* this = (EnBjt*)thisx; PlayerItemAction itemAction; s32 scriptBranch = 0; @@ -457,7 +455,7 @@ void EnBjt_FollowSchedule(EnBjt* this, PlayState* play) { } void EnBjt_Init(Actor* thisx, PlayState* play) { - EnBjt* this = THIS; + EnBjt* this = (EnBjt*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gToiletHandSkel, NULL, this->jointTable, this->morphTable, @@ -480,7 +478,7 @@ void EnBjt_Destroy(Actor* thisx, PlayState* play) { } void EnBjt_Update(Actor* thisx, PlayState* play) { - EnBjt* this = THIS; + EnBjt* this = (EnBjt*)thisx; EnBjt_CheckTalk(this, play); this->actionFunc(this, play); @@ -495,7 +493,7 @@ void EnBjt_Update(Actor* thisx, PlayState* play) { } void EnBjt_Draw(Actor* thisx, PlayState* play) { - EnBjt* this = THIS; + EnBjt* this = (EnBjt*)thisx; if (this->scheduleResult != TOILET_HAND_SCH_NONE) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Boj_01/z_en_boj_01.c b/src/overlays/actors/ovl_En_Boj_01/z_en_boj_01.c index 3a3d3655f3..7d03ac421d 100644 --- a/src/overlays/actors/ovl_En_Boj_01/z_en_boj_01.c +++ b/src/overlays/actors/ovl_En_Boj_01/z_en_boj_01.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBoj01*)thisx) - void EnBoj01_Init(Actor* thisx, PlayState* play); void EnBoj01_Destroy(Actor* thisx, PlayState* play); void EnBoj01_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Boj_02/z_en_boj_02.c b/src/overlays/actors/ovl_En_Boj_02/z_en_boj_02.c index d40cd41d0c..0ac5e4422d 100644 --- a/src/overlays/actors/ovl_En_Boj_02/z_en_boj_02.c +++ b/src/overlays/actors/ovl_En_Boj_02/z_en_boj_02.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBoj02*)thisx) - void EnBoj02_Init(Actor* thisx, PlayState* play); void EnBoj02_Destroy(Actor* thisx, PlayState* play); void EnBoj02_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Boj_03/z_en_boj_03.c b/src/overlays/actors/ovl_En_Boj_03/z_en_boj_03.c index a6725fb362..7eb191aab1 100644 --- a/src/overlays/actors/ovl_En_Boj_03/z_en_boj_03.c +++ b/src/overlays/actors/ovl_En_Boj_03/z_en_boj_03.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBoj03*)thisx) - void EnBoj03_Init(Actor* thisx, PlayState* play); void EnBoj03_Destroy(Actor* thisx, PlayState* play); void EnBoj03_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Boj_04/z_en_boj_04.c b/src/overlays/actors/ovl_En_Boj_04/z_en_boj_04.c index dbc375044b..28c1a7d756 100644 --- a/src/overlays/actors/ovl_En_Boj_04/z_en_boj_04.c +++ b/src/overlays/actors/ovl_En_Boj_04/z_en_boj_04.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBoj04*)thisx) - void EnBoj04_Init(Actor* thisx, PlayState* play); void EnBoj04_Destroy(Actor* thisx, PlayState* play); void EnBoj04_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Boj_05/z_en_boj_05.c b/src/overlays/actors/ovl_En_Boj_05/z_en_boj_05.c index d17aaa67f2..534261580d 100644 --- a/src/overlays/actors/ovl_En_Boj_05/z_en_boj_05.c +++ b/src/overlays/actors/ovl_En_Boj_05/z_en_boj_05.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBoj05*)thisx) - void EnBoj05_Init(Actor* thisx, PlayState* play); void EnBoj05_Destroy(Actor* thisx, PlayState* play); void EnBoj05_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 224fd3a425..e5d55a6b52 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnBom*)thisx) - void EnBom_Init(Actor* thisx, PlayState* play); void EnBom_Destroy(Actor* thisx, PlayState* play); void EnBom_Update(Actor* thisx, PlayState* play); @@ -129,7 +127,7 @@ static InitChainEntry sInitChain[] = { }; void EnBom_Init(Actor* thisx, PlayState* play) { - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; s32 params; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -185,7 +183,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) { } void EnBom_Destroy(Actor* thisx, PlayState* play) { - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; Collider_DestroyJntSph(play, &this->collider2); Collider_DestroyCylinder(play, &this->collider1); @@ -434,7 +432,7 @@ void EnBom_Update(Actor* thisx, PlayState* play) { Vec3f effPos; Vec3f dustAccel = { 0.0f, 0.6f, 0.0f }; Color_RGBA8 dustColor = { 255, 255, 255, 255 }; - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; s32 pad; Player* player = GET_PLAYER(play); @@ -615,7 +613,7 @@ static Vec3f D_80872F04 = { 0.0f, 0.0f, 0.0f }; void EnBom_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 5c8fa589ba..f6f82f1c9a 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnBomBowlMan*)thisx) - void EnBomBowlMan_Init(Actor* thisx, PlayState* play); void EnBomBowlMan_Destroy(Actor* thisx, PlayState* play); void EnBomBowlMan_Update(Actor* thisx, PlayState* play); @@ -130,7 +128,7 @@ Vec3f D_809C61A0[] = { }; void EnBomBowlMan_Init(Actor* thisx, PlayState* play) { - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); @@ -664,7 +662,7 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) { } void EnBomBowlMan_Update(Actor* thisx, PlayState* play) { - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; if (this->unk_2BA != 0) { this->unk_2BA--; @@ -698,7 +696,7 @@ void EnBomBowlMan_Update(Actor* thisx, PlayState* play) { } s32 EnBomBowlMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; if (limbIndex == OBJECT_CS_LIMB_0F) { *dList = NULL; @@ -736,7 +734,7 @@ TexturePtr D_809C6220[] = { }; void EnBomBowlMan_Draw(Actor* thisx, PlayState* play) { - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 00c04d2744..2275bc958a 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnBomChu*)thisx) - #define BOMBCHU_SCALE 0.01f void EnBomChu_Init(Actor* thisx, PlayState* play); @@ -79,7 +77,7 @@ static EffectBlureInit2 sBlureInit = { }; void EnBomChu_Init(Actor* thisx, PlayState* play) { - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitAndSetSphere(play, &this->collider, &this->actor, &sSphereInit); @@ -96,7 +94,7 @@ void EnBomChu_Init(Actor* thisx, PlayState* play) { } void EnBomChu_Destroy(Actor* thisx, PlayState* play) { - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; Effect_Destroy(play, this->blure1Index); Effect_Destroy(play, this->blure2Index); @@ -468,7 +466,7 @@ void EnBomChu_Update(Actor* thisx, PlayState* play) { static Vec3f sBlureP2LeftOffset = { 12.0f, 0.0f, -5.0f }; static Vec3f sBlureP2RightOffset = { -12.0f, 0.0f, -5.0f }; s32 pad; - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; Vec3f blureP1; Vec3f blureP2; WaterBox* waterBox; @@ -546,7 +544,7 @@ void EnBomChu_Update(Actor* thisx, PlayState* play) { } void EnBomChu_Draw(Actor* thisx, PlayState* play) { - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; f32 colorIntensity; s32 blinkHalfPeriod; s32 blinkTime; diff --git a/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c b/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c index a98ad7619d..afc6da8527 100644 --- a/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c +++ b/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnBombal*)thisx) - void EnBombal_Init(Actor* thisx, PlayState* play); void EnBombal_Destroy(Actor* thisx, PlayState* play); void EnBombal_Update(Actor* thisx, PlayState* play); @@ -59,7 +57,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnBombal_Init(Actor* thisx, PlayState* play) { - EnBombal* this = THIS; + EnBombal* this = (EnBombal*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); this->actor.colChkInfo.mass = 0; @@ -72,7 +70,7 @@ void EnBombal_Init(Actor* thisx, PlayState* play) { } void EnBombal_Destroy(Actor* thisx, PlayState* play) { - EnBombal* this = THIS; + EnBombal* this = (EnBombal*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -161,7 +159,7 @@ void func_80C05DE8(EnBombal* this, PlayState* play) { void EnBombal_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBombal* this = THIS; + EnBombal* this = (EnBombal*)thisx; if (this->timer != 0) { this->timer--; @@ -184,7 +182,7 @@ void EnBombal_Update(Actor* thisx, PlayState* play) { } void EnBombal_Draw(Actor* thisx, PlayState* play) { - EnBombal* this = THIS; + EnBombal* this = (EnBombal*)thisx; if (this->isPopped != true) { Gfx_DrawDListOpa(play, gMajoraBalloonDL); diff --git a/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c b/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c index 647fb2efbf..755c642d4f 100644 --- a/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c +++ b/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnBombers*)thisx) - void EnBombers_Init(Actor* thisx, PlayState* play); void EnBombers_Destroy(Actor* thisx, PlayState* play); void EnBombers_Update(Actor* thisx, PlayState* play); @@ -136,7 +134,7 @@ TexturePtr D_80C04838[] = { }; void EnBombers_Init(Actor* thisx, PlayState* play) { - EnBombers* this = THIS; + EnBombers* this = (EnBombers*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); @@ -196,7 +194,7 @@ void EnBombers_Init(Actor* thisx, PlayState* play) { } void EnBombers_Destroy(Actor* thisx, PlayState* play) { - EnBombers* this = THIS; + EnBombers* this = (EnBombers*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -518,7 +516,7 @@ void func_80C043C8(EnBombers* this, PlayState* play) { void EnBombers_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBombers* this = THIS; + EnBombers* this = (EnBombers*)thisx; if (this->unk_2AA != 0) { this->unk_2AA--; @@ -558,7 +556,7 @@ void EnBombers_Update(Actor* thisx, PlayState* play) { } s32 EnBombers_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBombers* this = THIS; + EnBombers* this = (EnBombers*)thisx; if (limbIndex == OBJECT_CS_LIMB_0F) { *dList = NULL; @@ -577,7 +575,7 @@ s32 EnBombers_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnBombers_Draw(Actor* thisx, PlayState* play) { - EnBombers* this = THIS; + EnBombers* this = (EnBombers*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c index b10b32df1c..17ebd7c177 100644 --- a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c +++ b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnBombers2*)thisx) - void EnBombers2_Init(Actor* thisx, PlayState* play); void EnBombers2_Destroy(Actor* thisx, PlayState* play); void EnBombers2_Update(Actor* thisx, PlayState* play); @@ -130,7 +128,7 @@ void EnBombers2_Init(Actor* thisx, PlayState* play) { } void EnBombers2_Destroy(Actor* thisx, PlayState* play) { - EnBombers2* this = THIS; + EnBombers2* this = (EnBombers2*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -442,7 +440,7 @@ void EnBombers2_Update(Actor* thisx, PlayState* play) { } s32 EnBombers2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBombers2* this = THIS; + EnBombers2* this = (EnBombers2*)thisx; if (limbIndex == OBJECT_CS_LIMB_08) { rot->x += this->unk_296; @@ -458,7 +456,7 @@ s32 EnBombers2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnBombers2_Draw(Actor* thisx, PlayState* play) { - EnBombers2* this = THIS; + EnBombers2* this = (EnBombers2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 9214fd5650..ef030320ae 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_10) -#define THIS ((EnBombf*)thisx) - void EnBombf_Init(Actor* thisx, PlayState* play2); void EnBombf_Destroy(Actor* thisx, PlayState* play); void EnBombf_Update(Actor* thisx, PlayState* play); @@ -91,7 +89,7 @@ void EnBombf_SetupAction(EnBombf* this, EnBombfActionFunc actionFunc) { void EnBombf_Init(Actor* thisx, PlayState* play2) { f32 yOffset = 0.0f; PlayState* play = play2; - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; Actor_SetScale(thisx, 0.01f); this->unk_1F8 = 1; @@ -132,7 +130,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play2) { } void EnBombf_Destroy(Actor* thisx, PlayState* play) { - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroyJntSph(play, &this->colliderJntSph); @@ -317,7 +315,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) { Vec3f effPos; Vec3f sp5C = { 0.0f, 0.6f, 0.0f }; Color_RGBA8 sp58 = { 255, 255, 255, 255 }; - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; s32 pad; if ((this->unk_1F8 != 0) && (this->timer != 0)) { @@ -469,7 +467,7 @@ Gfx* func_808AF86C(GraphicsContext* gfxCtx, PlayState* play) { void EnBombf_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c index 5aae0bdefe..97a7ec9da9 100644 --- a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c +++ b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnBomjima*)thisx) - void EnBomjima_Init(Actor* thisx, PlayState* play); void EnBomjima_Destroy(Actor* thisx, PlayState* play); void EnBomjima_Update(Actor* thisx, PlayState* play); @@ -175,7 +173,7 @@ s16 D_80C00AF8[] = { }; void EnBomjima_Init(Actor* thisx, PlayState* play) { - EnBomjima* this = THIS; + EnBomjima* this = (EnBomjima*)thisx; s32 csId; s32 i; @@ -214,7 +212,7 @@ void EnBomjima_Init(Actor* thisx, PlayState* play) { } void EnBomjima_Destroy(Actor* thisx, PlayState* play) { - EnBomjima* this = THIS; + EnBomjima* this = (EnBomjima*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1070,7 +1068,7 @@ void func_80C00284(EnBomjima* this, PlayState* play) { void EnBomjima_Update(Actor* thisx, PlayState* play) { s32 pad; - EnBomjima* this = THIS; + EnBomjima* this = (EnBomjima*)thisx; if (this->unk_2BE != 0) { this->unk_2BE--; @@ -1119,7 +1117,7 @@ void EnBomjima_Update(Actor* thisx, PlayState* play) { } s32 EnBomjima_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBomjima* this = THIS; + EnBomjima* this = (EnBomjima*)thisx; if (limbIndex == OBJECT_CS_LIMB_08) { rot->z += this->unk_294; @@ -1160,7 +1158,7 @@ void EnBomjima_Draw(Actor* thisx, PlayState* play) { static TexturePtr D_80C00B48[] = { object_cs_Tex_00E620, object_cs_Tex_00EA20, object_cs_Tex_00EE20, object_cs_Tex_00DD20, object_cs_Tex_00F220, }; - EnBomjima* this = THIS; + EnBomjima* this = (EnBomjima*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c index de89d3eb85..15ede0b7fe 100644 --- a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c +++ b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnBomjimb*)thisx) - void EnBomjimb_Init(Actor* thisx, PlayState* play); void EnBomjimb_Destroy(Actor* thisx, PlayState* play); void EnBomjimb_Update(Actor* thisx, PlayState* play2); @@ -149,7 +147,7 @@ static u8 sAnimationModes[ENBOMJIMB_ANIM_MAX] = { }; void EnBomjimb_Init(Actor* thisx, PlayState* play) { - EnBomjimb* this = THIS; + EnBomjimb* this = (EnBomjimb*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); @@ -232,7 +230,7 @@ void EnBomjimb_Init(Actor* thisx, PlayState* play) { } void EnBomjimb_Destroy(Actor* thisx, PlayState* play) { - EnBomjimb* this = THIS; + EnBomjimb* this = (EnBomjimb*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -884,7 +882,7 @@ void func_80C02DAC(EnBomjimb* this, PlayState* play) { void EnBomjimb_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnBomjimb* this = THIS; + EnBomjimb* this = (EnBomjimb*)thisx; if (this->unk_2B0 != 0) { this->unk_2B0--; @@ -940,7 +938,7 @@ void EnBomjimb_Update(Actor* thisx, PlayState* play2) { } s32 EnBomjimb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBomjimb* this = THIS; + EnBomjimb* this = (EnBomjimb*)thisx; if (limbIndex == OBJECT_CS_LIMB_0F) { *dList = NULL; @@ -977,7 +975,7 @@ void EnBomjimb_Draw(Actor* thisx, PlayState* play) { static TexturePtr D_80C03280[] = { object_cs_Tex_00E620, object_cs_Tex_00EA20, object_cs_Tex_00EE20, object_cs_Tex_00DD20, object_cs_Tex_00F220, }; - EnBomjimb* this = THIS; + EnBomjimb* this = (EnBomjimb*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 7809e7aa95..7a5ea1f9ac 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnBoom*)thisx) - void EnBoom_Init(Actor* thisx, PlayState* play); void EnBoom_Destroy(Actor* thisx, PlayState* play); void EnBoom_Update(Actor* thisx, PlayState* play); @@ -112,7 +110,7 @@ void EnBoom_Init(Actor* thisx, PlayState* play) { static u8 D_808A3070[4] = { 255, 255, 100, 0 }; static u8 D_808A3074[4] = { 255, 255, 100, 0 }; s32 pad; - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; EffectBlureInit1 sp30; s32 i; @@ -138,7 +136,7 @@ void EnBoom_Init(Actor* thisx, PlayState* play) { } void EnBoom_Destroy(Actor* thisx, PlayState* play) { - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; Player* player = GET_PLAYER(play); Actor* otherZoraBoomerangActor; @@ -284,7 +282,7 @@ void func_808A2918(EnBoom* this, PlayState* play) { } void EnBoom_Update(Actor* thisx, PlayState* play) { - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; Player* player = GET_PLAYER(play); Actor* actor; @@ -319,7 +317,7 @@ EnBoomStruct D_808A3078[] = { }; void EnBoom_Draw(Actor* thisx, PlayState* play) { - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; EnBoomStruct* sp58 = &D_808A3078[this->actor.params]; Vec3f sp4C; Vec3f sp40; diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 9009a6c7a7..5603e599bb 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -38,8 +38,6 @@ when set, gets cleared next EnBox_Update call and clip to the floor #define ENBOX_MOVE_0x40 (1 << 6) #define ENBOX_MOVE_0x80 (1 << 7) -#define THIS ((EnBox*)thisx) - void EnBox_Init(Actor* thisx, PlayState* play); void EnBox_Destroy(Actor* thisx, PlayState* play); void EnBox_Update(Actor* thisx, PlayState* play); @@ -177,7 +175,7 @@ void EnBox_ClipToGround(EnBox* this, PlayState* play) { void EnBox_Init(Actor* thisx, PlayState* play) { s32 pad; - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; s16 csId; CollisionHeader* colHeader; f32 startFrame; @@ -297,7 +295,7 @@ void EnBox_Init(Actor* thisx, PlayState* play) { } void EnBox_Destroy(Actor* thisx, PlayState* play) { - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -598,7 +596,7 @@ void EnBox_SpawnIceSmoke(EnBox* this, PlayState* play) { } void EnBox_Update(Actor* thisx, PlayState* play) { - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; if (this->movementFlags & ENBOX_MOVE_STICK_TO_GROUND) { this->movementFlags &= ~ENBOX_MOVE_STICK_TO_GROUND; @@ -628,7 +626,7 @@ void EnBox_Update(Actor* thisx, PlayState* play) { void EnBox_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { s32 pad; - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; if (limbIndex == OBJECT_BOX_CHEST_LIMB_01) { MATRIX_FINALIZE_AND_LOAD((*gfx)++, play->state.gfxCtx); @@ -692,7 +690,7 @@ Gfx* EnBox_SetRenderMode3(GraphicsContext* gfxCtx) { void EnBox_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c b/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c index 5e63de328b..49ab64bc29 100644 --- a/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c +++ b/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c @@ -20,8 +20,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnBsb*)thisx) - void EnBsb_Init(Actor* thisx, PlayState* play); void EnBsb_Destroy(Actor* thisx, PlayState* play); void EnBsb_Update(Actor* thisx, PlayState* play); @@ -345,7 +343,7 @@ void func_80C0B31C(PlayState* play, EnBsb* this, Vec3f* pos) { } void EnBsb_Init(Actor* thisx, PlayState* play) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; s32 csId; s32 i; @@ -398,7 +396,7 @@ void EnBsb_Init(Actor* thisx, PlayState* play) { } void EnBsb_Destroy(Actor* thisx, PlayState* play) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; if (this->unk_02B0 == OBJECT_BSB_LIMB_NONE) { Audio_RestorePrevBgm(); @@ -1596,7 +1594,7 @@ s32 func_80C0E9CC(EnBsb* this, PlayState* play) { } void EnBsb_Update(Actor* thisx, PlayState* play) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; s32 pad; DECR(this->unk_0292); @@ -1661,7 +1659,7 @@ void EnBsb_Update(Actor* thisx, PlayState* play) { } s32 EnBsb_OverrideLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1710,7 +1708,7 @@ s32 EnBsb_OverrideLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f s32 EnBsb_OverrideLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; if (limbIndex != this->unk_02B0) { *dList = NULL; @@ -1734,7 +1732,7 @@ s32 EnBsb_OverrideLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void EnBsb_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; if (this->unk_02B0 == OBJECT_BSB_LIMB_NONE) { if (limbIndex == OBJECT_BSB_LIMB_0A) { @@ -1769,7 +1767,7 @@ void EnBsb_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void EnBsb_Draw(Actor* thisx, PlayState* play) { - EnBsb* this = THIS; + EnBsb* this = (EnBsb*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bu/z_en_bu.c b/src/overlays/actors/ovl_En_Bu/z_en_bu.c index ec7e0340bb..db1ee38f9d 100644 --- a/src/overlays/actors/ovl_En_Bu/z_en_bu.c +++ b/src/overlays/actors/ovl_En_Bu/z_en_bu.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED) -#define THIS ((EnBu*)thisx) - void EnBu_Init(Actor* thisx, PlayState* play); void EnBu_Destroy(Actor* thisx, PlayState* play); void EnBu_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile En_Bu_Profile = { }; void EnBu_Init(Actor* thisx, PlayState* play) { - EnBu* this = THIS; + EnBu* this = (EnBu*)thisx; this->actionFunc = EnBu_DoNothing; } @@ -42,14 +40,14 @@ void EnBu_DoNothing(EnBu* this, PlayState* play) { } void EnBu_Update(Actor* thisx, PlayState* play) { - EnBu* this = THIS; + EnBu* this = (EnBu*)thisx; Actor_MoveWithGravity(&this->actor); this->actionFunc(this, play); } void EnBu_Draw(Actor* thisx, PlayState* play) { - EnBu* this = THIS; + EnBu* this = (EnBu*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index 801172cec9..b9de4b872c 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED) -#define THIS ((EnBubble*)thisx) - void EnBubble_Init(Actor* thisx, PlayState* play); void EnBubble_Destroy(Actor* thisx, PlayState* play); void EnBubble_Update(Actor* thisx, PlayState* play); @@ -327,7 +325,7 @@ void func_808A005C(EnBubble* this) { void EnBubble_Init(Actor* thisx, PlayState* play) { s32 pad; - EnBubble* this = THIS; + EnBubble* this = (EnBubble*)thisx; ActorShape_Init(&this->actor.shape, 16.0f, ActorShadow_DrawCircle, 0.2f); Collider_InitJntSph(play, &this->colliderSphere); diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index 5e257f9009..3253313f49 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnButte*)thisx) - void EnButte_Init(Actor* thisx, PlayState* play); void EnButte_Destroy(Actor* thisx, PlayState* play2); void EnButte_Update(Actor* thisx, PlayState* play); @@ -163,7 +161,7 @@ void func_8091C178(EnButte* this, PlayState* play) { void EnButte_Init(Actor* thisx, PlayState* play) { s32 pad; - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; if (BUTTERFLY_GET(&this->actor) == BUTTERFLY_MINUS1) { this->actor.params = BUTTERFLY_0; @@ -199,7 +197,7 @@ void EnButte_Init(Actor* thisx, PlayState* play) { void EnButte_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -402,7 +400,7 @@ void func_8091D090(EnButte* this, PlayState* play) { } void EnButte_Update(Actor* thisx, PlayState* play) { - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; if ((this->actor.child != NULL) && (this->actor.child->update == NULL) && (&this->actor != this->actor.child)) { this->actor.child = NULL; @@ -444,7 +442,7 @@ void EnButte_Update(Actor* thisx, PlayState* play) { } void EnButte_Draw(Actor* thisx, PlayState* play) { - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; if (this->unk_250 != 0) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Cha/z_en_cha.c b/src/overlays/actors/ovl_En_Cha/z_en_cha.c index cd614b454f..86d70f45ae 100644 --- a/src/overlays/actors/ovl_En_Cha/z_en_cha.c +++ b/src/overlays/actors/ovl_En_Cha/z_en_cha.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnCha*)thisx) - void EnCha_Init(Actor* thisx, PlayState* play); void EnCha_Destroy(Actor* thisx, PlayState* play); void EnCha_Update(Actor* thisx, PlayState* play2); @@ -51,7 +49,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnCha_Init(Actor* thisx, PlayState* play) { - EnCha* this = THIS; + EnCha* this = (EnCha*)thisx; s32 pad; Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -65,7 +63,7 @@ void EnCha_Init(Actor* thisx, PlayState* play) { } void EnCha_Destroy(Actor* thisx, PlayState* play) { - EnCha* this = THIS; + EnCha* this = (EnCha*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -103,7 +101,7 @@ void EnCha_Idle(EnCha* this, PlayState* play) { void EnCha_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnCha* this = THIS; + EnCha* this = (EnCha*)thisx; CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); this->actionFunc(this, play); @@ -113,7 +111,7 @@ void EnCha_Update(Actor* thisx, PlayState* play2) { } void EnCha_Draw(Actor* thisx, PlayState* play) { - EnCha* this = THIS; + EnCha* this = (EnCha*)thisx; Gfx_DrawDListOpa(play, object_cha_DL_000710); Matrix_Translate(-1094.0f, 4950.0f, 9.0f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index 23b59403c2..8472dcfc54 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnClearTag*)thisx) - typedef enum { /* 0x00 */ CLEAR_TAG_EFFECT_AVAILABLE, /* 0x01 */ CLEAR_TAG_EFFECT_DEBRIS, @@ -416,7 +414,7 @@ void EnClearTag_Destroy(Actor* thisx, PlayState* play) { */ void EnClearTag_Init(Actor* thisx, PlayState* play) { s32 pad[3]; - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; f32 lightRayMaxScale; u8 i; Vec3f pos; @@ -607,7 +605,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) { * Decides whether to update or to mark for death */ void EnClearTag_Update(Actor* thisx, PlayState* play) { - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; if (this->activeTimer != 0) { this->activeTimer--; @@ -805,7 +803,7 @@ void EnClearTag_DrawEffects(Actor* thisx, PlayState* play) { f32 ySurface; MtxF mtxF; GraphicsContext* gfxCtx = play->state.gfxCtx; - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; EnClearTagEffect* effect = this->effect; EnClearTagEffect* firstEffect = this->effect; diff --git a/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c b/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c index 791998d778..cc7e774f4e 100644 --- a/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c +++ b/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnCne01*)thisx) - void EnCne01_Init(Actor* thisx, PlayState* play); void EnCne01_Destroy(Actor* thisx, PlayState* play); void EnCne01_Update(Actor* thisx, PlayState* play); @@ -204,7 +202,7 @@ void EnCne01_Talk(EnHy* this, PlayState* play) { void EnCne01_Init(Actor* thisx, PlayState* play) { s32 pad; - EnCne01* this = THIS; + EnCne01* this = (EnCne01*)thisx; this->enHy.animObjectSlot = SubS_GetObjectSlot(OBJECT_OS_ANIME, play); this->enHy.headObjectSlot = SubS_GetObjectSlot(OBJECT_CNE, play); @@ -227,13 +225,13 @@ void EnCne01_Init(Actor* thisx, PlayState* play) { } void EnCne01_Destroy(Actor* thisx, PlayState* play) { - EnCne01* this = THIS; + EnCne01* this = (EnCne01*)thisx; Collider_DestroyCylinder(play, &this->enHy.collider); } void EnCne01_Update(Actor* thisx, PlayState* play) { - EnCne01* this = THIS; + EnCne01* this = (EnCne01*)thisx; EnCne01_TestIsTalking(this, play); this->enHy.actionFunc(&this->enHy, play); @@ -243,7 +241,7 @@ void EnCne01_Update(Actor* thisx, PlayState* play) { } s32 EnCne01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnCne01* this = THIS; + EnCne01* this = (EnCne01*)thisx; s8 bodyPartIndex; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -288,7 +286,7 @@ s32 EnCne01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnCne01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnCne01* this = THIS; + EnCne01* this = (EnCne01*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -310,7 +308,7 @@ void EnCne01_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnCne01_Draw(Actor* thisx, PlayState* play) { - EnCne01* this = THIS; + EnCne01* this = (EnCne01*)thisx; s32 i; u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, SUBS_SHADOW_TEX_SIZE); u8* shadowTexIter; diff --git a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c index c5584a466e..8d69b7a4d8 100644 --- a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c +++ b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_100000) -#define THIS ((EnColMan*)thisx) - void EnColMan_Init(Actor* thisx, PlayState* play); void EnColMan_Destroy(Actor* thisx, PlayState* play); void EnColMan_Update(Actor* thisx, PlayState* play); @@ -61,7 +59,7 @@ ActorProfile En_Col_Man_Profile = { }; void EnColMan_Init(Actor* thisx, PlayState* play) { - EnColMan* this = THIS; + EnColMan* this = (EnColMan*)thisx; Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->actor.attentionRangeType = ATTENTION_RANGE_1; @@ -88,7 +86,7 @@ void EnColMan_Init(Actor* thisx, PlayState* play) { } void EnColMan_Destroy(Actor* thisx, PlayState* play) { - EnColMan* this = THIS; + EnColMan* this = (EnColMan*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -220,7 +218,7 @@ void func_80AFE25C(EnColMan* this, PlayState* play) { void EnColMan_Update(Actor* thisx, PlayState* play) { s32 pad; - EnColMan* this = THIS; + EnColMan* this = (EnColMan*)thisx; Actor_SetScale(&this->actor, this->scale); this->actionFunc(this, play); @@ -233,7 +231,7 @@ void EnColMan_Update(Actor* thisx, PlayState* play) { } void func_80AFE414(Actor* thisx, PlayState* play) { - EnColMan* this = THIS; + EnColMan* this = (EnColMan*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -246,7 +244,7 @@ void func_80AFE414(Actor* thisx, PlayState* play) { } void func_80AFE4AC(Actor* thisx, PlayState* play) { - EnColMan* this = THIS; + EnColMan* this = (EnColMan*)thisx; Gfx_SetupDL25_Xlu(play->state.gfxCtx); Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index ac4fdc3a1d..986e373dbe 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnCow*)thisx) - void EnCow_Init(Actor* thisx, PlayState* play); void EnCow_Destroy(Actor* thisx, PlayState* play); void EnCow_Update(Actor* thisx, PlayState* play2); @@ -101,7 +99,7 @@ void EnCow_SetTailPos(EnCow* this) { void EnCow_Init(Actor* thisx, PlayState* play) { s32 pad; - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 72.0f); @@ -163,7 +161,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) { } void EnCow_Destroy(Actor* thisx, PlayState* play) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (this->actor.params == EN_COW_TYPE_DEFAULT) { //! @bug EN_COW_TYPE_ABDUCTED do not destroy their cylinders Collider_DestroyCylinder(play, &this->colliders[0]); @@ -336,7 +334,7 @@ void EnCow_DoTail(EnCow* this, PlayState* play) { void EnCow_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; s16 targetX; s16 targetY; Player* player = GET_PLAYER(play); @@ -387,7 +385,7 @@ void EnCow_Update(Actor* thisx, PlayState* play2) { void EnCow_UpdateTail(Actor* thisx, PlayState* play) { s32 pad; - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (SkelAnime_Update(&this->skelAnime)) { if (this->skelAnime.animation == &gCowTailIdleAnim) { @@ -403,7 +401,7 @@ void EnCow_UpdateTail(Actor* thisx, PlayState* play) { } s32 EnCow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (limbIndex == COW_LIMB_HEAD) { rot->y += this->headTilt.y; @@ -417,7 +415,7 @@ s32 EnCow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnCow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (limbIndex == COW_LIMB_HEAD) { Matrix_MultVec3f(&D_8099D63C, &this->actor.focus.pos); @@ -425,7 +423,7 @@ void EnCow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnCow_Draw(Actor* thisx, PlayState* play) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, @@ -433,7 +431,7 @@ void EnCow_Draw(Actor* thisx, PlayState* play) { } void EnCow_DrawTail(Actor* thisx, PlayState* play) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 7f9448064c..c122bf759b 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -10,8 +10,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnCrow*)thisx) - void EnCrow_Init(Actor* thisx, PlayState* play); void EnCrow_Destroy(Actor* thisx, PlayState* play); void EnCrow_Update(Actor* thisx, PlayState* play); @@ -126,7 +124,7 @@ static InitChainEntry sInitChain[] = { }; void EnCrow_Init(Actor* thisx, PlayState* play) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, @@ -145,7 +143,7 @@ void EnCrow_Init(Actor* thisx, PlayState* play) { } void EnCrow_Destroy(Actor* thisx, PlayState* play) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -493,7 +491,7 @@ void EnCrow_UpdateDamage(EnCrow* this, PlayState* play) { void EnCrow_Update(Actor* thisx, PlayState* play) { s32 pad; - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; f32 height; f32 scale; @@ -548,7 +546,7 @@ void EnCrow_Update(Actor* thisx, PlayState* play) { } s32 EnCrow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; if (this->actor.colChkInfo.health != 0) { if (limbIndex == OBJECT_CROW_LIMB_UPPER_TAIL) { @@ -561,7 +559,7 @@ s32 EnCrow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnCrow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; if (limbIndex == OBJECT_CROW_LIMB_BODY) { Matrix_MultVecX(2500.0f, &this->bodyPartsPos[GUAY_BODYPART_BODY]); @@ -572,7 +570,7 @@ void EnCrow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot } void EnCrow_Draw(Actor* thisx, PlayState* play) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Dai/z_en_dai.c b/src/overlays/actors/ovl_En_Dai/z_en_dai.c index b4908a4a89..d3af264fe7 100644 --- a/src/overlays/actors/ovl_En_Dai/z_en_dai.c +++ b/src/overlays/actors/ovl_En_Dai/z_en_dai.c @@ -10,8 +10,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnDai*)thisx) - void EnDai_Init(Actor* thisx, PlayState* play); void EnDai_Destroy(Actor* thisx, PlayState* play); void EnDai_Update(Actor* thisx, PlayState* play); @@ -553,7 +551,7 @@ void EnDai_HandleCutscene(EnDai* this, PlayState* play) { } void EnDai_Init(Actor* thisx, PlayState* play) { - EnDai* this = THIS; + EnDai* this = (EnDai*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_dai_Skel_0130D0, NULL, this->jointTable, this->morphTable, @@ -591,7 +589,7 @@ void EnDai_Destroy(Actor* thisx, PlayState* play) { } void EnDai_Update(Actor* thisx, PlayState* play) { - EnDai* this = THIS; + EnDai* this = (EnDai*)thisx; s32 pad; Player* player = GET_PLAYER(play); @@ -615,7 +613,7 @@ void EnDai_Update(Actor* thisx, PlayState* play) { s32 EnDai_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnDai* this = THIS; + EnDai* this = (EnDai*)thisx; if (!(this->unk_1CE & 0x40)) { *dList = NULL; @@ -635,7 +633,7 @@ s32 EnDai_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnDai_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { static Vec3f D_80B3FE4C = { 0.0f, 0.0f, 0.0f }; - EnDai* this = THIS; + EnDai* this = (EnDai*)thisx; Vec3s sp64; MtxF sp24; @@ -661,7 +659,7 @@ void EnDai_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnDai_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx, Gfx** gfx) { - EnDai* this = THIS; + EnDai* this = (EnDai*)thisx; switch (limbIndex) { case OBJECT_DAI_LIMB_09: @@ -772,7 +770,7 @@ void func_80B3F920(EnDai* this, PlayState* play) { } void EnDai_Draw(Actor* thisx, PlayState* play) { - EnDai* this = THIS; + EnDai* this = (EnDai*)thisx; if (!(this->unk_1CE & 0x200)) { if (this->unk_1CE & 0x20) { diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 0641364b37..f2dc1cb076 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDaiku*)thisx) - void EnDaiku_Init(Actor* thisx, PlayState* play); void EnDaiku_Destroy(Actor* thisx, PlayState* play); void EnDaiku_Update(Actor* thisx, PlayState* play); @@ -95,7 +93,7 @@ static u8 sAnimationModes[ENDAIKU_ANIM_MAX] = { }; void EnDaiku_Init(Actor* thisx, PlayState* play) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f); @@ -153,7 +151,7 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) { } void EnDaiku_Destroy(Actor* thisx, PlayState* play) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -286,7 +284,7 @@ void func_80943BDC(EnDaiku* this, PlayState* play) { } void EnDaiku_Update(Actor* thisx, PlayState* play) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; s32 pad; if (this->unk_27E == 0) { @@ -323,7 +321,7 @@ void EnDaiku_Update(Actor* thisx, PlayState* play) { } s32 EnDaiku_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; if (limbIndex == OBJECT_DAIKU_LIMB_0F) { rot->x += this->unk_260; @@ -340,7 +338,7 @@ void EnDaiku_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro object_daiku_DL_006E80, object_daiku_DL_006D70, }; - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -356,7 +354,7 @@ void EnDaiku_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnDaiku_Draw(Actor* thisx, PlayState* play) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c b/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c index ce1335f833..b6a80de920 100644 --- a/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c +++ b/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDaiku2*)thisx) - void EnDaiku2_Init(Actor* thisx, PlayState* play); void EnDaiku2_Destroy(Actor* thisx, PlayState* play); void EnDaiku2_Update(Actor* thisx, PlayState* play); @@ -77,7 +75,7 @@ void func_80BE61D0(EnDaiku2* this) { } void EnDaiku2_Init(Actor* thisx, PlayState* play) { - EnDaiku2* this = THIS; + EnDaiku2* this = (EnDaiku2*)thisx; s32 day = gSaveContext.save.day; this->actor.colChkInfo.mass = MASS_IMMOVABLE; @@ -115,7 +113,7 @@ void EnDaiku2_Init(Actor* thisx, PlayState* play) { } void EnDaiku2_Destroy(Actor* thisx, PlayState* play) { - EnDaiku2* this = THIS; + EnDaiku2* this = (EnDaiku2*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -486,7 +484,7 @@ void func_80BE71D8(EnDaiku2* this, PlayState* play) { } void EnDaiku2_Update(Actor* thisx, PlayState* play) { - EnDaiku2* this = THIS; + EnDaiku2* this = (EnDaiku2*)thisx; s32 pad; SkelAnime_Update(&this->skelAnime); @@ -504,7 +502,7 @@ void EnDaiku2_Update(Actor* thisx, PlayState* play) { } void EnDaiku2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDaiku2* this = THIS; + EnDaiku2* this = (EnDaiku2*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -524,7 +522,7 @@ void EnDaiku2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void EnDaiku2_Draw(Actor* thisx, PlayState* play) { - EnDaiku2* this = THIS; + EnDaiku2* this = (EnDaiku2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Death/z_en_death.c b/src/overlays/actors/ovl_En_Death/z_en_death.c index 95a53ae4c7..a23da1c29c 100644 --- a/src/overlays/actors/ovl_En_Death/z_en_death.c +++ b/src/overlays/actors/ovl_En_Death/z_en_death.c @@ -12,8 +12,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_IGNORE_QUAKE) -#define THIS ((EnDeath*)thisx) - void EnDeath_Init(Actor* thisx, PlayState* play2); void EnDeath_Destroy(Actor* thisx, PlayState* play); void EnDeath_Update(Actor* thisx, PlayState* play); @@ -226,7 +224,7 @@ static InitChainEntry sInitChain[] = { }; void EnDeath_Init(Actor* thisx, PlayState* play2) { - EnDeath* this = THIS; + EnDeath* this = (EnDeath*)thisx; PlayState* play = play2; f32 yOffset = 15.0f; s16 yRot = 0; @@ -291,7 +289,7 @@ void EnDeath_Init(Actor* thisx, PlayState* play2) { } void EnDeath_Destroy(Actor* thisx, PlayState* play) { - EnDeath* this = THIS; + EnDeath* this = (EnDeath*)thisx; Collider_DestroySphere(play, &this->coreCollider); Collider_DestroyCylinder(play, &this->bodyCollider); @@ -1245,7 +1243,7 @@ void EnDeath_UpdateDamage(EnDeath* this, PlayState* play) { } void EnDeath_Update(Actor* thisx, PlayState* play) { - EnDeath* this = THIS; + EnDeath* this = (EnDeath*)thisx; ArrowLight* lightArrow; s32 pad; @@ -1598,7 +1596,7 @@ void EnDeath_DrawCore(EnDeath* this, PlayState* play) { } s32 EnDeath_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDeath* this = THIS; + EnDeath* this = (EnDeath*)thisx; if (this->noDrawLimbs[limbIndex] == true) { *dList = NULL; @@ -1632,7 +1630,7 @@ void EnDeath_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro static s8 sLimbToBodyParts[GOMESS_LIMB_MAX] = { -1, -1, -1, 12, -1, 0, -1, -1, -1, -1, -1, -1, -1, 7, 1, 2, 3, 4, 5, 6, -1, -1, }; - EnDeath* this = THIS; + EnDeath* this = (EnDeath*)thisx; s8 index; if (limbIndex == GOMESS_LIMB_SCYTHE_BLADE) { @@ -1716,7 +1714,7 @@ void EnDeath_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnDeath_Draw(Actor* thisx, PlayState* play) { - EnDeath* this = THIS; + EnDeath* this = (EnDeath*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 619c48ac72..fafc4184df 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnDekubaba*)thisx) - void EnDekubaba_Init(Actor* thisx, PlayState* play); void EnDekubaba_Destroy(Actor* thisx, PlayState* play); void EnDekubaba_Update(Actor* thisx, PlayState* play); @@ -201,7 +199,7 @@ static InitChainEntry sInitChain[] = { }; void EnDekubaba_Init(Actor* thisx, PlayState* play) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -239,7 +237,7 @@ void EnDekubaba_Init(Actor* thisx, PlayState* play) { } void EnDekubaba_Destroy(Actor* thisx, PlayState* play) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -1176,7 +1174,7 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) { void EnDekubaba_Update(Actor* thisx, PlayState* play) { s32 pad; - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; @@ -1336,7 +1334,7 @@ void EnDekubaba_DrawShadow(EnDekubaba* this, PlayState* play) { } void EnDekubaba_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; if (limbIndex == DEKUBABA_LIMB_ROOT) { Collider_UpdateSpheres(limbIndex, &this->collider); @@ -1344,7 +1342,7 @@ void EnDekubaba_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnDekubaba_Draw(Actor* thisx, PlayState* play) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; f32 scale; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index b6ff58443f..fa8ccc3e7a 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnDekunuts*)thisx) - void EnDekunuts_Init(Actor* thisx, PlayState* play); void EnDekunuts_Destroy(Actor* thisx, PlayState* play); void EnDekunuts_Update(Actor* thisx, PlayState* play); @@ -116,7 +114,7 @@ static InitChainEntry sInitChain[] = { }; void EnDekunuts_Init(Actor* thisx, PlayState* play) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f); @@ -143,7 +141,7 @@ void EnDekunuts_Init(Actor* thisx, PlayState* play) { } void EnDekunuts_Destroy(Actor* thisx, PlayState* play) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -639,7 +637,7 @@ void func_808BE73C(EnDekunuts* this, PlayState* play) { } void EnDekunuts_Update(Actor* thisx, PlayState* play) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; s32 pad; func_808BE73C(this, play); @@ -668,7 +666,7 @@ void EnDekunuts_Update(Actor* thisx, PlayState* play) { } s32 EnDekunuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; f32 arg1; f32 arg2; f32 arg3; @@ -722,7 +720,7 @@ static Vec3f D_808BEFA4[] = { }; void EnDekunuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; s32 i; Vec3f* ptr1; Vec3f* ptr2; @@ -749,7 +747,7 @@ void EnDekunuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnDekunuts_Draw(Actor* thisx, PlayState* play) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDekunuts_OverrideLimbDraw, EnDekunuts_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c b/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c index 362ee7bf2d..8b7fad0a03 100644 --- a/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c +++ b/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDemoheishi*)thisx) - void EnDemoheishi_Init(Actor* thisx, PlayState* play); void EnDemoheishi_Destroy(Actor* thisx, PlayState* play); void EnDemoheishi_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ static ColliderCylinderInit sCylinderInit = { static u16 sTextIds[] = { 0x1473 }; // Shiro initial intro text void EnDemoheishi_Init(Actor* thisx, PlayState* play) { - EnDemoheishi* this = THIS; + EnDemoheishi* this = (EnDemoheishi*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gSoldierSkel, &gSoldierWaveAnim, this->jointTable, this->morphTable, @@ -68,7 +66,7 @@ void EnDemoheishi_Init(Actor* thisx, PlayState* play) { } void EnDemoheishi_Destroy(Actor* thisx, PlayState* play) { - EnDemoheishi* this = THIS; + EnDemoheishi* this = (EnDemoheishi*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); } @@ -157,7 +155,7 @@ void EnDemoheishi_Talk(EnDemoheishi* this, PlayState* play) { void EnDemoheishi_Update(Actor* thisx, PlayState* play) { s32 pad; - EnDemoheishi* this = THIS; + EnDemoheishi* this = (EnDemoheishi*)thisx; SkelAnime_Update(&this->skelAnime); if (this->timer != 0) { @@ -181,7 +179,7 @@ void EnDemoheishi_Update(Actor* thisx, PlayState* play) { } s32 EnDemoheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDemoheishi* this = THIS; + EnDemoheishi* this = (EnDemoheishi*)thisx; if (limbIndex == SOLDIER_LIMB_HEAD) { rot->x += this->headRotX; @@ -193,7 +191,7 @@ s32 EnDemoheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V } void EnDemoheishi_Draw(Actor* thisx, PlayState* play) { - EnDemoheishi* this = THIS; + EnDemoheishi* this = (EnDemoheishi*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Dg/z_en_dg.c b/src/overlays/actors/ovl_En_Dg/z_en_dg.c index 84dbc49e38..790c7e55a3 100644 --- a/src/overlays/actors/ovl_En_Dg/z_en_dg.c +++ b/src/overlays/actors/ovl_En_Dg/z_en_dg.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_THROW_ONLY) -#define THIS ((EnDg*)thisx) - void EnDg_Init(Actor* thisx, PlayState* play); void EnDg_Destroy(Actor* thisx, PlayState* play); void EnDg_Update(Actor* thisx, PlayState* play); @@ -1302,7 +1300,7 @@ void EnDg_Talk(EnDg* this, PlayState* play) { } void EnDg_Init(Actor* thisx, PlayState* play) { - EnDg* this = THIS; + EnDg* this = (EnDg*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); @@ -1332,13 +1330,13 @@ void EnDg_Init(Actor* thisx, PlayState* play) { } void EnDg_Destroy(Actor* thisx, PlayState* play) { - EnDg* this = THIS; + EnDg* this = (EnDg*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnDg_Update(Actor* thisx, PlayState* play) { - EnDg* this = THIS; + EnDg* this = (EnDg*)thisx; Player* player = GET_PLAYER(play); s32 pad; Vec3f floorRot = { 0.0f, 0.0f, 0.0f }; @@ -1371,7 +1369,7 @@ s32 EnDg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnDg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDg* this = THIS; + EnDg* this = (EnDg*)thisx; Vec3f sFocusOffset = { 0.0f, 20.0f, 0.0f }; if (limbIndex == DOG_LIMB_HEAD) { @@ -1385,7 +1383,7 @@ void EnDg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnDg_Draw(Actor* thisx, PlayState* play) { - EnDg* this = THIS; + EnDg* this = (EnDg*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c index 6ef732095f..962b55bfeb 100644 --- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c +++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c @@ -11,8 +11,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnDinofos*)thisx) - void EnDinofos_Init(Actor* thisx, PlayState* play); void EnDinofos_Destroy(Actor* thisx, PlayState* play); void EnDinofos_Update(Actor* thisx, PlayState* play2); @@ -287,7 +285,7 @@ void EnDinofos_Init(Actor* thisx, PlayState* play) { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, }; - EnDinofos* this = THIS; + EnDinofos* this = (EnDinofos*)thisx; s32 i; ColliderJntSphElementDim* dim; @@ -331,7 +329,7 @@ void EnDinofos_Init(Actor* thisx, PlayState* play) { } void EnDinofos_Destroy(Actor* thisx, PlayState* play) { - EnDinofos* this = THIS; + EnDinofos* this = (EnDinofos*)thisx; Effect_Destroy(play, this->effectIndex); Collider_DestroyJntSph(play, &this->bodyAndFireCollider); @@ -1390,7 +1388,7 @@ s32 EnDinofos_UpdateDamage(EnDinofos* this, PlayState* play) { void EnDinofos_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnDinofos* this = THIS; + EnDinofos* this = (EnDinofos*)thisx; s32 pad; Vec3f bodyPartPos; @@ -1453,7 +1451,7 @@ void EnDinofos_Update(Actor* thisx, PlayState* play2) { s32 EnDinofos_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnDinofos* this = THIS; + EnDinofos* this = (EnDinofos*)thisx; if (limbIndex == DINOLFOS_LIMB_HEAD) { rot->y -= this->headRotY; @@ -1491,7 +1489,7 @@ static s8 sLimbToBodyParts[DINOLFOS_LIMB_MAX] = { }; void EnDinofos_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnDinofos* this = THIS; + EnDinofos* this = (EnDinofos*)thisx; Vec3f prevKnifeTipQuadPos; Vec3f prevKnifeBaseQuadPos; Vec3f knifeTipQuadPos; @@ -1543,7 +1541,7 @@ void EnDinofos_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnDinofos_Draw(Actor* thisx, PlayState* play) { - EnDinofos* this = THIS; + EnDinofos* this = (EnDinofos*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dnb/z_en_dnb.c b/src/overlays/actors/ovl_En_Dnb/z_en_dnb.c index 2d0d91b286..d5fa231475 100644 --- a/src/overlays/actors/ovl_En_Dnb/z_en_dnb.c +++ b/src/overlays/actors/ovl_En_Dnb/z_en_dnb.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_REACT_TO_LENS) -#define THIS ((EnDnb*)thisx) - void EnDnb_Init(Actor* thisx, PlayState* play); void EnDnb_Destroy(Actor* thisx, PlayState* play); void EnDnb_Update(Actor* thisx, PlayState* play); @@ -100,7 +98,7 @@ s32 func_80A500F8(EnDnb* this) { } void EnDnb_Init(Actor* thisx, PlayState* play) { - EnDnb* this = THIS; + EnDnb* this = (EnDnb*)thisx; s32 i; s16* alloc; @@ -116,13 +114,13 @@ void EnDnb_Init(Actor* thisx, PlayState* play) { } void EnDnb_Destroy(Actor* thisx, PlayState* play) { - EnDnb* this = THIS; + EnDnb* this = (EnDnb*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void EnDnb_Update(Actor* thisx, PlayState* play) { - EnDnb* this = THIS; + EnDnb* this = (EnDnb*)thisx; s32 i; if (this->unk_0D30 == 0) { @@ -199,7 +197,7 @@ void func_80A5063C(EnDnb* this, PlayState* play) { } void EnDnb_Draw(Actor* thisx, PlayState* play) { - EnDnb* this = THIS; + EnDnb* this = (EnDnb*)thisx; if (play->actorCtx.lensMaskSize != 0) { func_80A50510(this, play); diff --git a/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c b/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c index e5525d5f92..bbb1dd3e72 100644 --- a/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c +++ b/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDnh*)thisx) - void EnDnh_Init(Actor* thisx, PlayState* play); void EnDnh_Destroy(Actor* thisx, PlayState* play); void EnDnh_Update(Actor* thisx, PlayState* play); @@ -308,7 +306,7 @@ void EnDnh_DoNothing(EnDnh* this, PlayState* play) { } void EnDnh_Init(Actor* thisx, PlayState* play) { - EnDnh* this = THIS; + EnDnh* this = (EnDnh*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_Init(play, &this->skelAnime, &gKoumeKioskSkel, NULL, this->jointTable, this->morphTable, @@ -337,7 +335,7 @@ void EnDnh_Destroy(Actor* thisx, PlayState* play) { } void EnDnh_Update(Actor* thisx, PlayState* play) { - EnDnh* this = THIS; + EnDnh* this = (EnDnh*)thisx; func_80A50E40(this, play); this->actionFunc(this, play); @@ -348,7 +346,7 @@ void EnDnh_Update(Actor* thisx, PlayState* play) { } s32 EnDnh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDnh* this = THIS; + EnDnh* this = (EnDnh*)thisx; if (limbIndex == KOUME_KIOSK_LIMB_HEAD) { Matrix_Translate(0.0f, this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY); @@ -357,7 +355,7 @@ s32 EnDnh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnDnh_Draw(Actor* thisx, PlayState* play) { - EnDnh* this = THIS; + EnDnh* this = (EnDnh*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c index 02ea9a3b3d..c4bfdfade7 100644 --- a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c +++ b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDnk*)thisx) - void EnDnk_Init(Actor* thisx, PlayState* play); void EnDnk_Destroy(Actor* thisx, PlayState* play); void EnDnk_Update(Actor* thisx, PlayState* play); @@ -261,7 +259,7 @@ void EnDnk_DoNothing(EnDnk* this, PlayState* play) { } void EnDnk_Init(Actor* thisx, PlayState* play) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; this->objectSlot = OBJECT_SLOT_NONE; @@ -290,13 +288,13 @@ void EnDnk_Init(Actor* thisx, PlayState* play) { } void EnDnk_Destroy(Actor* thisx, PlayState* play) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnDnk_Update(Actor* thisx, PlayState* play) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; s32 pad; this->actionFunc(this, play); @@ -310,7 +308,7 @@ void EnDnk_Update(Actor* thisx, PlayState* play) { } s32 EnDnk_OverrideLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; this->unk_260[limbIndex] = *dList; *dList = NULL; @@ -318,7 +316,7 @@ s32 EnDnk_OverrideLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnDnk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; MtxF sp5C; Vec3f sp50 = gZeroVec3f; Vec3f sp44; @@ -386,7 +384,7 @@ void func_80A51CB8(EnDnk* this, PlayState* play) { } s32 EnDnk_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; this->unk_260[limbIndex] = *dList; *dList = NULL; @@ -394,7 +392,7 @@ s32 EnDnk_OverrideLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnDnk_PostLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; MtxF sp5C; Vec3f sp50 = gZeroVec3f; Vec3f sp44; @@ -450,7 +448,7 @@ void func_80A51FC0(EnDnk* this, PlayState* play) { } void func_80A52018(Actor* thisx, PlayState* play) { - EnDnk* this = THIS; + EnDnk* this = (EnDnk*)thisx; switch (ENDNK_GET_3(thisx)) { case ENDNK_GET_3_0: diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index 6552f2cdb1..bf5410a113 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnDno*)thisx) - void EnDno_Init(Actor* thisx, PlayState* play); void EnDno_Destroy(Actor* thisx, PlayState* play); void EnDno_Update(Actor* thisx, PlayState* play); @@ -217,7 +215,7 @@ void func_80A71788(EnDno* this, PlayState* play) { } void EnDno_Init(Actor* thisx, PlayState* play) { - EnDno* this = THIS; + EnDno* this = (EnDno*)thisx; s32 pad; Actor* actor = NULL; @@ -291,7 +289,7 @@ void EnDno_Init(Actor* thisx, PlayState* play) { } void EnDno_Destroy(Actor* thisx, PlayState* play) { - EnDno* this = THIS; + EnDno* this = (EnDno*)thisx; Collider_DestroyCylinder(play, &this->collider); LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); @@ -992,7 +990,7 @@ void func_80A73408(EnDno* this, PlayState* play) { } void EnDno_Update(Actor* thisx, PlayState* play) { - EnDno* this = THIS; + EnDno* this = (EnDno*)thisx; s32 pad; SkelAnime_Update(&this->skelAnime); @@ -1007,14 +1005,14 @@ void EnDno_Update(Actor* thisx, PlayState* play) { } void EnDno_Draw(Actor* thisx, PlayState* play) { - EnDno* this = THIS; + EnDno* this = (EnDno*)thisx; SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnDno_OverrideLimbDraw, EnDno_PostLimbDraw, &this->actor); } s32 EnDno_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDno* this = THIS; + EnDno* this = (EnDno*)thisx; *dList = NULL; if (limbIndex == DEKU_BUTLER_LIMB_EYES) { @@ -1028,7 +1026,7 @@ void EnDno_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Gfx* gfxOpa; Gfx* gfxXlu; Vec3f sp84; - EnDno* this = THIS; + EnDno* this = (EnDno*)thisx; s32 pad; s32 phi_v0 = false; diff --git a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c index 1ce2212edc..8d6f16eef3 100644 --- a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c +++ b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnDnp*)thisx) - void EnDnp_Init(Actor* thisx, PlayState* play); void EnDnp_Destroy(Actor* thisx, PlayState* play); void EnDnp_Update(Actor* thisx, PlayState* play); @@ -415,7 +413,7 @@ void func_80B3D558(EnDnp* this, PlayState* play) { } void EnDnp_Init(Actor* thisx, PlayState* play) { - EnDnp* this = THIS; + EnDnp* this = (EnDnp*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 16.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gDekuPrincessSkel, NULL, this->jointTable, this->morphTable, @@ -454,13 +452,13 @@ void EnDnp_Init(Actor* thisx, PlayState* play) { } void EnDnp_Destroy(Actor* thisx, PlayState* play) { - EnDnp* this = THIS; + EnDnp* this = (EnDnp*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnDnp_Update(Actor* thisx, PlayState* play) { - EnDnp* this = THIS; + EnDnp* this = (EnDnp*)thisx; s32 pad; f32 sp2C; f32 sp28; @@ -522,7 +520,7 @@ void EnDnp_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnDnp_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnDnp* this = THIS; + EnDnp* this = (EnDnp*)thisx; s32 phi_v1; s32 phi_v0; @@ -558,7 +556,7 @@ void EnDnp_Draw(Actor* thisx, PlayState* play) { gDekuPrincessEyeClosedTex, gDekuPrincessEyeAngryTex, }; - EnDnp* this = THIS; + EnDnp* this = (EnDnp*)thisx; if (this->unk_322 & 0x100) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c b/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c index 0beeb5cd74..0199adbe30 100644 --- a/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c +++ b/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDnq*)thisx) - void EnDnq_Init(Actor* thisx, PlayState* play); void EnDnq_Destroy(Actor* thisx, PlayState* play); void EnDnq_Update(Actor* thisx, PlayState* play); @@ -488,7 +486,7 @@ void EnDnq_HandleCutscene(EnDnq* this, PlayState* play) { } void EnDnq_Init(Actor* thisx, PlayState* play) { - EnDnq* this = THIS; + EnDnq* this = (EnDnq*)thisx; ActorShape_Init(&this->picto.actor.shape, 0.0f, NULL, 14.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gDekuKingSkel, NULL, this->jointTable, this->morphTable, @@ -512,13 +510,13 @@ void EnDnq_Init(Actor* thisx, PlayState* play) { } void EnDnq_Destroy(Actor* thisx, PlayState* play) { - EnDnq* this = THIS; + EnDnq* this = (EnDnq*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnDnq_Update(Actor* thisx, PlayState* play) { - EnDnq* this = THIS; + EnDnq* this = (EnDnq*)thisx; if (!func_80A52D44(this, play) && func_80A52648(this, play)) { EnDnq_HandleCutscene(this, play); @@ -539,7 +537,7 @@ void EnDnq_Update(Actor* thisx, PlayState* play) { } void EnDnq_Draw(Actor* thisx, PlayState* play) { - EnDnq* this = THIS; + EnDnq* this = (EnDnq*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index d8bd6388ca..867382d5a1 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnDns*)thisx) - void EnDns_Init(Actor* thisx, PlayState* play); void EnDns_Destroy(Actor* thisx, PlayState* play); void EnDns_Update(Actor* thisx, PlayState* play); @@ -342,7 +340,7 @@ s32 func_8092CC68(PlayState* play) { s32 func_8092CCEC(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; Vec3f sp3C = player->actor.world.pos; Vec3f sp30 = this->actor.world.pos; s16 sp2E; @@ -557,7 +555,7 @@ void EnDns_HandleCutscene(EnDns* this, PlayState* play) { } void EnDns_Init(Actor* thisx, PlayState* play) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; if (!func_8092D068(this)) { Actor_Kill(&this->actor); @@ -590,13 +588,13 @@ void EnDns_Init(Actor* thisx, PlayState* play) { } void EnDns_Destroy(Actor* thisx, PlayState* play) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnDns_Update(Actor* thisx, PlayState* play) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; if (!func_8092CAD0(this, play) && func_8092CB98(this, play)) { EnDns_HandleCutscene(this, play); @@ -643,7 +641,7 @@ s32 func_8092D954(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar } s32 EnDns_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; this->unk_1E4[limbIndex] = *dList; *dList = NULL; @@ -651,7 +649,7 @@ s32 EnDns_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnDns_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; s32 pad; s32 phi_v1; s32 phi_v0; @@ -693,7 +691,7 @@ void EnDns_Draw(Actor* thisx, PlayState* play) { gKingsChamberDekuGuardEyeClosedTex, gKingsChamberDekuGuardEyeHalfTex, }; - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 4cf7090203..cc00a3aab3 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnDodongo*)thisx) - void EnDodongo_Init(Actor* thisx, PlayState* play); void EnDodongo_Destroy(Actor* thisx, PlayState* play); void EnDodongo_Update(Actor* thisx, PlayState* play2); @@ -295,7 +293,7 @@ void EnDodongo_Init(Actor* thisx, PlayState* play) { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, }; - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -346,7 +344,7 @@ void EnDodongo_Init(Actor* thisx, PlayState* play) { } void EnDodongo_Destroy(Actor* thisx, PlayState* play) { - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; Effect_Destroy(play, this->unk_338); Collider_DestroyJntSph(play, &this->collider2); @@ -1036,7 +1034,7 @@ void EnDodongo_UpdateDamage(EnDodongo* this, PlayState* play) { void EnDodongo_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; EnDodongo_UpdateDamage(this, play); this->actionFunc(this, play); @@ -1075,7 +1073,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play2) { } s32 EnDodongo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; if (limbIndex == OBJECT_DODONGO_LIMB_01) { pos->z += 1000.0f; @@ -1124,7 +1122,7 @@ static s8 sLimbToBodyParts[OBJECT_DODONGO_LIMB_MAX] = { }; void EnDodongo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; Collider_UpdateSpheres(limbIndex, &this->collider1); Collider_UpdateSpheres(limbIndex, &this->collider2); @@ -1150,7 +1148,7 @@ void EnDodongo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnDodongo_Draw(Actor* thisx, PlayState* play) { - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDodongo_OverrideLimbDraw, diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index e6a14247b4..1b506d6ee3 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -27,8 +27,6 @@ #define DOOR_AJAR_SLAM_RANGE 120.0f #define DOOR_AJAR_OPEN_RANGE (2 * DOOR_AJAR_SLAM_RANGE) -#define THIS ((EnDoor*)thisx) - void EnDoor_Init(Actor* thisx, PlayState* play2); void EnDoor_Destroy(Actor* thisx, PlayState* play); void EnDoor_Update(Actor* thisx, PlayState* play); @@ -329,7 +327,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; s32 objectSlot; EnDoorInfo* objectInfo = &sObjectInfo[0]; - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; s32 i; Actor_ProcessInitChain(&this->knobDoor.dyna.actor, sInitChain); @@ -632,14 +630,14 @@ void EnDoor_Open(EnDoor* this, PlayState* play) { } void EnDoor_Update(Actor* thisx, PlayState* play) { - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; this->actionFunc(this, play); } s32 EnDoor_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { TransitionActorEntry* transitionEntry; - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; if (limbIndex == DOOR_LIMB_4) { Gfx** sideDLists = sDoorDLists[this->knobDoor.dlIndex]; @@ -671,7 +669,7 @@ s32 EnDoor_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnDoor_Draw(Actor* thisx, PlayState* play) { - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; // Ensure the object that will be used is loaded if (this->knobDoor.dyna.actor.objectSlot == this->knobDoor.objectSlot) { diff --git a/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c b/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c index b39cda3cbf..b582f05d1d 100644 --- a/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c +++ b/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnDoorEtc*)thisx) - void EnDoorEtc_Init(Actor* thisx, PlayState* play2); void EnDoorEtc_Destroy(Actor* thisx, PlayState* play); void EnDoorEtc_Update(Actor* thisx, PlayState* play); @@ -90,7 +88,7 @@ void EnDoorEtc_Init(Actor* thisx, PlayState* play2) { s32 objectSlot; EnDoorEtcInfo* objectInfo = sObjectInfo; s32 i; - EnDoorEtc* this = THIS; + EnDoorEtc* this = (EnDoorEtc*)thisx; Actor_ProcessInitChain(&this->knobDoor.dyna.actor, sInitChain); Actor_SetScale(&this->knobDoor.dyna.actor, 0.01f); @@ -122,7 +120,7 @@ void EnDoorEtc_Init(Actor* thisx, PlayState* play2) { } void EnDoorEtc_Destroy(Actor* thisx, PlayState* play) { - EnDoorEtc* this = THIS; + EnDoorEtc* this = (EnDoorEtc*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -226,7 +224,7 @@ void func_80AC2354(EnDoorEtc* this, PlayState* play) { void EnDoorEtc_Update(Actor* thisx, PlayState* play) { s32 pad; - EnDoorEtc* this = THIS; + EnDoorEtc* this = (EnDoorEtc*)thisx; this->actionFunc(this, play); if (this->unk_1F4 & 1) { @@ -236,7 +234,7 @@ void EnDoorEtc_Update(Actor* thisx, PlayState* play) { } void EnDoorEtc_Draw(Actor* thisx, PlayState* play) { - EnDoorEtc* this = THIS; + EnDoorEtc* this = (EnDoorEtc*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c index 02fdd14295..19bc208a91 100644 --- a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c +++ b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnDragon*)thisx) - void EnDragon_Init(Actor* thisx, PlayState* play); void EnDragon_Destroy(Actor* thisx, PlayState* play); void EnDragon_Update(Actor* thisx, PlayState* play); @@ -201,7 +199,7 @@ static ColliderJntSphInit sJntSphInit = { }; void EnDragon_Init(Actor* thisx, PlayState* play) { - EnDragon* this = THIS; + EnDragon* this = (EnDragon*)thisx; SkelAnime_InitFlex(play, &this->skelAnime, &gDeepPythonSkel, &gDeepPythonSmallSideSwayAnim, this->jointTable, this->morphTable, DEEP_PYTHON_LIMB_MAX); @@ -244,7 +242,7 @@ void EnDragon_Init(Actor* thisx, PlayState* play) { } void EnDragon_Destroy(Actor* thisx, PlayState* play) { - EnDragon* this = THIS; + EnDragon* this = (EnDragon*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -772,7 +770,7 @@ void EnDragon_UpdateDamage(EnDragon* this, PlayState* play) { void EnDragon_Update(Actor* thisx, PlayState* play) { s32 pad; - EnDragon* this = THIS; + EnDragon* this = (EnDragon*)thisx; if (this->retreatTimer != 0) { this->retreatTimer--; @@ -810,7 +808,7 @@ void EnDragon_Update(Actor* thisx, PlayState* play) { } s32 EnDragon_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDragon* this = THIS; + EnDragon* this = (EnDragon*)thisx; if (limbIndex == DEEP_PYTHON_LIMB_JAW) { rot->x += this->jawXRotation; @@ -822,7 +820,7 @@ s32 EnDragon_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void EnDragon_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDragon* this = THIS; + EnDragon* this = (EnDragon*)thisx; Vec3f playerGrabOffsetFromJawPos = { 350.0f, -120.0f, -60.0f }; if (limbIndex == DEEP_PYTHON_LIMB_JAW) { @@ -841,7 +839,7 @@ void EnDragon_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void EnDragon_Draw(Actor* thisx, PlayState* play) { - EnDragon* this = THIS; + EnDragon* this = (EnDragon*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Drs/z_en_drs.c b/src/overlays/actors/ovl_En_Drs/z_en_drs.c index 605a6899df..0c04e30169 100644 --- a/src/overlays/actors/ovl_En_Drs/z_en_drs.c +++ b/src/overlays/actors/ovl_En_Drs/z_en_drs.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnDrs*)thisx) - void EnDrs_Init(Actor* thisx, PlayState* play); void EnDrs_Destroy(Actor* thisx, PlayState* play); void EnDrs_Update(Actor* thisx, PlayState* play); @@ -85,20 +83,20 @@ void EnDrs_Idle(EnDrs* this, PlayState* play) { } void EnDrs_Init(Actor* thisx, PlayState* play) { - EnDrs* this = THIS; + EnDrs* this = (EnDrs*)thisx; this->moonMaskObjectSlot = SubS_GetObjectSlot(OBJECT_MSMO, play); this->actionFunc = EnDrs_Setup; } void EnDrs_Destroy(Actor* thisx, PlayState* play) { - EnDrs* this = THIS; + EnDrs* this = (EnDrs*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnDrs_Update(Actor* thisx, PlayState* play) { - EnDrs* this = THIS; + EnDrs* this = (EnDrs*)thisx; this->actionFunc(this, play); if (this->actor.draw != NULL) { @@ -108,7 +106,7 @@ void EnDrs_Update(Actor* thisx, PlayState* play) { } void EnDrs_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDrs* this = THIS; + EnDrs* this = (EnDrs*)thisx; PlayState* play = play2; s8 temp = this->moonMaskObjectSlot; s8 temp2 = this->actor.objectSlot; @@ -128,7 +126,7 @@ void EnDrs_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot } void EnDrs_Draw(Actor* thisx, PlayState* play) { - EnDrs* this = THIS; + EnDrs* this = (EnDrs*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c b/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c index ab0713cd68..0b120c3ee7 100644 --- a/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c +++ b/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnDs2n*)thisx) - void EnDs2n_Init(Actor* thisx, PlayState* play); void EnDs2n_Destroy(Actor* thisx, PlayState* play); void EnDs2n_Update(Actor* thisx, PlayState* play); @@ -68,7 +66,7 @@ void EnDs2n_UpdateEyes(EnDs2n* this) { } void EnDs2n_Init(Actor* thisx, PlayState* play) { - EnDs2n* this = THIS; + EnDs2n* this = (EnDs2n*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gDs2nSkel, &gDs2nIdleAnim, NULL, NULL, 0); @@ -76,13 +74,13 @@ void EnDs2n_Init(Actor* thisx, PlayState* play) { } void EnDs2n_Destroy(Actor* thisx, PlayState* play) { - EnDs2n* this = THIS; + EnDs2n* this = (EnDs2n*)thisx; SkelAnime_Free(&this->skelAnime, play); } void EnDs2n_Update(Actor* thisx, PlayState* play) { - EnDs2n* this = THIS; + EnDs2n* this = (EnDs2n*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -93,7 +91,7 @@ void EnDs2n_Update(Actor* thisx, PlayState* play) { } s32 EnDs2n_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDs2n* this = THIS; + EnDs2n* this = (EnDs2n*)thisx; if (limbIndex == DS2N_LIMB_HEAD) { Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY); @@ -103,7 +101,7 @@ s32 EnDs2n_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnDs2n_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnDs2n* this = THIS; + EnDs2n* this = (EnDs2n*)thisx; Vec3f focusOffset = { 0.0f, 0.0f, 0.0f }; if ((limbIndex == DS2N_LIMB_HIPS) || (limbIndex == DS2N_LIMB_LEFT_UPPER_ARM) || @@ -120,7 +118,7 @@ void EnDs2n_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot static TexturePtr sEyeTextures[] = { gDs2nEyeOpenTex, gDs2nEyeHalfTex, gDs2nEyeClosedTex }; void EnDs2n_Draw(Actor* thisx, PlayState* play) { - EnDs2n* this = THIS; + EnDs2n* this = (EnDs2n*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dt/z_en_dt.c b/src/overlays/actors/ovl_En_Dt/z_en_dt.c index 719235a204..705d791ed2 100644 --- a/src/overlays/actors/ovl_En_Dt/z_en_dt.c +++ b/src/overlays/actors/ovl_En_Dt/z_en_dt.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnDt*)thisx) - void EnDt_Init(Actor* thisx, PlayState* play); void EnDt_Destroy(Actor* thisx, PlayState* play); void EnDt_Update(Actor* thisx, PlayState* play); @@ -234,7 +232,7 @@ static TexturePtr sEyebrowTextures[] = { }; void EnDt_Init(Actor* thisx, PlayState* play) { - EnDt* this = THIS; + EnDt* this = (EnDt*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); @@ -260,7 +258,7 @@ void EnDt_Init(Actor* thisx, PlayState* play) { } void EnDt_Destroy(Actor* thisx, PlayState* play) { - EnDt* this = THIS; + EnDt* this = (EnDt*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -773,7 +771,7 @@ void EnDt_TriggerFinalNightTalkEvent(EnDt* this, PlayState* play) { void EnDt_Update(Actor* thisx, PlayState* play) { s32 pad; - EnDt* this = THIS; + EnDt* this = (EnDt*)thisx; SkelAnime_Update(&this->skelAnime); Actor_SetScale(&this->actor, 0.01f); @@ -817,7 +815,7 @@ void EnDt_Update(Actor* thisx, PlayState* play) { } s32 EnDt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnDt* this = THIS; + EnDt* this = (EnDt*)thisx; if (limbIndex == OBJECT_DT_LIMB_0C) { rot->y += -1 * this->headRotValue.y; @@ -827,7 +825,7 @@ s32 EnDt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnDt_Draw(Actor* thisx, PlayState* play) { - EnDt* this = THIS; + EnDt* this = (EnDt*)thisx; s32 eyebrowIndex = 0; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index c0c688260a..03602dce3b 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnDyExtra*)thisx) - void EnDyExtra_Init(Actor* thisx, PlayState* play); void EnDyExtra_Destroy(Actor* thisx, PlayState* play); void EnDyExtra_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ void EnDyExtra_Destroy(Actor* thisx, PlayState* play) { } void EnDyExtra_Init(Actor* thisx, PlayState* play) { - EnDyExtra* this = THIS; + EnDyExtra* this = (EnDyExtra*)thisx; this->type = this->actor.params; this->actor.scale.x = 0.025f; @@ -77,7 +75,7 @@ void EnDyExtra_Fall(EnDyExtra* this, PlayState* play) { } void EnDyExtra_Update(Actor* thisx, PlayState* play) { - EnDyExtra* this = THIS; + EnDyExtra* this = (EnDyExtra*)thisx; DECR(this->timer); Actor_PlaySfx(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG); @@ -100,7 +98,7 @@ static u8 sAlphaTypeIndices[] = { void EnDyExtra_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnDyExtra* this = THIS; + EnDyExtra* this = (EnDyExtra*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; Vtx* vertices = Lib_SegmentedToVirtual(gGreatFairySpiralBeamVtx); s32 i; diff --git a/src/overlays/actors/ovl_En_Egblock/z_en_egblock.c b/src/overlays/actors/ovl_En_Egblock/z_en_egblock.c index 14c3feee43..73e0e3a1fd 100644 --- a/src/overlays/actors/ovl_En_Egblock/z_en_egblock.c +++ b/src/overlays/actors/ovl_En_Egblock/z_en_egblock.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnEgblock*)thisx) - typedef enum { /* 0 */ EGBLOCK_EFFECT_DEBRIS_SOLID, /* 1 */ EGBLOCK_EFFECT_DEBRIS_FLAT @@ -42,7 +40,7 @@ ActorProfile En_Egblock_Profile = { }; void EnEgblock_Init(Actor* thisx, PlayState* play) { - EnEgblock* this = THIS; + EnEgblock* this = (EnEgblock*)thisx; CollisionHeader* colHeader = NULL; s32 pad; @@ -64,7 +62,7 @@ void EnEgblock_Init(Actor* thisx, PlayState* play) { } void EnEgblock_Destroy(Actor* thisx, PlayState* play) { - EnEgblock* this = THIS; + EnEgblock* this = (EnEgblock*)thisx; if (this->dyna.actor.colChkInfo.health == 1) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -97,7 +95,7 @@ void EnEgblock_DoNothing(EnEgblock* this, PlayState* play) { } void EnEgblock_Update(Actor* thisx, PlayState* play) { - EnEgblock* this = THIS; + EnEgblock* this = (EnEgblock*)thisx; this->actionFunc(this, play); @@ -108,7 +106,7 @@ void EnEgblock_Update(Actor* thisx, PlayState* play) { void EnEgblock_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnEgblock* this = THIS; + EnEgblock* this = (EnEgblock*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Egol/z_en_egol.c b/src/overlays/actors/ovl_En_Egol/z_en_egol.c index f500df4d14..b817759bd5 100644 --- a/src/overlays/actors/ovl_En_Egol/z_en_egol.c +++ b/src/overlays/actors/ovl_En_Egol/z_en_egol.c @@ -19,8 +19,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnEgol*)thisx) - typedef enum { /* 0 */ EYEGORE_ACTION_WAIT, /* 1 */ EYEGORE_ACTION_STAND, @@ -438,7 +436,7 @@ void EnEgol_GetWaypoint(EnEgol* this) { element.dim.modelSphere.center.z = centerZ void EnEgol_Init(Actor* thisx, PlayState* play) { - EnEgol* this = THIS; + EnEgol* this = (EnEgol*)thisx; this->actor.gravity = -2.0f; Actor_SetScale(&this->actor, 0.015f); @@ -498,7 +496,7 @@ void EnEgol_Init(Actor* thisx, PlayState* play) { } void EnEgol_Destroy(Actor* thisx, PlayState* play) { - EnEgol* this = THIS; + EnEgol* this = (EnEgol*)thisx; Collider_DestroyJntSph(play, &this->bodyCollider); Collider_DestroyJntSph(play, &this->eyeCollider); @@ -1213,7 +1211,7 @@ void EnEgol_CollisionCheck(EnEgol* this, PlayState* play) { } void EnEgol_Update(Actor* thisx, PlayState* play) { - EnEgol* this = THIS; + EnEgol* this = (EnEgol*)thisx; Player* player = GET_PLAYER(play); s32 pad; @@ -1341,7 +1339,7 @@ void EnEgol_Update(Actor* thisx, PlayState* play) { } s32 EnEgol_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnEgol* this = THIS; + EnEgol* this = (EnEgol*)thisx; if (limbIndex == EYEGORE_LIMB_HEAD) { rot->z += this->headRot; @@ -1385,7 +1383,7 @@ s32 EnEgol_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnEgol_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnEgol* this = THIS; + EnEgol* this = (EnEgol*)thisx; Vec3f footOffset = { 1000.0f, 0.0f, 0.0f }; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -1477,7 +1475,7 @@ void EnEgol_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot void EnEgol_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnEgol* this = THIS; + EnEgol* this = (EnEgol*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 34eb4b7bf4..21fe445ace 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnElf*)thisx) - void EnElf_Init(Actor* thisx, PlayState* play2); void EnElf_Destroy(Actor* thisx, PlayState* play); void EnElf_Update(Actor* thisx, PlayState* play); @@ -318,7 +316,7 @@ f32 func_8088CD3C(s32 colorFlag) { void EnElf_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; Player* player = GET_PLAYER(play); s32 colorConfig; s32 fairyType; @@ -466,7 +464,7 @@ void EnElf_Init(Actor* thisx, PlayState* play2) { void EnElf_Destroy(Actor* thisx, PlayState* play) { s32 pad; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNodeGlow); LightContext_RemoveLight(play, &play->lightCtx, this->lightNodeNoGlow); @@ -1269,7 +1267,7 @@ void func_8088F5F4(EnElf* this, PlayState* play, s32 sparkleLife) { } void func_8088F9E4(Actor* thisx, PlayState* play) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; s32 bgId; thisx->floorHeight = @@ -1361,7 +1359,7 @@ void func_8088FDCC(EnElf* this) { void func_8088FE64(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; func_8088FA38(this, play); @@ -1455,7 +1453,7 @@ void func_8088FE64(Actor* thisx, PlayState* play2) { void func_8089010C(Actor* thisx, PlayState* play) { s32 pad; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; Player* player = GET_PLAYER(play); u16 temp_v0 = QuestHint_GetTatlTextId(play); @@ -1538,7 +1536,7 @@ void func_8089010C(Actor* thisx, PlayState* play) { } void EnElf_Update(Actor* thisx, PlayState* play) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; this->actionFunc(this, play); @@ -1554,7 +1552,7 @@ s32 EnElf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p Gfx** gfx) { static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; s32 pad; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; Vec3f sp34; f32 scale; @@ -1581,7 +1579,7 @@ s32 EnElf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnElf_Draw(Actor* thisx, PlayState* play) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; Player* player = GET_PLAYER(play); s32 pad; s32 pad2; diff --git a/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c b/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c index 2a044d59a5..715bf31507 100644 --- a/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c +++ b/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED) -#define THIS ((EnElfbub*)thisx) - void EnElfbub_Init(Actor* thisx, PlayState* play); void EnElfbub_Destroy(Actor* thisx, PlayState* play); void EnElfbub_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnElfbub_Init(Actor* thisx, PlayState* play) { - EnElfbub* this = THIS; + EnElfbub* this = (EnElfbub*)thisx; Actor* childActor; if (Flags_GetSwitch(play, ENELFBUB_GET_SWITCH_FLAG(&this->actor))) { @@ -88,7 +86,7 @@ void EnElfbub_Init(Actor* thisx, PlayState* play) { } void EnElfbub_Destroy(Actor* thisx, PlayState* play) { - EnElfbub* this = THIS; + EnElfbub* this = (EnElfbub*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -141,7 +139,7 @@ void EnElfbub_Idle(EnElfbub* this, PlayState* play) { } void EnElfbub_Update(Actor* thisx, PlayState* play) { - EnElfbub* this = THIS; + EnElfbub* this = (EnElfbub*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); this->actionFunc(this, play); @@ -150,7 +148,7 @@ void EnElfbub_Update(Actor* thisx, PlayState* play) { void EnElfbub_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnElfbub* this = THIS; + EnElfbub* this = (EnElfbub*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c b/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c index 9fe6291ace..b8ec8f9c38 100644 --- a/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c +++ b/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c @@ -36,8 +36,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnElfgrp*)thisx) - //! TODO: this file require macros for its uses of weekEventReg void EnElfgrp_Init(Actor* thisx, PlayState* play); @@ -99,7 +97,7 @@ void EnElfgrp_SetCutscene(EnElfgrp* this, s32 numCutscenes) { void EnElfgrp_Init(Actor* thisx, PlayState* play) { s32 pad; - EnElfgrp* this = THIS; + EnElfgrp* this = (EnElfgrp*)thisx; s32 numberInFountain; this->type = ENELFGRP_GET_TYPE(&this->actor); @@ -642,7 +640,7 @@ void func_80A3A8F8(EnElfgrp* this, PlayState* play) { } void EnElfgrp_Update(Actor* thisx, PlayState* play) { - EnElfgrp* this = THIS; + EnElfgrp* this = (EnElfgrp*)thisx; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c index 25992b7ba5..068b01174b 100644 --- a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c +++ b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnElforg*)thisx) - void EnElforg_Init(Actor* thisx, PlayState* play); void EnElforg_Destroy(Actor* thisx, PlayState* play); void EnElforg_Update(Actor* thisx, PlayState* play); @@ -67,7 +65,7 @@ void EnElforg_InitializeParams(EnElforg* this) { void EnElforg_Init(Actor* thisx, PlayState* play) { s32 pad; - EnElforg* this = THIS; + EnElforg* this = (EnElforg*)thisx; Actor_SetScale(thisx, 0.01f); this->strayFairyFlags = 0; @@ -155,7 +153,7 @@ void EnElforg_Init(Actor* thisx, PlayState* play) { } void EnElforg_Destroy(Actor* thisx, PlayState* play) { - EnElforg* this = THIS; + EnElforg* this = (EnElforg*)thisx; if (STRAY_FAIRY_TYPE(&this->actor) == STRAY_FAIRY_TYPE_COLLIDER) { Collider_DestroyCylinder(play, &this->collider); @@ -593,7 +591,7 @@ void EnElforg_HiddenByCollider(EnElforg* this, PlayState* play) { } void EnElforg_Update(Actor* thisx, PlayState* play) { - EnElforg* this = THIS; + EnElforg* this = (EnElforg*)thisx; this->actionFunc(this, play); @@ -617,7 +615,7 @@ void EnElforg_Update(Actor* thisx, PlayState* play) { s32 EnElforg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnElforg* this = THIS; + EnElforg* this = (EnElforg*)thisx; if (this->direction < 0) { if (limbIndex == STRAY_FAIRY_LIMB_LEFT_FACING_HEAD) { @@ -632,7 +630,7 @@ s32 EnElforg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f void EnElforg_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnElforg* this = THIS; + EnElforg* this = (EnElforg*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index f38c341481..596cc983d6 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_100000 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnEncount1*)thisx) - void EnEncount1_Init(Actor* thisx, PlayState* play); void EnEncount1_Update(Actor* thisx, PlayState* play); @@ -45,7 +43,7 @@ static s16 sActorParams[] = { }; void EnEncount1_Init(Actor* thisx, PlayState* play) { - EnEncount1* this = THIS; + EnEncount1* this = (EnEncount1*)thisx; if (this->actor.params <= 0) { Actor_Kill(&this->actor); @@ -163,7 +161,7 @@ void EnEncount1_SpawnActor(EnEncount1* this, PlayState* play) { } void EnEncount1_Update(Actor* thisx, PlayState* play) { - EnEncount1* this = THIS; + EnEncount1* this = (EnEncount1*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index a5aa951430..97181f2e87 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnEncount2*)thisx) - void EnEncount2_Init(Actor* thisx, PlayState* play); void EnEncount2_Destroy(Actor* thisx, PlayState* play); void EnEncount2_Update(Actor* thisx, PlayState* play); @@ -101,7 +99,7 @@ static DamageTable sDamageTable = { }; void EnEncount2_Init(Actor* thisx, PlayState* play) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -137,7 +135,7 @@ void EnEncount2_Init(Actor* thisx, PlayState* play) { } void EnEncount2_Destroy(Actor* thisx, PlayState* play) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(play, &this->collider); @@ -188,7 +186,7 @@ void EnEncount2_Die(EnEncount2* this, PlayState* play) { } void EnEncount2_Update(Actor* thisx, PlayState* play) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; s32 pad; DECR(this->deathTimer); @@ -208,7 +206,7 @@ void EnEncount2_Update(Actor* thisx, PlayState* play) { } void EnEncount2_Draw(Actor* thisx, PlayState* play) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; if (this->isPopped != true) { Gfx_DrawDListOpa(play, gMajoraBalloonDL); Gfx_DrawDListOpa(play, gMajoraBalloonKnotDL); diff --git a/src/overlays/actors/ovl_En_Encount3/z_en_encount3.c b/src/overlays/actors/ovl_En_Encount3/z_en_encount3.c index 97b254f9fa..9d89fddc80 100644 --- a/src/overlays/actors/ovl_En_Encount3/z_en_encount3.c +++ b/src/overlays/actors/ovl_En_Encount3/z_en_encount3.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnEncount3*)thisx) - void EnEncount3_Init(Actor* thisx, PlayState* play); void EnEncount3_Destroy(Actor* thisx, PlayState* play); void EnEncount3_Update(Actor* thisx, PlayState* play2); @@ -37,7 +35,7 @@ ActorProfile En_Encount3_Profile = { s32 D_809AD810 = false; void EnEncount3_Init(Actor* thisx, PlayState* play) { - EnEncount3* this = THIS; + EnEncount3* this = (EnEncount3*)thisx; this->unk14A = ENCOUNT3_GET_SPAWN_INDEX(thisx); this->childParams = ENCOUNT3_GET_PARAM_F80(thisx); @@ -109,7 +107,7 @@ void func_809AD1EC(EnEncount3* this, PlayState* play) { } void EnEncount3_Update(Actor* thisx, PlayState* play2) { - EnEncount3* this = THIS; + EnEncount3* this = (EnEncount3*)thisx; f32 new_var; PlayState* play = play2; Player* player = GET_PLAYER(play); @@ -177,7 +175,7 @@ void EnEncount3_Update(Actor* thisx, PlayState* play2) { } void EnEncount3_Draw(Actor* thisx, PlayState* play) { - EnEncount3* this = THIS; + EnEncount3* this = (EnEncount3*)thisx; s32 pad; if (this->unk170 > 0.0f) { diff --git a/src/overlays/actors/ovl_En_Encount4/z_en_encount4.c b/src/overlays/actors/ovl_En_Encount4/z_en_encount4.c index 0289e7b238..948d5d0367 100644 --- a/src/overlays/actors/ovl_En_Encount4/z_en_encount4.c +++ b/src/overlays/actors/ovl_En_Encount4/z_en_encount4.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnEncount4*)thisx) - void EnEncount4_Init(Actor* thisx, PlayState* play); void EnEncount4_Destroy(Actor* thisx, PlayState* play); void EnEncount4_Update(Actor* thisx, PlayState* play); @@ -41,7 +39,7 @@ f32 D_809C46DC[] = { void EnEncount4_Init(Actor* thisx, PlayState* play) { s32 pad; - EnEncount4* this = THIS; + EnEncount4* this = (EnEncount4*)thisx; this->unk_148 = ENCOUNT4_GET_F000(thisx); this->switchFlag = ENCOUNT4_GET_SWITCH_FLAG(thisx); @@ -206,7 +204,7 @@ void func_809C464C(EnEncount4* this, PlayState* play) { } void EnEncount4_Update(Actor* thisx, PlayState* play) { - EnEncount4* this = THIS; + EnEncount4* this = (EnEncount4*)thisx; DECR(this->timer); this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Ending_Hero/z_en_ending_hero.c b/src/overlays/actors/ovl_En_Ending_Hero/z_en_ending_hero.c index a71aaab08d..d73f58eb9d 100644 --- a/src/overlays/actors/ovl_En_Ending_Hero/z_en_ending_hero.c +++ b/src/overlays/actors/ovl_En_Ending_Hero/z_en_ending_hero.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnEndingHero*)thisx) - void EnEndingHero_Init(Actor* thisx, PlayState* play); void EnEndingHero_Destroy(Actor* thisx, PlayState* play); void EnEndingHero_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile En_Ending_Hero_Profile = { }; void EnEndingHero_Init(Actor* thisx, PlayState* play) { - EnEndingHero* this = THIS; + EnEndingHero* this = (EnEndingHero*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); @@ -56,7 +54,7 @@ void EnEndingHero1_Idle(EnEndingHero* this, PlayState* play) { } void EnEndingHero_Update(Actor* thisx, PlayState* play) { - EnEndingHero* this = THIS; + EnEndingHero* this = (EnEndingHero*)thisx; if (this->unk240 == 0) { this->unk242++; @@ -82,7 +80,7 @@ static TexturePtr sEyebrowTextures[] = { }; void EnEndingHero_Draw(Actor* thisx, PlayState* play) { - EnEndingHero* this = THIS; + EnEndingHero* this = (EnEndingHero*)thisx; s32 index = 0; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ending_Hero2/z_en_ending_hero2.c b/src/overlays/actors/ovl_En_Ending_Hero2/z_en_ending_hero2.c index e8747718ee..b644a9dd82 100644 --- a/src/overlays/actors/ovl_En_Ending_Hero2/z_en_ending_hero2.c +++ b/src/overlays/actors/ovl_En_Ending_Hero2/z_en_ending_hero2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnEndingHero2*)thisx) - void EnEndingHero2_Init(Actor* thisx, PlayState* play); void EnEndingHero2_Destroy(Actor* thisx, PlayState* play); void EnEndingHero2_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile En_Ending_Hero2_Profile = { }; void EnEndingHero2_Init(Actor* thisx, PlayState* play) { - EnEndingHero2* this = THIS; + EnEndingHero2* this = (EnEndingHero2*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); @@ -56,7 +54,7 @@ void EnEndingHero2_Idle(EnEndingHero2* this, PlayState* play) { } void EnEndingHero2_Update(Actor* thisx, PlayState* play) { - EnEndingHero2* this = THIS; + EnEndingHero2* this = (EnEndingHero2*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -66,7 +64,7 @@ void EnEndingHero2_Update(Actor* thisx, PlayState* play) { } void EnEndingHero2_Draw(Actor* thisx, PlayState* play) { - EnEndingHero2* this = THIS; + EnEndingHero2* this = (EnEndingHero2*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c b/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c index 89b2ea001d..eaffd6b2ba 100644 --- a/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c +++ b/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnEndingHero3*)thisx) - void EnEndingHero3_Init(Actor* thisx, PlayState* play); void EnEndingHero3_Destroy(Actor* thisx, PlayState* play); void EnEndingHero3_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile En_Ending_Hero3_Profile = { }; void EnEndingHero3_Init(Actor* thisx, PlayState* play) { - EnEndingHero3* this = THIS; + EnEndingHero3* this = (EnEndingHero3*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); @@ -56,7 +54,7 @@ void EnEndingHero3_Idle(EnEndingHero3* this, PlayState* play) { } void EnEndingHero3_Update(Actor* thisx, PlayState* play) { - EnEndingHero3* this = THIS; + EnEndingHero3* this = (EnEndingHero3*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -66,7 +64,7 @@ void EnEndingHero3_Update(Actor* thisx, PlayState* play) { } void EnEndingHero3_Draw(Actor* thisx, PlayState* play) { - EnEndingHero3* this = THIS; + EnEndingHero3* this = (EnEndingHero3*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ending_Hero4/z_en_ending_hero4.c b/src/overlays/actors/ovl_En_Ending_Hero4/z_en_ending_hero4.c index eead92799a..b81afc5405 100644 --- a/src/overlays/actors/ovl_En_Ending_Hero4/z_en_ending_hero4.c +++ b/src/overlays/actors/ovl_En_Ending_Hero4/z_en_ending_hero4.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnEndingHero4*)thisx) - void EnEndingHero4_Init(Actor* thisx, PlayState* play); void EnEndingHero4_Destroy(Actor* thisx, PlayState* play); void EnEndingHero4_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile En_Ending_Hero4_Profile = { }; void EnEndingHero4_Init(Actor* thisx, PlayState* play) { - EnEndingHero4* this = THIS; + EnEndingHero4* this = (EnEndingHero4*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); @@ -56,7 +54,7 @@ void EnEndingHero4_Idle(EnEndingHero4* this, PlayState* play) { } void EnEndingHero4_Update(Actor* thisx, PlayState* play) { - EnEndingHero4* this = THIS; + EnEndingHero4* this = (EnEndingHero4*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -66,7 +64,7 @@ void EnEndingHero4_Update(Actor* thisx, PlayState* play) { } void EnEndingHero4_Draw(Actor* thisx, PlayState* play) { - EnEndingHero4* this = THIS; + EnEndingHero4* this = (EnEndingHero4*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ending_Hero5/z_en_ending_hero5.c b/src/overlays/actors/ovl_En_Ending_Hero5/z_en_ending_hero5.c index 533bb872a8..52b3455f63 100644 --- a/src/overlays/actors/ovl_En_Ending_Hero5/z_en_ending_hero5.c +++ b/src/overlays/actors/ovl_En_Ending_Hero5/z_en_ending_hero5.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnEndingHero5*)thisx) - void EnEndingHero5_Init(Actor* thisx, PlayState* play); void EnEndingHero5_Destroy(Actor* thisx, PlayState* play); void EnEndingHero5_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile En_Ending_Hero5_Profile = { }; void EnEndingHero5_Init(Actor* thisx, PlayState* play) { - EnEndingHero5* this = THIS; + EnEndingHero5* this = (EnEndingHero5*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); @@ -57,7 +55,7 @@ void EnEndingHero5_Idle(EnEndingHero5* this, PlayState* play) { } void EnEndingHero5_Update(Actor* thisx, PlayState* play) { - EnEndingHero5* this = THIS; + EnEndingHero5* this = (EnEndingHero5*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -70,7 +68,7 @@ Gfx* D_80C23BF0[] = { object_daiku_DL_0070C0, object_daiku_DL_006FB0, object_dai object_daiku_DL_00A390 }; void EnEndingHero5_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnEndingHero5* this = THIS; + EnEndingHero5* this = (EnEndingHero5*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -82,7 +80,7 @@ void EnEndingHero5_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnEndingHero5_Draw(Actor* thisx, PlayState* play) { - EnEndingHero5* this = THIS; + EnEndingHero5* this = (EnEndingHero5*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ending_Hero6/z_en_ending_hero6.c b/src/overlays/actors/ovl_En_Ending_Hero6/z_en_ending_hero6.c index dfe38c8c79..26eb2822cc 100644 --- a/src/overlays/actors/ovl_En_Ending_Hero6/z_en_ending_hero6.c +++ b/src/overlays/actors/ovl_En_Ending_Hero6/z_en_ending_hero6.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnEndingHero6*)thisx) - void EnEndingHero6_Init(Actor* thisx, PlayState* play); void EnEndingHero6_Destroy(Actor* thisx, PlayState* play); void EnEndingHero6_Update(Actor* thisx, PlayState* play); @@ -80,7 +78,7 @@ static s32 sLimbCounts[ENDING_HERO6_TYPE_MAX] = { }; void EnEndingHero6_Init(Actor* thisx, PlayState* play) { - EnEndingHero6* this = THIS; + EnEndingHero6* this = (EnEndingHero6*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); @@ -113,7 +111,7 @@ void EnEndingHero6_Idle(EnEndingHero6* this, PlayState* play) { } void EnEndingHero6_Update(Actor* thisx, PlayState* play) { - EnEndingHero6* this = THIS; + EnEndingHero6* this = (EnEndingHero6*)thisx; if (this->timer != 0) { this->timer--; @@ -144,7 +142,7 @@ void EnEndingHero6_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec object_daiku_DL_006D70, // ENDING_HERO6_TYPE_DAIKU_PURPLE object_daiku_DL_00A390, // ENDING_HERO6_TYPE_DAIKU_ORANGE }; - EnEndingHero6* this = THIS; + EnEndingHero6* this = (EnEndingHero6*)thisx; s32 daikuIndex; OPEN_DISPS(play->state.gfxCtx); @@ -162,7 +160,7 @@ void EnEndingHero6_Draw(Actor* thisx, PlayState* play) { gDotourEyeLookDownTex, gDotourEyeSquintTex }; static TexturePtr sEyebrowTextures[] = { gDotourEyebrowHighTex, gDotourEyebrowMidTex, gDotourEyebrowLowTex }; s32 pad; - EnEndingHero6* this = THIS; + EnEndingHero6* this = (EnEndingHero6*)thisx; s32 index = 0; if (this->isIdle == true) { diff --git a/src/overlays/actors/ovl_En_Estone/z_en_estone.c b/src/overlays/actors/ovl_En_Estone/z_en_estone.c index 050470c027..665695e7ee 100644 --- a/src/overlays/actors/ovl_En_Estone/z_en_estone.c +++ b/src/overlays/actors/ovl_En_Estone/z_en_estone.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnEstone*)thisx) - void EnEstone_Init(Actor* thisx, PlayState* play); void EnEstone_Destroy(Actor* thisx, PlayState* play); void EnEstone_Update(Actor* thisx, PlayState* play2); @@ -56,7 +54,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnEstone_Init(Actor* thisx, PlayState* play) { - EnEstone* this = THIS; + EnEstone* this = (EnEstone*)thisx; Vec3f accel; Vec3f velocity; f32 scale; @@ -106,7 +104,7 @@ void EnEstone_Init(Actor* thisx, PlayState* play) { } void EnEstone_Destroy(Actor* thisx, PlayState* play) { - EnEstone* this = THIS; + EnEstone* this = (EnEstone*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -162,7 +160,7 @@ void EnEstone_Inactive(EnEstone* this, PlayState* play) { void EnEstone_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnEstone* this = THIS; + EnEstone* this = (EnEstone*)thisx; DECR(this->timer); @@ -187,7 +185,7 @@ void EnEstone_Update(Actor* thisx, PlayState* play2) { void EnEstone_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnEstone* this = THIS; + EnEstone* this = (EnEstone*)thisx; if (this->inactive != true) { Matrix_Push(); diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index 88bd3c3503..f19f9ffa03 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -24,8 +24,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnFall*)thisx) - #define FLAG_FIRE_BALL_INTENSIFIES (1 << 0) #define FLAG_FIRE_RING_APPEARS (1 << 1) @@ -131,7 +129,7 @@ void EnFall_RisingDebris_ResetEffects(EnFall* this) { } void EnFall_Init(Actor* thisx, PlayState* play) { - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; s32 objectSlot; this->eyeGlowIntensity = 0.0f; @@ -556,7 +554,7 @@ void EnFall_MoonsTear_Fall(EnFall* this, PlayState* play) { } void EnFall_Update(Actor* thisx, PlayState* play) { - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; this->actionFunc(this, play); } @@ -595,7 +593,7 @@ void EnFall_Fireball_SetPerVertexAlpha(f32 fireballAlpha) { } void EnFall_Fireball_Update(Actor* thisx, PlayState* play) { - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 0) && (play->csCtx.scriptIndex == 2)) { play->skyboxCtx.rot.y -= 0.05f; @@ -703,7 +701,7 @@ s32 EnFall_RisingDebris_InitializeEffect(EnFall* this) { } void EnFall_RisingDebris_Update(Actor* thisx, PlayState* play) { - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_451)) { if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_451) && @@ -720,7 +718,7 @@ void EnFall_RisingDebris_Update(Actor* thisx, PlayState* play) { } void EnFall_FireRing_Update(Actor* thisx, PlayState* play) { - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_450) && play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_450)]->id == 5) { @@ -753,7 +751,7 @@ void EnFall_Moon_Draw(Actor* thisx, PlayState* play) { // This offsets the moon's focus so that the Moon's Tear actually falls // out of its eye when looking at it through the telescope. static Vec3f sFocusOffset[] = { 1800.0f, 1000.0f, 4250.0f }; - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; s32 primColor; OPEN_DISPS(play->state.gfxCtx); @@ -771,7 +769,7 @@ void EnFall_Moon_Draw(Actor* thisx, PlayState* play) { } void EnFall_OpenMouthMoon_Draw(Actor* thisx, PlayState* play) { - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; s32 primColor; OPEN_DISPS(play->state.gfxCtx); @@ -789,7 +787,7 @@ void EnFall_OpenMouthMoon_Draw(Actor* thisx, PlayState* play) { void EnFall_LodMoon_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; s32 primColor; OPEN_DISPS(play->state.gfxCtx); @@ -842,7 +840,7 @@ void EnFall_LodMoon_DrawWithLerp(Actor* thisx, PlayState* play) { void EnFall_Fireball_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; u32 gameplayFrames = play->gameplayFrames; OPEN_DISPS(play->state.gfxCtx); @@ -880,7 +878,7 @@ void EnFall_Fireball_Draw(Actor* thisx, PlayState* play) { void EnFall_RisingDebris_Draw(Actor* thisx, PlayState* play) { static Gfx* sDebrisModelDLists[] = { gMoonDebrisModel1DL, gMoonDebrisModel2DL, gMoonDebrisModel3DL }; - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; f32 scale = this->scale * 0.06f; s32 i; @@ -906,7 +904,7 @@ void EnFall_RisingDebris_Draw(Actor* thisx, PlayState* play) { void EnFall_FireRing_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFall* this = THIS; + EnFall* this = (EnFall*)thisx; if (!(this->fireRingAlpha <= 0.0f)) { if (this->fireRingAlpha > 1.0f) { diff --git a/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c b/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c index 9af703ad74..b198fc3638 100644 --- a/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c +++ b/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnFall2*)thisx) - void EnFall2_Init(Actor* thisx, PlayState* play); void EnFall2_Destroy(Actor* thisx, PlayState* play); void EnFall2_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile En_Fall2_Profile = { }; void EnFall2_Init(Actor* thisx, PlayState* play) { - EnFall2* this = THIS; + EnFall2* this = (EnFall2*)thisx; Actor_SetScale(&this->actor, 1.0f); this->actionFunc = EnFall2_DoNothing; @@ -46,7 +44,7 @@ void EnFall2_Init(Actor* thisx, PlayState* play) { } void EnFall2_Destroy(Actor* thisx, PlayState* play) { - EnFall2* this = THIS; + EnFall2* this = (EnFall2*)thisx; Keyframe_DestroyFlex(&this->kfSkelAnime); } @@ -144,14 +142,14 @@ void EnFall2_HandleCutscene(EnFall2* this, PlayState* play) { } void EnFall2_Update(Actor* thisx, PlayState* play) { - EnFall2* this = THIS; + EnFall2* this = (EnFall2*)thisx; this->actionFunc(this, play); } void EnFall2_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFall2* this = THIS; + EnFall2* this = (EnFall2*)thisx; Mtx* mtxStack; if (!(this->alphaLevel <= 0.0f)) { diff --git a/src/overlays/actors/ovl_En_Famos/z_en_famos.c b/src/overlays/actors/ovl_En_Famos/z_en_famos.c index 5907b69c75..c39489f374 100644 --- a/src/overlays/actors/ovl_En_Famos/z_en_famos.c +++ b/src/overlays/actors/ovl_En_Famos/z_en_famos.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnFamos*)thisx) - void EnFamos_Init(Actor* thisx, PlayState* play); void EnFamos_Destroy(Actor* thisx, PlayState* play); void EnFamos_Update(Actor* thisx, PlayState* play); @@ -157,7 +155,7 @@ static InitChainEntry sInitChain[] = { static s32 sAnimatedMaterialsDesgmented = false; void EnFamos_Init(Actor* thisx, PlayState* play) { - EnFamos* this = THIS; + EnFamos* this = (EnFamos*)thisx; Path* path; s32 i; @@ -202,7 +200,7 @@ void EnFamos_Init(Actor* thisx, PlayState* play) { } void EnFamos_Destroy(Actor* thisx, PlayState* play) { - EnFamos* this = THIS; + EnFamos* this = (EnFamos*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -740,7 +738,7 @@ void EnFamos_UpdateDebrisPosRot(EnFamos* this) { void EnFamos_Update(Actor* thisx, PlayState* play) { s32 pad; - EnFamos* this = THIS; + EnFamos* this = (EnFamos*)thisx; f32 oldHeight; s32 oldHoverTimer; // save old value to test if changed @@ -793,7 +791,7 @@ void EnFamos_Update(Actor* thisx, PlayState* play) { } s32 EnFamos_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFamos* this = THIS; + EnFamos* this = (EnFamos*)thisx; if (limbIndex == FAMOS_LIMB_BODY) { Matrix_Translate(0.0f, 4000.0f, 0.0f, MTXMODE_APPLY); @@ -810,7 +808,7 @@ s32 EnFamos_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnFamos_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnFamos* this = THIS; + EnFamos* this = (EnFamos*)thisx; if (limbIndex == FAMOS_LIMB_EMBLEM) { Matrix_MultZero(&this->actor.focus.pos); @@ -853,7 +851,7 @@ void EnFamos_DrawDebris(EnFamos* this, PlayState* play) { } void EnFamos_Draw(Actor* thisx, PlayState* play) { - EnFamos* this = THIS; + EnFamos* this = (EnFamos*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); if (this->actionFunc != EnFamos_DeathFade) { diff --git a/src/overlays/actors/ovl_En_Fg/z_en_fg.c b/src/overlays/actors/ovl_En_Fg/z_en_fg.c index afd4b66516..f637505d52 100644 --- a/src/overlays/actors/ovl_En_Fg/z_en_fg.c +++ b/src/overlays/actors/ovl_En_Fg/z_en_fg.c @@ -11,8 +11,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | \ ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnFg*)thisx) - void EnFg_Init(Actor* thisx, PlayState* play); void EnFg_Destroy(Actor* thisx, PlayState* play); void EnFg_Update(Actor* thisx, PlayState* play); @@ -342,7 +340,7 @@ void EnFg_Knockback(EnFg* this, PlayState* play) { } void EnFg_Init(Actor* thisx, PlayState* play) { - EnFg* this = THIS; + EnFg* this = (EnFg*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gFrogSkel, NULL, this->jointTable, this->morphTable, FROG_LIMB_MAX); @@ -357,13 +355,13 @@ void EnFg_Init(Actor* thisx, PlayState* play) { } void EnFg_Destroy(Actor* thisx, PlayState* play) { - EnFg* this = THIS; + EnFg* this = (EnFg*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnFg_Update(Actor* thisx, PlayState* play) { - EnFg* this = THIS; + EnFg* this = (EnFg*)thisx; if ((CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED) == 0) && (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_ATTACHED_TO_ARROW) == 0)) { @@ -378,7 +376,7 @@ void EnFg_Update(Actor* thisx, PlayState* play) { } s32 EnFg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFg* this = THIS; + EnFg* this = (EnFg*)thisx; if ((limbIndex == FROG_LIMB_RIGHT_EYE) || (limbIndex == FROG_LIMB_LEFT_EYE)) { *dList = NULL; @@ -393,7 +391,7 @@ s32 EnFg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnFg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnFg* this = THIS; + EnFg* this = (EnFg*)thisx; s16 pad; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -415,7 +413,7 @@ void EnFg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnFg_Draw(Actor* thisx, PlayState* play) { - EnFg* this = THIS; + EnFg* this = (EnFg*)thisx; s32 pad; Color_RGBA8 envColor[] = { { 200, 170, 0, 255 }, // BETAFROG_YELLOW diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index c363a11a3c..6ff2c623dd 100644 --- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnFireRock*)thisx) - void EnFireRock_Init(Actor* thisx, PlayState* play); void EnFireRock_Destroy(Actor* thisx, PlayState* play); void EnFireRock_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index dc86beeece..3bcdc398b6 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -11,8 +11,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnFirefly*)thisx) - void EnFirefly_Init(Actor* thisx, PlayState* play); void EnFirefly_Destroy(Actor* thisx, PlayState* play); void EnFirefly_Update(Actor* thisx, PlayState* play2); @@ -131,7 +129,7 @@ static InitChainEntry sInitChain[] = { }; void EnFirefly_Init(Actor* thisx, PlayState* play) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); @@ -172,7 +170,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) { } void EnFirefly_Destroy(Actor* thisx, PlayState* play) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; Collider_DestroySphere(play, &this->collider); } @@ -674,7 +672,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, PlayState* play) { void EnFirefly_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; @@ -744,7 +742,7 @@ void EnFirefly_Update(Actor* thisx, PlayState* play2) { s32 EnFirefly_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; if (this->isInvisible && (play->actorCtx.lensMaskSize != LENS_MASK_ACTIVE_SIZE)) { *dList = NULL; @@ -767,7 +765,7 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* s16 auraScaleStep; s16 auraLife; s32 pad; - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; if ((this->currentType != KEESE_FIRE) && (limbIndex == FIRE_KEESE_LIMB_HEAD)) { gSPDisplayList((*gfx)++, gKeeseRedEyesDL); @@ -818,7 +816,7 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* void EnFirefly_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Firefly2/z_en_firefly2.c b/src/overlays/actors/ovl_En_Firefly2/z_en_firefly2.c index bd563d600f..51c85aa9b1 100644 --- a/src/overlays/actors/ovl_En_Firefly2/z_en_firefly2.c +++ b/src/overlays/actors/ovl_En_Firefly2/z_en_firefly2.c @@ -10,8 +10,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | \ ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnFirefly2*)thisx) - void EnFirefly2_Init(Actor* thisx, PlayState* play); void EnFirefly2_Destroy(Actor* thisx, PlayState* play); void EnFirefly2_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 5aa1e6b71b..b76c19e199 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnFish*)thisx) - void EnFish_Init(Actor* thisx, PlayState* play); void EnFish_Destroy(Actor* thisx, PlayState* play2); void EnFish_Update(Actor* thisx, PlayState* play); @@ -127,7 +125,7 @@ void func_8091D7C4(EnFish* this) { } void func_8091D840(Actor* thisx, PlayState* play, s32 arg2, f32 arg3) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s32 i; for (i = 0; i < arg2; i++) { @@ -171,7 +169,7 @@ bool func_8091DA14(EnFish* this, PlayState* play) { void EnFish_Init(Actor* thisx, PlayState* play) { s32 pad; - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s16 sp36 = this->actor.params; Collider_InitJntSph(play, &this->collider); @@ -225,7 +223,7 @@ void EnFish_Init(Actor* thisx, PlayState* play) { void EnFish_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -274,7 +272,7 @@ void func_8091DEE4(EnFish* this) { } void func_8091DF68(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; func_8091DD48(this); Math_SmoothStepToF(&thisx->speed, 0.0f, 0.05f, 0.3f, 0.0f); @@ -323,7 +321,7 @@ void func_8091E070(EnFish* this) { void func_8091E128(Actor* thisx, PlayState* play) { s32 pad; - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; func_8091DD48(this); Math_SmoothStepToF(&thisx->speed, 1.8f, 0.08f, 0.4f, 0.0f); @@ -371,7 +369,7 @@ void func_8091E2E0(EnFish* this) { void func_8091E34C(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s32 sp3C = thisx->xzDistToPlayer < 60.0f; s32 sp38 = this->unk_276 > 0; s32 pad; @@ -444,7 +442,7 @@ void func_8091E5EC(EnFish* this) { } void func_8091E658(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; Player* player = GET_PLAYER(play); s32 pad; Vec3f sp38; @@ -499,7 +497,7 @@ void func_8091E810(EnFish* this) { } void func_8091E880(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.1f, 0.1f, 0.0f); this->unk_26E = 0x43; @@ -558,7 +556,7 @@ void func_8091E9A4(EnFish* this) { } void func_8091EAF0(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s32 sp40 = play->state.frames; s16 phi_v1; @@ -616,7 +614,7 @@ void func_8091ECF4(EnFish* this) { } void func_8091ED70(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s32 pad; s16 sp2E; @@ -681,7 +679,7 @@ void func_8091EF30(EnFish* this) { } void func_8091EFE8(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s32 temp_v0_2; Actor* sp3C = func_8091D944(this, play); f32 temp_f0; @@ -784,7 +782,7 @@ void func_8091F344(EnFish* this) { void func_8091F3BC(Actor* thisx, PlayState* play) { static Vec3f D_8091FADC = { 0.0f, 0.04f, 0.09f }; static Vec3f D_8091FAE8 = { 0.5f, 0.1f, 0.15f }; - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s32 sp40 = play->gameplayFrames; Vec3f* sp3C; f32 phi_f0; @@ -829,7 +827,7 @@ void func_8091F3BC(Actor* thisx, PlayState* play) { } void func_8091F5A4(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; Actor* temp_v0_2; s16 temp_v0; s16 temp_v0_4; @@ -893,7 +891,7 @@ void func_8091F5A4(Actor* thisx, PlayState* play) { } void func_8091F830(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; if (this->actor.params == ENFISH_1) { Actor_Kill(&this->actor); @@ -924,7 +922,7 @@ void func_8091F830(Actor* thisx, PlayState* play) { } void EnFish_Update(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; if (this->unk_242 > 0) { this->unk_242--; @@ -942,7 +940,7 @@ void func_8091F994(Actor* thisx, PlayState* play) { } void EnFish_Draw(Actor* thisx, PlayState* play) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; Color_RGB8* colour = &D_8091FA94[this->unk_278]; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c index 9bef353cba..81e4190611 100644 --- a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c +++ b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnFish2*)thisx) - void EnFish2_Init(Actor* thisx, PlayState* play); void EnFish2_Destroy(Actor* thisx, PlayState* play); void EnFish2_Update(Actor* thisx, PlayState* play2); @@ -170,7 +168,7 @@ s32 func_80B28478(EnFish2* this) { } void EnFish2_Init(Actor* thisx, PlayState* play) { - EnFish2* this = THIS; + EnFish2* this = (EnFish2*)thisx; s32 i; s32 csId; @@ -238,7 +236,7 @@ void EnFish2_Init(Actor* thisx, PlayState* play) { } void EnFish2_Destroy(Actor* thisx, PlayState* play) { - EnFish2* this = THIS; + EnFish2* this = (EnFish2*)thisx; if (this->actor.params != 1) { Collider_DestroyJntSph(play, &this->collider); @@ -955,7 +953,7 @@ void EnFish2_Update(Actor* thisx, PlayState* play2) { 0.0f, 40.0f, -40.0f, 0.0f, 0.0f, 0.0f, }; PlayState* play = play2; - EnFish2* this = THIS; + EnFish2* this = (EnFish2*)thisx; if ((this->actionFunc != func_80B295A4) && (this->actor.params != 1)) { SkelAnime_Update(&this->skelAnime); @@ -1058,7 +1056,7 @@ void EnFish2_Update(Actor* thisx, PlayState* play2) { } s32 EnFish2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFish2* this = THIS; + EnFish2* this = (EnFish2*)thisx; if ((limbIndex == OBJECT_FB_LIMB_14) || (limbIndex == OBJECT_FB_LIMB_15)) { *dList = NULL; @@ -1068,7 +1066,7 @@ s32 EnFish2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnFish2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnFish2* this = THIS; + EnFish2* this = (EnFish2*)thisx; s32 pad; if ((limbIndex == OBJECT_FB_LIMB_14) || (limbIndex == OBJECT_FB_LIMB_15)) { @@ -1097,7 +1095,7 @@ void EnFish2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnFish2_Draw(Actor* thisx, PlayState* play) { - EnFish2* this = THIS; + EnFish2* this = (EnFish2*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index e51b7ba20e..bdc8e562e5 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnFishing*)thisx) - #define WATER_SURFACE_Y(play) play->colCtx.colHeader->waterBoxes->minPos.y void EnFishing_Init(Actor* thisx, PlayState* play2); @@ -798,7 +796,7 @@ static InitChainEntry sInitChain[] = { void EnFishing_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; u16 fishCount; Actor_ProcessInitChain(thisx, sInitChain); @@ -985,7 +983,7 @@ void EnFishing_Init(Actor* thisx, PlayState* play2) { void EnFishing_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; SkelAnime_Free(&this->skelAnime, play); @@ -2853,7 +2851,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { s16 spF2; s16 spF0; s16 spEE; - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; PlayState* play = play2; Player* player = GET_PLAYER(play); Input* input = CONTROLLER1(&play->state); @@ -4173,7 +4171,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } s32 EnFishing_BassOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; if (limbIndex == FISHING_BASS_LIMB_JAW) { rot->z -= this->unk_168 - 11000; @@ -4196,7 +4194,7 @@ s32 EnFishing_BassOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, } void EnFishing_BassPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; if (limbIndex == FISHING_BASS_LIMB_JAW) { Matrix_MultVec3f(&sFishMouthOffset, &this->fishMouthPos); @@ -4204,7 +4202,7 @@ void EnFishing_BassPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } s32 EnFishing_LoachOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; if (limbIndex == FISHING_LOACH_LIMB_MIDDLE_SEGMENT) { rot->y += this->unk_1C4[0]; @@ -4219,7 +4217,7 @@ s32 EnFishing_LoachOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, void EnFishing_LoachPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sLoachMouthOffset = { 500.0f, 500.0f, 0.0f }; - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; if (limbIndex == FISHING_LOACH_LIMB_JAW) { Matrix_MultVec3f(&sLoachMouthOffset, &this->fishMouthPos); @@ -4227,7 +4225,7 @@ void EnFishing_LoachPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnFishing_DrawFish(Actor* thisx, PlayState* play) { - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); @@ -5058,7 +5056,7 @@ Vec3s sSinkingLureLocationPos[] = { void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; Vec3f sp114; Vec3f sp108; Vec3f spFC; @@ -5604,7 +5602,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { } s32 EnFishing_OwnerOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; if (limbIndex == FISHING_OWNER_LIMB_HEAD) { rot->x -= this->unk_15C; @@ -5637,7 +5635,7 @@ TexturePtr sFishingOwnerEyeTexs[] = { void EnFishing_DrawOwner(Actor* thisx, PlayState* play) { s32 pad; - EnFishing* this = THIS; + EnFishing* this = (EnFishing*)thisx; Input* input = CONTROLLER1(&play->state); OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index b735b5d9e6..de92b3df02 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnFloormas*)thisx) - void EnFloormas_Init(Actor* thisx, PlayState* play2); void EnFloormas_Destroy(Actor* thisx, PlayState* play); void EnFloormas_Update(Actor* thisx, PlayState* play); @@ -137,7 +135,7 @@ static InitChainEntry sInitChain[] = { void EnFloormas_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; s32 pad; s32 params; @@ -189,7 +187,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { } void EnFloormas_Destroy(Actor* thisx, PlayState* play) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1079,7 +1077,7 @@ void func_808D2E34(EnFloormas* this, PlayState* play) { } void EnFloormas_Update(Actor* thisx, PlayState* play) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; s32 pad; if (this->actionFunc != func_808D2AA8) { @@ -1148,7 +1146,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) { s32 EnFloormas_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; if (limbIndex == WALLMASTER_LIMB_ROOT) { pos->z += this->unk_192; @@ -1186,7 +1184,7 @@ static s8 sLimbToBodyParts[WALLMASTER_LIMB_MAX] = { }; void EnFloormas_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; if (sLimbToBodyParts[limbIndex] != BODYPART_NONE) { Matrix_MultZero(&this->bodyPartsPos[sLimbToBodyParts[limbIndex]]); @@ -1212,7 +1210,7 @@ void EnFloormas_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* static Color_RGBA8 D_808D3958 = { 0, 255, 0, 0 }; void EnFloormas_Draw(Actor* thisx, PlayState* play) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1237,7 +1235,7 @@ void EnFloormas_Draw(Actor* thisx, PlayState* play) { } void func_808D3754(Actor* thisx, PlayState* play) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index d0d240e229..c8c51b675b 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_CAMERA_DRIFT_ENABLED) -#define THIS ((EnFr*)thisx) - void EnFr_Init(Actor* thisx, PlayState* play); void EnFr_Destroy(Actor* thisx, PlayState* play); void EnFr_Update(Actor* thisx, PlayState* play); @@ -28,7 +26,7 @@ ActorProfile En_Fr_Profile = { }; void EnFr_Init(Actor* thisx, PlayState* play) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; if (Flags_GetSwitch(play, ENFR_GET_SWITCH_FLAG(&this->actor))) { Actor_Kill(&this->actor); @@ -42,7 +40,7 @@ void EnFr_Destroy(Actor* thisx, PlayState* play) { } void EnFr_Update(Actor* thisx, PlayState* play) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; if (Flags_GetSwitch(play, ENFR_GET_SWITCH_FLAG(&this->actor))) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c index 1ed3e94c2a..e6c2c570da 100644 --- a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c +++ b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnFsn*)thisx) - #define SI_NONE 0 #define ENFSN_END_CONVERSATION (1 << 0) @@ -1473,7 +1471,7 @@ void EnFsn_Blink(EnFsn* this) { void EnFsn_Init(Actor* thisx, PlayState* play) { s32 pad; - EnFsn* this = THIS; + EnFsn* this = (EnFsn*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gFsnSkel, &gFsnIdleAnim, this->jointTable, this->morphTable, @@ -1502,13 +1500,13 @@ void EnFsn_Init(Actor* thisx, PlayState* play) { } void EnFsn_Destroy(Actor* thisx, PlayState* play) { - EnFsn* this = THIS; + EnFsn* this = (EnFsn*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnFsn_Update(Actor* thisx, PlayState* play) { - EnFsn* this = THIS; + EnFsn* this = (EnFsn*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -1634,7 +1632,7 @@ void EnFsn_DrawStickDirectionPrompts(EnFsn* this, PlayState* play) { } s32 EnFsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFsn* this = THIS; + EnFsn* this = (EnFsn*)thisx; s32 fidgetIndex; if (limbIndex == FSN_LIMB_HEAD) { @@ -1670,7 +1668,7 @@ s32 EnFsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnFsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnFsn* this = THIS; + EnFsn* this = (EnFsn*)thisx; if (limbIndex == FSN_LIMB_HEAD) { this->actor.focus.pos.x = this->actor.world.pos.x; @@ -1689,7 +1687,7 @@ void EnFsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnFsn_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { gFsnEyeOpenTex, gFsnEyeHalfTex, gFsnEyeClosedTex }; s32 pad; - EnFsn* this = THIS; + EnFsn* this = (EnFsn*)thisx; s16 i; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 00ba526e83..61a61437b3 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -15,8 +15,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA | \ ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnFu*)thisx) - void EnFu_Init(Actor* thisx, PlayState* play); void EnFu_Destroy(Actor* thisx, PlayState* play); void EnFu_Update(Actor* thisx, PlayState* play); @@ -200,7 +198,7 @@ void func_809619D0(EnFu* this, PlayState* play) { void EnFu_Init(Actor* thisx, PlayState* play) { s32 pad; - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; Actor* fuKaiten = play->actorCtx.actorLists[ACTORCAT_BG].first; while (fuKaiten != NULL) { @@ -246,7 +244,7 @@ void EnFu_Init(Actor* thisx, PlayState* play) { } void EnFu_Destroy(Actor* thisx, PlayState* play) { - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT); CLEAR_WEEKEVENTREG(WEEKEVENTREG_08_01); @@ -1368,7 +1366,7 @@ void func_809642E0(EnFu* this, PlayState* play) { } void EnFu_Update(Actor* thisx, PlayState* play) { - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; this->actionFunc(this, play); @@ -1383,7 +1381,7 @@ void EnFu_Update(Actor* thisx, PlayState* play) { } s32 EnFu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; if (limbIndex == HONEY_AND_DARLING_LIMB_MAN_HEAD) { Matrix_Translate(1600.0f, 300.0f, 0.0f, MTXMODE_APPLY); @@ -1404,7 +1402,7 @@ s32 EnFu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnFu_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80964C28 = { -2500.0f, 0.0f, 0.0f }; static Vec3f D_80964C34 = { -3500.0f, 0.0f, 0.0f }; - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; if (limbIndex == HONEY_AND_DARLING_LIMB_MAN_HEAD) { Matrix_MultVec3f(&D_80964C28, &this->unk_508); @@ -1415,7 +1413,7 @@ void EnFu_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnFu_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; Matrix_Push(); func_80964950(play, this->unk_2D8, ARRAY_COUNT(this->unk_2D8)); diff --git a/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c b/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c index 6af4c4f0b8..3a6c20fa91 100644 --- a/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c +++ b/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnFuKago*)thisx) - void EnFuKago_Init(Actor* thisx, PlayState* play); void EnFuKago_Destroy(Actor* thisx, PlayState* play); void EnFuKago_Update(Actor* thisx, PlayState* play); @@ -82,7 +80,7 @@ Vec3f D_80AD06C4[] = { void EnFuKago_Init(Actor* thisx, PlayState* play) { s32 pad; - EnFuKago* this = THIS; + EnFuKago* this = (EnFuKago*)thisx; CollisionHeader* sp34 = NULL; Actor* npc = play->actorCtx.actorLists[ACTORCAT_NPC].first; @@ -114,7 +112,7 @@ void EnFuKago_Init(Actor* thisx, PlayState* play) { } void EnFuKago_Destroy(Actor* thisx, PlayState* play) { - EnFuKago* this = THIS; + EnFuKago* this = (EnFuKago*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -347,7 +345,7 @@ void func_80AD0288(EnFuKago* this, PlayState* play) { } void EnFuKago_Update(Actor* thisx, PlayState* play) { - EnFuKago* this = THIS; + EnFuKago* this = (EnFuKago*)thisx; this->actionFunc(this, play); @@ -385,7 +383,7 @@ void func_80AD0340(EnFuKago* this, PlayState* play) { void EnFuKago_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFuKago* this = THIS; + EnFuKago* this = (EnFuKago*)thisx; if (this->unk_33A == 0) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c index a2dff6428a..1d5217c2e0 100644 --- a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c +++ b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnFuMato*)thisx) - void EnFuMato_Init(Actor* thisx, PlayState* play); void EnFuMato_Destroy(Actor* thisx, PlayState* play); void EnFuMato_Update(Actor* thisx, PlayState* play); @@ -70,7 +68,7 @@ Vec2f D_80ACF654[] = { void EnFuMato_Init(Actor* thisx, PlayState* play) { s32 pad; - EnFuMato* this = THIS; + EnFuMato* this = (EnFuMato*)thisx; CollisionHeader* sp2C = NULL; Actor* actor = play->actorCtx.actorLists[ACTORCAT_NPC].first; EnFu* fu; @@ -113,7 +111,7 @@ void EnFuMato_Init(Actor* thisx, PlayState* play) { } void EnFuMato_Destroy(Actor* thisx, PlayState* play) { - EnFuMato* this = THIS; + EnFuMato* this = (EnFuMato*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroySphere(play, &this->collider); @@ -384,7 +382,7 @@ s32 func_80ACF04C(EnFuMato* this, PlayState* play) { } void EnFuMato_Update(Actor* thisx, PlayState* play) { - EnFuMato* this = THIS; + EnFuMato* this = (EnFuMato*)thisx; this->actionFunc(this, play); @@ -463,7 +461,7 @@ void func_80ACF3F4(EnFuMato* this, PlayState* play) { void EnFuMato_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnFuMato* this = THIS; + EnFuMato* this = (EnFuMato*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 8f5d81b928..ea59f8382a 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnFz*)thisx) - void EnFz_Init(Actor* thisx, PlayState* play); void EnFz_Destroy(Actor* thisx, PlayState* play); void EnFz_Update(Actor* thisx, PlayState* play); @@ -164,7 +162,7 @@ static InitChainEntry sInitChain[] = { }; void EnFz_Init(Actor* thisx, PlayState* play) { - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &sDamageTable; @@ -235,7 +233,7 @@ void EnFz_Init(Actor* thisx, PlayState* play) { } void EnFz_Destroy(Actor* thisx, PlayState* play) { - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -790,7 +788,7 @@ void func_80933B48(EnFz* this, PlayState* play) { void EnFz_Update(Actor* thisx, PlayState* play) { static EnFzUnkFunc D_809347AC[] = { func_80932AE8, func_80932AF4, func_80932BD4, func_80932BD4 }; s32 pad; - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; this->unk_BC6++; if (this->unk_BC8 != 0) { @@ -836,7 +834,7 @@ void EnFz_Update(Actor* thisx, PlayState* play) { void EnFz_Draw(Actor* thisx, PlayState* play) { static Gfx* D_809347BC[] = { object_fz_DL_001130, object_fz_DL_0021A0, object_fz_DL_002CA0 }; s32 pad; - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; s32 sp9C = 3 - this->actor.colChkInfo.health; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c b/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c index 2414d10583..7f080ecd11 100644 --- a/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c +++ b/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnGakufu*)thisx) - void EnGakufu_Init(Actor* thisx, PlayState* play); void EnGakufu_Destroy(Actor* thisx, PlayState* play); void EnGakufu_Update(Actor* thisx, PlayState* play); @@ -130,7 +128,7 @@ void EnGakufu_ProcessNotes(EnGakufu* this) { } void EnGakufu_Init(Actor* thisx, PlayState* play) { - EnGakufu* this = THIS; + EnGakufu* this = (EnGakufu*)thisx; this->songIndex = OCARINA_SONG_TERMINA_WALL; EnGakufu_ProcessNotes(this); @@ -155,7 +153,7 @@ void EnGakufu_Init(Actor* thisx, PlayState* play) { } void EnGakufu_Destroy(Actor* thisx, PlayState* play) { - EnGakufu* this = THIS; + EnGakufu* this = (EnGakufu*)thisx; if (GAKUFU_GET_TYPE(&this->actor) != GAKUFU_MILK_BAR) { CLEAR_EVENTINF(EVENTINF_31); @@ -252,7 +250,7 @@ void EnGakufu_WaitForSong(EnGakufu* this, PlayState* play) { } void EnGakufu_Update(Actor* thisx, PlayState* play) { - EnGakufu* this = THIS; + EnGakufu* this = (EnGakufu*)thisx; this->actionFunc(this, play); } @@ -260,7 +258,7 @@ void EnGakufu_Update(Actor* thisx, PlayState* play) { void EnGakufu_Draw(Actor* thisx, PlayState* play) { s32 i; s32 pad; - EnGakufu* this = THIS; + EnGakufu* this = (EnGakufu*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c b/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c index 221d130b08..5596407a2e 100644 --- a/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c +++ b/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnGamelupy*)thisx) - void EnGamelupy_Init(Actor* thisx, PlayState* play); void EnGamelupy_Destroy(Actor* thisx, PlayState* play); void EnGamelupy_Update(Actor* thisx, PlayState* play); @@ -65,7 +63,7 @@ static Color_RGBA8 sEnvColor = { 100, 200, 0, 255 }; void EnGamelupy_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGamelupy* this = THIS; + EnGamelupy* this = (EnGamelupy*)thisx; Actor_SetScale(&this->actor, 0.03f); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f); @@ -86,7 +84,7 @@ void EnGamelupy_Init(Actor* thisx, PlayState* play) { } void EnGamelupy_Destroy(Actor* thisx, PlayState* play) { - EnGamelupy* this = THIS; + EnGamelupy* this = (EnGamelupy*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -167,7 +165,7 @@ void EnGamelupy_UpdateCollision(EnGamelupy* this, PlayState* play) { } void EnGamelupy_Update(Actor* thisx, PlayState* play) { - EnGamelupy* this = THIS; + EnGamelupy* this = (EnGamelupy*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -177,7 +175,7 @@ void EnGamelupy_Update(Actor* thisx, PlayState* play) { void EnGamelupy_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnGamelupy* this = THIS; + EnGamelupy* this = (EnGamelupy*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c index 05be5edd90..bedba05687 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnGb2*)thisx) - void EnGb2_Init(Actor* thisx, PlayState* play); void EnGb2_Destroy(Actor* thisx, PlayState* play); void EnGb2_Update(Actor* thisx, PlayState* play); @@ -885,7 +883,7 @@ static InitChainEntry sInitChain[] = { void EnGb2_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGb2* this = THIS; + EnGb2* this = (EnGb2*)thisx; if (func_80B0F660(this, play)) { Actor_Kill(&this->actor); @@ -977,13 +975,13 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { } void EnGb2_Destroy(Actor* thisx, PlayState* play) { - EnGb2* this = THIS; + EnGb2* this = (EnGb2*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnGb2_Update(Actor* thisx, PlayState* play) { - EnGb2* this = THIS; + EnGb2* this = (EnGb2*)thisx; SkelAnime_Update(&this->skelAnime); @@ -997,7 +995,7 @@ void EnGb2_Update(Actor* thisx, PlayState* play) { s32 EnGb2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnGb2* this = THIS; + EnGb2* this = (EnGb2*)thisx; if (limbIndex == OBJECT_PS_LIMB_07) { Matrix_RotateYS(this->headRot.y, MTXMODE_APPLY); @@ -1011,7 +1009,7 @@ s32 EnGb2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnGb2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnGb2* this = THIS; + EnGb2* this = (EnGb2*)thisx; Vec3f sp18 = { 2400.0f, 0.0f, 0.0f }; if (limbIndex == OBJECT_PS_LIMB_07) { @@ -1020,7 +1018,7 @@ void EnGb2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnGb2_Draw(Actor* thisx, PlayState* play) { - EnGb2* this = THIS; + EnGb2* this = (EnGb2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index f7d9d2810e..9b3ebd1e1c 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnGe1*)thisx) - void EnGe1_Init(Actor* thisx, PlayState* play); void EnGe1_Destroy(Actor* thisx, PlayState* play); void EnGe1_Update(Actor* thisx, PlayState* play); @@ -80,7 +78,7 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play); s32 EnGe1_ValidatePictograph(PlayState* play, Actor* thisx); void EnGe1_Init(Actor* thisx, PlayState* play) { - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; ActorShape_Init(&this->picto.actor.shape, 0.0f, EnGe1_ShadowDraw, 30.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoWhiteSkel, &gGerudoWhiteArmsFoldedAnim, this->jointTable, @@ -123,7 +121,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) { } void EnGe1_Destroy(Actor* thisx, PlayState* play) { - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -175,7 +173,7 @@ void EnGe1_LookAtPlayer(EnGe1* this, PlayState* play) { void EnGe1_ShadowDraw(Actor* thisx, Lights* lights, PlayState* play) { Vec3f pos; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; Math_Vec3f_Copy(&pos, &this->picto.actor.world.pos); Math_Vec3f_Copy(&this->picto.actor.world.pos, &this->waistPos); @@ -368,7 +366,7 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play) { void EnGe1_Update(Actor* thisx, PlayState* play) { s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; if (this->picto.actor.draw != NULL) { Collider_UpdateCylinder(&this->picto.actor, &this->collider); @@ -404,7 +402,7 @@ s32 EnGe1_ValidatePictograph(PlayState* play, Actor* thisx) { s32 EnGe1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; if (limbIndex == GERUDO_WHITE_LIMB_HEAD) { rot->x += this->headRot.y; @@ -429,7 +427,7 @@ void EnGe1_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, }; static Vec3f sInitialFocusPos = { 600.0f, 700.0f, 0.0f }; static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -457,7 +455,7 @@ void EnGe1_Draw(Actor* thisx, PlayState* play) { gGerudoWhiteEyeClosedTex, }; s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index a085cb90ff..15112f8b95 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnGe2*)thisx) - void EnGe2_Init(Actor* thisx, PlayState* play); void EnGe2_Destroy(Actor* thisx, PlayState* play); void EnGe2_Update(Actor* thisx, PlayState* play); @@ -76,7 +74,7 @@ static ColliderCylinderInit sCylinderInit = { void EnGe2_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; ActorShape_Init(&this->picto.actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoPurpleSkel, NULL, this->jointTable, this->morphTable, @@ -699,7 +697,7 @@ void EnGe2_GuardStationary(EnGe2* this, PlayState* play) { void EnGe2_Update(Actor* thisx, PlayState* play) { s32 pad; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; if (!(this->stateFlags & GERUDO_PURPLE_STATE_DISABLE_MOVEMENT)) { Actor_MoveWithGravity(&this->picto.actor); @@ -743,7 +741,7 @@ s32 EnGe2_ValidatePictograph(PlayState* play, Actor* thisx) { } s32 EnGe2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; if (limbIndex == GERUDO_PURPLE_NECK_LIMB) { rot->x += this->headRot.y; @@ -767,7 +765,7 @@ void EnGe2_Draw(Actor* thisx, PlayState* play) { gGerudoPurpleEyeClosedTex, }; s32 pad; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index e98b064ec5..41e0d04949 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnGe3*)thisx) - void EnGe3_Init(Actor* thisx, PlayState* play); void EnGe3_Destroy(Actor* thisx, PlayState* play); void EnGe3_Update(Actor* thisx, PlayState* play); @@ -70,7 +68,7 @@ static ColliderCylinderInit sCylinderInit = { void EnGe3_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; ActorShape_Init(&this->picto.actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoRedSkel, NULL, this->jointTable, this->morphTable, @@ -107,7 +105,7 @@ void EnGe3_Init(Actor* thisx, PlayState* play) { } void EnGe3_Destroy(Actor* thisx, PlayState* play) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -307,7 +305,7 @@ void EnGe3_AveilsChamberIdle(EnGe3* this, PlayState* play) { void EnGe3_UpdateColliderAndMove(Actor* thisx, PlayState* play) { s32 pad; - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; Collider_UpdateCylinder(&this->picto.actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); @@ -328,7 +326,7 @@ void EnGe3_Blink(EnGe3* this, PlayState* play) { } void EnGe3_Update(Actor* thisx, PlayState* play) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; EnGe3_UpdateColliderAndMove(&this->picto.actor, play); this->actionFunc(this, play); @@ -346,7 +344,7 @@ s32 EnGe3_ValidatePictograph(PlayState* play, Actor* thisx) { } s32 EnGe3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; switch (limbIndex) { case GERUDO_RED_LIMB_VEIL: @@ -404,7 +402,7 @@ s32 EnGe3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnGe3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; Vec3f sFocusOffset = { 600.0f, 700.0f, 0.0f }; if (limbIndex == GERUDO_RED_LIMB_HEAD) { @@ -419,7 +417,7 @@ void EnGe3_Draw(Actor* thisx, PlayState* play) { gGerudoRedEyeClosedTex, }; s32 pad; - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c index 975b61fc6d..a81f26bc77 100644 --- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c +++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnGeg*)thisx) - void EnGeg_Init(Actor* thisx, PlayState* play); void EnGeg_Destroy(Actor* thisx, PlayState* play); void EnGeg_Update(Actor* thisx, PlayState* play); @@ -903,7 +901,7 @@ void func_80BB347C(EnGeg* this, PlayState* play) { void EnGeg_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGeg* this = THIS; + EnGeg* this = (EnGeg*)thisx; s32 pad2; s32 sp34[] = { 0x3E, 0xF64 }; @@ -937,7 +935,7 @@ void EnGeg_Init(Actor* thisx, PlayState* play) { } void EnGeg_Destroy(Actor* thisx, PlayState* play) { - EnGeg* this = THIS; + EnGeg* this = (EnGeg*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroySphere(play, &this->colliderSphere); @@ -945,7 +943,7 @@ void EnGeg_Destroy(Actor* thisx, PlayState* play) { } void EnGeg_Update(Actor* thisx, PlayState* play) { - EnGeg* this = THIS; + EnGeg* this = (EnGeg*)thisx; this->actionFunc(this, play); EnGeg_UpdateSkelAnime(this, play); @@ -991,7 +989,7 @@ s32 EnGeg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnGeg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80BB407C = { -1500.0f, 1500.0f, 0.0f }; - EnGeg* this = THIS; + EnGeg* this = (EnGeg*)thisx; Vec3f sp38 = { 1.0f, 5.0f, -0.5f }; Vec3f sp2C = { -1.0f, 5.0f, -0.5f }; @@ -1024,7 +1022,7 @@ void EnGeg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnGeg_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnGeg* this = THIS; + EnGeg* this = (EnGeg*)thisx; s32 phi_v0; s32 phi_v1; @@ -1128,7 +1126,7 @@ void func_80BB3CB4(EnGeg* this, PlayState* play) { } void EnGeg_Draw(Actor* thisx, PlayState* play) { - EnGeg* this = THIS; + EnGeg* this = (EnGeg*)thisx; if (this->unk_230 & 1) { func_80BB3CB4(this, play); diff --git a/src/overlays/actors/ovl_En_Gg/z_en_gg.c b/src/overlays/actors/ovl_En_Gg/z_en_gg.c index 5becb4d881..fbaec1e9b2 100644 --- a/src/overlays/actors/ovl_En_Gg/z_en_gg.c +++ b/src/overlays/actors/ovl_En_Gg/z_en_gg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_REACT_TO_LENS) -#define THIS ((EnGg*)thisx) - void EnGg_Init(Actor* thisx, PlayState* play); void EnGg_Destroy(Actor* thisx, PlayState* play); void EnGg_Update(Actor* thisx, PlayState* play); @@ -669,7 +667,7 @@ void func_80B364D4(EnGgStruct* ptr, PlayState* play) { void EnGg_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGg* this = THIS; + EnGg* this = (EnGg*)thisx; if (INV_CONTENT(ITEM_MASK_GORON) == ITEM_MASK_GORON) { Actor_Kill(&this->actor); @@ -705,7 +703,7 @@ void EnGg_Destroy(Actor* thisx, PlayState* play) { } void EnGg_Update(Actor* thisx, PlayState* play) { - EnGg* this = THIS; + EnGg* this = (EnGg*)thisx; if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) { this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; @@ -762,7 +760,7 @@ void EnGg_Update(Actor* thisx, PlayState* play) { s32 EnGg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnGg* this = THIS; + EnGg* this = (EnGg*)thisx; if (limbIndex == OBJECT_GG_LIMB_02) { Matrix_RotateZS(this->unk_2E8, MTXMODE_APPLY); @@ -772,7 +770,7 @@ s32 EnGg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnGg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { static Vec3f D_80B36DF0 = { 1800.0f, 300.0f, 200.0f }; - EnGg* this = THIS; + EnGg* this = (EnGg*)thisx; Vec3f sp30 = { 0.0f, 0.0f, 0.0f }; Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; @@ -809,7 +807,7 @@ TexturePtr D_80B36DFC[] = { void EnGg_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnGg* this = THIS; + EnGg* this = (EnGg*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c index 3a4600cd3d..4ea5524f69 100644 --- a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c +++ b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_REACT_TO_LENS) -#define THIS ((EnGg2*)thisx) - void EnGg2_Init(Actor* thisx, PlayState* play2); void EnGg2_Destroy(Actor* thisx, PlayState* play); void EnGg2_Update(Actor* thisx, PlayState* play); @@ -382,7 +380,7 @@ void func_80B3B8A4(EnGg2* this) { void EnGg2_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnGg2* this = THIS; + EnGg2* this = (EnGg2*)thisx; if (INV_CONTENT(ITEM_MASK_GORON) == ITEM_MASK_GORON) { Actor_Kill(&this->actor); @@ -448,7 +446,7 @@ void EnGg2_Destroy(Actor* thisx, PlayState* play) { } void EnGg2_Update(Actor* thisx, PlayState* play) { - EnGg2* this = THIS; + EnGg2* this = (EnGg2*)thisx; if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) { this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; @@ -482,7 +480,7 @@ void EnGg2_Update(Actor* thisx, PlayState* play) { s32 EnGg2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnGg2* this = THIS; + EnGg2* this = (EnGg2*)thisx; if ((this->animIndex != ENGG2_ANIM_5) && (this->animIndex != ENGG2_ANIM_7)) { if (limbIndex == OBJECT_GG_LIMB_01) { @@ -497,7 +495,7 @@ s32 EnGg2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnGg2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnGg2* this = THIS; + EnGg2* this = (EnGg2*)thisx; if (limbIndex == OBJECT_GG_LIMB_04) { Matrix_MultVec3f(&D_80B3C0A0, &this->unk_304); @@ -505,7 +503,7 @@ void EnGg2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnGg2_Draw(Actor* thisx, PlayState* play) { - EnGg2* this = THIS; + EnGg2* this = (EnGg2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Giant/z_en_giant.c b/src/overlays/actors/ovl_En_Giant/z_en_giant.c index 4f5a064bbd..6c020214e2 100644 --- a/src/overlays/actors/ovl_En_Giant/z_en_giant.c +++ b/src/overlays/actors/ovl_En_Giant/z_en_giant.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnGiant*)thisx) - void EnGiant_Init(Actor* thisx, PlayState* play); void EnGiant_Destroy(Actor* thisx, PlayState* play); void EnGiant_Update(Actor* thisx, PlayState* play); @@ -162,7 +160,7 @@ s32 EnGiant_IsImprisoned(EnGiant* this) { } void EnGiant_Init(Actor* thisx, PlayState* play) { - EnGiant* this = THIS; + EnGiant* this = (EnGiant*)thisx; s32 type = GIANT_TYPE(thisx); this->actor.uncullZoneForward = 4000.0f; @@ -491,7 +489,7 @@ void EnGiant_PerformCutsceneActions(EnGiant* this, PlayState* play) { } void EnGiant_Update(Actor* thisx, PlayState* play) { - EnGiant* this = THIS; + EnGiant* this = (EnGiant*)thisx; s32 blinkTimerTemp; this->actionFunc(this, play); @@ -525,7 +523,7 @@ void EnGiant_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnGiant_PostLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnGiant* this = THIS; + EnGiant* this = (EnGiant*)thisx; if (limbIndex == GIANT_LIMB_HEAD) { Matrix_Get(&this->headDrawMtxF); @@ -534,7 +532,7 @@ void EnGiant_PostLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* void EnGiant_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnGiant* this = THIS; + EnGiant* this = (EnGiant*)thisx; static TexturePtr sFaceTextures[] = { gGiantFaceEyeOpenTex, gGiantFaceEyeHalfTex, gGiantFaceEyeClosedTex }; if (this->alpha > 0) { diff --git a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c index 6b791675b1..b1d1da9e5c 100644 --- a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c +++ b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnGinkoMan*)thisx) - void EnGinkoMan_Init(Actor* thisx, PlayState* play); void EnGinkoMan_Destroy(Actor* thisx, PlayState* play); void EnGinkoMan_Update(Actor* thisx, PlayState* play); @@ -60,7 +58,7 @@ static AnimationInfo sAnimationInfo[GINKO_ANIM_MAX] = { }; void EnGinkoMan_Init(Actor* thisx, PlayState* play) { - EnGinkoMan* this = THIS; + EnGinkoMan* this = (EnGinkoMan*)thisx; this->actor.attentionRangeType = ATTENTION_RANGE_1; this->actor.uncullZoneForward = 400.0f; @@ -654,7 +652,7 @@ void EnGinkoMan_FacePlayer(EnGinkoMan* this, PlayState* play) { } void EnGinkoMan_Update(Actor* thisx, PlayState* play) { - EnGinkoMan* this = THIS; + EnGinkoMan* this = (EnGinkoMan*)thisx; this->actionFunc(this, play); this->actor.focus.pos = this->actor.world.pos; @@ -663,7 +661,7 @@ void EnGinkoMan_Update(Actor* thisx, PlayState* play) { } s32 EnGinkoMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnGinkoMan* this = THIS; + EnGinkoMan* this = (EnGinkoMan*)thisx; if (limbIndex == OBJECT_BOJ_LIMB_0F) { *dList = object_boj_DL_00B1D8; @@ -686,7 +684,7 @@ void EnGinkoMan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnGinkoMan_Draw(Actor* thisx, PlayState* play) { - EnGinkoMan* this = THIS; + EnGinkoMan* this = (EnGinkoMan*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index 0af3352927..9a13790d91 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnGirlA*)thisx) - void EnGirlA_Init(Actor* thisx, PlayState* play); void EnGirlA_Destroy(Actor* thisx, PlayState* play); void EnGirlA_Update(Actor* thisx, PlayState* play); @@ -176,7 +174,7 @@ void EnGirlA_InitObjIndex(EnGirlA* this, PlayState* play) { } void EnGirlA_Init(Actor* thisx, PlayState* play) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; EnGirlA_InitObjIndex(this, play); } @@ -616,13 +614,13 @@ void EnGirlA_Update2(EnGirlA* this, PlayState* play) { } void EnGirlA_Update(Actor* thisx, PlayState* play) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; this->mainActionFunc(this, play); } void EnGirlA_Draw(Actor* thisx, PlayState* play) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; Matrix_RotateYS(this->rotY, MTXMODE_APPLY); if (this->drawFunc != NULL) { diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 1c25049d1e..8841d6f43c 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnGk*)thisx) - void EnGk_Init(Actor* thisx, PlayState* play); void EnGk_Destroy(Actor* thisx, PlayState* play); void EnGk_Update(Actor* thisx, PlayState* play); @@ -1052,7 +1050,7 @@ void func_80B52654(EnGk* this, PlayState* play) { void EnGk_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGk* this = THIS; + EnGk* this = (EnGk*)thisx; SkelAnime_InitFlex(play, &this->skelAnime, &object_gk_Skel_0079C0, &object_gk_Anim_00787C, this->jointTable, this->morphTable, OBJECT_GK_LIMB_MAX); @@ -1116,13 +1114,13 @@ void EnGk_Init(Actor* thisx, PlayState* play) { } void EnGk_Destroy(Actor* thisx, PlayState* play) { - EnGk* this = THIS; + EnGk* this = (EnGk*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnGk_Update(Actor* thisx, PlayState* play) { - EnGk* this = THIS; + EnGk* this = (EnGk*)thisx; this->actionFunc(this, play); @@ -1147,7 +1145,7 @@ s32 EnGk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnGk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnGk* this = THIS; + EnGk* this = (EnGk*)thisx; Vec3f sp58 = { 0.0f, 0.0f, 0.0f }; Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40 = { 0.0f, 0.0f, 0.0f }; @@ -1210,7 +1208,7 @@ void EnGk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnGk_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnGk* this = THIS; + EnGk* this = (EnGk*)thisx; s32 phi_v0; s32 phi_v1; @@ -1282,7 +1280,7 @@ TexturePtr D_80B533E4[] = { void EnGk_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnGk* this = THIS; + EnGk* this = (EnGk*)thisx; Vec3f pos; Vec3f scale; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 7bd341ddd4..31602903a5 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnGm*)thisx) - void EnGm_Init(Actor* thisx, PlayState* play); void EnGm_Destroy(Actor* thisx, PlayState* play); void EnGm_Update(Actor* thisx, PlayState* play); @@ -570,7 +568,7 @@ s16 func_8094E4D0(EnGm* this, s32 numCutscenes) { } s32 func_8094E52C(Actor* thisx, PlayState* play) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s16 csId = func_8094E4D0(this, 0); s32 ret = false; @@ -702,7 +700,7 @@ s32 func_8094E69C(Actor* thisx, PlayState* play) { } s32 func_8094EA34(Actor* thisx, PlayState* play) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s32 pad; Actor* al; Actor* toto; @@ -753,7 +751,7 @@ s32 func_8094EA34(Actor* thisx, PlayState* play) { } s32 func_8094EB1C(Actor* thisx, PlayState* play) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s32 pad; s32 ret = false; s16 oldYaw; @@ -1797,7 +1795,7 @@ void func_80950F2C(EnGm* this, PlayState* play) { } void EnGm_Init(Actor* thisx, PlayState* play) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; if (EnGm_FindActor(this, play, ACTORCAT_NPC, ACTOR_EN_GM)) { Actor_Kill(&this->actor); @@ -1822,14 +1820,14 @@ void EnGm_Init(Actor* thisx, PlayState* play) { } void EnGm_Destroy(Actor* thisx, PlayState* play) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroySphere(play, &this->colliderSphere); } void EnGm_Update(Actor* thisx, PlayState* play) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; if (!func_8094E0F8(this, play)) { if (!func_8094EE84(this, play) && func_8094EFC4(this, play)) { @@ -1859,7 +1857,7 @@ void EnGm_Update(Actor* thisx, PlayState* play) { s32 EnGm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { s32 pad; - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s32 fidgetIndex; if (limbIndex == OBJECT_IN2_LIMB_10) { @@ -1894,7 +1892,7 @@ s32 EnGm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnGm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80951E24 = { 1400.0f, 0.0f, 0.0f }; - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s32 pad[4]; Vec3f sp30; s32 pad2; @@ -1919,7 +1917,7 @@ void EnGm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnGm_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s32 overrideRot = true; s32 stepRot = false; @@ -1964,7 +1962,7 @@ void EnGm_Draw(Actor* thisx, PlayState* play) { object_in2_Tex_0054A8, object_in2_Tex_005028, object_in2_Tex_006828, object_in2_Tex_005028, object_in2_Tex_005CE8, object_in2_Tex_006C68, }; - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; if ((this->scheduleResult != 0) && (this->objectSlot > OBJECT_SLOT_NONE)) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 4a3d8ba439..17306816e0 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -23,8 +23,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnGo*)thisx) - #define ENGO_STANDING_Y_OFFSET 0.0f // Actor shape offset in use when a Goron is in any standing state. #define ENGO_ROLLEDUP_Y_OFFSET 14.0f // Actor shape offset in use when a Goron is "rolled up". #define ENGO_SNOWBALL_Y_OFFSET 46.0f // Actor shape offset in use when a Goron is in a snowball. @@ -1832,7 +1830,7 @@ void EnGo_MakeSteam(EnGo* this) { */ s32 EnGo_HandleOpenShrineCutscene(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; s32 ret = false; switch (this->cutsceneState) { @@ -1959,7 +1957,7 @@ s32 EnGo_HandleOpenShrineCutscene(Actor* thisx, PlayState* play) { */ s32 EnGo_HandleGivePowderKegCutscene(Actor* thisx, PlayState* play) { static Vec3f sPowderKegSpawnOffset = { 0.0f, 200.0f, 280.0f }; - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; Vec3f powderKegSpawnPos; s32 ret = false; @@ -2797,7 +2795,7 @@ void EnGo_Talk(EnGo* this, PlayState* play) { } void EnGo_Init(Actor* thisx, PlayState* play) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; this->taisouObjectSlot = SubS_GetObjectSlot(OBJECT_TAISOU, play); this->hakuginDemoObjectSlot = SubS_GetObjectSlot(OBJECT_HAKUGIN_DEMO, play); @@ -2805,7 +2803,7 @@ void EnGo_Init(Actor* thisx, PlayState* play) { } void EnGo_Destroy(Actor* thisx, PlayState* play) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroySphere(play, &this->colliderSphere); @@ -2813,7 +2811,7 @@ void EnGo_Destroy(Actor* thisx, PlayState* play) { } void EnGo_Update(Actor* thisx, PlayState* play) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; f32 xzRange; EnGo_DetectCollisions(this, play); @@ -2886,7 +2884,7 @@ void EnGo_Draw_NoSkeleton(EnGo* this, PlayState* play) { } s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; Vec3f worldPos; s32 fidgetIndex; @@ -2922,7 +2920,7 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnGo_TransfromLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; s32 stepRot; s32 overrideRot; @@ -2977,7 +2975,7 @@ void EnGo_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex, gGoronEyeHalfTex, gGoronEyeClosed2Tex, }; - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; if (!(this->actionFlags & (ENGO_FLAG_SNOWBALLED | ENGO_FLAG_ROLLED_UP))) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 54e9d2872a..6e8acce37b 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnGoroiwa*)thisx) - void EnGoroiwa_Init(Actor* thisx, PlayState* play); void EnGoroiwa_Destroy(Actor* thisx, PlayState* play); void EnGoroiwa_Update(Actor* thisx, PlayState* play); @@ -950,7 +948,7 @@ void func_80941274(EnGoroiwa* this, PlayState* play) { void EnGoroiwa_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; f32 temp_f0; s32 pathIndex = ENGOROIWA_GET_PATH_INDEX(&this->actor); Path* path = &play->setupPathList[pathIndex]; @@ -1013,7 +1011,7 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) { } void EnGoroiwa_Destroy(Actor* thisx, PlayState* play) { - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; Collider_DestroyJntSph(play, &this->collider); Effect_Destroy(play, this->unk_248); @@ -1427,7 +1425,7 @@ void func_80942604(EnGoroiwa* this, PlayState* play) { void EnGoroiwa_Update(Actor* thisx, PlayState* play) { s32 pad; - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; Player* player = GET_PLAYER(play); s32 bgId; s32 sp5C = false; @@ -1606,7 +1604,7 @@ void EnGoroiwa_Draw(Actor* thisx, PlayState* play) { object_goroiwa_DL_003B40, object_goroiwa_DL_008B90, }; - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; s32 params = ENGOROIWA_GET_C000(&this->actor); if (this->actionFunc == func_8094220C) { diff --git a/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c b/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c index 65501fe6d5..42df10a667 100644 --- a/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c +++ b/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnGrasshopper*)thisx) - void EnGrasshopper_Init(Actor* thisx, PlayState* play); void EnGrasshopper_Destroy(Actor* thisx, PlayState* play); void EnGrasshopper_Update(Actor* thisx, PlayState* play); @@ -261,7 +259,7 @@ static ColliderJntSphInit sJntSphInit = { }; void EnGrasshopper_Init(Actor* thisx, PlayState* play) { - EnGrasshopper* this = THIS; + EnGrasshopper* this = (EnGrasshopper*)thisx; s32 i; this->actor.hintId = TATL_HINT_ID_DRAGONFLY; @@ -324,7 +322,7 @@ void EnGrasshopper_Init(Actor* thisx, PlayState* play) { } void EnGrasshopper_Destroy(Actor* thisx, PlayState* play) { - EnGrasshopper* this = THIS; + EnGrasshopper* this = (EnGrasshopper*)thisx; Collider_DestroyJntSph(play, &this->collider); @@ -973,7 +971,7 @@ void EnGrasshopper_UpdateDamage(EnGrasshopper* this, PlayState* play) { void EnGrasshopper_Update(Actor* thisx, PlayState* play) { s32 pad; - EnGrasshopper* this = THIS; + EnGrasshopper* this = (EnGrasshopper*)thisx; SkelAnime_Update(&this->skelAnime); EnGrasshopper_UpdateDamage(this, play); @@ -1026,7 +1024,7 @@ void EnGrasshopper_Update(Actor* thisx, PlayState* play) { } void EnGrasshopper_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnGrasshopper* this = THIS; + EnGrasshopper* this = (EnGrasshopper*)thisx; Vec3f sEffectOffsetFromTailTop = { 500.0f, 0.0f, 0.0f }; Vec3f sZeroVec3f = { 0.0f, 0.0f, 0.0f }; @@ -1072,7 +1070,7 @@ void EnGrasshopper_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnGrasshopper_Draw(Actor* thisx, PlayState* play) { - EnGrasshopper* this = THIS; + EnGrasshopper* this = (EnGrasshopper*)thisx; s32 i; u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, SUBS_SHADOW_TEX_SIZE); u8* shadowTexIter; diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 36f82b93f9..26fa71b07d 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnGs*)thisx) - void EnGs_Init(Actor* thisx, PlayState* play); void EnGs_Destroy(Actor* thisx, PlayState* play); void EnGs_Update(Actor* thisx, PlayState* play); @@ -138,7 +136,7 @@ static InitChainEntry sInitChain[] = { void EnGs_Init(Actor* thisx, PlayState* play) { s32 pad; - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->unk_208 = -1; @@ -171,7 +169,7 @@ void EnGs_Init(Actor* thisx, PlayState* play) { } void EnGs_Destroy(Actor* thisx, PlayState* play) { - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; Collider_DestroyCylinder(play, &this->collider); Play_DisableMotionBlur(); @@ -945,7 +943,7 @@ void func_80999B34(EnGs* this) { void func_80999BC8(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; s32 pad; if (this->actor.isLockedOn && (AudioVoice_GetWord() == VOICE_WORD_ID_HOURS)) { @@ -1029,7 +1027,7 @@ void func_80999BC8(Actor* thisx, PlayState* play2) { void EnGs_Update(Actor* thisx, PlayState* play) { s32 pad; - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { play->msgCtx.msgMode = MSGMODE_NONE; @@ -1084,7 +1082,7 @@ void EnGs_Update(Actor* thisx, PlayState* play) { void EnGs_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; u32 frames; if (this->unk_19A & 8) { diff --git a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c index 9e12da49c5..11559515db 100644 --- a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c +++ b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnGuardNuts*)thisx) - void EnGuardNuts_Init(Actor* thisx, PlayState* play); void EnGuardNuts_Destroy(Actor* thisx, PlayState* play); void EnGuardNuts_Update(Actor* thisx, PlayState* play); @@ -102,7 +100,7 @@ typedef enum { } EnGuardNutsState; void EnGuardNuts_Init(Actor* thisx, PlayState* play) { - EnGuardNuts* this = THIS; + EnGuardNuts* this = (EnGuardNuts*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_Init(play, &this->skelAnime, &gDekuPalaceGuardSkel, &gDekuPalaceGuardWaitAnim, this->jointTable, @@ -124,7 +122,7 @@ void EnGuardNuts_Init(Actor* thisx, PlayState* play) { } void EnGuardNuts_Destroy(Actor* thisx, PlayState* play) { - EnGuardNuts* this = THIS; + EnGuardNuts* this = (EnGuardNuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -325,7 +323,7 @@ void EnGuardNuts_Unburrow(EnGuardNuts* this, PlayState* play) { } void EnGuardNuts_Update(Actor* thisx, PlayState* play) { - EnGuardNuts* this = THIS; + EnGuardNuts* this = (EnGuardNuts*)thisx; s32 pad; if (this->blinkTimer == 0) { @@ -363,7 +361,7 @@ void EnGuardNuts_Update(Actor* thisx, PlayState* play) { } s32 EnGuardNuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnGuardNuts* this = THIS; + EnGuardNuts* this = (EnGuardNuts*)thisx; if (limbIndex == DEKU_PALACE_GUARD_LIMB_HEAD) { rot->x += this->headRot.x; @@ -374,7 +372,7 @@ s32 EnGuardNuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnGuardNuts_Draw(Actor* thisx, PlayState* play) { - EnGuardNuts* this = THIS; + EnGuardNuts* this = (EnGuardNuts*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c b/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c index 57a04cdefa..21ee7918a2 100644 --- a/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c +++ b/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnGuruguru*)thisx) - void EnGuruguru_Init(Actor* thisx, PlayState* play); void EnGuruguru_Destroy(Actor* thisx, PlayState* play); void EnGuruguru_Update(Actor* thisx, PlayState* play); @@ -86,7 +84,7 @@ static TexturePtr sEyeTextures[] = { gGuruGuruEyeClosedTex, gGuruGuruEyeAngryTex static TexturePtr sMouthTextures[] = { gGuruGuruMouthOpenTex, gGuruGuruMouthAngryTex }; void EnGuruguru_Init(Actor* thisx, PlayState* play) { - EnGuruguru* this = THIS; + EnGuruguru* this = (EnGuruguru*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); @@ -115,7 +113,7 @@ void EnGuruguru_Init(Actor* thisx, PlayState* play) { } void EnGuruguru_Destroy(Actor* thisx, PlayState* play) { - EnGuruguru* this = THIS; + EnGuruguru* this = (EnGuruguru*)thisx; if (this->actor.params != 2) { Collider_DestroyCylinder(play, &this->collider); @@ -331,7 +329,7 @@ void func_80BC7520(EnGuruguru* this, PlayState* play) { } void EnGuruguru_Update(Actor* thisx, PlayState* play) { - EnGuruguru* this = THIS; + EnGuruguru* this = (EnGuruguru*)thisx; s32 yaw; Player* player = GET_PLAYER(play); s16 yawTemp; @@ -388,7 +386,7 @@ void EnGuruguru_Update(Actor* thisx, PlayState* play) { } s32 EnGuruguru_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnGuruguru* this = THIS; + EnGuruguru* this = (EnGuruguru*)thisx; if (limbIndex == GURU_GURU_LIMB_HEAD) { rot->x += this->headXRot; @@ -399,7 +397,7 @@ s32 EnGuruguru_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnGuruguru_Draw(Actor* thisx, PlayState* play) { - EnGuruguru* this = THIS; + EnGuruguru* this = (EnGuruguru*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c b/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c index 7b72ecf01f..774f9392dd 100644 --- a/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c +++ b/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c @@ -30,8 +30,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnHakurock*)thisx) - void EnHakurock_Init(Actor* thisx, PlayState* play); void EnHakurock_Destroy(Actor* thisx, PlayState* play); void EnHakurock_Update(Actor* thisx, PlayState* play); @@ -93,7 +91,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 0, 60, 60, MASS_IMMOVABLE }; void EnHakurock_Init(Actor* thisx, PlayState* play) { - EnHakurock* this = THIS; + EnHakurock* this = (EnHakurock*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 52.0f); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -111,7 +109,7 @@ void EnHakurock_Init(Actor* thisx, PlayState* play) { } void EnHakurock_Destroy(Actor* thisx, PlayState* play) { - EnHakurock* this = THIS; + EnHakurock* this = (EnHakurock*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -379,7 +377,7 @@ void EnHakurock_LargeStalactite_Wait(EnHakurock* this, PlayState* play) { } void EnHakurock_Update(Actor* thisx, PlayState* play) { - EnHakurock* this = THIS; + EnHakurock* this = (EnHakurock*)thisx; s32 pad; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c index 09fa83e484..0b8ec7386c 100644 --- a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c +++ b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnHanabi*)thisx) - void EnHanabi_Init(Actor* thisx, PlayState* play2); void EnHanabi_Destroy(Actor* thisx, PlayState* play2); void EnHanabi_Update(Actor* thisx, PlayState* play); @@ -191,7 +189,7 @@ void func_80B22FA8(EnHanabiStruct* arg0, PlayState* play2) { void EnHanabi_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnHanabi* this = THIS; + EnHanabi* this = (EnHanabi*)thisx; s32 i; //! FAKE: @@ -216,7 +214,7 @@ void EnHanabi_Init(Actor* thisx, PlayState* play2) { void EnHanabi_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnHanabi* this = THIS; + EnHanabi* this = (EnHanabi*)thisx; s32 i; for (i = 0; i < ARRAY_COUNT(this->unk_4634); i++) { @@ -339,7 +337,7 @@ void func_80B23934(EnHanabi* this, PlayState* play) { } void EnHanabi_Update(Actor* thisx, PlayState* play) { - EnHanabi* this = THIS; + EnHanabi* this = (EnHanabi*)thisx; this->actionFunc(this, play); @@ -347,7 +345,7 @@ void EnHanabi_Update(Actor* thisx, PlayState* play) { } void EnHanabi_Draw(Actor* thisx, PlayState* play) { - EnHanabi* this = THIS; + EnHanabi* this = (EnHanabi*)thisx; Matrix_Push(); func_80B22FA8(this->unk_148, play); diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/src/overlays/actors/ovl_En_Hata/z_en_hata.c index 5a60589130..f76d91b73c 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnHata*)thisx) - void EnHata_Init(Actor* thisx, PlayState* play); void EnHata_Destroy(Actor* thisx, PlayState* play); void EnHata_Update(Actor* thisx, PlayState* play2); @@ -29,7 +27,7 @@ ActorProfile En_Hata_Profile = { }; void EnHata_Init(Actor* thisx, PlayState* play) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; s32 rand; f32 endFrame; @@ -46,14 +44,14 @@ void EnHata_Init(Actor* thisx, PlayState* play) { } void EnHata_Destroy(Actor* thisx, PlayState* play) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void EnHata_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; Vec3f sp34; f32 phi_fv0; s32 pad; @@ -81,7 +79,7 @@ void EnHata_Update(Actor* thisx, PlayState* play2) { } s32 EnHata_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; if ((limbIndex == FLAGPOLE_LIMB_FLAG1_HOIST_END_BASE) || (limbIndex == FLAGPOLE_LIMB_FLAG2_HOIST_END_BASE)) { rot->y += this->unk_29C; @@ -91,7 +89,7 @@ s32 EnHata_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnHata_Draw(Actor* thisx, PlayState* play) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHata_OverrideLimbDraw, NULL, diff --git a/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c b/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c index dd022cdb08..22b8a9e2b0 100644 --- a/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c +++ b/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnHeishi*)thisx) - void EnHeishi_Init(Actor* thisx, PlayState* play); void EnHeishi_Destroy(Actor* thisx, PlayState* play); void EnHeishi_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnHeishi_Init(Actor* thisx, PlayState* play) { - EnHeishi* this = THIS; + EnHeishi* this = (EnHeishi*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gSoldierSkel, &gSoldierWaveAnim, this->jointTable, this->morphTable, @@ -86,7 +84,7 @@ void EnHeishi_Init(Actor* thisx, PlayState* play) { } void EnHeishi_Destroy(Actor* thisx, PlayState* play) { - EnHeishi* this = THIS; + EnHeishi* this = (EnHeishi*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); } @@ -152,7 +150,7 @@ void EnHeishi_Idle(EnHeishi* this, PlayState* play) { void EnHeishi_Update(Actor* thisx, PlayState* play) { s32 pad; - EnHeishi* this = THIS; + EnHeishi* this = (EnHeishi*)thisx; SkelAnime_Update(&this->skelAnime); if (this->timer != 0) { @@ -183,7 +181,7 @@ void EnHeishi_Update(Actor* thisx, PlayState* play) { } s32 EnHeishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnHeishi* this = THIS; + EnHeishi* this = (EnHeishi*)thisx; if (limbIndex == SOLDIER_LIMB_HEAD) { rot->x += this->headRotX; @@ -195,7 +193,7 @@ s32 EnHeishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void EnHeishi_Draw(Actor* thisx, PlayState* play) { - EnHeishi* this = THIS; + EnHeishi* this = (EnHeishi*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.c b/src/overlays/actors/ovl_En_Hg/z_en_hg.c index 0d623a8cdd..bc78135aa5 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.c +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.c @@ -10,8 +10,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_100000 | \ ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnHg*)thisx) - void EnHg_Init(Actor* thisx, PlayState* play); void EnHg_Destroy(Actor* thisx, PlayState* play); void EnHg_Update(Actor* thisx, PlayState* play); @@ -133,7 +131,7 @@ static AnimationInfo sAnimationInfo[HG_ANIM_MAX] = { static u32 sHasSoundPlayed = false; void EnHg_Init(Actor* thisx, PlayState* play) { - EnHg* this = THIS; + EnHg* this = (EnHg*)thisx; s16 csId = this->actor.csId; s32 i; @@ -160,7 +158,7 @@ void EnHg_Init(Actor* thisx, PlayState* play) { } void EnHg_Destroy(Actor* thisx, PlayState* play) { - EnHg* this = THIS; + EnHg* this = (EnHg*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -429,7 +427,7 @@ void EnHg_WaitForPlayerAction(EnHg* this, PlayState* play) { } void EnHg_Update(Actor* thisx, PlayState* play) { - EnHg* this = THIS; + EnHg* this = (EnHg*)thisx; this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); @@ -444,7 +442,7 @@ s32 EnHg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnHg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnHg* this = THIS; + EnHg* this = (EnHg*)thisx; if (limbIndex == PAMELAS_FATHER_GIBDO_LIMB_EYEBROWS) { Matrix_Get(&this->mf); } else if (limbIndex == PAMELAS_FATHER_GIBDO_LIMB_HEAD) { @@ -453,7 +451,7 @@ void EnHg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnHg_Draw(Actor* thisx, PlayState* play) { - EnHg* this = THIS; + EnHg* this = (EnHg*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c index 769c07beb1..cdc0aa0f3f 100644 --- a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c +++ b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnHgo*)thisx) - void EnHgo_Init(Actor* thisx, PlayState* play); void EnHgo_Destroy(Actor* thisx, PlayState* play); void EnHgo_Update(Actor* thisx, PlayState* play); @@ -92,7 +90,7 @@ static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; void EnHgo_Init(Actor* thisx, PlayState* play) { s32 pad; - EnHgo* this = THIS; + EnHgo* this = (EnHgo*)thisx; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gPamelasFatherHumanSkel, &gPamelasFatherArmsFoldedAnim, @@ -117,7 +115,7 @@ void EnHgo_Init(Actor* thisx, PlayState* play) { } void EnHgo_Destroy(Actor* thisx, PlayState* play) { - EnHgo* this = THIS; + EnHgo* this = (EnHgo*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -381,7 +379,7 @@ void EnHgo_UpdateModel(EnHgo* this, PlayState* play) { } void EnHgo_Update(Actor* thisx, PlayState* play) { - EnHgo* this = THIS; + EnHgo* this = (EnHgo*)thisx; s32 pad; this->actionFunc(this, play); @@ -398,7 +396,7 @@ void EnHgo_Update(Actor* thisx, PlayState* play) { } s32 EnHgo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnHgo* this = THIS; + EnHgo* this = (EnHgo*)thisx; if (limbIndex == PAMELAS_FATHER_HUMAN_LIMB_HEAD) { rot->x += this->headRot.y; @@ -408,7 +406,7 @@ s32 EnHgo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnHgo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { - EnHgo* this = THIS; + EnHgo* this = (EnHgo*)thisx; if (limbIndex == PAMELAS_FATHER_HUMAN_LIMB_HEAD) { Matrix_Get(&this->mf); @@ -423,7 +421,7 @@ static TexturePtr sEyeTextures[] = { }; void EnHgo_Draw(Actor* thisx, PlayState* play) { - EnHgo* this = THIS; + EnHgo* this = (EnHgo*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c index 3cc881b750..8c9b56737d 100644 --- a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c +++ b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnHiddenNuts*)thisx) - void EnHiddenNuts_Init(Actor* thisx, PlayState* play); void EnHiddenNuts_Destroy(Actor* thisx, PlayState* play); void EnHiddenNuts_Update(Actor* thisx, PlayState* play); @@ -101,7 +99,7 @@ static u8 sAnimationModes[ENHIDDENNUTS_ANIM_MAX] = { }; void EnHiddenNuts_Init(Actor* thisx, PlayState* play) { - EnHiddenNuts* this = THIS; + EnHiddenNuts* this = (EnHiddenNuts*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_Init(play, &this->skelAnime, &object_hintnuts_Skel_0023B8.sh, &object_hintnuts_Anim_0024CC, @@ -137,7 +135,7 @@ void EnHiddenNuts_Init(Actor* thisx, PlayState* play) { } void EnHiddenNuts_Destroy(Actor* thisx, PlayState* play) { - EnHiddenNuts* this = THIS; + EnHiddenNuts* this = (EnHiddenNuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -436,7 +434,7 @@ void func_80BDBED4(EnHiddenNuts* this, PlayState* play) { void EnHiddenNuts_Update(Actor* thisx, PlayState* play) { s32 pad; - EnHiddenNuts* this = THIS; + EnHiddenNuts* this = (EnHiddenNuts*)thisx; if (this->unk_218 != 0) { this->unk_218--; @@ -461,7 +459,7 @@ void EnHiddenNuts_Update(Actor* thisx, PlayState* play) { } void EnHiddenNuts_Draw(Actor* thisx, PlayState* play) { - EnHiddenNuts* this = THIS; + EnHiddenNuts* this = (EnHiddenNuts*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c index 4fae1d7c0b..27e6d6ad30 100644 --- a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c +++ b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnHintSkb*)thisx) - void EnHintSkb_Init(Actor* thisx, PlayState* play); void EnHintSkb_Destroy(Actor* thisx, PlayState* play); void EnHintSkb_Update(Actor* thisx, PlayState* play); @@ -167,7 +165,7 @@ static InitChainEntry sInitChain[] = { void EnHintSkb_Init(Actor* thisx, PlayState* play) { s32 pad; - EnHintSkb* this = THIS; + EnHintSkb* this = (EnHintSkb*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_Init(play, &this->skelAnime, &gStalchildSkel, &gStalchildSitLaughAnim, this->jointTable, this->morphTable, @@ -186,7 +184,7 @@ void EnHintSkb_Init(Actor* thisx, PlayState* play) { } void EnHintSkb_Destroy(Actor* thisx, PlayState* play) { - EnHintSkb* this = THIS; + EnHintSkb* this = (EnHintSkb*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -853,7 +851,7 @@ void func_80C215E4(PlayState* play, EnHintSkb* this, Vec3f* arg2) { } void EnHintSkb_Update(Actor* thisx, PlayState* play) { - EnHintSkb* this = THIS; + EnHintSkb* this = (EnHintSkb*)thisx; this->actionFunc(this, play); @@ -872,7 +870,7 @@ void EnHintSkb_Update(Actor* thisx, PlayState* play) { } s32 EnHintSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnHintSkb* this = THIS; + EnHintSkb* this = (EnHintSkb*)thisx; f32 temp_f10; if (limbIndex == STALCHILD_LIMB_HEAD) { @@ -899,7 +897,7 @@ s32 EnHintSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 void EnHintSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80C21E70 = { 800.0f, 1200.0f, 0.0f }; - EnHintSkb* this = THIS; + EnHintSkb* this = (EnHintSkb*)thisx; if (!(this->unk_3E8 & 8)) { Collider_UpdateSpheres(limbIndex, &this->collider); @@ -932,7 +930,7 @@ void EnHintSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnHintSkb_Draw(Actor* thisx, PlayState* play) { - EnHintSkb* this = THIS; + EnHintSkb* this = (EnHintSkb*)thisx; this->bodyPartsCount = 0; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c b/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c index d7e3137446..3c2be43276 100644 --- a/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c +++ b/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnHitTag*)thisx) - void EnHitTag_Init(Actor* thisx, PlayState* play); void EnHitTag_Destroy(Actor* thisx, PlayState* play); void EnHitTag_Update(Actor* thisx, PlayState* play); @@ -50,7 +48,7 @@ static ColliderCylinderInit sCylinderInit = { void EnHitTag_Init(Actor* thisx, PlayState* play) { s32 pad; - EnHitTag* this = THIS; + EnHitTag* this = (EnHitTag*)thisx; Actor_SetScale(&this->actor, 1.0f); this->actionFunc = EnHitTag_WaitForHit; @@ -62,7 +60,7 @@ void EnHitTag_Init(Actor* thisx, PlayState* play) { } void EnHitTag_Destroy(Actor* thisx, PlayState* play) { - EnHitTag* this = THIS; + EnHitTag* this = (EnHitTag*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -87,6 +85,6 @@ void EnHitTag_WaitForHit(EnHitTag* this, PlayState* play) { } void EnHitTag_Update(Actor* thisx, PlayState* play) { - EnHitTag* this = THIS; + EnHitTag* this = (EnHitTag*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 5f0a2f1600..8e1cf9a3b0 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -41,8 +41,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnHoll*)thisx) - void EnHoll_Init(Actor* thisx, PlayState* play); void EnHoll_Destroy(Actor* thisx, PlayState* play); void EnHoll_Update(Actor* thisx, PlayState* play); @@ -113,7 +111,7 @@ void EnHoll_SetPlayerSide(PlayState* play, EnHoll* this, Vec3f* transformedPlaye } void EnHoll_Init(Actor* thisx, PlayState* play) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; s32 pad; Vec3f transformedPlayerPos; @@ -125,7 +123,7 @@ void EnHoll_Init(Actor* thisx, PlayState* play) { } void EnHoll_Destroy(Actor* thisx, PlayState* play) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; if (!EN_HOLL_IS_SCENE_CHANGER(this)) { u32 enHollId = EN_HOLL_GET_ID(&this->actor); @@ -308,7 +306,7 @@ void EnHoll_RoomTransitionIdle(EnHoll* this, PlayState* play) { } void EnHoll_Update(Actor* thisx, PlayState* play) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; Player* player = GET_PLAYER(play); if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) && @@ -318,7 +316,7 @@ void EnHoll_Update(Actor* thisx, PlayState* play) { } void EnHoll_Draw(Actor* thisx, PlayState* play) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; Gfx* gfx; u32 setupDListIndex; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 56acf222bd..bfe670c809 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnHorse*)thisx) - void EnHorse_Init(Actor* thisx, PlayState* play2); void EnHorse_Destroy(Actor* thisx, PlayState* play); void EnHorse_Update(Actor* thisx, PlayState* play2); @@ -717,7 +715,7 @@ void func_8087CA04(EnHorse* this, PlayState* play) { void EnHorse_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; Skin* skin = &this->skin; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -947,7 +945,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { // EnHorse_WaitForObject void func_8087D540(Actor* thisx, PlayState* play) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->actor.objectSlot = this->objectSlot; @@ -969,7 +967,7 @@ void func_8087D540(Actor* thisx, PlayState* play) { } void EnHorse_Destroy(Actor* thisx, PlayState* play) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; if (this->stateFlags & ENHORSE_DRAW) { AudioSfx_StopByPos(&this->unk_218); @@ -4194,7 +4192,7 @@ static EnHorseActionFunc sActionFuncs[] = { }; void EnHorse_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; Vec3f dustAcc = { 0.0f, 0.0f, 0.0f }; Vec3f dustVel = { 0.0f, 1.0f, 0.0f }; Player* player = GET_PLAYER(play); @@ -4468,7 +4466,7 @@ void EnHorse_RandomOffset(Vec3f* src, f32 dist, Vec3f* dst) { void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { s32 pad; - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; Vec3f sp7C = { 0.0f, 0.0f, 0.0f }; Vec3f hoofOffset = { 5.0f, -4.0f, 5.0f }; Vec3f sp64; @@ -4668,7 +4666,7 @@ s32 EnHorse_OverrideLimbDraw(Actor* thisx, PlayState* play, s32 limbIndex, Skin* gEponaEyeClosedTex, }; static u8 D_80889210[] = { 0, 1, 2, 1 }; - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; s32 drawOriginalLimb = true; OPEN_DISPS(play->state.gfxCtx); @@ -4690,7 +4688,7 @@ s32 EnHorse_OverrideLimbDraw(Actor* thisx, PlayState* play, s32 limbIndex, Skin* s32 func_80888D18(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { Vec3f sp1C = { -98.0f, -1454.0f, 0.0f }; - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; if (limbIndex == 3) { Matrix_MultVec3f(&sp1C, &this->riderPos); @@ -4699,7 +4697,7 @@ s32 func_80888D18(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s } void EnHorse_Draw(Actor* thisx, PlayState* play) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; if (!(this->stateFlags & ENHORSE_INACTIVE) && (this->actor.update != func_8087D540)) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 93ebf3d98c..bfd47d646c 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnHorseGameCheck*)thisx) - void EnHorseGameCheck_Init(Actor* thisx, PlayState* play); void EnHorseGameCheck_Destroy(Actor* thisx, PlayState* play); void EnHorseGameCheck_Update(Actor* thisx, PlayState* play); @@ -463,7 +461,7 @@ EnHorseGameCheckUnkFunc D_808F9C5C[] = { }; void EnHorseGameCheck_Init(Actor* thisx, PlayState* play) { - EnHorseGameCheck* this = THIS; + EnHorseGameCheck* this = (EnHorseGameCheck*)thisx; this->unk_15C = ENHORSEGAMECHECK_GET_FF(&this->dyna.actor); this->unk_160 = ENHORSEGAMECHECK_GET_FF00(&this->dyna.actor); @@ -478,7 +476,7 @@ void EnHorseGameCheck_Init(Actor* thisx, PlayState* play) { } void EnHorseGameCheck_Destroy(Actor* thisx, PlayState* play) { - EnHorseGameCheck* this = THIS; + EnHorseGameCheck* this = (EnHorseGameCheck*)thisx; if (D_808F9C0C[this->unk_15C] != NULL) { D_808F9C0C[this->unk_15C](this, play); @@ -486,7 +484,7 @@ void EnHorseGameCheck_Destroy(Actor* thisx, PlayState* play) { } void EnHorseGameCheck_Update(Actor* thisx, PlayState* play) { - EnHorseGameCheck* this = THIS; + EnHorseGameCheck* this = (EnHorseGameCheck*)thisx; if (D_808F9C34[this->unk_15C] != NULL) { D_808F9C34[this->unk_15C](this, play); @@ -494,7 +492,7 @@ void EnHorseGameCheck_Update(Actor* thisx, PlayState* play) { } void EnHorseGameCheck_Draw(Actor* thisx, PlayState* play) { - EnHorseGameCheck* this = THIS; + EnHorseGameCheck* this = (EnHorseGameCheck*)thisx; if (D_808F9C5C[this->unk_15C] != NULL) { D_808F9C5C[this->unk_15C](this, play); diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 844b822508..c61edc8598 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnHorseLinkChild*)thisx) - void EnHorseLinkChild_Init(Actor* thisx, PlayState* play); void EnHorseLinkChild_Destroy(Actor* thisx, PlayState* play); void EnHorseLinkChild_Update(Actor* thisx, PlayState* play); @@ -173,7 +171,7 @@ f32 EnHorseLinkChild_GetAnimSpeed(EnHorseLinkChild* this) { } void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 64.8f * 0.0001f); @@ -211,7 +209,7 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) { } void EnHorseLinkChild_Destroy(Actor* thisx, PlayState* play) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; Skin_Free(&play->state, &this->skin); Collider_DestroyCylinder(play, &this->colldierCylinder); @@ -587,7 +585,7 @@ void EnHorseLinkChild_ActionFunc4(EnHorseLinkChild* this, PlayState* play) { void EnHorseLinkChild_Update(Actor* thisx, PlayState* play) { s32 pad; - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; sActionFuncs[this->action](this, play); @@ -617,7 +615,7 @@ void EnHorseLinkChild_Update(Actor* thisx, PlayState* play) { void EnHorseLinkChild_PostSkinDraw(Actor* thisx, PlayState* play, Skin* skin) { Vec3f sp4C; Vec3f sp40; - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; s32 i; for (i = 0; i < this->colliderJntSph.count; i++) { @@ -638,7 +636,7 @@ void EnHorseLinkChild_PostSkinDraw(Actor* thisx, PlayState* play, Skin* skin) { } s32 EnHorseLinkChild_OverrideSkinDraw(Actor* thisx, PlayState* play, s32 limbIndex, Skin* skin) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -654,7 +652,7 @@ s32 EnHorseLinkChild_OverrideSkinDraw(Actor* thisx, PlayState* play, s32 limbInd } void EnHorseLinkChild_Draw(Actor* thisx, PlayState* play) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); func_80138258(&this->actor, play, &this->skin, EnHorseLinkChild_PostSkinDraw, EnHorseLinkChild_OverrideSkinDraw, diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index 4b7b8b0668..6c4a75c57f 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnHs*)thisx) - void EnHs_Init(Actor* thisx, PlayState* play); void EnHs_Destroy(Actor* thisx, PlayState* play); void EnHs_Update(Actor* thisx, PlayState* play); @@ -71,7 +69,7 @@ void func_80952C50(EnHs* this, PlayState* play) { void EnHs_Init(Actor* thisx, PlayState* play) { s32 pad; - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gHsSkel, &gHsIdleAnim, this->jointTable, this->morphTable, @@ -92,7 +90,7 @@ void EnHs_Init(Actor* thisx, PlayState* play) { } void EnHs_Destroy(Actor* thisx, PlayState* play) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -276,7 +274,7 @@ void func_8095345C(EnHs* this, PlayState* play) { void EnHs_Update(Actor* thisx, PlayState* play) { s32 pad; - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); @@ -307,7 +305,7 @@ void EnHs_Update(Actor* thisx, PlayState* play) { } s32 EnHs_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; switch (limbIndex) { case HS_LIMB_HEAD: @@ -349,7 +347,7 @@ s32 EnHs_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnHs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; if (limbIndex == HS_LIMB_HEAD) { Matrix_MultVec3f(&D_8095393C, &this->actor.focus.pos); @@ -357,7 +355,7 @@ void EnHs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnHs_Draw(Actor* thisx, PlayState* play) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index ef2ecc49cc..5844215d1f 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnHs2*)thisx) - void EnHs2_Init(Actor* thisx, PlayState* play); void EnHs2_Destroy(Actor* thisx, PlayState* play); void EnHs2_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile En_Hs2_Profile = { }; void EnHs2_Init(Actor* thisx, PlayState* play) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; Actor_SetScale(&this->actor, 1.0f); this->actionFunc = EnHs2_DoNothing; @@ -43,7 +41,7 @@ void EnHs2_DoNothing(EnHs2* this, PlayState* play) { } void EnHs2_Update(Actor* thisx, PlayState* play) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Ig/z_en_ig.c b/src/overlays/actors/ovl_En_Ig/z_en_ig.c index 957116d0f5..d3b524b0c0 100644 --- a/src/overlays/actors/ovl_En_Ig/z_en_ig.c +++ b/src/overlays/actors/ovl_En_Ig/z_en_ig.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnIg*)thisx) - void EnIg_Init(Actor* thisx, PlayState* play); void EnIg_Destroy(Actor* thisx, PlayState* play); void EnIg_Update(Actor* thisx, PlayState* play); @@ -388,7 +386,7 @@ s16 func_80BF1744(EnIg* this, s32 numCutscenes) { } s32 func_80BF17BC(Actor* thisx, PlayState* play) { - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; s16 csId; s32 ret; @@ -973,7 +971,7 @@ void func_80BF2BD4(EnIg* this, PlayState* play) { } void EnIg_Init(Actor* thisx, PlayState* play) { - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 28.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_dai_Skel_0130D0, NULL, this->jointTable, this->morphTable, @@ -991,14 +989,14 @@ void EnIg_Init(Actor* thisx, PlayState* play) { } void EnIg_Destroy(Actor* thisx, PlayState* play) { - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroySphere(play, &this->collider2); } void EnIg_Update(Actor* thisx, PlayState* play) { - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; func_80BF19A0(this, play); @@ -1019,7 +1017,7 @@ void EnIg_Update(Actor* thisx, PlayState* play) { s32 EnIg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; if (limbIndex == OBJECT_DAI_LIMB_0A) { *dList = NULL; @@ -1031,7 +1029,7 @@ void EnIg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, static Vec3f D_80BF351C = { 1800.0f, -2000.0f, 0.0f }; static Vec3f D_80BF3528 = { 0.0f, 0.0f, 0.0f }; s32 pad; - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; Vec3f sp2C; if (limbIndex == OBJECT_DAI_LIMB_0B) { @@ -1058,7 +1056,7 @@ void EnIg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnIg_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx, Gfx** gfx) { - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; s32 stepRot; s32 overrideRot; @@ -1093,7 +1091,7 @@ void EnIg_Draw(Actor* thisx, PlayState* play) { object_dai_Tex_011FB0, object_dai_Tex_0127B0, }; s32 pad; - EnIg* this = THIS; + EnIg* this = (EnIg*)thisx; if (this->scheduleResult != 0) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index ebc8838625..0f9164d65e 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnIk*)thisx) - void EnIk_Init(Actor* thisx, PlayState* play); void EnIk_Destroy(Actor* thisx, PlayState* play); void EnIk_Update(Actor* thisx, PlayState* play2); @@ -270,7 +268,7 @@ static EffectBlureInit2 sBlureInit = { void EnIk_Init(Actor* thisx, PlayState* play) { static s32 sDisplayListDesegmented = false; s32 i; - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gIronKnuckleSkel, &gIronKnuckleWalkAnim, this->jointTable, @@ -296,7 +294,7 @@ void EnIk_Init(Actor* thisx, PlayState* play) { } void EnIk_Destroy(Actor* thisx, PlayState* play) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; Collider_DestroyTris(play, &this->colliderTris); Collider_DestroyCylinder(play, &this->colliderCylinder); @@ -871,7 +869,7 @@ void EnIk_UpdateArmor(EnIk* this, PlayState* play) { void EnIk_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (this->actionFunc != EnIk_PlayCutscene) { EnIk_UpdateDamage(this, play); @@ -969,7 +967,7 @@ static s8 sLimbToArmorBodyParts[IRON_KNUCKLE_LIMB_MAX] = { }; s32 EnIk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (this->drawArmorFlags != 0) { if (sLimbToArmorBodyParts[limbIndex] >= IRON_KNUCKLE_ARMOR_BODYPART_CHEST_FRONT) { @@ -1016,7 +1014,7 @@ static s8 sLimbToBodyParts[IRON_KNUCKLE_LIMB_MAX] = { }; void EnIk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; s32 armorBodyPart = sLimbToArmorBodyParts[limbIndex]; Gfx* gfx; IronKnuckleEffect* ikEffect; @@ -1134,7 +1132,7 @@ void EnIk_UpdateArmorDraw(EnIk* this, PlayState* play) { void EnIk_Draw(Actor* thisx, PlayState* play) { static Vec3f sScale = { 0.53f, 0.53f, 0.53f }; - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; Gfx* gfx; Gfx** gfxArmorType; s32 pad; diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 508f66b913..f9da2f7fd8 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnIn*)thisx) - void EnIn_Init(Actor* thisx, PlayState* play); void EnIn_Destroy(Actor* thisx, PlayState* play); void EnIn_Update(Actor* thisx, PlayState* play); @@ -1488,7 +1486,7 @@ static InitChainEntry sInitChain[] = { }; void EnIn_Init(Actor* thisx, PlayState* play) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; s32 pad[2]; s16 type; @@ -1586,13 +1584,13 @@ void EnIn_Init(Actor* thisx, PlayState* play) { } void EnIn_Destroy(Actor* thisx, PlayState* play) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); } void EnIn_Update(Actor* thisx, PlayState* play) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; func_808F3310(this, play); func_808F3334(this, play); @@ -1632,7 +1630,7 @@ void func_808F6334(EnIn* this, PlayState* play) { } s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; s32 pad; Gfx* sp50[OBJECT_IN_LIMB_MAX] = { NULL, // OBJECT_IN_LIMB_NONE @@ -1716,7 +1714,7 @@ s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnIn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; Vec3f sp50 = { 1600.0f, 0.0f, 0.0f }; Vec3f sp44 = { 0.0f, 0.0f, 0.0f }; @@ -1759,7 +1757,7 @@ void EnIn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnIn_Draw(Actor* thisx, PlayState* play) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index f0f5219f6f..213da30d6a 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnInsect*)thisx) - void EnInsect_Init(Actor* thisx, PlayState* play); void EnInsect_Destroy(Actor* thisx, PlayState* play2); void EnInsect_Update(Actor* thisx, PlayState* play); @@ -120,7 +118,7 @@ void func_8091A9E4(EnInsect* this) { } void EnInsect_Init(Actor* thisx, PlayState* play) { - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; f32 rand; this->actor.world.rot.y = Rand_Next() & 0xFFFF; @@ -166,7 +164,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play) { void EnInsect_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -442,7 +440,7 @@ void func_8091B984(EnInsect* this, PlayState* play) { } void EnInsect_Update(Actor* thisx, PlayState* play) { - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; s32 updBgCheckInfoFlags; if ((this->actor.child != NULL) && (this->actor.child->update == NULL) && (&this->actor != this->actor.child)) { @@ -505,7 +503,7 @@ void EnInsect_Update(Actor* thisx, PlayState* play) { } void EnInsect_Draw(Actor* thisx, PlayState* play) { - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL); diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 7963ebc70d..25a8f560a7 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -39,8 +39,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnInvadepoh*)thisx) - #define ALIEN_COUNT 8 #define EFFECT_COUNT 10 #define MAX_KILL_COUNT 12 @@ -2225,7 +2223,7 @@ void EnInvadepoh_Init(Actor* thisx, PlayState* play2) { EnInvadepoh_Alien_Init, // EN_INVADEPOH_TYPE_ALIEN_ABDUCTOR }; PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; sInitFuncs[EN_INVADEPOH_GET_TYPE(&this->actor)](this, play); } @@ -2307,7 +2305,7 @@ void EnInvadepoh_Destroy(Actor* thisx, PlayState* play2) { EnInvadepoh_AlienAbductor_Destroy, // EN_INVADEPOH_TYPE_ALIEN_ABDUCTOR }; PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; sDestroyFuncs[EN_INVADEPOH_GET_TYPE(&this->actor)](this, play); } @@ -2514,7 +2512,7 @@ void EnInvadepoh_InvasionHandler_FailureEnd(EnInvadepoh* this, PlayState* play) void EnInvadepoh_InvasionHandler_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; this->actionFunc(this, play); @@ -2784,7 +2782,7 @@ void EnInvadepoh_Alien_Dead(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_Alien_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->actor.objectSlot = this->objectSlot; @@ -2816,7 +2814,7 @@ void EnInvadepoh_Alien_WaitForObject(Actor* thisx, PlayState* play2) { void EnInvadepoh_Alien_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (sInvasionState == INVASION_STATE_SUCCESS) { // The player successfully defended the ranch from the aliens, so this alien should either play its death @@ -2876,7 +2874,7 @@ void EnInvadepoh_Alien_Update(Actor* thisx, PlayState* play2) { void EnInvadepoh_Cow_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->actor.objectSlot = this->objectSlot; @@ -2895,7 +2893,7 @@ void EnInvadepoh_Cow_Update(Actor* thisx, PlayState* play2) { -0x2AF8 // EN_INVADEPOH_COW_INDEX_2 }; PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 index; if ((sUfo == NULL) || (this->actor.parent == NULL)) { @@ -2926,7 +2924,7 @@ void EnInvadepoh_Cow_Update(Actor* thisx, PlayState* play2) { void EnInvadepoh_CowTail_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->actor.objectSlot = this->objectSlot; @@ -2941,7 +2939,7 @@ void EnInvadepoh_CowTail_WaitForObject(Actor* thisx, PlayState* play2) { void EnInvadepoh_CowTail_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if ((sUfo == NULL) || (this->actor.parent == NULL)) { Actor_Kill(&this->actor); @@ -3059,7 +3057,7 @@ void EnInvadepoh_AbductedRomani_End(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_AbductedRomani_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 pad; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { @@ -3078,7 +3076,7 @@ void EnInvadepoh_AbductedRomani_WaitForObject(Actor* thisx, PlayState* play2) { void EnInvadepoh_AbductedRomani_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; EnInvadepohModelInfo* modelInfo = &this->modelInfo; if (this->actor.parent == NULL) { @@ -3290,7 +3288,7 @@ void EnInvadepoh_SilentRomani_Talk(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_SilentRomani_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->actor.objectSlot = this->objectSlot; @@ -3313,7 +3311,7 @@ void EnInvadepoh_SilentRomani_WaitForObject(Actor* thisx, PlayState* play2) { void EnInvadepoh_SilentRomani_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 talkAccepted = Actor_TalkOfferAccepted(&this->actor, &play->state); @@ -3604,7 +3602,7 @@ void EnInvadepoh_Ufo_OutroDescend(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_Ufo_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; f32 scaleMod; this->actionFunc(this, play); @@ -3708,7 +3706,7 @@ void EnInvadepoh_Night1Romani_Talk(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_Night1Romani_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 pad; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { @@ -3757,7 +3755,7 @@ void EnInvadepoh_Night1Romani_WaitForObject(Actor* thisx, PlayState* play2) { */ void EnInvadepoh_Night1Romani_WaitForTime(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if ((CURRENT_TIME < CLOCK_TIME(6, 00)) && (CURRENT_TIME >= CLOCK_TIME(2, 00))) { this->actor.update = EnInvadepoh_Night1Romani_Update; @@ -3768,7 +3766,7 @@ void EnInvadepoh_Night1Romani_WaitForTime(Actor* thisx, PlayState* play2) { void EnInvadepoh_Night1Romani_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 talkAccepted = Actor_TalkOfferAccepted(&this->actor, &play->state); @@ -3973,7 +3971,7 @@ void EnInvadepoh_BarnRomani_Talk(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_BarnRomani_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 pad; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { @@ -4021,7 +4019,7 @@ void EnInvadepoh_BarnRomani_WaitForObject(Actor* thisx, PlayState* play2) { */ void EnInvadepoh_BarnRomani_WaitForTime(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if ((CURRENT_TIME < CLOCK_TIME(6, 00)) && (CURRENT_TIME >= CLOCK_TIME(2, 15))) { this->actor.update = EnInvadepoh_BarnRomani_Update; @@ -4032,7 +4030,7 @@ void EnInvadepoh_BarnRomani_WaitForTime(Actor* thisx, PlayState* play2) { void EnInvadepoh_BarnRomani_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 talkAccepted = Actor_TalkOfferAccepted(&this->actor, &play->state); @@ -4182,7 +4180,7 @@ void EnInvadepoh_RewardRomani_Finish(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_RewardRomani_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; EnInvadepohModelInfo* modelInfo = &this->modelInfo; if (Object_IsLoaded(&play2->objectCtx, this->objectSlot)) { @@ -4206,7 +4204,7 @@ void EnInvadepoh_RewardRomani_WaitForObject(Actor* thisx, PlayState* play2) { void EnInvadepoh_RewardRomani_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; EnInvadepohModelInfo* modelInfo = &this->modelInfo; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); @@ -4375,7 +4373,7 @@ void EnInvadepoh_Dog_Jump(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_Dog_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (!Object_IsLoaded(&play->objectCtx, this->objectSlot)) { return; @@ -4410,7 +4408,7 @@ void EnInvadepoh_Dog_WaitForObject(Actor* thisx, PlayState* play2) { */ void EnInvadepoh_Dog_WaitForInvasion(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (sInvasionState == INVASION_STATE_ACTIVE) { this->actor.update = EnInvadepoh_Dog_Update; @@ -4422,7 +4420,7 @@ void EnInvadepoh_Dog_WaitForInvasion(Actor* thisx, PlayState* play2) { void EnInvadepoh_Dog_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); sClosestAlienThreat = EnInvadepoh_Dog_GetClosestAlienThreat(); @@ -4648,7 +4646,7 @@ void EnInvadepoh_Night3Cremia_Idle(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_Night3Cremia_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 pad; if (Object_IsLoaded(&play2->objectCtx, this->objectSlot)) { @@ -4693,7 +4691,7 @@ void EnInvadepoh_Night3Cremia_WaitForObject(Actor* thisx, PlayState* play2) { */ void EnInvadepoh_Night3Cremia_WaitForTime(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if ((CURRENT_TIME >= CLOCK_TIME(20, 00) + 30) && (CURRENT_TIME < CLOCK_TIME(20, 15))) { this->actor.update = EnInvadepoh_Night3Cremia_Update; @@ -4704,7 +4702,7 @@ void EnInvadepoh_Night3Cremia_WaitForTime(Actor* thisx, PlayState* play2) { void EnInvadepoh_Night3Cremia_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 talkAccepted = Actor_TalkOfferAccepted(&this->actor, &play->state); @@ -4882,7 +4880,7 @@ void EnInvadepoh_Night3Romani_Idle(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_Night3Romani_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 pad; if (Object_IsLoaded(&play2->objectCtx, this->objectSlot)) { @@ -4922,7 +4920,7 @@ void EnInvadepoh_Night3Romani_WaitForObject(Actor* thisx, PlayState* play2) { */ void EnInvadepoh_Night3Romani_WaitForTime(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if ((CURRENT_TIME >= CLOCK_TIME(20, 00)) && (CURRENT_TIME < CLOCK_TIME(20, 14) + 15)) { this->actor.update = EnInvadepoh_Night3Romani_Update; @@ -4933,7 +4931,7 @@ void EnInvadepoh_Night3Romani_WaitForTime(Actor* thisx, PlayState* play2) { void EnInvadepoh_Night3Romani_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 inUncullRange = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 talkAccepted = Actor_TalkOfferAccepted(&this->actor, &play->state); @@ -5102,7 +5100,7 @@ void EnInvadepoh_AlienAbductor_AbductRomani(EnInvadepoh* this, PlayState* play) void EnInvadepoh_AlienAbductor_WaitForObject(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; s32 index; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { @@ -5126,7 +5124,7 @@ void EnInvadepoh_AlienAbductor_WaitForObject(Actor* thisx, PlayState* play2) { void EnInvadepoh_AlienAbductor_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; this->actionFunc(this, play); @@ -5177,7 +5175,7 @@ s32 EnInvadepoh_Alien_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dLi void EnInvadepoh_Alien_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx, Gfx** gfx) { static Vec3f sFocusOffset = { 2000.0f, 1000.0f, 0.0f }; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if ((limbIndex == ALIEN_LIMB_LEFT_EYE) && (this->eyeBeamAlpha != 0)) { Matrix_Push(); @@ -5202,7 +5200,7 @@ void EnInvadepoh_Alien_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, void EnInvadepoh_Alien_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -5311,7 +5309,7 @@ void EnInvadepoh_Alien_Draw(Actor* thisx, PlayState* play2) { s32 EnInvadepoh_Cow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { if (limbIndex == COW_LIMB_NOSE_RING) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x -= this->actor.shape.rot.x; } @@ -5321,7 +5319,7 @@ s32 EnInvadepoh_Cow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList void EnInvadepoh_Cow_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, @@ -5330,7 +5328,7 @@ void EnInvadepoh_Cow_Draw(Actor* thisx, PlayState* play2) { void EnInvadepoh_CowTail_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, @@ -5340,13 +5338,13 @@ void EnInvadepoh_CowTail_Draw(Actor* thisx, PlayState* play2) { s32 EnInvadepoh_Romani_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { if (limbIndex == ROMANI_LIMB_HEAD) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += this->modelInfo.headRot.y; rot->y += this->modelInfo.headRot.z; rot->z += this->modelInfo.headRot.x; } else if (limbIndex == ROMANI_LIMB_TORSO) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += (s16)(this->modelInfo.torsoRotScaleY * this->modelInfo.headRot.y); rot->z += this->modelInfo.torsoRotX; @@ -5357,7 +5355,7 @@ s32 EnInvadepoh_Romani_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dL void EnInvadepoh_Romani_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { static Vec3f sFocusOffset = { 400.0f, 270.0f, 0.0f }; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; if (limbIndex == ROMANI_LIMB_LEFT_HAND) { OPEN_DISPS(play->state.gfxCtx); @@ -5371,7 +5369,7 @@ void EnInvadepoh_Romani_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList } void EnInvadepoh_Romani_Draw(Actor* thisx, PlayState* play) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -5386,7 +5384,7 @@ void EnInvadepoh_Romani_Draw(Actor* thisx, PlayState* play) { void EnInvadepoh_Ufo_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; Vec3f flashPos; Matrix_Push(); @@ -5422,7 +5420,7 @@ s32 EnInvadepoh_Dog_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList Actor* thisx) { if ((limbIndex == DOG_LIMB_HEAD) || (limbIndex == DOG_LIMB_RIGHT_FACE_HAIR) || (limbIndex == DOG_LIMB_LEFT_FACE_HAIR)) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += this->modelInfo.headRot.x; rot->y += this->modelInfo.headRot.y; @@ -5434,14 +5432,14 @@ s32 EnInvadepoh_Dog_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList void EnInvadepoh_Dog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { if (limbIndex == DOG_LIMB_HEAD) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; Matrix_MultVecY(20.0f, &this->actor.focus.pos); } } void EnInvadepoh_Dog_Draw(Actor* thisx, PlayState* play) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -5456,13 +5454,13 @@ void EnInvadepoh_Dog_Draw(Actor* thisx, PlayState* play) { s32 EnInvadepoh_Cremia_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { if (limbIndex == CREMIA_LIMB_HEAD) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += this->modelInfo.headRot.y; rot->y += this->modelInfo.headRot.z; rot->z += this->modelInfo.headRot.x; } else if (limbIndex == CREMIA_LIMB_TORSO) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += (s16)(this->modelInfo.torsoRotScaleY * this->modelInfo.headRot.y); } @@ -5472,14 +5470,14 @@ s32 EnInvadepoh_Cremia_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dL void EnInvadepoh_Cremia_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { if (limbIndex == CREMIA_LIMB_HEAD) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; Matrix_MultZero(&this->actor.focus.pos); } } void EnInvadepoh_Cremia_Draw(Actor* thisx, PlayState* play) { - EnInvadepoh* this = THIS; + EnInvadepoh* this = (EnInvadepoh*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c b/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c index 166e58b36a..9a3bb2280d 100644 --- a/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c +++ b/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c @@ -21,8 +21,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnInvadepohDemo*)thisx) - void EnInvadepohDemo_Init(Actor* thisx, PlayState* play); void EnInvadepohDemo_Destroy(Actor* thisx, PlayState* play); void EnInvadepohDemo_Update(Actor* thisx, PlayState* play); @@ -769,7 +767,7 @@ void EnInvadepohDemo_CowTail_Draw(EnInvadepohDemo* this, PlayState* play) { void EnInvadepohDemo_Init(Actor* thisx, PlayState* play) { s32 pad; - EnInvadepohDemo* this = THIS; + EnInvadepohDemo* this = (EnInvadepohDemo*)thisx; this->cueIdOffset = EN_INVADEPOH_DEMO_GET_CUEID_OFFSET(&this->actor); this->type = EN_INVADEPOH_DEMO_GET_TYPE(&this->actor); @@ -799,21 +797,21 @@ void EnInvadepohDemo_Init(Actor* thisx, PlayState* play) { void EnInvadepohDemo_Destroy(Actor* thisx, PlayState* play) { s32 pad; - EnInvadepohDemo* this = THIS; + EnInvadepohDemo* this = (EnInvadepohDemo*)thisx; sDestroyFuncs[this->type](this, play); } void EnInvadepohDemo_Update(Actor* thisx, PlayState* play) { s32 pad; - EnInvadepohDemo* this = THIS; + EnInvadepohDemo* this = (EnInvadepohDemo*)thisx; this->actionFunc(this, play); } void EnInvadepohDemo_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnInvadepohDemo* this = THIS; + EnInvadepohDemo* this = (EnInvadepohDemo*)thisx; if ((this->cueId != EN_INVADEPOH_DEMO_CUEID_NONE) && (this->drawFlags & DRAW_FLAG_SHOULD_DRAW)) { sDrawFuncs[this->type](this, play); diff --git a/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c b/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c index 91f77fa351..e0110493de 100644 --- a/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c +++ b/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnInvisibleRuppe*)thisx) - void EnInvisibleRuppe_Init(Actor* thisx, PlayState* play); void EnInvisibleRuppe_Destroy(Actor* thisx, PlayState* play); void EnInvisibleRuppe_Update(Actor* thisx, PlayState* play); @@ -94,7 +92,7 @@ void func_80C259E8(EnInvisibleRuppe* this, PlayState* play) { void EnInvisibleRuppe_Init(Actor* thisx, PlayState* play) { s32 pad; - EnInvisibleRuppe* this = THIS; + EnInvisibleRuppe* this = (EnInvisibleRuppe*)thisx; this->switchFlag = INVISIBLERUPPE_GET_SWITCH_FLAG(&this->actor); @@ -114,13 +112,13 @@ void EnInvisibleRuppe_Init(Actor* thisx, PlayState* play) { } void EnInvisibleRuppe_Destroy(Actor* thisx, PlayState* play) { - EnInvisibleRuppe* this = THIS; + EnInvisibleRuppe* this = (EnInvisibleRuppe*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnInvisibleRuppe_Update(Actor* thisx, PlayState* play) { - EnInvisibleRuppe* this = THIS; + EnInvisibleRuppe* this = (EnInvisibleRuppe*)thisx; this->actionFunc(this, play); func_80C258A0(this, play); diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 6db4e669de..a2e43d39f1 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_THROW_ONLY) -#define THIS ((EnIshi*)thisx) - void EnIshi_Init(Actor* thisx, PlayState* play); void EnIshi_Destroy(Actor* thisx, PlayState* play2); void EnIshi_Update(Actor* thisx, PlayState* play); @@ -146,7 +144,7 @@ static u16 D_8095F7AC[] = { NA_SE_PL_PULL_UP_ROCK, NA_SE_PL_PULL_UP_BIGROCK }; static EnIshiUnkFunc D_8095F7B0[] = { func_8095F210, func_8095F36C }; void func_8095D6E0(Actor* thisx, PlayState* play) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit[ENISHI_GET_1(&this->actor)]); @@ -171,7 +169,7 @@ s32 func_8095D758(EnIshi* this, PlayState* play, f32 arg2) { } void func_8095D804(Actor* thisx, PlayState* play) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; s32 i; s16 objectId; Gfx* phi_s4; @@ -212,7 +210,7 @@ void func_8095D804(Actor* thisx, PlayState* play) { } void func_8095DABC(Actor* thisx, PlayState* play) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; Vec3f spD8; Vec3f spCC; f32 temp_f20; @@ -378,7 +376,7 @@ s32 EnIshi_IsUnderwater(EnIshi* this, PlayState* play) { void EnIshi_Init(Actor* thisx, PlayState* play) { s32 pad; - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; s32 sp34 = ENISHI_GET_1(&this->actor); s32 sp30 = ENISHI_GET_4(&this->actor); @@ -436,7 +434,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) { void EnIshi_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -695,7 +693,7 @@ void func_8095F194(EnIshi* this, PlayState* play) { } void EnIshi_Update(Actor* thisx, PlayState* play) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; this->actionFunc(this, play); } @@ -757,7 +755,7 @@ void func_8095F36C(EnIshi* this, PlayState* play) { } void func_8095F61C(Actor* thisx, PlayState* play) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; D_8095F7B0[ENISHI_GET_1(&this->actor)](this, play); } diff --git a/src/overlays/actors/ovl_En_Ja/z_en_ja.c b/src/overlays/actors/ovl_En_Ja/z_en_ja.c index e4f3d794eb..11600cc3e7 100644 --- a/src/overlays/actors/ovl_En_Ja/z_en_ja.c +++ b/src/overlays/actors/ovl_En_Ja/z_en_ja.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnJa*)thisx) - void EnJa_Init(Actor* thisx, PlayState* play); void EnJa_Destroy(Actor* thisx, PlayState* play); void EnJa_Update(Actor* thisx, PlayState* play); @@ -419,7 +417,7 @@ void func_80BC22F4(EnJa* this, PlayState* play) { } void EnJa_Init(Actor* thisx, PlayState* play) { - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_boj_Skel_00C240, NULL, this->jointTable, this->morphTable, @@ -440,13 +438,13 @@ void EnJa_Init(Actor* thisx, PlayState* play) { } void EnJa_Destroy(Actor* thisx, PlayState* play) { - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnJa_Update(Actor* thisx, PlayState* play) { - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; f32 height; f32 radius; @@ -476,7 +474,7 @@ void EnJa_Update(Actor* thisx, PlayState* play) { } s32 EnJa_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; if (limbIndex == OBJECT_BOJ_LIMB_0F) { func_80BC1E40(this, play); @@ -491,7 +489,7 @@ void EnJa_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, static Vec3f D_80BC3798 = { 400.0f, 0.0f, 400.0f }; static Vec3s D_80BC37A4 = { 0x7770, -0x4BC, -0x251C }; s32 pad; - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; s32 pad2; if (limbIndex == OBJECT_BOJ_LIMB_0F) { @@ -596,7 +594,7 @@ void EnJa_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnJa_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; s32 stepRot; s32 overrideRot; @@ -663,7 +661,7 @@ void EnJa_Draw(Actor* thisx, PlayState* play) { object_boj_Tex_0063B0, }; s32 pad; - EnJa* this = THIS; + EnJa* this = (EnJa*)thisx; s32 phi_t2; if (ENJA_GET_3(&this->actor) == 0) { diff --git a/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c b/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c index 988711a542..cb5911cfad 100644 --- a/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c +++ b/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnJcMato*)thisx) - void EnJcMato_Init(Actor* thisx, PlayState* play); void EnJcMato_Destroy(Actor* thisx, PlayState* play); void EnJcMato_Update(Actor* thisx, PlayState* play); @@ -117,7 +115,7 @@ void EnJcMato_Idle(EnJcMato* this, PlayState* play) { } void EnJcMato_Init(Actor* thisx, PlayState* play) { - EnJcMato* this = THIS; + EnJcMato* this = (EnJcMato*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); Collider_InitSphere(play, &this->collider); @@ -131,13 +129,13 @@ void EnJcMato_Init(Actor* thisx, PlayState* play) { } void EnJcMato_Destroy(Actor* thisx, PlayState* play) { - EnJcMato* this = THIS; + EnJcMato* this = (EnJcMato*)thisx; Collider_DestroySphere(play, &this->collider); } void EnJcMato_Update(Actor* thisx, PlayState* play) { - EnJcMato* this = THIS; + EnJcMato* this = (EnJcMato*)thisx; this->actionFunc(this, play); if (!CHECK_EVENTINF(EVENTINF_40)) { @@ -147,7 +145,7 @@ void EnJcMato_Update(Actor* thisx, PlayState* play) { void EnJcMato_Draw(Actor* thisx, PlayState* play) { static Vec3f sOffset = { 0.0f, -2500.0f, 0.0f }; - EnJcMato* this = THIS; + EnJcMato* this = (EnJcMato*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index 570cd47196..9ff867dd24 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnJg*)thisx) - #define FLAG_SHRINE_GORON_ARMS_RAISED (1 << 0) #define FLAG_LOOKING_AT_PLAYER (1 << 2) #define FLAG_DRUM_SPAWNED (1 << 3) @@ -942,7 +940,7 @@ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play void EnJg_Init(Actor* thisx, PlayState* play) { s32 pad; - EnJg* this = THIS; + EnJg* this = (EnJg*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGoronElderSkel, &gGoronElderIdleAnim, this->jointTable, @@ -981,13 +979,13 @@ void EnJg_Init(Actor* thisx, PlayState* play) { } void EnJg_Destroy(Actor* thisx, PlayState* play) { - EnJg* this = THIS; + EnJg* this = (EnJg*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnJg_Update(Actor* thisx, PlayState* play) { - EnJg* this = THIS; + EnJg* this = (EnJg*)thisx; if ((this->actionFunc != EnJg_FrozenIdle) && (this->actionFunc != EnJg_EndFrozenInteraction)) { EnJg_UpdateCollision(this, play); @@ -1004,7 +1002,7 @@ void EnJg_Update(Actor* thisx, PlayState* play) { } s32 EnJg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnJg* this = THIS; + EnJg* this = (EnJg*)thisx; if (limbIndex == GORON_ELDER_LIMB_ROOT) { if (this->flags & FLAG_LOOKING_AT_PLAYER) { @@ -1021,7 +1019,7 @@ s32 EnJg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnJg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnJg* this = THIS; + EnJg* this = (EnJg*)thisx; if (limbIndex == GORON_ELDER_LIMB_HEAD) { Matrix_MultVec3f(&sFocusOffset, &this->actor.focus.pos); @@ -1036,7 +1034,7 @@ void EnJg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnJg_Draw(Actor* thisx, PlayState* play) { - EnJg* this = THIS; + EnJg* this = (EnJg*)thisx; SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnJg_OverrideLimbDraw, EnJg_PostLimbDraw, &this->actor); diff --git a/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c b/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c index 87dc0951a3..d61e948eef 100644 --- a/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c +++ b/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnJgameTsn*)thisx) - void EnJgameTsn_Init(Actor* thisx, PlayState* play); void EnJgameTsn_Destroy(Actor* thisx, PlayState* play); void EnJgameTsn_Update(Actor* thisx, PlayState* play); @@ -89,7 +87,7 @@ TexturePtr D_80C150A4[] = { void EnJgameTsn_Init(Actor* thisx, PlayState* play) { s32 pad; - EnJgameTsn* this = THIS; + EnJgameTsn* this = (EnJgameTsn*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_tsn_Skel_008AB8, &object_tsn_Anim_0092FC, this->jointTable, @@ -146,7 +144,7 @@ void func_80C13A2C(EnJgameTsn* this, PlayState* play) { } void EnJgameTsn_Destroy(Actor* thisx, PlayState* play) { - EnJgameTsn* this = THIS; + EnJgameTsn* this = (EnJgameTsn*)thisx; Collider_DestroyCylinder(play, &this->collider); CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_20); @@ -615,7 +613,7 @@ void func_80C14D58(EnJgameTsn* this, PlayState* play) { } void EnJgameTsn_Update(Actor* thisx, PlayState* play) { - EnJgameTsn* this = THIS; + EnJgameTsn* this = (EnJgameTsn*)thisx; this->actionFunc(this, play); @@ -625,7 +623,7 @@ void EnJgameTsn_Update(Actor* thisx, PlayState* play) { } s32 EnJgamesTsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnJgameTsn* this = THIS; + EnJgameTsn* this = (EnJgameTsn*)thisx; s16 temp_v0 = this->headRot.x >> 1; if (limbIndex == OBJECT_TSN_LIMB_0F) { @@ -645,7 +643,7 @@ void EnJgamesTsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnJgameTsn_Draw(Actor* thisx, PlayState* play) { - EnJgameTsn* this = THIS; + EnJgameTsn* this = (EnJgameTsn*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 88b45970f3..adf516d216 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnJs*)thisx) - void EnJs_Init(Actor* thisx, PlayState* play); void EnJs_Destroy(Actor* thisx, PlayState* play); void EnJs_Update(Actor* thisx, PlayState* play); @@ -78,7 +76,7 @@ void EnJs_Init(Actor* thisx, PlayState* play) { s32 pad; s16 csId; s32 i; - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; Actor_SetScale(&this->actor, 0.01f); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); @@ -147,7 +145,7 @@ void EnJs_Init(Actor* thisx, PlayState* play) { void EnJs_Destroy(Actor* thisx, PlayState* play) { u32 paramsF; - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; Collider_DestroyCylinder(play, &this->collider); @@ -1071,7 +1069,7 @@ void func_8096A6F4(EnJs* this, PlayState* play) { void EnJs_Update(Actor* thisx, PlayState* play) { s32 pad; - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); @@ -1095,7 +1093,7 @@ void EnJs_Update(Actor* thisx, PlayState* play) { void EnJs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad; - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; if (limbIndex == MOONCHILD_LIMB_HEAD) { Matrix_MultVec3f(&D_8096AC30, &thisx->focus.pos); @@ -1118,7 +1116,7 @@ void EnJs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnJs_Draw(Actor* thisx, PlayState* play) { - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Jso/z_en_jso.c b/src/overlays/actors/ovl_En_Jso/z_en_jso.c index 4f2ec6e7bc..3460bf9037 100644 --- a/src/overlays/actors/ovl_En_Jso/z_en_jso.c +++ b/src/overlays/actors/ovl_En_Jso/z_en_jso.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnJso*)thisx) - void EnJso_Init(Actor* thisx, PlayState* play); void EnJso_Destroy(Actor* thisx, PlayState* play); void EnJso_Update(Actor* thisx, PlayState* play); @@ -260,7 +258,7 @@ static u8 sAnimationModes[EN_JSO_ANIM_MAX] = { }; void EnJso_Init(Actor* thisx, PlayState* play) { - EnJso* this = THIS; + EnJso* this = (EnJso*)thisx; EffectBlureInit1 rightSwordBlureInit; EffectBlureInit1 leftSwordBlureInit; @@ -310,7 +308,7 @@ void EnJso_Init(Actor* thisx, PlayState* play) { } void EnJso_Destroy(Actor* thisx, PlayState* play) { - EnJso* this = THIS; + EnJso* this = (EnJso*)thisx; EnEncount3* parent; Collider_DestroyCylinder(play, &this->bodyCollider); @@ -1441,7 +1439,7 @@ void EnJso_UpdateDamage(EnJso* this, PlayState* play) { } void EnJso_Update(Actor* thisx, PlayState* play) { - EnJso* this = THIS; + EnJso* this = (EnJso*)thisx; s32 pad; if ((this->action != EN_JSO_ACTION_CIRCLE_PLAYER) && !this->disableAnimations) { @@ -1535,7 +1533,7 @@ void EnJso_Update(Actor* thisx, PlayState* play) { } s32 EnJso_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnJso* this = THIS; + EnJso* this = (EnJso*)thisx; if (limbIndex == GARO_LIMB_RIGHT_ARM) { rot->x += this->rightArmRot.x; @@ -1569,7 +1567,7 @@ void EnJso_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, static Vec3f sSwordBaseOffset = { 0.0f, 0.0f, 0.0f }; static Vec3f sSwordTipQuadOffset = { 1700.0f, 0.0f, 0.0f }; static Vec3f sSwordBaseQuadOffset = { 0.0f, 0.0f, 0.0f }; - EnJso* this = THIS; + EnJso* this = (EnJso*)thisx; Vec3f swordTipPos; Vec3f swordBasePos; @@ -1657,7 +1655,7 @@ void EnJso_Draw(Actor* thisx, PlayState* play) { static s16 sAfterimageAlpha[EN_JSO_AFTERIMAGE_COUNT] = { 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, }; - EnJso* this = THIS; + EnJso* this = (EnJso*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c b/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c index ac5b8216c5..1951627689 100644 --- a/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c +++ b/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c @@ -16,8 +16,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000 | \ ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnJso2*)thisx) - void EnJso2_Init(Actor* thisx, PlayState* play); void EnJso2_Destroy(Actor* thisx, PlayState* play); void EnJso2_Update(Actor* thisx, PlayState* play); @@ -343,7 +341,7 @@ static u8 sAnimationModes[EN_JSO2_ANIM_MAX] = { }; void EnJso2_Init(Actor* thisx, PlayState* play) { - EnJso2* this = THIS; + EnJso2* this = (EnJso2*)thisx; EffectBlureInit1 rightSwordBlureInit; EffectBlureInit1 leftSwordBlureInit; @@ -409,7 +407,7 @@ void EnJso2_Init(Actor* thisx, PlayState* play) { } void EnJso2_Destroy(Actor* thisx, PlayState* play) { - EnJso2* this = THIS; + EnJso2* this = (EnJso2*)thisx; Collider_DestroyCylinder(play, &this->bodyCollider); Collider_DestroyQuad(play, &this->rightSwordCollider); @@ -1634,7 +1632,7 @@ void EnJso2_UpdateDamage(EnJso2* this, PlayState* play) { } void EnJso2_Update(Actor* thisx, PlayState* play) { - EnJso2* this = THIS; + EnJso2* this = (EnJso2*)thisx; s32 pad; s32 i; @@ -1713,7 +1711,7 @@ void EnJso2_Update(Actor* thisx, PlayState* play) { } s32 EnJso2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnJso2* this = THIS; + EnJso2* this = (EnJso2*)thisx; if (this->swordState == EN_JSO2_SWORD_STATE_NONE_DRAWN) { if ((limbIndex == GARO_MASTER_LIMB_LEFT_SWORD) && (this->action != EN_JSO2_ACTION_BLOW_UP)) { @@ -1733,7 +1731,7 @@ void EnJso2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot static Vec3f sSwordBaseOffset = { 0.0f, 0.0f, 0.0f }; static Vec3f sSwordTipQuadOffset = { 1700.0f, 0.0f, 0.0f }; static Vec3f sSwordBaseQuadOffset = { 0.0f, 0.0f, 0.0f }; - EnJso2* this = THIS; + EnJso2* this = (EnJso2*)thisx; Vec3f swordTipPos; Vec3f swordBasePos; Vec3f bombOffset = { 0.0f, 0.0f, 0.0f }; @@ -1841,7 +1839,7 @@ void EnJso2_Draw(Actor* thisx, PlayState* play2) { static s16 sAfterimageAlpha[EN_JSO2_AFTERIMAGE_COUNT] = { 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, }; - EnJso2* this = THIS; + EnJso2* this = (EnJso2*)thisx; PlayState* play = play2; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c index 5a0547ec87..adb9513259 100644 --- a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c +++ b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_100000) -#define THIS ((EnKaizoku*)thisx) - void EnKaizoku_Init(Actor* thisx, PlayState* play); void EnKaizoku_Destroy(Actor* thisx, PlayState* play); void EnKaizoku_Update(Actor* thisx, PlayState* play2); @@ -250,7 +248,7 @@ static u8 sAnimationModes[EN_KAIZOKU_ANIM_MAX] = { void EnKaizoku_Init(Actor* thisx, PlayState* play) { s32 pad; - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; Player* player = GET_PLAYER(play); EffectBlureInit1 blureInit; @@ -309,7 +307,7 @@ void EnKaizoku_Init(Actor* thisx, PlayState* play) { } void EnKaizoku_Destroy(Actor* thisx, PlayState* play) { - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; Effect_Destroy(play, this->blureIndex); Collider_DestroyCylinder(play, &this->bodyCollider); @@ -1976,7 +1974,7 @@ static TexturePtr sEyeTextures[] = { }; void EnKaizoku_Update(Actor* thisx, PlayState* play2) { - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; PlayState* play = play2; Vec3f sp34; s32 pad; @@ -2050,7 +2048,7 @@ void EnKaizoku_Update(Actor* thisx, PlayState* play2) { } s32 EnKaizoku_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -2080,7 +2078,7 @@ s32 EnKaizoku_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 void EnKaizoku_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { Vec3f swordTip; Vec3f swordHilt; - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; if (limbIndex == KAIZOKU_LIMB_R_SWORD) { Matrix_MultVec3f(&sSwordQuadOffset1, &this->swordCollider.dim.quad[1]); @@ -2125,7 +2123,7 @@ void EnKaizoku_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnKaizoku_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; if (limbIndex == KAIZOKU_LIMB_R_SWORD) { Matrix_Scale(this->unk_2F8.x, this->unk_2F8.y, this->unk_2F8.z, MTXMODE_APPLY); @@ -2138,7 +2136,7 @@ void EnKaizoku_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { void EnKaizoku_Draw(Actor* thisx, PlayState* play) { f32 pad[4]; f32 drawDmgEffAlpha; - EnKaizoku* this = THIS; + EnKaizoku* this = (EnKaizoku*)thisx; Gfx_SetupDL25_Xlu(play->state.gfxCtx); Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index de136f1c9a..9b11963977 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnKakasi*)thisx) - void EnKakasi_Init(Actor* thisx, PlayState* play); void EnKakasi_Destroy(Actor* thisx, PlayState* play); void EnKakasi_Update(Actor* thisx, PlayState* play); @@ -153,13 +151,13 @@ static u8 sAnimationModes[ENKAKASI_ANIM_MAX] = { }; void EnKakasi_Destroy(Actor* thisx, PlayState* play) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnKakasi_Init(Actor* thisx, PlayState* play) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; s32 csId; s32 i; @@ -1130,7 +1128,7 @@ void EnKakasi_RisenDialogue(EnKakasi* this, PlayState* play) { } void EnKakasi_Update(Actor* thisx, PlayState* play) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; s32 pad; SkelAnime_Update(&this->skelAnime); @@ -1168,7 +1166,7 @@ void EnKakasi_Update(Actor* thisx, PlayState* play) { } void EnKakasi_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; if (limbIndex == OBJECT_KA_LIMB_04) { Matrix_MultVec3f(&gZeroVec3f, &this->unk1BC); @@ -1176,7 +1174,7 @@ void EnKakasi_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void EnKakasi_Draw(Actor* thisx, PlayState* play) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, EnKakasi_PostLimbDraw, &this->picto.actor); diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.c b/src/overlays/actors/ovl_En_Kame/z_en_kame.c index 7c8b34d048..2a1f614c90 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnKame*)thisx) - void EnKame_Init(Actor* thisx, PlayState* play); void EnKame_Destroy(Actor* thisx, PlayState* play); void EnKame_Update(Actor* thisx, PlayState* play); @@ -149,7 +147,7 @@ static InitChainEntry sInitChain[] = { static s32 sTexturesDesegmented = false; void EnKame_Init(Actor* thisx, PlayState* play) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->snapperSkelAnime, &gSnapperSkel, &gSnapperIdleAnim, this->snapperJointTable, @@ -174,7 +172,7 @@ void EnKame_Init(Actor* thisx, PlayState* play) { } void EnKame_Destroy(Actor* thisx, PlayState* play) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -840,7 +838,7 @@ void EnKame_UpdateDamage(EnKame* this, PlayState* play) { void EnKame_Update(Actor* thisx, PlayState* play) { s32 pad; - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; EnKame_Blink(this); @@ -895,7 +893,7 @@ void EnKame_Update(Actor* thisx, PlayState* play) { } s32 EnKame_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; if ((this->actionFunc == EnKame_RetreatIntoShell) || (this->actionFunc == EnKame_EmergeFromShell)) { if (limbIndex == SNAPPER_LIMB_HEAD) { @@ -939,7 +937,7 @@ static s8 sLimbToBodyParts[SNAPPER_LIMB_MAX] = { }; void EnKame_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; if (sLimbToBodyParts[limbIndex] != BODYPART_NONE) { Matrix_MultZero(&this->bodyPartsPos[sLimbToBodyParts[limbIndex]]); @@ -973,7 +971,7 @@ void EnKame_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot } void EnKame_Draw(Actor* thisx, PlayState* play) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; Vec3f originalPos; // If the Snapper is flipping itself upright, we'll update its position inside EnKame_PostLimbDraw @@ -1013,7 +1011,7 @@ void EnKame_Draw(Actor* thisx, PlayState* play) { s32 EnKame_SpikedSnapperOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; if (limbIndex == SPIKED_SNAPPER_LIMB_BODY) { pos->y -= 700.0f; @@ -1027,7 +1025,7 @@ s32 EnKame_SpikedSnapperOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** d } void EnKame_DrawSpikedSnapper(Actor* thisx, PlayState* play) { - EnKame* this = THIS; + EnKame* this = (EnKame*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->spikedSnapperSkelAnime.skeleton, this->spikedSnapperSkelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 9e9dedee0a..932020f57f 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnKanban*)thisx) - void EnKanban_Init(Actor* thisx, PlayState* play); void EnKanban_Destroy(Actor* thisx, PlayState* play); void EnKanban_Update(Actor* thisx, PlayState* play); @@ -143,7 +141,7 @@ void func_80954960(EnKanban* this) { } void EnKanban_Init(Actor* thisx, PlayState* play) { - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; Actor_SetScale(&this->actor, 0.01f); if (this->actor.params != ENKANBAN_PIECE) { @@ -171,7 +169,7 @@ void EnKanban_Init(Actor* thisx, PlayState* play) { } void EnKanban_Destroy(Actor* thisx, PlayState* play) { - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; if (this->actionState == ENKANBAN_SIGN) { Collider_DestroyCylinder(play, &this->collider); @@ -202,7 +200,7 @@ void func_80954BE8(EnKanban* this, PlayState* play) { void EnKanban_Update(Actor* thisx, PlayState* play) { u8 bounced = false; - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; s32 pad; FloorType floorType; f32 phi_f0; @@ -922,7 +920,7 @@ static f32 sCutAngles[] = { #include "assets/overlays/ovl_En_Kanban/ovl_En_Kanban.c" void EnKanban_Draw(Actor* thisx, PlayState* play) { - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; f32 zShift; f32 zShift2; s32 i; diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index 3c2b62dcf0..d0cb11c0af 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnKarebaba*)thisx) - void EnKarebaba_Init(Actor* thisx, PlayState* play); void EnKarebaba_Destroy(Actor* thisx, PlayState* play); void EnKarebaba_Update(Actor* thisx, PlayState* play2); @@ -142,7 +140,7 @@ static InitChainEntry sInitChain[] = { }; void EnKarebaba_Init(Actor* thisx, PlayState* play) { - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 22.0f); @@ -170,7 +168,7 @@ void EnKarebaba_Init(Actor* thisx, PlayState* play) { } void EnKarebaba_Destroy(Actor* thisx, PlayState* play) { - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; Collider_DestroyCylinder(play, &this->hurtCollider); Collider_DestroyCylinder(play, &this->attackCollider); @@ -581,7 +579,7 @@ void EnKarebaba_Dead(EnKarebaba* this, PlayState* play) { void EnKarebaba_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; f32 max; this->actionFunc(this, play); @@ -647,7 +645,7 @@ void EnKarebaba_DrawShadow(EnKarebaba* this, PlayState* play) { void EnKarebaba_Draw(Actor* thisx, PlayState* play) { static Color_RGBA8 sFogColor = { 0, 0, 0, 0 }; static Gfx* sStemDLists[] = { gDekuBabaStemTopDL, gDekuBabaStemMiddleDL, gDekuBabaStemBaseDL }; - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; s32 i; s32 stemSections; s16 bodyPartsCount; diff --git a/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c b/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c index 71986f0899..fbc0579c7e 100644 --- a/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c +++ b/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnKbt*)thisx) - void EnKbt_Init(Actor* thisx, PlayState* play); void EnKbt_Destroy(Actor* thisx, PlayState* play); void EnKbt_Update(Actor* thisx, PlayState* play); @@ -52,7 +50,7 @@ ActorProfile En_Kbt_Profile = { }; void EnKbt_Init(Actor* thisx, PlayState* play) { - EnKbt* this = THIS; + EnKbt* this = (EnKbt*)thisx; Actor_SetScale(&this->actor, 0.01f); SkelAnime_InitFlex(play, &this->skelAnime, &object_kbt_Skel_00DEE8, &object_kbt_Anim_004274, this->jointTable, @@ -571,13 +569,13 @@ void func_80B34598(EnKbt* this, PlayState* play) { } void EnKbt_Update(Actor* thisx, PlayState* play) { - EnKbt* this = THIS; + EnKbt* this = (EnKbt*)thisx; this->actionFunc(this, play); } s32 EnKbt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKbt* this = THIS; + EnKbt* this = (EnKbt*)thisx; if (!(this->unk_27C & 1) && (limbIndex == OBJECT_KBT_LIMB_0E)) { *dList = NULL; @@ -588,7 +586,7 @@ s32 EnKbt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p Vec3f D_80B34B84 = { 500.0f, 500.0f, 0.0f }; void EnKbt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnKbt* this = THIS; + EnKbt* this = (EnKbt*)thisx; if (limbIndex == OBJECT_KBT_LIMB_09) { Matrix_MultVec3f(&D_80B34B84, &this->actor.focus.pos); @@ -605,7 +603,7 @@ TexturePtr D_80B34B98[] = { }; void EnKbt_Draw(Actor* thisx, PlayState* play) { - EnKbt* this = THIS; + EnKbt* this = (EnKbt*)thisx; Gfx* gfx; TexturePtr tex; diff --git a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c index 55aec569b2..cbc2e13d74 100644 --- a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c +++ b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c @@ -11,8 +11,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA | \ ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnKendoJs*)thisx) - void EnKendoJs_Init(Actor* thisx, PlayState* play); void EnKendoJs_Destroy(Actor* thisx, PlayState* play); void EnKendoJs_Update(Actor* thisx, PlayState* play); @@ -110,7 +108,7 @@ s16 D_80B27D10[] = { void EnKendoJs_Init(Actor* thisx, PlayState* play) { s32 pad; - EnKendoJs* this = THIS; + EnKendoJs* this = (EnKendoJs*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); @@ -154,7 +152,7 @@ void EnKendoJs_Init(Actor* thisx, PlayState* play) { } void EnKendoJs_Destroy(Actor* thisx, PlayState* play) { - EnKendoJs* this = THIS; + EnKendoJs* this = (EnKendoJs*)thisx; Collider_DestroyCylinder(play, &this->collider); CLEAR_WEEKEVENTREG(WEEKEVENTREG_82_08); @@ -774,7 +772,7 @@ void func_80B27A90(EnKendoJs* this, PlayState* play) { } void EnKendoJs_Update(Actor* thisx, PlayState* play) { - EnKendoJs* this = THIS; + EnKendoJs* this = (EnKendoJs*)thisx; this->actionFunc(this, play); @@ -785,7 +783,7 @@ void EnKendoJs_Update(Actor* thisx, PlayState* play) { } s32 EnKendoJs_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKendoJs* this = THIS; + EnKendoJs* this = (EnKendoJs*)thisx; if (limbIndex == OBJECT_JS_LIMB_0C) { rot->y -= this->headRot.y; @@ -797,7 +795,7 @@ void EnKendoJs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnKendoJs_Draw(Actor* thisx, PlayState* play) { - EnKendoJs* this = THIS; + EnKendoJs* this = (EnKendoJs*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c index 84e8648373..4648f2ad78 100644 --- a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c +++ b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnKgy*)thisx) - void EnKgy_Init(Actor* thisx, PlayState* play); void EnKgy_Destroy(Actor* thisx, PlayState* play); void EnKgy_Update(Actor* thisx, PlayState* play); @@ -59,7 +57,7 @@ ActorProfile En_Kgy_Profile = { }; void EnKgy_Init(Actor* thisx, PlayState* play) { - EnKgy* this = THIS; + EnKgy* this = (EnKgy*)thisx; s16 csId; s32 i; @@ -119,7 +117,7 @@ void EnKgy_Init(Actor* thisx, PlayState* play) { } void EnKgy_Destroy(Actor* thisx, PlayState* play) { - EnKgy* this = THIS; + EnKgy* this = (EnKgy*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); } @@ -1132,7 +1130,7 @@ void func_80B42D28(EnKgy* this, PlayState* play) { } void EnKgy_Update(Actor* thisx, PlayState* play) { - EnKgy* this = THIS; + EnKgy* this = (EnKgy*)thisx; s32 pad; Vec3s torsoRot; @@ -1149,7 +1147,7 @@ void EnKgy_Update(Actor* thisx, PlayState* play) { } s32 EnKgy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKgy* this = THIS; + EnKgy* this = (EnKgy*)thisx; if (!(this->unk_29C & 1)) { if (limbIndex == OBJECT_KGY_LIMB_11) { @@ -1169,7 +1167,7 @@ s32 EnKgy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnKgy_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80B432D8 = { 1000.0f, 2000.0f, 0.0f }; static Vec3f D_80B432E4 = { 3000.0f, 4000.0f, 300.0f }; - EnKgy* this = THIS; + EnKgy* this = (EnKgy*)thisx; if (limbIndex == OBJECT_KGY_LIMB_0B) { Matrix_MultVec3f(&D_80B432D8, &this->unk_2A8); @@ -1216,7 +1214,7 @@ void func_80B43074(EnKgy* this, PlayState* play) { } void EnKgy_Draw(Actor* thisx, PlayState* play) { - EnKgy* this = THIS; + EnKgy* this = (EnKgy*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); if (this->unk_29C & 1) { diff --git a/src/overlays/actors/ovl_En_Kitan/z_en_kitan.c b/src/overlays/actors/ovl_En_Kitan/z_en_kitan.c index 383f254f56..eeb66d904f 100644 --- a/src/overlays/actors/ovl_En_Kitan/z_en_kitan.c +++ b/src/overlays/actors/ovl_En_Kitan/z_en_kitan.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnKitan*)thisx) - void EnKitan_Init(Actor* thisx, PlayState* play); void EnKitan_Destroy(Actor* thisx, PlayState* play); void EnKitan_Update(Actor* thisx, PlayState* play); @@ -52,7 +50,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnKitan_Init(Actor* thisx, PlayState* play) { - EnKitan* this = THIS; + EnKitan* this = (EnKitan*)thisx; s32 pad; Actor_SetScale(&this->actor, 0.0f); @@ -82,7 +80,7 @@ void EnKitan_Init(Actor* thisx, PlayState* play) { } void EnKitan_Destroy(Actor* thisx, PlayState* play) { - EnKitan* this = THIS; + EnKitan* this = (EnKitan*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -357,7 +355,7 @@ void EnKitan_WaitToAppear(EnKitan* this, PlayState* play) { } void EnKitan_Update(Actor* thisx, PlayState* play) { - EnKitan* this = THIS; + EnKitan* this = (EnKitan*)thisx; if (this->actor.draw != NULL) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); @@ -378,7 +376,7 @@ s32 EnKitan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnKitan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sFocusOffset = { 0.0f, 0.0f, 0.0f }; - EnKitan* this = THIS; + EnKitan* this = (EnKitan*)thisx; if (limbIndex == KEATON_LIMB_RIGHT_SHOULDER) { Matrix_MultVec3f(&sFocusOffset, &this->actor.focus.pos); @@ -386,7 +384,7 @@ void EnKitan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnKitan_Draw(Actor* thisx, PlayState* play) { - EnKitan* this = THIS; + EnKitan* this = (EnKitan*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Knight/z_en_knight.c b/src/overlays/actors/ovl_En_Knight/z_en_knight.c index c3fb3bc218..3d530d55af 100644 --- a/src/overlays/actors/ovl_En_Knight/z_en_knight.c +++ b/src/overlays/actors/ovl_En_Knight/z_en_knight.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnKnight*)thisx) - void EnKnight_Init(Actor* thisx, PlayState* play); void EnKnight_Destroy(Actor* thisx, PlayState* play); void EnKnight_Update(Actor* thisx, PlayState* play); @@ -550,7 +548,7 @@ void EnKnight_SpawnDustAtFeet(EnKnight* this, PlayState* play, u8 timerMask) { } void EnKnight_Init(Actor* thisx, PlayState* play) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; s32 pad; s32 sfxIndex; @@ -3521,7 +3519,7 @@ void EnKnight_FlyingHeadAttack(EnKnight* this, PlayState* play) { } void EnKnight_Update(Actor* thisx, PlayState* play) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; Input* input; PlayState* play2 = play; Player* player = GET_PLAYER(play); @@ -3995,7 +3993,7 @@ void EnKnight_DrawEffectBlure(EnKnight* this, PlayState* play) { } s32 EnKnight_OverrideLimbDrawHead(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; if (limbIndex == IGOS_LIMB_NECK) { rot->x += (f32)this->neckYaw; @@ -4015,7 +4013,7 @@ s32 EnKnight_OverrideLimbDrawHead(PlayState* play, s32 limbIndex, Gfx** dList, V s32 EnKnight_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; if (limbIndex == KNIGHT_LIMB_NECK) { rot->x += (f32)this->neckYaw; @@ -4100,7 +4098,7 @@ void EnKnight_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r static Vec3f sBreathBaseModelOffset = { 300.0f, 500.0f, 0.0f }; static Vec3f sBodyCollider0ModelOffset = { 1000.0f, 0.0f, 0.0f }; static Vec3f sBodyCollider1ModelOffset = { 700.0f, -500.0f, 0.0f }; - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; Vec3f colliderPos; if ((this->actionFunc == EnKnight_Die) || (this->drawDmgEffAlpha > 0.0f)) { @@ -4147,7 +4145,7 @@ void EnKnight_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r void EnKnight_PostLimbDrawHead(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sFocusPosModelOffset = { 300.0f, 500.0f, 0.0f }; - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; if (limbIndex == KNIGHT_LIMB_NECK) { Matrix_MultVec3f(&sFocusPosModelOffset, &this->actor.focus.pos); @@ -4156,7 +4154,7 @@ void EnKnight_PostLimbDrawHead(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnKnight_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx, Gfx** gfx) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; if (this == sIgosInstance) { if (limbIndex == IGOS_LIMB_SHIELD) { @@ -4188,7 +4186,7 @@ Gfx* EnKnight_BuildXluMaterialDL(GraphicsContext* gfxCtx, u8 alpha) { } void EnKnight_Draw(Actor* thisx, PlayState* play) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; f32 scale; s32 drawXlu = false; @@ -4277,7 +4275,7 @@ void EnKnight_Draw(Actor* thisx, PlayState* play) { } void EnKnight_UpdateAfterImage(Actor* thisx, PlayState* play) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; f32 maxStep; // Set alpha step @@ -4298,7 +4296,7 @@ void EnKnight_UpdateAfterImage(Actor* thisx, PlayState* play) { s32 EnKnight_OverrideLimbDrawAfterImage(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; if ((this->actor.params == EN_KNIGHT_PARAM_IGOS_HEAD_AFTERIMAGE) && (limbIndex != IGOS_LIMB_JAW) && (limbIndex != IGOS_LIMB_HEAD)) { @@ -4308,7 +4306,7 @@ s32 EnKnight_OverrideLimbDrawAfterImage(PlayState* play, s32 limbIndex, Gfx** dL } void EnKnight_DrawAfterImage(Actor* thisx, PlayState* play) { - EnKnight* this = THIS; + EnKnight* this = (EnKnight*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c b/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c index 835d6b9ffb..43a2dee2e3 100644 --- a/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c +++ b/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnKujiya*)thisx) - void EnKujiya_Init(Actor* thisx, PlayState* play); void EnKujiya_Destroy(Actor* thisx, PlayState* play); void EnKujiya_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ ActorProfile En_Kujiya_Profile = { (HS_GET_LOTTERY_CODE_GUESS() & 0xF))) void EnKujiya_Init(Actor* thisx, PlayState* play) { - EnKujiya* this = THIS; + EnKujiya* this = (EnKujiya*)thisx; Actor_SetScale(&this->actor, 0.1f); @@ -360,13 +358,13 @@ void EnKujiya_TurnToClosed(EnKujiya* this, PlayState* play) { } void EnKujiya_Update(Actor* thisx, PlayState* play) { - EnKujiya* this = THIS; + EnKujiya* this = (EnKujiya*)thisx; this->actionFunc(this, play); } void EnKujiya_Draw(Actor* thisx, PlayState* play) { - EnKujiya* this = THIS; + EnKujiya* this = (EnKujiya*)thisx; AnimatedMat_Draw(play, Lib_SegmentedToVirtual(gLotteryShopTexAnim)); diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 9f07b61ad3..eb0aa91b74 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_THROW_ONLY) -#define THIS ((EnKusa*)thisx) - void EnKusa_Init(Actor* thisx, PlayState* play); void EnKusa_Destroy(Actor* thisx, PlayState* play); void EnKusa_Update(Actor* thisx, PlayState* play2); @@ -352,7 +350,7 @@ s32 EnKusa_IsUnderwater(EnKusa* this, PlayState* play) { } void EnKusa_InitCollider(Actor* thisx, PlayState* play) { - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -360,7 +358,7 @@ void EnKusa_InitCollider(Actor* thisx, PlayState* play) { } void EnKusa_Init(Actor* thisx, PlayState* play) { - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; s32 pad; s32 kusaType = KUSA_GET_TYPE(&this->actor); @@ -416,7 +414,7 @@ void EnKusa_Init(Actor* thisx, PlayState* play) { void EnKusa_Destroy(Actor* thisx, PlayState* play) { PlayState* play2 = play; - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -686,7 +684,7 @@ void EnKusa_Regrow(EnKusa* this, PlayState* play) { void EnKusa_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; this->actionFunc(this, play); @@ -703,7 +701,7 @@ void EnKusa_Update(Actor* thisx, PlayState* play2) { void EnKusa_DrawBush(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; if ((this->actor.projectedPos.z <= 1200.0f) || ((this->isInWater & 1) && (this->actor.projectedPos.z < 1300.0f))) { @@ -731,7 +729,7 @@ void EnKusa_DrawBush(Actor* thisx, PlayState* play2) { } void EnKusa_DrawGrass(Actor* thisx, PlayState* play) { - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; if (this->isCut) { Gfx_DrawDListOpa(play, gKusaStumpDL); diff --git a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c index e093697398..a545077cc2 100644 --- a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c +++ b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_THROW_ONLY) -#define THIS ((EnKusa2*)thisx) - void EnKusa2_Init(Actor* thisx, PlayState* play); void EnKusa2_Destroy(Actor* thisx, PlayState* play); void EnKusa2_Update(Actor* thisx, PlayState* play); @@ -858,7 +856,7 @@ static InitChainEntry sInitChain[] = { void EnKusa2_Init(Actor* thisx, PlayState* play) { s32 pad; - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (!ENKUSA2_GET_1(&this->actor)) { @@ -899,7 +897,7 @@ void EnKusa2_Init(Actor* thisx, PlayState* play) { } void EnKusa2_Destroy(Actor* thisx, PlayState* play) { - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; if (ENKUSA2_GET_1(&this->actor) == 1) { Collider_DestroyCylinder(play, &this->collider); @@ -1285,7 +1283,7 @@ void func_80A5E4BC(EnKusa2* this, PlayState* play) { void func_80A5E604(Actor* thisx, PlayState* play) { s32 pad; - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; this->actionFunc(this, play); @@ -1303,7 +1301,7 @@ void func_80A5E604(Actor* thisx, PlayState* play) { } void EnKusa2_Update(Actor* thisx, PlayState* play) { - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; if ((this->unk_1C0 != NULL) && (this->unk_1C0->actor.update == NULL)) { this->unk_1C0 = NULL; @@ -1319,7 +1317,7 @@ void func_80A5E6F0(Actor* thisx, PlayState* play) { gKakeraLeafTipDL, gKakeraLeafMiddleDL, }; - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; s32 i; OPEN_DISPS(play->state.gfxCtx); @@ -1354,7 +1352,7 @@ void func_80A5E80C(PlayState* play, s32 arg1) { } void EnKusa2_Draw(Actor* thisx, PlayState* play) { - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; if (this->actor.projectedPos.z <= 1200.0f) { if ((play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL) && (this->actor.projectedPos.z > -150.0f) && @@ -1379,7 +1377,7 @@ void func_80A5E9B4(Actor* thisx, PlayState* play) { } void func_80A5EA48(Actor* thisx, PlayState* play) { - EnKusa2* this = THIS; + EnKusa2* this = (EnKusa2*)thisx; if (this->unk_1CF == 0xFF) { Gfx_DrawDListOpa(play, gKusaBushType1DL); diff --git a/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c b/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c index 350ebe334b..37ff9569c8 100644 --- a/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c +++ b/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnLiftNuts*)thisx) - void EnLiftNuts_Init(Actor* thisx, PlayState* play); void EnLiftNuts_Destroy(Actor* thisx, PlayState* play); void EnLiftNuts_Update(Actor* thisx, PlayState* play); @@ -268,7 +266,7 @@ void EnLiftNuts_TryHide(EnLiftNuts* this, PlayState* play) { void EnLiftNuts_Init(Actor* thisx, PlayState* play) { s32 pad; - EnLiftNuts* this = THIS; + EnLiftNuts* this = (EnLiftNuts*)thisx; Path* path; Vec3s* points; @@ -317,7 +315,7 @@ void EnLiftNuts_Init(Actor* thisx, PlayState* play) { } void EnLiftNuts_Destroy(Actor* thisx, PlayState* play) { - EnLiftNuts* this = THIS; + EnLiftNuts* this = (EnLiftNuts*)thisx; Collider_DestroyCylinder(play, &this->collider); EnLiftNuts_FreeSharedMemoryEntry(this, play); @@ -1060,7 +1058,7 @@ void EnLiftNuts_UpdateCollision(EnLiftNuts* this, PlayState* play) { } void EnLiftNuts_Update(Actor* thisx, PlayState* play) { - EnLiftNuts* this = THIS; + EnLiftNuts* this = (EnLiftNuts*)thisx; SkelAnime_Update(&this->skelAnime); this->actionFunc(this, play); @@ -1074,7 +1072,7 @@ void EnLiftNuts_Update(Actor* thisx, PlayState* play) { } s32 EnLiftNuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnLiftNuts* this = THIS; + EnLiftNuts* this = (EnLiftNuts*)thisx; if ((limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_HAT) || (limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_BAG) || (limbIndex == BUSINESS_SCRUB_LIMB_LEFT_HAND_BAG) || (limbIndex == BUSINESS_SCRUB_LIMB_SCALP) || @@ -1091,7 +1089,7 @@ s32 EnLiftNuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec void EnLiftNuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sFocusOffset = { 0.0f, 0.0f, 0.0f }; - EnLiftNuts* this = THIS; + EnLiftNuts* this = (EnLiftNuts*)thisx; if (limbIndex == BUSINESS_SCRUB_LIMB_HAT) { Matrix_MultVec3f(&sFocusOffset, &this->actor.focus.pos); @@ -1099,7 +1097,7 @@ void EnLiftNuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnLiftNuts_Draw(Actor* thisx, PlayState* play) { - EnLiftNuts* this = THIS; + EnLiftNuts* this = (EnLiftNuts*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index f454716178..1af13b4d7c 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnLight*)thisx) - void EnLight_Init(Actor* thisx, PlayState* play); void EnLight_Destroy(Actor* thisx, PlayState* play); void EnLight_Update(Actor* thisx, PlayState* play); @@ -49,7 +47,7 @@ EnLightStruct D_808666D0[] = { void EnLight_Init(Actor* thisx, PlayState* play) { s32 pad; - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; if (!ENLIGHT_GET_4000(&this->actor)) { if ((gSaveContext.gameMode == GAMEMODE_END_CREDITS) || ENLIGHT_GET_2000(&this->actor)) { @@ -79,7 +77,7 @@ void EnLight_Init(Actor* thisx, PlayState* play) { } void EnLight_Destroy(Actor* thisx, PlayState* play) { - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; if (!ENLIGHT_GET_4000(&this->actor)) { LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); @@ -98,7 +96,7 @@ void func_80865BF8(EnLight* this, PlayState* play) { } void EnLight_Update(Actor* thisx, PlayState* play) { - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; if (!ENLIGHT_GET_4000(&this->actor)) { EnLightStruct* sp28 = &D_808666D0[ENLIGHT_GET_F(&this->actor)]; @@ -117,7 +115,7 @@ void EnLight_Update(Actor* thisx, PlayState* play) { } void func_80865F38(Actor* thisx, PlayState* play) { - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; EnLightStruct* sp38 = &D_808666D0[ENLIGHT_GET_F(&this->actor)]; f32 temp_f2; f32 sp30 = this->actor.scale.x / (sp38->unk_07 * 0.0001f); @@ -162,7 +160,7 @@ void func_80865F38(Actor* thisx, PlayState* play) { void EnLight_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; EnLightStruct* sp6C = &D_808666D0[ENLIGHT_GET_F(&this->actor)]; Gfx* sp68; diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c index c66036e882..920b2eac95 100644 --- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c +++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnLookNuts*)thisx) - void EnLookNuts_Init(Actor* thisx, PlayState* play); void EnLookNuts_Destroy(Actor* thisx, PlayState* play); void EnLookNuts_Update(Actor* thisx, PlayState* play); @@ -101,7 +99,7 @@ typedef enum { } PalaceGuardState; void EnLookNuts_Init(Actor* thisx, PlayState* play) { - EnLookNuts* this = THIS; + EnLookNuts* this = (EnLookNuts*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_Init(play, &this->skelAnime, &gDekuPalaceGuardSkel, &gDekuPalaceGuardDigAnim, this->jointTable, @@ -133,7 +131,7 @@ void EnLookNuts_Init(Actor* thisx, PlayState* play) { } void EnLookNuts_Destroy(Actor* thisx, PlayState* play) { - EnLookNuts* this = THIS; + EnLookNuts* this = (EnLookNuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -315,7 +313,7 @@ void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, PlayState* play) { void EnLookNuts_Update(Actor* thisx, PlayState* play) { s32 pad; - EnLookNuts* this = THIS; + EnLookNuts* this = (EnLookNuts*)thisx; if (this->blinkTimer == 0) { this->eyeState++; @@ -392,7 +390,7 @@ static TexturePtr sEyeTextures[] = { }; void EnLookNuts_Draw(Actor* thisx, PlayState* play) { - EnLookNuts* this = THIS; + EnLookNuts* this = (EnLookNuts*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c index c0eba8ef5b..8171d4c59b 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnMFire1*)thisx) - void EnMFire1_Init(Actor* thisx, PlayState* play); void EnMFire1_Destroy(Actor* thisx, PlayState* play); void EnMFire1_Update(Actor* thisx, PlayState* play); @@ -47,7 +45,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnMFire1_Init(Actor* thisx, PlayState* play) { - EnMFire1* this = THIS; + EnMFire1* this = (EnMFire1*)thisx; s32 pad; Collider_InitCylinder(play, &this->collider); @@ -58,13 +56,13 @@ void EnMFire1_Init(Actor* thisx, PlayState* play) { } void EnMFire1_Destroy(Actor* thisx, PlayState* play) { - EnMFire1* this = THIS; + EnMFire1* this = (EnMFire1*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnMFire1_Update(Actor* thisx, PlayState* play) { - EnMFire1* this = THIS; + EnMFire1* this = (EnMFire1*)thisx; s32 pad; if (Math_StepToF(&this->timer, 1.0f, 0.2f)) { diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 9c2730def3..7b80e00c84 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnMThunder*)thisx) - void EnMThunder_Init(Actor* thisx, PlayState* play); void EnMThunder_Destroy(Actor* thisx, PlayState* play); void EnMThunder_Update(Actor* thisx, PlayState* play); @@ -100,7 +98,7 @@ void EnMThunder_UnkType_Setup(EnMThunder* this, PlayState* play) { void EnMThunder_Init(Actor* thisx, PlayState* play) { s32 pad; - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; Player* player = GET_PLAYER(play); Collider_InitCylinder(play, &this->collider); @@ -192,7 +190,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) { } void EnMThunder_Destroy(Actor* thisx, PlayState* play) { - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; if (this->isCharging) { Magic_Reset(play); @@ -461,7 +459,7 @@ void EnMThunder_UnkType_Attack(EnMThunder* this, PlayState* play) { } void EnMThunder_Update(Actor* thisx, PlayState* play) { - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; this->actionFunc(this, play); EnMThunder_AdjustLights(play, this->adjustLightsArg1); @@ -471,7 +469,7 @@ void EnMThunder_Update(Actor* thisx, PlayState* play) { } void EnMThunder_UnkType_Update(Actor* thisx, PlayState* play) { - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; this->actionFunc(this, play); Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y, @@ -481,7 +479,7 @@ void EnMThunder_UnkType_Update(Actor* thisx, PlayState* play) { void EnMThunder_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; Player* player = GET_PLAYER(play); f32 scale; s32 y2Scroll; diff --git a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c index 903c91dbec..d52878cfb5 100644 --- a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c +++ b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c @@ -10,8 +10,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnMa4*)thisx) - void EnMa4_Init(Actor* thisx, PlayState* play); void EnMa4_Destroy(Actor* thisx, PlayState* play); void EnMa4_Update(Actor* thisx, PlayState* play); @@ -207,7 +205,7 @@ void EnMa4_InitPath(EnMa4* this, PlayState* play) { } void EnMa4_Init(Actor* thisx, PlayState* play) { - EnMa4* this = THIS; + EnMa4* this = (EnMa4*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); @@ -264,7 +262,7 @@ void EnMa4_Init(Actor* thisx, PlayState* play) { } void EnMa4_Destroy(Actor* thisx, PlayState* play) { - EnMa4* this = THIS; + EnMa4* this = (EnMa4*)thisx; Collider_DestroyCylinder(play, &this->collider); CLEAR_WEEKEVENTREG(WEEKEVENTREG_08_01); @@ -1054,7 +1052,7 @@ void EnMa4_InitFaceExpression(EnMa4* this) { } void EnMa4_Update(Actor* thisx, PlayState* play) { - EnMa4* this = THIS; + EnMa4* this = (EnMa4*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -1066,7 +1064,7 @@ void EnMa4_Update(Actor* thisx, PlayState* play) { } s32 EnMa4_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMa4* this = THIS; + EnMa4* this = (EnMa4*)thisx; Vec3s limbRot; if (limbIndex == ROMANI_LIMB_HEAD) { @@ -1084,7 +1082,7 @@ s32 EnMa4_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnMa4_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMa4* this = THIS; + EnMa4* this = (EnMa4*)thisx; Vec3f sp28 = { 800.0f, 0.0f, 0.0f }; if (limbIndex == ROMANI_LIMB_HEAD) { @@ -1101,7 +1099,7 @@ void EnMa4_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnMa4_Draw(Actor* thisx, PlayState* play) { - EnMa4* this = THIS; + EnMa4* this = (EnMa4*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c index e0b52685b8..c1e3e881d7 100644 --- a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c +++ b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c @@ -11,8 +11,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnMaYto*)thisx) - void EnMaYto_Init(Actor* thisx, PlayState* play); void EnMaYto_Destroy(Actor* thisx, PlayState* play); void EnMaYto_Update(Actor* thisx, PlayState* play); @@ -175,7 +173,7 @@ static TexturePtr sEyesTextures[] = { }; void EnMaYto_Init(Actor* thisx, PlayState* play) { - EnMaYto* this = THIS; + EnMaYto* this = (EnMaYto*)thisx; s32 pad; this->actor.attentionRangeType = ATTENTION_RANGE_0; @@ -393,7 +391,7 @@ s32 EnMaYto_TryFindRomani(EnMaYto* this, PlayState* play) { } void EnMaYto_Destroy(Actor* thisx, PlayState* play) { - EnMaYto* this = THIS; + EnMaYto* this = (EnMaYto*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1472,7 +1470,7 @@ void EnMaYto_SetTalkedFlag(void) { } void EnMaYto_Update(Actor* thisx, PlayState* play) { - EnMaYto* this = THIS; + EnMaYto* this = (EnMaYto*)thisx; this->actionFunc(this, play); EnMaYto_UpdateCollision(this, play); @@ -1480,7 +1478,7 @@ void EnMaYto_Update(Actor* thisx, PlayState* play) { } s32 EnMaYto_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMaYto* this = THIS; + EnMaYto* this = (EnMaYto*)thisx; Vec3s limbRot; if (limbIndex == CREMIA_LIMB_HEAD) { @@ -1504,7 +1502,7 @@ s32 EnMaYto_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnMaYto_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMaYto* this = THIS; + EnMaYto* this = (EnMaYto*)thisx; if (limbIndex == CREMIA_LIMB_HEAD) { Matrix_MultZero(&this->actor.focus.pos); @@ -1512,7 +1510,7 @@ void EnMaYto_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnMaYto_Draw(Actor* thisx, PlayState* play) { - EnMaYto* this = THIS; + EnMaYto* this = (EnMaYto*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c index 535a1bb336..7f771cdd6a 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c @@ -9,8 +9,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnMaYts*)thisx) - void EnMaYts_Init(Actor* thisx, PlayState* play); void EnMaYts_Destroy(Actor* thisx, PlayState* play); void EnMaYts_Update(Actor* thisx, PlayState* play); @@ -249,7 +247,7 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, PlayState* play) { } void EnMaYts_Init(Actor* thisx, PlayState* play) { - EnMaYts* this = THIS; + EnMaYts* this = (EnMaYts*)thisx; s32 pad; this->type = EN_MA_YTS_GET_TYPE(thisx); @@ -309,7 +307,7 @@ void EnMaYts_Init(Actor* thisx, PlayState* play) { } void EnMaYts_Destroy(Actor* thisx, PlayState* play) { - EnMaYts* this = THIS; + EnMaYts* this = (EnMaYts*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -527,7 +525,7 @@ void EnMaYts_SetFaceExpression(EnMaYts* this, s16 overrideEyeTexIndex, s16 mouth } void EnMaYts_Update(Actor* thisx, PlayState* play) { - EnMaYts* this = THIS; + EnMaYts* this = (EnMaYts*)thisx; ColliderCylinder* collider; this->actionFunc(this, play); @@ -540,7 +538,7 @@ void EnMaYts_Update(Actor* thisx, PlayState* play) { } s32 EnMaYts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMaYts* this = THIS; + EnMaYts* this = (EnMaYts*)thisx; Vec3s limbRot; if (limbIndex == ROMANI_LIMB_HEAD) { @@ -559,7 +557,7 @@ s32 EnMaYts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnMaYts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMaYts* this = THIS; + EnMaYts* this = (EnMaYts*)thisx; if (limbIndex == ROMANI_LIMB_HEAD) { Matrix_MultZero(&this->actor.focus.pos); @@ -575,7 +573,7 @@ void EnMaYts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnMaYts_Draw(Actor* thisx, PlayState* play) { - EnMaYts* this = THIS; + EnMaYts* this = (EnMaYts*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 8772754d2b..c39914f7e1 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnMag*)thisx) - void EnMag_Init(Actor* thisx, PlayState* play); void EnMag_Destroy(Actor* thisx, PlayState* play); void EnMag_Update(Actor* thisx, PlayState* play); @@ -101,7 +99,7 @@ ActorProfile En_Mag_Profile = { }; void EnMag_Init(Actor* thisx, PlayState* play) { - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; u16 i; this->unk11F54 = 6; @@ -196,7 +194,7 @@ void EnMag_UpdateDisplayEffectColors(Actor* thisx) { static s16 sDisplayEffectPrimBlueTargets[] = { 55, 255 }; static s16 sDisplayEffectEnvRedTargets[] = { 255, 0 }; static s16 sDisplayEffectEnvBlueTargets[] = { 255, 155 }; - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; s16 colorStep; TIMED_STEP_TO(this->displayEffectPrimColor[0], sDisplayEffectPrimRedTargets[sZeldaEffectColorTargetIndex], @@ -234,7 +232,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) { static s16 sAppearEffectEnvBlueTargets[] = { 0, 155 }; s16 step; s32 pad[2]; - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; if (gSaveContext.fileNum != 0xFEDC) { if (this->state == MAG_STATE_INITIAL) { @@ -702,7 +700,7 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) { static s16 sTextAlpha = 0; // For drawing both the No Controller message and "PRESS START" static s16 sTextAlphaTargets[] = { 255, 0 }; s32 pad; - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; Font* font = &this->font; Gfx* gfx = *gfxP; u16 i; diff --git a/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c b/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c index 56b0bcbc9f..0938538d14 100644 --- a/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c +++ b/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_10) -#define THIS ((EnMaruta*)thisx) - void EnMaruta_Init(Actor* thisx, PlayState* play); void EnMaruta_Destroy(Actor* thisx, PlayState* play); void EnMaruta_Update(Actor* thisx, PlayState* play); @@ -209,7 +207,7 @@ Vec3f D_80B38B54 = { 0.0f, 0.0f, 0.0f }; void EnMaruta_Init(Actor* thisx, PlayState* play) { s32 pad; - EnMaruta* this = THIS; + EnMaruta* this = (EnMaruta*)thisx; s32 i; Actor_SetScale(&this->actor, 0.1f); @@ -258,7 +256,7 @@ void EnMaruta_Init(Actor* thisx, PlayState* play) { } void EnMaruta_Destroy(Actor* thisx, PlayState* play) { - EnMaruta* this = THIS; + EnMaruta* this = (EnMaruta*)thisx; if (this->unk_210 == 0) { Collider_DestroyCylinder(play, &this->collider); @@ -685,7 +683,7 @@ void func_80B382E4(PlayState* play, Vec3f arg1) { } void EnMaruta_Update(Actor* thisx, PlayState* play) { - EnMaruta* this = THIS; + EnMaruta* this = (EnMaruta*)thisx; this->actionFunc(this, play); @@ -694,7 +692,7 @@ void EnMaruta_Update(Actor* thisx, PlayState* play) { } void EnMaruta_Draw(Actor* thisx, PlayState* play) { - EnMaruta* this = THIS; + EnMaruta* this = (EnMaruta*)thisx; Vec3f sp50; s32 i; diff --git a/src/overlays/actors/ovl_En_Minideath/z_en_minideath.c b/src/overlays/actors/ovl_En_Minideath/z_en_minideath.c index 22d134ae3c..855ae1f066 100644 --- a/src/overlays/actors/ovl_En_Minideath/z_en_minideath.c +++ b/src/overlays/actors/ovl_En_Minideath/z_en_minideath.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnMinideath*)thisx) - void EnMinideath_Init(Actor* thisx, PlayState* play); void EnMinideath_Destroy(Actor* thisx, PlayState* play); void EnMinideath_Update(Actor* thisx, PlayState* play); @@ -157,7 +155,7 @@ static s32 sScatterTimer; static s32 sPlayedDeathSfx; void EnMinideath_Init(Actor* thisx, PlayState* play) { - EnMinideath* this = THIS; + EnMinideath* this = (EnMinideath*)thisx; s32 i; Actor_ProcessInitChain(thisx, sInitChain); @@ -199,7 +197,7 @@ void EnMinideath_Init(Actor* thisx, PlayState* play) { } void EnMinideath_Destroy(Actor* thisx, PlayState* play) { - EnMinideath* this = THIS; + EnMinideath* this = (EnMinideath*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -789,7 +787,7 @@ void EnMinideath_UpdateDamage(EnMinideath* this, PlayState* play) { } void EnMinideath_Update(Actor* thisx, PlayState* play) { - EnMinideath* this = THIS; + EnMinideath* this = (EnMinideath*)thisx; s32 pad; ColliderJntSphElement* jntSphElem; s32 temp; diff --git a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c index df15e0b8c0..22e9827c10 100644 --- a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c +++ b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnMinifrog*)thisx) - void EnMinifrog_Init(Actor* thisx, PlayState* play); void EnMinifrog_Destroy(Actor* thisx, PlayState* play); void EnMinifrog_Update(Actor* thisx, PlayState* play); @@ -79,7 +77,7 @@ static InitChainEntry sInitChain[] = { }; void EnMinifrog_Init(Actor* thisx, PlayState* play) { - EnMinifrog* this = THIS; + EnMinifrog* this = (EnMinifrog*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -147,7 +145,7 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) { } void EnMinifrog_Destroy(Actor* thisx, PlayState* play) { - EnMinifrog* this = THIS; + EnMinifrog* this = (EnMinifrog*)thisx; Collider_DestroyCylinder(play, &this->collider); if (this->flags & 0x100) { @@ -592,7 +590,7 @@ void EnMinifrog_SetupYellowFrogDialog(EnMinifrog* this, PlayState* play) { } void EnMinifrog_Update(Actor* thisx, PlayState* play) { - EnMinifrog* this = THIS; + EnMinifrog* this = (EnMinifrog*)thisx; s32 pad; this->actionFunc(this, play); @@ -606,7 +604,7 @@ void EnMinifrog_Update(Actor* thisx, PlayState* play) { } void EnMinifrog_UpdateMissingFrog(Actor* thisx, PlayState* play) { - EnMinifrog* this = THIS; + EnMinifrog* this = (EnMinifrog*)thisx; EnMinifrog* missingFrog; missingFrog = this->frog; @@ -628,7 +626,7 @@ s32 EnMinifrog_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnMinifrog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMinifrog* this = THIS; + EnMinifrog* this = (EnMinifrog*)thisx; if ((limbIndex == FROG_LIMB_RIGHT_EYE) || (limbIndex == FROG_LIMB_LEFT_EYE)) { OPEN_DISPS(play->state.gfxCtx); @@ -654,7 +652,7 @@ static Color_RGBA8 sFrogEnvColors[] = { }; void EnMinifrog_Draw(Actor* thisx, PlayState* play) { - EnMinifrog* this = THIS; + EnMinifrog* this = (EnMinifrog*)thisx; Color_RGBA8* envColor; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c index 3f245cc0f2..b42942b068 100644 --- a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c +++ b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c @@ -11,8 +11,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnMinislime*)thisx) - void EnMinislime_Init(Actor* thisx, PlayState* play); void EnMinislime_Destroy(Actor* thisx, PlayState* play); void EnMinislime_Update(Actor* thisx, PlayState* play); @@ -121,7 +119,7 @@ static DamageTable sDamageTable = { }; void EnMinislime_Init(Actor* thisx, PlayState* play) { - EnMinislime* this = THIS; + EnMinislime* this = (EnMinislime*)thisx; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -132,7 +130,7 @@ void EnMinislime_Init(Actor* thisx, PlayState* play) { } void EnMinislime_Destroy(Actor* thisx, PlayState* play) { - EnMinislime* this = THIS; + EnMinislime* this = (EnMinislime*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -705,7 +703,7 @@ void EnMinislime_ApplyDamage(EnMinislime* this) { } void EnMinislime_Update(Actor* thisx, PlayState* play) { - EnMinislime* this = THIS; + EnMinislime* this = (EnMinislime*)thisx; Player* player; s32 pad; Vec3f vec1; diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index c72285fe1f..0ba110007d 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnMk*)thisx) - void EnMk_Init(Actor* thisx, PlayState* play); void EnMk_Destroy(Actor* thisx, PlayState* play); void EnMk_Update(Actor* thisx, PlayState* play); @@ -88,7 +86,7 @@ s32 EnMk_ChangeAnim(EnMk* this, s16 animIndex) { } void EnMk_Init(Actor* thisx, PlayState* play) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; s16 csId; s32 i; @@ -127,7 +125,7 @@ void EnMk_Init(Actor* thisx, PlayState* play) { } void EnMk_Destroy(Actor* thisx, PlayState* play) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -456,7 +454,7 @@ void func_80959E18(EnMk* this, PlayState* play) { void EnMk_Update(Actor* thisx, PlayState* play) { s32 pad; - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; Vec3s torsoRot; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -475,7 +473,7 @@ void EnMk_Update(Actor* thisx, PlayState* play) { } s32 EnMk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; if (limbIndex == MARINE_RESEARCHER_LIMB_HEAD) { rot->y -= this->headRot.y; @@ -487,7 +485,7 @@ s32 EnMk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po Vec3f D_8095A2A0 = { 1000.0f, -100.0f, 0.0f }; void EnMk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; if (limbIndex == MARINE_RESEARCHER_LIMB_HEAD) { Matrix_MultVec3f(&D_8095A2A0, &this->actor.focus.pos); @@ -495,7 +493,7 @@ void EnMk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnMk_Draw(Actor* thisx, PlayState* play) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c index cbc9545cdb..18608ad144 100644 --- a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c +++ b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnMkk*)thisx) - void EnMkk_Init(Actor* thisx, PlayState* play); void EnMkk_Destroy(Actor* thisx, PlayState* play); void EnMkk_Update(Actor* thisx, PlayState* play); @@ -138,7 +136,7 @@ static Color_RGBA8 D_80A4F7C4[] = { }; void EnMkk_Init(Actor* thisx, PlayState* play) { - EnMkk* this = THIS; + EnMkk* this = (EnMkk*)thisx; s32 paramsFF00; s32 params2; @@ -187,7 +185,7 @@ void EnMkk_Init(Actor* thisx, PlayState* play) { } void EnMkk_Destroy(Actor* thisx, PlayState* play) { - EnMkk* this = THIS; + EnMkk* this = (EnMkk*)thisx; Collider_DestroySphere(play, &this->collider); } @@ -404,7 +402,7 @@ void func_80A4EBBC(EnMkk* this, PlayState* play) { void EnMkk_Update(Actor* thisx, PlayState* play) { s32 pad; Player* player; - EnMkk* this = THIS; + EnMkk* this = (EnMkk*)thisx; if (this->primColorSelect > 0) { this->primColorSelect--; @@ -505,7 +503,7 @@ void func_80A4EF74(EnMkk* this, PlayState* play) { } void func_80A4F16C(Actor* thisx, PlayState* play) { - EnMkk* this = THIS; + EnMkk* this = (EnMkk*)thisx; this->actionFunc(this, play); } @@ -514,7 +512,7 @@ void EnMkk_Draw(Actor* thisx, PlayState* play) { EnMkkModelInfo* modelInfo = &sBoeModelInfo[thisx->params]; Gfx* gfx; Color_RGBA8* primColors; - EnMkk* this = THIS; + EnMkk* this = (EnMkk*)thisx; if (this->actor.projectedPos.z > 0.0f) { MtxF* matrix; @@ -572,7 +570,7 @@ void func_80A4F4C8(Actor* thisx, PlayState* play) { Gfx* gfx; MtxF* matrix; EnMkkModelInfo* modelInfo = &sBoeModelInfo[thisx->params]; - EnMkk* this = THIS; + EnMkk* this = (EnMkk*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 2b5be95529..db50045f63 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnMm*)thisx) - void EnMm_Init(Actor* thisx, PlayState* play); void EnMm_Destroy(Actor* thisx, PlayState* play); void EnMm_Update(Actor* thisx, PlayState* play); @@ -71,7 +69,7 @@ void func_80965BBC(EnMm* this) { } void EnMm_Init(Actor* thisx, PlayState* play) { - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; EnMmActionFunc action; if ((this->actor.params >= 0) && (!CHECK_WEEKEVENTREG(WEEKEVENTREG_37_10) || @@ -96,7 +94,7 @@ void EnMm_Init(Actor* thisx, PlayState* play) { } void EnMm_Destroy(Actor* thisx, PlayState* play) { - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -197,7 +195,7 @@ void func_8096611C(EnMm* this, PlayState* play) { } void EnMm_Update(Actor* thisx, PlayState* play) { - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; Collider_ResetCylinderAC(play, &this->collider.base); this->actionFunc(this, play); @@ -208,7 +206,7 @@ void EnMm_Update(Actor* thisx, PlayState* play) { } void EnMm_Draw(Actor* thisx, PlayState* play) { - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index ee64c307fc..9c601d2727 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnMm2*)thisx) - void EnMm2_Init(Actor* thisx, PlayState* play); void EnMm2_Destroy(Actor* thisx, PlayState* play); void EnMm2_Update(Actor* thisx, PlayState* play); @@ -33,7 +31,7 @@ ActorProfile En_Mm2_Profile = { #include "assets/overlays/ovl_En_Mm2/ovl_En_Mm2.c" void EnMm2_Init(Actor* thisx, PlayState* play) { - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; Actor_SetScale(&this->actor, 0.015f); this->actionFunc = EnMm2_WaitForRead; @@ -77,7 +75,7 @@ void EnMm2_WaitForRead(EnMm2* this, PlayState* play) { } void EnMm2_Update(Actor* thisx, PlayState* play) { - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c b/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c index 11fded0c4b..ce51caed3d 100644 --- a/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c +++ b/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnMm3*)thisx) - void EnMm3_Init(Actor* thisx, PlayState* play); void EnMm3_Destroy(Actor* thisx, PlayState* play); void EnMm3_Update(Actor* thisx, PlayState* play); @@ -93,7 +91,7 @@ TexturePtr D_80A704FC[] = { object_mm_Tex_002950, object_mm_Tex_002750 }; void EnMm3_Init(Actor* thisx, PlayState* play) { s32 pad; - EnMm3* this = THIS; + EnMm3* this = (EnMm3*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 21.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_mm_Skel_0096E8, &object_mm_Anim_00A4E0, this->jointTable, @@ -115,7 +113,7 @@ void EnMm3_Init(Actor* thisx, PlayState* play) { } void EnMm3_Destroy(Actor* thisx, PlayState* play) { - EnMm3* this = THIS; + EnMm3* this = (EnMm3*)thisx; CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT); Collider_DestroyCylinder(play, &this->collider); @@ -544,7 +542,7 @@ void func_80A70084(EnMm3* this, PlayState* play) { void EnMm3_Update(Actor* thisx, PlayState* play) { s32 pad; - EnMm3* this = THIS; + EnMm3* this = (EnMm3*)thisx; this->actionFunc(this, play); @@ -559,7 +557,7 @@ void EnMm3_Update(Actor* thisx, PlayState* play) { } s32 EnMm3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMm3* this = THIS; + EnMm3* this = (EnMm3*)thisx; if (limbIndex == OBJECT_MM_LIMB_08) { rot->x += this->torsoRot.y; @@ -575,7 +573,7 @@ s32 EnMm3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnMm3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMm3* this = THIS; + EnMm3* this = (EnMm3*)thisx; if (limbIndex == OBJECT_MM_LIMB_0F) { Matrix_MultVec3f(&D_80A704F0, &this->actor.focus.pos); @@ -583,7 +581,7 @@ void EnMm3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnMm3_Draw(Actor* thisx, PlayState* play) { - EnMm3* this = THIS; + EnMm3* this = (EnMm3*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c index bd6a200724..c4a26e9258 100644 --- a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c +++ b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnMnk*)thisx) - void EnMnk_Init(Actor* thisx, PlayState* play); void EnMnk_Destroy(Actor* thisx, PlayState* play); void EnMnk_Update(Actor* thisx, PlayState* play); @@ -243,7 +241,7 @@ void EnMnk_Monkey_StartInvisible(EnMnk* this, PlayState* play) { } void EnMnk_MonkeyTiedUp_Init(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; s16 csId; s32 i; @@ -272,7 +270,7 @@ void EnMnk_MonkeyTiedUp_Init(Actor* thisx, PlayState* play) { } void EnMnk_MonkeyHanging_Init(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; Actor_ChangeCategory(play, &play->actorCtx, &this->picto.actor, ACTORCAT_PROP); this->actionFunc = EnMnk_MonkeyHanging_StruggleBeforeDunk; @@ -291,7 +289,7 @@ void EnMnk_MonkeyHanging_Init(Actor* thisx, PlayState* play) { } void EnMnk_Init(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; s32 pad; Actor_SetScale(&this->picto.actor, 0.012f); @@ -491,7 +489,7 @@ void EnMnk_Init(Actor* thisx, PlayState* play) { } void EnMnk_Destroy(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; Collider_DestroyCylinder(play, &this->collider); if ((MONKEY_GET_TYPE(&this->picto.actor) == MONKEY_TIED_UP) && (this->flags & MONKEY_FLAGS_2000)) { @@ -2046,7 +2044,7 @@ void EnMnk_DoNothing(EnMnk* this, PlayState* play) { } void EnMnk_Update(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; if (!(this->flags & MONKEY_FLAGS_1)) { Actor_MoveWithGravity(&this->picto.actor); @@ -2094,7 +2092,7 @@ void EnMnk_Update(Actor* thisx, PlayState* play) { } s32 EnMnk_Monkey_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; if (limbIndex == OBJECT_MNK_2_LIMB_03) { rot->x += this->unk_3CC; @@ -2121,7 +2119,7 @@ s32 EnMnk_MonkeyHanging_PropOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx } void EnMnk_Monkey_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; if (limbIndex == OBJECT_MNK_2_LIMB_04) { Matrix_MultVec3f(&sMonkeyFocusPosOffset, &this->picto.actor.focus.pos); @@ -2129,7 +2127,7 @@ void EnMnk_Monkey_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnMnk_MonkeyTiedUp_PropPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; if (limbIndex == OBJECT_MNK_1_LIMB_04) { Matrix_Get(&this->unk_36C); @@ -2137,7 +2135,7 @@ void EnMnk_MonkeyTiedUp_PropPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** d } void EnMnk_MonkeyHanging_PropPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; switch (limbIndex) { case OBJECT_MNK_3_LIMB_01: @@ -2216,7 +2214,7 @@ void EnMnk_Monkey_DrawFace(EnMnk* this, PlayState* play) { } void EnMnk_Draw(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; EnMnk_Monkey_DrawFace(this, play); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, @@ -2224,7 +2222,7 @@ void EnMnk_Draw(Actor* thisx, PlayState* play) { } void EnMnk_MonkeyTiedUp_Draw(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; SkelAnime_DrawFlexOpa(play, this->propSkelAnime.skeleton, this->propSkelAnime.jointTable, this->propSkelAnime.dListCount, EnMnk_MonkeyTiedUp_PropOverrideLimbDraw, @@ -2236,7 +2234,7 @@ void EnMnk_MonkeyTiedUp_Draw(Actor* thisx, PlayState* play) { } void EnMnk_MonkeyHanging_Draw(Actor* thisx, PlayState* play) { - EnMnk* this = THIS; + EnMnk* this = (EnMnk*)thisx; SkelAnime_DrawFlexOpa(play, this->propSkelAnime.skeleton, this->propSkelAnime.jointTable, this->propSkelAnime.dListCount, EnMnk_MonkeyHanging_PropOverrideLimbDraw, diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 75c8668401..e590147b28 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnMs*)thisx) - void EnMs_Init(Actor* thisx, PlayState* play); void EnMs_Destroy(Actor* thisx, PlayState* play); void EnMs_Update(Actor* thisx, PlayState* play); @@ -57,7 +55,7 @@ static InitChainEntry sInitChain[] = { }; void EnMs_Init(Actor* thisx, PlayState* play) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; Actor_ProcessInitChain(thisx, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gBeanSalesmanSkel, &gBeanSalesmanEatingAnim, this->jointTable, @@ -74,7 +72,7 @@ void EnMs_Init(Actor* thisx, PlayState* play) { } void EnMs_Destroy(Actor* thisx, PlayState* play) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -168,7 +166,7 @@ void EnMs_TalkAfterPurchase(EnMs* this, PlayState* play) { void EnMs_Update(Actor* thisx, PlayState* play) { s32 pad; - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; Actor_SetFocus(&this->actor, 20.0f); this->actor.lockOnArrowOffset = 500.0f; @@ -180,7 +178,7 @@ void EnMs_Update(Actor* thisx, PlayState* play) { } void EnMs_Draw(Actor* thisx, PlayState* play) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c index dfcfc876b1..8c892c43f4 100644 --- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c +++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnMttag*)thisx) - void EnMttag_Init(Actor* thisx, PlayState* play); void EnMttag_Destroy(Actor* thisx, PlayState* play); void EnMttag_Update(Actor* thisx, PlayState* play); @@ -475,7 +473,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) { void EnMttag_Init(Actor* thisx, PlayState* play) { Player* player; - EnMttag* this = THIS; + EnMttag* this = (EnMttag*)thisx; if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) { player = GET_PLAYER(play); @@ -501,7 +499,7 @@ void EnMttag_Init(Actor* thisx, PlayState* play) { } void EnMttag_Destroy(Actor* thisx, PlayState* play) { - EnMttag* this = THIS; + EnMttag* this = (EnMttag*)thisx; if (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] != TIMER_STATE_6) { gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP; @@ -509,7 +507,7 @@ void EnMttag_Destroy(Actor* thisx, PlayState* play) { } void EnMttag_Update(Actor* thisx, PlayState* play) { - EnMttag* this = THIS; + EnMttag* this = (EnMttag*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c index 1009be739b..053ec5634e 100644 --- a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c +++ b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnMushi2*)thisx) - void EnMushi2_Init(Actor* thisx, PlayState* play); void EnMushi2_Destroy(Actor* thisx, PlayState* play); void EnMushi2_Update(Actor* thisx, PlayState* play); @@ -598,7 +596,7 @@ f32 func_80A69AA8(f32 x, f32 y, f32 z, Vec3f* pos) { } void func_80A69ADC(Actor* thisx) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; ObjBean* bean = this->unk_34C; f32 sp44; f32 sp40; @@ -632,7 +630,7 @@ void func_80A69ADC(Actor* thisx) { } void func_80A69CE0(Actor* thisx) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; this->unk_360 = Rand_ZeroOne() * 1500.0f; this->unk_364 = 0; @@ -691,7 +689,7 @@ s32 EnMushi2_IsUnderwater(EnMushi2* this, PlayState* play) { } void func_80A69F5C(Actor* thisx, PlayState* play) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; s32 i; for (i = 0; i < 7; i++) { @@ -738,7 +736,7 @@ void func_80A6A0D8(EnMushi2* this) { } void EnMushi2_Init(Actor* thisx, PlayState* play) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; s32 pad; s32 sp3C; @@ -780,7 +778,7 @@ void EnMushi2_Init(Actor* thisx, PlayState* play) { } void EnMushi2_Destroy(Actor* thisx, PlayState* play) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; Collider_DestroyJntSph(play, &this->collider); func_80A68B6C(this); @@ -834,7 +832,7 @@ void func_80A6A36C(EnMushi2* this, PlayState* play) { } void func_80A6A508(Actor* thisx) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; if (this->unk_36A > 100) { this->unk_35C = Rand_ZeroOne() + 1.0f; @@ -1116,7 +1114,7 @@ void func_80A6B0D8(EnMushi2* this, PlayState* play) { } void EnMushi2_Update(Actor* thisx, PlayState* play) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; s32 pad; f32 sp4C; f32 phi_f0; @@ -1234,7 +1232,7 @@ void EnMushi2_Update(Actor* thisx, PlayState* play) { } void EnMushi2_Draw(Actor* thisx, PlayState* play) { - EnMushi2* this = THIS; + EnMushi2* this = (EnMushi2*)thisx; func_80A687A0(this); Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Muto/z_en_muto.c b/src/overlays/actors/ovl_En_Muto/z_en_muto.c index 7aa1d268e2..2994158d81 100644 --- a/src/overlays/actors/ovl_En_Muto/z_en_muto.c +++ b/src/overlays/actors/ovl_En_Muto/z_en_muto.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnMuto*)thisx) - void EnMuto_Init(Actor* thisx, PlayState* play); void EnMuto_Destroy(Actor* thisx, PlayState* play); void EnMuto_Update(Actor* thisx, PlayState* play2); @@ -55,7 +53,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnMuto_Init(Actor* thisx, PlayState* play) { - EnMuto* this = THIS; + EnMuto* this = (EnMuto*)thisx; this->actor.colChkInfo.mass = MASS_IMMOVABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f); @@ -91,7 +89,7 @@ void EnMuto_Init(Actor* thisx, PlayState* play) { } void EnMuto_Destroy(Actor* thisx, PlayState* play) { - EnMuto* this = THIS; + EnMuto* this = (EnMuto*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -256,7 +254,7 @@ void EnMuto_InDialogue(EnMuto* this, PlayState* play) { void EnMuto_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnMuto* this = THIS; + EnMuto* this = (EnMuto*)thisx; SkelAnime_Update(&this->skelAnime); @@ -293,7 +291,7 @@ void EnMuto_Update(Actor* thisx, PlayState* play2) { } s32 EnMuto_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnMuto* this = THIS; + EnMuto* this = (EnMuto*)thisx; if (limbIndex == OBJECT_TORYO_LIMB_01) { rot->x += this->waistRot.y; @@ -308,7 +306,7 @@ s32 EnMuto_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnMuto_Draw(Actor* thisx, PlayState* play) { - EnMuto* this = THIS; + EnMuto* this = (EnMuto*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index b4b36021d0..73169c1da7 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnNb*)thisx) - void EnNb_Init(Actor* thisx, PlayState* play); void EnNb_Destroy(Actor* thisx, PlayState* play); void EnNb_Update(Actor* thisx, PlayState* play); @@ -369,7 +367,7 @@ typedef enum EnNbBehaviour { } EnNbBehaviour; s32 func_80BC00AC(Actor* thisx, PlayState* play) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; s16 csId = func_80BC0050(this, 0); s32 ret = false; @@ -414,7 +412,7 @@ s32 func_80BC00AC(Actor* thisx, PlayState* play) { } s32 func_80BC01DC(Actor* thisx, PlayState* play) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; s32 pad; s32 ret = false; @@ -786,7 +784,7 @@ void func_80BC0EAC(EnNb* this, PlayState* play) { } void EnNb_Init(Actor* thisx, PlayState* play) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gNbSkel, NULL, this->jointTable, this->morphTable, NB_LIMB_MAX); @@ -811,14 +809,14 @@ void EnNb_Init(Actor* thisx, PlayState* play) { } void EnNb_Destroy(Actor* thisx, PlayState* play) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; Collider_DestroyCylinder(play, &this->collider); play->interfaceCtx.storyState = STORY_STATE_DESTROY; } void EnNb_Update(Actor* thisx, PlayState* play) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; func_80BC04FC(this, play); this->actionFunc(this, play); @@ -836,7 +834,7 @@ void EnNb_Update(Actor* thisx, PlayState* play) { } s32 EnNb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; if (limbIndex == NB_LIMB_HEAD) { func_80BC05A8(this, play); @@ -846,7 +844,7 @@ s32 EnNb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnNb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; Vec3f focusTarget; if ((CutsceneManager_GetCurrentCsId() == CS_ID_NONE) && (limbIndex == NB_LIMB_HEAD)) { @@ -859,7 +857,7 @@ void EnNb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnNb_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; s32 stepRot; s32 overrideRot; @@ -890,7 +888,7 @@ void EnNb_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnNb_Draw(Actor* thisx, PlayState* play) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; if (this->scheduleResult != EN_NB_SCH_NONE) { Gfx_SetupDL37_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c b/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c index 8721185230..bd0abea0e1 100644 --- a/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c +++ b/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnNeoReeba*)thisx) - void EnNeoReeba_Init(Actor* thisx, PlayState* play); void EnNeoReeba_Destroy(Actor* thisx, PlayState* play); void EnNeoReeba_Update(Actor* thisx, PlayState* play); @@ -117,7 +115,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnNeoReeba_Init(Actor* thisx, PlayState* play) { - EnNeoReeba* this = THIS; + EnNeoReeba* this = (EnNeoReeba*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f); SkelAnime_Init(play, &this->skelAnime, &gLeeverSkel, &gLeeverSpinAnim, this->jointTable, this->morphTable, @@ -155,7 +153,7 @@ void EnNeoReeba_Init(Actor* thisx, PlayState* play) { } void EnNeoReeba_Destroy(Actor* thisx, PlayState* play) { - EnNeoReeba* this = THIS; + EnNeoReeba* this = (EnNeoReeba*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -702,7 +700,7 @@ void EnNeoReeba_SinkIfStoneMask(EnNeoReeba* this, PlayState* play) { } void EnNeoReeba_Update(Actor* thisx, PlayState* play) { - EnNeoReeba* this = THIS; + EnNeoReeba* this = (EnNeoReeba*)thisx; if (EN_NEO_REEBA_IS_LARGE(&this->actor)) { this->collider.dim.radius = 27; @@ -722,7 +720,7 @@ void EnNeoReeba_Update(Actor* thisx, PlayState* play) { } s32 EnNeoReeba_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnNeoReeba* this = THIS; + EnNeoReeba* this = (EnNeoReeba*)thisx; if ((limbIndex == OBJECT_RB_LIMB_03) && (this->rotationSpeed != 0.0f)) { rot->y += TRUNCF_BINANG(this->rotationSpeed * Math_SinS(this->rotationAngle)); @@ -733,7 +731,7 @@ s32 EnNeoReeba_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnNeoReeba_Draw(Actor* thisx, PlayState* play) { - EnNeoReeba* this = THIS; + EnNeoReeba* this = (EnNeoReeba*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Nimotsu/z_en_nimotsu.c b/src/overlays/actors/ovl_En_Nimotsu/z_en_nimotsu.c index 0020a6d863..7cf1d14e84 100644 --- a/src/overlays/actors/ovl_En_Nimotsu/z_en_nimotsu.c +++ b/src/overlays/actors/ovl_En_Nimotsu/z_en_nimotsu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnNimotsu*)thisx) - void EnNimotsu_Init(Actor* thisx, PlayState* play); void EnNimotsu_Destroy(Actor* thisx, PlayState* play); void EnNimotsu_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ void EnNimotsu_UpdateCollision(EnNimotsu* this, PlayState* play) { } void EnNimotsu_Init(Actor* thisx, PlayState* play) { - EnNimotsu* this = THIS; + EnNimotsu* this = (EnNimotsu*)thisx; Collider_InitCylinder(play, &this->collider); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -67,14 +65,14 @@ void EnNimotsu_Init(Actor* thisx, PlayState* play) { } void EnNimotsu_Destroy(Actor* thisx, PlayState* play) { - EnNimotsu* this = THIS; + EnNimotsu* this = (EnNimotsu*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnNimotsu_Update(Actor* thisx, PlayState* play) { s32 pad; - EnNimotsu* this = THIS; + EnNimotsu* this = (EnNimotsu*)thisx; Vec3f dustPosition; Actor_MoveWithGravity(&this->actor); @@ -97,7 +95,7 @@ void EnNimotsu_Update(Actor* thisx, PlayState* play) { void EnNimotsu_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnNimotsu* this = THIS; + EnNimotsu* this = (EnNimotsu*)thisx; Vec3f position; Vec3f scale; diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index b8a9e512ce..ba5fbf055c 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_THROW_ONLY) -#define THIS ((EnNiw*)thisx) - void EnNiw_Init(Actor* thisx, PlayState* play); void EnNiw_Destroy(Actor* thisx, PlayState* play); void EnNiw_Update(Actor* thisx, PlayState* play2); @@ -88,7 +86,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE), ICHAIN_F32(lockOnArrowOffset, 0, ICHAIN_STOP), }; - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Vec3f D_808934C4 = { 90000.0f, 90000.0f, 90000.0f }; if (this->actor.params < 0) { // all scene spawned cucco are (-1) @@ -142,7 +140,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { } void EnNiw_Destroy(Actor* thisx, PlayState* play) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; if (this->niwType == NIW_TYPE_REGULAR) { Collider_DestroyCylinder(play, &this->collider); @@ -732,7 +730,7 @@ void EnNiw_CheckRage(EnNiw* this, PlayState* play) { void EnNiw_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Player* player = GET_PLAYER(play); s16 i; s16 featherCount; @@ -905,7 +903,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play2) { } s32 EnNiw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; if (limbIndex == NIW_LIMB_UPPER_BODY) { rot->y += TRUNCF_BINANG(this->upperBodyRotY); @@ -927,7 +925,7 @@ s32 EnNiw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnNiw_Draw(Actor* thisx, PlayState* play) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Nnh/z_en_nnh.c b/src/overlays/actors/ovl_En_Nnh/z_en_nnh.c index 2096748c5a..3d3d82ffc6 100644 --- a/src/overlays/actors/ovl_En_Nnh/z_en_nnh.c +++ b/src/overlays/actors/ovl_En_Nnh/z_en_nnh.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnNnh*)thisx) - void EnNnh_Init(Actor* thisx, PlayState* play); void EnNnh_Destroy(Actor* thisx, PlayState* play); void EnNnh_Update(Actor* thisx, PlayState* play); @@ -54,7 +52,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnNnh_Init(Actor* thisx, PlayState* play) { - EnNnh* this = THIS; + EnNnh* this = (EnNnh*)thisx; Actor_SetScale(&this->actor, 0.01f); Collider_InitCylinder(play, &this->collider); @@ -66,7 +64,7 @@ void EnNnh_Init(Actor* thisx, PlayState* play) { } void EnNnh_Destroy(Actor* thisx, PlayState* play) { - EnNnh* this = THIS; + EnNnh* this = (EnNnh*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -95,7 +93,7 @@ void EnNnh_Dialogue(EnNnh* this, PlayState* play) { } void EnNnh_Update(Actor* thisx, PlayState* play) { - EnNnh* this = THIS; + EnNnh* this = (EnNnh*)thisx; s32 pad; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index 1a0f4e5093..72912b9d7b 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnNutsball*)thisx) - void EnNutsball_Init(Actor* thisx, PlayState* play); void EnNutsball_Destroy(Actor* thisx, PlayState* play); void EnNutsball_Update(Actor* thisx, PlayState* play2); @@ -52,7 +50,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnNutsball_Init(Actor* thisx, PlayState* play) { - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawCircle, 13.0f); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -75,7 +73,7 @@ void EnNutsball_Init(Actor* thisx, PlayState* play) { } void EnNutsball_Destroy(Actor* thisx, PlayState* play) { - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -88,7 +86,7 @@ void EnNutsball_InitColliderParams(EnNutsball* this) { void EnNutsball_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; Player* player = GET_PLAYER(play); Vec3f worldPos; Vec3s worldRot; @@ -170,7 +168,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play2) { } void EnNutsball_Draw(Actor* thisx, PlayState* play) { - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index e19bfaeb50..10aa228748 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnNwc*)thisx) - void EnNwc_Init(Actor* thisx, PlayState* play); void EnNwc_Destroy(Actor* thisx, PlayState* play); void EnNwc_Update(Actor* thisx, PlayState* play); @@ -54,7 +52,7 @@ ActorProfile En_Nwc_Profile = { void EnNwc_Init(Actor* thisx, PlayState* play) { s32 niwObjectSlot; - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; niwObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_NIW); if (niwObjectSlot <= OBJECT_SLOT_NONE) { @@ -85,7 +83,7 @@ void EnNwc_Init(Actor* thisx, PlayState* play) { } void EnNwc_Destroy(Actor* thisx, PlayState* play) { - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; } void EnNwc_SpawnDust(EnNwc* this, PlayState* play) { @@ -459,7 +457,7 @@ void EnNwc_CheckForBreman(EnNwc* this, PlayState* play) { } void EnNwc_Update(Actor* thisx, PlayState* play) { - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 10.0f, UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4); @@ -488,7 +486,7 @@ void EnNwc_Update(Actor* thisx, PlayState* play) { void EnNwc_Draw(Actor* thisx, PlayState* play) { TexturePtr eyeTextures[] = { gNwcEyeOpenTex, gNwcEyeClosedTex }; - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); @@ -509,7 +507,7 @@ void EnNwc_Draw(Actor* thisx, PlayState* play) { } s32 EnNwc_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; if (limbIndex == NIW_LIMB_UPPER_BODY) { rot->y += this->upperBodyRotY; @@ -523,7 +521,7 @@ s32 EnNwc_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnNwc_DrawAdultBody(Actor* thisx, PlayState* play) { - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->niwSkeleton.skeleton, this->niwSkeleton.jointTable, this->niwSkeleton.dListCount, diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c index 3c85b6f330..082a25fc50 100644 --- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c +++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnOkarinaEffect*)thisx) - void EnOkarinaEffect_Init(Actor* thisx, PlayState* play); void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play); void EnOkarinaEffect_Update(Actor* thisx, PlayState* play); @@ -38,7 +36,7 @@ void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play) { } void EnOkarinaEffect_Init(Actor* thisx, PlayState* play) { - EnOkarinaEffect* this = THIS; + EnOkarinaEffect* this = (EnOkarinaEffect*)thisx; if (play->envCtx.precipitation[PRECIP_RAIN_CUR] != 0) { Actor_Kill(&this->actor); @@ -78,7 +76,7 @@ void func_8096B1FC(EnOkarinaEffect* this, PlayState* play) { } void EnOkarinaEffect_Update(Actor* thisx, PlayState* play) { - EnOkarinaEffect* this = THIS; + EnOkarinaEffect* this = (EnOkarinaEffect*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 1467b30571..c6f8d4f9d7 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnOkarinaTag*)thisx) - void EnOkarinaTag_Init(Actor* thisx, PlayState* play); void EnOkarinaTag_Destroy(Actor* thisx, PlayState* play); void EnOkarinaTag_Update(Actor* thisx, PlayState* play); @@ -33,7 +31,7 @@ void EnOkarinaTag_Destroy(Actor* thisx, PlayState* play) { } void EnOkarinaTag_Init(Actor* thisx, PlayState* play) { - EnOkarinaTag* this = THIS; + EnOkarinaTag* this = (EnOkarinaTag*)thisx; f32 zRot = 0.0f; s32 i = 0; @@ -152,7 +150,7 @@ void func_8093E68C(EnOkarinaTag* this, PlayState* play) { } void EnOkarinaTag_Update(Actor* thisx, PlayState* play) { - EnOkarinaTag* this = THIS; + EnOkarinaTag* this = (EnOkarinaTag*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index 8e0f5b03b6..130b08013b 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnOkuta*)thisx) - void EnOkuta_Init(Actor* thisx, PlayState* play2); void EnOkuta_Destroy(Actor* thisx, PlayState* play); void EnOkuta_Update(Actor* thisx, PlayState* play2); @@ -145,7 +143,7 @@ static InitChainEntry sInitChain[] = { void EnOkuta_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; WaterBox* waterBox; f32 waterSurface; s32 bgId; @@ -200,7 +198,7 @@ void EnOkuta_Init(Actor* thisx, PlayState* play2) { } void EnOkuta_Destroy(Actor* thisx, PlayState* play) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -883,7 +881,7 @@ void EnOkuta_UpdateDamage(EnOkuta* this, PlayState* play) { void EnOkuta_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; s32 pad[2]; if (EN_OKUTA_GET_TYPE(&this->actor) == EN_OKUTA_TYPE_RED_OCTOROK) { @@ -940,7 +938,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) { } void EnOkuta_Projectile_Update(Actor* thisx, PlayState* play) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; Player* player = GET_PLAYER(play); s32 pad; Vec3f prevPos; @@ -1021,7 +1019,7 @@ s32 EnOkuta_GetSnoutScale(EnOkuta* this, f32 curFrame, Vec3f* scale) { } s32 EnOkuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; s32 shouldScaleLimb = false; Vec3f scale; f32 curFrame = this->skelAnime.curFrame; @@ -1076,7 +1074,7 @@ static Vec3f sEffectsBodyPartOffsets[3] = { }; void EnOkuta_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; s32 bodyPartIndex = sLimbToBodyParts[limbIndex]; s32 i; @@ -1097,7 +1095,7 @@ void EnOkuta_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnOkuta_Draw(Actor* thisx, PlayState* play) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; s32 pad; Gfx* gfx; diff --git a/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c b/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c index 10e2d511d9..45c52838b9 100644 --- a/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c +++ b/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnOnpuman*)thisx) - void EnOnpuman_Init(Actor* thisx, PlayState* play); void EnOnpuman_Destroy(Actor* thisx, PlayState* play); void EnOnpuman_Update(Actor* thisx, PlayState* play); @@ -49,7 +47,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnOnpuman_Init(Actor* thisx, PlayState* play) { - EnOnpuman* this = THIS; + EnOnpuman* this = (EnOnpuman*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); this->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA; @@ -66,7 +64,7 @@ void EnOnpuman_Init(Actor* thisx, PlayState* play) { } void EnOnpuman_Destroy(Actor* thisx, PlayState* play) { - EnOnpuman* this = THIS; + EnOnpuman* this = (EnOnpuman*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -170,7 +168,7 @@ void func_80B121D8(EnOnpuman* this, PlayState* play) { void EnOnpuman_Update(Actor* thisx, PlayState* play) { s32 pad; - EnOnpuman* this = THIS; + EnOnpuman* this = (EnOnpuman*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_En_Osk/z_en_osk.c b/src/overlays/actors/ovl_En_Osk/z_en_osk.c index 7c3dcce0ea..57d8c564d6 100644 --- a/src/overlays/actors/ovl_En_Osk/z_en_osk.c +++ b/src/overlays/actors/ovl_En_Osk/z_en_osk.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnOsk*)thisx) - void EnOsk_Init(Actor* thisx, PlayState* play); void EnOsk_Destroy(Actor* thisx, PlayState* play); void EnOsk_Update(Actor* thisx, PlayState* play); @@ -115,7 +113,7 @@ AnimationHeader* sAnimationsType2[OSK_TYPE2_ANIM_MAX] = { }; void EnOsk_Init(Actor* thisx, PlayState* play) { - EnOsk* this = THIS; + EnOsk* this = (EnOsk*)thisx; Actor_SetScale(&this->actor, 0.013f); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f); @@ -571,14 +569,14 @@ void func_80BF6A20(EnOsk* this, PlayState* play) { } void EnOsk_Update(Actor* thisx, PlayState* play) { - EnOsk* this = THIS; + EnOsk* this = (EnOsk*)thisx; this->actionFunc(this, play); } void EnOsk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80BF7024 = { 0.0f, 0.0f, 0.0f }; - EnOsk* this = THIS; + EnOsk* this = (EnOsk*)thisx; if (limbIndex == 1) { // OBJECT_IKN_DEMO_1_LIMB_01 @@ -590,7 +588,7 @@ void EnOsk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnOsk_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnOsk* this = THIS; + EnOsk* this = (EnOsk*)thisx; Gfx* gfx; Vec3f sp80; s32 pad2[4]; diff --git a/src/overlays/actors/ovl_En_Osn/z_en_osn.c b/src/overlays/actors/ovl_En_Osn/z_en_osn.c index 00f9879c20..d61ad6e46b 100644 --- a/src/overlays/actors/ovl_En_Osn/z_en_osn.c +++ b/src/overlays/actors/ovl_En_Osn/z_en_osn.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnOsn*)thisx) - void EnOsn_Init(Actor* thisx, PlayState* play); void EnOsn_Destroy(Actor* thisx, PlayState* play); void EnOsn_Update(Actor* thisx, PlayState* play); @@ -902,7 +900,7 @@ void EnOsn_DoNothing(EnOsn* this, PlayState* play) { void EnOsn_Init(Actor* thisx, PlayState* play) { s32 pad; - EnOsn* this = THIS; + EnOsn* this = (EnOsn*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); @@ -959,7 +957,7 @@ void EnOsn_Init(Actor* thisx, PlayState* play) { } void EnOsn_Destroy(Actor* thisx, PlayState* play) { - EnOsn* this = THIS; + EnOsn* this = (EnOsn*)thisx; SkelAnime_Free(&this->skelAnime, play); Collider_DestroyCylinder(play, &this->collider); @@ -967,7 +965,7 @@ void EnOsn_Destroy(Actor* thisx, PlayState* play) { void EnOsn_Update(Actor* thisx, PlayState* play) { s32 pad; - EnOsn* this = THIS; + EnOsn* this = (EnOsn*)thisx; u32 isSwitchFlagSet = Flags_GetSwitch(play, 0); this->actionFunc(this, play); @@ -1033,7 +1031,7 @@ void EnOsn_Draw(Actor* thisx, PlayState* play) { static TexturePtr sSmileTex = gHappyMaskSalesmanSmileTex; static TexturePtr sFrownTex = gHappyMaskSalesmanFrownTex; s32 pad; - EnOsn* this = THIS; + EnOsn* this = (EnOsn*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 76370338be..be02974418 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnOssan*)thisx) - #define LOOKED_AT_PLAYER (1 << 0) #define END_INTERACTION (1 << 1) @@ -265,7 +263,7 @@ void EnOssan_SpawnShopItems(EnOssan* this, PlayState* play, ShopItem* shop) { } void EnOssan_Init(Actor* thisx, PlayState* play) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s16 objectId; if ((this->actor.params > ENOSSAN_PART_TIME_WORKER) && (this->actor.params < ENOSSAN_CURIOSITY_SHOP_MAN)) { @@ -285,7 +283,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) { } void EnOssan_Destroy(Actor* thisx, PlayState* play) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1591,7 +1589,7 @@ void EnOssan_GetCutscenes(EnOssan* this, PlayState* play) { } void EnOssan_Update(Actor* thisx, PlayState* play) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if (this->actionFunc != EnOssan_InitShop) { this->blinkFunc(this); @@ -1722,7 +1720,7 @@ void EnOssan_DrawStickDirectionPrompts(PlayState* play, EnOssan* this) { s32 EnOssan_CuriosityShopMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if (limbIndex == FSN_LIMB_HEAD) { Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY); @@ -1732,7 +1730,7 @@ s32 EnOssan_CuriosityShopMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gf s32 EnOssan_PartTimer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if (limbIndex == ANI_LIMB_HEAD) { Matrix_RotateXS(this->partTimerHeadRot.y, MTXMODE_APPLY); @@ -1742,7 +1740,7 @@ s32 EnOssan_PartTimer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dLi } void EnOssan_CuriosityShopMan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if ((limbIndex == FSN_LIMB_PELVIS) || (limbIndex == FSN_LIMB_LEFT_UPPER_ARM) || (limbIndex == FSN_LIMB_RIGHT_UPPER_ARM)) { @@ -1753,7 +1751,7 @@ void EnOssan_CuriosityShopMan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** void EnOssan_PartTimer_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sFocusOffset = { 800.0f, 500.0f, 0.0f }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if (limbIndex == ANI_LIMB_HEAD) { Matrix_MultVec3f(&sFocusOffset, &this->actor.focus.pos); @@ -1763,7 +1761,7 @@ void EnOssan_PartTimer_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, void EnOssan_CuriosityShopMan_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { gFsnEyeOpenTex, gFsnEyeHalfTex, gFsnEyeClosedTex }; s32 pad; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1781,7 +1779,7 @@ void EnOssan_CuriosityShopMan_Draw(Actor* thisx, PlayState* play) { void EnOssan_PartTimer_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { gAniOpenEyeTex, gAniClosingEyeTex, gAniClosedEyeTex }; s32 pad; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.c b/src/overlays/actors/ovl_En_Ot/z_en_ot.c index a58ab0a214..21d29b60fb 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.c +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnOt*)thisx) - void EnOt_Init(Actor* thisx, PlayState* play); void EnOt_Destroy(Actor* thisx, PlayState* play); void EnOt_Update(Actor* thisx, PlayState* play); @@ -136,7 +134,7 @@ void func_80B5B2E0(PlayState* play, Vec3f* pos, s16 pathIndex, Vec3f* vec, s32* void EnOt_Init(Actor* thisx, PlayState* play) { s32 pad; - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; s32 bgId; s32 pad2; Vec3f sp64; @@ -296,7 +294,7 @@ void EnOt_Init(Actor* thisx, PlayState* play) { } void EnOt_Destroy(Actor* thisx, PlayState* play) { - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; Collider_DestroyCylinder(play, &this->collider); LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); @@ -967,7 +965,7 @@ void func_80B5D750(EnOt* this, PlayState* play) { void EnOt_Update(Actor* thisx, PlayState* play) { s32 pad; - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; if ((this->animIndex == SEAHORSE_ANIM_1) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Actor_PlaySfx(&this->actor, NA_SE_EV_SEAHORSE_SWIM); @@ -1009,7 +1007,7 @@ void EnOt_Update(Actor* thisx, PlayState* play) { void func_80B5DAEC(Actor* thisx, PlayState* play) { s32 pad; - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; this->actionFunc(this, play); Actor_SetFocus(&this->actor, 12.0f); @@ -1022,7 +1020,7 @@ void func_80B5DAEC(Actor* thisx, PlayState* play) { void func_80B5DB6C(Actor* thisx, PlayState* play) { s32 pad; - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; Player* player = GET_PLAYER(play); if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_84_10) && !(this->unk_32C & 8)) { @@ -1062,7 +1060,7 @@ void func_80B5DB6C(Actor* thisx, PlayState* play) { void EnOt_Draw(Actor* thisx, PlayState* play) { s32 pad[2]; - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; Gfx* gfx; Matrix_Push(); @@ -1101,7 +1099,7 @@ void EnOt_Draw(Actor* thisx, PlayState* play) { void EnOt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80B5E410 = { 400.0f, 600.0f, 0.0f }; - EnOt* this = THIS; + EnOt* this = (EnOt*)thisx; if (limbIndex == OBJECT_OT_LIMB_04) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 034832330d..f74b37b962 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnOwl*)thisx) - void EnOwl_Init(Actor* thisx, PlayState* play); void EnOwl_Destroy(Actor* thisx, PlayState* play); void EnOwl_Update(Actor* thisx, PlayState* play); @@ -99,7 +97,7 @@ void func_8095A510(EnOwl* this, PlayState* play) { void EnOwl_Init(Actor* thisx, PlayState* play) { s32 pad; - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; s32 i; s16 csId = this->actor.csId; s32 owlType; @@ -209,7 +207,7 @@ void EnOwl_Init(Actor* thisx, PlayState* play) { } void EnOwl_Destroy(Actor* thisx, PlayState* play) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; if (ENOWL_GET_TYPE(&this->actor) != ENOWL_GET_TYPE_30) { Collider_DestroyCylinder(play, &this->collider); @@ -905,7 +903,7 @@ void func_8095C568(EnOwl* this) { void EnOwl_Update(Actor* thisx, PlayState* play) { s32 pad; - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; s16 sp36; if (this->actor.draw != NULL) { @@ -1100,7 +1098,7 @@ void EnOwl_Update(Actor* thisx, PlayState* play) { } void func_8095CCF4(Actor* thisx, PlayState* play) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; Player* player = GET_PLAYER(play); if (player->stateFlags3 & PLAYER_STATE3_10000000) { @@ -1130,7 +1128,7 @@ void func_8095CCF4(Actor* thisx, PlayState* play) { } s32 EnOwl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; switch (limbIndex) { case OWL_FLYING_LIMB_HEAD: // OWL_PERCHING_LIMB_HEAD @@ -1163,7 +1161,7 @@ s32 EnOwl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnOwl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; Vec3f sp18; sp18.z = 0.0f; @@ -1187,7 +1185,7 @@ void EnOwl_Draw(Actor* thisx, PlayState* play) { gOwlEyeClosedTex, }; s32 pad; - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1202,7 +1200,7 @@ void EnOwl_Draw(Actor* thisx, PlayState* play) { } void func_8095D074(Actor* thisx, PlayState* play) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c index 9dac114dff..fa8317698c 100644 --- a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c +++ b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnPamera*)thisx) - void EnPamera_Init(Actor* thisx, PlayState* play); void EnPamera_Destroy(Actor* thisx, PlayState* play); void EnPamera_Update(Actor* thisx, PlayState* play); @@ -149,7 +147,7 @@ static TexturePtr D_80BDA610[] = { object_pamera_Tex_0072E8, object_pamera_Tex_0 void EnPamera_Init(Actor* thisx, PlayState* play) { s32 pad; - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; Vec3f sp44; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 15.0f); @@ -244,7 +242,7 @@ void func_80BD8658(EnPamera* this) { } void EnPamera_Destroy(Actor* thisx, PlayState* play) { - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -538,7 +536,7 @@ void func_80BD94E0(EnPamera* this, PlayState* play) { void EnPamera_Update(Actor* thisx, PlayState* play) { s32 pad; - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); @@ -551,7 +549,7 @@ void EnPamera_Update(Actor* thisx, PlayState* play) { } s32 EnPamera_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; if (limbIndex == PAMELA_LIMB_HEAD) { rot->x += this->headRot.y; @@ -561,7 +559,7 @@ s32 EnPamera_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void EnPamera_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; if (limbIndex == PAMELA_LIMB_HEAD) { Matrix_MultVec3f(&D_80BDA5F0, &this->actor.focus.pos); @@ -569,7 +567,7 @@ void EnPamera_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r } void EnPamera_Draw(Actor* thisx, PlayState* play) { - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -880,7 +878,7 @@ void func_80BDA2E0(EnPamera* this, PlayState* play) { void func_80BDA344(Actor* thisx, PlayState* play) { s32 pad; - EnPamera* this = THIS; + EnPamera* this = (EnPamera*)thisx; this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); diff --git a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c index 25bc240020..79f7f77272 100644 --- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c +++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnPametfrog*)thisx) - void EnPametfrog_Init(Actor* thisx, PlayState* play); void EnPametfrog_Destroy(Actor* thisx, PlayState* play); void EnPametfrog_Update(Actor* thisx, PlayState* play); @@ -180,7 +178,7 @@ static s32 sIsFrogReturnedFlags[] = { }; void EnPametfrog_Init(Actor* thisx, PlayState* play) { - EnPametfrog* this = THIS; + EnPametfrog* this = (EnPametfrog*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -213,7 +211,7 @@ void EnPametfrog_Init(Actor* thisx, PlayState* play) { } void EnPametfrog_Destroy(Actor* thisx, PlayState* play) { - EnPametfrog* this = THIS; + EnPametfrog* this = (EnPametfrog*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -1329,7 +1327,7 @@ void EnPametfrog_ApplyDamageEffect(EnPametfrog* this, PlayState* play) { } void EnPametfrog_Update(Actor* thisx, PlayState* play) { - EnPametfrog* this = THIS; + EnPametfrog* this = (EnPametfrog*)thisx; f32 unk2C4; f32 wallCheckRadius; @@ -1409,7 +1407,7 @@ static s8 sLimbToBodyParts[GEKKO_LIMB_MAX] = { }; void EnPametfrog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnPametfrog* this = THIS; + EnPametfrog* this = (EnPametfrog*)thisx; Vec3f vec; Vec3s* center; s8 bodyPartIndex; @@ -1435,7 +1433,7 @@ void EnPametfrog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnPametfrog_Draw(Actor* thisx, PlayState* play) { - EnPametfrog* this = THIS; + EnPametfrog* this = (EnPametfrog*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Matrix_RotateYS(this->spinYaw, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Paper/z_en_paper.c b/src/overlays/actors/ovl_En_Paper/z_en_paper.c index 60ae91a5a1..2dbb70c72b 100644 --- a/src/overlays/actors/ovl_En_Paper/z_en_paper.c +++ b/src/overlays/actors/ovl_En_Paper/z_en_paper.c @@ -15,8 +15,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_100000 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnPaper*)thisx) - void EnPaper_Init(Actor* thisx, PlayState* play); void EnPaper_Destroy(Actor* thisx, PlayState* play); void EnPaper_Update(Actor* thisx, PlayState* play); @@ -44,7 +42,7 @@ ActorProfile En_Paper_Profile = { static Vec3f sUnitVecZ = { 0.0f, 0.0f, 1.0f }; void EnPaper_Init(Actor* thisx, PlayState* play) { - EnPaper* this = THIS; + EnPaper* this = (EnPaper*)thisx; Actor_SetScale(&this->actor, 0.01f); this->timer = 70; @@ -195,7 +193,7 @@ void EnPaper_UpdateWind(EnPaper* this) { } void EnPaper_Update(Actor* thisx, PlayState* play) { - EnPaper* this = THIS; + EnPaper* this = (EnPaper*)thisx; this->actionFunc(this, play); EnPaper_UpdateWind(this); @@ -209,7 +207,7 @@ void EnPaper_Update(Actor* thisx, PlayState* play) { } void EnPaper_Draw(Actor* thisx, PlayState* play) { - EnPaper* this = THIS; + EnPaper* this = (EnPaper*)thisx; EnPaperConfetto* piece = this->pieces; s32 i; diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index 7878858736..5c733b1da3 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnPart*)thisx) - void EnPart_Init(Actor* thisx, PlayState* play); void EnPart_Destroy(Actor* thisx, PlayState* play); void EnPart_Update(Actor* thisx, PlayState* play); @@ -119,7 +117,7 @@ void func_808654C4(EnPart* this, PlayState* play) { EnPartActionFunc sActionFuncs[] = { func_80865390, func_808654C4 }; void EnPart_Update(Actor* thisx, PlayState* play) { - EnPart* this = THIS; + EnPart* this = (EnPart*)thisx; Actor_MoveWithGravity(&this->actor); @@ -127,7 +125,7 @@ void EnPart_Update(Actor* thisx, PlayState* play) { } void EnPart_Draw(Actor* thisx, PlayState* play) { - EnPart* this = THIS; + EnPart* this = (EnPart*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 8e95899a57..5c61c5a3d5 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnPeehat*)thisx) - void EnPeehat_Init(Actor* thisx, PlayState* play); void EnPeehat_Destroy(Actor* thisx, PlayState* play); void EnPeehat_Update(Actor* thisx, PlayState* play2); @@ -175,7 +173,7 @@ static InitChainEntry sInitChain[] = { }; void EnPeehat_Init(Actor* thisx, PlayState* play) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_Init(play, &this->skelAnime, &object_ph_Skel_001C80, &object_ph_Anim_0009C4, this->jointTable, @@ -213,7 +211,7 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) { } void EnPeehat_Destroy(Actor* thisx, PlayState* play) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroySphere(play, &this->colliderSphere); @@ -749,7 +747,7 @@ void func_8089874C(EnPeehat* this, PlayState* play) { void EnPeehat_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; if (thisx->params == 0) { func_8089874C(this, play); @@ -836,7 +834,7 @@ void EnPeehat_Update(Actor* thisx, PlayState* play2) { } s32 EnPeehat_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; s32 pad; if (limbIndex == OBJECT_PH_LIMB_04) { @@ -905,7 +903,7 @@ static s8 sLimbToBodyParts[OBJECT_PH_LIMB_MAX] = { void EnPeehat_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { PlayState* play = play2; - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; s32 i; s32 bodyPartIndex = sLimbToBodyParts[limbIndex]; Gfx* gfx; @@ -950,7 +948,7 @@ void EnPeehat_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* } void EnPeehat_Draw(Actor* thisx, PlayState* play) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; Vec3f sp58; Vec3f sp4C; Vec3f sp40; diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 0f5fef684a..2a87a61c78 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnPm*)thisx) - void EnPm_Init(Actor* thisx, PlayState* play); void EnPm_Destroy(Actor* thisx, PlayState* play); void EnPm_Update(Actor* thisx, PlayState* play); @@ -653,7 +651,7 @@ s16 func_80AF8170(EnPm* this, s32 numCutscenes) { } s32 func_80AF81E8(Actor* thisx, PlayState* play) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; s16 csId = func_80AF8170(this, 0); s32 ret = false; @@ -696,7 +694,7 @@ s32 func_80AF81E8(Actor* thisx, PlayState* play) { } s32 func_80AF8348(Actor* thisx, PlayState* play) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; s16 csId = func_80AF8170(this, 0); s32 ret = false; @@ -738,7 +736,7 @@ s32 func_80AF8348(Actor* thisx, PlayState* play) { } s32 func_80AF8478(Actor* thisx, PlayState* play) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; s32 ret = false; switch (this->unk_378) { @@ -1893,7 +1891,7 @@ void func_80AFA724(EnPm* this, PlayState* play) { } void EnPm_Init(Actor* thisx, PlayState* play) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 14.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_mm_Skel_0096E8, NULL, this->jointTable, this->morphTable, @@ -1912,14 +1910,14 @@ void EnPm_Init(Actor* thisx, PlayState* play) { } void EnPm_Destroy(Actor* thisx, PlayState* play) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroySphere(play, &this->colliderSphere); } void EnPm_Update(Actor* thisx, PlayState* play) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; if (!func_80AF86F0(this, play) && func_80AF87C4(this, play)) { func_80AFA724(this, play); @@ -1942,7 +1940,7 @@ void EnPm_Update(Actor* thisx, PlayState* play) { s32 EnPm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; if (limbIndex == OBJECT_MM_LIMB_0F) { func_80AF8C68(this, play); @@ -1951,7 +1949,7 @@ s32 EnPm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnPm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; s32 pad; Vec3f sp2C; @@ -1990,7 +1988,7 @@ void EnPm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnPm_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx, Gfx** gfx) { - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; s32 stepRot; s32 overrideRot; @@ -2024,7 +2022,7 @@ void EnPm_Draw(Actor* thisx, PlayState* play) { object_mm_Tex_002950, object_mm_Tex_002750, }; - EnPm* this = THIS; + EnPm* this = (EnPm*)thisx; s32 pad; if (this->scheduleResult != 0) { diff --git a/src/overlays/actors/ovl_En_Po_Composer/z_en_po_composer.c b/src/overlays/actors/ovl_En_Po_Composer/z_en_po_composer.c index be88f36fd6..cb69c43558 100644 --- a/src/overlays/actors/ovl_En_Po_Composer/z_en_po_composer.c +++ b/src/overlays/actors/ovl_En_Po_Composer/z_en_po_composer.c @@ -10,8 +10,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_100000 | \ ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnPoComposer*)thisx) - void EnPoComposer_Init(Actor* thisx, PlayState* play); void EnPoComposer_Destroy(Actor* thisx, PlayState* play); void EnPoComposer_Update(Actor* thisx, PlayState* play); @@ -182,7 +180,7 @@ static InitChainEntry sInitChain[] = { static s32 sPlayerIsPlayingOcarina = false; void EnPoComposer_Init(Actor* thisx, PlayState* play) { - EnPoComposer* this = THIS; + EnPoComposer* this = (EnPoComposer*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -241,7 +239,7 @@ void EnPoComposer_Init(Actor* thisx, PlayState* play) { } void EnPoComposer_Destroy(Actor* thisx, PlayState* play) { - EnPoComposer* this = THIS; + EnPoComposer* this = (EnPoComposer*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); Collider_DestroyJntSph(play, &this->lanternCollider); @@ -602,7 +600,7 @@ void EnPoComposer_UpdateCollision(EnPoComposer* this, PlayState* play) { } void EnPoComposer_Update(Actor* thisx, PlayState* play) { - EnPoComposer* this = THIS; + EnPoComposer* this = (EnPoComposer*)thisx; EnPoComposer_UpdateEnvColor(this); SkelAnime_Update(&this->skelAnime); @@ -617,7 +615,7 @@ void EnPoComposer_Update(Actor* thisx, PlayState* play) { s32 EnPoComposer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPoComposer* this = THIS; + EnPoComposer* this = (EnPoComposer*)thisx; if ((this->lightColor.a == 0) || (limbIndex == POE_COMPOSER_LIMB_LANTERN)) { *dList = NULL; @@ -635,7 +633,7 @@ s32 EnPoComposer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V } void EnPoComposer_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPoComposer* this = THIS; + EnPoComposer* this = (EnPoComposer*)thisx; Collider_UpdateSpheres(limbIndex, &this->lanternCollider); if (limbIndex == POE_COMPOSER_LIMB_LANTERN) { @@ -644,7 +642,7 @@ void EnPoComposer_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnPoComposer_Draw(Actor* thisx, PlayState* play) { - EnPoComposer* this = THIS; + EnPoComposer* this = (EnPoComposer*)thisx; s32 pad; Gfx* gfx; Color_RGBA8* clothingColor; diff --git a/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c b/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c index b279071ded..627a0b45f4 100644 --- a/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c +++ b/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnPoFusen*)thisx) - void EnPoFusen_Init(Actor* thisx, PlayState* play); void EnPoFusen_Destroy(Actor* thisx, PlayState* play); void EnPoFusen_Update(Actor* thisx, PlayState* play); @@ -97,7 +95,7 @@ static DamageTable sDamageTable = { }; void EnPoFusen_Init(Actor* thisx, PlayState* play) { - EnPoFusen* this = THIS; + EnPoFusen* this = (EnPoFusen*)thisx; f32 flyingHeightMin; this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.007f; @@ -140,7 +138,7 @@ void EnPoFusen_Init(Actor* thisx, PlayState* play) { } void EnPoFusen_Destroy(Actor* thisx, PlayState* play) { - EnPoFusen* this = THIS; + EnPoFusen* this = (EnPoFusen*)thisx; Collider_DestroySphere(play, &this->collider); } @@ -261,7 +259,7 @@ void EnPoFusen_IdleFuse(EnPoFusen* this, PlayState* play) { } void EnPoFusen_Update(Actor* thisx, PlayState* play) { - EnPoFusen* this = THIS; + EnPoFusen* this = (EnPoFusen*)thisx; this->actionFunc(this, play); if (EnPoFusen_CheckCollision(this, play)) { @@ -270,7 +268,7 @@ void EnPoFusen_Update(Actor* thisx, PlayState* play) { } s32 EnPoFusen_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPoFusen* this = THIS; + EnPoFusen* this = (EnPoFusen*)thisx; if (limbIndex == POE_BALLOON_LIMB_BODY) { f32 zScale = (Math_CosS(this->randScaleChange) * 0.08f) + 1.0f; @@ -314,7 +312,7 @@ void EnPoFusen_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnPoFusen_Draw(Actor* thisx, PlayState* play) { - EnPoFusen* this = THIS; + EnPoFusen* this = (EnPoFusen*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawTransformFlexOpa(play, this->anime.skeleton, this->anime.jointTable, this->anime.dListCount, diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index c1f563e479..dcdaaa04e5 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -12,8 +12,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | \ ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnPoSisters*)thisx) - void EnPoSisters_Init(Actor* thisx, PlayState* play); void EnPoSisters_Destroy(Actor* thisx, PlayState* play); void EnPoSisters_Update(Actor* thisx, PlayState* play); @@ -161,7 +159,7 @@ static InitChainEntry sInitChain[] = { void EnPoSisters_Init(Actor* thisx, PlayState* play) { s32 pad; - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f); @@ -214,7 +212,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { } void EnPoSisters_Destroy(Actor* thisx, PlayState* play) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); Collider_DestroyCylinder(play, &this->collider); @@ -956,7 +954,7 @@ void EnPoSisters_CheckCollision(EnPoSisters* this, PlayState* play) { void EnPoSisters_Update(Actor* thisx, PlayState* play) { s32 pad; - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; f32 alpha; Vec3f checkPos; s32 bgId; @@ -1091,7 +1089,7 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve { 0, 70, 50, 0 }, { 70, 70, 0, 0 }, }; - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; if ((limbIndex == POE_SISTERS_LIMB_ROOT) && (this->poSisterFlags & POE_SISTERS_FLAG_REAL_MEG_ROTATION)) { if (this->megSurroundTimer >= 284) { @@ -1139,7 +1137,7 @@ static s8 sLimbToBodyParts[POE_SISTERS_LIMB_MAX] = { }; void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; s32 end; f32 brightness; @@ -1194,7 +1192,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnPoSisters_Draw(Actor* thisx, PlayState* play) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* sisterEnvColor = &sPoSisterEnvColors[this->type]; Color_RGBA8* flameColor = &sPoSisterFlameColors[this->type]; s32 pad; diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index ddf6a6bdf0..4b835bade3 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -11,8 +11,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_IGNORE_QUAKE) -#define THIS ((EnPoh*)thisx) - void EnPoh_Init(Actor* thisx, PlayState* play); void EnPoh_Destroy(Actor* thisx, PlayState* play); void EnPoh_Update(Actor* thisx, PlayState* play2); @@ -150,7 +148,7 @@ static InitChainEntry sInitChain[] = { }; void EnPoh_Init(Actor* thisx, PlayState* play) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -173,7 +171,7 @@ void EnPoh_Init(Actor* thisx, PlayState* play) { } void EnPoh_Destroy(Actor* thisx, PlayState* play) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); Collider_DestroyJntSph(play, &this->colliderSph); @@ -798,7 +796,7 @@ void func_80B2E8E0(EnPoh* this) { void EnPoh_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; s32 pad; if (this->colliderSph.base.atFlags & AT_HIT) { @@ -849,7 +847,7 @@ void EnPoh_Update(Actor* thisx, PlayState* play2) { s32 EnPoh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; if ((this->unk_197 == 0) || (limbIndex == POE_LIMB_LANTERN) || ((this->actionFunc == func_80B2D300) && (this->unk_18E >= 2))) { @@ -897,7 +895,7 @@ static Vec3f D_80B2F734[] = { void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { s32 bodyPartIndex; Vec3f sp60; - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; s32 pad; Collider_UpdateSpheres(limbIndex, &this->colliderSph); @@ -942,7 +940,7 @@ void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnPoh_Draw(Actor* thisx, PlayState* play) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); @@ -990,7 +988,7 @@ void EnPoh_Draw(Actor* thisx, PlayState* play) { } void func_80B2F328(Actor* thisx, PlayState* play) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; this->actionFunc(this, play); if (this->actionFunc != func_80B2DD2C) { @@ -1001,7 +999,7 @@ void func_80B2F328(Actor* thisx, PlayState* play) { } void func_80B2F37C(Actor* thisx, PlayState* play) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; s32 pad; Vec3f sp7C; Gfx* gfx; diff --git a/src/overlays/actors/ovl_En_Pp/z_en_pp.c b/src/overlays/actors/ovl_En_Pp/z_en_pp.c index 7ac30e5ac2..f71bb29219 100644 --- a/src/overlays/actors/ovl_En_Pp/z_en_pp.c +++ b/src/overlays/actors/ovl_En_Pp/z_en_pp.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnPp*)thisx) - void EnPp_Init(Actor* thisx, PlayState* play); void EnPp_Destroy(Actor* thisx, PlayState* play); void EnPp_Update(Actor* thisx, PlayState* play); @@ -207,7 +205,7 @@ static Color_RGBA8 sDustPrimColor = { 60, 50, 20, 255 }; static Color_RGBA8 sDustEnvColor = { 40, 30, 30, 255 }; void EnPp_Init(Actor* thisx, PlayState* play) { - EnPp* this = THIS; + EnPp* this = (EnPp*)thisx; EffectBlureInit1 blureInit; this->actor.attentionRangeType = ATTENTION_RANGE_4; @@ -302,7 +300,7 @@ void EnPp_Init(Actor* thisx, PlayState* play) { } void EnPp_Destroy(Actor* thisx, PlayState* play) { - EnPp* this = THIS; + EnPp* this = (EnPp*)thisx; if (EN_PP_GET_TYPE(&this->actor) < EN_PP_TYPE_FRAGMENT_BASE) { Collider_DestroyJntSph(play, &this->maskCollider); @@ -1383,7 +1381,7 @@ void EnPp_UpdateDamage(EnPp* this, PlayState* play) { void EnPp_Update(Actor* thisx, PlayState* play) { s32 pad; - EnPp* this = THIS; + EnPp* this = (EnPp*)thisx; WaterBox* waterBox; f32 waterSurface; @@ -1468,7 +1466,7 @@ void EnPp_Update(Actor* thisx, PlayState* play) { } s32 EnPp_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPp* this = THIS; + EnPp* this = (EnPp*)thisx; if (this->action != EN_PP_ACTION_BODY_PART_MOVE) { if ((limbIndex != HIPLOOP_LIMB_MASK) && @@ -1498,7 +1496,7 @@ s32 EnPp_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnPp_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sVertexOffset1 = { 0.0f, 0.0f, 0.0f }; static Vec3f sVertexOffset2 = { 0.0f, 0.0f, 0.0f }; - EnPp* this = THIS; + EnPp* this = (EnPp*)thisx; Vec3f blureVertex1; Vec3f blureVertex2; @@ -1582,7 +1580,7 @@ void EnPp_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnPp_Draw(Actor* thisx, PlayState* play) { - EnPp* this = THIS; + EnPp* this = (EnPp*)thisx; MtxF mtxF; Vec3f pos; f32 scale; diff --git a/src/overlays/actors/ovl_En_Pr/z_en_pr.c b/src/overlays/actors/ovl_En_Pr/z_en_pr.c index 7008e754cc..177fd16ab2 100644 --- a/src/overlays/actors/ovl_En_Pr/z_en_pr.c +++ b/src/overlays/actors/ovl_En_Pr/z_en_pr.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnPr*)thisx) - void EnPr_Init(Actor* thisx, PlayState* play2); void EnPr_Destroy(Actor* thisx, PlayState* play); void EnPr_Update(Actor* thisx, PlayState* play); @@ -133,7 +131,7 @@ static u8 sAnimationModes[ENPR_ANIM_MAX] = { void EnPr_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnPr* this = THIS; + EnPr* this = (EnPr*)thisx; EnPrz* prz; s32 i; s32 temp_s4; @@ -192,7 +190,7 @@ void EnPr_Init(Actor* thisx, PlayState* play2) { } void EnPr_Destroy(Actor* thisx, PlayState* play) { - EnPr* this = THIS; + EnPr* this = (EnPr*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -502,7 +500,7 @@ void func_80A33098(EnPr* this, PlayState* play) { void EnPr_Update(Actor* thisx, PlayState* play) { s32 pad; - EnPr* this = THIS; + EnPr* this = (EnPr*)thisx; s32 i; SkelAnime_Update(&this->skelAnime); @@ -585,7 +583,7 @@ void EnPr_Update(Actor* thisx, PlayState* play) { } s32 EnPr_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPr* this = THIS; + EnPr* this = (EnPr*)thisx; if (limbIndex == OBJECT_PR_1_LIMB_02) { rot->y += this->unk_214; @@ -595,7 +593,7 @@ s32 EnPr_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnPr_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - EnPr* this = THIS; + EnPr* this = (EnPr*)thisx; if (limbIndex == OBJECT_PR_1_LIMB_02) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -616,7 +614,7 @@ void EnPr_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnPr_Draw(Actor* thisx, PlayState* play) { - EnPr* this = THIS; + EnPr* this = (EnPr*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c b/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c index 2df2a4c76d..4aca2b7598 100644 --- a/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c +++ b/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnPr2*)thisx) - void EnPr2_Init(Actor* thisx, PlayState* play); void EnPr2_Destroy(Actor* thisx, PlayState* play); void EnPr2_Update(Actor* thisx, PlayState* play); @@ -116,7 +114,7 @@ s16 D_80A75C3C[] = { }; void EnPr2_Init(Actor* thisx, PlayState* play) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; this->actor.attentionRangeType = ATTENTION_RANGE_3; this->actor.hintId = TATL_HINT_ID_SKULLFISH; @@ -191,7 +189,7 @@ void EnPr2_Init(Actor* thisx, PlayState* play) { } void EnPr2_Destroy(Actor* thisx, PlayState* play) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; if (this->unk_1E0 < 10) { Collider_DestroyCylinder(play, &this->collider); @@ -647,7 +645,7 @@ void func_80A755D8(EnPr2* this, PlayState* play) { } void EnPr2_Update(Actor* thisx, PlayState* play) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; f32 rand; Actor_SetScale(&this->actor, this->unk_204); @@ -698,7 +696,7 @@ void EnPr2_Update(Actor* thisx, PlayState* play) { } s32 EnPr2_OverrideLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; if (this->unk_1E0 < 10) { if (limbIndex == OBJECT_PR_2_LIMB_02) { @@ -711,7 +709,7 @@ s32 EnPr2_OverrideLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f } void EnPr2_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; if (this->unk_1E0 < 10) { if (limbIndex == OBJECT_PR_2_LIMB_02) { @@ -724,7 +722,7 @@ void EnPr2_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r s32 EnPr2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; if (this->unk_1E0 < 10) { if (limbIndex == OBJECT_PR_2_LIMB_02) { @@ -737,7 +735,7 @@ s32 EnPr2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnPr2_Draw(Actor* thisx, PlayState* play) { - EnPr2* this = THIS; + EnPr2* this = (EnPr2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Prz/z_en_prz.c b/src/overlays/actors/ovl_En_Prz/z_en_prz.c index 6aeaa6c71f..47e931237e 100644 --- a/src/overlays/actors/ovl_En_Prz/z_en_prz.c +++ b/src/overlays/actors/ovl_En_Prz/z_en_prz.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnPrz*)thisx) - void EnPrz_Init(Actor* thisx, PlayState* play); void EnPrz_Destroy(Actor* thisx, PlayState* play); void EnPrz_Update(Actor* thisx, PlayState* play); @@ -100,7 +98,7 @@ ActorProfile En_Prz_Profile = { }; void EnPrz_Init(Actor* thisx, PlayState* play) { - EnPrz* this = THIS; + EnPrz* this = (EnPrz*)thisx; this->unk_20C = 0.01f; this->unk_1E4 = this->actor.world.rot.y; @@ -438,7 +436,7 @@ void func_80A76B14(EnPrz* this, PlayState* play) { void EnPrz_Update(Actor* thisx, PlayState* play) { s32 pad; - EnPrz* this = THIS; + EnPrz* this = (EnPrz*)thisx; s32 sp44 = false; Vec3f sp38; @@ -499,7 +497,7 @@ void EnPrz_Update(Actor* thisx, PlayState* play) { } s32 EnPrz_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPrz* this = THIS; + EnPrz* this = (EnPrz*)thisx; if (limbIndex == OBJECT_PR_2_LIMB_02) { rot->y += TRUNCF_BINANG(this->unk_218) * -100; @@ -509,7 +507,7 @@ s32 EnPrz_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnPrz_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; - EnPrz* this = THIS; + EnPrz* this = (EnPrz*)thisx; if (limbIndex == OBJECT_PR_2_LIMB_02) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -518,7 +516,7 @@ void EnPrz_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnPrz_Draw(Actor* thisx, PlayState* play) { - EnPrz* this = THIS; + EnPrz* this = (EnPrz*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Pst/z_en_pst.c b/src/overlays/actors/ovl_En_Pst/z_en_pst.c index 3a75115061..75e28dcbbf 100644 --- a/src/overlays/actors/ovl_En_Pst/z_en_pst.c +++ b/src/overlays/actors/ovl_En_Pst/z_en_pst.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED) -#define THIS ((EnPst*)thisx) - void EnPst_Init(Actor* thisx, PlayState* play); void EnPst_Destroy(Actor* thisx, PlayState* play); void EnPst_Update(Actor* thisx, PlayState* play); @@ -449,7 +447,7 @@ s32 EnPst_HandleLetterDay2(EnPst* this) { s32 EnPst_ChooseBehaviour(Actor* thisx, PlayState* play) { PlayerItemAction itemAction = PLAYER_IA_NONE; s32 scriptBranch = 0; - EnPst* this = THIS; + EnPst* this = (EnPst*)thisx; switch (this->behaviour) { case POSTBOX_BEHAVIOUR_WAIT_FOR_ITEM: @@ -657,7 +655,7 @@ void EnPst_Talk(EnPst* this, PlayState* play) { void EnPst_Init(Actor* thisx, PlayState* play) { s32 pad; - EnPst* this = THIS; + EnPst* this = (EnPst*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gPostboxSkel, NULL, this->jointTable, this->morphTable, @@ -673,13 +671,13 @@ void EnPst_Init(Actor* thisx, PlayState* play) { } void EnPst_Destroy(Actor* thisx, PlayState* play) { - EnPst* this = THIS; + EnPst* this = (EnPst*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnPst_Update(Actor* thisx, PlayState* play) { - EnPst* this = THIS; + EnPst* this = (EnPst*)thisx; EnPst_CheckTalk(this, play); this->actionFunc(this, play); @@ -694,7 +692,7 @@ void EnPst_Update(Actor* thisx, PlayState* play) { } s32 EnPst_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnPst* this = THIS; + EnPst* this = (EnPst*)thisx; f32 yTranslation; if (limbIndex == POSTBOX_LIMB_MAIL_SLOT) { @@ -709,7 +707,7 @@ s32 EnPst_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnPst_Draw(Actor* thisx, PlayState* play) { - EnPst* this = THIS; + EnPst* this = (EnPst*)thisx; if (this->scheduleResult != POSTBOX_SCH_NONE) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c index 78c15f7aaa..971b258b78 100644 --- a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c +++ b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnRacedog*)thisx) - void EnRacedog_Init(Actor* thisx, PlayState* play); void EnRacedog_Destroy(Actor* thisx, PlayState* play); void EnRacedog_Update(Actor* thisx, PlayState* play); @@ -311,7 +309,7 @@ void EnRacedog_GetFloorRot(EnRacedog* this, Vec3f* floorRot) { } void EnRacedog_Init(Actor* thisx, PlayState* play) { - EnRacedog* this = THIS; + EnRacedog* this = (EnRacedog*)thisx; ColliderCylinder* collider = &this->collider; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); @@ -369,7 +367,7 @@ void EnRacedog_Init(Actor* thisx, PlayState* play) { } void EnRacedog_Destroy(Actor* thisx, PlayState* play) { - EnRacedog* this = THIS; + EnRacedog* this = (EnRacedog*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -703,7 +701,7 @@ void EnRacedog_PlaySfxWalk(EnRacedog* this) { void EnRacedog_Update(Actor* thisx, PlayState* play) { s32 pad; - EnRacedog* this = THIS; + EnRacedog* this = (EnRacedog*)thisx; Vec3f floorRot = { 0.0f, 0.0f, 0.0f }; this->selectedDogIndex = sSelectedDogInfo.index; @@ -778,7 +776,7 @@ s32 EnRacedog_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 void EnRacedog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad; - EnRacedog* this = THIS; + EnRacedog* this = (EnRacedog*)thisx; Vec3f focusOffset = { 0.0f, 20.0f, 0.0f }; if (limbIndex == DOG_LIMB_HEAD) { @@ -791,7 +789,7 @@ void EnRacedog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnRacedog_Draw(Actor* thisx, PlayState* play) { - EnRacedog* this = THIS; + EnRacedog* this = (EnRacedog*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Raf/z_en_raf.c b/src/overlays/actors/ovl_En_Raf/z_en_raf.c index 41da03ff54..e0e11bf69d 100644 --- a/src/overlays/actors/ovl_En_Raf/z_en_raf.c +++ b/src/overlays/actors/ovl_En_Raf/z_en_raf.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnRaf*)thisx) - void EnRaf_Init(Actor* thisx, PlayState* play); void EnRaf_Destroy(Actor* thisx, PlayState* play); void EnRaf_Update(Actor* thisx, PlayState* play); @@ -191,7 +189,7 @@ void EnRaf_ClearPixelPetal(u16* texture, u8* clearPixelTable, s32 index) { } void EnRaf_Init(Actor* thisx, PlayState* play) { - EnRaf* this = THIS; + EnRaf* this = (EnRaf*)thisx; Vec3f limbScale = { 1.0f, 1.0f, 1.0f }; s32 pad; s32 i; @@ -246,7 +244,7 @@ void EnRaf_Init(Actor* thisx, PlayState* play) { } void EnRaf_Destroy(Actor* thisx, PlayState* play) { - EnRaf* this = THIS; + EnRaf* this = (EnRaf*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -709,7 +707,7 @@ void EnRaf_Dormant(EnRaf* this, PlayState* play) { void EnRaf_Update(Actor* thisx, PlayState* play) { s32 pad; - EnRaf* this = THIS; + EnRaf* this = (EnRaf*)thisx; WaterBox* waterBox; f32 ySurface; Vec3f ripplePos; @@ -811,7 +809,7 @@ static Vec3f sUpperSegmentTargetScaleDuringSpit[] = { void EnRaf_TransformLimbDraw(PlayState* play2, s32 limbIndex, Actor* thisx) { PlayState* play = play2; - EnRaf* this = THIS; + EnRaf* this = (EnRaf*)thisx; s32 i; switch (this->petalScaleType) { @@ -892,7 +890,7 @@ void EnRaf_TransformLimbDraw(PlayState* play2, s32 limbIndex, Actor* thisx) { } void EnRaf_Draw(Actor* thisx, PlayState* play) { - EnRaf* this = THIS; + EnRaf* this = (EnRaf*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c index f608a1c8ae..4baa5a9782 100644 --- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c +++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) -#define THIS ((EnRailSkb*)thisx) - void EnRailSkb_Init(Actor* thisx, PlayState* play); void EnRailSkb_Destroy(Actor* thisx, PlayState* play); void EnRailSkb_Update(Actor* thisx, PlayState* play); @@ -285,7 +283,7 @@ static InitChainEntry sInitChain[] = { void EnRailSkb_Init(Actor* thisx, PlayState* play) { s32 pad; - EnRailSkb* this = THIS; + EnRailSkb* this = (EnRailSkb*)thisx; func_80B708C0(this, play); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); @@ -323,7 +321,7 @@ void EnRailSkb_Init(Actor* thisx, PlayState* play) { } void EnRailSkb_Destroy(Actor* thisx, PlayState* play) { - EnRailSkb* this = THIS; + EnRailSkb* this = (EnRailSkb*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -1091,7 +1089,7 @@ void func_80B72970(EnRailSkb* this, PlayState* play) { } void EnRailSkb_Update(Actor* thisx, PlayState* play) { - EnRailSkb* this = THIS; + EnRailSkb* this = (EnRailSkb*)thisx; this->actionFunc(this, play); @@ -1109,7 +1107,7 @@ void EnRailSkb_Update(Actor* thisx, PlayState* play) { } s32 EnRailSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnRailSkb* this = THIS; + EnRailSkb* this = (EnRailSkb*)thisx; s16 abs; if (limbIndex == STALCHILD_LIMB_HEAD) { @@ -1138,7 +1136,7 @@ s32 EnRailSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 void EnRailSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80B734D0 = { 800.0f, 1200.0f, 0.0f }; - EnRailSkb* this = THIS; + EnRailSkb* this = (EnRailSkb*)thisx; if (!(this->unk_402 & 0x80)) { Collider_UpdateSpheres(limbIndex, &this->collider); @@ -1170,7 +1168,7 @@ void EnRailSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnRailSkb_Draw(Actor* thisx, PlayState* play) { - EnRailSkb* this = THIS; + EnRailSkb* this = (EnRailSkb*)thisx; this->bodyPartsCount = 0; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c index 7be078afd7..78c989be29 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnRailgibud*)thisx) - void EnRailgibud_Init(Actor* thisx, PlayState* play); void EnRailgibud_Destroy(Actor* thisx, PlayState* play); void EnRailgibud_Update(Actor* thisx, PlayState* play); @@ -243,7 +241,7 @@ static InitChainEntry sInitChain[] = { }; void EnRailgibud_Init(Actor* thisx, PlayState* play) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -281,7 +279,7 @@ void EnRailgibud_Init(Actor* thisx, PlayState* play) { } void EnRailgibud_Destroy(Actor* thisx, PlayState* play) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1017,7 +1015,7 @@ void EnRailgibud_UpdateCollision(EnRailgibud* this, PlayState* play) { } void EnRailgibud_Update(Actor* thisx, PlayState* play) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; EnRailgibud_UpdateWalkForwardState(this); EnRailgibud_CheckForGibdoMask(this, play); @@ -1038,14 +1036,14 @@ void EnRailgibud_Update(Actor* thisx, PlayState* play) { } void EnRailgibud_MainGibdo_DeadUpdate(Actor* thisx, PlayState* play) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; EnRailgibud_UpdateWalkForwardState(this); } s32 EnRailgibud_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; if (limbIndex == GIBDO_LIMB_UPPER_BODY_ROOT) { rot->y += this->torsoRot.y; @@ -1057,7 +1055,7 @@ s32 EnRailgibud_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnRailgibud_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; if ((this->drawDmgEffTimer != 0) && ((limbIndex == GIBDO_LIMB_LEFT_THIGH) || (limbIndex == GIBDO_LIMB_LEFT_SHIN) || @@ -1073,7 +1071,7 @@ void EnRailgibud_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnRailgibud_Draw(Actor* thisx, PlayState* play) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1260,7 +1258,7 @@ s32 EnRailgibud_PerformCutsceneActions(EnRailgibud* this, PlayState* play) { } void EnRailgibud_Cutscene_Update(Actor* thisx, PlayState* play) { - EnRailgibud* this = THIS; + EnRailgibud* this = (EnRailgibud*)thisx; this->actionFunc(this, play); EnRailgibud_PerformCutsceneActions(this, play); diff --git a/src/overlays/actors/ovl_En_Rat/z_en_rat.c b/src/overlays/actors/ovl_En_Rat/z_en_rat.c index b9f0bb55b7..5b9e40c881 100644 --- a/src/overlays/actors/ovl_En_Rat/z_en_rat.c +++ b/src/overlays/actors/ovl_En_Rat/z_en_rat.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnRat*)thisx) - void EnRat_Init(Actor* thisx, PlayState* play); void EnRat_Destroy(Actor* thisx, PlayState* play); void EnRat_Update(Actor* thisx, PlayState* play); @@ -143,7 +141,7 @@ static s32 sTexturesDesegmented = false; void EnRat_Init(Actor* thisx, PlayState* play) { s32 pad; - EnRat* this = THIS; + EnRat* this = (EnRat*)thisx; s32 attackRange; s32 i; @@ -194,7 +192,7 @@ void EnRat_Init(Actor* thisx, PlayState* play) { } void EnRat_Destroy(Actor* thisx, PlayState* play) { - EnRat* this = THIS; + EnRat* this = (EnRat*)thisx; if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON) { Effect_Destroy(play, this->blure1Index); @@ -781,7 +779,7 @@ void EnRat_PostDetonation(EnRat* this, PlayState* play) { void EnRat_Update(Actor* thisx, PlayState* play) { s32 pad; - EnRat* this = THIS; + EnRat* this = (EnRat*)thisx; this->shouldRotateOntoSurfaces = false; if (this->damageReaction.stunTimer == 0) { @@ -893,7 +891,7 @@ void EnRat_Update(Actor* thisx, PlayState* play) { } s32 EnRat_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnRat* this = THIS; + EnRat* this = (EnRat*)thisx; if (limbIndex == REAL_BOMBCHU_LIMB_BODY) { pos->y -= this->revivePosY; @@ -908,7 +906,7 @@ s32 EnRat_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnRat_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { PlayState* play = play2; - EnRat* this = THIS; + EnRat* this = (EnRat*)thisx; MtxF* currentMatrixState; Vec3f* ptr; f32 redModifier; @@ -969,7 +967,7 @@ void EnRat_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot } void EnRat_Draw(Actor* thisx, PlayState* play) { - EnRat* this = THIS; + EnRat* this = (EnRat*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL60_XluNoCD(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index fce5c5e4f5..964f8f23b0 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -30,8 +30,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnRd*)thisx) - void EnRd_Init(Actor* thisx, PlayState* play); void EnRd_Destroy(Actor* thisx, PlayState* play); void EnRd_Update(Actor* thisx, PlayState* play); @@ -186,7 +184,7 @@ static InitChainEntry sInitChain[] = { }; void EnRd_Init(Actor* thisx, PlayState* play) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -282,7 +280,7 @@ void EnRd_Init(Actor* thisx, PlayState* play) { } void EnRd_Destroy(Actor* thisx, PlayState* play) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) { gSaveContext.sunsSongState = SUNSSONG_INACTIVE; @@ -1266,7 +1264,7 @@ void EnRd_UpdateEffect(EnRd* this, PlayState* play) { } void EnRd_Update(Actor* thisx, PlayState* play) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; EnRd_UpdateDamage(this, play); if ((gSaveContext.sunsSongState != SUNSSONG_INACTIVE) && (!this->stunnedBySunsSong)) { @@ -1306,7 +1304,7 @@ void EnRd_Update(Actor* thisx, PlayState* play) { s32 EnRd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; if (limbIndex == REDEAD_LIMB_HEAD_ROOT) { rot->y += this->headRotY; @@ -1317,7 +1315,7 @@ s32 EnRd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnRd_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; if ((this->drawDmgEffTimer != 0) && ((limbIndex == REDEAD_LIMB_LEFT_THIGH) || (limbIndex == REDEAD_LIMB_LEFT_SHIN) || @@ -1336,7 +1334,7 @@ void EnRd_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnRd_Draw(Actor* thisx, PlayState* play) { static Vec3f sScale = { 0.25f, 0.25f, 0.25f }; s32 pad; - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; Vec3f pos = this->actor.world.pos; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.c b/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.c index 4327ace0c8..18e3524269 100644 --- a/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.c +++ b/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnRecepgirl*)thisx) - void EnRecepgirl_Init(Actor* thisx, PlayState* play); void EnRecepgirl_Destroy(Actor* thisx, PlayState* play); void EnRecepgirl_Update(Actor* thisx, PlayState* play); @@ -47,7 +45,7 @@ static InitChainEntry sInitChain[] = { static s32 sTexturesDesegmented = false; void EnRecepgirl_Init(Actor* thisx, PlayState* play) { - EnRecepgirl* this = THIS; + EnRecepgirl* this = (EnRecepgirl*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -177,7 +175,7 @@ void EnRecepgirl_Talk(EnRecepgirl* this, PlayState* play) { void EnRecepgirl_Update(Actor* thisx, PlayState* play) { s32 pad; - EnRecepgirl* this = THIS; + EnRecepgirl* this = (EnRecepgirl*)thisx; Vec3s torsoRot; this->actionFunc(this, play); @@ -186,7 +184,7 @@ void EnRecepgirl_Update(Actor* thisx, PlayState* play) { } s32 EnRecepgirl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnRecepgirl* this = THIS; + EnRecepgirl* this = (EnRecepgirl*)thisx; if (limbIndex == OBJECT_BG_2_LIMB_05) { rot->x += this->headRot.y; @@ -195,7 +193,7 @@ s32 EnRecepgirl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnRecepgirl_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnRecepgirl* this = THIS; + EnRecepgirl* this = (EnRecepgirl*)thisx; if (limbIndex == OBJECT_BG_2_LIMB_05) { Matrix_RotateYS(0x400 - this->headRot.x, MTXMODE_APPLY); @@ -204,7 +202,7 @@ void EnRecepgirl_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) } void EnRecepgirl_Draw(Actor* thisx, PlayState* play) { - EnRecepgirl* this = THIS; + EnRecepgirl* this = (EnRecepgirl*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Rg/z_en_rg.c b/src/overlays/actors/ovl_En_Rg/z_en_rg.c index 81834905d6..b3aacb2982 100644 --- a/src/overlays/actors/ovl_En_Rg/z_en_rg.c +++ b/src/overlays/actors/ovl_En_Rg/z_en_rg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnRg*)thisx) - void EnRg_Init(Actor* thisx, PlayState* play); void EnRg_Destroy(Actor* thisx, PlayState* play); void EnRg_Update(Actor* thisx, PlayState* play); @@ -726,7 +724,7 @@ EffectTireMarkInit D_80BF59F0 = { }; void EnRg_Init(Actor* thisx, PlayState* play) { - EnRg* this = THIS; + EnRg* this = (EnRg*)thisx; if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); @@ -771,7 +769,7 @@ void EnRg_Init(Actor* thisx, PlayState* play) { } void EnRg_Destroy(Actor* thisx, PlayState* play) { - EnRg* this = THIS; + EnRg* this = (EnRg*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroySphere(play, &this->collider2); @@ -779,7 +777,7 @@ void EnRg_Destroy(Actor* thisx, PlayState* play) { } void EnRg_Update(Actor* thisx, PlayState* play) { - EnRg* this = THIS; + EnRg* this = (EnRg*)thisx; func_80BF3F14(this, play); @@ -828,7 +826,7 @@ void func_80BF547C(EnRg* this, PlayState* play) { } s32 EnRg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnRg* this = THIS; + EnRg* this = (EnRg*)thisx; s32 fidgetIndex; switch (limbIndex) { @@ -862,7 +860,7 @@ static TexturePtr sEyeTextures[] = { }; void EnRg_Draw(Actor* thisx, PlayState* play) { - EnRg* this = THIS; + EnRg* this = (EnRg*)thisx; if (!(this->unk_310 & 0x10)) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index 36a91f3c39..cf40fb235f 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnRiverSound*)thisx) - void EnRiverSound_Init(Actor* thisx, PlayState* play); void EnRiverSound_Update(Actor* thisx, PlayState* play); void EnRiverSound_Draw(Actor* thisx, PlayState* play); @@ -28,7 +26,7 @@ ActorProfile En_River_Sound_Profile = { void EnRiverSound_Init(Actor* thisx, PlayState* play) { s32 pad; - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; Path* path; s32 pathIndex; @@ -46,7 +44,7 @@ void EnRiverSound_Init(Actor* thisx, PlayState* play) { } void EnRiverSound_Update(Actor* thisx, PlayState* play) { - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; Vec3f* worldPos = &this->actor.world.pos; Vec3f eye; s32 bgId; @@ -82,7 +80,7 @@ void EnRiverSound_Draw(Actor* thisx, PlayState* play) { 1.0f, // 1 1.4f, // sqrt(2) }; - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; s16 params = this->actor.params; if (params < RS_RIVER_DEFAULT_LOW_FREQ) { diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 5adbcfd07a..d1e81822e0 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnRr*)thisx) - void EnRr_Init(Actor* thisx, PlayState* play); void EnRr_Destroy(Actor* thisx, PlayState* play); void EnRr_Update(Actor* thisx, PlayState* play); @@ -128,7 +126,7 @@ static InitChainEntry sInitChain[] = { void EnRr_Init(Actor* thisx, PlayState* play) { s32 pad; - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitAndSetCylinder(play, &this->collider1, &this->actor, &sCylinderInit1); @@ -164,7 +162,7 @@ void EnRr_Init(Actor* thisx, PlayState* play) { } void EnRr_Destroy(Actor* thisx, PlayState* play) { - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -777,7 +775,7 @@ void func_808FB794(EnRr* this, PlayState* play) { } void EnRr_Update(Actor* thisx, PlayState* play) { - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; EnRrStruct* ptr; s32 i; @@ -879,7 +877,7 @@ void EnRr_Update(Actor* thisx, PlayState* play) { void EnRr_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, 4 * sizeof(Mtx)); Vec3f* bodyPartPos; s32 i; diff --git a/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c b/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c index e912c24234..8d7127a542 100644 --- a/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c +++ b/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnRsn*)thisx) - void EnRsn_Init(Actor* thisx, PlayState* play); void EnRsn_Destroy(Actor* thisx, PlayState* play); void EnRsn_Update(Actor* thisx, PlayState* play); @@ -48,7 +46,7 @@ void EnRsn_DoNothing(EnRsn* this, PlayState* play) { } void EnRsn_Init(Actor* thisx, PlayState* play) { - EnRsn* this = THIS; + EnRsn* this = (EnRsn*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gBombShopkeeperSkel, &gBombShopkeeperWalkAnim, NULL, NULL, 0); @@ -57,13 +55,13 @@ void EnRsn_Init(Actor* thisx, PlayState* play) { } void EnRsn_Destroy(Actor* thisx, PlayState* play) { - EnRsn* this = THIS; + EnRsn* this = (EnRsn*)thisx; SkelAnime_Free(&this->skelAnime, play); } void EnRsn_Update(Actor* thisx, PlayState* play) { - EnRsn* this = THIS; + EnRsn* this = (EnRsn*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); @@ -72,7 +70,7 @@ void EnRsn_Update(Actor* thisx, PlayState* play) { } s32 EnRsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnRsn* this = THIS; + EnRsn* this = (EnRsn*)thisx; if (limbIndex == BOMB_SHOPKEEPER_LIMB_RIGHT_HAND) { Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY); @@ -81,7 +79,7 @@ s32 EnRsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnRsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnRsn* this = THIS; + EnRsn* this = (EnRsn*)thisx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; if (limbIndex == BOMB_SHOPKEEPER_LIMB_RIGHT_HAND) { @@ -90,7 +88,7 @@ void EnRsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnRsn_Draw(Actor* thisx, PlayState* play) { - EnRsn* this = THIS; + EnRsn* this = (EnRsn*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ru/z_en_ru.c b/src/overlays/actors/ovl_En_Ru/z_en_ru.c index edee859e22..c93bef1f10 100644 --- a/src/overlays/actors/ovl_En_Ru/z_en_ru.c +++ b/src/overlays/actors/ovl_En_Ru/z_en_ru.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnRu*)thisx) - void EnRu_Init(Actor* thisx, PlayState* play); void EnRu_Destroy(Actor* thisx, PlayState* play); void EnRu_Update(Actor* thisx, PlayState* play); @@ -286,7 +284,7 @@ void EnRu_DoNothing(EnRu* this, PlayState* play) { void EnRu_Init(Actor* thisx, PlayState* play) { s32 pad; - EnRu* this = THIS; + EnRu* this = (EnRu*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gAdultRutoSkel, NULL, this->jointTable, this->morphTable, RU2_LIMB_MAX); @@ -302,13 +300,13 @@ void EnRu_Init(Actor* thisx, PlayState* play) { } void EnRu_Destroy(Actor* thisx, PlayState* play) { - EnRu* this = THIS; + EnRu* this = (EnRu*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnRu_Update(Actor* thisx, PlayState* play) { - EnRu* this = THIS; + EnRu* this = (EnRu*)thisx; this->actionFunc(this, play); @@ -319,7 +317,7 @@ void EnRu_Update(Actor* thisx, PlayState* play) { s32 EnRu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnRu* this = THIS; + EnRu* this = (EnRu*)thisx; if (limbIndex == RU2_LIMB_HEAD) { Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -343,7 +341,7 @@ s32 EnRu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnRu_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnRu* this = THIS; + EnRu* this = (EnRu*)thisx; Vec3f headFocus = { 800.0f, 0, 0 }; Vec3f bodyPartPos = { 0, 0, 0 }; @@ -373,7 +371,7 @@ static Gfx sTransparencyDlist[] = { }; void EnRu_Draw(Actor* thisx, PlayState* play) { - EnRu* this = THIS; + EnRu* this = (EnRu*)thisx; u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, SUBS_SHADOW_TEX_SIZE); u8* shadowTexIter; s32 i; diff --git a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c index 8df5260e68..4e7e552b8c 100644 --- a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c +++ b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_ATTACH_TO_ARROW) -#define THIS ((EnRuppecrow*)thisx) - typedef enum EnRuppecrowEffect { /* 0x00 */ ENRUPPECROW_EFFECT_NONE = 0, /* 0x0A */ ENRUPPECROW_EFFECT_ICE = 10, @@ -624,7 +622,7 @@ void EnRuppecrow_FallToDespawn(EnRuppecrow* this, PlayState* play) { void EnRuppecrow_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnRuppecrow* this = THIS; + EnRuppecrow* this = (EnRuppecrow*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, @@ -648,13 +646,13 @@ void EnRuppecrow_Init(Actor* thisx, PlayState* play2) { } void EnRuppecrow_Destroy(Actor* thisx, PlayState* play) { - EnRuppecrow* this = THIS; + EnRuppecrow* this = (EnRuppecrow*)thisx; Collider_DestroyJntSph(play, &this->collider); } void EnRuppecrow_Update(Actor* thisx, PlayState* play) { - EnRuppecrow* this = THIS; + EnRuppecrow* this = (EnRuppecrow*)thisx; EnRuppecrow_UpdateDamage(this, play); this->actionFunc(this, play); @@ -665,7 +663,7 @@ void EnRuppecrow_Update(Actor* thisx, PlayState* play) { } void EnRuppecrow_Draw(Actor* thisx, PlayState* play) { - EnRuppecrow* this = THIS; + EnRuppecrow* this = (EnRuppecrow*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Rz/z_en_rz.c b/src/overlays/actors/ovl_En_Rz/z_en_rz.c index c97b19cef1..22a15e5fd7 100644 --- a/src/overlays/actors/ovl_En_Rz/z_en_rz.c +++ b/src/overlays/actors/ovl_En_Rz/z_en_rz.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnRz*)thisx) - void EnRz_Init(Actor* thisx, PlayState* play); void EnRz_Destroy(Actor* thisx, PlayState* play); void EnRz_Update(Actor* thisx, PlayState* play); @@ -86,7 +84,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnRz_Init(Actor* thisx, PlayState* play) { - EnRz* this = THIS; + EnRz* this = (EnRz*)thisx; s16 csId = this->actor.csId; s32 i; @@ -170,7 +168,7 @@ void EnRz_Init(Actor* thisx, PlayState* play) { */ void EnRz_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play) { Vec3f oldPos; - EnRz* this = THIS; + EnRz* this = (EnRz*)thisx; if (this->animIndex == EN_RZ_ANIM_LINK_DANCE) { f32 tempScale = (((27.0f - this->shadowPos.y) + this->actor.world.pos.y) * ((1 / 2.25f) * 0.001f)) + 0.01f; @@ -363,7 +361,7 @@ void func_80BFBDFC(PlayState* play) { } void EnRz_Destroy(Actor* thisx, PlayState* play) { - EnRz* this = THIS; + EnRz* this = (EnRz*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -663,7 +661,7 @@ void EnRz_Walk(EnRz* this, PlayState* play) { void EnRz_Update(Actor* thisx, PlayState* play) { s32 pad; - EnRz* this = THIS; + EnRz* this = (EnRz*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); @@ -684,7 +682,7 @@ void EnRz_Update(Actor* thisx, PlayState* play) { void EnRz_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sFocusOffsetPos = { 500.0f, -500.0f, 0.0f }; - EnRz* this = THIS; + EnRz* this = (EnRz*)thisx; if (limbIndex == OBJECT_RZ_LIMB_0B) { Matrix_MultVec3f(&sFocusOffsetPos, &thisx->focus.pos); @@ -695,7 +693,7 @@ void EnRz_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnRz_Draw(Actor* thisx, PlayState* play) { - EnRz* this = THIS; + EnRz* this = (EnRz*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c index cc80620fe3..cdafc5d423 100644 --- a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c +++ b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c @@ -37,8 +37,6 @@ Week Event Flags: #include "assets/objects/object_taisou/object_taisou.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnSGoro*)thisx) - #define EN_S_GORO_ROLLEDUP_YOFFSET 14.0f #define EN_S_GORO_OFTYPE_WSHRINE (EN_S_GORO_GET_MAIN_TYPE(&this->actor) < 3) @@ -1279,7 +1277,7 @@ void EnSGoro_SleepTalk(EnSGoro* this, PlayState* play) { void EnSGoro_Init(Actor* thisx, PlayState* play) { s32 pad; - EnSGoro* this = THIS; + EnSGoro* this = (EnSGoro*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, &gGoronUnrollAnim, this->jointTable, this->morphTable, @@ -1300,7 +1298,7 @@ void EnSGoro_Init(Actor* thisx, PlayState* play) { } void EnSGoro_Destroy(Actor* thisx, PlayState* play) { - EnSGoro* this = THIS; + EnSGoro* this = (EnSGoro*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1360,7 +1358,7 @@ s32 EnSGoro_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnSGoro_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { s32 stepRot; s32 overrideRot; - EnSGoro* this = THIS; + EnSGoro* this = (EnSGoro*)thisx; switch (limbIndex) { case GORON_LIMB_HEAD: diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index c4bf42c070..ae3b8046bc 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnSb*)thisx) - void EnSb_Init(Actor* thisx, PlayState* play); void EnSb_Destroy(Actor* thisx, PlayState* play); void EnSb_Update(Actor* thisx, PlayState* play); @@ -105,7 +103,7 @@ static Vec3f sFlamePosOffsets[] = { }; void EnSb_Init(Actor* thisx, PlayState* play) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &sDamageTable; @@ -128,7 +126,7 @@ void EnSb_Init(Actor* thisx, PlayState* play) { } void EnSb_Destroy(Actor* thisx, PlayState* play) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -359,7 +357,7 @@ void EnSb_UpdateDamage(EnSb* this, PlayState* play) { void EnSb_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; Player* player = GET_PLAYER(play); if (this->isDead) { @@ -390,7 +388,7 @@ void EnSb_Update(Actor* thisx, PlayState* play) { void EnSb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s8 partParams; - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; if (this->isDrawn) { if (limbIndex <= OBJECT_SB_LIMB_06) { @@ -405,7 +403,7 @@ void EnSb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnSb_Draw(Actor* thisx, PlayState* play) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; Vec3f flamePos; Vec3f* offset; s16 fireDecr; diff --git a/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c b/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c index 309e8462b2..4bf42e04c6 100644 --- a/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c +++ b/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnScRuppe*)thisx) - void EnScRuppe_Init(Actor* thisx, PlayState* play); void EnScRuppe_Destroy(Actor* thisx, PlayState* play); void EnScRuppe_Update(Actor* thisx, PlayState* play); @@ -145,7 +143,7 @@ void func_80BD6B18(EnScRuppe* this, PlayState* play) { } void EnScRuppe_Init(Actor* thisx, PlayState* play) { - EnScRuppe* this = THIS; + EnScRuppe* this = (EnScRuppe*)thisx; ColliderCylinder* collider = &this->collider; Collider_InitCylinder(play, collider); @@ -163,13 +161,13 @@ void EnScRuppe_Init(Actor* thisx, PlayState* play) { } void EnScRuppe_Destroy(Actor* thisx, PlayState* play) { - EnScRuppe* this = THIS; + EnScRuppe* this = (EnScRuppe*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnScRuppe_Update(Actor* thisx, PlayState* play) { - EnScRuppe* this = THIS; + EnScRuppe* this = (EnScRuppe*)thisx; this->actionFunc(this, play); EnScRuppe_UpdateCollision(this, play); @@ -177,7 +175,7 @@ void EnScRuppe_Update(Actor* thisx, PlayState* play) { void EnScRuppe_Draw(Actor* thisx, PlayState* play) { s32* pad; - EnScRuppe* this = THIS; + EnScRuppe* this = (EnScRuppe*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c b/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c index 478c236ff8..eb3600d338 100644 --- a/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c +++ b/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnScopecoin*)thisx) - void EnScopecoin_Init(Actor* thisx, PlayState* play); void EnScopecoin_Destroy(Actor* thisx, PlayState* play); void EnScopecoin_Update(Actor* thisx, PlayState* play); @@ -40,7 +38,7 @@ void EnScopecoin_CheckCollectible(EnScopecoin* this, PlayState* play) { } void EnScopecoin_Init(Actor* thisx, PlayState* play) { - EnScopecoin* this = THIS; + EnScopecoin* this = (EnScopecoin*)thisx; Actor_SetScale(&this->actor, 0.01f); ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 10.0f); @@ -77,7 +75,7 @@ void EnScopecoin_Destroy(Actor* thisx, PlayState* play) { } void EnScopecoin_Update(Actor* thisx, PlayState* play) { - EnScopecoin* this = THIS; + EnScopecoin* this = (EnScopecoin*)thisx; this->actionFunc(this, play); } @@ -87,7 +85,7 @@ static TexturePtr sRupeeTextures[] = { }; void EnScopecoin_Draw(Actor* thisx, PlayState* play) { - EnScopecoin* this = THIS; + EnScopecoin* this = (EnScopecoin*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c index 6b1f5e2b76..7da2714e1f 100644 --- a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c +++ b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnScopecrow*)thisx) - void EnScopecrow_Init(Actor* thisx, PlayState* play); void EnScopecrow_Destroy(Actor* thisx, PlayState* play); void EnScopecrow_Update(Actor* thisx, PlayState* play); @@ -267,7 +265,7 @@ void func_80BCD640(EnScopecrow* this, PlayState* play) { } void EnScopecrow_Init(Actor* thisx, PlayState* play) { - EnScopecrow* this = THIS; + EnScopecrow* this = (EnScopecrow*)thisx; Vec3s* temp; CollisionPoly* sp4C; Vec3s* points; @@ -340,13 +338,13 @@ void EnScopecrow_Init(Actor* thisx, PlayState* play) { } void EnScopecrow_Destroy(Actor* thisx, PlayState* play) { - EnScopecrow* this = THIS; + EnScopecrow* this = (EnScopecrow*)thisx; Collider_DestroyJntSph(play, &this->collider); } void EnScopecrow_Update(Actor* thisx, PlayState* play) { - EnScopecrow* this = THIS; + EnScopecrow* this = (EnScopecrow*)thisx; this->actionFunc(this, play); @@ -355,7 +353,7 @@ void EnScopecrow_Update(Actor* thisx, PlayState* play) { } void EnScopecrow_Draw(Actor* thisx, PlayState* play) { - EnScopecrow* this = THIS; + EnScopecrow* this = (EnScopecrow*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c index c6d57bd3b8..76f387058f 100644 --- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c +++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnScopenuts*)thisx) - void EnScopenuts_Init(Actor* thisx, PlayState* play); void EnScopenuts_Destroy(Actor* thisx, PlayState* play); void EnScopenuts_Update(Actor* thisx, PlayState* play); @@ -723,7 +721,7 @@ f32 func_80BCC448(Path* path, s32 arg1, Vec3f* arg2, Vec3s* arg3) { void EnScopenuts_Init(Actor* thisx, PlayState* play) { s32 pad; - EnScopenuts* this = THIS; + EnScopenuts* this = (EnScopenuts*)thisx; if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_74_40) && (gSaveContext.save.saveInfo.inventory.items[ITEM_OCARINA_OF_TIME] == ITEM_NONE)) { @@ -783,13 +781,13 @@ void EnScopenuts_Init(Actor* thisx, PlayState* play) { } void EnScopenuts_Destroy(Actor* thisx, PlayState* play) { - EnScopenuts* this = THIS; + EnScopenuts* this = (EnScopenuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnScopenuts_Update(Actor* thisx, PlayState* play) { - EnScopenuts* this = THIS; + EnScopenuts* this = (EnScopenuts*)thisx; Actor_SetFocus(&this->actor, 60.0f); SkelAnime_Update(&this->skelAnime); @@ -804,7 +802,7 @@ void EnScopenuts_Update(Actor* thisx, PlayState* play) { } s32 EnScopenuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnScopenuts* this = THIS; + EnScopenuts* this = (EnScopenuts*)thisx; if (((this->animIndex == ENSCOPENUTS_ANIM_4) && (this->unk_35A == 0)) || ((this->animIndex == ENSCOPENUTS_ANIM_8) && (this->unk_35A == 0)) || (this->animIndex == ENSCOPENUTS_ANIM_18) || @@ -858,7 +856,7 @@ void EnScopenuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnScopenuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnScopenuts* this = THIS; + EnScopenuts* this = (EnScopenuts*)thisx; if (((this->unk_35A == 1) || (this->unk_35A == 2)) && ((limbIndex == BUSINESS_SCRUB_LIMB_SCALP) || (limbIndex == BUSINESS_SCRUB_LIMB_HAIR))) { @@ -877,7 +875,7 @@ void EnScopenuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) } void EnScopenuts_Draw(Actor* thisx, PlayState* play) { - EnScopenuts* this = THIS; + EnScopenuts* this = (EnScopenuts*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/src/overlays/actors/ovl_En_Sda/z_en_sda.c index 9ff542fcab..3ed124b980 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnSda*)thisx) - void EnSda_Init(Actor* thisx, PlayState* play); void EnSda_Destroy(Actor* thisx, PlayState* play); void EnSda_Update(Actor* thisx, PlayState* play); @@ -79,7 +77,7 @@ void EnSda_Destroy(Actor* thisx, PlayState* play) { } void EnSda_Update(Actor* thisx, PlayState* play) { - EnSda* this = THIS; + EnSda* this = (EnSda*)thisx; Player* player; if (this->actor.params == ENSDA_1) { @@ -91,7 +89,7 @@ void EnSda_Update(Actor* thisx, PlayState* play) { } void EnSda_Draw(Actor* thisx, PlayState* play) { - EnSda* this = THIS; + EnSda* this = (EnSda*)thisx; Player* player; u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, 64 * 64); diff --git a/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c b/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c index e42defb1a4..153d163408 100644 --- a/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c +++ b/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnSekihi*)thisx) - void EnSekihi_Init(Actor* thisx, PlayState* play); void EnSekihi_Destroy(Actor* thisx, PlayState* play); void EnSekihi_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ static Gfx* sXluDLists[] = { static u16 sTextIds[] = { 0, 0, 0, 0, 0x1018 }; void EnSekihi_Init(Actor* thisx, PlayState* play) { - EnSekihi* this = THIS; + EnSekihi* this = (EnSekihi*)thisx; s32 type = ENSIKIHI_GET_TYPE(thisx); s32 objectSlot; s32 pad; @@ -82,7 +80,7 @@ void EnSekihi_Init(Actor* thisx, PlayState* play) { } void EnSekihi_Destroy(Actor* thisx, PlayState* play) { - EnSekihi* this = THIS; + EnSekihi* this = (EnSekihi*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -170,13 +168,13 @@ void EnSekihi_DoNothing(EnSekihi* this, PlayState* play) { } void EnSekihi_Update(Actor* thisx, PlayState* play) { - EnSekihi* this = THIS; + EnSekihi* this = (EnSekihi*)thisx; this->actionFunc(this, play); } void EnSekihi_Draw(Actor* thisx, PlayState* play) { - EnSekihi* this = THIS; + EnSekihi* this = (EnSekihi*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c index 6c5ee46148..ad853b8f1f 100644 --- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c +++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnSellnuts*)thisx) - void EnSellnuts_Init(Actor* thisx, PlayState* play); void EnSellnuts_Destroy(Actor* thisx, PlayState* play); void EnSellnuts_Update(Actor* thisx, PlayState* play); @@ -982,7 +980,7 @@ f32 func_80ADCFE8(Path* path, s32 arg1, Vec3f* pos, Vec3s* arg3) { } void EnSellnuts_Init(Actor* thisx, PlayState* play) { - EnSellnuts* this = THIS; + EnSellnuts* this = (EnSellnuts*)thisx; s32 pad; Player* player = GET_PLAYER(play); s32 pad2; @@ -1064,13 +1062,13 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { } void EnSellnuts_Destroy(Actor* thisx, PlayState* play) { - EnSellnuts* this = THIS; + EnSellnuts* this = (EnSellnuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnSellnuts_Update(Actor* thisx, PlayState* play) { - EnSellnuts* this = THIS; + EnSellnuts* this = (EnSellnuts*)thisx; Player* player = GET_PLAYER(play); this->unk_328++; @@ -1096,7 +1094,7 @@ void EnSellnuts_Update(Actor* thisx, PlayState* play) { } s32 EnSellnuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSellnuts* this = THIS; + EnSellnuts* this = (EnSellnuts*)thisx; if (((this->animIndex == ENSELLNUTS_ANIM_4) && (this->unk_350 == 0)) || ((this->animIndex == ENSELLNUTS_ANIM_8) && (this->unk_350 == 0)) || @@ -1173,7 +1171,7 @@ void EnSellnuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnSellnuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnSellnuts* this = THIS; + EnSellnuts* this = (EnSellnuts*)thisx; if (((this->unk_350 == 1) || (this->unk_350 == 3)) && ((limbIndex == BUSINESS_SCRUB_LIMB_SCALP) || (limbIndex == BUSINESS_SCRUB_LIMB_HAIR))) { @@ -1193,7 +1191,7 @@ void EnSellnuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) } void EnSellnuts_Draw(Actor* thisx, PlayState* play) { - EnSellnuts* this = THIS; + EnSellnuts* this = (EnSellnuts*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Shn/z_en_shn.c b/src/overlays/actors/ovl_En_Shn/z_en_shn.c index 7de5b79b77..c00c1703af 100644 --- a/src/overlays/actors/ovl_En_Shn/z_en_shn.c +++ b/src/overlays/actors/ovl_En_Shn/z_en_shn.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnShn*)thisx) - void EnShn_Init(Actor* thisx, PlayState* play); void EnShn_Destroy(Actor* thisx, PlayState* play); void EnShn_Update(Actor* thisx, PlayState* play); @@ -584,7 +582,7 @@ s32 func_80AE6704(Actor* thisx, PlayState* play) { PICTO_VALID_0, PICTO_VALID_MONKEY, PICTO_VALID_BIG_OCTO, PICTO_VALID_TINGLE, PICTO_VALID_DEKU_KING, PICTO_VALID_IN_SWAMP, }; - EnShn* this = THIS; + EnShn* this = (EnShn*)thisx; s32 ret = 0; switch (this->unk_2C6) { @@ -700,7 +698,7 @@ void func_80AE6A64(EnShn* this, PlayState* play) { } void EnShn_Init(Actor* thisx, PlayState* play) { - EnShn* this = THIS; + EnShn* this = (EnShn*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gBurlyGuySkel, NULL, this->jointTable, this->morphTable, @@ -732,7 +730,7 @@ void EnShn_Destroy(Actor* thisx, PlayState* play) { } void EnShn_Update(Actor* thisx, PlayState* play) { - EnShn* this = THIS; + EnShn* this = (EnShn*)thisx; func_80AE68F0(this, play); this->actionFunc(this, play); @@ -744,7 +742,7 @@ void EnShn_Update(Actor* thisx, PlayState* play) { } s32 EnShn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnShn* this = THIS; + EnShn* this = (EnShn*)thisx; if (limbIndex == BURLY_GUY_LIMB_HEAD) { func_80AE6488(this, play); @@ -762,7 +760,7 @@ void EnShn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnShn_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnShn* this = THIS; + EnShn* this = (EnShn*)thisx; s32 stepRot; s32 overrideRot; @@ -792,7 +790,7 @@ void EnShn_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnShn_Draw(Actor* thisx, PlayState* play) { - EnShn* this = THIS; + EnShn* this = (EnShn*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index 4276754a99..56c57239b7 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnSi*)thisx) - void EnSi_Init(Actor* thisx, PlayState* play); void EnSi_Destroy(Actor* thisx, PlayState* play); void EnSi_Update(Actor* thisx, PlayState* play); @@ -132,7 +130,7 @@ void EnSi_DraggedByHookshot(EnSi* this, PlayState* play) { } void EnSi_Init(Actor* thisx, PlayState* play) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; Collider_InitSphere(play, &this->collider); Collider_SetSphere(play, &this->collider, &this->actor, &sSphereInit); @@ -142,13 +140,13 @@ void EnSi_Init(Actor* thisx, PlayState* play) { } void EnSi_Destroy(Actor* thisx, PlayState* play) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; Collider_DestroySphere(play, &this->collider); } void EnSi_Update(Actor* thisx, PlayState* play) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; this->actionFunc(this, play); EnSi_UpdateCollision(this, play); @@ -156,7 +154,7 @@ void EnSi_Update(Actor* thisx, PlayState* play) { } void EnSi_Draw(Actor* thisx, PlayState* play) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; func_800B8118(&this->actor, play, 0); func_800B8050(&this->actor, play, 0); diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index d44c8e62dc..2546ce236e 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnSkb*)thisx) - void EnSkb_Init(Actor* thisx, PlayState* play); void EnSkb_Destroy(Actor* thisx, PlayState* play); void EnSkb_Update(Actor* thisx, PlayState* play); @@ -227,7 +225,7 @@ static InitChainEntry sInitChain[] = { }; void EnSkb_Init(Actor* thisx, PlayState* play) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -274,7 +272,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) { } void EnSkb_Destroy(Actor* thisx, PlayState* play) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; if ((this->actor.parent != NULL) && (this->actor.parent->update != NULL) && (this->actor.parent->id == ACTOR_EN_ENCOUNT4)) { @@ -1067,7 +1065,7 @@ void func_80996D68(EnSkb* this, PlayState* play) { void EnSkb_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; this->actionFunc(this, play); if ((this->actionFunc != func_80995E64) && (this->actionFunc != func_80996284) && @@ -1090,7 +1088,7 @@ void EnSkb_Update(Actor* thisx, PlayState* play) { } s32 EnSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; s32 pad; s16 sins; @@ -1120,7 +1118,7 @@ s32 EnSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80997564 = { 800.0f, 1200.0f, 0.0f }; - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; Collider_UpdateSpheres(limbIndex, &this->collider); if ((this->unk_3D8 & 1) && !(this->unk_3D8 & 2)) { @@ -1152,7 +1150,7 @@ void EnSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnSkb_Draw(Actor* thisx, PlayState* play) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; this->bodyPartsCount = 0; Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Slime/z_en_slime.c b/src/overlays/actors/ovl_En_Slime/z_en_slime.c index 249a1b21a1..e302d21873 100644 --- a/src/overlays/actors/ovl_En_Slime/z_en_slime.c +++ b/src/overlays/actors/ovl_En_Slime/z_en_slime.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnSlime*)thisx) - #define ICE_BLOCK_TIMER_MAX 254 #define ICE_BLOCK_UNUSED (ICE_BLOCK_TIMER_MAX + 1) @@ -156,7 +154,7 @@ static Vec3f sBubbleAccel = { 0.0f, -0.8f, 0.0f }; AnimatedMaterial* sSlimeTexAnim; void EnSlime_Init(Actor* thisx, PlayState* play) { - EnSlime* this = THIS; + EnSlime* this = (EnSlime*)thisx; s32 reviveTimeSeconds; s32 i; @@ -215,7 +213,7 @@ void EnSlime_Init(Actor* thisx, PlayState* play) { } void EnSlime_Destroy(Actor* thisx, PlayState* play) { - EnSlime* this = THIS; + EnSlime* this = (EnSlime*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1082,7 +1080,7 @@ void EnSlime_UpdateDamage(EnSlime* this, PlayState* play) { } void EnSlime_Update(Actor* thisx, PlayState* play) { - EnSlime* this = THIS; + EnSlime* this = (EnSlime*)thisx; s32 pad; Player* player = GET_PLAYER(play); @@ -1162,7 +1160,7 @@ static Vec3f sBodyPartPosOffsets[EN_SLIME_BODYPART_MAX] = { void EnSlime_Draw(Actor* thisx, PlayState* play) { s32 i; - EnSlime* this = THIS; + EnSlime* this = (EnSlime*)thisx; Vec3f wobbleScale; Color_RGBA8* primColor; Color_RGBA8* envColor; diff --git a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c index cb6ef914a7..0012fbe039 100644 --- a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c +++ b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnSnowman*)thisx) - void EnSnowman_Init(Actor* thisx, PlayState* play); void EnSnowman_Destroy(Actor* thisx, PlayState* play); void EnSnowman_Update(Actor* thisx, PlayState* play); @@ -186,7 +184,7 @@ static InitChainEntry sInitChain[] = { void EnSnowman_Init(Actor* thisx, PlayState* play) { s32 pad; - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; s32 attackRange; Actor_ProcessInitChain(thisx, sInitChain); @@ -284,7 +282,7 @@ void EnSnowman_Init(Actor* thisx, PlayState* play) { } void EnSnowman_Destroy(Actor* thisx, PlayState* play) { - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1021,7 +1019,7 @@ void EnSnowman_UpdateDamage(EnSnowman* this, PlayState* play) { void EnSnowman_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; f32 wallCheckRadius; if (this->actionFunc != EnSnowman_SplitDoNothing) { @@ -1077,7 +1075,7 @@ void EnSnowman_Update(Actor* thisx, PlayState* play) { } void EnSnowman_UpdateSnowball(Actor* thisx, PlayState* play) { - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; s16 scale; s32 i; @@ -1159,7 +1157,7 @@ static Vec3f sBodyBottomBodyPartOffsets[] = { void EnSnowman_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad; - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; Gfx* gfx; s32 i; @@ -1197,7 +1195,7 @@ void EnSnowman_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnSnowman_Draw(Actor* thisx, PlayState* play) { - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL, @@ -1207,7 +1205,7 @@ void EnSnowman_Draw(Actor* thisx, PlayState* play) { } void EnSnowman_DrawSnowPile(Actor* thisx, PlayState* play) { - EnSnowman* this = THIS; + EnSnowman* this = (EnSnowman*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->snowPileSkelAnime.skeleton, this->snowPileSkelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Snowwd/z_en_snowwd.c b/src/overlays/actors/ovl_En_Snowwd/z_en_snowwd.c index c55e43d085..69db02039a 100644 --- a/src/overlays/actors/ovl_En_Snowwd/z_en_snowwd.c +++ b/src/overlays/actors/ovl_En_Snowwd/z_en_snowwd.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnSnowwd*)thisx) - void EnSnowwd_Init(Actor* thisx, PlayState* play); void EnSnowwd_Destroy(Actor* thisx, PlayState* play); void EnSnowwd_Update(Actor* thisx, PlayState* play); @@ -51,7 +49,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnSnowwd_Init(Actor* thisx, PlayState* play) { - EnSnowwd* this = THIS; + EnSnowwd* this = (EnSnowwd*)thisx; SNOWWD_DROPPED_COLLECTIBLE(thisx) = false; this->actor.home.rot.y = 0; @@ -65,7 +63,7 @@ void EnSnowwd_Init(Actor* thisx, PlayState* play) { } void EnSnowwd_Destroy(Actor* thisx, PlayState* play) { - EnSnowwd* this = THIS; + EnSnowwd* this = (EnSnowwd*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -117,7 +115,7 @@ void EnSnowwd_Idle(EnSnowwd* this, PlayState* play) { } void EnSnowwd_Update(Actor* thisx, PlayState* play) { - EnSnowwd* this = THIS; + EnSnowwd* this = (EnSnowwd*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c index 808446b917..6635d9303d 100644 --- a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c +++ b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnSob1*)thisx) - void EnSob1_Init(Actor* thisx, PlayState* play); void EnSob1_Destroy(Actor* thisx, PlayState* play); void EnSob1_Update(Actor* thisx, PlayState* play); @@ -405,7 +403,7 @@ s32 EnSob1_GetObjectIndices(EnSob1* this, PlayState* play, s16* objectIds) { } void EnSob1_Init(Actor* thisx, PlayState* play) { - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; s32 pad; s16* objectIds; @@ -446,7 +444,7 @@ void EnSob1_Init(Actor* thisx, PlayState* play) { } void EnSob1_Destroy(Actor* thisx, PlayState* play) { - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1494,7 +1492,7 @@ void EnSob1_InitShop(EnSob1* this, PlayState* play) { void EnSob1_Update(Actor* thisx, PlayState* play) { EnSob1ActionFunc changeObjectFunc; - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; if (this->actionFunc != EnSob1_InitShop) { this->blinkFunc(this); @@ -1628,7 +1626,7 @@ void EnSob1_DrawStickDirectionPrompt(PlayState* play, EnSob1* this) { s32 EnSob1_ZoraShopkeeper_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; if (limbIndex == ZORA_LIMB_HEAD) { rot->x += this->headRot; @@ -1638,7 +1636,7 @@ s32 EnSob1_ZoraShopkeeper_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** s32 EnSob1_BombShopkeeper_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; if (limbIndex == BOMB_SHOPKEEPER_LIMB_HEAD) { Matrix_RotateXS(this->headRot, MTXMODE_APPLY); @@ -1667,7 +1665,7 @@ Gfx* EnSob1_EndDList(GraphicsContext* gfxCtx) { void EnSob1_ZoraShopkeeper_Draw(Actor* thisx, PlayState* play) { static TexturePtr sZoraShopkeeperEyeTextures[] = { gZoraEyeOpenTex, gZoraEyeHalfTex, gZoraEyeClosedTex }; - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; s32 pad; s32 i; @@ -1692,7 +1690,7 @@ void EnSob1_ZoraShopkeeper_Draw(Actor* thisx, PlayState* play) { void EnSob1_GoronShopkeeper_Draw(Actor* thisx, PlayState* play) { static TexturePtr sGoronShopkeeperEyeTextures[] = { gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex }; - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; s32 pad; s32 i; @@ -1714,7 +1712,7 @@ void EnSob1_GoronShopkeeper_Draw(Actor* thisx, PlayState* play) { } void EnSob1_BombShopkeeper_Draw(Actor* thisx, PlayState* play) { - EnSob1* this = THIS; + EnSob1* this = (EnSob1*)thisx; s32 pad; u32 frames; s32 i; diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index d4dcabcb42..5532c7c745 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnSsh*)thisx) - void EnSsh_Init(Actor* thisx, PlayState* play); void EnSsh_Destroy(Actor* thisx, PlayState* play); void EnSsh_Update(Actor* thisx, PlayState* play); @@ -662,7 +660,7 @@ void EnSsh_Init(Actor* thisx, PlayState* play) { //! However since object_ssh is the one loaded, this ends up reading garbage data from within object_ssh_Tex_000190. f32 endFrame = Animation_GetLastFrame(&object_st_Anim_000304); s32 pad; - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); SkelAnime_Init(play, &this->skelAnime, &object_ssh_Skel_006470, NULL, this->jointTable, this->morphTable, @@ -693,7 +691,7 @@ void EnSsh_Init(Actor* thisx, PlayState* play) { } void EnSsh_Destroy(Actor* thisx, PlayState* play) { - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; s32 i; Effect_Destroy(play, this->blureIdx); @@ -869,7 +867,7 @@ void EnSsh_Start(EnSsh* this, PlayState* play) { } void EnSsh_Update(Actor* thisx, PlayState* play) { - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; EnSsh_UpdateColliderScale(this); @@ -902,7 +900,7 @@ void EnSsh_Update(Actor* thisx, PlayState* play) { } s32 EnSsh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; switch (limbIndex) { case OBJECT_SSH_LIMB_01: @@ -940,7 +938,7 @@ s32 EnSsh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnSsh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; if ((limbIndex == OBJECT_SSH_LIMB_05) && (this->stateFlags & SSH_STATE_FATHER)) { OPEN_DISPS(play->state.gfxCtx); @@ -955,7 +953,7 @@ void EnSsh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnSsh_Draw(Actor* thisx, PlayState* play) { static TexturePtr D_80976178[] = { object_ssh_Tex_001970, object_ssh_Tex_001DF0, object_ssh_Tex_0021F0 }; s32 pad; - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; EnSsh_CheckBodyStickHit(this, play); EnSsh_Sway(this); diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 59df1484c0..9114d5e7ce 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -12,8 +12,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ ACTOR_FLAG_CAN_ATTACH_TO_ARROW | ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT) -#define THIS ((EnSt*)thisx) - void EnSt_Init(Actor* thisx, PlayState* play); void EnSt_Destroy(Actor* thisx, PlayState* play); void EnSt_Update(Actor* thisx, PlayState* play); @@ -853,7 +851,7 @@ void func_808A701C(EnSt* this, PlayState* play) { } void EnSt_Init(Actor* thisx, PlayState* play) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; this->objectSlot = Object_GetSlot(&play->objectCtx, GAMEPLAY_KEEP); if (((ENST_GET_SWITCH_FLAG(&this->actor) != 0x3F) && Flags_GetSwitch(play, ENST_GET_SWITCH_FLAG(&this->actor))) || @@ -866,7 +864,7 @@ void EnSt_Init(Actor* thisx, PlayState* play) { } void EnSt_Destroy(Actor* thisx, PlayState* play) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -875,7 +873,7 @@ void EnSt_Destroy(Actor* thisx, PlayState* play) { } void EnSt_Update(Actor* thisx, PlayState* play) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; if (this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW) { SkelAnime_Update(&this->skelAnime); @@ -919,7 +917,7 @@ void EnSt_Update(Actor* thisx, PlayState* play) { s32 EnSt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; Color_RGB8 sp20; if (limbIndex == OBJECT_ST_LIMB_04) { @@ -932,7 +930,7 @@ s32 EnSt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void func_808A7478(Actor* thisx, PlayState* play) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; s32 bodyPartIndex; s32 count; diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index a6f503e16c..c82fea11c1 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnSth*)thisx) - void EnSth_Init(Actor* thisx, PlayState* play); void EnSth_Destroy(Actor* thisx, PlayState* play); void EnSth_UpdateWaitForObject(Actor* thisx, PlayState* play); @@ -115,7 +113,7 @@ static Color_RGB8 sShirtColors[] = { void EnSth_Init(Actor* thisx, PlayState* play) { s32 pad; - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; s32 objectSlot; // this actor can draw two separate bodies that use different objects @@ -205,7 +203,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { } void EnSth_Destroy(Actor* thisx, PlayState* play) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -610,7 +608,7 @@ void EnSth_SwampSpiderHouseIdle(EnSth* this, PlayState* play) { * Here we wait invisible until the player has finished. */ void EnSth_UpdateOceansideSpiderHouseWaitForTokens(Actor* thisx, PlayState* play) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; if (Inventory_GetSkullTokenCount(play->sceneId) >= SPIDER_HOUSE_TOKENS_REQUIRED) { this->actor.update = EnSth_Update; @@ -625,7 +623,7 @@ void EnSth_UpdateOceansideSpiderHouseWaitForTokens(Actor* thisx, PlayState* play */ void EnSth_UpdateWaitForObject(Actor* thisx, PlayState* play) { s32 pad; - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; if (Object_IsLoaded(&play->objectCtx, this->mainObjectSlot)) { this->actor.objectSlot = this->mainObjectSlot; @@ -680,7 +678,7 @@ void EnSth_UpdateWaitForObject(Actor* thisx, PlayState* play) { void EnSth_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; Actor_MoveWithGravity(&this->actor); Collider_UpdateCylinder(&this->actor, &this->collider); @@ -704,7 +702,7 @@ void EnSth_Update(Actor* thisx, PlayState* play) { s32 EnSth_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { s32 pad; - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; if (limbIndex == STH_LIMB_HEAD) { rot->x += this->headRot.y; @@ -724,7 +722,7 @@ s32 EnSth_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnSth_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; if (limbIndex == STH_LIMB_HEAD) { s32 pad; @@ -761,7 +759,7 @@ void EnSth_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnSth_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c b/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c index 970b634d64..12622b8247 100644 --- a/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c +++ b/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnSth2*)thisx) - void EnSth2_Init(Actor* thisx, PlayState* play); void EnSth2_Destroy(Actor* thisx, PlayState* play); void EnSth2_Update(Actor* thisx, PlayState* play); @@ -33,7 +31,7 @@ ActorProfile En_Sth2_Profile = { #include "assets/overlays/ovl_En_Sth2/ovl_En_Sth2.c" void EnSth2_Init(Actor* thisx, PlayState* play) { - EnSth2* this = THIS; + EnSth2* this = (EnSth2*)thisx; this->objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_STH); Actor_SetScale(&this->actor, 0.01f); @@ -58,7 +56,7 @@ void EnSth2_UpdateSkelAnime(EnSth2* this, PlayState* play) { void EnSth2_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSth2* this = THIS; + EnSth2* this = (EnSth2*)thisx; if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) { this->actor.objectSlot = this->objectSlot; @@ -72,7 +70,7 @@ void EnSth2_Update(Actor* thisx, PlayState* play) { } void EnSth2_UpdateActionFunc(Actor* thisx, PlayState* play) { - EnSth2* this = THIS; + EnSth2* this = (EnSth2*)thisx; this->actionFunc(this, play); } @@ -110,7 +108,7 @@ void EnSth2_Draw(Actor* thisx, PlayState* play2) { { 190, 110, 0 }, { 0, 180, 110 }, { 0, 255, 80 }, { 255, 160, 60 }, { 190, 230, 250 }, { 240, 230, 120 }, }; PlayState* play = play2; - EnSth2* this = THIS; + EnSth2* this = (EnSth2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Stone_heishi/z_en_stone_heishi.c b/src/overlays/actors/ovl_En_Stone_heishi/z_en_stone_heishi.c index 88fbbd8026..21b35e1b05 100644 --- a/src/overlays/actors/ovl_En_Stone_heishi/z_en_stone_heishi.c +++ b/src/overlays/actors/ovl_En_Stone_heishi/z_en_stone_heishi.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_REACT_TO_LENS) -#define THIS ((EnStoneheishi*)thisx) - void EnStoneheishi_Init(Actor* thisx, PlayState* play); void EnStoneheishi_Destroy(Actor* thisx, PlayState* play); void EnStoneheishi_Update(Actor* thisx, PlayState* play); @@ -116,7 +114,7 @@ typedef enum { } EnStoneHeishiBottle; void EnStoneheishi_Init(Actor* thisx, PlayState* play) { - EnStoneheishi* this = THIS; + EnStoneheishi* this = (EnStoneheishi*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gSoldierSkel, &gSoldierWaveAnim, this->jointTable, this->morphTable, @@ -136,7 +134,7 @@ void EnStoneheishi_Init(Actor* thisx, PlayState* play) { } void EnStoneheishi_Destroy(Actor* thisx, PlayState* play) { - EnStoneheishi* this = THIS; + EnStoneheishi* this = (EnStoneheishi*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -435,7 +433,7 @@ void func_80BC9E50(EnStoneheishi* this, PlayState* play) { void EnStoneheishi_Update(Actor* thisx, PlayState* play) { s32 pad; - EnStoneheishi* this = THIS; + EnStoneheishi* this = (EnStoneheishi*)thisx; Player* player = GET_PLAYER(play); if (this->timer != 0) { @@ -479,7 +477,7 @@ void EnStoneheishi_Update(Actor* thisx, PlayState* play) { s32 EnStoneheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfxP) { - EnStoneheishi* this = THIS; + EnStoneheishi* this = (EnStoneheishi*)thisx; if (limbIndex == SOLDIER_LIMB_HEAD) { rot->x += this->headRot.y; @@ -492,7 +490,7 @@ s32 EnStoneheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, void EnStoneheishi_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfxP) { static Vec3f sLeftHandPos = { 0.0f, 0.0f, 0.0f }; - EnStoneheishi* this = THIS; + EnStoneheishi* this = (EnStoneheishi*)thisx; Gfx* gfx; if ((limbIndex == SOLDIER_LIMB_LEFT_HAND) && (this->bottleDisplay != EN_STONE_BOTTLE_NONE)) { @@ -528,7 +526,7 @@ void EnStoneheishi_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnStoneheishi_Draw(Actor* thisx, PlayState* play) { - EnStoneheishi* this = THIS; + EnStoneheishi* this = (EnStoneheishi*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c b/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c index 5d1326ef05..990713186c 100644 --- a/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c +++ b/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnStopheishi*)thisx) - void EnStopheishi_Init(Actor* thisx, PlayState* play); void EnStopheishi_Destroy(Actor* thisx, PlayState* play); void EnStopheishi_Update(Actor* thisx, PlayState* play); @@ -96,7 +94,7 @@ static AnimationHeader* sAnimations[SOLDIER_ANIM_MAX] = { }; void EnStopheishi_Init(Actor* thisx, PlayState* play) { - EnStopheishi* this = THIS; + EnStopheishi* this = (EnStopheishi*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gSoldierSkel, &gSoldierStandHandOnHipAnim, this->jointTable, @@ -123,7 +121,7 @@ void EnStopheishi_Init(Actor* thisx, PlayState* play) { } void EnStopheishi_Destroy(Actor* thisx, PlayState* play) { - EnStopheishi* this = THIS; + EnStopheishi* this = (EnStopheishi*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -558,7 +556,7 @@ void EnStopheishi_Update(Actor* thisx, PlayState* play) { } s32 EnStopheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnStopheishi* this = THIS; + EnStopheishi* this = (EnStopheishi*)thisx; if (limbIndex == SOLDIER_LIMB_HEAD) { rot->x += this->headRotX; @@ -568,7 +566,7 @@ s32 EnStopheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V } void EnStopheishi_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnStopheishi* this = THIS; + EnStopheishi* this = (EnStopheishi*)thisx; if (limbIndex == SOLDIER_LIMB_HEAD) { Matrix_MultVec3f(&gZeroVec3f, &this->headWorldPos); @@ -576,7 +574,7 @@ void EnStopheishi_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnStopheishi_Draw(Actor* thisx, PlayState* play) { - EnStopheishi* this = THIS; + EnStopheishi* this = (EnStopheishi*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 64d9e4f460..cb2f88d412 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnStream*)thisx) - void EnStream_Init(Actor* thisx, PlayState* play); void EnStream_Destroy(Actor* thisx, PlayState* play); void EnStream_Update(Actor* thisx, PlayState* play); @@ -39,7 +37,7 @@ void EnStream_SetupAction(EnStream* this, EnStreamActionFunc actionFunc) { } void EnStream_Init(Actor* thisx, PlayState* play) { - EnStream* this = THIS; + EnStream* this = (EnStream*)thisx; this->size = EN_STREAM_SIZE(&this->actor); Actor_ProcessInitChain(&this->actor, sInitChain); @@ -124,7 +122,7 @@ void EnStream_WaitForPlayer(EnStream* this, PlayState* play) { } void EnStream_Update(Actor* thisx, PlayState* play) { - EnStream* this = THIS; + EnStream* this = (EnStream*)thisx; this->actionFunc(this, play); Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_WHIRLPOOL - SFX_FLAG); diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 93c9723e94..233fe7983d 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnSuttari*)thisx) - void EnSuttari_Init(Actor* thisx, PlayState* play); void EnSuttari_Destroy(Actor* thisx, PlayState* play); void EnSuttari_Update(Actor* thisx, PlayState* play); @@ -1476,7 +1474,7 @@ void func_80BADF3C(EnSuttari* this, PlayState* play) { } void EnSuttari_Init(Actor* thisx, PlayState* play) { - EnSuttari* this = THIS; + EnSuttari* this = (EnSuttari*)thisx; s32 pad; if (CHECK_WEEKEVENTREG(WEEKEVENTREG_SAKON_DEAD)) { @@ -1494,7 +1492,7 @@ void EnSuttari_Init(Actor* thisx, PlayState* play) { } void EnSuttari_Destroy(Actor* thisx, PlayState* play) { - EnSuttari* this = THIS; + EnSuttari* this = (EnSuttari*)thisx; if ((play->sceneId == SCENE_BACKTOWN) && !(this->flags2 & 4)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 20); @@ -1503,7 +1501,7 @@ void EnSuttari_Destroy(Actor* thisx, PlayState* play) { } void EnSuttari_Update(Actor* thisx, PlayState* play) { - EnSuttari* this = THIS; + EnSuttari* this = (EnSuttari*)thisx; s32 pad; Player* player = GET_PLAYER(play); @@ -1531,7 +1529,7 @@ void EnSuttari_Update(Actor* thisx, PlayState* play) { } s32 EnSuttari_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSuttari* this = THIS; + EnSuttari* this = (EnSuttari*)thisx; if (limbIndex == OBJECT_BOJ_LIMB_0F) { *dList = object_boj_DL_00AF90; @@ -1556,7 +1554,7 @@ s32 EnSuttari_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 void EnSuttari_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80BAE950 = { 0.0f, 0.0f, 0.0f }; static Vec3f D_80BAE95C = { 2000.0f, -1000.0f, 0.0f }; - EnSuttari* this = THIS; + EnSuttari* this = (EnSuttari*)thisx; s32 pad; MtxF* curState; Actor* bombBag; @@ -1595,7 +1593,7 @@ void EnSuttari_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnSuttari_Draw(Actor* thisx, PlayState* play) { - EnSuttari* this = THIS; + EnSuttari* this = (EnSuttari*)thisx; s32 pad; Vec3f pos; Vec3f scale; diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index bdd0ac2693..fdb30dac77 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnSw*)thisx) - void EnSw_Init(Actor* thisx, PlayState* play); void EnSw_Destroy(Actor* thisx, PlayState* play); void EnSw_Update(Actor* thisx, PlayState* play); @@ -1141,7 +1139,7 @@ void func_808DB2E0(EnSw* this, PlayState* play) { } void EnSw_Init(Actor* thisx, PlayState* play) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; s32 pad; if (!func_808D9968(this, play)) { @@ -1217,13 +1215,13 @@ void EnSw_Init(Actor* thisx, PlayState* play) { } void EnSw_Destroy(Actor* thisx, PlayState* play) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; Collider_DestroySphere(play, &this->collider); } void EnSw_Update(Actor* thisx, PlayState* play) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; if (func_808DA08C(this, play)) { this->actionFunc = func_808DA89C; @@ -1240,7 +1238,7 @@ void EnSw_Update(Actor* thisx, PlayState* play) { } s32 EnSw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; if (ENSW_GET_3(&this->actor)) { switch (limbIndex) { @@ -1292,7 +1290,7 @@ s32 EnSw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnSw_Draw(Actor* thisx, PlayState* play) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; s32 bodyPartIndex; s32 count; diff --git a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c index e219435495..e6222ff8c4 100644 --- a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c +++ b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnSyatekiCrow*)thisx) - void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2); void EnSyatekiCrow_Destroy(Actor* thisx, PlayState* play); void EnSyatekiCrow_Update(Actor* thisx, PlayState* play); @@ -73,7 +71,7 @@ static InitChainEntry sInitChain[] = { void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnSyatekiCrow* this = THIS; + EnSyatekiCrow* this = (EnSyatekiCrow*)thisx; Path* path; EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent; s32 i; @@ -109,7 +107,7 @@ void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2) { } void EnSyatekiCrow_Destroy(Actor* thisx, PlayState* play) { - EnSyatekiCrow* this = THIS; + EnSyatekiCrow* this = (EnSyatekiCrow*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -275,7 +273,7 @@ void EnSyatekiCrow_UpdateDamage(EnSyatekiCrow* this, PlayState* play) { } void EnSyatekiCrow_Update(Actor* thisx, PlayState* play) { - EnSyatekiCrow* this = THIS; + EnSyatekiCrow* this = (EnSyatekiCrow*)thisx; this->actionFunc(this, play); @@ -289,7 +287,7 @@ void EnSyatekiCrow_Update(Actor* thisx, PlayState* play) { } s32 EnSyatekiCrow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSyatekiCrow* this = THIS; + EnSyatekiCrow* this = (EnSyatekiCrow*)thisx; if (limbIndex == OBJECT_CROW_LIMB_UPPER_TAIL) { rot->y += TRUNCF_BINANG(0xC00 * Math_SinF(this->skelAnime.curFrame * (M_PIf / 4))); @@ -303,7 +301,7 @@ s32 EnSyatekiCrow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, static Vec3f sBodyOffset = { 2500.0f, 0.0f, 0.0f }; void EnSyatekiCrow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnSyatekiCrow* this = THIS; + EnSyatekiCrow* this = (EnSyatekiCrow*)thisx; Vec3f* bodyPartPos; if (limbIndex == OBJECT_CROW_LIMB_BODY) { @@ -318,7 +316,7 @@ void EnSyatekiCrow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnSyatekiCrow_Draw(Actor* thisx, PlayState* play) { - EnSyatekiCrow* this = THIS; + EnSyatekiCrow* this = (EnSyatekiCrow*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c index 513f9b4000..ecf6984f2b 100644 --- a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c +++ b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnSyatekiDekunuts*)thisx) - void EnSyatekiDekunuts_Init(Actor* thisx, PlayState* play2); void EnSyatekiDekunuts_Destroy(Actor* thisx, PlayState* play); void EnSyatekiDekunuts_Update(Actor* thisx, PlayState* play); @@ -102,7 +100,7 @@ static InitChainEntry sInitChain[] = { void EnSyatekiDekunuts_Init(Actor* thisx, PlayState* play2) { static s32 sDrawFlowers = true; // This makes it so only one EnSyatekiDekunuts draws all the flowers. - EnSyatekiDekunuts* this = THIS; + EnSyatekiDekunuts* this = (EnSyatekiDekunuts*)thisx; PlayState* play = play2; s32 pathType; Path* path; @@ -157,7 +155,7 @@ void EnSyatekiDekunuts_Init(Actor* thisx, PlayState* play2) { } void EnSyatekiDekunuts_Destroy(Actor* thisx, PlayState* play) { - EnSyatekiDekunuts* this = THIS; + EnSyatekiDekunuts* this = (EnSyatekiDekunuts*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -421,7 +419,7 @@ void EnSyatekiDekunuts_Dead(EnSyatekiDekunuts* this, PlayState* play) { void EnSyatekiDekunuts_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSyatekiDekunuts* this = THIS; + EnSyatekiDekunuts* this = (EnSyatekiDekunuts*)thisx; this->actionFunc(this, play); @@ -449,7 +447,7 @@ void EnSyatekiDekunuts_Update(Actor* thisx, PlayState* play) { s32 EnSyatekiDekunuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSyatekiDekunuts* this = THIS; + EnSyatekiDekunuts* this = (EnSyatekiDekunuts*)thisx; if ((limbIndex == DEKU_SCRUB_LIMB_HEADDRESS) && (this->headdressType == SG_DEKU_HEADDRESS_TYPE_FLIPPED_UP)) { rot->z += this->headdressRotZ; @@ -459,7 +457,7 @@ s32 EnSyatekiDekunuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dLi } void EnSyatekiDekunuts_Draw(Actor* thisx, PlayState* play) { - EnSyatekiDekunuts* this = THIS; + EnSyatekiDekunuts* this = (EnSyatekiDekunuts*)thisx; Vec3f flowerPos; s32 i; diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index dc55e0b658..674a7456f2 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -16,8 +16,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnSyatekiMan*)thisx) - void EnSyatekiMan_Init(Actor* thisx, PlayState* play); void EnSyatekiMan_Destroy(Actor* thisx, PlayState* play); void EnSyatekiMan_Update(Actor* thisx, PlayState* play); @@ -202,7 +200,7 @@ void EnSyatekiMan_Swamp_SpawnTargetActors(EnSyatekiMan* this, PlayState* play2, } void EnSyatekiMan_Init(Actor* thisx, PlayState* play) { - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; s32 pad; Path* path = &play->setupPathList[SG_MAN_GET_PATH_INDEX(&this->actor)]; s32 actorListLength = sSwampTargetActorListLengths[this->swampTargetActorListIndex]; @@ -1482,7 +1480,7 @@ void EnSyatekiMan_Blink(EnSyatekiMan* this) { } void EnSyatekiMan_Update(Actor* thisx, PlayState* play) { - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; this->actionFunc(this, play); EnSyatekiMan_Blink(this); @@ -1495,7 +1493,7 @@ void EnSyatekiMan_Update(Actor* thisx, PlayState* play) { } s32 EnSyatekiMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; if ((play->sceneId == SCENE_SYATEKI_MIZU) && (limbIndex == BURLY_GUY_LIMB_HEAD)) { *dList = gTownShootingGalleryManHeadDL; @@ -1514,7 +1512,7 @@ s32 EnSyatekiMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V } void EnSyatekiMan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; Vec3f sFocusOffset = { 1600.0f, 0.0f, 0.0f }; if (limbIndex == BURLY_GUY_LIMB_HEAD) { @@ -1528,7 +1526,7 @@ void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) { gSwampShootingGalleryManEyeHalfTex, gSwampShootingGalleryManEyeHalfTex, }; - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; s32 pad; if (play->sceneId == SCENE_SYATEKI_MIZU) { diff --git a/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c b/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c index 0e538cc353..6136612f58 100644 --- a/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c +++ b/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnSyatekiOkuta*)thisx) - void EnSyatekiOkuta_Init(Actor* thisx, PlayState* play); void EnSyatekiOkuta_Destroy(Actor* thisx, PlayState* play); void EnSyatekiOkuta_Update(Actor* thisx, PlayState* play); @@ -88,7 +86,7 @@ static InitChainEntry sInitChain[] = { void EnSyatekiOkuta_Init(Actor* thisx, PlayState* play) { s32 pad; - EnSyatekiOkuta* this = THIS; + EnSyatekiOkuta* this = (EnSyatekiOkuta*)thisx; WaterBox* waterbox; f32 ySurface; s32 bgId; @@ -116,7 +114,7 @@ void EnSyatekiOkuta_Init(Actor* thisx, PlayState* play) { } void EnSyatekiOkuta_Destroy(Actor* thisx, PlayState* play) { - EnSyatekiOkuta* this = THIS; + EnSyatekiOkuta* this = (EnSyatekiOkuta*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -417,7 +415,7 @@ void EnSyatekiOkuta_CheckForSignal(EnSyatekiOkuta* this, PlayState* play) { void EnSyatekiOkuta_Update(Actor* thisx, PlayState* play) { s32 pad; - EnSyatekiOkuta* this = THIS; + EnSyatekiOkuta* this = (EnSyatekiOkuta*)thisx; EnSyatekiMan* syatekiMan; this->actionFunc(this, play); @@ -537,7 +535,7 @@ s32 EnSyatekiOkuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, s32 pad; Vec3f scale; f32 curFrame; - EnSyatekiOkuta* this = THIS; + EnSyatekiOkuta* this = (EnSyatekiOkuta*)thisx; curFrame = this->skelAnime.curFrame; if (this->actionFunc == EnSyatekiOkuta_Die) { @@ -555,7 +553,7 @@ s32 EnSyatekiOkuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, } void EnSyatekiOkuta_Draw(Actor* thisx, PlayState* play) { - EnSyatekiOkuta* this = THIS; + EnSyatekiOkuta* this = (EnSyatekiOkuta*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c index ff91070eeb..301ed936f0 100644 --- a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c +++ b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnSyatekiWf*)thisx) - void EnSyatekiWf_Init(Actor* thisx, PlayState* play); void EnSyatekiWf_Destroy(Actor* thisx, PlayState* play); void EnSyatekiWf_Update(Actor* thisx, PlayState* play2); @@ -141,7 +139,7 @@ static InitChainEntry sInitChain[] = { void EnSyatekiWf_Init(Actor* thisx, PlayState* play) { s32 pad; - EnSyatekiWf* this = THIS; + EnSyatekiWf* this = (EnSyatekiWf*)thisx; Path* path; EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent; s32 i; @@ -192,7 +190,7 @@ void EnSyatekiWf_Init(Actor* thisx, PlayState* play) { } void EnSyatekiWf_Destroy(Actor* thisx, PlayState* play) { - EnSyatekiWf* this = THIS; + EnSyatekiWf* this = (EnSyatekiWf*)thisx; Collider_DestroyCylinder(play, &this->bodyCollider); Collider_DestroyCylinder(play, &this->tailCollider); @@ -419,7 +417,7 @@ void EnSyatekiWf_Dead(EnSyatekiWf* this, PlayState* play) { void EnSyatekiWf_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnSyatekiWf* this = THIS; + EnSyatekiWf* this = (EnSyatekiWf*)thisx; if (this->actionFunc != EnSyatekiWf_WaitForSignal) { SkelAnime_Update(&this->skelAnime); @@ -483,7 +481,7 @@ s32 EnSyatekiWf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve void EnSyatekiWf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f sTailColliderOffset = { 1200.0f, 0.0f, 0.0f }; - EnSyatekiWf* this = THIS; + EnSyatekiWf* this = (EnSyatekiWf*)thisx; Vec3f tailColliderPos; Collider_UpdateSpheres(limbIndex, &this->headCollider); @@ -502,7 +500,7 @@ void EnSyatekiWf_Draw(Actor* thisx, PlayState* play) { gWolfosNormalEyeNarrowTex, gWolfosNormalEyeHalfTex, }; - EnSyatekiWf* this = THIS; + EnSyatekiWf* this = (EnSyatekiWf*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tab/z_en_tab.c b/src/overlays/actors/ovl_En_Tab/z_en_tab.c index fec08358e6..2bd5f3a8de 100644 --- a/src/overlays/actors/ovl_En_Tab/z_en_tab.c +++ b/src/overlays/actors/ovl_En_Tab/z_en_tab.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTab*)thisx) - void EnTab_Init(Actor* thisx, PlayState* play); void EnTab_Destroy(Actor* thisx, PlayState* play); void EnTab_Update(Actor* thisx, PlayState* play); @@ -455,7 +453,7 @@ s32 func_80BE0D38(Actor* thisx, PlayState* play) { } s32 func_80BE0D60(Actor* thisx, PlayState* play) { - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; s32 ret = false; this->unk_320++; @@ -650,7 +648,7 @@ void func_80BE1348(EnTab* this, PlayState* play) { } void EnTab_Init(Actor* thisx, PlayState* play) { - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gBartenSkel, NULL, this->jointTable, this->morphTable, BARTEN_LIMB_MAX); @@ -671,13 +669,13 @@ void EnTab_Init(Actor* thisx, PlayState* play) { } void EnTab_Destroy(Actor* thisx, PlayState* play) { - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnTab_Update(Actor* thisx, PlayState* play) { - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; f32 radius; f32 height; @@ -701,7 +699,7 @@ void EnTab_Update(Actor* thisx, PlayState* play) { } s32 EnTab_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; if (limbIndex == BARTEN_LIMB_HEAD) { func_80BE0A98(this, play); @@ -715,7 +713,7 @@ s32 EnTab_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnTab_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80BE1B18 = { 800.0f, 0.0f, 0.0f }; - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; if (limbIndex == BARTEN_LIMB_HEAD) { Matrix_MultVec3f(&D_80BE1B18, &this->actor.focus.pos); @@ -724,7 +722,7 @@ void EnTab_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnTab_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; s32 rotStep; s32 overrideStep; @@ -761,7 +759,7 @@ void EnTab_Draw(Actor* thisx, PlayState* play) { gBartenEyeClosedTex, gBartenEyeHalfOpenTex, }; - EnTab* this = THIS; + EnTab* this = (EnTab*)thisx; if (this->scheduleResult != 0) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.c b/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.c index fada05bd95..bdf6416f21 100644 --- a/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.c +++ b/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnTagObj*)thisx) - void EnTagObj_Init(Actor* thisx, PlayState* play); void EnTagObj_Destroy(Actor* thisx, PlayState* play); void EnTagObj_Update(Actor* thisx, PlayState* play); @@ -48,7 +46,7 @@ ActorProfile En_Tag_Obj_Profile = { }; void EnTagObj_Init(Actor* thisx, PlayState* play) { - EnTagObj* this = THIS; + EnTagObj* this = (EnTagObj*)thisx; this->hasSpawnedSeahorse = false; } @@ -57,7 +55,7 @@ void EnTagObj_Destroy(Actor* thisx, PlayState* play) { } void EnTagObj_Update(Actor* thisx, PlayState* play) { - EnTagObj* this = THIS; + EnTagObj* this = (EnTagObj*)thisx; if (!this->hasSpawnedSeahorse) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_OT, this->actor.world.pos.x, this->actor.world.pos.y, diff --git a/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c b/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c index f56534f4cc..a04dee0b2f 100644 --- a/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c +++ b/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTakaraya*)thisx) - void EnTakaraya_Init(Actor* thisx, PlayState* play); void EnTakaraya_Destroy(Actor* thisx, PlayState* play); void EnTakaraya_Update(Actor* thisx, PlayState* play); @@ -97,7 +95,7 @@ u16 D_80ADFB50[PLAYER_FORM_MAX] = { }; void EnTakaraya_Init(Actor* thisx, PlayState* play) { - EnTakaraya* this = THIS; + EnTakaraya* this = (EnTakaraya*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -138,7 +136,7 @@ void EnTakaraya_Init(Actor* thisx, PlayState* play) { } void EnTakaraya_Destroy(Actor* thisx, PlayState* play) { - EnTakaraya* this = THIS; + EnTakaraya* this = (EnTakaraya*)thisx; Flags_UnsetSwitch(play, 5); if (!this->unk2AD) { @@ -391,7 +389,7 @@ void func_80ADF7CC(EnTakaraya* this, PlayState* play) { } void EnTakaraya_Update(Actor* thisx, PlayState* play) { - EnTakaraya* this = THIS; + EnTakaraya* this = (EnTakaraya*)thisx; s32 pad; Vec3s torsoRot; @@ -401,7 +399,7 @@ void EnTakaraya_Update(Actor* thisx, PlayState* play) { } s32 EnTakaraya_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTakaraya* this = THIS; + EnTakaraya* this = (EnTakaraya*)thisx; if (limbIndex == TREASURE_CHEST_SHOP_GAL_LIMB_HEAD) { rot->x += this->headRot.y; @@ -410,7 +408,7 @@ s32 EnTakaraya_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec } void EnTakaraya_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnTakaraya* this = THIS; + EnTakaraya* this = (EnTakaraya*)thisx; if (limbIndex == TREASURE_CHEST_SHOP_GAL_LIMB_HEAD) { Matrix_RotateYS(0x400 - this->headRot.x, MTXMODE_APPLY); @@ -419,7 +417,7 @@ void EnTakaraya_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) } void EnTakaraya_Draw(Actor* thisx, PlayState* play) { - EnTakaraya* this = THIS; + EnTakaraya* this = (EnTakaraya*)thisx; OPEN_DISPS(play->state.gfxCtx); Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Talk/z_en_talk.c b/src/overlays/actors/ovl_En_Talk/z_en_talk.c index 781baa8d90..ecd70575c3 100644 --- a/src/overlays/actors/ovl_En_Talk/z_en_talk.c +++ b/src/overlays/actors/ovl_En_Talk/z_en_talk.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnTalk*)thisx) - void EnTalk_Init(Actor* thisx, PlayState* play); void EnTalk_Destroy(Actor* thisx, PlayState* play); void EnTalk_Update(Actor* thisx, PlayState* play); @@ -29,7 +27,7 @@ ActorProfile En_Talk_Profile = { }; void EnTalk_Init(Actor* thisx, PlayState* play) { - EnTalk* this = THIS; + EnTalk* this = (EnTalk*)thisx; s8 attentionRangeType = ENTALK_GET_ATTENTION_RANGE_TYPE(&this->actor); if ((attentionRangeType >= ATTENTION_RANGE_0) && (attentionRangeType < ATTENTION_RANGE_7)) { @@ -63,7 +61,7 @@ void func_80BDE090(EnTalk* this, PlayState* play) { } void EnTalk_Update(Actor* thisx, PlayState* play) { - EnTalk* this = THIS; + EnTalk* this = (EnTalk*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c index 495046dc21..dc1c088aba 100644 --- a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c +++ b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnTalkGibud*)thisx) - void EnTalkGibud_Init(Actor* thisx, PlayState* play); void EnTalkGibud_Destroy(Actor* thisx, PlayState* play); void EnTalkGibud_Update(Actor* thisx, PlayState* play); @@ -225,7 +223,7 @@ static Vec3f sAccel = { 0.0f, 0.600000023842f, 0.0f }; void EnTalkGibud_Init(Actor* thisx, PlayState* play) { s32 pad; - EnTalkGibud* this = THIS; + EnTalkGibud* this = (EnTalkGibud*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -277,7 +275,7 @@ void EnTalkGibud_Init(Actor* thisx, PlayState* play) { } void EnTalkGibud_Destroy(Actor* thisx, PlayState* play) { - EnTalkGibud* this = THIS; + EnTalkGibud* this = (EnTalkGibud*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1147,7 +1145,7 @@ void EnTalkGibud_UpdateEffect(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_Update(Actor* thisx, PlayState* play) { - EnTalkGibud* this = THIS; + EnTalkGibud* this = (EnTalkGibud*)thisx; EnTalkGibud_CheckForGibdoMask(this, play); EnTalkGibud_UpdateDamage(this, play); @@ -1166,7 +1164,7 @@ void EnTalkGibud_Update(Actor* thisx, PlayState* play) { s32 EnTalkGibud_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnTalkGibud* this = THIS; + EnTalkGibud* this = (EnTalkGibud*)thisx; if (limbIndex == GIBDO_LIMB_UPPER_BODY_ROOT) { rot->y += this->torsoRot.y; @@ -1178,7 +1176,7 @@ s32 EnTalkGibud_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnTalkGibud_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnTalkGibud* this = THIS; + EnTalkGibud* this = (EnTalkGibud*)thisx; if ((this->drawDmgEffTimer != 0) && ((limbIndex == GIBDO_LIMB_LEFT_THIGH) || (limbIndex == GIBDO_LIMB_LEFT_SHIN) || @@ -1194,7 +1192,7 @@ void EnTalkGibud_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } void EnTalkGibud_Draw(Actor* thisx, PlayState* play) { - EnTalkGibud* this = THIS; + EnTalkGibud* this = (EnTalkGibud*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c b/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c index 99b1690d02..4de826c253 100644 --- a/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c +++ b/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTanron1*)thisx) - void EnTanron1_Init(Actor* thisx, PlayState* play); void EnTanron1_Destroy(Actor* thisx, PlayState* play); void EnTanron1_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ static s32 sPad = 0; #include "assets/overlays/ovl_En_Tanron1/ovl_En_Tanron1.c" void EnTanron1_Init(Actor* thisx, PlayState* play) { - EnTanron1* this = THIS; + EnTanron1* this = (EnTanron1*)thisx; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; if (!ENTANRON1_GET_100(&this->actor)) { @@ -72,7 +70,7 @@ void func_80BB4E50(EnTanron1Struct* arg0, Vec3f* arg1, s16 arg2) { } void EnTanron1_Update(Actor* thisx, PlayState* play) { - EnTanron1* this = THIS; + EnTanron1* this = (EnTanron1*)thisx; Actor* temp_a0; Player* player = GET_PLAYER(play); s16 i; @@ -186,7 +184,7 @@ void EnTanron1_Update(Actor* thisx, PlayState* play) { } void EnTanron1_Draw(Actor* thisx, PlayState* play) { - EnTanron1* this = THIS; + EnTanron1* this = (EnTanron1*)thisx; func_80BB5AAC(this, play); } diff --git a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c index 9048f593cd..a928408eaf 100644 --- a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c +++ b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTanron2*)thisx) - void EnTanron2_Init(Actor* thisx, PlayState* play); void EnTanron2_Destroy(Actor* thisx, PlayState* play); void EnTanron2_Update(Actor* thisx, PlayState* play); @@ -119,7 +117,7 @@ static ColliderCylinderInit sCylinderInit2 = { }; void EnTanron2_Init(Actor* thisx, PlayState* play) { - EnTanron2* this = THIS; + EnTanron2* this = (EnTanron2*)thisx; D_80BB8450 = (Boss04*)this->actor.parent; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; @@ -478,7 +476,7 @@ void func_80BB7578(EnTanron2* this, PlayState* play) { void EnTanron2_Update(Actor* thisx, PlayState* play) { s32 pad; - EnTanron2* this = THIS; + EnTanron2* this = (EnTanron2*)thisx; s32 pad2[2]; Input* input; @@ -576,7 +574,7 @@ void EnTanron2_Update(Actor* thisx, PlayState* play) { } void func_80BB7B90(Actor* thisx, PlayState* play) { - EnTanron2* this = THIS; + EnTanron2* this = (EnTanron2*)thisx; D_80BB8454 = (Math_SinS(play->gameplayFrames * 0x3000) * 0.1f) + 1.0f; if (D_80BB8450->unk_1F6 == 11) { diff --git a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c index bf8eb1f112..40117e6b28 100644 --- a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c +++ b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTanron3*)thisx) - #define WORK_TIMER_PICK_NEW_DEVIATION 0 #define WORK_TIMER_DIE 0 #define WORK_TIMER_OUT_OF_WATER 1 @@ -108,7 +106,7 @@ void EnTanron3_CreateEffect(PlayState* play, Vec3f* effectPos) { } void EnTanron3_Init(Actor* thisx, PlayState* play) { - EnTanron3* this = THIS; + EnTanron3* this = (EnTanron3*)thisx; this->actor.gravity = -1.0f; Collider_InitAndSetCylinder(play, &this->atCollider, &this->actor, &sCylinderInit); @@ -391,7 +389,7 @@ void EnTanron3_CheckCollisions(EnTanron3* this, PlayState* play) { void EnTanron3_Update(Actor* thisx, PlayState* play) { s32 pad; - EnTanron3* this = THIS; + EnTanron3* this = (EnTanron3*)thisx; s16 i; Vec3f splashPos; @@ -437,7 +435,7 @@ void EnTanron3_Update(Actor* thisx, PlayState* play) { } s32 EnTanron3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTanron3* this = THIS; + EnTanron3* this = (EnTanron3*)thisx; if (limbIndex == GYORG_SMALL_FISH_LIMB_ROOT) { rot->y += this->bodyRotation; @@ -455,7 +453,7 @@ s32 EnTanron3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 } void EnTanron3_Draw(Actor* thisx, PlayState* play) { - EnTanron3* this = THIS; + EnTanron3* this = (EnTanron3*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c b/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c index 12c6d2bb1b..f616e4d858 100644 --- a/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c +++ b/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnTanron4*)thisx) - void EnTanron4_Init(Actor* thisx, PlayState* play2); void EnTanron4_Destroy(Actor* thisx, PlayState* play); void EnTanron4_Update(Actor* thisx, PlayState* play); @@ -45,7 +43,7 @@ ActorProfile En_Tanron4_Profile = { void EnTanron4_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTanron4* this = THIS; + EnTanron4* this = (EnTanron4*)thisx; SkelAnime_InitFlex(play, &this->skelAnime, &gSeagullSkel, &gSeagullFlapAnim, this->jointTable, this->morphTable, SEAGULL_LIMB_RIGHT_WING_MAX); @@ -253,7 +251,7 @@ void EnTanron4_FlyNearActor(EnTanron4* this, PlayState* play) { } void EnTanron4_Update(Actor* thisx, PlayState* play) { - EnTanron4* this = THIS; + EnTanron4* this = (EnTanron4*)thisx; Actor_SetScale(&this->actor, 0.001f * KREG(16) + 0.01f); @@ -276,7 +274,7 @@ void EnTanron4_Update(Actor* thisx, PlayState* play) { } void EnTanron4_Draw(Actor* thisx, PlayState* play) { - EnTanron4* this = THIS; + EnTanron4* this = (EnTanron4*)thisx; if (this->timeInfluence < 1400.0f) { Matrix_RotateZS(this->roll, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c index 977051c24d..11bd969841 100644 --- a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c +++ b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c @@ -27,8 +27,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTanron5*)thisx) - void EnTanron5_Init(Actor* thisx, PlayState* play); void EnTanron5_Destroy(Actor* thisx, PlayState* play); void EnTanron5_Update(Actor* thisx, PlayState* play2); @@ -212,7 +210,7 @@ void EnTanron5_SpawnEffectBlackDust(TwinmoldEffect* effect, Vec3f* pos, f32 scal } void EnTanron5_Init(Actor* thisx, PlayState* play) { - EnTanron5* this = THIS; + EnTanron5* this = (EnTanron5*)thisx; if (TWINMOLD_PROP_GET_TYPE(&this->actor) >= TWINMOLD_PROP_TYPE_FRAGMENT_LARGE_1) { // This is a ruin fragment or item drop; if there are more than 60 fragments or drops @@ -284,7 +282,7 @@ void EnTanron5_Init(Actor* thisx, PlayState* play) { } void EnTanron5_Destroy(Actor* thisx, PlayState* play) { - EnTanron5* this = THIS; + EnTanron5* this = (EnTanron5*)thisx; if (TWINMOLD_PROP_GET_TYPE(&this->actor) >= TWINMOLD_PROP_TYPE_FRAGMENT_LARGE_1) { sFragmentAndItemDropCount--; @@ -296,7 +294,7 @@ void EnTanron5_Destroy(Actor* thisx, PlayState* play) { */ void EnTanron5_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTanron5* this = THIS; + EnTanron5* this = (EnTanron5*)thisx; Boss02* boss02 = (Boss02*)this->actor.parent; Player* player = GET_PLAYER(play2); s32 i; @@ -513,7 +511,7 @@ void EnTanron5_RuinFragmentItemDrop_Update(Actor* thisx, PlayState* play2) { f32 interactionDistSq; s32 i; Vec3f pos; - EnTanron5* this = THIS; + EnTanron5* this = (EnTanron5*)thisx; PlayState* play = play2; // When a ruin fragment hits the floor, it will slowly sink into the sand. After sinking for 38 frames, @@ -602,7 +600,7 @@ void EnTanron5_RuinFragmentItemDrop_Update(Actor* thisx, PlayState* play2) { } void EnTanron5_Draw(Actor* thisx, PlayState* play) { - EnTanron5* this = THIS; + EnTanron5* this = (EnTanron5*)thisx; if ((-500.0f * sGiantModeScaleFactor) < this->actor.projectedPos.z) { OPEN_DISPS(play->state.gfxCtx); @@ -617,7 +615,7 @@ void EnTanron5_Draw(Actor* thisx, PlayState* play) { } void EnTanron5_ItemDrop_Draw(Actor* thisx, PlayState* play) { - EnTanron5* this = THIS; + EnTanron5* this = (EnTanron5*)thisx; TexturePtr texture; s32 shouldDraw; diff --git a/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c b/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c index f2361a2390..3cb250100c 100644 --- a/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c +++ b/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnTanron6*)thisx) - void EnTanron6_Init(Actor* thisx, PlayState* play); void EnTanron6_Destroy(Actor* thisx, PlayState* play); void EnTanron6_Update(Actor* thisx, PlayState* play); @@ -66,7 +64,7 @@ static DamageTable sDamageTable = { }; void EnTanron6_Init(Actor* thisx, PlayState* play) { - EnTanron6* this = THIS; + EnTanron6* this = (EnTanron6*)thisx; this->actor.colChkInfo.mass = 10; ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 19.0f); @@ -87,7 +85,7 @@ void func_80BE60D0(EnTanron6* this, PlayState* play) { } void EnTanron6_Update(Actor* thisx, PlayState* play) { - EnTanron6* this = THIS; + EnTanron6* this = (EnTanron6*)thisx; this->actionFunc(this, play); Actor_MoveWithGravity(&this->actor); diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index edb4c0c1ff..e5a2aa88ff 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnTest*)thisx) - void EnTest_Init(Actor* thisx, PlayState* play2); void EnTest_Destroy(Actor* thisx, PlayState* play); void EnTest_Update(Actor* thisx, PlayState* play); @@ -159,7 +157,7 @@ void func_80863048(PlayState* play, EnTestStruct* arg1) { void EnTest_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; MtxF sp38; s32 bgId; @@ -194,13 +192,13 @@ void EnTest_Init(Actor* thisx, PlayState* play2) { } void EnTest_Destroy(Actor* thisx, PlayState* play) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; Keyframe_DestroyFlex(&this->kfSkelAnime); } void EnTest_Update(Actor* thisx, PlayState* play) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; s32 i; this->unk_208 = this->kfSkelAnime.frameCtrl.curTime; @@ -226,7 +224,7 @@ void EnTest_Update(Actor* thisx, PlayState* play) { s32 EnTest_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 limbIndex, Gfx** dList, u8* flags, void* thisx, Vec3f* scale, Vec3s* rot, Vec3f* pos) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -249,7 +247,7 @@ s32 EnTest_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 l } void EnTest_Draw(Actor* thisx, PlayState* play) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; Mtx* mtxStack; s32 sp2C = this->unk_208 - 1; diff --git a/src/overlays/actors/ovl_En_Test2/z_en_test2.c b/src/overlays/actors/ovl_En_Test2/z_en_test2.c index d15a6e1404..931e638852 100644 --- a/src/overlays/actors/ovl_En_Test2/z_en_test2.c +++ b/src/overlays/actors/ovl_En_Test2/z_en_test2.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_REACT_TO_LENS) -#define THIS ((EnTest2*)thisx) - void EnTest2_Init(Actor* thisx, PlayState* play); void EnTest2_Update(Actor* thisx, PlayState* play); void EnTest2_UpdateForLens(Actor* thisx, PlayState* play); @@ -79,7 +77,7 @@ static s16 sObjectIds[EN_TEST2_TYPE_MAX] = { }; void EnTest2_Init(Actor* thisx, PlayState* play) { - EnTest2* this = THIS; + EnTest2* this = (EnTest2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if ((ENTEST2_GET_TYPE(&this->actor) == EN_TEST2_TYPE_11) || (ENTEST2_GET_TYPE(&this->actor) == EN_TEST2_TYPE_12)) { @@ -91,7 +89,7 @@ void EnTest2_Update(Actor* thisx, PlayState* play) { s32 pad; s32 objectSlot; EnTest2ModelInfo* modelInfo; - EnTest2* this = THIS; + EnTest2* this = (EnTest2*)thisx; objectSlot = Object_GetSlot(&play->objectCtx, sObjectIds[ENTEST2_GET_TYPE(&this->actor)]); if (objectSlot <= OBJECT_SLOT_NONE) { @@ -118,7 +116,7 @@ void EnTest2_Update(Actor* thisx, PlayState* play) { } void EnTest2_UpdateForLens(Actor* thisx, PlayState* play) { - EnTest2* this = THIS; + EnTest2* this = (EnTest2*)thisx; if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) { this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; @@ -129,7 +127,7 @@ void EnTest2_UpdateForLens(Actor* thisx, PlayState* play) { void EnTest2_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnTest2* this = THIS; + EnTest2* this = (EnTest2*)thisx; Gfx* dList = sModelInfo[ENTEST2_GET_TYPE(&this->actor)].dList2; if (this->animMat != NULL) { diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c index d13d1b93f4..e455e35dbf 100644 --- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c +++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c @@ -16,8 +16,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_PRESS_SWITCHES) -#define THIS ((EnTest3*)thisx) - typedef struct { /* 0x0 */ s8 unk_0; /* 0x1 */ s8 unk_1_0 : 4; @@ -415,7 +413,7 @@ s32 func_80A3ED24(EnTest3* this, PlayState* play) { void EnTest3_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest3* this = THIS; + EnTest3* this = (EnTest3*)thisx; Camera* subCam; if (D_80A41D24) { @@ -471,7 +469,7 @@ void EnTest3_Init(Actor* thisx, PlayState* play2) { void EnTest3_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest3* this = THIS; + EnTest3* this = (EnTest3*)thisx; Effect_Destroy(play, this->player.meleeWeaponEffectIndex[0]); Effect_Destroy(play, this->player.meleeWeaponEffectIndex[1]); @@ -1021,7 +1019,7 @@ void func_80A40A6C(EnTest3* this, PlayState* play) { void EnTest3_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest3* this = THIS; + EnTest3* this = (EnTest3*)thisx; sKafeiControlInput.rel.button = sKafeiControlInput.cur.button; sKafeiControlInput.cur.button = 0; @@ -1075,7 +1073,7 @@ void EnTest3_Update(Actor* thisx, PlayState* play2) { s32 D_80A418C8 = false; s32 EnTest3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTest3* this = THIS; + EnTest3* this = (EnTest3*)thisx; if (limbIndex == KAFEI_LIMB_ROOT) { sKafeiCurBodyPartPos = &this->player.bodyPartsPos[0] - 1; @@ -1130,7 +1128,7 @@ s32 EnTest3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot, Actor* thisx) { s32 pad; - EnTest3* this = THIS; + EnTest3* this = (EnTest3*)thisx; if (*dList2 != NULL) { Matrix_MultZero(sKafeiCurBodyPartPos); @@ -1240,7 +1238,7 @@ static KafeiFace sFaceExpressions[] = { void EnTest3_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest3* this = THIS; + EnTest3* this = (EnTest3*)thisx; s32 eyeTexIndex = GET_EYE_INDEX_FROM_JOINT_TABLE(this->player.skelAnime.jointTable); s32 mouthTexIndex = GET_MOUTH_INDEX_FROM_JOINT_TABLE(this->player.skelAnime.jointTable); Gfx* gfx; diff --git a/src/overlays/actors/ovl_En_Test4/z_en_test4.c b/src/overlays/actors/ovl_En_Test4/z_en_test4.c index ffbba017f1..b98b535d8b 100644 --- a/src/overlays/actors/ovl_En_Test4/z_en_test4.c +++ b/src/overlays/actors/ovl_En_Test4/z_en_test4.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000) -#define THIS ((EnTest4*)thisx) - void EnTest4_Init(Actor* thisx, PlayState* play); void EnTest4_Destroy(Actor* thisx, PlayState* play); void EnTest4_Update(Actor* thisx, PlayState* play); @@ -323,7 +321,7 @@ void EnTest4_GetBellTimeAndShrinkScreenBeforeDay3(EnTest4* this, PlayState* play void EnTest4_Init(Actor* thisx, PlayState* play) { s32 eventDayCount; - EnTest4* this = THIS; + EnTest4* this = (EnTest4*)thisx; Player* player = GET_PLAYER(play); s8 csId = this->actor.csId; @@ -622,7 +620,7 @@ void EnTest4_SetSkyboxNumStars(EnTest4* this, PlayState* play) { } void EnTest4_Update(Actor* thisx, PlayState* play) { - EnTest4* this = THIS; + EnTest4* this = (EnTest4*)thisx; Player* player = GET_PLAYER(play); if (player->stateFlags1 & PLAYER_STATE1_2) { diff --git a/src/overlays/actors/ovl_En_Test5/z_en_test5.c b/src/overlays/actors/ovl_En_Test5/z_en_test5.c index 5a63a54fac..5d6190c3b4 100644 --- a/src/overlays/actors/ovl_En_Test5/z_en_test5.c +++ b/src/overlays/actors/ovl_En_Test5/z_en_test5.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnTest5*)thisx) - void EnTest5_Init(Actor* thisx, PlayState* play2); void EnTest5_Destroy(Actor* thisx, PlayState* play); void EnTest5_Update(Actor* thisx, PlayState* play2); @@ -34,7 +32,7 @@ void EnTest5_SetupAction(EnTest5* this, EnTest5ActionFunc actionFunc) { void EnTest5_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest5* this = THIS; + EnTest5* this = (EnTest5*)thisx; WaterBox* waterBox; f32 ySurface; @@ -81,7 +79,7 @@ void EnTest5_HandleBottleAction(EnTest5* this, PlayState* play) { void EnTest5_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest5* this = THIS; + EnTest5* this = (EnTest5*)thisx; Vec3f steamPos; CollisionPoly* poly; s32 pad; diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c index 787722135b..3a5eee817f 100644 --- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c +++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c @@ -14,8 +14,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnTest6*)thisx) - void EnTest6_Init(Actor* thisx, PlayState* play2); void EnTest6_Destroy(Actor* thisx, PlayState* play2); void EnTest6_Update(Actor* thisx, PlayState* play); @@ -347,7 +345,7 @@ void EnTest6_SetupAction(EnTest6* this, EnTest6ActionFunc actionFunc) { void EnTest6_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest6* this = THIS; + EnTest6* this = (EnTest6*)thisx; s32 i; if (((SOTCS_GET_OCARINA_MODE(&this->actor) == OCARINA_MODE_APPLY_INV_SOT_FAST) || @@ -375,7 +373,7 @@ void EnTest6_Init(Actor* thisx, PlayState* play2) { void EnTest6_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest6* this = THIS; + EnTest6* this = (EnTest6*)thisx; s32 i; play->envCtx.adjLightSettings.ambientColor[0] = 0; @@ -921,7 +919,7 @@ void EnTest6_DoubleSoTCutscene(EnTest6* this, PlayState* play) { } void EnTest6_Update(Actor* thisx, PlayState* play) { - EnTest6* this = THIS; + EnTest6* this = (EnTest6*)thisx; this->actionFunc(this, play); } @@ -1423,7 +1421,7 @@ void EnTest6_DrawInvertedSoTCutscene(EnTest6* this, PlayState* play2) { } void EnTest6_Draw(Actor* thisx, PlayState* play) { - EnTest6* this = THIS; + EnTest6* this = (EnTest6*)thisx; if (this->cueId != SOTCS_CUEID_NONE) { switch (this->drawType) { diff --git a/src/overlays/actors/ovl_En_Test7/z_en_test7.c b/src/overlays/actors/ovl_En_Test7/z_en_test7.c index 60e1ce94f3..d6fbc5ea71 100644 --- a/src/overlays/actors/ovl_En_Test7/z_en_test7.c +++ b/src/overlays/actors/ovl_En_Test7/z_en_test7.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000 | ACTOR_FLAG_200000 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnTest7*)thisx) - void EnTest7_Init(Actor* thisx, PlayState* play2); void EnTest7_Destroy(Actor* thisx, PlayState* play); void EnTest7_Update(Actor* thisx, PlayState* play); @@ -371,7 +369,7 @@ void EnTest7_InitWindCapsule(OwlWarpWindCapsule* windCapsule) { void EnTest7_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTest7* this = THIS; + EnTest7* this = (EnTest7*)thisx; Player* player = GET_PLAYER(play); Player* player2 = GET_PLAYER(play); @@ -413,7 +411,7 @@ void EnTest7_Init(Actor* thisx, PlayState* play2) { } void EnTest7_Destroy(Actor* thisx, PlayState* play) { - EnTest7* this = THIS; + EnTest7* this = (EnTest7*)thisx; CutsceneManager_Stop(play->playerCsIds[PLAYER_CS_ID_SONG_WARP]); LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); @@ -939,7 +937,7 @@ void EnTest7_ArriveCsPart3(EnTest7* this, PlayState* play) { } void EnTest7_Update(Actor* thisx, PlayState* play) { - EnTest7* this = THIS; + EnTest7* this = (EnTest7*)thisx; this->actionFunc(this, play); @@ -955,7 +953,7 @@ void EnTest7_Update(Actor* thisx, PlayState* play) { s32 EnTest7_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 limbIndex, Gfx** dList, u8* flags, void* thisx, Vec3f* scale, Vec3s* rot, Vec3f* pos) { - EnTest7* this = THIS; + EnTest7* this = (EnTest7*)thisx; Vec3f featherPos; if ((*dList != NULL) && (Rand_ZeroOne() < 0.03f)) { @@ -967,7 +965,7 @@ s32 EnTest7_OverrideLimbDraw(PlayState* play, KFSkelAnimeFlex* kfSkelAnime, s32 void EnTest7_Draw(Actor* thisx, PlayState* play) { s32 pad[2]; - EnTest7* this = THIS; + EnTest7* this = (EnTest7*)thisx; s32 sp40; // Draw wings diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index c1bd5febb8..99d0de034e 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnTg*)thisx) - void EnTg_Init(Actor* thisx, PlayState* play); void EnTg_Destroy(Actor* thisx, PlayState* play); void EnTg_Update(Actor* thisx, PlayState* play); @@ -126,7 +124,7 @@ void EnTg_UpdateSkelAnime(EnTg* this, PlayState* play) { } void EnTg_Init(Actor* thisx, PlayState* play) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gHoneyAndDarlingSkel, NULL, this->jointTable, this->morphTable, @@ -141,7 +139,7 @@ void EnTg_Init(Actor* thisx, PlayState* play) { } void EnTg_Destroy(Actor* thisx, PlayState* play) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -164,7 +162,7 @@ void EnTg_Idle(EnTg* this, PlayState* play) { } void EnTg_Update(Actor* thisx, PlayState* play) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; this->actionFunc(this, play); Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_4); @@ -178,7 +176,7 @@ s32 EnTg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnTg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; if (limbIndex == HONEY_AND_DARLING_LIMB_MAN_HEAD) { @@ -188,7 +186,7 @@ void EnTg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnTg_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; Matrix_Push(); EnTg_DrawHearts(play, this->effects, ARRAY_COUNT(this->effects)); diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c index 1a617e24bc..f26644df9c 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -11,8 +11,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_IGNORE_QUAKE | \ ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnThiefbird*)thisx) - void EnThiefbird_Init(Actor* thisx, PlayState* play); void EnThiefbird_Destroy(Actor* thisx, PlayState* play); void EnThiefbird_Update(Actor* thisx, PlayState* play2); @@ -148,7 +146,7 @@ Vec3f D_80C13920; s32 D_80C1392C; void EnThiefbird_Init(Actor* thisx, PlayState* play) { - EnThiefbird* this = THIS; + EnThiefbird* this = (EnThiefbird*)thisx; s32 i; ColliderJntSphElementDim* dim; @@ -183,7 +181,7 @@ void EnThiefbird_Init(Actor* thisx, PlayState* play) { } void EnThiefbird_Destroy(Actor* thisx, PlayState* play) { - EnThiefbird* this = THIS; + EnThiefbird* this = (EnThiefbird*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -1014,7 +1012,7 @@ void func_80C12D00(EnThiefbird* this) { void EnThiefbird_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnThiefbird* this = THIS; + EnThiefbird* this = (EnThiefbird*)thisx; func_80C12B1C(this, play); this->actionFunc(this, play); @@ -1056,7 +1054,7 @@ void EnThiefbird_Update(Actor* thisx, PlayState* play2) { } s32 EnThiefbird_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnThiefbird* this = THIS; + EnThiefbird* this = (EnThiefbird*)thisx; if ((limbIndex == TAKKURI_LIMB_RIGHT_EAR) || (limbIndex == TAKKURI_LIMB_LEFT_EAR)) { this->unk_3E4 = *dList; @@ -1091,7 +1089,7 @@ static s8 sLimbToBodyParts[TAKKURI_LIMB_MAX] = { }; void EnThiefbird_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnThiefbird* this = THIS; + EnThiefbird* this = (EnThiefbird*)thisx; s32 pad; Gfx* gfx; s8 bodyPartIndex; @@ -1176,7 +1174,7 @@ void func_80C13354(EnThiefbird* this, PlayState* play2) { } void EnThiefbird_Draw(Actor* thisx, PlayState* play) { - EnThiefbird* this = THIS; + EnThiefbird* this = (EnThiefbird*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, diff --git a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c index 9f4c99e118..3f903d62e5 100644 --- a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c +++ b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c @@ -13,8 +13,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnTimeTag*)thisx) - void EnTimeTag_Init(Actor* thisx, PlayState* play); void EnTimeTag_Destroy(Actor* thisx, PlayState* play); void EnTimeTag_Update(Actor* thisx, PlayState* play); @@ -50,7 +48,7 @@ ActorProfile En_Time_Tag_Profile = { }; void EnTimeTag_Init(Actor* thisx, PlayState* play) { - EnTimeTag* this = THIS; + EnTimeTag* this = (EnTimeTag*)thisx; this->actionFunc = EnTimeTag_KickOut_WaitForTime; @@ -341,7 +339,7 @@ void EnTimeTag_KickOut_WaitForTime(EnTimeTag* this, PlayState* play) { } void EnTimeTag_Update(Actor* thisx, PlayState* play) { - EnTimeTag* this = THIS; + EnTimeTag* this = (EnTimeTag*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index 515baa1269..84f4ebeb5b 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) -#define THIS ((EnTite*)thisx) - void EnTite_Init(Actor* thisx, PlayState* play); void EnTite_Destroy(Actor* thisx, PlayState* play); void EnTite_Update(Actor* thisx, PlayState* play); @@ -133,7 +131,7 @@ static InitChainEntry sInitChain[] = { void EnTite_Init(Actor* thisx, PlayState* play) { static s32 sTexturesDesegmented = false; - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; s32 i; s32 j; @@ -183,7 +181,7 @@ void EnTite_Init(Actor* thisx, PlayState* play) { } void EnTite_Destroy(Actor* thisx, PlayState* play) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; Collider_DestroySphere(play, &this->collider); } @@ -1055,7 +1053,7 @@ void func_808963B4(EnTite* this, PlayState* play) { } void EnTite_Update(Actor* thisx, PlayState* play) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; func_80895FF8(this, play); @@ -1103,7 +1101,7 @@ void EnTite_Update(Actor* thisx, PlayState* play) { } s32 EnTite_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; if (this->unk_2BA == -1) { this->unk_3A8 = *dList; @@ -1169,7 +1167,7 @@ static s8 sLimbToBodyParts2[OBJECT_TITE_LIMB_MAX] = { }; void EnTite_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; MtxF* matrix; s8 bodyPart1Index; @@ -1206,7 +1204,7 @@ void EnTite_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot } void EnTite_Draw(Actor* thisx, PlayState* play) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 25408915b0..94fa4a29eb 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnTk*)thisx) - void EnTk_Init(Actor* thisx, PlayState* play); void EnTk_Destroy(Actor* thisx, PlayState* play); void EnTk_Update(Actor* thisx, PlayState* play); @@ -213,7 +211,7 @@ void func_80AEC658(SkelAnime* skelAnime, f32 animCurFrame, f32 arg2, f32* arg3, void EnTk_Init(Actor* thisx, PlayState* play) { s32 pad; - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; this->unk_2B0 = ENTK_GET_F(&this->actor); this->switchFlag = ENTK_GET_SWITCH_FLAG(&this->actor); @@ -290,7 +288,7 @@ void EnTk_Init(Actor* thisx, PlayState* play) { } void EnTk_Destroy(Actor* thisx, PlayState* play) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -1293,7 +1291,7 @@ void func_80AEF2C8(Actor* thisx, PlayState* play) { void func_80AEF2D8(Actor* thisx, PlayState* play) { s32 pad; - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; if (this->actor.draw != NULL) { Collider_UpdateCylinder(&this->actor, &this->collider); @@ -1317,7 +1315,7 @@ void func_80AEF2D8(Actor* thisx, PlayState* play) { void EnTk_Update(Actor* thisx, PlayState* play) { s32 pad; - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); @@ -1372,7 +1370,7 @@ void EnTk_Update(Actor* thisx, PlayState* play) { } void func_80AEF5F4(Actor* thisx, PlayState* play) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; this->unk_316 += 0x46C8; this->unk_318 = Math_SinS(this->unk_316) * 900.0f; @@ -1380,7 +1378,7 @@ void func_80AEF5F4(Actor* thisx, PlayState* play) { } s32 EnTk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; if (limbIndex == OBJECT_TK_LIMB_10) { rot->z += this->unk_31A; @@ -1391,7 +1389,7 @@ s32 EnTk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnTk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80AEFA84 = { 0.0f, 0.0f, 4600.0f }; - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; if (this->unk_2B0 != 2) { switch (limbIndex) { @@ -1423,7 +1421,7 @@ void EnTk_Draw(Actor* thisx, PlayState* play) { object_tk_Tex_005390, }; s32 pad; - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/src/overlays/actors/ovl_En_Torch/z_en_torch.c index 7b086901dd..fb71c4c325 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnTorch*)thisx) - void EnTorch_Init(Actor* thisx, PlayState* play); ActorProfile En_Torch_Profile = { @@ -30,7 +28,7 @@ static u8 sChestContents[] = { }; void EnTorch_Init(Actor* thisx, PlayState* play) { - EnTorch* this = THIS; + EnTorch* this = (EnTorch*)thisx; s8 returnData = gSaveContext.respawn[RESPAWN_MODE_UNK_3].data; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOX, this->actor.world.pos.x, this->actor.world.pos.y, diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 654f3cc9f5..f833002786 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnTorch2*)thisx) - void EnTorch2_Init(Actor* thisx, PlayState* play); void EnTorch2_Destroy(Actor* thisx, PlayState* play); void EnTorch2_Update(Actor* thisx, PlayState* play); @@ -62,7 +60,7 @@ static Gfx* sShellDLists[] = { }; void EnTorch2_Init(Actor* thisx, PlayState* play) { - EnTorch2* this = THIS; + EnTorch2* this = (EnTorch2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -77,7 +75,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play) { } void EnTorch2_Destroy(Actor* thisx, PlayState* play) { - EnTorch2* this = THIS; + EnTorch2* this = (EnTorch2*)thisx; Collider_DestroyCylinder(play, &this->collider); Play_SetRespawnData(play, this->actor.params + RESPAWN_MODE_GORON - 1, 0xFF, 0, @@ -86,7 +84,7 @@ void EnTorch2_Destroy(Actor* thisx, PlayState* play) { } void EnTorch2_Update(Actor* thisx, PlayState* play) { - EnTorch2* this = THIS; + EnTorch2* this = (EnTorch2*)thisx; u16 targetAlpha; u16 remainingFrames; s32 pad[2]; @@ -132,7 +130,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play) { } void EnTorch2_UpdateIdle(Actor* thisx, PlayState* play) { - EnTorch2* this = THIS; + EnTorch2* this = (EnTorch2*)thisx; if (this->state == TORCH2_STATE_DYING) { // Start death animation @@ -142,7 +140,7 @@ void EnTorch2_UpdateIdle(Actor* thisx, PlayState* play) { } void EnTorch2_UpdateDeath(Actor* thisx, PlayState* play) { - EnTorch2* this = THIS; + EnTorch2* this = (EnTorch2*)thisx; // Fall down and become transparent, then delete once invisible if (Math_StepToS(&this->alpha, 0, 8)) { @@ -156,7 +154,7 @@ void EnTorch2_UpdateDeath(Actor* thisx, PlayState* play) { void EnTorch2_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTorch2* this = THIS; + EnTorch2* this = (EnTorch2*)thisx; Gfx* gfx = sShellDLists[this->actor.params]; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c index 94c43783f9..c893e9b408 100644 --- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c +++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnToto*)thisx) - #define ENTOTO_WEEK_EVENT_FLAGS (CHECK_WEEKEVENTREG(WEEKEVENTREG_50_01) || CHECK_WEEKEVENTREG(WEEKEVENTREG_51_80)) void EnToto_Init(Actor* thisx, PlayState* play); @@ -166,7 +164,7 @@ void func_80BA36C0(EnToto* this, PlayState* play, s32 index) { } void EnToto_Init(Actor* thisx, PlayState* play) { - EnToto* this = THIS; + EnToto* this = (EnToto*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -185,7 +183,7 @@ void EnToto_Init(Actor* thisx, PlayState* play) { } void EnToto_Destroy(Actor* thisx, PlayState* play) { - EnToto* this = THIS; + EnToto* this = (EnToto*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -687,7 +685,7 @@ void func_80BA4CB4(EnToto* this, PlayState* play) { } void EnToto_Update(Actor* thisx, PlayState* play) { - EnToto* this = THIS; + EnToto* this = (EnToto*)thisx; s32 pad; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_525)) { @@ -705,7 +703,7 @@ void EnToto_Update(Actor* thisx, PlayState* play) { void EnToto_Draw(Actor* thisx, PlayState* play) { TexturePtr sp4C[] = { object_zm_Tex_008AE8, object_zm_Tex_00A068, object_zm_Tex_00A468 }; - EnToto* this = THIS; + EnToto* this = (EnToto*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Trt/z_en_trt.c b/src/overlays/actors/ovl_En_Trt/z_en_trt.c index 3bbead826a..b99262783e 100644 --- a/src/overlays/actors/ovl_En_Trt/z_en_trt.c +++ b/src/overlays/actors/ovl_En_Trt/z_en_trt.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnTrt*)thisx) - #define ENTRT_FULLY_AWAKE (1 << 0) #define ENTRT_GIVEN_MUSHROOM (1 << 1) #define ENTRT_TALKED (1 << 2) @@ -1706,21 +1704,21 @@ static InitChainEntry sInitChain[] = { }; void EnTrt_Init(Actor* thisx, PlayState* play) { - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); EnTrt_InitShop(this, play); } void EnTrt_Destroy(Actor* thisx, PlayState* play) { - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; SkelAnime_Free(&this->skelAnime, play); Collider_DestroyCylinder(play, &this->collider); } void EnTrt_Update(Actor* thisx, PlayState* play) { - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; this->blinkFunc(this); EnTrt_UpdateJoystickInputState(play, this); @@ -1773,7 +1771,7 @@ void EnTrt_UpdateLimb(s16 pitch, s16 yaw, Vec3f* pos, Vec3s* rot, s32 overrideRo } s32 EnTrt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; s32 i; for (i = 0; i < ARRAY_COUNT(this->items); i++) { @@ -1789,7 +1787,7 @@ s32 EnTrt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnTrt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; s32 overrideRot; overrideRot = false; @@ -1807,7 +1805,7 @@ void EnTrt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnTrt_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; if (limbIndex == KOTAKE_LIMB_HEAD) { Matrix_Translate(this->headPos.x, this->headPos.y, this->headPos.z, MTXMODE_NEW); @@ -1820,7 +1818,7 @@ void EnTrt_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { void EnTrt_Draw(Actor* thisx, PlayState* play) { static TexturePtr sEyeTextures[] = { gKotakeEyeOpenTex, gKotakeEyeHalfTex, gKotakeEyeClosedTex }; - EnTrt* this = THIS; + EnTrt* this = (EnTrt*)thisx; s32 pad; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index fdef394246..e8638a785c 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnTrt2*)thisx) - void EnTrt2_Init(Actor* thisx, PlayState* play); void EnTrt2_Destroy(Actor* thisx, PlayState* play); void EnTrt2_Update(Actor* thisx, PlayState* play); @@ -805,7 +803,7 @@ static InitChainEntry sInitChain[] = { }; void EnTrt2_Init(Actor* thisx, PlayState* play) { - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -815,14 +813,14 @@ void EnTrt2_Init(Actor* thisx, PlayState* play) { } void EnTrt2_Destroy(Actor* thisx, PlayState* play) { - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; SkelAnime_Free(&this->skelAnime, play); Collider_DestroyCylinder(play, &this->collider); } void EnTrt2_Update(Actor* thisx, PlayState* play) { - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; if ((this->unk_3B2 != 6) && (this->unk_3B2 != 10) && (this->unk_3B2 != 13) && (this->unk_3B2 != 14) && (this->unk_3B2 != 16) && (this->unk_3B2 != 8) && (this->unk_3B2 != 9)) { @@ -888,7 +886,7 @@ void func_80AD5394(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4) { } s32 EnTrt2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; if ((limbIndex == KOTAKE_LIMB_TORSO_LIMB) || (limbIndex == KOTAKE_LIMB_LEFT_HAND) || (limbIndex == KOTAKE_LIMB_RIGHT_HAND)) { @@ -899,7 +897,7 @@ s32 EnTrt2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } void EnTrt2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; Vec3f sp30 = { 0.0f, -30.0f, 0.0f }; s32 phi_v0 = false; @@ -919,7 +917,7 @@ void EnTrt2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot } void EnTrt2_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; if (limbIndex == KOTAKE_LIMB_HEAD) { Matrix_Translate(this->unk_3C8.x, this->unk_3C8.y, this->unk_3C8.z, MTXMODE_NEW); @@ -937,7 +935,7 @@ void func_80AD56E8(Actor* thisx, PlayState* play) { gKotakeEyeClosedTex, }; s32 pad; - EnTrt2* this = THIS; + EnTrt2* this = (EnTrt2*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tru/z_en_tru.c b/src/overlays/actors/ovl_En_Tru/z_en_tru.c index 28c7cf6039..7f52232ed4 100644 --- a/src/overlays/actors/ovl_En_Tru/z_en_tru.c +++ b/src/overlays/actors/ovl_En_Tru/z_en_tru.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTru*)thisx) - void EnTru_Init(Actor* thisx, PlayState* play); void EnTru_Destroy(Actor* thisx, PlayState* play); void EnTru_Update(Actor* thisx, PlayState* play); @@ -825,7 +823,7 @@ s32 func_80A87400(EnTru* this, PlayState* play) { } s32 func_80A875AC(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; s32 ret = false; switch (this->unk_364) { @@ -885,7 +883,7 @@ s32 func_80A875AC(Actor* thisx, PlayState* play) { } s32 func_80A8777C(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; s32 ret = 0; PlayerItemAction itemAction; @@ -922,7 +920,7 @@ s32 func_80A8777C(Actor* thisx, PlayState* play) { s32 func_80A87880(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; s32 ret = false; switch (this->unk_364) { @@ -995,7 +993,7 @@ s32 func_80A87880(Actor* thisx, PlayState* play) { } s32 func_80A87B48(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; Player* player = GET_PLAYER(play); Vec3f sp4C; Vec3f sp40; @@ -1054,7 +1052,7 @@ s32 func_80A87B48(Actor* thisx, PlayState* play) { } s32 func_80A87DC0(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; s32 ret = false; switch (this->unk_364) { @@ -1186,7 +1184,7 @@ void func_80A881E0(EnTru* this, PlayState* play) { } void EnTru_Init(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; if ((gSaveContext.save.entrance != ENTRANCE(WOODS_OF_MYSTERY, 0)) || CHECK_WEEKEVENTREG(WEEKEVENTREG_SAVED_KOUME)) { Actor_Kill(&this->actor); @@ -1220,13 +1218,13 @@ void EnTru_Init(Actor* thisx, PlayState* play) { } void EnTru_Destroy(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; Collider_DestroySphere(play, &this->collider); } void EnTru_Update(Actor* thisx, PlayState* play) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; f32 radius; func_80A872AC(this, play); @@ -1248,7 +1246,7 @@ void EnTru_Update(Actor* thisx, PlayState* play) { s32 EnTru_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { static Vec3f D_80A8B3FC = { 3000.0f, -800.0f, 0.0f }; s32 pad; - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; if (limbIndex == KOUME_LIMB_HEAD) { Matrix_MultZero(&this->actor.focus.pos); @@ -1268,7 +1266,7 @@ s32 EnTru_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnTru_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; if (limbIndex == KOUME_LIMB_RIGHT_HAND) { func_80A86BAC(this, play); @@ -1276,7 +1274,7 @@ void EnTru_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnTru_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; s32 pad[3]; s32 overrideRot; s32 stepRot; @@ -1324,7 +1322,7 @@ void EnTru_Draw(Actor* thisx, PlayState* play) { gKoumeEyeHalfTex, }; s32 pad; - EnTru* this = THIS; + EnTru* this = (EnTru*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c index b059acf4bf..81b701dcfe 100644 --- a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c +++ b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnTruMt*)thisx) - void EnTruMt_Init(Actor* thisx, PlayState* play); void EnTruMt_Destroy(Actor* thisx, PlayState* play); void EnTruMt_Update(Actor* thisx, PlayState* play); @@ -403,7 +401,7 @@ void func_80B76C38(EnTruMt* this, PlayState* play) { void EnTruMt_Init(Actor* thisx, PlayState* play) { s32 pad; - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; if (!CHECK_EVENTINF(EVENTINF_35)) { Actor_Kill(&this->actor); @@ -437,13 +435,13 @@ void EnTruMt_Init(Actor* thisx, PlayState* play) { } void EnTruMt_Destroy(Actor* thisx, PlayState* play) { - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; Collider_DestroySphere(play, &this->collider); } void EnTruMt_Update(Actor* thisx, PlayState* play) { - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; func_80B768F0(this, play); SkelAnime_Update(&this->skelAnime); @@ -487,7 +485,7 @@ void func_80B76ED4(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4) { s32 EnTruMt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { static Vec3f D_80B7765C = { 3000.0f, -800.0f, 0.0f }; - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; if (limbIndex == KOUME_LIMB_HEAD) { Matrix_MultVec3f(&gZeroVec3f, &this->unk_35C); @@ -502,7 +500,7 @@ s32 EnTruMt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnTruMt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80B77668 = { 0.0f, 0.0f, -3000.0f }; s32 pad; - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; MtxF* sp54; s32 phi_v0; @@ -556,7 +554,7 @@ void EnTruMt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnTruMt_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; if (limbIndex == KOUME_LIMB_HEAD) { Matrix_Translate(this->unk_33C.x, this->unk_33C.y, this->unk_33C.z, MTXMODE_NEW); @@ -568,7 +566,7 @@ void EnTruMt_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { } void EnTruMt_Draw(Actor* thisx, PlayState* play) { - EnTruMt* this = THIS; + EnTruMt* this = (EnTruMt*)thisx; TexturePtr eyeTextures[] = { gKoumeEyeOpenTex, gKoumeEyeHalfTex, diff --git a/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c b/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c index 487d95cfe7..311ed95270 100644 --- a/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c +++ b/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnTsn*)thisx) - void EnTsn_Init(Actor* thisx, PlayState* play); void EnTsn_Destroy(Actor* thisx, PlayState* play); void EnTsn_Update(Actor* thisx, PlayState* play); @@ -125,7 +123,7 @@ void func_80ADFCEC(EnTsn* this, PlayState* play) { } void EnTsn_Init(Actor* thisx, PlayState* play) { - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; if (ENTSN_GET_100(&this->actor)) { func_80ADFCEC(this, play); @@ -152,7 +150,7 @@ void EnTsn_Init(Actor* thisx, PlayState* play) { } void EnTsn_Destroy(Actor* thisx, PlayState* play) { - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -568,7 +566,7 @@ void func_80AE0D78(EnTsn* this, PlayState* play) { void EnTsn_Update(Actor* thisx, PlayState* play) { s32 pad; - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; this->actionFunc(this, play); @@ -599,13 +597,13 @@ void EnTsn_Update(Actor* thisx, PlayState* play) { } void func_80AE0F84(Actor* thisx, PlayState* play) { - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; this->actionFunc(this, play); } s32 EnTsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; s16 shifted = this->headRot.x >> 1; if (limbIndex == OBJECT_TSN_LIMB_0F) { @@ -621,7 +619,7 @@ s32 EnTsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } void EnTsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; if (limbIndex == OBJECT_TSN_LIMB_0F) { @@ -632,7 +630,7 @@ void EnTsn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnTsn_Draw(Actor* thisx, PlayState* play) { static TexturePtr D_80AE11C8[] = { object_tsn_Tex_0073B8, object_tsn_Tex_0085B8 }; s32 pad; - EnTsn* this = THIS; + EnTsn* this = (EnTsn*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index c219eb96cc..c8ae3b36fe 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnTuboTrap*)thisx) - void EnTuboTrap_Init(Actor* thisx, PlayState* play); void EnTuboTrap_Destroy(Actor* thisx, PlayState* play); void EnTuboTrap_Update(Actor* thisx, PlayState* play); @@ -59,7 +57,7 @@ static InitChainEntry sInitChain[] = { }; void EnTuboTrap_Init(Actor* thisx, PlayState* play) { - EnTuboTrap* this = THIS; + EnTuboTrap* this = (EnTuboTrap*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.shape.rot.z = 0; @@ -71,7 +69,7 @@ void EnTuboTrap_Init(Actor* thisx, PlayState* play) { } void EnTuboTrap_Destroy(Actor* thisx, PlayState* play) { - EnTuboTrap* this = THIS; + EnTuboTrap* this = (EnTuboTrap*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -286,7 +284,7 @@ void EnTuboTrap_FlyAtPlayer(EnTuboTrap* this, PlayState* play) { } void EnTuboTrap_Update(Actor* thisx, PlayState* play) { - EnTuboTrap* this = THIS; + EnTuboTrap* this = (EnTuboTrap*)thisx; s32 padding; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Twig/z_en_twig.c b/src/overlays/actors/ovl_En_Twig/z_en_twig.c index 1d1a97e943..b2c8864c35 100644 --- a/src/overlays/actors/ovl_En_Twig/z_en_twig.c +++ b/src/overlays/actors/ovl_En_Twig/z_en_twig.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnTwig*)thisx) - void EnTwig_Init(Actor* thisx, PlayState* play2); void EnTwig_Destroy(Actor* thisx, PlayState* play2); void EnTwig_Update(Actor* thisx, PlayState* play2); @@ -57,7 +55,7 @@ static InitChainEntry sInitChain[] = { void EnTwig_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTwig* this = THIS; + EnTwig* this = (EnTwig*)thisx; s32 i; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -108,7 +106,7 @@ void EnTwig_Init(Actor* thisx, PlayState* play2) { void EnTwig_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTwig* this = THIS; + EnTwig* this = (EnTwig*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -229,13 +227,13 @@ void func_80AC0D2C(EnTwig* this, PlayState* play) { void EnTwig_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnTwig* this = THIS; + EnTwig* this = (EnTwig*)thisx; this->actionFunc(this, play); } void EnTwig_Draw(Actor* thisx, PlayState* play) { - EnTwig* this = THIS; + EnTwig* this = (EnTwig*)thisx; switch (this->unk_160) { case 1: diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index 6f17b86740..d8559a1711 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000) -#define THIS ((EnViewer*)thisx) - void EnViewer_Init(Actor* thisx, PlayState* play); void EnViewer_Destroy(Actor* thisx, PlayState* play); void EnViewer_Update(Actor* thisx, PlayState* play2); @@ -42,7 +40,7 @@ void EnViewer_SetupAction(EnViewer* this, EnViewerActionFunc actionFunc) { } void EnViewer_Init(Actor* thisx, PlayState* play) { - EnViewer* this = THIS; + EnViewer* this = (EnViewer*)thisx; this->unk_154 = D_8089F3E0; D_8089F3E0++; @@ -153,7 +151,7 @@ void func_8089F2C4(EnViewer* this, PlayState* play) { void EnViewer_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnViewer* this = THIS; + EnViewer* this = (EnViewer*)thisx; if (D_8089F4D0 != play->state.frames) { D_8089F4D0 = play->state.frames; diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index 135c1175b5..1bc3429cf3 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnVm*)thisx) - void EnVm_Init(Actor* thisx, PlayState* play); void EnVm_Destroy(Actor* thisx, PlayState* play); void EnVm_Update(Actor* thisx, PlayState* play); @@ -155,7 +153,7 @@ static InitChainEntry sInitChain[] = { void EnVm_Init(Actor* thisx, PlayState* play) { static s32 sTexturesDesegmented = false; - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; s32 i; s32 params; @@ -186,7 +184,7 @@ void EnVm_Init(Actor* thisx, PlayState* play) { } void EnVm_Destroy(Actor* thisx, PlayState* play) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; Collider_DestroyTris(play, &this->colliderTris); Collider_DestroyJntSph(play, &this->colliderJntSph); @@ -429,7 +427,7 @@ void func_808CCDE4(EnVm* this, PlayState* play) { void EnVm_Update(Actor* thisx, PlayState* play) { s32 pad; - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; func_808CCDE4(this, play); @@ -456,7 +454,7 @@ void EnVm_Update(Actor* thisx, PlayState* play) { } s32 EnVm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; if (limbIndex == BEAMOS_LIMB_HEAD_ROOT) { rot->x += this->unk_216; @@ -469,7 +467,7 @@ s32 EnVm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnVm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { s32 pad; - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; Vec3f sp5C; Vec3f sp50; CollisionPoly* poly; @@ -503,7 +501,7 @@ void EnVm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void EnVm_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 8f8b32717d..32d7eeb57f 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnWallmas*)thisx) - void EnWallmas_Init(Actor* thisx, PlayState* play); void EnWallmas_Destroy(Actor* thisx, PlayState* play); void EnWallmas_Update(Actor* thisx, PlayState* play); @@ -139,7 +137,7 @@ static f32 sYOffsetPerForm[PLAYER_FORM_MAX] = { }; void EnWallmas_Init(Actor* thisx, PlayState* play) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.5f); @@ -184,7 +182,7 @@ void EnWallmas_Init(Actor* thisx, PlayState* play) { } void EnWallmas_Destroy(Actor* thisx, PlayState* play) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; Collider_DestroyCylinder(play, &this->collider); @@ -617,7 +615,7 @@ void EnWallmas_UpdateDamage(EnWallmas* this, PlayState* play) { void EnWallmas_Update(Actor* thisx, PlayState* play) { s32 pad; - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; EnWallmas_UpdateDamage(this, play); this->actionFunc(this, play); @@ -692,7 +690,7 @@ void EnWallmas_DrawShadow(EnWallmas* this, PlayState* play) { } s32 EnWallmas_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; if (limbIndex == WALLMASTER_LIMB_ROOT) { if (this->actionFunc != EnWallmas_TakePlayer) { @@ -738,7 +736,7 @@ static s8 sLimbToBodyParts[WALLMASTER_LIMB_MAX] = { }; void EnWallmas_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; Gfx* gfx; if (sLimbToBodyParts[limbIndex] != BODYPART_NONE) { @@ -771,7 +769,7 @@ void EnWallmas_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* } void EnWallmas_Draw(Actor* thisx, PlayState* play) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; if (this->actionFunc != EnWallmas_WaitToDrop) { Gfx_SetupDL25_Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c b/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c index 9e3fe1ade8..2db9937ea3 100644 --- a/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c +++ b/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnWarpUzu*)thisx) - void EnWarpUzu_Init(Actor* thisx, PlayState* play); void EnWarpUzu_Destroy(Actor* thisx, PlayState* play); void EnWarpUzu_Update(Actor* thisx, PlayState* play); @@ -61,7 +59,7 @@ static InitChainEntry sInitChain[] = { }; void EnWarpUzu_Init(Actor* thisx, PlayState* play) { - EnWarpUzu* this = THIS; + EnWarpUzu* this = (EnWarpUzu*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitAndSetCylinder(play, &this->collider, thisx, &sCylinderInit); @@ -70,7 +68,7 @@ void EnWarpUzu_Init(Actor* thisx, PlayState* play) { } void EnWarpUzu_Destroy(Actor* thisx, PlayState* play) { - EnWarpUzu* this = THIS; + EnWarpUzu* this = (EnWarpUzu*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -115,7 +113,7 @@ void EnWarpUzu_DoNothing(EnWarpUzu* this, PlayState* play) { } void EnWarpUzu_Update(Actor* thisx, PlayState* play) { - EnWarpUzu* this = THIS; + EnWarpUzu* this = (EnWarpUzu*)thisx; s32 pad; this->actor.uncullZoneForward = 1000.0f; diff --git a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c index 6b2528f8c8..7a5e2965d4 100644 --- a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c +++ b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c @@ -11,8 +11,6 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnWarptag*)thisx) - void EnWarptag_Init(Actor* thisx, PlayState* play); void EnWarptag_Destroy(Actor* thisx, PlayState* play); void EnWarptag_Update(Actor* thisx, PlayState* play); @@ -49,7 +47,7 @@ static InitChainEntry sInitChain[] = { }; void EnWarptag_Init(Actor* thisx, PlayState* play) { - EnWarptag* this = THIS; + EnWarptag* this = (EnWarptag*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Actor_SetFocus(&this->dyna.actor, 0.0f); @@ -75,7 +73,7 @@ void EnWarptag_Init(Actor* thisx, PlayState* play) { } void EnWarptag_Destroy(Actor* thisx, PlayState* play) { - EnWarptag* this = THIS; + EnWarptag* this = (EnWarptag*)thisx; if (this->dyna.actor.draw != NULL) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -250,7 +248,7 @@ void EnWarpTag_GrottoReturn(EnWarptag* this, PlayState* play) { } void EnWarptag_Update(Actor* thisx, PlayState* play) { - EnWarptag* this = THIS; + EnWarptag* this = (EnWarptag*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c index 90ad739bfa..34560e7930 100644 --- a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c +++ b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c @@ -19,8 +19,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnWaterEffect*)thisx) - void EnWaterEffect_Init(Actor* thisx, PlayState* play); void EnWaterEffect_Destroy(Actor* thisx, PlayState* play); void EnWaterEffect_Update(Actor* thisx, PlayState* play2); @@ -88,7 +86,7 @@ void func_80A58908(EnWaterEffect* this, Vec3f* arg1, Vec3f* arg2, u8 arg3) { void EnWaterEffect_Init(Actor* thisx, PlayState* play) { s32 pad; - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->unk_DC4 = Rand_ZeroFloat(100.0f); @@ -143,7 +141,7 @@ void EnWaterEffect_Destroy(Actor* thisx, PlayState* play) { void EnWaterEffect_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; Player* player = GET_PLAYER(play); EnWaterEffectStruct* ptr = &this->unk_144[0]; s16 i; @@ -280,7 +278,7 @@ void EnWaterEffect_Update(Actor* thisx, PlayState* play2) { void EnWaterEffect_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; GraphicsContext* gfxCtx = play->state.gfxCtx; - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; s32 pad; EnWaterEffectStruct* backupPtr = &this->unk_144[0]; EnWaterEffectStruct* ptr = backupPtr; @@ -391,7 +389,7 @@ void func_80A599E8(EnWaterEffect* this, Vec3f* arg1, u8 arg2) { void func_80A59C04(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; s16 i; s16 j; f32 temp_f0_2; @@ -516,7 +514,7 @@ void func_80A59C04(Actor* thisx, PlayState* play2) { void func_80A5A184(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; EnWaterEffectStruct* ptr = &this->unk_144[0]; u8 flag = false; @@ -575,7 +573,7 @@ void func_80A5A184(Actor* thisx, PlayState* play2) { } void func_80A5A534(Actor* thisx, PlayState* play) { - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; s32 i; if (this->unk_E38 < 1.0f) { @@ -612,7 +610,7 @@ void func_80A5A534(Actor* thisx, PlayState* play) { void func_80A5A6B8(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnWaterEffect* this = THIS; + EnWaterEffect* this = (EnWaterEffect*)thisx; EnWaterEffectStruct* ptr = &this->unk_144[0]; u8 phi_s4 = false; s16 i; diff --git a/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.c b/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.c index d9e2f318b8..d9084b09f6 100644 --- a/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.c +++ b/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) -#define THIS ((EnWdhand*)thisx) - void EnWdhand_Init(Actor* thisx, PlayState* play); void EnWdhand_Destroy(Actor* thisx, PlayState* play); void EnWdhand_Update(Actor* thisx, PlayState* play); @@ -175,7 +173,7 @@ static DamageTable sDamageTable = { }; void EnWdhand_Init(Actor* thisx, PlayState* play) { - EnWdhand* this = THIS; + EnWdhand* this = (EnWdhand*)thisx; s32 i; Vec3f initVel; @@ -230,7 +228,7 @@ void EnWdhand_Init(Actor* thisx, PlayState* play) { } void EnWdhand_Destroy(Actor* thisx, PlayState* play) { - EnWdhand* this = THIS; + EnWdhand* this = (EnWdhand*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -756,7 +754,7 @@ void EnWdhand_UpdateDamage(EnWdhand* this, PlayState* play) { } void EnWdhand_Update(Actor* thisx, PlayState* play) { - EnWdhand* this = THIS; + EnWdhand* this = (EnWdhand*)thisx; EnWdhand_UpdateDamage(this, play); @@ -783,7 +781,7 @@ void EnWdhand_UpdateColliderLocationsForLimb(EnWdhand* this, s32 limbIndex, Vec3 } void EnWdhand_Draw(Actor* thisx, PlayState* play) { - EnWdhand* this = THIS; + EnWdhand* this = (EnWdhand*)thisx; Vec3f limbPos; Gfx* gfx; s32 limbIndex; diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index c595cb3adf..25d789d67a 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnWeatherTag*)thisx) - void EnWeatherTag_Init(Actor* thisx, PlayState* play); void EnWeatherTag_Destroy(Actor* thisx, PlayState* play); void EnWeatherTag_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ void EnWeatherTag_Destroy(Actor* thisx, PlayState* play) { } void EnWeatherTag_Init(Actor* thisx, PlayState* play) { - EnWeatherTag* this = THIS; + EnWeatherTag* this = (EnWeatherTag*)thisx; s32 pad; Path* path; s32 pathIndex; @@ -487,7 +485,7 @@ void func_80967608(EnWeatherTag* this, PlayState* play) { } void EnWeatherTag_Update(Actor* thisx, PlayState* play) { - EnWeatherTag* this = THIS; + EnWeatherTag* this = (EnWeatherTag*)thisx; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index b09c85f95b..75b0f9a84e 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((EnWf*)thisx) - void EnWf_Init(Actor* thisx, PlayState* play); void EnWf_Destroy(Actor* thisx, PlayState* play); void EnWf_Update(Actor* thisx, PlayState* play); @@ -261,7 +259,7 @@ static InitChainEntry sInitChain[] = { void EnWf_Init(Actor* thisx, PlayState* play) { static s32 sTexturesDesegmented = false; - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; s32 i; s32 temp_s0; @@ -351,7 +349,7 @@ void EnWf_Init(Actor* thisx, PlayState* play) { } void EnWf_Destroy(Actor* thisx, PlayState* play) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; Collider_DestroyJntSph(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -1478,7 +1476,7 @@ void func_8099386C(EnWf* this, PlayState* play) { void EnWf_Update(Actor* thisx, PlayState* play) { s32 pad; - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; if (this->unk_2A2 == 0) { this->unk_2A2 = 96; @@ -1542,7 +1540,7 @@ void EnWf_Update(Actor* thisx, PlayState* play) { } s32 EnWf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; if ((limbIndex == WOLFOS_NORMAL_LIMB_HEAD) || (limbIndex == WOLFOS_NORMAL_LIMB_EYES)) { rot->y -= this->unk_29E; @@ -1576,7 +1574,7 @@ static s8 sLimbToBodyParts[WOLFOS_NORMAL_LIMB_MAX] = { }; void EnWf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; Vec3f sp20; Collider_UpdateSpheres(limbIndex, &this->collider1); @@ -1594,7 +1592,7 @@ void EnWf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnWf_Draw(Actor* thisx, PlayState* play) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; if (this->actionFunc != func_80990F50) { OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c index fa70bf4c92..a272fbb8e7 100644 --- a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c +++ b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c @@ -13,8 +13,6 @@ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_IGNORE_QUAKE | \ ACTOR_FLAG_100000 | ACTOR_FLAG_LOCK_ON_DISABLED | ACTOR_FLAG_MINIMAP_ICON_ENABLED) -#define THIS ((EnWiz*)thisx) - void EnWiz_Init(Actor* thisx, PlayState* play); void EnWiz_Destroy(Actor* thisx, PlayState* play); void EnWiz_Update(Actor* thisx, PlayState* play); @@ -311,7 +309,7 @@ static DamageTable sIceWizrobeDamageTable = { void EnWiz_Init(Actor* thisx, PlayState* play) { s32 pad; - EnWiz* this = THIS; + EnWiz* this = (EnWiz*)thisx; SkelAnime_InitFlex(play, &this->skelAnime, &gWizrobeSkel, &gWizrobeIdleAnim, this->jointTable, this->morphTable, WIZROBE_LIMB_MAX); @@ -363,7 +361,7 @@ void EnWiz_Init(Actor* thisx, PlayState* play) { void EnWiz_Destroy(Actor* thisx, PlayState* play) { s32 pad; - EnWiz* this = THIS; + EnWiz* this = (EnWiz*)thisx; Collider_DestroyCylinder(play, &this->collider); Collider_DestroyJntSph(play, &this->ghostColliders); @@ -1317,7 +1315,7 @@ void EnWiz_UpdateDamage(EnWiz* this, PlayState* play) { void EnWiz_Update(Actor* thisx, PlayState* play) { s32 pad; - EnWiz* this = THIS; + EnWiz* this = (EnWiz*)thisx; s32 i; s32 j; @@ -1370,7 +1368,7 @@ void EnWiz_Update(Actor* thisx, PlayState* play) { void EnWiz_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { Vec3f staffFlamePos = { 0.0f, 0.0f, 0.0f }; - EnWiz* this = THIS; + EnWiz* this = (EnWiz*)thisx; if (limbIndex == WIZROBE_LIMB_STAFF) { staffFlamePos.x = 7300.0f; @@ -1403,7 +1401,7 @@ void EnWiz_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r void EnWiz_PostLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { Vec3f staffFlamePos = { 0.0f, 0.0f, 0.0f }; s32 pad; - EnWiz* this = THIS; + EnWiz* this = (EnWiz*)thisx; if (this->action != EN_WIZ_ACTION_BURST_INTO_FLAMES) { if (limbIndex == WIZROBE_LIMB_STAFF) { @@ -1451,7 +1449,7 @@ void EnWiz_PostLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r void EnWiz_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnWiz* this = THIS; + EnWiz* this = (EnWiz*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c b/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c index 5a09d79d86..00cec5f49c 100644 --- a/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c +++ b/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnWizBrock*)thisx) - void EnWizBrock_Init(Actor* thisx, PlayState* play); void EnWizBrock_Destroy(Actor* thisx, PlayState* play); void EnWizBrock_Update(Actor* thisx, PlayState* play); @@ -34,7 +32,7 @@ ActorProfile En_Wiz_Brock_Profile = { }; void EnWizBrock_Init(Actor* thisx, PlayState* play) { - EnWizBrock* this = THIS; + EnWizBrock* this = (EnWizBrock*)thisx; CollisionHeader* colHeader = NULL; DynaPolyActor_Init(&this->dyna, 0); @@ -51,7 +49,7 @@ void EnWizBrock_Init(Actor* thisx, PlayState* play) { } void EnWizBrock_Destroy(Actor* thisx, PlayState* play) { - EnWizBrock* this = THIS; + EnWizBrock* this = (EnWizBrock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -87,14 +85,14 @@ void EnWizBrock_UpdateStatus(EnWizBrock* this, PlayState* play) { } void EnWizBrock_Update(Actor* thisx, PlayState* play) { - EnWizBrock* this = THIS; + EnWizBrock* this = (EnWizBrock*)thisx; this->actionFunc(this, play); } void EnWizBrock_Draw(Actor* thisx, PlayState* play) { s32 pad; - EnWizBrock* this = THIS; + EnWizBrock* this = (EnWizBrock*)thisx; Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Xlu(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c index 20aa4729de..e1ec9a5ca4 100644 --- a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c +++ b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_LOCK_ON_DISABLED) -#define THIS ((EnWizFire*)thisx) - void EnWizFire_Init(Actor* thisx, PlayState* play); void EnWizFire_Destroy(Actor* thisx, PlayState* play); void EnWizFire_Update(Actor* thisx, PlayState* play2); @@ -71,7 +69,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnWizFire_Init(Actor* thisx, PlayState* play) { - EnWizFire* this = THIS; + EnWizFire* this = (EnWizFire*)thisx; Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->type = EN_WIZ_FIRE_GET_TYPE(&this->actor); @@ -117,7 +115,7 @@ void EnWizFire_Init(Actor* thisx, PlayState* play) { } void EnWizFire_Destroy(Actor* thisx, PlayState* play) { - EnWizFire* this = THIS; + EnWizFire* this = (EnWizFire*)thisx; if (this->type == EN_WIZ_FIRE_TYPE_MAGIC_PROJECTILE) { play->envCtx.adjLightSettings.fogColor[2] = 0; @@ -496,7 +494,7 @@ void EnWizFire_Update(Actor* thisx, PlayState* play2) { { 0, 0, 0 }, { 200, 250, 250 }, { 100, 250, 250 }, { 225, 255, 235 }, // Ice }; PlayState* play = play2; - EnWizFire* this = THIS; + EnWizFire* this = (EnWizFire*)thisx; Player* player = GET_PLAYER(play); s32 j; s16 randomScale; @@ -760,7 +758,7 @@ void EnWizFire_DrawFirePoolAndFlame(EnWizFire* this, PlayState* play2) { void EnWizFire_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnWizFire* this = THIS; + EnWizFire* this = (EnWizFire*)thisx; s32 i; OPEN_DISPS(play->state.gfxCtx); @@ -805,7 +803,7 @@ void EnWizFire_Draw(Actor* thisx, PlayState* play2) { void EnWizFire_DrawSmallFlame(Actor* thisx, PlayState* play) { s32 pad; - EnWizFire* this = THIS; + EnWizFire* this = (EnWizFire*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index c6a8c0db2d..7a5ff72ddb 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnWood02*)thisx) - void EnWood02_Init(Actor* thisx, PlayState* play); void EnWood02_Destroy(Actor* thisx, PlayState* play); void EnWood02_Update(Actor* thisx, PlayState* play2); @@ -171,7 +169,7 @@ void EnWood02_SpawnOffspring(EnWood02* this, PlayState* play) { void EnWood02_Init(Actor* thisx, PlayState* play) { s16 spawnType = 0; f32 actorScale = 1.0f; - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; s32 pad; CollisionPoly* outPoly; s32 bgId; @@ -328,7 +326,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play) { } void EnWood02_Destroy(Actor* thisx, PlayState* play) { - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; if ((this->actor.params < WOOD_BUSH_GREEN_SMALL) || (this->actor.params == WOOD_TREE_SPECIAL)) { Collider_DestroyCylinder(play, &this->collider); @@ -364,7 +362,7 @@ void func_808C4458(EnWood02* this, PlayState* play, Vec3f* arg2, u16 arg3) { void EnWood02_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; f32 wobbleAmplitude; // Despawn extra trees in a group if out of range @@ -468,7 +466,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { } void EnWood02_Draw(Actor* thisx, PlayState* play) { - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; u8 red; u8 green; diff --git a/src/overlays/actors/ovl_En_Yb/z_en_yb.c b/src/overlays/actors/ovl_En_Yb/z_en_yb.c index 930150f2be..7cea63d579 100644 --- a/src/overlays/actors/ovl_En_Yb/z_en_yb.c +++ b/src/overlays/actors/ovl_En_Yb/z_en_yb.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnYb*)thisx) - void EnYb_Init(Actor* thisx, PlayState* play); void EnYb_Destroy(Actor* thisx, PlayState* play); void EnYb_Update(Actor* thisx, PlayState* play); @@ -80,7 +78,7 @@ static Vec3f D_80BFB2F4 = { 500.0f, -500.0f, 0.0f }; static Vec3f D_80BFB300 = { 500.0f, -500.0f, 0.0f }; void EnYb_Init(Actor* thisx, PlayState* play) { - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; s16 csId; s32 i; @@ -130,7 +128,7 @@ void EnYb_Init(Actor* thisx, PlayState* play) { } void EnYb_Destroy(Actor* thisx, PlayState* play) { - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -147,7 +145,7 @@ void func_80BFA2FC(PlayState* play) { */ void EnYb_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play) { Vec3f oldPos; - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; if (this->alpha > 0) { if (this->animIndex == 2) { @@ -406,7 +404,7 @@ void EnYb_WaitForMidnight(EnYb* this, PlayState* play) { void EnYb_Update(Actor* thisx, PlayState* play) { s32 pad; - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_ATTENTION_ENABLED)) { Collider_UpdateCylinder(&this->actor, &this->collider); @@ -434,7 +432,7 @@ void EnYb_Update(Actor* thisx, PlayState* play) { } void EnYb_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; if (limbIndex == YB_LIMB_HEAD) { Matrix_MultVec3f(&D_80BFB2F4, &this->actor.focus.pos); @@ -445,7 +443,7 @@ void EnYb_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnYb_PostLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; if (limbIndex == YB_LIMB_HEAD) { Matrix_MultVec3f(&D_80BFB300, &this->actor.focus.pos); @@ -456,7 +454,7 @@ void EnYb_PostLimbDrawXlu(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro } void EnYb_Draw(Actor* thisx, PlayState* play) { - EnYb* this = THIS; + EnYb* this = (EnYb*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 2b02a9c140..4b47a04527 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnZl1*)thisx) - void EnZl1_Init(Actor* thisx, PlayState* play); void EnZl1_Destroy(Actor* thisx, PlayState* play); void EnZl1_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 49b9da96ec..d243e546d3 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((EnZl4*)thisx) - void EnZl4_Init(Actor* thisx, PlayState* play); void EnZl4_Destroy(Actor* thisx, PlayState* play); void EnZl4_Update(Actor* thisx, PlayState* play); @@ -56,7 +54,7 @@ void EnZl4_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 animInd } void EnZl4_Init(Actor* thisx, PlayState* play) { - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; this->unk_2E0 = 0; this->alpha = 255; @@ -75,7 +73,7 @@ void EnZl4_DoNothing(EnZl4* this, PlayState* play) { } void EnZl4_Update(Actor* thisx, PlayState* play) { - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; SkelAnime_Update(&this->skelAnime); this->alpha += 0; @@ -116,7 +114,7 @@ Gfx* func_809A1E28(GraphicsContext* gfxCtx, u32 alpha) { } void EnZl4_Draw(Actor* thisx, PlayState* play) { - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index a29e2e81ea..73809bd857 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnZo*)thisx) - void EnZo_Init(Actor* thisx, PlayState* play); void EnZo_Destroy(Actor* thisx, PlayState* play); void EnZo_Update(Actor* thisx, PlayState* play); @@ -321,7 +319,7 @@ void EnZo_DoNothing(EnZo* this, PlayState* play) { } void EnZo_Init(Actor* thisx, PlayState* play) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); @@ -340,13 +338,13 @@ void EnZo_Init(Actor* thisx, PlayState* play) { } void EnZo_Destroy(Actor* thisx, PlayState* play) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; Collider_DestroyCylinder(play, &this->collider); } void EnZo_Update(Actor* thisx, PlayState* play) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; this->actionFunc(this, play); Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_4); @@ -357,7 +355,7 @@ void EnZo_Update(Actor* thisx, PlayState* play) { s32 EnZo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; if (limbIndex == ZORA_LIMB_HEAD) { Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -380,7 +378,7 @@ s32 EnZo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } void EnZo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; Vec3f sp30 = { 400.0f, 0.0f, 0.0f }; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; @@ -411,7 +409,7 @@ static Gfx sTransparencyDlist[] = { }; void EnZo_Draw(Actor* thisx, PlayState* play) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; s32 i; u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, SUBS_SHADOW_TEX_SIZE); u8* shadowTexIter; diff --git a/src/overlays/actors/ovl_En_Zob/z_en_zob.c b/src/overlays/actors/ovl_En_Zob/z_en_zob.c index 6e2f97d483..15e926b3ac 100644 --- a/src/overlays/actors/ovl_En_Zob/z_en_zob.c +++ b/src/overlays/actors/ovl_En_Zob/z_en_zob.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnZob*)thisx) - void EnZob_Init(Actor* thisx, PlayState* play); void EnZob_Destroy(Actor* thisx, PlayState* play); void EnZob_Update(Actor* thisx, PlayState* play); @@ -94,7 +92,7 @@ static AnimationHeader* sAnimations[ENZOB_ANIM_MAX] = { }; void EnZob_Init(Actor* thisx, PlayState* play) { - EnZob* this = THIS; + EnZob* this = (EnZob*)thisx; s32 i; s16 csId; @@ -160,7 +158,7 @@ void EnZob_Init(Actor* thisx, PlayState* play) { } void EnZob_Destroy(Actor* thisx, PlayState* play) { - EnZob* this = THIS; + EnZob* this = (EnZob*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -724,7 +722,7 @@ void func_80BA0CF4(EnZob* this, PlayState* play) { void EnZob_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZob* this = THIS; + EnZob* this = (EnZob*)thisx; Actor_MoveWithGravity(&this->actor); @@ -756,7 +754,7 @@ void EnZob_Update(Actor* thisx, PlayState* play) { } s32 EnZob_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnZob* this = THIS; + EnZob* this = (EnZob*)thisx; if (limbIndex == OBJECT_ZOB_LIMB_09) { rot->x += this->headRot.y; @@ -767,7 +765,7 @@ s32 EnZob_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnZob_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80BA1120 = { 300.0f, 900.0f, 0.0f }; - EnZob* this = THIS; + EnZob* this = (EnZob*)thisx; if (limbIndex == OBJECT_ZOB_LIMB_09) { Matrix_MultVec3f(&D_80BA1120, &this->actor.focus.pos); @@ -775,7 +773,7 @@ void EnZob_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnZob_Draw(Actor* thisx, PlayState* play) { - EnZob* this = THIS; + EnZob* this = (EnZob*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zod/z_en_zod.c b/src/overlays/actors/ovl_En_Zod/z_en_zod.c index 40ad05d5b7..d9f8d9eeaf 100644 --- a/src/overlays/actors/ovl_En_Zod/z_en_zod.c +++ b/src/overlays/actors/ovl_En_Zod/z_en_zod.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnZod*)thisx) - void EnZod_Init(Actor* thisx, PlayState* play); void EnZod_Destroy(Actor* thisx, PlayState* play); void EnZod_Update(Actor* thisx, PlayState* play); @@ -88,7 +86,7 @@ static AnimationHeader* sAnimations[ENZOD_ANIM_MAX] = { void EnZod_Init(Actor* thisx, PlayState* play) { s32 i; - EnZod* this = THIS; + EnZod* this = (EnZod*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 60.0f); this->actor.colChkInfo.mass = MASS_IMMOVABLE; @@ -148,7 +146,7 @@ void EnZod_Init(Actor* thisx, PlayState* play) { } void EnZod_Destroy(Actor* thisx, PlayState* play) { - EnZod* this = THIS; + EnZod* this = (EnZod*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -527,7 +525,7 @@ void func_80BAFF14(EnZod* this, PlayState* play) { void EnZod_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZod* this = THIS; + EnZod* this = (EnZod*)thisx; Vec3s torsoRot; Actor_MoveWithGravity(&this->actor); @@ -565,7 +563,7 @@ void EnZod_Update(Actor* thisx, PlayState* play) { } s32 EnZod_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnZod* this = THIS; + EnZod* this = (EnZod*)thisx; if (limbIndex == TIJO_LIMB_HEAD) { rot->x += this->headRot.y; @@ -630,7 +628,7 @@ void EnZod_DrawDrums(EnZod* this, PlayState* play) { void EnZod_Draw(Actor* thisx, PlayState* play) { static TexturePtr sTijoEyesTextures[] = { &gTijoEyesOpenTex, &gTijoEyesHalfOpenTex, &gTijoEyesClosedTex }; - EnZod* this = THIS; + EnZod* this = (EnZod*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zog/z_en_zog.c b/src/overlays/actors/ovl_En_Zog/z_en_zog.c index ef1324e37e..181d1a70e0 100644 --- a/src/overlays/actors/ovl_En_Zog/z_en_zog.c +++ b/src/overlays/actors/ovl_En_Zog/z_en_zog.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnZog*)thisx) - void EnZog_Init(Actor* thisx, PlayState* play); void EnZog_Destroy(Actor* thisx, PlayState* play); void EnZog_Update(Actor* thisx, PlayState* play); @@ -140,7 +138,7 @@ static AnimationHeader* sAnimations[ENZOG_ANIM_MAX] = { void func_80B93310(Actor* thisx, Lights* mapper, PlayState* play) { Vec3f sp34; - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; f32 sp2C; if (this->unk_322 > 0) { @@ -190,7 +188,7 @@ void func_80B93468(EnZog* this, PlayState* play) { void EnZog_Init(Actor* thisx, PlayState* play) { s32 pad; - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; s32 i; s16 csId; @@ -301,7 +299,7 @@ void EnZog_Init(Actor* thisx, PlayState* play) { } void EnZog_Destroy(Actor* thisx, PlayState* play) { - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -984,7 +982,7 @@ void func_80B95240(EnZog* this, PlayState* play) { void EnZog_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 10.0f, UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4); @@ -1031,7 +1029,7 @@ void EnZog_Update(Actor* thisx, PlayState* play) { void EnZog_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80B959B8 = { 0.0f, 0.0f, 0.0f }; - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; D_80B959B8.y = 1000.0f; if (limbIndex == OBJECT_ZOG_LIMB_09) { @@ -1054,7 +1052,7 @@ void EnZog_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r void EnZog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) { static Vec3f D_80B959C4 = { 0.0f, 0.0f, 0.0f }; - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; D_80B959C4.y = 1000.0f; if (limbIndex == OBJECT_ZOG_LIMB_09) { @@ -1072,7 +1070,7 @@ void EnZog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void EnZog_Draw(Actor* thisx, PlayState* play) { - EnZog* this = THIS; + EnZog* this = (EnZog*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c b/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c index 88e399150f..a4c83a0be4 100644 --- a/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c +++ b/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((EnZoraegg*)thisx) - void EnZoraegg_Init(Actor* thisx, PlayState* play); void EnZoraegg_Destroy(Actor* thisx, PlayState* play); void EnZoraegg_Update(Actor* thisx, PlayState* play); @@ -73,7 +71,7 @@ void func_80B31590(EnZoraegg* this) { void EnZoraegg_Init(Actor* thisx, PlayState* play) { s32 pad; - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; u16 cueTypes[] = { CS_CMD_ACTOR_CUE_457, CS_CMD_ACTOR_CUE_458, CS_CMD_ACTOR_CUE_459, CS_CMD_ACTOR_CUE_460, CS_CMD_ACTOR_CUE_461, CS_CMD_ACTOR_CUE_462, CS_CMD_ACTOR_CUE_464, @@ -648,7 +646,7 @@ void func_80B32D08(EnZoraegg* this, PlayState* play) { } void EnZoraegg_Update(Actor* thisx, PlayState* play) { - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; this->actionFunc(this, play); @@ -666,7 +664,7 @@ void func_80B32F04(Actor* thisx, PlayState* play) { f32 sp7C; f32 sp78; f32 sp74; - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; s32 pad[3]; s16 sp62; s16 sp60; @@ -717,7 +715,7 @@ void func_80B32F04(Actor* thisx, PlayState* play) { } void func_80B331C8(Actor* thisx, PlayState* play) { - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -748,7 +746,7 @@ void func_80B331C8(Actor* thisx, PlayState* play) { } s32 EnZoraegg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; switch (this->unk_1EC) { case 1: @@ -781,7 +779,7 @@ void func_80B333DC(PlayState* play, Gfx** dList, f32 arg2) { } void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; f32 temp_f20; f32 temp_f2; @@ -855,7 +853,7 @@ void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* void func_80B33818(Actor* thisx, PlayState* play) { static TexturePtr sZoraBabyEyeTextures[] = { gZoraBabyEyeOpenTex, gZoraBabyEyeHalfTex, gZoraBabyEyeClosedTex }; - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -870,7 +868,7 @@ void func_80B33818(Actor* thisx, PlayState* play) { } void EnZoraegg_Draw(Actor* thisx, PlayState* play) { - EnZoraegg* this = THIS; + EnZoraegg* this = (EnZoraegg*)thisx; if (this->unk_1ED > 0) { func_80B331C8(thisx, play); diff --git a/src/overlays/actors/ovl_En_Zos/z_en_zos.c b/src/overlays/actors/ovl_En_Zos/z_en_zos.c index 05264abd7a..e98fbe73fb 100644 --- a/src/overlays/actors/ovl_En_Zos/z_en_zos.c +++ b/src/overlays/actors/ovl_En_Zos/z_en_zos.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((EnZos*)thisx) - void EnZos_Init(Actor* thisx, PlayState* play); void EnZos_Destroy(Actor* thisx, PlayState* play); void EnZos_Update(Actor* thisx, PlayState* play); @@ -85,7 +83,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnZos_Init(Actor* thisx, PlayState* play) { - EnZos* this = THIS; + EnZos* this = (EnZos*)thisx; Actor_SetScale(&this->actor, 0.0115f); this->actionFunc = func_80BBBDE0; @@ -131,7 +129,7 @@ void EnZos_Init(Actor* thisx, PlayState* play) { } void EnZos_Destroy(Actor* thisx, PlayState* play) { - EnZos* this = THIS; + EnZos* this = (EnZos*)thisx; CLEAR_WEEKEVENTREG(WEEKEVENTREG_52_10); } @@ -696,7 +694,7 @@ void func_80BBC37C(EnZos* this, PlayState* play) { void EnZos_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZos* this = THIS; + EnZos* this = (EnZos*)thisx; Actor_MoveWithGravity(&this->actor); Collider_UpdateCylinder(&this->actor, &this->collider); @@ -733,7 +731,7 @@ void EnZos_Draw(Actor* thisx, PlayState* play) { gEvanEyeHalfTex, gEvanEyeClosedTex, }; - EnZos* this = THIS; + EnZos* this = (EnZos*)thisx; Gfx* gfx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zot/z_en_zot.c b/src/overlays/actors/ovl_En_Zot/z_en_zot.c index 1939e0bb2f..32382cdcab 100644 --- a/src/overlays/actors/ovl_En_Zot/z_en_zot.c +++ b/src/overlays/actors/ovl_En_Zot/z_en_zot.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnZot*)thisx) - void EnZot_Init(Actor* thisx, PlayState* play2); void EnZot_Destroy(Actor* thisx, PlayState* play); void EnZot_Update(Actor* thisx, PlayState* play); @@ -109,7 +107,7 @@ void func_80B965D0(EnZot* this, PlayState* play) { void EnZot_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnZot* this = THIS; + EnZot* this = (EnZot*)thisx; s32 i; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); @@ -256,7 +254,7 @@ void EnZot_Init(Actor* thisx, PlayState* play2) { } void EnZot_Destroy(Actor* thisx, PlayState* play) { - EnZot* this = THIS; + EnZot* this = (EnZot*)thisx; Collider_DestroyCylinder(play, &this->collider); if (ENZOT_GET_1F(&this->actor) == 8) { @@ -1340,7 +1338,7 @@ void func_80B99384(EnZot* this, PlayState* play) { void EnZot_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZot* this = THIS; + EnZot* this = (EnZot*)thisx; Actor_MoveWithGravity(&this->actor); Collider_UpdateCylinder(&this->actor, &this->collider); @@ -1384,7 +1382,7 @@ Gfx* func_80B99580(GraphicsContext* gfxCtx) { } s32 EnZot_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnZot* this = THIS; + EnZot* this = (EnZot*)thisx; s32 pad; if (limbIndex == ZORA_LIMB_HEAD) { @@ -1410,7 +1408,7 @@ s32 EnZot_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnZot_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80B99934 = { 400.0f, 0.0f, 0.0f }; - EnZot* this = THIS; + EnZot* this = (EnZot*)thisx; if (limbIndex == ZORA_LIMB_HEAD) { Matrix_MultVec3f(&D_80B99934, &this->actor.focus.pos); @@ -1423,7 +1421,7 @@ void EnZot_Draw(Actor* thisx, PlayState* play) { gZoraEyeHalfTex, gZoraEyeClosedTex, }; - EnZot* this = THIS; + EnZot* this = (EnZot*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zov/z_en_zov.c b/src/overlays/actors/ovl_En_Zov/z_en_zov.c index 78245658e6..bad7ab6762 100644 --- a/src/overlays/actors/ovl_En_Zov/z_en_zov.c +++ b/src/overlays/actors/ovl_En_Zov/z_en_zov.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((EnZov*)thisx) - void EnZov_Init(Actor* thisx, PlayState* play); void EnZov_Destroy(Actor* thisx, PlayState* play); void EnZov_Update(Actor* thisx, PlayState* play); @@ -96,7 +94,7 @@ static AnimationHeader* sAnimations[LULU_ANIM_MAX] = { }; void EnZov_Init(Actor* thisx, PlayState* play) { - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; ActorShape_Init(&this->picto.actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); this->picto.actor.colChkInfo.mass = MASS_IMMOVABLE; @@ -144,7 +142,7 @@ void EnZov_Init(Actor* thisx, PlayState* play) { } void EnZov_Destroy(Actor* thisx, PlayState* play) { - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -476,7 +474,7 @@ void func_80BD1F1C(EnZov* this, PlayState* play) { s32 EnZov_ValidatePictograph(PlayState* play, Actor* thisx) { s32 ret; - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; ret = Snap_ValidatePictograph(play, &this->picto.actor, PICTO_VALID_LULU_HEAD, &this->picto.actor.focus.pos, &this->picto.actor.shape.rot, 10.0f, 300.0f, -1); @@ -489,7 +487,7 @@ s32 EnZov_ValidatePictograph(PlayState* play, Actor* thisx) { void EnZov_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; Actor_MoveWithGravity(&this->picto.actor); Collider_UpdateCylinder(&this->picto.actor, &this->collider); @@ -537,7 +535,7 @@ void EnZov_Update(Actor* thisx, PlayState* play) { } s32 EnZov_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; if (limbIndex == LULU_LIMB_HEAD) { rot->x += this->headRot.y; @@ -555,7 +553,7 @@ s32 EnZov_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnZov_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { static Vec3f D_80BD2744 = { 400.0f, 600.0f, 0.0f }; static Vec3f D_80BD2750 = { 400.0f, 600.0f, 0.0f }; - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; if (limbIndex == LULU_LIMB_HEAD) { Matrix_MultVec3f(&D_80BD2744, &this->picto.actor.focus.pos); @@ -578,7 +576,7 @@ void EnZov_Draw(Actor* thisx, PlayState* play) { static s8 D_80BD2770[] = { 1, 2, 1, 0, 0, 1, 2, 1, }; - EnZov* this = THIS; + EnZov* this = (EnZov*)thisx; Gfx* gfx; s32 curFrame; s32 phi_a1; diff --git a/src/overlays/actors/ovl_En_Zow/z_en_zow.c b/src/overlays/actors/ovl_En_Zow/z_en_zow.c index 9499c3b609..a53f013c95 100644 --- a/src/overlays/actors/ovl_En_Zow/z_en_zow.c +++ b/src/overlays/actors/ovl_En_Zow/z_en_zow.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) -#define THIS ((EnZow*)thisx) - void EnZow_Init(Actor* thisx, PlayState* play); void EnZow_Destroy(Actor* thisx, PlayState* play); void EnZow_Update(Actor* thisx, PlayState* play); @@ -321,7 +319,7 @@ static AnimationHeader* sAnimations[ENZOT_ANIM_MAX] = { void EnZow_Init(Actor* thisx, PlayState* play) { s32 pad; - EnZow* this = THIS; + EnZow* this = (EnZow*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); Actor_SetScale(&this->actor, 0.01f); @@ -342,7 +340,7 @@ void EnZow_Init(Actor* thisx, PlayState* play) { } void EnZow_Destroy(Actor* thisx, PlayState* play) { - EnZow* this = THIS; + EnZow* this = (EnZow*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -556,7 +554,7 @@ void func_80BDD79C(EnZow* this, PlayState* play) { void EnZow_Update(Actor* thisx, PlayState* play) { s32 pad; - EnZow* this = THIS; + EnZow* this = (EnZow*)thisx; Vec3f sp34; Actor_MoveWithGravity(&this->actor); @@ -630,7 +628,7 @@ void EnZow_Draw(Actor* thisx, PlayState* play) { gZoraEyeHalfTex, gZoraEyeClosedTex, }; - EnZow* this = THIS; + EnZow* this = (EnZow*)thisx; Matrix_Push(); diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index 826adfe9f9..f5d4e55fe1 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ItemBHeart*)thisx) - void ItemBHeart_Init(Actor* thisx, PlayState* play); void ItemBHeart_Destroy(Actor* thisx, PlayState* play); void ItemBHeart_Update(Actor* thisx, PlayState* play); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { }; void ItemBHeart_Init(Actor* thisx, PlayState* play) { - ItemBHeart* this = THIS; + ItemBHeart* this = (ItemBHeart*)thisx; if (Flags_GetCollectible(play, 0x1F)) { Actor_Kill(&this->actor); @@ -61,7 +59,7 @@ void ItemBHeart_Destroy(Actor* thisx, PlayState* play) { * Adjusts size and handles collection (if of proper baseScale) */ void ItemBHeart_Update(Actor* thisx, PlayState* play) { - ItemBHeart* this = THIS; + ItemBHeart* this = (ItemBHeart*)thisx; ItemBHeart_UpdateModel(this, play); @@ -88,7 +86,7 @@ void ItemBHeart_UpdateModel(ItemBHeart* this, PlayState* play) { * Draw translucently when in front of a boss warp portal */ void ItemBHeart_Draw(Actor* thisx, PlayState* play) { - ItemBHeart* this = THIS; + ItemBHeart* this = (ItemBHeart*)thisx; Actor* actorIt; u8 drawTranslucent = false; diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index a9a38661ac..4bcf0efc77 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ItemEtcetera*)thisx) - void ItemEtcetera_Init(Actor* thisx, PlayState* play); void ItemEtcetera_Destroy(Actor* thisx, PlayState* play); void ItemEtcetera_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ void ItemEtcetera_SetupAction(ItemEtcetera* this, ItemEtceteraActionFunc actionF void ItemEtcetera_Init(Actor* thisx, PlayState* play) { s32 pad; - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; s32 type = ITEMETCETERA_GET_FF(&this->actor); s32 objectSlot = Object_GetSlot(&play->objectCtx, sObjectIds[type]); @@ -119,13 +117,13 @@ void func_809200F8(ItemEtcetera* this, PlayState* play) { } void ItemEtcetera_Update(Actor* thisx, PlayState* play) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; this->actionFunc(this, play); } void ItemEtcetera_DrawThroughLens(Actor* thisx, PlayState* play) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) { func_800B8050(&this->actor, play, 0); @@ -135,7 +133,7 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, PlayState* play) { } void ItemEtcetera_Draw(Actor* thisx, PlayState* play) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; func_800B8050(&this->actor, play, 0); func_800B8118(&this->actor, play, 0); diff --git a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c index 08573259e2..4f412a814e 100644 --- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c +++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((ItemInbox*)thisx) - void ItemInbox_Init(Actor* thisx, PlayState* play); void ItemInbox_Destroy(Actor* thisx, PlayState* play); void ItemInbox_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Item_Inbox_Profile = { }; void ItemInbox_Init(Actor* thisx, PlayState* play) { - ItemInbox* this = THIS; + ItemInbox* this = (ItemInbox*)thisx; this->actionFunc = ItemInbox_Idle; Actor_SetScale(&this->actor, 0.2f); @@ -46,13 +44,13 @@ void ItemInbox_Idle(ItemInbox* this, PlayState* play) { } void ItemInbox_Update(Actor* thisx, PlayState* play) { - ItemInbox* this = THIS; + ItemInbox* this = (ItemInbox*)thisx; this->actionFunc(this, play); } void ItemInbox_Draw(Actor* thisx, PlayState* play) { - ItemInbox* this = THIS; + ItemInbox* this = (ItemInbox*)thisx; func_800B8050(&this->actor, play, 0); func_800B8118(&this->actor, play, 0); diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index ca6199d6e4..c81fdb823e 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((MirRay*)thisx) - void MirRay_Init(Actor* thisx, PlayState* play); void MirRay_Destroy(Actor* thisx, PlayState* play); void MirRay_Update(Actor* thisx, PlayState* play); @@ -289,7 +287,7 @@ void MirRay_MakeShieldLight(MirRay* this, PlayState* play) { void MirRay_Init(Actor* thisx, PlayState* play) { s32 pad; - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; MirRayDataEntry* dataEntry = &sMirRayData[MIRRAY_LOCATION(&this->actor)]; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -350,7 +348,7 @@ void MirRay_Init(Actor* thisx, PlayState* play) { } void MirRay_Destroy(Actor* thisx, PlayState* play) { - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); @@ -363,7 +361,7 @@ void MirRay_Destroy(Actor* thisx, PlayState* play) { void MirRay_Update(Actor* thisx, PlayState* play) { s32 pad; - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; Player* player = GET_PLAYER(play); D_808E3BF0 = false; @@ -592,7 +590,7 @@ void MirRay_ReflectedBeam(MirRay* this, PlayState* play, MirRayShieldReflection* void MirRay_Draw(Actor* thisx, PlayState* play) { s32 pad; - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; Player* player = GET_PLAYER(play); MirRayShieldReflection reflection[6]; s32 i; diff --git a/src/overlays/actors/ovl_Mir_Ray2/z_mir_ray2.c b/src/overlays/actors/ovl_Mir_Ray2/z_mir_ray2.c index bf622ab4af..ff66a41436 100644 --- a/src/overlays/actors/ovl_Mir_Ray2/z_mir_ray2.c +++ b/src/overlays/actors/ovl_Mir_Ray2/z_mir_ray2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((MirRay2*)thisx) - void MirRay2_Init(Actor* thisx, PlayState* play); void MirRay2_Destroy(Actor* thisx, PlayState* play); void MirRay2_Update(Actor* thisx, PlayState* play); @@ -73,7 +71,7 @@ void func_80AF3FE0(MirRay2* this, PlayState* play) { void MirRay2_Init(Actor* thisx, PlayState* play) { s32 pad; - MirRay2* this = THIS; + MirRay2* this = (MirRay2*)thisx; if (this->actor.home.rot.x <= 0) { this->range = 100.0f; @@ -99,14 +97,14 @@ void MirRay2_Init(Actor* thisx, PlayState* play) { } void MirRay2_Destroy(Actor* thisx, PlayState* play) { - MirRay2* this = THIS; + MirRay2* this = (MirRay2*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->light); Collider_DestroyJntSph(play, &this->collider); } void MirRay2_Update(Actor* thisx, PlayState* play) { - MirRay2* this = THIS; + MirRay2* this = (MirRay2*)thisx; if (this->unk1A4 & 1) { if (Flags_GetSwitch(play, MIRRAY2_GET_SWITCH_FLAG(thisx))) { diff --git a/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c b/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c index 83fc8ec2fe..1d45507279 100644 --- a/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c +++ b/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((MirRay3*)thisx) - void MirRay3_Init(Actor* thisx, PlayState* play); void MirRay3_Destroy(Actor* thisx, PlayState* play); void MirRay3_Update(Actor* thisx, PlayState* play); @@ -77,7 +75,7 @@ typedef struct { void MirRay3_Init(Actor* thisx, PlayState* play) { s32 pad; - MirRay3* this = THIS; + MirRay3* this = (MirRay3*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); Actor_SetScale(&this->actor, 1.0f); @@ -108,7 +106,7 @@ void MirRay3_Init(Actor* thisx, PlayState* play) { } void MirRay3_Destroy(Actor* thisx, PlayState* play) { - MirRay3* this = THIS; + MirRay3* this = (MirRay3*)thisx; Collider_DestroyQuad(play, &this->colliderQuad); Collider_DestroyCylinder(play, &this->colliderCylinder); @@ -116,7 +114,7 @@ void MirRay3_Destroy(Actor* thisx, PlayState* play) { void MirRay3_Update(Actor* thisx, PlayState* play) { s32 pad[2]; - MirRay3* this = THIS; + MirRay3* this = (MirRay3*)thisx; Player* player = GET_PLAYER(play); this->unk_210 &= ~1; @@ -344,7 +342,7 @@ void func_80B9E8D4(MirRay3* this, PlayState* play, MirRay3Struct* ptr) { void MirRay3_Draw(Actor* thisx, PlayState* play) { s32 pad[2]; - MirRay3* this = THIS; + MirRay3* this = (MirRay3*)thisx; MirRay3Struct sp8C[6]; Player* player = GET_PLAYER(play); s32 i; diff --git a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c index bcc4f1dd61..6368eaeb04 100644 --- a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c +++ b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjAqua*)thisx) - void ObjAqua_Init(Actor* thisx, PlayState* play); void ObjAqua_Destroy(Actor* thisx, PlayState* play); void ObjAqua_Update(Actor* thisx, PlayState* play); @@ -141,7 +139,7 @@ s32 ObjAqua_IsUnderwater(ObjAqua* this, PlayState* play) { } void ObjAqua_Init(Actor* thisx, PlayState* play) { - ObjAqua* this = THIS; + ObjAqua* this = (ObjAqua*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -168,7 +166,7 @@ void ObjAqua_Init(Actor* thisx, PlayState* play) { } void ObjAqua_Destroy(Actor* thisx, PlayState* play) { - ObjAqua* this = THIS; + ObjAqua* this = (ObjAqua*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -240,7 +238,7 @@ void func_80ACBDFC(ObjAqua* this, PlayState* play) { } void ObjAqua_Update(Actor* thisx, PlayState* play) { - ObjAqua* this = THIS; + ObjAqua* this = (ObjAqua*)thisx; s32 pad; if (this->counter > 0) { @@ -267,7 +265,7 @@ void ObjAqua_Update(Actor* thisx, PlayState* play) { } void ObjAqua_Draw(Actor* thisx, PlayState* play) { - ObjAqua* this = THIS; + ObjAqua* this = (ObjAqua*)thisx; s32 framesTemp; s32 pad; s16 yaw = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000; diff --git a/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c b/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c index 6e8b77dde5..b7632e6cec 100644 --- a/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c +++ b/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CAN_PRESS_SWITCHES) -#define THIS ((ObjArmos*)thisx) - void ObjArmos_Init(Actor* thisx, PlayState* play); void ObjArmos_Destroy(Actor* thisx, PlayState* play); void ObjArmos_Update(Actor* thisx, PlayState* play2); @@ -178,7 +176,7 @@ void func_809A518C(ObjArmos* this, s32 arg1) { void ObjArmos_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjArmos* this = THIS; + ObjArmos* this = (ObjArmos*)thisx; s32 sp44 = OBJARMOS_GET_ROTZ_7(&this->dyna.actor); s32 sp40 = OBJARMOS_GET_ROTX_F(&this->dyna.actor); f32 endFrame = Animation_GetLastFrame(&gArmosPushedBackAnim); @@ -220,7 +218,7 @@ void ObjArmos_Init(Actor* thisx, PlayState* play) { } void ObjArmos_Destroy(Actor* thisx, PlayState* play) { - ObjArmos* this = THIS; + ObjArmos* this = (ObjArmos*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -316,7 +314,7 @@ void func_809A57F4(ObjArmos* this, PlayState* play) { void ObjArmos_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjArmos* this = THIS; + ObjArmos* this = (ObjArmos*)thisx; s32 bgId; this->actionFunc(this, play); @@ -385,7 +383,7 @@ void func_809A5A3C(ObjArmos* this, PlayState* play) { } void ObjArmos_Draw(Actor* thisx, PlayState* play) { - ObjArmos* this = THIS; + ObjArmos* this = (ObjArmos*)thisx; func_809A5960(this, play); func_809A5A3C(this, play); diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 209f04910b..25d0b719ab 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_IGNORE_LEGACY_POINT_LIGHTS) -#define THIS ((ObjBean*)thisx) - void ObjBean_Init(Actor* thisx, PlayState* play); void ObjBean_Destroy(Actor* thisx, PlayState* play); void ObjBean_Update(Actor* thisx, PlayState* play); @@ -359,7 +357,7 @@ static InitChainEntry sInitChain[] = { void ObjBean_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; s32 sp2C = OBJBEAN_GET_C000(&this->dyna.actor); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -423,7 +421,7 @@ void ObjBean_Init(Actor* thisx, PlayState* play) { } void ObjBean_Destroy(Actor* thisx, PlayState* play) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -882,7 +880,7 @@ void func_80938AD8(ObjBean* this, PlayState* play) { } void func_80938C1C(Actor* thisx, PlayState* play) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; if (this->unk_1B2 > 0) { this->unk_1B2--; @@ -900,7 +898,7 @@ void func_80938C1C(Actor* thisx, PlayState* play) { void ObjBean_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; if (this->unk_1B2 > 0) { this->unk_1B2--; @@ -937,7 +935,7 @@ void ObjBean_Update(Actor* thisx, PlayState* play) { } void func_80938E00(Actor* thisx, PlayState* play) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -966,7 +964,7 @@ void func_80938E00(Actor* thisx, PlayState* play) { } void func_80938F50(Actor* thisx, PlayState* play) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; Gfx_DrawDListXlu(play, object_mamenoki_DL_002208); } diff --git a/src/overlays/actors/ovl_Obj_Bell/z_obj_bell.c b/src/overlays/actors/ovl_Obj_Bell/z_obj_bell.c index 4e8dded2d8..a0fd5e548f 100644 --- a/src/overlays/actors/ovl_Obj_Bell/z_obj_bell.c +++ b/src/overlays/actors/ovl_Obj_Bell/z_obj_bell.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjBell*)thisx) - void ObjBell_Init(Actor* thisx, PlayState* play); void ObjBell_Destroy(Actor* thisx, PlayState* play); void ObjBell_Update(Actor* thisx, PlayState* play); @@ -265,7 +263,7 @@ void func_80A35BD4(Actor* thisx, PlayState* play) { } void ObjBell_Init(Actor* thisx, PlayState* play) { - ObjBell* this = THIS; + ObjBell* this = (ObjBell*)thisx; DynaPolyActor_Init(&this->dyna, 0); DynaPolyActor_LoadMesh(play, &this->dyna, &object_f52_obj_Colheader_001BA8); @@ -276,7 +274,7 @@ void ObjBell_Init(Actor* thisx, PlayState* play) { } void ObjBell_Destroy(Actor* thisx, PlayState* play) { - ObjBell* this = THIS; + ObjBell* this = (ObjBell*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroySphere(play, &this->collider1); @@ -284,7 +282,7 @@ void ObjBell_Destroy(Actor* thisx, PlayState* play) { } void ObjBell_Update(Actor* thisx, PlayState* play) { - ObjBell* this = THIS; + ObjBell* this = (ObjBell*)thisx; if (this->unk_214 != 0) { this->unk_214--; @@ -295,7 +293,7 @@ void ObjBell_Update(Actor* thisx, PlayState* play) { } void ObjBell_Draw(Actor* thisx, PlayState* play) { - ObjBell* this = THIS; + ObjBell* this = (ObjBell*)thisx; Vec3f sp30; Vec3f sp24; diff --git a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c index eb2cdd7fe5..3e78983608 100644 --- a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c +++ b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjBigicicle*)thisx) - void ObjBigicicle_Init(Actor* thisx, PlayState* play); void ObjBigicicle_Destroy(Actor* thisx, PlayState* play); void ObjBigicicle_Update(Actor* thisx, PlayState* play); @@ -99,7 +97,7 @@ Gfx* D_80AE98A8[] = { }; void ObjBigicicle_Init(Actor* thisx, PlayState* play) { - ObjBigicicle* this = THIS; + ObjBigicicle* this = (ObjBigicicle*)thisx; f32 sp30; s32 sp28; @@ -146,7 +144,7 @@ void ObjBigicicle_Init(Actor* thisx, PlayState* play) { } void ObjBigicicle_Destroy(Actor* thisx, PlayState* play) { - ObjBigicicle* this = THIS; + ObjBigicicle* this = (ObjBigicicle*)thisx; Collider_DestroyCylinder(play, &this->collider1); Collider_DestroyCylinder(play, &this->collider2); @@ -290,7 +288,7 @@ void func_80AE939C(ObjBigicicle* this, PlayState* play) { void ObjBigicicle_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjBigicicle* this = THIS; + ObjBigicicle* this = (ObjBigicicle*)thisx; Vec3f sp44; this->actionFunc(this, play); @@ -313,7 +311,7 @@ void ObjBigicicle_Update(Actor* thisx, PlayState* play) { } void ObjBigicicle_Draw(Actor* thisx, PlayState* play) { - ObjBigicicle* this = THIS; + ObjBigicicle* this = (ObjBigicicle*)thisx; Gfx_DrawDListXlu(play, D_80AE989C[this->unk_149]); Gfx_DrawDListXlu(play, D_80AE98A8[this->unk_149]); diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c index 77f1de316f..05ee629209 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjBlockstop*)thisx) - void ObjBlockstop_Init(Actor* thisx, PlayState* play); void ObjBlockstop_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Obj_Blockstop_Profile = { }; void ObjBlockstop_Init(Actor* thisx, PlayState* play) { - ObjBlockstop* this = THIS; + ObjBlockstop* this = (ObjBlockstop*)thisx; if (Flags_GetSwitch(play, OBJBLOCKSTOP_GET_SWITCH_FLAG(&this->actor))) { Actor_Kill(&this->actor); @@ -69,7 +67,7 @@ void ObjBlockstop_TryPlayCutscene(ObjBlockstop* this, PlayState* play) { } void ObjBlockstop_Update(Actor* thisx, PlayState* play) { - ObjBlockstop* this = THIS; + ObjBlockstop* this = (ObjBlockstop*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c index 19f0f9c8cd..9ea6f1161d 100644 --- a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c +++ b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjBoat*)thisx) - void ObjBoat_Init(Actor* thisx, PlayState* play); void ObjBoat_Destroy(Actor* thisx, PlayState* play); void ObjBoat_Update(Actor* thisx, PlayState* play); @@ -57,7 +55,7 @@ s16 ObjBoat_GetNextPoint(ObjBoat* this, Vec3f* nextPoint) { void ObjBoat_Init(Actor* thisx, PlayState* play) { s32 pad[2]; Path* path; - ObjBoat* this = THIS; + ObjBoat* this = (ObjBoat*)thisx; Vec3f sp24; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -79,7 +77,7 @@ void ObjBoat_Init(Actor* thisx, PlayState* play) { } void ObjBoat_Destroy(Actor* thisx, PlayState* play) { - ObjBoat* this = THIS; + ObjBoat* this = (ObjBoat*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -93,7 +91,7 @@ void ObjBoat_SetRotations(ObjBoat* this) { void ObjBoat_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjBoat* this = THIS; + ObjBoat* this = (ObjBoat*)thisx; Player* player = GET_PLAYER(play); s32 isPlayerOnTop = DynaPolyActor_IsPlayerOnTop(&this->dyna); f32 speedTarget = 0.0f; @@ -149,7 +147,7 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) { // Update used in cutscenes void ObjBoat_UpdateCutscene(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjBoat* this = THIS; + ObjBoat* this = (ObjBoat*)thisx; if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_511)) { CsCmdActorCue* cue = play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_511)]; @@ -201,7 +199,7 @@ void ObjBoat_UpdateCutscene(Actor* thisx, PlayState* play2) { } void ObjBoat_Draw(Actor* thisx, PlayState* play) { - ObjBoat* this = THIS; + ObjBoat* this = (ObjBoat*)thisx; Gfx_DrawDListOpa(play, object_kaizoku_obj_DL_007630); } diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index e18808edfd..177dbf45f1 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjBombiwa*)thisx) - void ObjBombiwa_Init(Actor* thisx, PlayState* play); void ObjBombiwa_Destroy(Actor* thisx, PlayState* play2); void ObjBombiwa_Update(Actor* thisx, PlayState* play); @@ -106,7 +104,7 @@ static s16 D_8093A9E0[] = { }; s32 func_809393B0(Actor* thisx) { - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; if (this->collider.base.acFlags & AC_HIT) { Actor* ac = this->collider.base.ac; @@ -127,7 +125,7 @@ s32 func_809393B0(Actor* thisx) { } s32 func_80939470(Actor* thisx) { - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; if (this->collider.base.acFlags & AC_HIT) { Actor* temp_v0 = this->collider.base.ac; @@ -175,7 +173,7 @@ void func_80939594(ObjBombiwa* this, PlayState* play) { void ObjBombiwa_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; s32 sp34 = OBJBOMBIWA_GET_100(&this->actor); s32 pad2; @@ -208,7 +206,7 @@ void ObjBombiwa_Init(Actor* thisx, PlayState* play) { void ObjBombiwa_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -444,13 +442,13 @@ void func_8093A1F0(ObjBombiwa* this, PlayState* play) { } void ObjBombiwa_Update(Actor* thisx, PlayState* play) { - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; this->actionFunc(this, play); } void func_8093A418(Actor* thisx, PlayState* play) { - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; f32 sp28; if ((this->actor.projectedPos.z <= 2200.0f) || ((this->unk_203 & 1) && (this->actor.projectedPos.z < 2300.0f))) { @@ -479,7 +477,7 @@ void func_8093A418(Actor* thisx, PlayState* play) { void func_8093A608(Actor* thisx, PlayState* play) { s32 pad[8]; - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; f32 sp38; s32 i; ObjBombiwaStruct* ptr; diff --git a/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.c b/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.c index 1438d0e6ae..95231a6108 100644 --- a/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.c +++ b/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.c @@ -5,8 +5,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjBoyo*)thisx) - void ObjBoyo_Init(Actor* thisx, PlayState* play); void ObjBoyo_Destroy(Actor* thisx, PlayState* play2); void ObjBoyo_Update(Actor* thisx, PlayState* play2); @@ -75,7 +73,7 @@ static ObjBoyoUnkStruct sCollisionHandlers[] = { }; void ObjBoyo_Init(Actor* thisx, PlayState* play) { - ObjBoyo* this = THIS; + ObjBoyo* this = (ObjBoyo*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitCylinder(play, &this->collider); @@ -87,7 +85,7 @@ void ObjBoyo_Init(Actor* thisx, PlayState* play) { void ObjBoyo_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjBoyo* this = THIS; + ObjBoyo* this = (ObjBoyo*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -140,7 +138,7 @@ Actor* ObjBoyo_FindCollidedActor(ObjBoyo* this, PlayState* play, s32* index) { void ObjBoyo_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjBoyo* this = THIS; + ObjBoyo* this = (ObjBoyo*)thisx; Actor* collidedActor; s32 index; @@ -202,7 +200,7 @@ void ObjBoyo_Update(Actor* thisx, PlayState* play2) { } void ObjBoyo_Draw(Actor* thisx, PlayState* play) { - ObjBoyo* this = THIS; + ObjBoyo* this = (ObjBoyo*)thisx; AnimatedMat_Draw(play, this->animatedMaterial); Gfx_DrawDListOpa(play, object_boyo_DL_000300); diff --git a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c index e8b54e6c87..c44d881655 100644 --- a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c +++ b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c @@ -16,8 +16,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjChan*)thisx) - #define OBJCHAN_ROTATION_SPEED 364 // == (65536 * 2/360) i.e. 2 degrees per second void ObjChan_Init(Actor* thisx, PlayState* play); @@ -79,7 +77,7 @@ static s32 sObjChanLoaded; void ObjChan_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjChan* this = THIS; + ObjChan* this = (ObjChan*)thisx; if (OBJCHAN_SUBTYPE(&this->actor) == OBJCHAN_SUBTYPE_CHANDELIER) { if (sObjChanLoaded) { @@ -111,7 +109,7 @@ void ObjChan_Init(Actor* thisx, PlayState* play) { } void ObjChan_Destroy(Actor* thisx, PlayState* play) { - ObjChan* this = THIS; + ObjChan* this = (ObjChan*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -365,7 +363,7 @@ void ObjChan_CreateSmashEffects(ObjChan* this, PlayState* play) { } void ObjChan_Update(Actor* thisx, PlayState* play) { - ObjChan* this = THIS; + ObjChan* this = (ObjChan*)thisx; this->actionFunc(this, play); CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); @@ -373,7 +371,7 @@ void ObjChan_Update(Actor* thisx, PlayState* play) { void ObjChan_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjChan* this = THIS; + ObjChan* this = (ObjChan*)thisx; Gfx* gfxOpa; Gfx* gfxXlu; @@ -401,7 +399,7 @@ void ObjChan_Draw(Actor* thisx, PlayState* play) { } void ObjChan_DrawPot(Actor* thisx, PlayState* play) { - ObjChan* this = THIS; + ObjChan* this = (ObjChan*)thisx; s32 pad; Gfx* gfx; diff --git a/src/overlays/actors/ovl_Obj_Chikuwa/z_obj_chikuwa.c b/src/overlays/actors/ovl_Obj_Chikuwa/z_obj_chikuwa.c index efe00fbd19..65ea4ab0ed 100644 --- a/src/overlays/actors/ovl_Obj_Chikuwa/z_obj_chikuwa.c +++ b/src/overlays/actors/ovl_Obj_Chikuwa/z_obj_chikuwa.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjChikuwa*)thisx) - void ObjChikuwa_Init(Actor* thisx, PlayState* play); void ObjChikuwa_Destroy(Actor* thisx, PlayState* play); void ObjChikuwa_Update(Actor* thisx, PlayState* play); @@ -40,7 +38,7 @@ Vec3f D_809B1FD0 = { 0.0f, -0.3f, 0.0f }; Vec3f D_809B1FDC = { 0.0f, 0.7f, 0.0f }; void func_809B1550(Actor* thisx, PlayState* play) { - ObjChikuwa* this = THIS; + ObjChikuwa* this = (ObjChikuwa*)thisx; f32 sp18; if (this->unk_2A0 < this->unk_29C) { @@ -54,7 +52,7 @@ void func_809B1550(Actor* thisx, PlayState* play) { } void ObjChikuwa_Init(Actor* thisx, PlayState* play) { - ObjChikuwa* this = THIS; + ObjChikuwa* this = (ObjChikuwa*)thisx; s32 i; s32 val; ObjChikuwaStruct* temp; @@ -88,7 +86,7 @@ void ObjChikuwa_Init(Actor* thisx, PlayState* play) { } void ObjChikuwa_Destroy(Actor* thisx, PlayState* play) { - ObjChikuwa* this = THIS; + ObjChikuwa* this = (ObjChikuwa*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -156,7 +154,7 @@ void func_809B1AA0(ObjChikuwa* this) { } void ObjChikuwa_Update(Actor* thisx, PlayState* play) { - ObjChikuwa* this = THIS; + ObjChikuwa* this = (ObjChikuwa*)thisx; ObjChikuwaStruct* temp; f32 temp_fs0; s16 quakeVerticalMag; @@ -192,7 +190,7 @@ void ObjChikuwa_Update(Actor* thisx, PlayState* play) { } void ObjChikuwa_Draw(Actor* thisx, PlayState* play) { - ObjChikuwa* this = THIS; + ObjChikuwa* this = (ObjChikuwa*)thisx; ObjChikuwaStruct* temp; ObjChikuwaStruct2* temp2; s32 i; diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 8085d9f26b..da98fd1b1a 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjComb*)thisx) - void ObjComb_Init(Actor* thisx, PlayState* play); void ObjComb_Destroy(Actor* thisx, PlayState* play2); void ObjComb_Update(Actor* thisx, PlayState* play); @@ -328,7 +326,7 @@ void func_8098DA74(ObjComb* this, PlayState* play) { void ObjComb_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; s32 sp2C = OBJCOMB_GET_8000(&this->actor) | OBJCOMB_GET_80(&this->actor); Actor_ProcessInitChain(&this->actor, sInitChain); @@ -354,7 +352,7 @@ void ObjComb_Init(Actor* thisx, PlayState* play) { void ObjComb_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -501,7 +499,7 @@ void func_8098E0B8(ObjComb* this, PlayState* play) { } void ObjComb_Update(Actor* thisx, PlayState* play) { - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; this->unk_1B3 = (this->collider.base.acFlags & AC_HIT) != 0; if (this->unk_1B3) { @@ -552,7 +550,7 @@ void ObjComb_Update(Actor* thisx, PlayState* play) { } void ObjComb_Draw(Actor* thisx, PlayState* play) { - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c b/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c index e4f0fe9ed4..da183b4dfb 100644 --- a/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c +++ b/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjDanpeilift*)thisx) - void ObjDanpeilift_Init(Actor* thisx, PlayState* play); void ObjDanpeilift_Destroy(Actor* thisx, PlayState* play); void ObjDanpeilift_Update(Actor* thisx, PlayState* play); @@ -47,7 +45,7 @@ void ObjDanpeilift_UpdatePosition(ObjDanpeilift* this, s32 index) { void ObjDanpeilift_Init(Actor* thisx, PlayState* play) { Path* path; ObjDanpeiliftActionFunc tempActionFunc; - ObjDanpeilift* this = THIS; + ObjDanpeilift* this = (ObjDanpeilift*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->dyna.actor.shape.rot.x = 0; @@ -79,7 +77,7 @@ void ObjDanpeilift_Init(Actor* thisx, PlayState* play) { } void ObjDanpeilift_Destroy(Actor* thisx, PlayState* play) { - ObjDanpeilift* this = THIS; + ObjDanpeilift* this = (ObjDanpeilift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -160,7 +158,7 @@ void ObjDanpeilift_Wait(ObjDanpeilift* this, PlayState* play) { void ObjDanpeilift_Update(Actor* thisx, PlayState* play) { f32 step; - ObjDanpeilift* this = THIS; + ObjDanpeilift* this = (ObjDanpeilift*)thisx; this->actionFunc(this, play); Actor_SetFocus(&this->dyna.actor, 10.0f); diff --git a/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c b/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c index dc7acb98d2..2d8aa17d87 100644 --- a/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c +++ b/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjDemo*)thisx) - void ObjDemo_Init(Actor* thisx, PlayState* play); void ObjDemo_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Obj_Demo_Profile = { }; void ObjDemo_Init(Actor* thisx, PlayState* play) { - ObjDemo* this = THIS; + ObjDemo* this = (ObjDemo*)thisx; thisx->params = OBJDEMO_GET_SWITCH_FLAG_MASK(thisx); if ((OBJDEMO_GET_SWITCH_FLAG(thisx) != 0xFF) && Flags_GetSwitch(play, OBJDEMO_GET_SWITCH_FLAG(thisx))) { @@ -106,7 +104,7 @@ void func_80983704(ObjDemo* this, PlayState* play) { } void ObjDemo_Update(Actor* thisx, PlayState* play) { - ObjDemo* this = THIS; + ObjDemo* this = (ObjDemo*)thisx; if ((OBJDEMO_GET_SWITCH_FLAG(&this->actor) != 0xFF) && Flags_GetSwitch(play, OBJDEMO_GET_SWITCH_FLAG(&this->actor))) { diff --git a/src/overlays/actors/ovl_Obj_Dhouse/z_obj_dhouse.c b/src/overlays/actors/ovl_Obj_Dhouse/z_obj_dhouse.c index b90d5e98b9..6f6032fef9 100644 --- a/src/overlays/actors/ovl_Obj_Dhouse/z_obj_dhouse.c +++ b/src/overlays/actors/ovl_Obj_Dhouse/z_obj_dhouse.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_LEGACY_POINT_LIGHTS) -#define THIS ((ObjDhouse*)thisx) - void ObjDhouse_Init(Actor* thisx, PlayState* play); void ObjDhouse_Destroy(Actor* thisx, PlayState* play); void ObjDhouse_Update(Actor* thisx, PlayState* play); @@ -125,7 +123,7 @@ static InitChainEntry sInitChain[] = { Vec3f D_80B13FC4 = { 160.0f, 0.0f, 240.0f }; void ObjDhouse_Init(Actor* thisx, PlayState* play) { - ObjDhouse* this = THIS; + ObjDhouse* this = (ObjDhouse*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -142,7 +140,7 @@ void ObjDhouse_Init(Actor* thisx, PlayState* play) { } void ObjDhouse_Destroy(Actor* thisx, PlayState* play) { - ObjDhouse* this = THIS; + ObjDhouse* this = (ObjDhouse*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -154,7 +152,7 @@ void func_80B12A50(ObjDhouseStruct1* this, ObjDhouseStruct3* ptr3, Vec3f* arg2) } void func_80B12A88(Actor* thisx) { - ObjDhouse* this = THIS; + ObjDhouse* this = (ObjDhouse*)thisx; s32 i; ObjDhouseStruct1* ptr; ObjDhouseStruct3* ptr3; @@ -487,7 +485,7 @@ void func_80B139F4(ObjDhouse* this, PlayState* play) { } void ObjDhouse_Update(Actor* thisx, PlayState* play) { - ObjDhouse* this = THIS; + ObjDhouse* this = (ObjDhouse*)thisx; this->actionFunc(this, play); } @@ -497,7 +495,7 @@ void ObjDhouse_Draw(Actor* thisx, PlayState* play) { } void func_80B13C08(Actor* thisx, PlayState* play) { - ObjDhouse* this = THIS; + ObjDhouse* this = (ObjDhouse*)thisx; ObjDhouseStruct1* ptr; ObjDhouseStruct2* ptr2; ObjDhouseStruct3* ptr3; diff --git a/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c b/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c index 3bbab41e4e..3a752484df 100644 --- a/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c +++ b/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_20) -#define THIS ((ObjDinner*)thisx) - void ObjDinner_Init(Actor* thisx, PlayState* play); void ObjDinner_Destroy(Actor* thisx, PlayState* play); void ObjDinner_Update(Actor* thisx, PlayState* play); @@ -29,7 +27,7 @@ ActorProfile Obj_Dinner_Profile = { }; void ObjDinner_Init(Actor* thisx, PlayState* play) { - ObjDinner* this = THIS; + ObjDinner* this = (ObjDinner*)thisx; if ((gSaveContext.save.isNight != true) || ((CURRENT_DAY == 3) && CHECK_WEEKEVENTREG(WEEKEVENTREG_DEFENDED_AGAINST_ALIENS))) { diff --git a/src/overlays/actors/ovl_Obj_Dora/z_obj_dora.c b/src/overlays/actors/ovl_Obj_Dora/z_obj_dora.c index 86a5d44a11..1dbfb196f9 100644 --- a/src/overlays/actors/ovl_Obj_Dora/z_obj_dora.c +++ b/src/overlays/actors/ovl_Obj_Dora/z_obj_dora.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjDora*)thisx) - void ObjDora_Init(Actor* thisx, PlayState* play); void ObjDora_Destroy(Actor* thisx, PlayState* play); void ObjDora_Update(Actor* thisx, PlayState* play); @@ -167,7 +165,7 @@ static DamageTable sDamageTable = { static CollisionCheckInfoInit2 sColChkInfoInit = { 8, 0, 0, 0, MASS_HEAVY }; void ObjDora_Init(Actor* thisx, PlayState* play) { - ObjDora* this = THIS; + ObjDora* this = (ObjDora*)thisx; s32 i; s32 j; Vec3f vtx[3]; @@ -207,7 +205,7 @@ void ObjDora_Init(Actor* thisx, PlayState* play) { } void ObjDora_Destroy(Actor* thisx, PlayState* play) { - ObjDora* this = THIS; + ObjDora* this = (ObjDora*)thisx; Collider_DestroyTris(play, &this->colliderTris); } @@ -309,7 +307,7 @@ void ObjDora_UpdateCollision(ObjDora* this, PlayState* play) { } void ObjDora_Update(Actor* thisx, PlayState* play) { - ObjDora* this = THIS; + ObjDora* this = (ObjDora*)thisx; this->actionFunc(this, play); ObjDora_UpdateCollision(this, play); @@ -317,7 +315,7 @@ void ObjDora_Update(Actor* thisx, PlayState* play) { void ObjDora_Draw(Actor* thisx, PlayState* play) { static Vec3f sPos = { 0.0f, -61.5f, 0.0f }; - ObjDora* this = THIS; + ObjDora* this = (ObjDora*)thisx; f32 gongForceX; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c b/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c index 1597d1218b..ec9e5202b0 100644 --- a/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c +++ b/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjDowsing*)thisx) - void ObjDowsing_Init(Actor* thisx, PlayState* play); void ObjDowsing_Destroy(Actor* thisx, PlayState* play); void ObjDowsing_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ s32 ObjDowsing_CheckValidSpawn(ObjDowsing* this, PlayState* play) { } void ObjDowsing_Init(Actor* thisx, PlayState* play) { - ObjDowsing* this = THIS; + ObjDowsing* this = (ObjDowsing*)thisx; ObjDowsing_CheckValidSpawn(this, play); } @@ -62,7 +60,7 @@ void ObjDowsing_Destroy(Actor* thisx, PlayState* play) { } void ObjDowsing_Update(Actor* thisx, PlayState* play) { - ObjDowsing* this = THIS; + ObjDowsing* this = (ObjDowsing*)thisx; if (!ObjDowsing_CheckValidSpawn(this, play)) { Actor_SetClosestSecretDistance(thisx, play); diff --git a/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c b/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c index 344730ee99..f820d3f539 100644 --- a/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c +++ b/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjDriftice*)thisx) - void ObjDriftice_Init(Actor* thisx, PlayState* play); void ObjDriftice_Destroy(Actor* thisx, PlayState* play); void ObjDriftice_Update(Actor* thisx, PlayState* play); @@ -265,7 +263,7 @@ void func_80A66E30(ObjDrifticeStruct* arg0, ObjDriftice* this) { void ObjDriftice_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjDriftice* this = THIS; + ObjDriftice* this = (ObjDriftice*)thisx; f32* sp2C = D_80A67620[OBJDRIFTICE_GET_3(&this->dyna.actor)]; Path* path; s32 transformFlags; @@ -320,7 +318,7 @@ void ObjDriftice_Init(Actor* thisx, PlayState* play) { } void ObjDriftice_Destroy(Actor* thisx, PlayState* play) { - ObjDriftice* this = THIS; + ObjDriftice* this = (ObjDriftice*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -426,7 +424,7 @@ void func_80A674C4(ObjDriftice* this, PlayState* play) { } void ObjDriftice_Update(Actor* thisx, PlayState* play) { - ObjDriftice* this = THIS; + ObjDriftice* this = (ObjDriftice*)thisx; if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_248 < 0) { @@ -452,7 +450,7 @@ void ObjDriftice_Update(Actor* thisx, PlayState* play) { } void ObjDriftice_Draw(Actor* thisx, PlayState* play) { - ObjDriftice* this = THIS; + ObjDriftice* this = (ObjDriftice*)thisx; Gfx_DrawDListOpa(play, object_driftice_DL_0016A0); } diff --git a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c index 75b8f6753d..cfd0efc333 100644 --- a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c +++ b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjEnding*)thisx) - void ObjEnding_Init(Actor* thisx, PlayState* play); void ObjEnding_Update(Actor* thisx, PlayState* play); void ObjEnding_Draw(Actor* thisx, PlayState* play); @@ -37,7 +35,7 @@ static InitChainEntry sInitChain[] = { }; void ObjEnding_Init(Actor* thisx, PlayState* play) { - ObjEnding* this = THIS; + ObjEnding* this = (ObjEnding*)thisx; AnimatedMaterial* animMat; Actor_ProcessInitChain(thisx, sInitChain); @@ -52,7 +50,7 @@ void ObjEnding_Update(Actor* thisx, PlayState* play) { } void ObjEnding_Draw(Actor* thisx, PlayState* play) { - ObjEnding* this = THIS; + ObjEnding* this = (ObjEnding*)thisx; Gfx* dl1; Gfx* dl2; diff --git a/src/overlays/actors/ovl_Obj_Entotu/z_obj_entotu.c b/src/overlays/actors/ovl_Obj_Entotu/z_obj_entotu.c index 1618bbf3a5..20a8203b16 100644 --- a/src/overlays/actors/ovl_Obj_Entotu/z_obj_entotu.c +++ b/src/overlays/actors/ovl_Obj_Entotu/z_obj_entotu.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjEntotu*)thisx) - void ObjEntotu_Init(Actor* thisx, PlayState* play); void ObjEntotu_Destroy(Actor* thisx, PlayState* play); void ObjEntotu_Update(Actor* thisx, PlayState* play); @@ -149,7 +147,7 @@ void func_80A34B28(ObjEntotu* this, PlayState* play) { } void ObjEntotu_Init(Actor* thisx, PlayState* play) { - ObjEntotu* this = THIS; + ObjEntotu* this = (ObjEntotu*)thisx; Lib_MemCpy(this->unk_148, ovl_Obj_Entotu_Vtx_000D10, sizeof(ovl_Obj_Entotu_Vtx_000D10)); this->unk_1C6 = Rand_S16Offset(0, 59); @@ -160,13 +158,13 @@ void ObjEntotu_Destroy(Actor* thisx, PlayState* play) { } void ObjEntotu_Update(Actor* thisx, PlayState* play) { - ObjEntotu* this = THIS; + ObjEntotu* this = (ObjEntotu*)thisx; func_80A349C0(this); } void ObjEntotu_Draw(Actor* thisx, PlayState* play) { - ObjEntotu* this = THIS; + ObjEntotu* this = (ObjEntotu*)thisx; func_80A34B28(this, play); func_80A34A44(this, play); diff --git a/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c b/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c index 14646cec13..418c08db2b 100644 --- a/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c +++ b/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjEtcetera*)thisx) - void ObjEtcetera_Init(Actor* thisx, PlayState* play); void ObjEtcetera_Destroy(Actor* thisx, PlayState* play); void ObjEtcetera_Update(Actor* thisx, PlayState* play); @@ -70,7 +68,7 @@ static f32 sOscillationTable[] = { void ObjEtcetera_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjEtcetera* this = THIS; + ObjEtcetera* this = (ObjEtcetera*)thisx; s32 objectSlot; s32 type = DEKU_FLOWER_TYPE(&this->dyna.actor); s32 floorBgId; @@ -99,7 +97,7 @@ void ObjEtcetera_Init(Actor* thisx, PlayState* play) { } void ObjEtcetera_Destroy(Actor* thisx, PlayState* play) { - ObjEtcetera* this = THIS; + ObjEtcetera* this = (ObjEtcetera*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -321,7 +319,7 @@ void ObjEtcetera_Setup(ObjEtcetera* this, PlayState* play) { } void ObjEtcetera_Update(Actor* thisx, PlayState* play) { - ObjEtcetera* this = THIS; + ObjEtcetera* this = (ObjEtcetera*)thisx; CollisionPoly* floorPoly; u8 floorBgId = this->dyna.actor.floorBgId; @@ -342,7 +340,7 @@ void ObjEtcetera_Update(Actor* thisx, PlayState* play) { * When an animation is finished, functions are expected to set the actor's draw function to this. */ void ObjEtcetera_DrawIdle(Actor* thisx, PlayState* play) { - ObjEtcetera* this = THIS; + ObjEtcetera* this = (ObjEtcetera*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -359,7 +357,7 @@ void ObjEtcetera_DrawIdle(Actor* thisx, PlayState* play) { * When a function wants to play an animation, it is expected to set the actor's draw function to this. */ void ObjEtcetera_DrawAnimated(Actor* thisx, PlayState* play) { - ObjEtcetera* this = THIS; + ObjEtcetera* this = (ObjEtcetera*)thisx; Gfx_SetupDL37_Opa(play->state.gfxCtx); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->dyna.actor); diff --git a/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c b/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c index c964238df9..463abff8bf 100644 --- a/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c +++ b/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjFireshield*)thisx) - void ObjFireshield_Init(Actor* thisx, PlayState* play); void ObjFireshield_Destroy(Actor* thisx, PlayState* play); void ObjFireshield_Update(Actor* thisx, PlayState* play); @@ -140,7 +138,7 @@ void func_80A4CD28(ObjFireshield* this) { void func_80A4CD34(Actor* thisx, PlayState* play) { s32 pad; - ObjFireshield* this = THIS; + ObjFireshield* this = (ObjFireshield*)thisx; s32 isSwitchFlagSet = Flags_GetSwitch(play, OBJFIRESHIELD_GET_FLAGS(&this->actor)); s32 phi_v1; s32 phi_a0; @@ -268,7 +266,7 @@ void func_80A4D1CC(void) { } void ObjFireshield_Init(Actor* thisx, PlayState* play) { - ObjFireshield* this = THIS; + ObjFireshield* this = (ObjFireshield*)thisx; s32 temp = 0x8000; ObjFireshieldStruct* sp2C = &D_80A4D84C[OBJFIRESHIELD_GET_C000(&this->actor)]; s32 sp28 = OBJFIRESHIELD_GET_ROTX(&this->actor); @@ -309,14 +307,14 @@ void ObjFireshield_Init(Actor* thisx, PlayState* play) { } void ObjFireshield_Destroy(Actor* thisx, PlayState* play) { - ObjFireshield* this = THIS; + ObjFireshield* this = (ObjFireshield*)thisx; Collider_DestroyCylinder(play, &this->collider); } void ObjFireshield_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjFireshield* this = THIS; + ObjFireshield* this = (ObjFireshield*)thisx; s32 sp44 = OBJFIRESHIELD_GET_ROTX(&this->actor); s32 sp40 = OBJFIRESHIELD_GET_FLAGS(&this->actor); s32 temp_a0; @@ -379,7 +377,7 @@ void ObjFireshield_Update(Actor* thisx, PlayState* play) { } void ObjFireshield_Draw(Actor* thisx, PlayState* play) { - ObjFireshield* this = THIS; + ObjFireshield* this = (ObjFireshield*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c index aa876ba343..6510d0708f 100644 --- a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c +++ b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjFlowerpot*)thisx) - void ObjFlowerpot_Init(Actor* thisx, PlayState* play); void ObjFlowerpot_Destroy(Actor* thisx, PlayState* play2); void ObjFlowerpot_Update(Actor* thisx, PlayState* play2); @@ -394,7 +392,7 @@ void func_80A1C62C(ObjFlowerpot* this, PlayState* play) { void ObjFlowerpot_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjFlowerpot* this = THIS; + ObjFlowerpot* this = (ObjFlowerpot*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -430,7 +428,7 @@ void ObjFlowerpot_Init(Actor* thisx, PlayState* play) { void ObjFlowerpot_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjFlowerpot* this = THIS; + ObjFlowerpot* this = (ObjFlowerpot*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -648,7 +646,7 @@ void func_80A1CEF4(ObjFlowerpot* this, PlayState* play) { void ObjFlowerpot_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjFlowerpot* this = THIS; + ObjFlowerpot* this = (ObjFlowerpot*)thisx; this->actionFunc(this, play); @@ -662,7 +660,7 @@ void ObjFlowerpot_Update(Actor* thisx, PlayState* play2) { void ObjFlowerpot_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjFlowerpot* this = THIS; + ObjFlowerpot* this = (ObjFlowerpot*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Funen/z_obj_funen.c b/src/overlays/actors/ovl_Obj_Funen/z_obj_funen.c index e0604b3be1..b668fd9a26 100644 --- a/src/overlays/actors/ovl_Obj_Funen/z_obj_funen.c +++ b/src/overlays/actors/ovl_Obj_Funen/z_obj_funen.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjFunen*)thisx) - void ObjFunen_Init(Actor* thisx, PlayState* play); void ObjFunen_Draw(Actor* thisx, PlayState* play); @@ -29,7 +27,7 @@ ActorProfile Obj_Funen_Profile = { f32 D_80A198D0[] = { 0.1f, 0.024390244f }; void ObjFunen_Init(Actor* thisx, PlayState* play) { - ObjFunen* this = THIS; + ObjFunen* this = (ObjFunen*)thisx; Actor_SetScale(&this->actor, D_80A198D0[this->actor.params & 1]); } diff --git a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c index 45b05e2c9e..7712338ed1 100644 --- a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c +++ b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_20) -#define THIS ((ObjGhaka*)thisx) - void ObjGhaka_Init(Actor* thisx, PlayState* play); void ObjGhaka_Destroy(Actor* thisx, PlayState* play); void ObjGhaka_Update(Actor* thisx, PlayState* play); @@ -148,7 +146,7 @@ void func_80B3C624(ObjGhaka* this, PlayState* play) { } void ObjGhaka_Init(Actor* thisx, PlayState* play) { - ObjGhaka* this = THIS; + ObjGhaka* this = (ObjGhaka*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -168,13 +166,13 @@ void ObjGhaka_Init(Actor* thisx, PlayState* play) { } void ObjGhaka_Destroy(Actor* thisx, PlayState* play) { - ObjGhaka* this = THIS; + ObjGhaka* this = (ObjGhaka*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjGhaka_Update(Actor* thisx, PlayState* play) { - ObjGhaka* this = THIS; + ObjGhaka* this = (ObjGhaka*)thisx; this->actionFunc(this, play); thisx->focus.pos.x = thisx->world.pos.x; diff --git a/src/overlays/actors/ovl_Obj_Grass/z_obj_grass.c b/src/overlays/actors/ovl_Obj_Grass/z_obj_grass.c index 5a26894f6a..7dce791989 100644 --- a/src/overlays/actors/ovl_Obj_Grass/z_obj_grass.c +++ b/src/overlays/actors/ovl_Obj_Grass/z_obj_grass.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjGrass*)thisx) - void ObjGrass_Init(Actor* thisx, PlayState* play); void ObjGrass_Destroy(Actor* thisx, PlayState* play); void ObjGrass_Update(Actor* thisx, PlayState* play); @@ -139,7 +137,7 @@ void ObjGrass_SpawnFragments(Vec3f* basePos, PlayState* play) { } void ObjGrass_Init(Actor* thisx, PlayState* play) { - ObjGrass* this = THIS; + ObjGrass* this = (ObjGrass*)thisx; s32 i; Actor_SetScale(&this->actor, 0.4f); @@ -158,7 +156,7 @@ void ObjGrass_Init(Actor* thisx, PlayState* play) { } void ObjGrass_Destroy(Actor* thisx, PlayState* play) { - ObjGrass* this = THIS; + ObjGrass* this = (ObjGrass*)thisx; s32 i; for (i = 0; i < ARRAY_COUNT(this->grassElemColliders); i++) { @@ -385,7 +383,7 @@ void ObjGrass_CalcAnimationMatrices(ObjGrass* this) { } void ObjGrass_Update(Actor* thisx, PlayState* play) { - ObjGrass* this = THIS; + ObjGrass* this = (ObjGrass*)thisx; ObjGrass_ProcessColliders(this, play); ObjGrass_UpdateGrass(this, play); @@ -438,7 +436,7 @@ void ObjGrass_InitDraw(ObjGrass* this, PlayState* play) { } void ObjGrass_DrawOpa(Actor* thisx, PlayState* play2) { - ObjGrass* this = THIS; + ObjGrass* this = (ObjGrass*)thisx; PlayState* play = play2; Lights* lights; ObjGrassGroup* grassGroup; @@ -484,7 +482,7 @@ void ObjGrass_DrawOpa(Actor* thisx, PlayState* play2) { } void ObjGrass_DrawXlu(Actor* thisx, PlayState* play) { - ObjGrass* this = THIS; + ObjGrass* this = (ObjGrass*)thisx; ObjGrassGroup* grassGroup; ObjGrassElement* grassElem; s32 i; @@ -521,7 +519,7 @@ void ObjGrass_DrawXlu(Actor* thisx, PlayState* play) { } void ObjGrass_Draw(Actor* thisx, PlayState* play) { - ObjGrass* this = THIS; + ObjGrass* this = (ObjGrass*)thisx; ObjGrass_InitDraw(this, play); ObjGrass_DrawOpa(thisx, play); diff --git a/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c b/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c index 1769b07137..d00e41e393 100644 --- a/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c +++ b/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_THROW_ONLY) -#define THIS ((ObjGrassCarry*)thisx) - void ObjGrassCarry_Init(Actor* thisx, PlayState* play); void ObjGrassCarry_Destroy(Actor* thisx, PlayState* play); void ObjGrassCarry_Update(Actor* thisx, PlayState* play); @@ -150,7 +148,7 @@ void ObjGrassCarry_SpawnFragments(Vec3f* basePos, PlayState* play) { } void ObjGrassCarry_Init(Actor* thisx, PlayState* play) { - ObjGrassCarry* this = THIS; + ObjGrassCarry* this = (ObjGrassCarry*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitCylinder(play, &this->collider); @@ -160,7 +158,7 @@ void ObjGrassCarry_Init(Actor* thisx, PlayState* play) { } void ObjGrassCarry_Destroy(Actor* thisx, PlayState* play) { - ObjGrassCarry* this = THIS; + ObjGrassCarry* this = (ObjGrassCarry*)thisx; Collider_DestroyCylinder(play, &this->collider); @@ -345,7 +343,7 @@ void ObjGrassCarry_Fall(ObjGrassCarry* this, PlayState* play) { } void ObjGrassCarry_Update(Actor* thisx, PlayState* play) { - ObjGrassCarry* this = THIS; + ObjGrassCarry* this = (ObjGrassCarry*)thisx; if (this->grassManager == NULL) { if ((this->actionFunc != ObjGrassCarry_LiftedUp) && (this->actionFunc != ObjGrassCarry_Fall)) { diff --git a/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.c b/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.c index e0136c1220..a8d31172af 100644 --- a/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.c +++ b/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.c @@ -17,8 +17,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjGrassUnit*)thisx) - void ObjGrassUnit_Init(Actor* this, PlayState* play2); ActorProfile Obj_Grass_Unit_Profile = { diff --git a/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c b/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c index 1233842955..da1d5a7c8f 100644 --- a/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c +++ b/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_20) -#define THIS ((ObjHakaisi*)thisx) - void ObjHakaisi_Init(Actor* thisx, PlayState* play); void ObjHakaisi_Destroy(Actor* thisx, PlayState* play); void ObjHakaisi_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ Vec3f D_80B155BC[] = { { 0.0f, 65.0f, 8.0f }, { 0.0f, 35.0f, 8.0f }, { 0.0f, 15. void ObjHakaisi_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjHakaisi* this = THIS; + ObjHakaisi* this = (ObjHakaisi*)thisx; CollisionHeader* sp7C = NULL; MtxF sp3C; s32 i; @@ -140,7 +138,7 @@ void ObjHakaisi_Init(Actor* thisx, PlayState* play) { } void ObjHakaisi_Destroy(Actor* thisx, PlayState* play) { - ObjHakaisi* this = THIS; + ObjHakaisi* this = (ObjHakaisi*)thisx; if (OBJHAKAISI_GET_FF(&this->dyna.actor) != 3) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -331,13 +329,13 @@ void func_80B14F4C(ObjHakaisi* this, PlayState* play, s32 arg2) { } void ObjHakaisi_Update(Actor* thisx, PlayState* play) { - ObjHakaisi* this = THIS; + ObjHakaisi* this = (ObjHakaisi*)thisx; this->actionFunc(this, play); } void ObjHakaisi_Draw(Actor* thisx, PlayState* play) { - ObjHakaisi* this = THIS; + ObjHakaisi* this = (ObjHakaisi*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -412,7 +410,7 @@ void func_80B15330(ObjHakaisi* this, PlayState* play) { } void func_80B1544C(Actor* thisx, PlayState* play) { - ObjHakaisi* this = THIS; + ObjHakaisi* this = (ObjHakaisi*)thisx; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index d99898034b..fcd2c31f06 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjHamishi*)thisx) - void ObjHamishi_Init(Actor* thisx, PlayState* play); void ObjHamishi_Destroy(Actor* thisx, PlayState* play2); void ObjHamishi_Update(Actor* thisx, PlayState* play); @@ -62,7 +60,7 @@ static InitChainEntry sInitChain[] = { }; void func_809A0F20(Actor* thisx, PlayState* play) { - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -161,7 +159,7 @@ s32 ObjHamishi_IsUnderwater(ObjHamishi* this, PlayState* play) { } void ObjHamishi_Init(Actor* thisx, PlayState* play) { - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -194,14 +192,14 @@ void ObjHamishi_Init(Actor* thisx, PlayState* play) { void ObjHamishi_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; Collider_DestroyCylinder(play, &this->collider); } void ObjHamishi_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; s32 sp24 = (this->collider.base.acFlags & AC_HIT) != 0; func_809A0F78(this); @@ -261,7 +259,7 @@ void ObjHamishi_Update(Actor* thisx, PlayState* play) { } void ObjHamishi_Draw(Actor* thisx, PlayState* play) { - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c index 66b7b4e6b4..5f606f120d 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjHana*)thisx) - void ObjHana_Init(Actor* thisx, PlayState* play); void ObjHana_Destroy(Actor* thisx, PlayState* play); void ObjHana_Update(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void ObjHana_Init(Actor* thisx, PlayState* play) { - ObjHana* this = THIS; + ObjHana* this = (ObjHana*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); } diff --git a/src/overlays/actors/ovl_Obj_Hariko/z_obj_hariko.c b/src/overlays/actors/ovl_Obj_Hariko/z_obj_hariko.c index 489040185a..62da98eeec 100644 --- a/src/overlays/actors/ovl_Obj_Hariko/z_obj_hariko.c +++ b/src/overlays/actors/ovl_Obj_Hariko/z_obj_hariko.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ObjHariko*)thisx) - void ObjHariko_Init(Actor* thisx, PlayState* play); void ObjHariko_Destroy(Actor* thisx, PlayState* play); void ObjHariko_Update(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ ActorProfile Obj_Hariko_Profile = { }; void ObjHariko_Init(Actor* thisx, PlayState* play) { - ObjHariko* this = THIS; + ObjHariko* this = (ObjHariko*)thisx; Actor_SetScale(&this->actor, 0.1f); this->headRot.x = 0; @@ -80,14 +78,14 @@ void ObjHariko_CheckForQuakes(ObjHariko* this) { } void ObjHariko_Update(Actor* thisx, PlayState* play) { - ObjHariko* this = THIS; + ObjHariko* this = (ObjHariko*)thisx; this->actionFunc(this, play); ObjHariko_CheckForQuakes(this); } void ObjHariko_Draw(Actor* thisx, PlayState* play) { - ObjHariko* this = THIS; + ObjHariko* this = (ObjHariko*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Hgdoor/z_obj_hgdoor.c b/src/overlays/actors/ovl_Obj_Hgdoor/z_obj_hgdoor.c index b2bfff754a..b19bd8435f 100644 --- a/src/overlays/actors/ovl_Obj_Hgdoor/z_obj_hgdoor.c +++ b/src/overlays/actors/ovl_Obj_Hgdoor/z_obj_hgdoor.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_100000) -#define THIS ((ObjHgdoor*)thisx) - void ObjHgdoor_Init(Actor* thisx, PlayState* play); void ObjHgdoor_Destroy(Actor* thisx, PlayState* play); void ObjHgdoor_Update(Actor* thisx, PlayState* play); @@ -65,7 +63,7 @@ void ObjHgdoor_SetParent(ObjHgdoor* this, PlayState* play) { } void ObjHgdoor_Init(Actor* thisx, PlayState* play) { - ObjHgdoor* this = THIS; + ObjHgdoor* this = (ObjHgdoor*)thisx; s32 pad; CollisionHeader* header = NULL; @@ -84,7 +82,7 @@ void ObjHgdoor_Init(Actor* thisx, PlayState* play) { } void ObjHgdoor_Destroy(Actor* thisx, PlayState* play) { - ObjHgdoor* this = THIS; + ObjHgdoor* this = (ObjHgdoor*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -191,7 +189,7 @@ void ObjHgdoor_Open(ObjHgdoor* this) { } void ObjHgdoor_Update(Actor* thisx, PlayState* play) { - ObjHgdoor* this = THIS; + ObjHgdoor* this = (ObjHgdoor*)thisx; this->actionFunc(this, play); ObjHgdoor_Open(this); diff --git a/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c b/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c index 8c3e904e61..f8f60a59c2 100644 --- a/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c +++ b/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjHsStump*)thisx) - void ObjHsStump_Init(Actor* thisx, PlayState* play); void ObjHsStump_Destroy(Actor* thisx, PlayState* play); void ObjHsStump_Update(Actor* thisx, PlayState* play); @@ -41,7 +39,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sIceSmokeAccel = { 0.0f, 0.0f, 0.0f }; void ObjHsStump_Init(Actor* thisx, PlayState* play) { - ObjHsStump* this = THIS; + ObjHsStump* this = (ObjHsStump*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->isHidden = OBJHSSTUMP_GET_ISHIDDEN(thisx); @@ -137,13 +135,13 @@ void ObjHsStump_Appear(ObjHsStump* this, PlayState* play) { } void ObjHsStump_Destroy(Actor* thisx, PlayState* play) { - ObjHsStump* this = THIS; + ObjHsStump* this = (ObjHsStump*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjHsStump_Update(Actor* thisx, PlayState* play) { - ObjHsStump* this = THIS; + ObjHsStump* this = (ObjHsStump*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index 870b2a6066..0b4967677e 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjHsblock*)thisx) - void ObjHsblock_Init(Actor* thisx, PlayState* play); void ObjHsblock_Destroy(Actor* thisx, PlayState* play); void ObjHsblock_Update(Actor* thisx, PlayState* play); @@ -67,7 +65,7 @@ void func_8093DEAC(ObjHsblock* this, PlayState* play) { } void ObjHsblock_Init(Actor* thisx, PlayState* play) { - ObjHsblock* this = THIS; + ObjHsblock* this = (ObjHsblock*)thisx; DynaPolyActor_Init(&this->dyna, 0); DynaPolyActor_LoadMesh(play, &this->dyna, sColHeaders[OBJHSBLOCK_GET_3(thisx)]); @@ -94,7 +92,7 @@ void ObjHsblock_Init(Actor* thisx, PlayState* play) { } void ObjHsblock_Destroy(Actor* thisx, PlayState* play) { - ObjHsblock* this = THIS; + ObjHsblock* this = (ObjHsblock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -130,7 +128,7 @@ void func_8093E10C(ObjHsblock* this, PlayState* play) { } void ObjHsblock_Update(Actor* thisx, PlayState* play) { - ObjHsblock* this = THIS; + ObjHsblock* this = (ObjHsblock*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c index 5e18f15349..37d3133fc8 100644 --- a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c +++ b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjHugebombiwa*)thisx) - void ObjHugebombiwa_Init(Actor* thisx, PlayState* play); void ObjHugebombiwa_Destroy(Actor* thisx, PlayState* play2); void ObjHugebombiwa_Update(Actor* thisx, PlayState* play); @@ -335,7 +333,7 @@ static InitChainEntry sInitChain[] = { void ObjHugebombiwa_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjHugebombiwa* this = THIS; + ObjHugebombiwa* this = (ObjHugebombiwa*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitCylinder(play, &this->collider); @@ -363,7 +361,7 @@ void ObjHugebombiwa_Init(Actor* thisx, PlayState* play) { void ObjHugebombiwa_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjHugebombiwa* this = THIS; + ObjHugebombiwa* this = (ObjHugebombiwa*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -625,13 +623,13 @@ void func_80A55564(ObjHugebombiwa* this, PlayState* play) { } void ObjHugebombiwa_Update(Actor* thisx, PlayState* play) { - ObjHugebombiwa* this = THIS; + ObjHugebombiwa* this = (ObjHugebombiwa*)thisx; this->actionFunc(this, play); } void ObjHugebombiwa_Draw(Actor* thisx, PlayState* play) { - ObjHugebombiwa* this = THIS; + ObjHugebombiwa* this = (ObjHugebombiwa*)thisx; s32 pad[8]; f32 sp38; @@ -686,7 +684,7 @@ void ObjHugebombiwa_Draw(Actor* thisx, PlayState* play) { } void func_80A55B34(Actor* thisx, PlayState* play) { - ObjHugebombiwa* this = THIS; + ObjHugebombiwa* this = (ObjHugebombiwa*)thisx; s32 i; Gfx* gfx; EnHugebombiwaStruct* ptr; diff --git a/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c b/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c index 180561c334..f5ac7b6a51 100644 --- a/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c +++ b/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjHunsui*)thisx) - void ObjHunsui_Init(Actor* thisx, PlayState* play); void ObjHunsui_Destroy(Actor* thisx, PlayState* play); void ObjHunsui_Update(Actor* thisx, PlayState* play); @@ -203,7 +201,7 @@ void func_80B9C5E8(ObjHunsui* this, PlayState* play) { } void ObjHunsui_Init(Actor* thisx, PlayState* play) { - ObjHunsui* this = THIS; + ObjHunsui* this = (ObjHunsui*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->unk_160 = OBJHUNSUI_GET_F000(thisx); @@ -320,13 +318,13 @@ void ObjHunsui_Init(Actor* thisx, PlayState* play) { } void ObjHunsui_Destroy(Actor* thisx, PlayState* play) { - ObjHunsui* this = THIS; + ObjHunsui* this = (ObjHunsui*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjHunsui_Update(Actor* thisx, PlayState* play) { - ObjHunsui* this = THIS; + ObjHunsui* this = (ObjHunsui*)thisx; this->actionFunc(this, play); @@ -633,7 +631,7 @@ void func_80B9D714(ObjHunsui* this, PlayState* play) { } void ObjHunsui_Draw(Actor* thisx, PlayState* play) { - ObjHunsui* this = THIS; + ObjHunsui* this = (ObjHunsui*)thisx; if (this->unk_172 & 0x10) { f32 temp_f8 = (this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) / 800.0f; @@ -649,7 +647,7 @@ void ObjHunsui_Draw(Actor* thisx, PlayState* play) { void func_80B9DA60(Actor* thisx, PlayState* play) { s32 pad; - ObjHunsui* this = THIS; + ObjHunsui* this = (ObjHunsui*)thisx; f32 temp; if (this->unk_172 & 0x10) { diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 039d5e9771..6636eca031 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjIcePoly*)thisx) - void ObjIcePoly_Init(Actor* thisx, PlayState* play); void ObjIcePoly_Destroy(Actor* thisx, PlayState* play); void ObjIcePoly_Update(Actor* thisx, PlayState* play); @@ -78,7 +76,7 @@ static Color_RGBA8 D_80932378 = { 250, 250, 250, 255 }; static Color_RGBA8 D_8093237C = { 180, 180, 180, 255 }; void ObjIcePoly_Init(Actor* thisx, PlayState* play) { - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; s32 i; this->switchFlag = OBJICEPOLY_GET_SWITCH_FLAG(thisx); @@ -125,7 +123,7 @@ void ObjIcePoly_Init(Actor* thisx, PlayState* play) { } void ObjIcePoly_Destroy(Actor* thisx, PlayState* play) { - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; s32 i; for (i = 0; i < ARRAY_COUNT(this->colliders1); i++) { @@ -336,14 +334,14 @@ void func_80931EEC(ObjIcePoly* this, PlayState* play) { } void ObjIcePoly_Update(Actor* thisx, PlayState* play) { - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; this->actionFunc(this, play); } void ObjIcePoly_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c index eaf5696e76..9976442c39 100644 --- a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c +++ b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjIceblock*)thisx) - void ObjIceblock_Init(Actor* thisx, PlayState* play); void ObjIceblock_Destroy(Actor* thisx, PlayState* play); void ObjIceblock_Update(Actor* thisx, PlayState* play); @@ -904,7 +902,7 @@ static InitChainEntry sInitChain[] = { void ObjIceblock_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjIceblock* this = THIS; + ObjIceblock* this = (ObjIceblock*)thisx; Actor* parent; s32 pad2; @@ -960,7 +958,7 @@ void ObjIceblock_Init(Actor* thisx, PlayState* play) { } void ObjIceblock_Destroy(Actor* thisx, PlayState* play) { - ObjIceblock* this = THIS; + ObjIceblock* this = (ObjIceblock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -1418,7 +1416,7 @@ void func_80A266E0(ObjIceblock* this, PlayState* play) { void ObjIceblock_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjIceblock* this = THIS; + ObjIceblock* this = (ObjIceblock*)thisx; Actor* parent = this->dyna.actor.parent; if (parent != NULL) { @@ -1557,7 +1555,7 @@ void func_80A26BF8(ObjIceblock* this, PlayState* play) { } void ObjIceblock_Draw(Actor* thisx, PlayState* play) { - ObjIceblock* this = THIS; + ObjIceblock* this = (ObjIceblock*)thisx; AnimatedMat_Draw(play, sCubeSublimatingAirTexMat); this->extendedDrawFunc(this, play); diff --git a/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c b/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c index 2c564d2de8..0c8154a1a3 100644 --- a/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c +++ b/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_20) -#define THIS ((ObjJgGakki*)thisx) - void ObjJgGakki_Init(Actor* thisx, PlayState* play2); void ObjJgGakki_Destroy(Actor* thisx, PlayState* play); void ObjJgGakki_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Obj_Jg_Gakki_Profile = { void ObjJgGakki_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjJgGakki* this = THIS; + ObjJgGakki* this = (ObjJgGakki*)thisx; f32 endFrame = Animation_GetLastFrame(&gGoronElderDrumTakeOutAnim); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); @@ -47,19 +45,19 @@ void ObjJgGakki_Init(Actor* thisx, PlayState* play2) { } void ObjJgGakki_Destroy(Actor* thisx, PlayState* play) { - ObjJgGakki* this = THIS; + ObjJgGakki* this = (ObjJgGakki*)thisx; Collider_DestroyCylinder(play, &this->collider); } void ObjJgGakki_Update(Actor* thisx, PlayState* play) { - ObjJgGakki* this = THIS; + ObjJgGakki* this = (ObjJgGakki*)thisx; SkelAnime_Update(&this->skelAnime); } void ObjJgGakki_Draw(Actor* thisx, PlayState* play) { - ObjJgGakki* this = THIS; + ObjJgGakki* this = (ObjJgGakki*)thisx; SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->actor); } diff --git a/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c b/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c index 67f75402cc..cbfd08f233 100644 --- a/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c +++ b/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjJgameLight*)thisx) - typedef enum { /* 0 */ OBJJGAMELIGHT_NONE, /* 1 */ OBJJGAMELIGHT_CORRECT, @@ -62,7 +60,7 @@ static ColliderCylinderInit sCylinderInit = { #include "assets/overlays/ovl_Obj_Jgame_Light/ovl_Obj_Jgame_Light.c" void ObjJgameLight_Init(Actor* thisx, PlayState* play) { - ObjJgameLight* this = THIS; + ObjJgameLight* this = (ObjJgameLight*)thisx; LightInfo* lights = &this->lightInfo; Actor_SetScale(&this->actor, 1.0f); @@ -84,7 +82,7 @@ void ObjJgameLight_Init(Actor* thisx, PlayState* play) { } void ObjJgameLight_Destroy(Actor* thisx, PlayState* play) { - ObjJgameLight* this = THIS; + ObjJgameLight* this = (ObjJgameLight*)thisx; Collider_DestroyCylinder(play, &this->collider); LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); @@ -158,7 +156,7 @@ void func_80C15718(ObjJgameLight* this, PlayState* play) { } void ObjJgameLight_Update(Actor* thisx, PlayState* play) { - ObjJgameLight* this = THIS; + ObjJgameLight* this = (ObjJgameLight*)thisx; func_80C15718(this, play); func_80C15474(this, play); @@ -168,7 +166,7 @@ void ObjJgameLight_Update(Actor* thisx, PlayState* play) { void ObjJgameLight_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjJgameLight* this = THIS; + ObjJgameLight* this = (ObjJgameLight*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Kendo_Kanban/z_obj_kendo_kanban.c b/src/overlays/actors/ovl_Obj_Kendo_Kanban/z_obj_kendo_kanban.c index ad0b5de8c6..1fd6484cd5 100644 --- a/src/overlays/actors/ovl_Obj_Kendo_Kanban/z_obj_kendo_kanban.c +++ b/src/overlays/actors/ovl_Obj_Kendo_Kanban/z_obj_kendo_kanban.c @@ -23,8 +23,6 @@ // Number of bounces the board takes before settling. #define MAX_BOUNCE_COUNT (7) -#define THIS ((ObjKendoKanban*)thisx) - typedef enum { /* -1 */ OBJKENDOKANBAN_DIR_DOWN = -1, /* 0 */ OBJKENDOKANBAN_DIR_UNDETERMINED, @@ -187,7 +185,7 @@ static Vec3f sUnitVecX = { 1.0f, 0.0f, 0.0f }; void ObjKendoKanban_Init(Actor* thisx, PlayState* play) { s32 pad[2]; - ObjKendoKanban* this = THIS; + ObjKendoKanban* this = (ObjKendoKanban*)thisx; Vec3f vertices[3]; s32 i; s32 j; @@ -238,7 +236,7 @@ void ObjKendoKanban_Init(Actor* thisx, PlayState* play) { } void ObjKendoKanban_Destroy(Actor* thisx, PlayState* play) { - ObjKendoKanban* this = THIS; + ObjKendoKanban* this = (ObjKendoKanban*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); Collider_DestroyTris(play, &this->colliderTris); @@ -487,14 +485,14 @@ void ObjKendoKanban_UpdateCollision(ObjKendoKanban* this, PlayState* play) { } void ObjKendoKanban_Update(Actor* thisx, PlayState* play) { - ObjKendoKanban* this = THIS; + ObjKendoKanban* this = (ObjKendoKanban*)thisx; this->actionFunc(this, play); ObjKendoKanban_UpdateCollision(this, play); } void ObjKendoKanban_Draw(Actor* thisx, PlayState* play) { - ObjKendoKanban* this = THIS; + ObjKendoKanban* this = (ObjKendoKanban*)thisx; s32 i; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c b/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c index 74bdc7a6c1..32922dc583 100644 --- a/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c +++ b/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjKepnKoya*)thisx) - void ObjKepnKoya_Init(Actor* thisx, PlayState* play); void ObjKepnKoya_Destroy(Actor* thisx, PlayState* play); void ObjKepnKoya_Update(Actor* thisx, PlayState* play); @@ -34,7 +32,7 @@ static InitChainEntry sInitChain[] = { }; void ObjKepnKoya_Init(Actor* thisx, PlayState* play) { - ObjKepnKoya* this = THIS; + ObjKepnKoya* this = (ObjKepnKoya*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Actor_SetScale(&this->dyna.actor, 0.1f); @@ -46,7 +44,7 @@ void ObjKepnKoya_Init(Actor* thisx, PlayState* play) { } void ObjKepnKoya_Destroy(Actor* thisx, PlayState* play) { - ObjKepnKoya* this = THIS; + ObjKepnKoya* this = (ObjKepnKoya*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 0439dc6857..3d7364a2fa 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CAN_PRESS_SWITCHES) -#define THIS ((ObjKibako*)thisx) - void ObjKibako_Init(Actor* thisx, PlayState* play2); void ObjKibako_Destroy(Actor* thisx, PlayState* play2); void ObjKibako_Update(Actor* thisx, PlayState* play); @@ -134,7 +132,7 @@ void func_80926394(ObjKibako* this, PlayState* play) { void ObjKibako_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; s32 objectIndex; objectIndex = KIBAKO_BANK_INDEX(thisx); @@ -160,7 +158,7 @@ void ObjKibako_Init(Actor* thisx, PlayState* play2) { void ObjKibako_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -419,7 +417,7 @@ void ObjKibako_Thrown(ObjKibako* this, PlayState* play) { } void ObjKibako_Update(Actor* thisx, PlayState* play) { - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; this->actionFunc(this, play); ObjKibako_SetShadow(this); diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index eb6cf3edfe..ab1b9d6daa 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjKibako2*)thisx) - void ObjKibako2_Init(Actor* thisx, PlayState* play); void ObjKibako2_Destroy(Actor* thisx, PlayState* play); void ObjKibako2_Update(Actor* thisx, PlayState* play); @@ -142,7 +140,7 @@ void ObjKibako2_SpawnContents(ObjKibako2* this, PlayState* play) { } void ObjKibako2_Init(Actor* thisx, PlayState* play) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; s32 pad; s32 contents = KIBAKO2_CONTENTS(&this->dyna.actor); @@ -171,7 +169,7 @@ void ObjKibako2_Init(Actor* thisx, PlayState* play) { } void ObjKibako2_Destroy(Actor* thisx, PlayState* play) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; Collider_DestroyCylinder(play, &this->collider); DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -225,7 +223,7 @@ void ObjKibako2_Kill(ObjKibako2* this, PlayState* play) { } void ObjKibako2_Update(Actor* thisx, PlayState* play) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; if (this->unk_1AC != 0) { play->actorCtx.flags |= ACTORCTX_FLAG_3; diff --git a/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c b/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c index 046f3e133c..9aa2cbddaf 100644 --- a/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c +++ b/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjKinoko*)thisx) - void ObjKinoko_Init(Actor* thisx, PlayState* play); void ObjKinoko_Destroy(Actor* thisx, PlayState* play); void ObjKinoko_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c b/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c index 7eb6856060..86bb4231a9 100644 --- a/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c +++ b/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjKzsaku*)thisx) - void ObjKzsaku_Init(Actor* thisx, PlayState* play); void ObjKzsaku_Destroy(Actor* thisx, PlayState* play); void ObjKzsaku_Update(Actor* thisx, PlayState* play); @@ -37,7 +35,7 @@ ActorProfile Obj_Kzsaku_Profile = { void ObjKzsaku_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjKzsaku* this = THIS; + ObjKzsaku* this = (ObjKzsaku*)thisx; CollisionHeader* col = NULL; Actor_SetScale(&this->dyna.actor, 1.0f); @@ -57,7 +55,7 @@ void ObjKzsaku_Init(Actor* thisx, PlayState* play) { } void ObjKzsaku_Destroy(Actor* thisx, PlayState* play) { - ObjKzsaku* this = THIS; + ObjKzsaku* this = (ObjKzsaku*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -114,7 +112,7 @@ void func_80C08CB0(ObjKzsaku* this, PlayState* play) { } void ObjKzsaku_Update(Actor* thisx, PlayState* play) { - ObjKzsaku* this = THIS; + ObjKzsaku* this = (ObjKzsaku*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 57fca6f085..7017fbdf80 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjLift*)thisx) - void ObjLift_Init(Actor* thisx, PlayState* play); void ObjLift_Destroy(Actor* thisx, PlayState* play); void ObjLift_Update(Actor* thisx, PlayState* play); @@ -92,7 +90,7 @@ void func_8093D3C0(ObjLift* this, PlayState* play) { void ObjLift_Init(Actor* thisx, PlayState* play) { f32 temp_fv0; - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->dyna.actor.scale.x = this->dyna.actor.scale.z = D_8093DD98[OBJLIFT_GET_1(&this->dyna.actor)]; @@ -114,7 +112,7 @@ void ObjLift_Init(Actor* thisx, PlayState* play) { } void ObjLift_Destroy(Actor* thisx, PlayState* play) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -218,7 +216,7 @@ void func_8093DB90(ObjLift* this, PlayState* play) { } void ObjLift_Update(Actor* thisx, PlayState* play) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; if (this->timer > 0) { this->timer--; @@ -227,13 +225,13 @@ void ObjLift_Update(Actor* thisx, PlayState* play) { } void ObjLift_Draw(Actor* thisx, PlayState* play) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; Gfx_DrawDListOpa(play, gDampeGraveBrownElevatorDL); } void func_8093DC90(Actor* thisx, PlayState* play) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; Vec3f pos; Vec3s rot; diff --git a/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c b/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c index 1eff4bcbf4..0d511f3386 100644 --- a/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c +++ b/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjLightblock*)thisx) - void ObjLightblock_Init(Actor* thisx, PlayState* play); void ObjLightblock_Destroy(Actor* thisx, PlayState* play); void ObjLightblock_Update(Actor* thisx, PlayState* play); @@ -83,7 +81,7 @@ void ObjLightblock_SpawnEffect(ObjLightblock* this, PlayState* play) { void ObjLightblock_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjLightblock* this = THIS; + ObjLightblock* this = (ObjLightblock*)thisx; LightblockTypeVars* typeVars = &sLightblockTypeVars[LIGHTBLOCK_TYPE(&this->dyna.actor)]; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -106,7 +104,7 @@ void ObjLightblock_Init(Actor* thisx, PlayState* play) { } void ObjLightblock_Destroy(Actor* thisx, PlayState* play) { - ObjLightblock* this = THIS; + ObjLightblock* this = (ObjLightblock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -182,13 +180,13 @@ void ObjLightblock_FadeAway(ObjLightblock* this, PlayState* play) { } void ObjLightblock_Update(Actor* thisx, PlayState* play) { - ObjLightblock* this = THIS; + ObjLightblock* this = (ObjLightblock*)thisx; this->actionFunc(this, play); } void ObjLightblock_Draw(Actor* thisx, PlayState* play) { - ObjLightblock* this = THIS; + ObjLightblock* this = (ObjLightblock*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 7d102119a0..aa8f38bd84 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjLightswitch*)thisx) - void ObjLightswitch_Init(Actor* thisx, PlayState* play); void ObjLightswitch_Destroy(Actor* thisx, PlayState* play); void ObjLightswitch_Update(Actor* thisx, PlayState* play); @@ -145,7 +143,7 @@ void ObjLightswitch_SpawnEffects(ObjLightswitch* this, PlayState* play) { } void ObjLightswitch_Init(Actor* thisx, PlayState* play) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; s32 pad; u32 isSwitchActivated; s32 isTriggered; @@ -178,7 +176,7 @@ void ObjLightswitch_Init(Actor* thisx, PlayState* play) { } void ObjLightswitch_Destroy(Actor* thisx, PlayState* play) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -323,7 +321,7 @@ void ObjLightSwitch_Fade(ObjLightswitch* this, PlayState* play) { } void ObjLightswitch_Update(Actor* thisx, PlayState* play) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; s32 pad; if (this->collider.base.acFlags & AC_HIT) { @@ -436,7 +434,7 @@ void ObjLightSwitch_DrawXlu(ObjLightswitch* this, PlayState* play) { } void ObjLightswitch_Draw(Actor* thisx, PlayState* play) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; s32 alpha = (u8)(this->colorAlpha >> 6); if ((LIGHTSWITCH_GET_TYPE(&this->actor) == LIGHTSWITCH_TYPE_FAKE) && (alpha > 0) && (alpha < 255)) { diff --git a/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c b/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c index 2c29aa1a03..af743fe47e 100644 --- a/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c +++ b/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjLupygamelift*)thisx) - void ObjLupygamelift_Init(Actor* thisx, PlayState* play); void ObjLupygamelift_Destroy(Actor* thisx, PlayState* play); void ObjLupygamelift_Update(Actor* thisx, PlayState* play); @@ -42,7 +40,7 @@ static InitChainEntry sInitChain[] = { void ObjLupygamelift_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjLupygamelift* this = THIS; + ObjLupygamelift* this = (ObjLupygamelift*)thisx; Path* path; s32 params; @@ -86,7 +84,7 @@ void ObjLupygamelift_Init(Actor* thisx, PlayState* play) { } void ObjLupygamelift_Destroy(Actor* thisx, PlayState* play) { - ObjLupygamelift* this = THIS; + ObjLupygamelift* this = (ObjLupygamelift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -164,7 +162,7 @@ void func_80AF0530(ObjLupygamelift* this, PlayState* play) { } void ObjLupygamelift_Update(Actor* thisx, PlayState* play) { - ObjLupygamelift* this = THIS; + ObjLupygamelift* this = (ObjLupygamelift*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index 67c417de18..0068ecaffc 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjMakekinsuta*)thisx) - void ObjMakekinsuta_Init(Actor* thisx, PlayState* play); void ObjMakekinsuta_Destroy(Actor* thisx, PlayState* play); void ObjMakekinsuta_Update(Actor* thisx, PlayState* play); @@ -46,7 +44,7 @@ bool func_8099FA40(ObjMakekinsuta* this, PlayState* play) { } void ObjMakekinsuta_Init(Actor* thisx, PlayState* play) { - ObjMakekinsuta* this = THIS; + ObjMakekinsuta* this = (ObjMakekinsuta*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (!func_8099FA40(this, play)) { @@ -58,7 +56,7 @@ void ObjMakekinsuta_Init(Actor* thisx, PlayState* play) { } void ObjMakekinsuta_Destroy(Actor* thisx, PlayState* play) { - ObjMakekinsuta* this = THIS; + ObjMakekinsuta* this = (ObjMakekinsuta*)thisx; if (func_8099FA40(this, play)) { Flags_UnsetSwitch(play, OBJMAKEKINSUTA_GET_SWITCH_FLAG(thisx)); @@ -104,7 +102,7 @@ void func_8099FB64(Actor* thisx, PlayState* play) { } void ObjMakekinsuta_Update(Actor* thisx, PlayState* play) { - ObjMakekinsuta* this = THIS; + ObjMakekinsuta* this = (ObjMakekinsuta*)thisx; if (Flags_GetSwitch(play, OBJMAKEKINSUTA_GET_SWITCH_FLAG(thisx))) { this->actor.update = func_8099FD7C; diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index 109bab27c2..d2627a222d 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjMakeoshihiki*)thisx) - void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play); void ObjMakeoshihiki_Update(Actor* thisx, PlayState* play); @@ -56,7 +54,7 @@ void ObjMakeoshihiki_SetSwitchFlags(ObjMakeoshihiki* this, PlayState* play, s32 } void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play) { - ObjMakeoshihiki* this = THIS; + ObjMakeoshihiki* this = (ObjMakeoshihiki*)thisx; Vec3s* childPoint; Path* path; s32 childPointIndex; @@ -73,7 +71,7 @@ void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play) { } void ObjMakeoshihiki_Update(Actor* thisx, PlayState* play) { - ObjMakeoshihiki* this = THIS; + ObjMakeoshihiki* this = (ObjMakeoshihiki*)thisx; Actor* child; s32 loopPathIndex; Vec3f pathPointF; diff --git a/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c b/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c index b1974c4e37..9addcd995a 100644 --- a/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c +++ b/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMilkBin*)thisx) - void ObjMilkBin_Init(Actor* thisx, PlayState* play); void ObjMilkBin_Destroy(Actor* thisx, PlayState* play); void ObjMilkBin_Update(Actor* thisx, PlayState* play2); @@ -49,7 +47,7 @@ static ColliderCylinderInit sCylinderInit = { }; void ObjMilkBin_Init(Actor* thisx, PlayState* play) { - ObjMilkBin* this = THIS; + ObjMilkBin* this = (ObjMilkBin*)thisx; Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); Collider_UpdateCylinder(&this->actor, &this->collider); @@ -64,14 +62,14 @@ void ObjMilkBin_Init(Actor* thisx, PlayState* play) { } void ObjMilkBin_Destroy(Actor* thisx, PlayState* play) { - ObjMilkBin* this = THIS; + ObjMilkBin* this = (ObjMilkBin*)thisx; Collider_DestroyCylinder(play, &this->collider); } void ObjMilkBin_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjMilkBin* this = THIS; + ObjMilkBin* this = (ObjMilkBin*)thisx; if (this->type == OBJ_MILK_BIN_TYPE_1) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_DEFENDED_AGAINST_ALIENS)) { @@ -95,7 +93,7 @@ void ObjMilkBin_Update(Actor* thisx, PlayState* play2) { } void ObjMilkBin_Draw(Actor* thisx, PlayState* play) { - ObjMilkBin* this = THIS; + ObjMilkBin* this = (ObjMilkBin*)thisx; if (!(this->disableDraw & 1)) { Gfx_DrawDListOpa(play, gMilkBinMilkJarDL); diff --git a/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.c b/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.c index 18608347a0..5fb142071e 100644 --- a/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.c +++ b/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMine*)thisx) - #define LINK_SIZE 12.0f #define ATTACH_OFFSET 10.0f #define PATH_RADIUS 32.0f @@ -674,7 +672,7 @@ void ObjMine_Water_UpdateChain(ObjMine* this, PlayState* play) { void ObjMine_Init(Actor* thisx, PlayState* play) { s32 pad; // Can be playstate recast. Must be gamestate recast. - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; s32 pathIndex = OBJMINE_GET_PATH_INDEX(&this->actor); Path* path; s32 bgId; // not used @@ -745,7 +743,7 @@ void ObjMine_Init(Actor* thisx, PlayState* play) { } void ObjMine_Destroy(Actor* thisx, PlayState* play) { - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -1065,7 +1063,7 @@ void ObjMine_Water_Stationary(ObjMine* this, PlayState* play) { void ObjMine_Path_Update(Actor* thisx, PlayState* play) { s32 pad; // Can be playstate recast. - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; if ((this->collider.base.ocFlags2 & OC2_HIT_PLAYER) || (this->collider.base.acFlags & AC_HIT)) { ObjMine_Path_SpawnBomb(this, play); @@ -1086,14 +1084,14 @@ void ObjMine_Path_Update(Actor* thisx, PlayState* play) { } void ObjMine_AirWater_Update(Actor* thisx, PlayState* play) { - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; this->actionFunc(this, play); } void ObjMine_Path_Draw(Actor* thisx, PlayState* play) { s32 pad; // Can be playstate recast - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -1131,7 +1129,7 @@ void ObjMine_DrawExplosion(Actor* thisx, PlayState* play) { void ObjMine_Air_Draw(Actor* thisx, PlayState* play) { s32 pad; // Can be playstate recast - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; s32 linkCount = OBJMINE_GET_LINK_COUNT(&this->actor); ObjMineAirChain* airChain = &this->chain.air; ObjMineAirLink* airLink; @@ -1189,7 +1187,7 @@ void ObjMine_Air_Draw(Actor* thisx, PlayState* play) { void ObjMine_Water_Draw(Actor* thisx, PlayState* play) { s32 pad; // Can be playstate recast - ObjMine* this = THIS; + ObjMine* this = (ObjMine*)thisx; s32 linkCount = OBJMINE_GET_LINK_COUNT(&this->actor); ObjMineWaterChain* waterChain = &this->chain.water; ObjMineWaterLink* waterLink; diff --git a/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c b/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c index e3abd28633..758678ea89 100644 --- a/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c +++ b/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_100000) -#define THIS ((ObjMoonStone*)thisx) - void ObjMoonStone_Init(Actor* thisx, PlayState* play); void ObjMoonStone_Destroy(Actor* thisx, PlayState* play); void ObjMoonStone_Update(Actor* thisx, PlayState* play); @@ -38,7 +36,7 @@ ActorProfile Obj_Moon_Stone_Profile = { }; void ObjMoonStone_Init(Actor* thisx, PlayState* play) { - ObjMoonStone* this = THIS; + ObjMoonStone* this = (ObjMoonStone*)thisx; Actor_SetScale(&this->actor, 0.3f); this->unk194 = (this->actor.params & 0xF000) >> 0xC; @@ -134,7 +132,7 @@ void func_80C06870(ObjMoonStone* this, PlayState* play) { } void ObjMoonStone_Update(Actor* thisx, PlayState* play) { - ObjMoonStone* this = THIS; + ObjMoonStone* this = (ObjMoonStone*)thisx; Player* player = GET_PLAYER(play); if (!(player->stateFlags1 & (PLAYER_STATE1_2 | PLAYER_STATE1_DEAD | PLAYER_STATE1_200 | PLAYER_STATE1_10000000))) { diff --git a/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c b/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c index e8ee2f30b8..cd135b876c 100644 --- a/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c +++ b/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((ObjMuPict*)thisx) - void ObjMuPict_Init(Actor* thisx, PlayState* play); void ObjMuPict_Destroy(Actor* thisx, PlayState* play); void ObjMuPict_Update(Actor* thisx, PlayState* play); @@ -38,7 +36,7 @@ ActorProfile Obj_Mu_Pict_Profile = { }; void ObjMuPict_Init(Actor* thisx, PlayState* play) { - ObjMuPict* this = THIS; + ObjMuPict* this = (ObjMuPict*)thisx; if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_75_20) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE)) { Actor_Kill(&this->actor); @@ -197,7 +195,7 @@ void func_80C06E88(ObjMuPict* this, PlayState* play) { } void ObjMuPict_Update(Actor* thisx, PlayState* play) { - ObjMuPict* this = THIS; + ObjMuPict* this = (ObjMuPict*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index d2636d9d22..251b4f3c5b 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMure*)thisx) - void ObjMure_Init(Actor* thisx, PlayState* play); void ObjMure_Destroy(Actor* thisx, PlayState* play); void ObjMure_Update(Actor* thisx, PlayState* play); @@ -97,7 +95,7 @@ s32 func_808D7928(ObjMure* this, PlayState* play) { } void ObjMure_Init(Actor* thisx, PlayState* play) { - ObjMure* this = THIS; + ObjMure* this = (ObjMure*)thisx; this->chNum = OBJ_MURE_GET_CHNUM(&this->actor); this->ptn = OBJ_MURE_GET_PTN(&this->actor); @@ -133,7 +131,7 @@ void ObjMure_GetSpawnPos(Vec3f* outPos, Vec3f* inPos, s32 ptn, s32 idx) { } void ObjMure_SpawnActors0(Actor* thisx, PlayState* play) { - ObjMure* this = THIS; + ObjMure* this = (ObjMure*)thisx; s32 i; Vec3f pos; s32 pad; @@ -406,7 +404,7 @@ void ObjMure_ActiveState(ObjMure* this, PlayState* play) { } void ObjMure_Update(Actor* thisx, PlayState* play) { - ObjMure* this = THIS; + ObjMure* this = (ObjMure*)thisx; if (this->unk_19C > 0) { this->unk_19C--; diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index b9bdd7d5c8..092cbd797a 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMure2*)thisx) - #define OBJ_MURE2_CHILD_COUNT_BUSH_RING 9 #define OBJ_MURE2_CHILD_COUNT_BUSH_SCATTERED 12 #define OBJ_MURE2_CHILD_COUNT_ROCK_RING 8 @@ -189,7 +187,7 @@ static InitChainEntry sInitChain[] = { }; void ObjMure2_Init(Actor* thisx, PlayState* play) { - ObjMure2* this = THIS; + ObjMure2* this = (ObjMure2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (play->csCtx.state != CS_STATE_IDLE) { @@ -235,7 +233,7 @@ void ObjMure2_WaitForPlayerOutOfRange(ObjMure2* this, PlayState* play) { } void ObjMure2_Update(Actor* thisx, PlayState* play) { - ObjMure2* this = THIS; + ObjMure2* this = (ObjMure2*)thisx; if (play->csCtx.state == CS_STATE_IDLE) { this->rangeMultiplier = 1.0f; diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c index aca3a7a070..1bbe7a1ce7 100644 --- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMure3*)thisx) - void ObjMure3_Init(Actor* thisx, PlayState* play); void ObjMure3_Destroy(Actor* thisx, PlayState* play); void ObjMure3_Update(Actor* thisx, PlayState* play); @@ -145,7 +143,7 @@ void func_8098F438(ObjMure3* this, PlayState* play) { } void ObjMure3_Init(Actor* thisx, PlayState* play) { - ObjMure3* this = THIS; + ObjMure3* this = (ObjMure3*)thisx; if (Flags_GetSwitch(play, OBJMURE3_GET_SWITCH_FLAG(&this->actor))) { Actor_Kill(&this->actor); @@ -194,7 +192,7 @@ void func_8098F680(ObjMure3* this, PlayState* play) { } void ObjMure3_Update(Actor* thisx, PlayState* play) { - ObjMure3* this = THIS; + ObjMure3* this = (ObjMure3*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c index 72fc09c919..641da1e512 100644 --- a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c +++ b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjNozoki*)thisx) - void ObjNozoki_Init(Actor* thisx, PlayState* play); void ObjNozoki_Destroy(Actor* thisx, PlayState* play); void ObjNozoki_Update(Actor* thisx, PlayState* play); @@ -64,7 +62,7 @@ void ObjNozoki_SetupAction(ObjNozoki* this, ObjNozokiActionFunc actionFunc) { } void ObjNozoki_Init(Actor* thisx, PlayState* play) { - ObjNozoki* this = THIS; + ObjNozoki* this = (ObjNozoki*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); this->dyna.actor.shape.rot.x = 0; @@ -85,7 +83,7 @@ void ObjNozoki_Init(Actor* thisx, PlayState* play) { } void ObjNozoki_Destroy(Actor* thisx, PlayState* play) { - ObjNozoki* this = THIS; + ObjNozoki* this = (ObjNozoki*)thisx; if (this->unk_15C == 0) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -448,7 +446,7 @@ void func_80BA3344(ObjNozoki* this, PlayState* play) { } void ObjNozoki_Update(Actor* thisx, PlayState* play) { - ObjNozoki* this = THIS; + ObjNozoki* this = (ObjNozoki*)thisx; this->actionFunc(this, play); } @@ -462,7 +460,7 @@ Gfx* D_80BA34FC[] = { }; void ObjNozoki_Draw(Actor* thisx, PlayState* play) { - ObjNozoki* this = THIS; + ObjNozoki* this = (ObjNozoki*)thisx; if (this->unk_15C == 1) { GetItem_Draw(play, GID_MASK_SUN); diff --git a/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c b/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c index e030377b6f..df87b7889d 100644 --- a/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c +++ b/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjOcarinalift*)thisx) - void ObjOcarinalift_Init(Actor* thisx, PlayState* play); void ObjOcarinalift_Destroy(Actor* thisx, PlayState* play); void ObjOcarinalift_Update(Actor* thisx, PlayState* play); @@ -57,7 +55,7 @@ void func_80AC94C0(ObjOcarinalift* this, s32 arg1) { void ObjOcarinalift_Init(Actor* thisx, PlayState* play) { Path* path; - ObjOcarinalift* this = THIS; + ObjOcarinalift* this = (ObjOcarinalift*)thisx; Actor_ProcessInitChain(thisx, sInitChain); this->dyna.actor.shape.rot.x = 0; @@ -86,7 +84,7 @@ void ObjOcarinalift_Init(Actor* thisx, PlayState* play) { } void ObjOcarinalift_Destroy(Actor* thisx, PlayState* play) { - ObjOcarinalift* this = THIS; + ObjOcarinalift* this = (ObjOcarinalift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -253,7 +251,7 @@ void func_80AC9C48(ObjOcarinalift* this, PlayState* play) { } void ObjOcarinalift_Update(Actor* thisx, PlayState* play) { - ObjOcarinalift* this = THIS; + ObjOcarinalift* this = (ObjOcarinalift*)thisx; this->actionFunc(this, play); Actor_SetFocus(&this->dyna.actor, 10.0f); @@ -266,7 +264,7 @@ void ObjOcarinalift_Update(Actor* thisx, PlayState* play) { } void ObjOcarinalift_Draw(Actor* thisx, PlayState* play) { - ObjOcarinalift* this = THIS; + ObjOcarinalift* this = (ObjOcarinalift*)thisx; Gfx_DrawDListOpa(play, object_raillift_DL_001E40); Gfx_DrawDListXlu(play, object_raillift_DL_001DB0); diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 58f86a3920..7a0de3fdd8 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjOshihiki*)thisx) - void ObjOshihiki_Init(Actor* thisx, PlayState* play); void ObjOshihiki_Destroy(Actor* thisx, PlayState* play); void ObjOshihiki_Update(Actor* thisx, PlayState* play); @@ -194,7 +192,7 @@ void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play) { } void ObjOshihiki_Init(Actor* thisx, PlayState* play) { - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -237,7 +235,7 @@ void ObjOshihiki_Init(Actor* thisx, PlayState* play) { } void ObjOshihiki_Destroy(Actor* thisx, PlayState* play) { - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -567,7 +565,7 @@ void ObjOshihiki_Fall(ObjOshihiki* this, PlayState* play) { } void ObjOshihiki_Update(Actor* thisx, PlayState* play) { - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; this->stateFlags &= ~(PUSHBLOCK_SETUP_FALL | PUSHBLOCK_FALL | PUSHBLOCK_SETUP_PUSH | PUSHBLOCK_PUSH | PUSHBLOCK_SETUP_ON_ACTOR | @@ -588,7 +586,7 @@ void ObjOshihiki_Update(Actor* thisx, PlayState* play) { void ObjOshihiki_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c b/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c index 67963f4ee1..addaf1519f 100644 --- a/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c +++ b/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjPurify*)thisx) - void ObjPurify_Init(Actor* thisx, PlayState* play); void ObjPurify_Destroy(Actor* thisx, PlayState* play); void ObjPurify_Update(Actor* thisx, PlayState* play); @@ -122,7 +120,7 @@ s32 ObjPurify_IsPurified(ObjPurify* this) { void ObjPurify_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjPurify* this = THIS; + ObjPurify* this = (ObjPurify*)thisx; ObjPurifyInfo* info = &sObjPurifyInfo[OBJPURIFY_GET_INFO_INDEX(&this->dyna.actor)]; s32 sp20 = OBJPURIFY_GET_UNK_FLAG(thisx); @@ -143,7 +141,7 @@ void ObjPurify_Init(Actor* thisx, PlayState* play) { } void ObjPurify_Destroy(Actor* thisx, PlayState* play) { - ObjPurify* this = THIS; + ObjPurify* this = (ObjPurify*)thisx; if (OBJPURIFY_GET_UNK_FLAG(&this->dyna.actor) == 1) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -236,14 +234,14 @@ void ObjPurify_DoNothing(ObjPurify* this, PlayState* play) { } void ObjPurify_Update(Actor* thisx, PlayState* play) { - ObjPurify* this = THIS; + ObjPurify* this = (ObjPurify*)thisx; this->actionFunc(this, play); } void func_80A851C8(Actor* thisx, PlayState* play) { s32 pad; - ObjPurify* this = THIS; + ObjPurify* this = (ObjPurify*)thisx; ObjPurifyInfo* info = &sObjPurifyInfo[OBJPURIFY_GET_INFO_INDEX(&this->dyna.actor)]; Gfx* opaDList = info->opaDLists[this->gfxIndex]; Gfx* xluDList = info->xluDLists[this->gfxIndex]; @@ -270,7 +268,7 @@ void func_80A851C8(Actor* thisx, PlayState* play) { void func_80A85304(Actor* thisx, PlayState* play) { s32 pad; - ObjPurify* this = THIS; + ObjPurify* this = (ObjPurify*)thisx; ObjPurifyInfo* info = &sObjPurifyInfo[OBJPURIFY_GET_INFO_INDEX(&this->dyna.actor)]; s32 sp6C[2]; s32 i; diff --git a/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c b/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c index 1f244f1581..d9ac422f75 100644 --- a/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c +++ b/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CAN_PRESS_SWITCHES) -#define THIS ((ObjPzlblock*)thisx) - void ObjPzlblock_Init(Actor* thisx, PlayState* play); void ObjPzlblock_Destroy(Actor* thisx, PlayState* play); void ObjPzlblock_Update(Actor* thisx, PlayState* play); @@ -193,7 +191,7 @@ void func_809A376C(ObjPzlblock* this, s32 arg1) { void ObjPzlblock_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjPzlblock* this = THIS; + ObjPzlblock* this = (ObjPzlblock*)thisx; s32 sp2C = OBJPZLBLOCK_GET_ROTZ(&this->dyna.actor); s32 sp28 = this->dyna.actor.home.rot.x & 0xF; ObjPzlblockStruct* sp24 = &D_809A4060[OBJPZLBLOCK_GET_1000(&this->dyna.actor)]; @@ -233,7 +231,7 @@ void ObjPzlblock_Init(Actor* thisx, PlayState* play) { } void ObjPzlblock_Destroy(Actor* thisx, PlayState* play) { - ObjPzlblock* this = THIS; + ObjPzlblock* this = (ObjPzlblock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -325,7 +323,7 @@ void func_809A3D38(ObjPzlblock* this, PlayState* play) { void ObjPzlblock_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjPzlblock* this = THIS; + ObjPzlblock* this = (ObjPzlblock*)thisx; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y; Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 15.0f, 30.0f, 0.0f, UPDBGCHECKINFO_FLAG_4); @@ -342,7 +340,7 @@ void ObjPzlblock_Update(Actor* thisx, PlayState* play) { } void func_809A3E58(Actor* thisx, PlayState* play) { - ObjPzlblock* this = THIS; + ObjPzlblock* this = (ObjPzlblock*)thisx; this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c b/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c index a8db4848b9..1b6eeb5515 100644 --- a/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c +++ b/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjRaillift*)thisx) - void ObjRaillift_Init(Actor* thisx, PlayState* play); void ObjRaillift_Destroy(Actor* thisx, PlayState* play); void ObjRaillift_Update(Actor* thisx, PlayState* play); @@ -54,7 +52,7 @@ void ObjRaillift_UpdatePosition(ObjRaillift* this, s32 index) { } void ObjRaillift_Init(Actor* thisx, PlayState* play) { - ObjRaillift* this = THIS; + ObjRaillift* this = (ObjRaillift*)thisx; s32 pad; Path* path; s32 type = OBJRAILLIFT_GET_TYPE(thisx); @@ -101,7 +99,7 @@ void ObjRaillift_Init(Actor* thisx, PlayState* play) { } void ObjRaillift_Destroy(Actor* thisx, PlayState* play) { - ObjRaillift* this = THIS; + ObjRaillift* this = (ObjRaillift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -214,7 +212,7 @@ void ObjRaillift_StartCutscene(ObjRaillift* this, PlayState* play) { } void ObjRaillift_Update(Actor* thisx, PlayState* play) { - ObjRaillift* this = THIS; + ObjRaillift* this = (ObjRaillift*)thisx; this->actionFunc(this, play); Actor_SetFocus(thisx, 10.0f); diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index b1f7f88650..c5d6a027f2 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjRoomtimer*)thisx) - void ObjRoomtimer_Init(Actor* thisx, PlayState* play); void ObjRoomtimer_Destroy(Actor* thisx, PlayState* play); void ObjRoomtimer_Update(Actor* thisx, PlayState* play); @@ -31,7 +29,7 @@ ActorProfile Obj_Roomtimer_Profile = { }; void ObjRoomtimer_Init(Actor* thisx, PlayState* play) { - ObjRoomtimer* this = THIS; + ObjRoomtimer* this = (ObjRoomtimer*)thisx; this->switchFlag = ROOMTIMER_GET_SWITCH_FLAG(thisx); this->actor.params &= 0x1FF; @@ -43,7 +41,7 @@ void ObjRoomtimer_Init(Actor* thisx, PlayState* play) { } void ObjRoomtimer_Destroy(Actor* thisx, PlayState* play) { - ObjRoomtimer* this = THIS; + ObjRoomtimer* this = (ObjRoomtimer*)thisx; if ((this->actor.params != 0x1FF) && (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] >= TIMER_STATE_START)) { gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP; @@ -88,7 +86,7 @@ void func_80973DE0(ObjRoomtimer* this, PlayState* play) { } void ObjRoomtimer_Update(Actor* thisx, PlayState* play) { - ObjRoomtimer* this = THIS; + ObjRoomtimer* this = (ObjRoomtimer*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Rotlift/z_obj_rotlift.c b/src/overlays/actors/ovl_Obj_Rotlift/z_obj_rotlift.c index 2152dbd8b3..ddacba5be3 100644 --- a/src/overlays/actors/ovl_Obj_Rotlift/z_obj_rotlift.c +++ b/src/overlays/actors/ovl_Obj_Rotlift/z_obj_rotlift.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjRotlift*)thisx) - void ObjRotlift_Init(Actor* thisx, PlayState* play2); void ObjRotlift_Destroy(Actor* thisx, PlayState* play); void ObjRotlift_Update(Actor* thisx, PlayState* play); @@ -83,7 +81,7 @@ void ObjRotlift_MoveDekuFlowers(ObjRotlift* this) { void ObjRotlift_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjRotlift* this = THIS; + ObjRotlift* this = (ObjRotlift*)thisx; s32 type = OBJROTLIFT_GET_TYPE(&this->dyna.actor); s32 dekuFlowerParams; s32 i; @@ -119,13 +117,13 @@ void ObjRotlift_Init(Actor* thisx, PlayState* play2) { } void ObjRotlift_Destroy(Actor* thisx, PlayState* play) { - ObjRotlift* this = THIS; + ObjRotlift* this = (ObjRotlift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjRotlift_Update(Actor* thisx, PlayState* play) { - ObjRotlift* this = THIS; + ObjRotlift* this = (ObjRotlift*)thisx; s16 angShift; s32 angVelocity; @@ -145,7 +143,7 @@ void ObjRotlift_Update(Actor* thisx, PlayState* play) { void ObjRotlift_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjRotlift* this = THIS; + ObjRotlift* this = (ObjRotlift*)thisx; ObjRotliftModelInfo* modelInfo = &sModelInfo[OBJROTLIFT_GET_TYPE(&this->dyna.actor)]; // Neither of the displaylists reference other segments, so this call is ultimately pointless. diff --git a/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c b/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c index fa8688479a..8f9f332c67 100644 --- a/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c +++ b/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjShutter*)thisx) - void ObjShutter_Init(Actor* thisx, PlayState* play); void ObjShutter_Destroy(Actor* thisx, PlayState* play); void ObjShutter_Update(Actor* thisx, PlayState* play2); @@ -37,7 +35,7 @@ void ObjShutter_Destroy(Actor* thisx, PlayState* play) { #include "src/overlays/actors/ovl_Obj_Shutter/scheduleScripts.schl.inc" void ObjShutter_Update(Actor* thisx, PlayState* play2) { - ObjShutter* this = THIS; + ObjShutter* this = (ObjShutter*)thisx; PlayState* play = play2; ScheduleOutput scheduleOutput; @@ -72,7 +70,7 @@ void ObjShutter_Update(Actor* thisx, PlayState* play2) { } void ObjShutter_Draw(Actor* thisx, PlayState* play) { - ObjShutter* this = THIS; + ObjShutter* this = (ObjShutter*)thisx; Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + this->verticalOffset, this->actor.world.pos.z, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c b/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c index 1b64089e77..f641469073 100644 --- a/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c +++ b/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjSkateblock*)thisx) - void ObjSkateblock_Init(Actor* thisx, PlayState* play); void ObjSkateblock_Destroy(Actor* thisx, PlayState* play); void ObjSkateblock_Update(Actor* thisx, PlayState* play); @@ -486,7 +484,7 @@ void func_80A21F74(ObjSkateblock* this, PlayState* play) { } void ObjSkateblock_Init(Actor* thisx, PlayState* play) { - ObjSkateblock* this = THIS; + ObjSkateblock* this = (ObjSkateblock*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -501,7 +499,7 @@ void ObjSkateblock_Init(Actor* thisx, PlayState* play) { } void ObjSkateblock_Destroy(Actor* thisx, PlayState* play) { - ObjSkateblock* this = THIS; + ObjSkateblock* this = (ObjSkateblock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -670,7 +668,7 @@ void func_80A227C0(ObjSkateblock* this, PlayState* play) { } void ObjSkateblock_Update(Actor* thisx, PlayState* play) { - ObjSkateblock* this = THIS; + ObjSkateblock* this = (ObjSkateblock*)thisx; D_80A22A10 &= ~(1 << this->unk_1C0); this->actionFunc(this, play); @@ -679,7 +677,7 @@ void ObjSkateblock_Update(Actor* thisx, PlayState* play) { void ObjSkateblock_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjSkateblock* this = THIS; + ObjSkateblock* this = (ObjSkateblock*)thisx; Color_RGB8* sp2C = &D_80A22B08[OBJSKAEBLOCK_GET_F(&this->dyna.actor)]; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Smork/z_obj_smork.c b/src/overlays/actors/ovl_Obj_Smork/z_obj_smork.c index dc178411f6..a1e85162e5 100644 --- a/src/overlays/actors/ovl_Obj_Smork/z_obj_smork.c +++ b/src/overlays/actors/ovl_Obj_Smork/z_obj_smork.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjSmork*)thisx) - void ObjSmork_Init(Actor* thisx, PlayState* play); void ObjSmork_Destroy(Actor* thisx, PlayState* play); void ObjSmork_Update(Actor* thisx, PlayState* play); @@ -128,7 +126,7 @@ void func_80A3D9C4(ObjSmork* this, PlayState* play) { } void ObjSmork_Init(Actor* thisx, PlayState* play) { - ObjSmork* this = THIS; + ObjSmork* this = (ObjSmork*)thisx; Lib_MemCpy(this->unk_148, ovl_Obj_Smork_Vtx_000C10, sizeof(Vtx) * ARRAY_COUNT(ovl_Obj_Smork_Vtx_000C10)); this->unk_1C6 = Rand_S16Offset(0, 59); @@ -139,13 +137,13 @@ void ObjSmork_Destroy(Actor* thisx, PlayState* play) { } void ObjSmork_Update(Actor* thisx, PlayState* play) { - ObjSmork* this = THIS; + ObjSmork* this = (ObjSmork*)thisx; func_80A3D940(this); } void ObjSmork_Draw(Actor* thisx, PlayState* play) { - ObjSmork* this = THIS; + ObjSmork* this = (ObjSmork*)thisx; func_80A3D9C4(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c b/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c index 9eefab99da..fface06afb 100644 --- a/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c +++ b/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjSnowball*)thisx) - void ObjSnowball_Init(Actor* thisx, PlayState* play); void ObjSnowball_Destroy(Actor* thisx, PlayState* play); void ObjSnowball_Update(Actor* thisx, PlayState* play); @@ -448,7 +446,7 @@ void func_80B03FF8(ObjSnowball* this, PlayState* play) { } void ObjSnowball_Init(Actor* thisx, PlayState* play) { - ObjSnowball* this = THIS; + ObjSnowball* this = (ObjSnowball*)thisx; Sphere16* sphere; ColliderJntSphElementDim* elementDim; Vec3f sp48; @@ -515,7 +513,7 @@ void ObjSnowball_Init(Actor* thisx, PlayState* play) { } void ObjSnowball_Destroy(Actor* thisx, PlayState* play) { - ObjSnowball* this = THIS; + ObjSnowball* this = (ObjSnowball*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -751,7 +749,7 @@ void func_80B04B60(ObjSnowball* this, PlayState* play) { void ObjSnowball_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjSnowball* this = THIS; + ObjSnowball* this = (ObjSnowball*)thisx; s32 sp24 = false; if (this->actor.home.rot.y == 1) { @@ -790,14 +788,14 @@ void ObjSnowball_Update(Actor* thisx, PlayState* play) { } void ObjSnowball_Draw(Actor* thisx, PlayState* play) { - ObjSnowball* this = THIS; + ObjSnowball* this = (ObjSnowball*)thisx; Gfx_DrawDListOpa(play, object_goroiwa_DL_008B90); } void func_80B04D34(Actor* thisx, PlayState* play) { s32 pad; - ObjSnowball* this = THIS; + ObjSnowball* this = (ObjSnowball*)thisx; ObjSnowballStruct* ptr; s32 i; MtxF sp88; diff --git a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c index 6c2351c065..2e5e3941bb 100644 --- a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c +++ b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_THROW_ONLY) -#define THIS ((ObjSnowball2*)thisx) - void ObjSnowball2_Init(Actor* thisx, PlayState* play); void ObjSnowball2_Destroy(Actor* thisx, PlayState* play); void ObjSnowball2_Update(Actor* thisx, PlayState* play); @@ -190,7 +188,7 @@ void func_80B39108(ObjSnowball2* this, PlayState* play) { } void func_80B39470(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; Vec3f sp58; s32 phi_s0; s32 i; @@ -213,7 +211,7 @@ void func_80B395C4(PlayState* play, Vec3f* arg1) { } void func_80B395EC(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; Vec3f sp18; sp18.x = this->actor.world.pos.x; @@ -259,7 +257,7 @@ void func_80B39638(PlayState* play, Vec3f* arg1) { } void func_80B39834(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; s32 i; for (i = 0; i < 3; i++) { @@ -312,7 +310,7 @@ static InitChainEntry sInitChain[] = { }; void ObjSnowball2_Init(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitJntSph(play, &this->collider); @@ -329,7 +327,7 @@ void ObjSnowball2_Init(Actor* thisx, PlayState* play) { } void ObjSnowball2_Destroy(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; Collider_DestroyJntSph(play, &this->collider); } @@ -601,7 +599,7 @@ void func_80B3A500(ObjSnowball2* this, PlayState* play) { } void ObjSnowball2_Update(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; this->actionFunc(this, play); @@ -621,7 +619,7 @@ void ObjSnowball2_Update(Actor* thisx, PlayState* play) { } void ObjSnowball2_Draw(Actor* thisx, PlayState* play) { - ObjSnowball2* this = THIS; + ObjSnowball2* this = (ObjSnowball2*)thisx; Gfx_DrawDListOpa(play, object_goroiwa_DL_008B90); } diff --git a/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c b/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c index c164c896e0..604a967f50 100644 --- a/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c +++ b/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjSound*)thisx) - void ObjSound_Init(Actor* thisx, PlayState* play); void ObjSound_Destroy(Actor* thisx, PlayState* play); void ObjSound_Update(Actor* thisx, PlayState* play); @@ -28,7 +26,7 @@ ActorProfile Obj_Sound_Profile = { }; void ObjSound_Init(Actor* thisx, PlayState* play) { - ObjSound* this = THIS; + ObjSound* this = (ObjSound*)thisx; this->unk_144 = false; this->soundType = OBJ_SOUND_GET_TYPE(&this->actor); @@ -40,7 +38,7 @@ void ObjSound_Init(Actor* thisx, PlayState* play) { } void ObjSound_Destroy(Actor* thisx, PlayState* play) { - ObjSound* this = THIS; + ObjSound* this = (ObjSound*)thisx; if (this->soundType == OBJ_SOUND_TYPE_BGM) { Audio_PlayObjSoundBgm(NULL, NA_BGM_GENERAL_SFX); @@ -48,7 +46,7 @@ void ObjSound_Destroy(Actor* thisx, PlayState* play) { } void ObjSound_Update(Actor* thisx, PlayState* play) { - ObjSound* this = THIS; + ObjSound* this = (ObjSound*)thisx; if (this->soundType == OBJ_SOUND_TYPE_SFX) { if (this->sfxType != 0) { @@ -68,7 +66,7 @@ void ObjSound_Update(Actor* thisx, PlayState* play) { } void ObjSound_Draw(Actor* thisx, PlayState* play) { - ObjSound* this = THIS; + ObjSound* this = (ObjSound*)thisx; if (CHECK_EVENTINF(EVENTINF_41) || CHECK_EVENTINF(EVENTINF_35)) { Audio_PlayObjSoundFanfare(&this->actor.projectedPos, this->actor.params); diff --git a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c index 93bd5d79ee..4f61db7eb5 100644 --- a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c +++ b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_UCODE_POINT_LIGHT_ENABLED) -#define THIS ((ObjSpidertent*)thisx) - void ObjSpidertent_Init(Actor* thisx, PlayState* play); void ObjSpidertent_Destroy(Actor* thisx, PlayState* play); void ObjSpidertent_Update(Actor* thisx, PlayState* play); @@ -447,7 +445,7 @@ bool func_80B2FC98(TriNorm* triNorm, Vec3f* arg1) { } void func_80B300F4(ObjSpidertent* thisx, PlayState* play, TriNorm* triNorm, Vec3f* arg3, f32 arg4, s32 arg5) { - ObjSpidertent* this = THIS; + ObjSpidertent* this = (ObjSpidertent*)thisx; ObjSpidertentStruct* spE0 = &D_80B31350[OBJSPIDERTENT_GET_1(&this->dyna.actor)]; f32 temp_f24; f32 phi_f22; @@ -551,7 +549,7 @@ s32 func_80B30480(ObjSpidertent* this, PlayState* play, Vec3f* arg2) { void ObjSpidertent_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjSpidertent* this = THIS; + ObjSpidertent* this = (ObjSpidertent*)thisx; s32 temp_s1 = OBJSPIDERTENT_GET_1(&this->dyna.actor); ObjSpidertentStruct* ptr = &D_80B31350[temp_s1]; ColliderTrisElementInit* element; @@ -597,7 +595,7 @@ void ObjSpidertent_Init(Actor* thisx, PlayState* play) { } void ObjSpidertent_Destroy(Actor* thisx, PlayState* play) { - ObjSpidertent* this = THIS; + ObjSpidertent* this = (ObjSpidertent*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(play, &this->collider); @@ -797,13 +795,13 @@ void func_80B30AF8(ObjSpidertent* this, PlayState* play) { } void ObjSpidertent_Update(Actor* thisx, PlayState* play) { - ObjSpidertent* this = THIS; + ObjSpidertent* this = (ObjSpidertent*)thisx; this->actionFunc(this, play); } void ObjSpidertent_Draw(Actor* thisx, PlayState* play) { - ObjSpidertent* this = THIS; + ObjSpidertent* this = (ObjSpidertent*)thisx; s32 params = OBJSPIDERTENT_GET_1(&this->dyna.actor); s32 temp_f18 = this->unk_3C5 * (29.0f / 51); Gfx* gfx; diff --git a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c index b605780613..832eeeba46 100644 --- a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c +++ b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjSpinyroll*)thisx) - void ObjSpinyroll_Init(Actor* thisx, PlayState* play); void ObjSpinyroll_Destroy(Actor* thisx, PlayState* play); void ObjSpinyroll_Update(Actor* thisx, PlayState* play2); @@ -163,7 +161,7 @@ void func_80A1DAAC(Vec3f* arg0, Vec3f* arg1, s16 arg2) { } void func_80A1DB2C(Actor* thisx) { - ObjSpinyroll* this = THIS; + ObjSpinyroll* this = (ObjSpinyroll*)thisx; s32 i; s32 j; s32 params = OBJSPINYROLL_GET_C000(&this->dyna.actor); @@ -449,7 +447,7 @@ s32 func_80A1E6D4(ObjSpinyroll* this, PlayState* play) { void ObjSpinyroll_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjSpinyroll* this = THIS; + ObjSpinyroll* this = (ObjSpinyroll*)thisx; f32 sp44; Path* path; s32 pad2; @@ -511,7 +509,7 @@ void ObjSpinyroll_Init(Actor* thisx, PlayState* play) { } void ObjSpinyroll_Destroy(Actor* thisx, PlayState* play) { - ObjSpinyroll* this = THIS; + ObjSpinyroll* this = (ObjSpinyroll*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(play, &this->collider); @@ -629,7 +627,7 @@ void func_80A1ECD4(ObjSpinyroll* this, PlayState* play) { void ObjSpinyroll_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjSpinyroll* this = THIS; + ObjSpinyroll* this = (ObjSpinyroll*)thisx; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; @@ -647,7 +645,7 @@ void ObjSpinyroll_Update(Actor* thisx, PlayState* play2) { } void ObjSpinyroll_Draw(Actor* thisx, PlayState* play) { - ObjSpinyroll* this = THIS; + ObjSpinyroll* this = (ObjSpinyroll*)thisx; f32 temp_f26; f32 temp_f28; s32 temp_s1 = OBJSPINYROLL_GET_C000(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 0705035f22..7fa2fc7fec 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjSwitch*)thisx) - #define COS_OF_5_PI_DIV_8 -0.38268343f void ObjSwitch_Init(Actor* thisx, PlayState* play); @@ -333,7 +331,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) { s32 pad; s32 type; u32 isSwitchFlagSet; - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; s32 pad2; isSwitchFlagSet = Flags_GetSwitch(play, OBJ_SWITCH_GET_SWITCH_FLAG(&this->dyna.actor)); @@ -463,7 +461,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) { void ObjSwitch_Destroy(Actor* thisx, PlayState* play) { s32 pad; - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; s32 type = OBJ_SWITCH_GET_TYPE(&this->dyna.actor); if (type == OBJSWITCH_TYPE_FLOOR || type == OBJSWITCH_TYPE_FLOOR_RUSTY || type == OBJSWITCH_TYPE_FLOOR_LARGE) { @@ -928,7 +926,7 @@ void ObjSwitch_LargeFloorSwitchRiseUp(ObjSwitch* this, PlayState* play) { } void ObjSwitch_Update(Actor* thisx, PlayState* play) { - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; if (this->floorSwitchReleaseTimer > 0) { this->floorSwitchReleaseTimer--; @@ -1066,7 +1064,7 @@ void ObjSwitch_Draw(Actor* thisx, PlayState* play) { ObjSwitch_DrawFloorSwitch, ObjSwitch_DrawRustyFloorSwitch, ObjSwitch_DrawEyeSwitch, ObjSwitch_DrawCrystalSwitch, ObjSwitch_DrawCrystalSwitch, ObjSwitch_DrawFloorSwitch, }; - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; drawFunc[OBJ_SWITCH_GET_TYPE(&this->dyna.actor)](this, play); } diff --git a/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c b/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c index 03a041f804..b00634cd3a 100644 --- a/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c +++ b/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjSwprize*)thisx) - void ObjSwprize_Init(Actor* thisx, PlayState* play); void ObjSwprize_Destroy(Actor* thisx, PlayState* play); void ObjSwprize_Update(Actor* thisx, PlayState* play); @@ -82,7 +80,7 @@ void func_80C253D0(ObjSwprize* this, PlayState* play) { } void ObjSwprize_Init(Actor* thisx, PlayState* play) { - ObjSwprize* this = THIS; + ObjSwprize* this = (ObjSwprize*)thisx; if (Flags_GetSwitch(play, OBJ_SWPRIZE_GET_SWITCH_FLAG(&this->actor))) { ObjSwprize_SetupDoNothing(this); @@ -141,7 +139,7 @@ void ObjSwprize_DoNothing(ObjSwprize* this, PlayState* play) { } void ObjSwprize_Update(Actor* thisx, PlayState* play) { - ObjSwprize* this = THIS; + ObjSwprize* this = (ObjSwprize*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index f7e85bd199..b7b170206e 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) -#define THIS ((ObjSyokudai*)thisx) - void ObjSyokudai_Init(Actor* thisx, PlayState* play); void ObjSyokudai_Destroy(Actor* thisx, PlayState* play); void ObjSyokudai_Update(Actor* thisx, PlayState* play2); @@ -88,7 +86,7 @@ static Gfx* sDLists[] = { static s32 sNumLitTorchesInGroup; void ObjSyokudai_Init(Actor* thisx, PlayState* play) { - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; s32 pad; s32 type = OBJ_SYOKUDAI_GET_TYPE(thisx); s32 switchFlag = OBJ_SYOKUDAI_GET_SWITCH_FLAG(thisx); @@ -121,7 +119,7 @@ void ObjSyokudai_Init(Actor* thisx, PlayState* play) { } void ObjSyokudai_Destroy(Actor* thisx, PlayState* play) { - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; Collider_DestroyCylinder(play, &this->standCollider); Collider_DestroyCylinder(play, &this->flameCollider); @@ -130,7 +128,7 @@ void ObjSyokudai_Destroy(Actor* thisx, PlayState* play) { void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; s32 groupSize = OBJ_SYOKUDAI_GET_GROUP_SIZE(thisx); s32 switchFlag = OBJ_SYOKUDAI_GET_SWITCH_FLAG(thisx); s32 type = OBJ_SYOKUDAI_GET_TYPE(thisx); @@ -288,7 +286,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { } void ObjSyokudai_Draw(Actor* thisx, PlayState* play) { - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; s32 pad; s32 groupSize = OBJ_SYOKUDAI_GET_GROUP_SIZE(thisx); f32 flameScale; diff --git a/src/overlays/actors/ovl_Obj_Takaraya_Wall/z_obj_takaraya_wall.c b/src/overlays/actors/ovl_Obj_Takaraya_Wall/z_obj_takaraya_wall.c index 4a36c71d6a..491d54a367 100644 --- a/src/overlays/actors/ovl_Obj_Takaraya_Wall/z_obj_takaraya_wall.c +++ b/src/overlays/actors/ovl_Obj_Takaraya_Wall/z_obj_takaraya_wall.c @@ -29,8 +29,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjTakarayaWall*)thisx) - void ObjTakarayaWall_Init(Actor* thisx, PlayState* play); void ObjTakarayaWall_Destroy(Actor* thisx, PlayState* play); void ObjTakarayaWall_Update(Actor* thisx, PlayState* play2); @@ -275,7 +273,7 @@ void ObjTakarayaWall_CarvePath(s32 row, s32 column) { } void ObjTakarayaWall_Init(Actor* thisx, PlayState* play) { - ObjTakarayaWall* this = THIS; + ObjTakarayaWall* this = (ObjTakarayaWall*)thisx; Actor* chest; s32 column; s32 i; @@ -336,7 +334,7 @@ void ObjTakarayaWall_Init(Actor* thisx, PlayState* play) { } void ObjTakarayaWall_Destroy(Actor* thisx, PlayState* play) { - ObjTakarayaWall* this = THIS; + ObjTakarayaWall* this = (ObjTakarayaWall*)thisx; s32 i; s32 j; @@ -441,7 +439,7 @@ void ObjTakarayaWall_Manage(ObjTakarayaWall* this, PlayState* play) { void ObjTakarayaWall_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjTakarayaWall* this = THIS; + ObjTakarayaWall* this = (ObjTakarayaWall*)thisx; this->actionFunc(this, play); @@ -451,7 +449,7 @@ void ObjTakarayaWall_Update(Actor* thisx, PlayState* play2) { void ObjTakarayaWall_Draw(Actor* thisx, PlayState* play) { Vec3f audioPos; - ObjTakarayaWall* this = THIS; + ObjTakarayaWall* this = (ObjTakarayaWall*)thisx; MtxF* mtx; Gfx* gfx; s32 i; diff --git a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c index f092bd73f0..83a28a247f 100644 --- a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c +++ b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c @@ -13,8 +13,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjTaru*)thisx) - void ObjTaru_Init(Actor* thisx, PlayState* play); void ObjTaru_Destroy(Actor* thisx, PlayState* play); void ObjTaru_Update(Actor* thisx, PlayState* play); @@ -196,7 +194,7 @@ void func_80B9BD84(ObjTaru* this, PlayState* play) { void ObjTaru_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjTaru* this = THIS; + ObjTaru* this = (ObjTaru*)thisx; s32 params8000; DynaPolyActor_Init(&this->dyna, 0); @@ -231,7 +229,7 @@ void ObjTaru_Init(Actor* thisx, PlayState* play) { } void ObjTaru_Destroy(Actor* thisx, PlayState* play) { - ObjTaru* this = THIS; + ObjTaru* this = (ObjTaru*)thisx; if (!OBJ_TARU_GET_80(thisx)) { Collider_DestroyCylinder(play, &this->collider); @@ -307,7 +305,7 @@ void func_80B9C1A0(ObjTaru* this, PlayState* play) { } void ObjTaru_Update(Actor* thisx, PlayState* play) { - ObjTaru* this = THIS; + ObjTaru* this = (ObjTaru*)thisx; if (!OBJ_TARU_GET_80(thisx)) { if (this->unk_1AC != 0) { @@ -335,7 +333,7 @@ void ObjTaru_Update(Actor* thisx, PlayState* play) { void ObjTaru_Draw(Actor* thisx, PlayState* play) { Gfx* dList; - ObjTaru* this = THIS; + ObjTaru* this = (ObjTaru*)thisx; if (OBJ_TARU_GET_80(thisx)) { dList = gObjTaruBreakablePiratePanelDL; diff --git a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c index 158f51d326..6fffdf1e22 100644 --- a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c +++ b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjToge*)thisx) - void ObjToge_Init(Actor* thisx, PlayState* play); void ObjToge_Destroy(Actor* thisx, PlayState* play2); void ObjToge_Update(Actor* thisx, PlayState* play); @@ -117,7 +115,7 @@ bool func_809A43EC(ObjToge* this, PlayState* play) { void ObjToge_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjToge* this = THIS; + ObjToge* this = (ObjToge*)thisx; Path* path; Vec3s* points; s16 sp3E; @@ -184,7 +182,7 @@ void ObjToge_Init(Actor* thisx, PlayState* play) { void ObjToge_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjToge* this = THIS; + ObjToge* this = (ObjToge*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -274,7 +272,7 @@ void func_809A48AC(ObjToge* this, PlayState* play) { } void ObjToge_Update(Actor* thisx, PlayState* play) { - ObjToge* this = THIS; + ObjToge* this = (ObjToge*)thisx; ColliderCylinder* collider = &this->collider; if (this->collider.base.acFlags & AC_HIT) { @@ -307,7 +305,7 @@ void ObjToge_Update(Actor* thisx, PlayState* play) { } void ObjToge_Draw(Actor* thisx, PlayState* play) { - ObjToge* this = THIS; + ObjToge* this = (ObjToge*)thisx; func_800B8050(&this->actor, play, 1); Gfx_DrawDListOpa(play, object_trap_DL_001400); diff --git a/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c b/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c index 0381b9b895..2d0be5beca 100644 --- a/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c +++ b/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_LEGACY_POINT_LIGHTS) -#define THIS ((ObjTokeiStep*)thisx) - void ObjTokeiStep_Init(Actor* thisx, PlayState* play); void ObjTokeiStep_Destroy(Actor* thisx, PlayState* play); void ObjTokeiStep_Update(Actor* thisx, PlayState* play); @@ -191,7 +189,7 @@ s32 ObjTokeiStep_OpenProcess(ObjTokeiStep* this, PlayState* play) { } void ObjTokeiStep_Init(Actor* thisx, PlayState* play) { - ObjTokeiStep* this = THIS; + ObjTokeiStep* this = (ObjTokeiStep*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -211,7 +209,7 @@ void ObjTokeiStep_Init(Actor* thisx, PlayState* play) { } void ObjTokeiStep_Destroy(Actor* thisx, PlayState* play) { - ObjTokeiStep* this = THIS; + ObjTokeiStep* this = (ObjTokeiStep*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -261,19 +259,19 @@ void ObjTokeiStep_DoNothingOpen(ObjTokeiStep* this, PlayState* play) { } void ObjTokeiStep_Update(Actor* thisx, PlayState* play) { - ObjTokeiStep* this = THIS; + ObjTokeiStep* this = (ObjTokeiStep*)thisx; this->actionFunc(this, play); } void ObjTokeiStep_Draw(Actor* thisx, PlayState* play) { - ObjTokeiStep* this = THIS; + ObjTokeiStep* this = (ObjTokeiStep*)thisx; Gfx_DrawDListOpa(play, gClocktowerPanelDL); } void ObjTokeiStep_DrawOpen(Actor* thisx, PlayState* play) { - ObjTokeiStep* this = THIS; + ObjTokeiStep* this = (ObjTokeiStep*)thisx; s32 i; ObjTokeiStepPanel* panel; Gfx* gfx; diff --git a/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.c b/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.c index 9104c0bb8e..1df47876cd 100644 --- a/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.c +++ b/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjTokeiTobira*)thisx) - void ObjTokeiTobira_Init(Actor* thisx, PlayState* play); void ObjTokeiTobira_Destroy(Actor* thisx, PlayState* play); void ObjTokeiTobira_Update(Actor* thisx, PlayState* play); @@ -55,7 +53,7 @@ Gfx* D_80ABD780[] = { }; void ObjTokeiTobira_Init(Actor* thisx, PlayState* play) { - ObjTokeiTobira* this = THIS; + ObjTokeiTobira* this = (ObjTokeiTobira*)thisx; s32 pad; s32 type = OBJTOKEITOBIRA_GET_TYPE(&this->dyna.actor); Vec3f posOffset; @@ -85,7 +83,7 @@ void ObjTokeiTobira_Init(Actor* thisx, PlayState* play) { } void ObjTokeiTobira_Destroy(Actor* thisx, PlayState* play) { - ObjTokeiTobira* this = THIS; + ObjTokeiTobira* this = (ObjTokeiTobira*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -103,7 +101,7 @@ void ObjTokeiTobira_StartCutscene(ObjTokeiTobira* this) { void ObjTokeiTobira_Update(Actor* thisx, PlayState* play) { s32 pad1; - ObjTokeiTobira* this = THIS; + ObjTokeiTobira* this = (ObjTokeiTobira*)thisx; Player* player = GET_PLAYER(play); s32 pad2; s32 type = OBJTOKEITOBIRA_GET_TYPE(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.c b/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.c index 3d0d82e2db..6920a6a9c6 100644 --- a/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.c +++ b/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjTokeiTurret*)thisx) - void ObjTokeiTurret_Init(Actor* thisx, PlayState* play); void ObjTokeiTurret_Destroy(Actor* thisx, PlayState* play); void ObjTokeiTurret_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ static InitChainEntry sInitChain[] = { void ObjTokeiTurret_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjTokeiTurret* this = THIS; + ObjTokeiTurret* this = (ObjTokeiTurret*)thisx; s32 tier; tier = OBJ_TOKEI_TURRET_TIER_TYPE(thisx); @@ -56,7 +54,7 @@ void ObjTokeiTurret_Init(Actor* thisx, PlayState* play) { } void ObjTokeiTurret_Destroy(Actor* thisx, PlayState* play) { - ObjTokeiTurret* this = THIS; + ObjTokeiTurret* this = (ObjTokeiTurret*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -65,7 +63,7 @@ void ObjTokeiTurret_Update(Actor* thisx, PlayState* play) { } void ObjTokeiTurret_Draw(Actor* thisx, PlayState* play) { - ObjTokeiTurret* this = THIS; + ObjTokeiTurret* this = (ObjTokeiTurret*)thisx; Gfx* gfx; if (OBJ_TOKEI_TURRET_TIER_TYPE(thisx) == TURRET_TIER_TOP) { diff --git a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c index 883730af64..2ae2738932 100644 --- a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c +++ b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c @@ -34,8 +34,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjTokeidai*)thisx) - #define GET_CURRENT_CLOCK_HOUR(this) ((s32)TIME_TO_HOURS_F((this)->clockTime)) #define GET_CURRENT_CLOCK_MINUTE(this) ((s32)((this)->clockTime * (360 * 2.0f / 0x10000)) % 30) #define GET_CLOCK_FACE_ROTATION(currentClockHour) (TRUNCF_BINANG(currentClockHour * (0x10000 / 24.0f))) @@ -205,7 +203,7 @@ void ObjTokeidai_Counterweight_Init(ObjTokeidai* this, PlayState* play) { } void ObjTokeidai_Init(Actor* thisx, PlayState* play) { - ObjTokeidai* this = THIS; + ObjTokeidai* this = (ObjTokeidai*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actionFunc = ObjTokeidai_DoNothing; @@ -783,7 +781,7 @@ void ObjTokeidai_Counterweight_Idle(ObjTokeidai* this, PlayState* play) { } void ObjTokeidai_Update(Actor* thisx, PlayState* play) { - ObjTokeidai* this = THIS; + ObjTokeidai* this = (ObjTokeidai*)thisx; this->actionFunc(this, play); } @@ -791,7 +789,7 @@ void ObjTokeidai_Update(Actor* thisx, PlayState* play) { * Used for TerminaFieldWalls StaircaseToRooftop, and UnusedWall */ void ObjTokeidai_Draw(Actor* thisx, PlayState* play) { - ObjTokeidai* this = THIS; + ObjTokeidai* this = (ObjTokeidai*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -811,7 +809,7 @@ void ObjTokeidai_Draw(Actor* thisx, PlayState* play) { } void ObjTokeidai_Clock_Draw(Actor* thisx, PlayState* play) { - ObjTokeidai* this = THIS; + ObjTokeidai* this = (ObjTokeidai*)thisx; OPEN_DISPS(play->state.gfxCtx); @@ -851,7 +849,7 @@ void ObjTokeidai_Clock_Draw(Actor* thisx, PlayState* play) { void ObjTokeidai_Counterweight_Draw(Actor* thisx, PlayState* play) { s32 pad; u32 gameplayFrames = play->gameplayFrames; - ObjTokeidai* this = THIS; + ObjTokeidai* this = (ObjTokeidai*)thisx; Matrix_RotateYS(-this->actor.shape.rot.y, MTXMODE_APPLY); Matrix_Translate(0.0f, this->yTranslation, 0.0f, MTXMODE_APPLY); @@ -881,7 +879,7 @@ void ObjTokeidai_Counterweight_Draw(Actor* thisx, PlayState* play) { } void ObjTokeidai_ExteriorGear_Draw(Actor* thisx, PlayState* play) { - ObjTokeidai* this = THIS; + ObjTokeidai* this = (ObjTokeidai*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Toudai/z_obj_toudai.c b/src/overlays/actors/ovl_Obj_Toudai/z_obj_toudai.c index 8ce0598c2f..d96d5ae2b2 100644 --- a/src/overlays/actors/ovl_Obj_Toudai/z_obj_toudai.c +++ b/src/overlays/actors/ovl_Obj_Toudai/z_obj_toudai.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjToudai*)thisx) - void ObjToudai_Init(Actor* thisx, PlayState* play); void ObjToudai_Destroy(Actor* thisx, PlayState* play); void ObjToudai_Update(Actor* thisx, PlayState* play); @@ -99,7 +97,7 @@ u8 func_80A342F4(s16 arg0) { } void ObjToudai_Init(Actor* thisx, PlayState* play) { - ObjToudai* this = THIS; + ObjToudai* this = (ObjToudai*)thisx; Lib_MemCpy(this->unk_148, &ovl_Obj_Toudai_Vtx_D_80A34590, sizeof(ovl_Obj_Toudai_Vtx_D_80A34590)); } @@ -108,7 +106,7 @@ void ObjToudai_Destroy(Actor* thisx, PlayState* play) { } void ObjToudai_Update(Actor* thisx, PlayState* play) { - ObjToudai* this = THIS; + ObjToudai* this = (ObjToudai*)thisx; u8 temp_v0 = func_80A342F4(this->unk_238); if (temp_v0 != this->unk_236) { @@ -122,7 +120,7 @@ void ObjToudai_Update(Actor* thisx, PlayState* play) { } void ObjToudai_Draw(Actor* thisx, PlayState* play) { - ObjToudai* this = THIS; + ObjToudai* this = (ObjToudai*)thisx; func_80A33B00(this, play); func_80A33BB4(this, play); diff --git a/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.c b/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.c index 18b53bf100..67ef0d50de 100644 --- a/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.c +++ b/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ObjTree*)thisx) - void ObjTree_Init(Actor* thisx, PlayState* play); void ObjTree_Destroy(Actor* thisx, PlayState* play); void ObjTree_Update(Actor* thisx, PlayState* play); @@ -91,7 +89,7 @@ static CollisionCheckInfoInit2 sColchkInfoInit = { 8, 0, 0, 0, MASS_HEAVY }; void ObjTree_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjTree* this = THIS; + ObjTree* this = (ObjTree*)thisx; CollisionHeader* colHeader = NULL; if (OBJTREE_ISLARGE(&this->dyna.actor)) { @@ -119,7 +117,7 @@ void ObjTree_Init(Actor* thisx, PlayState* play) { } void ObjTree_Destroy(Actor* thisx, PlayState* play) { - ObjTree* this = THIS; + ObjTree* this = (ObjTree*)thisx; s32 bgId; if (!OBJTREE_ISLARGE(&this->dyna.actor)) { @@ -173,7 +171,7 @@ void ObjTree_UpdateCollision(ObjTree* this, PlayState* play) { } void ObjTree_Update(Actor* thisx, PlayState* play) { - ObjTree* this = THIS; + ObjTree* this = (ObjTree*)thisx; this->actionFunc(this, play); ObjTree_UpdateCollision(this, play); diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index bd54aab4a3..7dea8f5006 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_THROW_ONLY | ACTOR_FLAG_CAN_PRESS_SWITCHES) -#define THIS ((ObjTsubo*)thisx) - void ObjTsubo_Init(Actor* thisx, PlayState* play); void ObjTsubo_Destroy(Actor* thisx, PlayState* play2); void ObjTsubo_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c index 9e5530fcc1..a81ae0708c 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c @@ -12,8 +12,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjUm*)thisx) - /** * weekEventReg flags checked by this actor: * - WEEKEVENTREG_DEFENDED_AGAINST_ALIENS: Aliens defeated @@ -640,7 +638,7 @@ static InitChainEntry sInitChain[] = { void ObjUm_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjUm* this = THIS; + ObjUm* this = (ObjUm*)thisx; s32 sp54 = true; s32 i; @@ -785,7 +783,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { } void ObjUm_Destroy(Actor* thisx, PlayState* play) { - ObjUm* this = THIS; + ObjUm* this = (ObjUm*)thisx; s32 i; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); @@ -1709,7 +1707,7 @@ void ObjUm_ChangeAnim(ObjUm* this, PlayState* play, ObjUmAnimation animIndex) { } void ObjUm_Update(Actor* thisx, PlayState* play) { - ObjUm* this = THIS; + ObjUm* this = (ObjUm*)thisx; this->actionFunc(this, play); this->unk_350++; @@ -1792,7 +1790,7 @@ void ObjUm_Update(Actor* thisx, PlayState* play) { } s32 ObjUm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - ObjUm* this = THIS; + ObjUm* this = (ObjUm*)thisx; Player* player = GET_PLAYER(play); s32 pad; s16 temp_v0_3; @@ -1877,7 +1875,7 @@ void ObjUm_SpawnFragments(PlayState* play, Vec3f* potPos) { } void ObjUm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - ObjUm* this = THIS; + ObjUm* this = (ObjUm*)thisx; GraphicsContext* gfxCtx = play->state.gfxCtx; Mtx* mtx; Gfx* spFC[] = { @@ -2015,7 +2013,7 @@ void func_80B7BEA4(Vec3f* cartBedPos, s16 arg1, Vec3f* arg2, u8 alpha, PlayState void ObjUm_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjUm* this = THIS; + ObjUm* this = (ObjUm*)thisx; Vec3f sp34; this->flags |= OBJ_UM_FLAG_0001; diff --git a/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c b/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c index 57a68501c5..25294b6017 100644 --- a/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c +++ b/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_20) -#define THIS ((ObjUsiyane*)thisx) - void ObjUsiyane_Init(Actor* thisx, PlayState* play); void ObjUsiyane_Destroy(Actor* thisx, PlayState* play); void ObjUsiyane_Update(Actor* thisx, PlayState* play); @@ -185,7 +183,7 @@ void func_80C082E0(ObjUsiyane* this, PlayState* play) { } void ObjUsiyane_Init(Actor* thisx, PlayState* play) { - ObjUsiyane* this = THIS; + ObjUsiyane* this = (ObjUsiyane*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Actor_SetScale(&this->dyna.actor, 0.1f); @@ -212,19 +210,19 @@ void ObjUsiyane_Init(Actor* thisx, PlayState* play) { } void ObjUsiyane_Destroy(Actor* thisx, PlayState* play) { - ObjUsiyane* this = THIS; + ObjUsiyane* this = (ObjUsiyane*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjUsiyane_Update(Actor* thisx, PlayState* play) { - ObjUsiyane* this = THIS; + ObjUsiyane* this = (ObjUsiyane*)thisx; this->actionFunc(this, play); } void ObjUsiyane_Draw(Actor* thisx, PlayState* play) { - ObjUsiyane* this = THIS; + ObjUsiyane* this = (ObjUsiyane*)thisx; MtxF mf; if (!(this->unk_744 & 1)) { diff --git a/src/overlays/actors/ovl_Obj_Visiblock/z_obj_visiblock.c b/src/overlays/actors/ovl_Obj_Visiblock/z_obj_visiblock.c index 1400ed6028..827fc8afdf 100644 --- a/src/overlays/actors/ovl_Obj_Visiblock/z_obj_visiblock.c +++ b/src/overlays/actors/ovl_Obj_Visiblock/z_obj_visiblock.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_REACT_TO_LENS) -#define THIS ((ObjVisiblock*)thisx) - void ObjVisiblock_Init(Actor* thisx, PlayState* play); void ObjVisiblock_Destroy(Actor* thisx, PlayState* play); void ObjVisiblock_Draw(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ static InitChainEntry sInitChain[] = { }; void ObjVisiblock_Init(Actor* thisx, PlayState* play) { - ObjVisiblock* this = THIS; + ObjVisiblock* this = (ObjVisiblock*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -43,7 +41,7 @@ void ObjVisiblock_Init(Actor* thisx, PlayState* play) { } void ObjVisiblock_Destroy(Actor* thisx, PlayState* play) { - ObjVisiblock* this = THIS; + ObjVisiblock* this = (ObjVisiblock*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } diff --git a/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c b/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c index 246e03e06b..9183eadc29 100644 --- a/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c +++ b/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjVspinyroll*)thisx) - void ObjVspinyroll_Init(Actor* thisx, PlayState* play); void ObjVspinyroll_Destroy(Actor* thisx, PlayState* play); void ObjVspinyroll_Update(Actor* thisx, PlayState* play2); @@ -260,7 +258,7 @@ void func_80A3CC84(f32 arg0) { void ObjVspinyroll_Init(Actor* thisx, PlayState* play) { s32 pad; - ObjVspinyroll* this = THIS; + ObjVspinyroll* this = (ObjVspinyroll*)thisx; s32 params = OBJVSPINYROLL_GET_4000(&this->dyna.actor); f32 sp40 = D_80A3D450[params]; s32 pad2; @@ -316,7 +314,7 @@ void ObjVspinyroll_Init(Actor* thisx, PlayState* play) { } void ObjVspinyroll_Destroy(Actor* thisx, PlayState* play) { - ObjVspinyroll* this = THIS; + ObjVspinyroll* this = (ObjVspinyroll*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(play, &this->collider); @@ -403,7 +401,7 @@ void func_80A3D0FC(ObjVspinyroll* this, PlayState* play) { void ObjVspinyroll_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjVspinyroll* this = THIS; + ObjVspinyroll* this = (ObjVspinyroll*)thisx; this->actionFunc(this, play); @@ -415,7 +413,7 @@ void ObjVspinyroll_Update(Actor* thisx, PlayState* play2) { } void ObjVspinyroll_Draw(Actor* thisx, PlayState* play) { - ObjVspinyroll* this = THIS; + ObjVspinyroll* this = (ObjVspinyroll*)thisx; Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 60.0f, this->dyna.actor.world.pos.z, MTXMODE_NEW); @@ -427,7 +425,7 @@ void ObjVspinyroll_Draw(Actor* thisx, PlayState* play) { } void func_80A3D2C0(Actor* thisx, PlayState* play) { - ObjVspinyroll* this = THIS; + ObjVspinyroll* this = (ObjVspinyroll*)thisx; Vec3s sp3C; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c b/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c index 7275f715ed..35d7b16ecf 100644 --- a/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c +++ b/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((ObjWarpstone*)thisx) - void ObjWarpstone_Init(Actor* thisx, PlayState* play); void ObjWarpstone_Destroy(Actor* thisx, PlayState* play); void ObjWarpstone_Update(Actor* thisx, PlayState* play); @@ -65,7 +63,7 @@ void ObjWarpstone_SetupAction(ObjWarpstone* this, ObjWarpstoneActionFunc actionF } void ObjWarpstone_Init(Actor* thisx, PlayState* play) { - ObjWarpstone* this = THIS; + ObjWarpstone* this = (ObjWarpstone*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Collider_InitAndSetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); @@ -80,7 +78,7 @@ void ObjWarpstone_Init(Actor* thisx, PlayState* play) { } void ObjWarpstone_Destroy(Actor* thisx, PlayState* play) { - ObjWarpstone* this = THIS; + ObjWarpstone* this = (ObjWarpstone*)thisx; Collider_DestroyCylinder(play, &this->collider); } @@ -132,7 +130,7 @@ s32 ObjWarpstone_OpenedIdle(ObjWarpstone* this, PlayState* play) { } void ObjWarpstone_Update(Actor* thisx, PlayState* play) { - ObjWarpstone* this = THIS; + ObjWarpstone* this = (ObjWarpstone*)thisx; s32 pad; if (this->isTalking) { @@ -163,7 +161,7 @@ void ObjWarpstone_Update(Actor* thisx, PlayState* play) { void ObjWarpstone_Draw(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjWarpstone* this = THIS; + ObjWarpstone* this = (ObjWarpstone*)thisx; Gfx_DrawDListOpa(play, sOwlStatueDLs[this->modelIndex]); if (this->dyna.actor.home.rot.x != 0) { diff --git a/src/overlays/actors/ovl_Obj_Wind/z_obj_wind.c b/src/overlays/actors/ovl_Obj_Wind/z_obj_wind.c index 15ffee379f..a2a8e7851b 100644 --- a/src/overlays/actors/ovl_Obj_Wind/z_obj_wind.c +++ b/src/overlays/actors/ovl_Obj_Wind/z_obj_wind.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjWind*)thisx) - void ObjWind_Init(Actor* thisx, PlayState* play); void ObjWind_Destroy(Actor* thisx, PlayState* play); void ObjWind_Update(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c index 1ff802bfac..b027831d71 100644 --- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c +++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_100000 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ObjWturn*)thisx) - void ObjWturn_Init(Actor* thisx, PlayState* play); void ObjWturn_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ ActorProfile Obj_Wturn_Profile = { }; void ObjWturn_Init(Actor* thisx, PlayState* play) { - ObjWturn* this = THIS; + ObjWturn* this = (ObjWturn*)thisx; func_808A7954(this); } @@ -132,7 +130,7 @@ void func_808A7C78(ObjWturn* this, PlayState* play) { } void ObjWturn_Update(Actor* thisx, PlayState* play) { - ObjWturn* this = THIS; + ObjWturn* this = (ObjWturn*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c b/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c index 38eb39b3d3..bbf9da28da 100644 --- a/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c +++ b/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjY2lift*)thisx) - void ObjY2lift_Init(Actor* thisx, PlayState* play); void ObjY2lift_Destroy(Actor* thisx, PlayState* play); void ObjY2lift_Update(Actor* thisx, PlayState* play); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void ObjY2lift_Init(Actor* thisx, PlayState* play) { - ObjY2lift* this = THIS; + ObjY2lift* this = (ObjY2lift*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); @@ -44,13 +42,13 @@ void ObjY2lift_Init(Actor* thisx, PlayState* play) { } void ObjY2lift_Destroy(Actor* thisx, PlayState* play) { - ObjY2lift* this = THIS; + ObjY2lift* this = (ObjY2lift*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjY2lift_Update(Actor* thisx, PlayState* play) { - ObjY2lift* this = THIS; + ObjY2lift* this = (ObjY2lift*)thisx; f32 temp_fv0 = this->dyna.actor.world.pos.y; f32 targetVelocityY = 0.0f; s32 isPlayerOnTop = DynaPolyActor_IsPlayerOnTop(&this->dyna); diff --git a/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c b/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c index 6e82ad477e..e0cfcb9745 100644 --- a/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c +++ b/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((ObjY2shutter*)thisx) - void ObjY2shutter_Init(Actor* thisx, PlayState* play); void ObjY2shutter_Destroy(Actor* thisx, PlayState* play); void ObjY2shutter_Update(Actor* thisx, PlayState* play); @@ -56,7 +54,7 @@ static InitChainEntry sInitChain[] = { void ObjY2shutter_Init(Actor* thisx, PlayState* play) { s32 pad[2]; ShutterInfo* info = &sShutterInfo[OBJY2SHUTTER_GET_TYPE(thisx)]; - ObjY2shutter* this = THIS; + ObjY2shutter* this = (ObjY2shutter*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -64,7 +62,7 @@ void ObjY2shutter_Init(Actor* thisx, PlayState* play) { } void ObjY2shutter_Destroy(Actor* thisx, PlayState* play) { - ObjY2shutter* this = THIS; + ObjY2shutter* this = (ObjY2shutter*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -79,7 +77,7 @@ void ObjY2shutter_SetupOpen(ObjY2shutter* this, ShutterInfo* info, ShutterType s void ObjY2shutter_Update(Actor* thisx, PlayState* play) { s32 pad; - ObjY2shutter* this = THIS; + ObjY2shutter* this = (ObjY2shutter*)thisx; ShutterType shutterType = OBJY2SHUTTER_GET_TYPE(&this->dyna.actor); ShutterInfo* info = &sShutterInfo[shutterType]; f32 targetPosY = this->dyna.actor.world.pos.y; @@ -169,7 +167,7 @@ void ObjY2shutter_Update(Actor* thisx, PlayState* play) { } void ObjY2shutter_Draw(Actor* thisx, PlayState* play) { - ObjY2shutter* this = THIS; + ObjY2shutter* this = (ObjY2shutter*)thisx; ShutterInfo* info = &sShutterInfo[(OBJY2SHUTTER_GET_TYPE(&this->dyna.actor))]; Gfx_DrawDListOpa(play, info->dList); diff --git a/src/overlays/actors/ovl_Obj_Yado/z_obj_yado.c b/src/overlays/actors/ovl_Obj_Yado/z_obj_yado.c index c382bae272..2c8d03d478 100644 --- a/src/overlays/actors/ovl_Obj_Yado/z_obj_yado.c +++ b/src/overlays/actors/ovl_Obj_Yado/z_obj_yado.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) -#define THIS ((ObjYado*)thisx) - void ObjYado_Init(Actor* thisx, PlayState* play); void ObjYado_Destroy(Actor* thisx, PlayState* play); void ObjYado_Update(Actor* thisx, PlayState* play); @@ -35,7 +33,7 @@ static InitChainEntry sInitChain[] = { AnimatedMaterial* D_80C16470; void ObjYado_Init(Actor* thisx, PlayState* play) { - ObjYado* this = THIS; + ObjYado* this = (ObjYado*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); D_80C16470 = Lib_SegmentedToVirtual(object_yado_obj_Matanimheader_0012E8); @@ -46,14 +44,14 @@ void ObjYado_Destroy(Actor* thisx, PlayState* play) { } void ObjYado_Update(Actor* thisx, PlayState* play) { - ObjYado* this = THIS; + ObjYado* this = (ObjYado*)thisx; this->isNight = gSaveContext.save.isNight; } void ObjYado_Draw(Actor* thisx, PlayState* play) { s32 pad; - ObjYado* this = THIS; + ObjYado* this = (ObjYado*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Obj_Yasi/z_obj_yasi.c b/src/overlays/actors/ovl_Obj_Yasi/z_obj_yasi.c index edfa304e5e..edd76ad2f9 100644 --- a/src/overlays/actors/ovl_Obj_Yasi/z_obj_yasi.c +++ b/src/overlays/actors/ovl_Obj_Yasi/z_obj_yasi.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjYasi*)thisx) - #define CAN_DROP_NUT(thisx) (thisx->params < 0) void ObjYasi_Init(Actor* thisx, PlayState* play); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { }; void ObjYasi_Init(Actor* thisx, PlayState* play) { - ObjYasi* this = THIS; + ObjYasi* this = (ObjYasi*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); @@ -53,13 +51,13 @@ void ObjYasi_Init(Actor* thisx, PlayState* play) { } void ObjYasi_Destroy(Actor* thisx, PlayState* play) { - ObjYasi* this = THIS; + ObjYasi* this = (ObjYasi*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } void ObjYasi_Update(Actor* thisx, PlayState* play) { - ObjYasi* this = THIS; + ObjYasi* this = (ObjYasi*)thisx; s16 temp; Vec3f dropPos; @@ -83,7 +81,7 @@ void ObjYasi_Update(Actor* thisx, PlayState* play) { } void ObjYasi_Draw(Actor* thisx, PlayState* play) { - ObjYasi* this = THIS; + ObjYasi* this = (ObjYasi*)thisx; Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index c1b2efce5f..62543ed30d 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((ObjectKankyo*)thisx) - void ObjectKankyo_Init(Actor* thisx, PlayState* play); void ObjectKankyo_Destroy(Actor* thisx, PlayState* play); void ObjectKankyo_Update(Actor* thisx, PlayState* play); @@ -93,7 +91,7 @@ void func_808DC038(ObjectKankyo* this, PlayState* play) { } void ObjectKankyo_Init(Actor* thisx, PlayState* play) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; s16 i; for (i = 0; i < ARRAY_COUNT(this->unk_14C); i++) { @@ -123,7 +121,7 @@ void ObjectKankyo_Init(Actor* thisx, PlayState* play) { } void ObjectKankyo_Destroy(Actor* thisx, PlayState* play) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; Actor_Kill(&this->actor); } @@ -471,13 +469,13 @@ void func_808DCDB4(ObjectKankyo* this, PlayState* play) { } void ObjectKankyo_Update(Actor* thisx, PlayState* play) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; this->actionFunc(this, play); } void ObjectKankyo_Draw(Actor* thisx, PlayState* play) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; switch (this->actor.params) { case 0: @@ -498,7 +496,7 @@ void ObjectKankyo_Draw(Actor* thisx, PlayState* play) { void func_808DD3C8(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; Vec3f worldPos; Vec3f screenPos; s16 i; @@ -585,7 +583,7 @@ void func_808DD970(Actor* thisx, PlayState* play2) { s16 i; f32 phi_f26; PlayState* play = play2; - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; f32 tempA; if (play->sceneId == SCENE_KYOJINNOMA) { @@ -649,7 +647,7 @@ f32 func_808DDE74(void) { void func_808DDE9C(Actor* thisx, PlayState* play2) { PlayState* play = play2; - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; Player* player = GET_PLAYER(play); s32 i; u8 phi_s5; diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index c5080da83c..40b6659c9b 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffSpot*)thisx) - void OceffSpot_Init(Actor* thisx, PlayState* play2); void OceffSpot_Destroy(Actor* thisx, PlayState* play2); void OceffSpot_Update(Actor* thisx, PlayState* play); @@ -46,7 +44,7 @@ void OceffSpot_SetupAction(OceffSpot* this, OceffSpotActionFunc actionFunc) { void OceffSpot_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; Player* player = GET_PLAYER(play); Actor_ProcessInitChain(&this->actor, sInitChain); @@ -68,7 +66,7 @@ void OceffSpot_Init(Actor* thisx, PlayState* play2) { void OceffSpot_Destroy(Actor* thisx, PlayState* play2) { PlayState* play = play2; - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode1); LightContext_RemoveLight(play, &play->lightCtx, this->lightNode2); @@ -113,7 +111,7 @@ void OceffSpot_Update(Actor* thisx, PlayState* play) { s32 pad; Player* player = GET_PLAYER(play); f32 temp; - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; temp = (1.0f - cosf(this->unk16C * M_PIf)) * 0.5f; this->actionFunc(this, play); @@ -156,7 +154,7 @@ void OceffSpot_Update(Actor* thisx, PlayState* play) { } void OceffSpot_Draw(Actor* thisx, PlayState* play) { - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; u32 scroll = play->state.frames & 0xFFFF; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 12a9b88105..b8e63291b4 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffStorm*)thisx) - void OceffStorm_Init(Actor* thisx, PlayState* play); void OceffStorm_Destroy(Actor* thisx, PlayState* play); void OceffStorm_Update(Actor* thisx, PlayState* play); @@ -63,7 +61,7 @@ s32 func_8098176C(PlayState* play) { void OceffStorm_Init(Actor* thisx, PlayState* play) { s32 pad[2]; Player* player = GET_PLAYER(play); - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; OceffStorm_SetupAction(this, OceffStorm_DefaultAction); @@ -92,7 +90,7 @@ void OceffStorm_Init(Actor* thisx, PlayState* play) { } void OceffStorm_Destroy(Actor* thisx, PlayState* play) { - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; Magic_Reset(play); } @@ -162,7 +160,7 @@ void func_80981B48(OceffStorm* this, PlayState* play) { } void OceffStorm_Update(Actor* thisx, PlayState* play) { - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)); this->actionFunc(this, play); @@ -172,7 +170,7 @@ void OceffStorm_Update(Actor* thisx, PlayState* play) { void OceffStorm_Draw2(Actor* thisx, PlayState* play) { s32 scroll = play->state.frames & 0xFFF; - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 8705198fe4..ef04c69f72 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe*)thisx) - void OceffWipe_Init(Actor* thisx, PlayState* play); void OceffWipe_Destroy(Actor* thisx, PlayState* play); void OceffWipe_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Oceff_Wipe_Profile = { static s32 sBssPad; void OceffWipe_Init(Actor* thisx, PlayState* play) { - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; Actor_SetScale(&this->actor, 0.1f); this->counter = 0; @@ -38,14 +36,14 @@ void OceffWipe_Init(Actor* thisx, PlayState* play) { } void OceffWipe_Destroy(Actor* thisx, PlayState* play) { - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; Magic_Reset(play); play->msgCtx.ocarinaSongEffectActive = false; } void OceffWipe_Update(Actor* thisx, PlayState* play) { - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->counter < 100) { @@ -64,7 +62,7 @@ static u8 sAlphaIndices[] = { void OceffWipe_Draw(Actor* thisx, PlayState* play) { u32 scroll = play->state.frames & 0xFF; - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; f32 z; s32 pad; u8 alphaTable[3]; diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 2d7ca4ab57..2ba9eedeec 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe2*)thisx) - void OceffWipe2_Init(Actor* thisx, PlayState* play); void OceffWipe2_Destroy(Actor* thisx, PlayState* play); void OceffWipe2_Update(Actor* thisx, PlayState* play); @@ -32,7 +30,7 @@ ActorProfile Oceff_Wipe2_Profile = { static s32 sBssPad; void OceffWipe2_Init(Actor* thisx, PlayState* play) { - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; Actor_SetScale(&this->actor, 0.1f); this->timer = 0; @@ -40,14 +38,14 @@ void OceffWipe2_Init(Actor* thisx, PlayState* play) { } void OceffWipe2_Destroy(Actor* thisx, PlayState* play) { - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; Magic_Reset(play); play->msgCtx.ocarinaSongEffectActive = false; } void OceffWipe2_Update(Actor* thisx, PlayState* play) { - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->timer < 100) { @@ -59,7 +57,7 @@ void OceffWipe2_Update(Actor* thisx, PlayState* play) { void OceffWipe2_Draw(Actor* thisx, PlayState* play) { u32 scroll = play->state.frames & 0xFF; - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; f32 z; u8 alpha; s32 pad[2]; diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index a1b4dc737c..7b3b703f26 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -9,8 +9,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe3*)thisx) - void OceffWipe3_Init(Actor* thisx, PlayState* play); void OceffWipe3_Destroy(Actor* thisx, PlayState* play); void OceffWipe3_Update(Actor* thisx, PlayState* play); @@ -33,7 +31,7 @@ ActorProfile Oceff_Wipe3_Profile = { static s32 sBssPad; void OceffWipe3_Init(Actor* thisx, PlayState* play) { - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; Actor_SetScale(&this->actor, 0.1f); this->counter = 0; @@ -41,14 +39,14 @@ void OceffWipe3_Init(Actor* thisx, PlayState* play) { } void OceffWipe3_Destroy(Actor* thisx, PlayState* play) { - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; Magic_Reset(play); play->msgCtx.ocarinaSongEffectActive = false; } void OceffWipe3_Update(Actor* thisx, PlayState* play) { - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->counter < 100) { @@ -60,7 +58,7 @@ void OceffWipe3_Update(Actor* thisx, PlayState* play) { void OceffWipe3_Draw(Actor* thisx, PlayState* play) { u32 scroll = play->state.frames & 0xFFF; - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; f32 z; u8 alpha; s32 pad[2]; diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 3b1841405e..d843b61344 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe4*)thisx) - void OceffWipe4_Init(Actor* thisx, PlayState* play); void OceffWipe4_Destroy(Actor* thisx, PlayState* play); void OceffWipe4_Update(Actor* thisx, PlayState* play); @@ -32,7 +30,7 @@ ActorProfile Oceff_Wipe4_Profile = { static s32 sBssPad; void OceffWipe4_Init(Actor* thisx, PlayState* play) { - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; Actor_SetScale(&this->actor, 0.1f); this->counter = 0; @@ -40,14 +38,14 @@ void OceffWipe4_Init(Actor* thisx, PlayState* play) { } void OceffWipe4_Destroy(Actor* thisx, PlayState* play) { - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; Magic_Reset(play); play->msgCtx.ocarinaSongEffectActive = false; } void OceffWipe4_Update(Actor* thisx, PlayState* play) { - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->counter < 50) { @@ -59,7 +57,7 @@ void OceffWipe4_Update(Actor* thisx, PlayState* play) { void OceffWipe4_Draw(Actor* thisx, PlayState* play) { u32 scroll = play->state.frames & 0xFFF; - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; f32 z; u8 alpha; s32 pad[2]; diff --git a/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c b/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c index aedcc6e896..30233844bc 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c +++ b/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe5*)thisx) - void OceffWipe5_Init(Actor* thisx, PlayState* play); void OceffWipe5_Destroy(Actor* thisx, PlayState* play); void OceffWipe5_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Oceff_Wipe5_Profile = { static s32 sBssPad; void OceffWipe5_Init(Actor* thisx, PlayState* play) { - OceffWipe5* this = THIS; + OceffWipe5* this = (OceffWipe5*)thisx; Actor_SetScale(&this->actor, 1.0f); this->counter = 0; @@ -38,14 +36,14 @@ void OceffWipe5_Init(Actor* thisx, PlayState* play) { } void OceffWipe5_Destroy(Actor* thisx, PlayState* play) { - OceffWipe5* this = THIS; + OceffWipe5* this = (OceffWipe5*)thisx; Magic_Reset(play); play->msgCtx.ocarinaSongEffectActive = false; } void OceffWipe5_Update(Actor* thisx, PlayState* play) { - OceffWipe5* this = THIS; + OceffWipe5* this = (OceffWipe5*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->counter < 100) { @@ -66,7 +64,7 @@ static u8 sEnvColors[] = { }; void OceffWipe5_Draw(Actor* thisx, PlayState* play) { - OceffWipe5* this = THIS; + OceffWipe5* this = (OceffWipe5*)thisx; f32 z; s32 pad; s32 i; diff --git a/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c b/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c index ec0c1682a5..516b487627 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c +++ b/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe6*)thisx) - void OceffWipe6_Init(Actor* thisx, PlayState* play); void OceffWipe6_Destroy(Actor* thisx, PlayState* play); void OceffWipe6_Update(Actor* thisx, PlayState* play); @@ -30,7 +28,7 @@ ActorProfile Oceff_Wipe6_Profile = { #include "assets/overlays/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6.c" void OceffWipe6_Init(Actor* thisx, PlayState* play) { - OceffWipe6* this = THIS; + OceffWipe6* this = (OceffWipe6*)thisx; Actor_SetScale(&this->actor, 1.0f); this->counter = 0; @@ -43,7 +41,7 @@ void OceffWipe6_Destroy(Actor* thisx, PlayState* play) { } void OceffWipe6_Update(Actor* thisx, PlayState* play) { - OceffWipe6* this = THIS; + OceffWipe6* this = (OceffWipe6*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->counter < 100) { @@ -54,7 +52,7 @@ void OceffWipe6_Update(Actor* thisx, PlayState* play) { } void OceffWipe6_Draw(Actor* thisx, PlayState* play) { - OceffWipe6* this = THIS; + OceffWipe6* this = (OceffWipe6*)thisx; f32 z; u8 alpha; s32 i; diff --git a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c index 5df8e662b6..5c17395aa8 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c +++ b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c @@ -8,8 +8,6 @@ #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_UPDATE_DURING_OCARINA) -#define THIS ((OceffWipe7*)thisx) - void OceffWipe7_Init(Actor* thisx, PlayState* play); void OceffWipe7_Destroy(Actor* thisx, PlayState* play); void OceffWipe7_Update(Actor* thisx, PlayState* play); @@ -32,7 +30,7 @@ ActorProfile Oceff_Wipe7_Profile = { static s32 sBssPad; void OceffWipe7_Init(Actor* thisx, PlayState* play) { - OceffWipe7* this = THIS; + OceffWipe7* this = (OceffWipe7*)thisx; Actor_SetScale(&this->actor, 1.0f); this->counter = 0; @@ -40,14 +38,14 @@ void OceffWipe7_Init(Actor* thisx, PlayState* play) { } void OceffWipe7_Destroy(Actor* thisx, PlayState* play) { - OceffWipe7* this = THIS; + OceffWipe7* this = (OceffWipe7*)thisx; Magic_Reset(play); play->msgCtx.ocarinaSongEffectActive = false; } void OceffWipe7_Update(Actor* thisx, PlayState* play) { - OceffWipe7* this = THIS; + OceffWipe7* this = (OceffWipe7*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; if (this->counter < 100) { @@ -58,7 +56,7 @@ void OceffWipe7_Update(Actor* thisx, PlayState* play) { } void OceffWipe7_Draw(Actor* thisx, PlayState* play) { - OceffWipe7* this = THIS; + OceffWipe7* this = (OceffWipe7*)thisx; f32 z; u8 alpha; s32 i; diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index f7837cb57a..97e0f3ef39 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -10,8 +10,6 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) -#define THIS ((ShotSun*)thisx) - void ShotSun_Init(Actor* thisx, PlayState* play); void ShotSun_Destroy(Actor* thisx, PlayState* play); void ShotSun_Update(Actor* thisx, PlayState* play); @@ -53,7 +51,7 @@ static ColliderCylinderInit sCylinderInit = { void ShotSun_Init(Actor* thisx, PlayState* play) { s32 pad; - ShotSun* this = THIS; + ShotSun* this = (ShotSun*)thisx; if ((SHOTSUN_GET_TYPE(thisx) == SHOTSUN_FAIRY_SPAWNER_SUNS) || (SHOTSUN_GET_TYPE(thisx) == SHOTSUN_FAIRY_SPAWNER_STORMS)) { @@ -71,7 +69,7 @@ void ShotSun_Init(Actor* thisx, PlayState* play) { } void ShotSun_Destroy(Actor* thisx, PlayState* play) { - ShotSun* this = THIS; + ShotSun* this = (ShotSun*)thisx; if ((SHOTSUN_GET_TYPE(thisx) != SHOTSUN_FAIRY_SPAWNER_SUNS) && (SHOTSUN_GET_TYPE(thisx) != SHOTSUN_FAIRY_SPAWNER_STORMS)) { @@ -195,7 +193,7 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) { } void ShotSun_Update(Actor* thisx, PlayState* play) { - ShotSun* this = THIS; + ShotSun* this = (ShotSun*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c index 971a011ed5..9f1376a12f 100644 --- a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c +++ b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c @@ -11,8 +11,6 @@ #define FLAGS (ACTOR_FLAG_10) -#define THIS ((TGSw*)thisx) - // Prototypes void TGSw_Init(Actor* thisx, PlayState* play); void TGSw_Destroy(Actor* thisx, PlayState* play); @@ -91,7 +89,7 @@ void TGSw_Die(TGSw* this, PlayState* play) { } void TGSw_Init(Actor* thisx, PlayState* play) { - TGSw* this = THIS; + TGSw* this = (TGSw*)thisx; this->actor.csId = this->actor.world.rot.z; this->actionFunc = TGSw_Idle; @@ -101,7 +99,7 @@ void TGSw_Destroy(Actor* thisx, PlayState* play) { } void TGSw_Update(Actor* thisx, PlayState* play) { - TGSw* this = THIS; + TGSw* this = (TGSw*)thisx; this->actionFunc(this, play); } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 4214b590de..40ea39ba5c 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -47,8 +47,6 @@ #include "assets/objects/object_link_nuts/object_link_nuts.h" #include "assets/objects/object_link_child/object_link_child.h" -#define THIS ((Player*)thisx) - void Player_Init(Actor* thisx, PlayState* play); void Player_Destroy(Actor* thisx, PlayState* play); void Player_Update(Actor* thisx, PlayState* play); @@ -8555,7 +8553,7 @@ s32 func_8083A878(PlayState* play, Player* this, f32 arg2) { */ void func_8083A98C(Actor* thisx, PlayState* play2) { PlayState* play = play2; - Player* this = THIS; + Player* this = (Player*)thisx; s32 camMode; if (play->csCtx.state != CS_STATE_IDLE) { @@ -11084,7 +11082,7 @@ Color_RGBA8 D_8085D33C = { 0, 0, 0, 150 }; void Player_Init(Actor* thisx, PlayState* play) { s32 pad; - Player* this = THIS; + Player* this = (Player*)thisx; s8 objectSlot; s32 respawnFlag; s32 var_a1; @@ -13010,7 +13008,7 @@ Color_RGB8 D_8085D580 = { 255, 255, 255 }; Color_RGB8 D_8085D584 = { 80, 80, 200 }; void Player_Draw(Actor* thisx, PlayState* play) { - Player* this = THIS; + Player* this = (Player*)thisx; f32 one = 1.0f; s32 spEC = false; diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.c b/src/overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.c index 078016eb4a..fb29c2fc5a 100644 --- a/src/overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.c +++ b/src/overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.c @@ -7,8 +7,6 @@ #include "global.h" #include "z_fbdemo_wipe1.h" -#define THIS ((TransitionWipe1*)thisx) - void* TransitionWipe1_Init(void* thisx); void TransitionWipe1_Destroy(void* thisx); void TransitionWipe1_Update(void* thisx, s32 updateRate); @@ -33,7 +31,7 @@ typedef enum { } TransitionWipe1Direction; void TransitionWipe1_Start(void* thisx) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; this->isDone = false; @@ -48,7 +46,7 @@ void TransitionWipe1_Start(void* thisx) { } void* TransitionWipe1_Init(void* thisx) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; bzero(this, sizeof(TransitionWipe1)); return this; @@ -58,7 +56,7 @@ void TransitionWipe1_Destroy(void* thisx) { } void TransitionWipe1_Update(void* thisx, s32 updateRate) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; if (this->direction != TRANS_WIPE1_DIR_IN) { this->texY += (((void)0, gSaveContext.transWipeSpeed) * 3) / updateRate; @@ -78,7 +76,7 @@ void TransitionWipe1_Update(void* thisx, s32 updateRate) { void TransitionWipe1_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; Mtx* modelView; - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; Gfx* texScroll; s32 pad[4]; @@ -104,13 +102,13 @@ void TransitionWipe1_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionWipe1_IsDone(void* thisx) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; return this->isDone; } void TransitionWipe1_SetType(void* thisx, s32 type) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; if (type == TRANS_INSTANCE_TYPE_FILL_OUT) { this->direction = TRANS_WIPE1_DIR_OUT; @@ -126,13 +124,13 @@ void TransitionWipe1_SetType(void* thisx, s32 type) { } void TransitionWipe1_SetColor(void* thisx, u32 color) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; this->primColor.rgba = color; } void TransitionWipe1_SetEnvColor(void* thisx, u32 color) { - TransitionWipe1* this = THIS; + TransitionWipe1* this = (TransitionWipe1*)thisx; this->envColor.rgba = color; } diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c b/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c index 927532fd84..9e81dcc683 100644 --- a/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c +++ b/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c @@ -7,8 +7,6 @@ #include "global.h" #include "z_fbdemo_wipe3.h" -#define THIS ((TransitionWipe3*)thisx) - void* TransitionWipe3_Init(void* thisx); void TransitionWipe3_Destroy(void* thisx); void TransitionWipe3_Update(void* thisx, s32 updateRate); @@ -53,7 +51,7 @@ typedef enum { } TransitionWipe3Color; void TransitionWipe3_Start(void* thisx) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; this->isDone = false; this->curTexture = sTransWipe3Textures[this->texIndex % ARRAY_COUNTU(sTransWipe3Textures)]; @@ -82,7 +80,7 @@ void TransitionWipe3_Start(void* thisx) { } void* TransitionWipe3_Init(void* thisx) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; bzero(this, sizeof(TransitionWipe3)); return this; @@ -92,13 +90,13 @@ void TransitionWipe3_Destroy(void* thisx) { } void TransitionWipe3_UpdateScrollY(void* thisx, f32 scroll) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; this->scrollY = (s32)(500.0f * scroll); } void TransitionWipe3_Update(void* thisx, s32 updateRate) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; if (this->dir != TRANS_WIPE3_DIR_IN) { if ((this->scrollY == 0) && (this->texIndex == 2)) { @@ -120,20 +118,21 @@ void TransitionWipe3_Update(void* thisx, s32 updateRate) { void TransitionWipe3_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; - Mtx* modelView = &THIS->modelView[THIS->frame]; + Mtx* modelView = &((TransitionWipe3*)thisx)->modelView[((TransitionWipe3*)thisx)->frame]; f32 scale = 14.8f; Gfx* texScroll; - THIS->frame ^= 1; + ((TransitionWipe3*)thisx)->frame ^= 1; gDPPipeSync(gfx++); - texScroll = Gfx_BranchTexScroll(&gfx, THIS->scrollX, THIS->scrollY, 16, 64); + texScroll = + Gfx_BranchTexScroll(&gfx, ((TransitionWipe3*)thisx)->scrollX, ((TransitionWipe3*)thisx)->scrollY, 16, 64); gSPSegment(gfx++, 0x09, texScroll); - gSPSegment(gfx++, 0x08, THIS->curTexture); - gDPSetColor(gfx++, G_SETPRIMCOLOR, THIS->color.rgba); - gDPSetColor(gfx++, G_SETENVCOLOR, THIS->color.rgba); - gSPMatrix(gfx++, &THIS->projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPPerspNormalize(gfx++, THIS->normal); - gSPMatrix(gfx++, &THIS->lookAt, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPSegment(gfx++, 0x08, ((TransitionWipe3*)thisx)->curTexture); + gDPSetColor(gfx++, G_SETPRIMCOLOR, ((TransitionWipe3*)thisx)->color.rgba); + gDPSetColor(gfx++, G_SETENVCOLOR, ((TransitionWipe3*)thisx)->color.rgba); + gSPMatrix(gfx++, &((TransitionWipe3*)thisx)->projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(gfx++, ((TransitionWipe3*)thisx)->normal); + gSPMatrix(gfx++, &((TransitionWipe3*)thisx)->lookAt, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); if (scale != 1.0f) { guScale(modelView, scale, scale, 1.0f); @@ -145,13 +144,13 @@ void TransitionWipe3_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionWipe3_IsDone(void* thisx) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; return this->isDone; } void TransitionWipe3_SetType(void* thisx, s32 type) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; if (type & TRANS_TYPE_SET_PARAMS) { this->speedType = TRANS3_GET_SPEED(type); @@ -165,13 +164,13 @@ void TransitionWipe3_SetType(void* thisx, s32 type) { } void TransitionWipe3_SetColor(void* thisx, u32 color) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; this->color.rgba = color; } void TransitionWipe3_SetEnvColor(void* thisx, u32 color) { - TransitionWipe3* this = THIS; + TransitionWipe3* this = (TransitionWipe3*)thisx; this->envColor.rgba = color; } diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c b/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c index c27f3e590b..68dac750ff 100644 --- a/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c +++ b/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c @@ -11,8 +11,6 @@ #include "z_fbdemo_wipe4.h" #include "sys_cfb.h" -#define THIS ((TransitionWipe4*)thisx) - #define TRANS4_GET_COLORTYPE(type) (((type) >> 1) & 3) #define TRANS4_GET_SPEEDTYPE(type) ((type)&1) @@ -92,19 +90,19 @@ void TransitionWipe4_Update(void* thisx, s32 updateRate) { } } -// Use of THIS in this function is required to match +// Use of ((TransitionWipe4*)thisx) in this function is required to match void TransitionWipe4_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; - VisFbuf* copyFx = &THIS->copyFx; + VisFbuf* copyFx = &((TransitionWipe4*)thisx)->copyFx; - copyFx->primColor.rgba = THIS->primColor.rgba; + copyFx->primColor.rgba = ((TransitionWipe4*)thisx)->primColor.rgba; - if (THIS->direction != 0) { - copyFx->scale = THIS->progress; - copyFx->lodProportion = 1.0f - THIS->progress; + if (((TransitionWipe4*)thisx)->direction != 0) { + copyFx->scale = ((TransitionWipe4*)thisx)->progress; + copyFx->lodProportion = 1.0f - ((TransitionWipe4*)thisx)->progress; } else { - copyFx->scale = 1.0f - THIS->progress; - copyFx->lodProportion = THIS->progress; + copyFx->scale = 1.0f - ((TransitionWipe4*)thisx)->progress; + copyFx->lodProportion = ((TransitionWipe4*)thisx)->progress; } //! @bug (Possibly) Since copyFx->mode is never set after being initialised to 0, the switch in VisFbuf_Draw() diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c b/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c index 2e382eb735..c4b8c36c71 100644 --- a/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c +++ b/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c @@ -10,8 +10,6 @@ #include "sys_ucode.h" #include "z_fbdemo_wipe5.h" -#define THIS ((TransitionWipe5*)thisx) - void* TransitionWipe5_Init(void* thisx); void TransitionWipe5_Destroy(void* thisx); void TransitionWipe5_Update(void* thisx, s32 updateRate); @@ -29,7 +27,7 @@ TransitionProfile TransitionWipe5_Profile = { }; void TransitionWipe5_Start(void* thisx) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; this->isDone = false; switch (this->unk_12) { @@ -62,7 +60,7 @@ void TransitionWipe5_Start(void* thisx) { } void* TransitionWipe5_Init(void* thisx) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; bzero(this, sizeof(TransitionWipe5)); return this; @@ -72,7 +70,7 @@ void TransitionWipe5_Destroy(void* thisx) { } void TransitionWipe5_Update(void* thisx, s32 updateRate) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; if (this->unk_10 == 0) { this->isDone = true; @@ -90,7 +88,7 @@ void TransitionWipe5_Draw(void* thisx, Gfx** gfxP) { s32 width = gScreenWidth; s32 height = gScreenHeight; void* workBuffer = gWorkBuffer; - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; s32 alpha = (1.0f - this->unk_0C) * 255.0f; gDPPipeSync(gfx++); @@ -124,13 +122,13 @@ void TransitionWipe5_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionWipe5_IsDone(void* thisx) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; return this->isDone; } void TransitionWipe5_SetType(void* thisx, s32 type) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; if (type & 0x80) { this->unk_11 = 0; @@ -143,13 +141,13 @@ void TransitionWipe5_SetType(void* thisx, s32 type) { } void TransitionWipe5_SetColor(void* thisx, u32 color) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; this->primColor.rgba = color; } void TransitionWipe5_SetEnvColor(void* thisx, u32 color) { - TransitionWipe5* this = THIS; + TransitionWipe5* this = (TransitionWipe5*)thisx; this->envColor.rgba = color; }