1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 14:50:15 +00:00

More actor cleanup Part 2 (#116)

* Change all main actor functions to take a 'Actor* thisx' argument

* Change all actor callbacks to also take a 'Actor* thisx' argument
This commit is contained in:
Roman971 2020-05-04 21:02:51 +02:00 committed by GitHub
parent 8efddb0fe0
commit f114df8929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
429 changed files with 3689 additions and 2523 deletions

View file

@ -8,10 +8,13 @@
#define FLAGS 0x00000000
void EnBird_Init(EnBird* this, GlobalContext* globalCtx);
void EnBird_Destroy(EnBird* this, GlobalContext* globalCtx);
void EnBird_Update(EnBird* this, GlobalContext* globalCtx);
void EnBird_Draw(EnBird* this, GlobalContext* globalCtx);
#define THIS ((EnBird*)thisx)
void EnBird_Init(Actor* thisx, GlobalContext* globalCtx);
void EnBird_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnBird_Update(Actor* thisx, GlobalContext* globalCtx);
void EnBird_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_809C1E00(EnBird* this, s16 params);
void func_809C1E40(EnBird* this, GlobalContext* globalCtx);
void EnBird_SetupAction(EnBird* this, ActorFunc actionFunc);
@ -41,7 +44,9 @@ void EnBird_SetupAction(EnBird* this, ActorFunc actionFunc) {
this->actionFunc = actionFunc;
}
void EnBird_Init(EnBird* this, GlobalContext* globalCtx) {
void EnBird_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBird* this = THIS;
Actor_ProcessInitChain(&this->actor, initChain);
Actor_SetScale(&this->actor, 0.01);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06002190, &D_0600006C, 0, 0, 0);
@ -60,7 +65,7 @@ void EnBird_Init(EnBird* this, GlobalContext* globalCtx) {
func_809C1CAC(this, this->actor.params);
}
void EnBird_Destroy(EnBird* this, GlobalContext* globalCtx) {
void EnBird_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_809C1CAC(EnBird* this, s16 params) {
@ -117,11 +122,15 @@ void func_809C1E40(EnBird* this, GlobalContext* globalCtx) {
}
}
void EnBird_Update(EnBird* this, GlobalContext* globalCtx) {
void EnBird_Update(Actor* thisx, GlobalContext* globalCtx) {
EnBird* this = THIS;
this->unk_1B4 += this->unk_1B8;
this->actionFunc(this, globalCtx);
}
void EnBird_Draw(EnBird* this, GlobalContext* globalCtx) {
void EnBird_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnBird* this = THIS;
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, 0, NULL, NULL);
}