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

@ -39,8 +39,6 @@
#define FLAGS 0x00000010
#define THIS ((DemoEc*)thisx)
void DemoEc_Init(Actor* thisx, GlobalContext* globalCtx);
void DemoEc_Destroy(Actor* thisx, GlobalContext* globalCtx);
void DemoEc_Update(Actor* thisx, GlobalContext* globalCtx);
@ -154,13 +152,13 @@ extern FlexSkeletonHeader object_bji_Skel_0000F0;
extern FlexSkeletonHeader object_ahg_Skel_0000F0;
void DemoEc_Destroy(Actor* thisx, GlobalContext* globalCtx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
SkelAnime_Free(&this->skelAnime, globalCtx);
}
void DemoEc_Init(Actor* thisx, GlobalContext* globalCtx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
if ((this->actor.params < 0) || (this->actor.params > 34)) {
osSyncPrintf(VT_FGCOL(RED) "Demo_Ec_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" VT_RST);
@ -643,7 +641,7 @@ void DemoEc_UpdateCarpenter(DemoEc* this, GlobalContext* globalCtx) {
s32 DemoEc_CarpenterOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* thisx, Gfx** gfx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
if (limbIndex == 1) {
gDPPipeSync((*gfx)++);
@ -684,7 +682,7 @@ Gfx* DemoEc_GetCarpenterPostLimbDList(DemoEc* this) {
void DemoEc_CarpenterPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx,
Gfx** gfx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
Gfx* postLimbDList;
if (limbIndex == 15) {
@ -731,7 +729,7 @@ Gfx* DemoEc_GetGerudoPostLimbDList(DemoEc* this) {
void DemoEc_GerudoPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx,
Gfx** gfx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
Gfx* postLimbDList;
if (limbIndex == 15) {
@ -1050,7 +1048,7 @@ void DemoEc_UpdateFishingOwner(DemoEc* this, GlobalContext* globalCtx) {
void DemoEc_FishingOwnerPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx,
Gfx** gfx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
if ((limbIndex == 8) && !(HIGH_SCORE(HS_FISHING) & 0x1000)) {
gSPDisplayList((*gfx)++, SEGMENTED_TO_VIRTUAL(gFishingOwnerHatDL));
@ -1289,7 +1287,7 @@ static DemoEcUpdateFunc sUpdateFuncs[] = {
};
void DemoEc_Update(Actor* thisx, GlobalContext* globalCtx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
s32 updateMode = this->updateMode;
if ((updateMode < 0) || (updateMode >= ARRAY_COUNT(sUpdateFuncs)) || sUpdateFuncs[updateMode] == NULL) {
@ -1322,7 +1320,7 @@ static DemoEcDrawFunc sDrawFuncs[] = {
};
void DemoEc_Draw(Actor* thisx, GlobalContext* globalCtx) {
DemoEc* this = THIS;
DemoEc* this = (DemoEc*)thisx;
s32 drawConfig = this->drawConfig;
if ((drawConfig < 0) || (drawConfig >= ARRAY_COUNT(sDrawFuncs)) || sDrawFuncs[drawConfig] == NULL) {