mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 22:30: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:
parent
8efddb0fe0
commit
f114df8929
429 changed files with 3689 additions and 2523 deletions
|
@ -10,10 +10,12 @@
|
|||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
void EnRu2_Init(EnRu2* this, GlobalContext* globalCtx);
|
||||
void EnRu2_Destroy(EnRu2* this, GlobalContext* globalCtx);
|
||||
void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx);
|
||||
void EnRu2_Draw(EnRu2* this, GlobalContext* globalCtx);
|
||||
#define THIS ((EnRu2*)thisx)
|
||||
|
||||
void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnRu2_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnRu2_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnRu2_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void func_80AF2CB4(EnRu2* this, GlobalContext* globalCtx);
|
||||
void func_80AF2CD4(EnRu2* this, GlobalContext* globalCtx);
|
||||
|
@ -93,10 +95,11 @@ extern AnimationHeader D_0600E630;
|
|||
extern AnimationHeader D_0600F03C;
|
||||
extern AnimationHeader D_0600F8B8;
|
||||
|
||||
void func_80AF2550(EnRu2* this, GlobalContext* globalCtx) {
|
||||
EnRu2* thisLocal = this;
|
||||
Collider_InitCylinder(globalCtx, &thisLocal->collider);
|
||||
Collider_SetCylinder_Set3(globalCtx, &thisLocal->collider, &this->actor, &colliderInit);
|
||||
void func_80AF2550(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnRu2* this = THIS;
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder_Set3(globalCtx, &this->collider, &this->actor, &colliderInit);
|
||||
}
|
||||
|
||||
void func_80AF259C(EnRu2* this, GlobalContext* globalCtx) {
|
||||
|
@ -109,9 +112,10 @@ void func_80AF259C(EnRu2* this, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, collider);
|
||||
}
|
||||
|
||||
void EnRu2_Destroy(EnRu2* this, GlobalContext* globalCtx) {
|
||||
ColliderCylinder* collider = &this->collider;
|
||||
Collider_DestroyCylinder(globalCtx, collider);
|
||||
void EnRu2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnRu2* this = THIS;
|
||||
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
void func_80AF2608(EnRu2* this) {
|
||||
|
@ -746,7 +750,9 @@ void func_80AF3D60(EnRu2* this, GlobalContext* globalCtx) {
|
|||
func_80AF3B74(this, globalCtx);
|
||||
}
|
||||
|
||||
void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx) {
|
||||
void EnRu2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnRu2* this = THIS;
|
||||
|
||||
if (this->action < 0 || this->action >= 20 || D_80AF50BC[this->action] == 0) {
|
||||
osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
|
||||
return;
|
||||
|
@ -754,9 +760,11 @@ void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx) {
|
|||
D_80AF50BC[this->action](this, globalCtx);
|
||||
}
|
||||
|
||||
void EnRu2_Init(EnRu2* this, GlobalContext* globalCtx) {
|
||||
void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnRu2* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
func_80AF2550(this, globalCtx);
|
||||
func_80AF2550(thisx, globalCtx);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->limbDrawTable, &this->transitionDrawTable,
|
||||
23);
|
||||
|
||||
|
@ -803,7 +811,9 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) {
|
|||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2.c", 663);
|
||||
}
|
||||
|
||||
void EnRu2_Draw(EnRu2* this, GlobalContext* globalCtx) {
|
||||
void EnRu2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnRu2* this = THIS;
|
||||
|
||||
if (this->drawConfig < 0 || this->drawConfig >= 3 || D_80AF510C[this->drawConfig] == 0) {
|
||||
osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue