1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-19 13:35:18 +00:00

Remove THIS macro (#1047)

* remove THIS

* fix

* forgot dorf
This commit is contained in:
fig02 2021-12-04 11:33:00 -05:00 committed by GitHub
parent 68899c2e33
commit e635e34265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
433 changed files with 1996 additions and 2859 deletions

View file

@ -9,8 +9,6 @@
#define FLAGS 0x00000009
#define THIS ((EnMu*)thisx)
void EnMu_Init(Actor* thisx, GlobalContext* globalCtx);
void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnMu_Update(Actor* thisx, GlobalContext* globalCtx);
@ -97,7 +95,7 @@ void EnMu_Interact(EnMu* this, GlobalContext* globalCtx) {
}
u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
u16 faceReaction = Text_GetFaceReaction(globalCtx, this->actor.params + 0x3A);
if (faceReaction != 0) {
@ -107,7 +105,7 @@ u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) {
}
s16 EnMu_CheckDialogState(GlobalContext* globalCtx, Actor* thisx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
switch (Message_GetState(&globalCtx->msgCtx)) {
case TEXT_STATE_NONE:
@ -129,7 +127,7 @@ s16 EnMu_CheckDialogState(GlobalContext* globalCtx, Actor* thisx) {
}
void EnMu_Init(Actor* thisx, GlobalContext* globalCtx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 160.0f);
@ -144,7 +142,7 @@ void EnMu_Init(Actor* thisx, GlobalContext* globalCtx) {
}
void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
SkelAnime_Free(&this->skelAnime, globalCtx);
}
@ -154,7 +152,7 @@ void EnMu_Pose(EnMu* this, GlobalContext* globalCtx) {
}
void EnMu_Update(Actor* thisx, GlobalContext* globalCtx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
s32 pad;
f32 talkDist;
Vec3s pos;
@ -178,7 +176,7 @@ void EnMu_Update(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnMu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
if ((limbIndex == 5) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 11) || (limbIndex == 12) ||
(limbIndex == 13) || (limbIndex == 14)) {
@ -201,7 +199,7 @@ Gfx* EnMu_DisplayListSetColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) {
}
void EnMu_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnMu* this = THIS;
EnMu* this = (EnMu*)thisx;
Color_RGBA8 colors[2][5] = {
{ { 100, 130, 235, 0 }, { 160, 250, 60, 0 }, { 90, 60, 20, 0 }, { 30, 240, 200, 0 }, { 140, 70, 20, 0 } },
{ { 140, 70, 20, 0 }, { 30, 240, 200, 0 }, { 90, 60, 20, 0 }, { 160, 250, 60, 0 }, { 100, 130, 235, 0 } }