mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40: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
|
@ -8,10 +8,12 @@
|
|||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx);
|
||||
void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx);
|
||||
void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx);
|
||||
void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx);
|
||||
#define THIS ((EnLightbox*)thisx)
|
||||
|
||||
void EnLightbox_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnLightbox_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnLightbox_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit En_Lightbox_InitVars = {
|
||||
ACTOR_EN_LIGHTBOX,
|
||||
|
@ -28,9 +30,9 @@ const ActorInit En_Lightbox_InitVars = {
|
|||
extern u32 D_06000B70;
|
||||
extern u32 D_06001F10;
|
||||
|
||||
void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx) {
|
||||
void EnLightbox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
u32 local_c = 0;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
EnLightbox* this = THIS;
|
||||
s32 pad[4];
|
||||
|
||||
switch (thisx->params) {
|
||||
|
@ -61,12 +63,14 @@ void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx) {
|
|||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
}
|
||||
|
||||
void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx) {
|
||||
void EnLightbox_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnLightbox* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
}
|
||||
|
||||
void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnLightbox* this = THIS;
|
||||
|
||||
if (this->dyna.unk_162 != 0) {
|
||||
if (func_8002F5A0(thisx, globalCtx)) {
|
||||
|
@ -106,6 +110,6 @@ void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx) {
|
|||
thisx->posRot2.pos = thisx->posRot.pos;
|
||||
}
|
||||
|
||||
void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx) {
|
||||
void EnLightbox_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Gfx_DrawDListOpa(globalCtx, &D_06000B70);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue