Remove THIS macro (#1756)

* Remove THIS macro

* Revert changes to the documentation

* Undo revert to STYLE.md
This commit is contained in:
Tom Overton
2024-12-13 03:34:39 -08:00
committed by GitHub
parent f6d4a8731e
commit 8efc382b9f
581 changed files with 2710 additions and 3869 deletions
+3 -5
View File
@@ -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);