mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-09 00:00:44 +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,9 +8,12 @@
|
|||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
void ObjRoomtimer_Init(ObjRoomtimer* this, GlobalContext* globalCtx);
|
||||
void ObjRoomtimer_Destroy(ObjRoomtimer* this, GlobalContext* globalCtx);
|
||||
void ObjRoomtimer_Update(ObjRoomtimer* this, GlobalContext* globalCtx);
|
||||
#define THIS ((ObjRoomtimer*)thisx)
|
||||
|
||||
void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ObjRoomtimer_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ObjRoomtimer_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void func_80B9D054(ObjRoomtimer* this, GlobalContext* globalCtx);
|
||||
void func_80B9D0B0(ObjRoomtimer* this, GlobalContext* globalCtx);
|
||||
|
||||
|
@ -26,7 +29,8 @@ const ActorInit Obj_Roomtimer_InitVars = {
|
|||
(ActorFunc)NULL,
|
||||
};
|
||||
|
||||
void ObjRoomtimer_Init(ObjRoomtimer* this, GlobalContext* globalCtx) {
|
||||
void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjRoomtimer* this = THIS;
|
||||
s16 params = this->actor.params;
|
||||
|
||||
this->switchFlag = (params >> 10) & 0x3F;
|
||||
|
@ -44,7 +48,9 @@ void ObjRoomtimer_Init(ObjRoomtimer* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = (ActorFunc)func_80B9D054;
|
||||
}
|
||||
|
||||
void ObjRoomtimer_Destroy(ObjRoomtimer* this, GlobalContext* globalCtx) {
|
||||
void ObjRoomtimer_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjRoomtimer* this = THIS;
|
||||
|
||||
if (this->actor.params != 0x3FF) {
|
||||
if (gSaveContext.timer1Value > 0) {
|
||||
gSaveContext.timer1State = 10;
|
||||
|
@ -82,6 +88,8 @@ void func_80B9D0B0(ObjRoomtimer* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void ObjRoomtimer_Update(ObjRoomtimer* this, GlobalContext* globalCtx) {
|
||||
void ObjRoomtimer_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjRoomtimer* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue