1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +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 ((EnDs*)thisx)
void EnDs_Init(Actor* thisx, GlobalContext* globalCtx);
void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnDs_Update(Actor* thisx, GlobalContext* globalCtx);
@ -31,7 +29,7 @@ const ActorInit En_Ds_InitVars = {
};
void EnDs_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDs* this = THIS;
EnDs* this = (EnDs*)thisx;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gPotionShopLadySkel, &gPotionShopLadyAnim, this->jointTable,
@ -235,7 +233,7 @@ void EnDs_Wait(EnDs* this, GlobalContext* globalCtx) {
}
void EnDs_Update(Actor* thisx, GlobalContext* globalCtx) {
EnDs* this = THIS;
EnDs* this = (EnDs*)thisx;
if (SkelAnime_Update(&this->skelAnime) != 0) {
this->skelAnime.curFrame = 0.0f;
@ -254,7 +252,7 @@ void EnDs_Update(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnDs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnDs* this = THIS;
EnDs* this = (EnDs*)thisx;
if (limbIndex == 5) {
rot->x += this->unk_1D8.y;
@ -265,7 +263,7 @@ s32 EnDs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
void EnDs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
static Vec3f sMultVec = { 1100.0f, 500.0f, 0.0f };
EnDs* this = THIS;
EnDs* this = (EnDs*)thisx;
if (limbIndex == 5) {
Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos);
@ -273,7 +271,7 @@ void EnDs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnDs_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnDs* this = THIS;
EnDs* this = (EnDs*)thisx;
func_800943C8(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,