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

More actor cleanup Part 3 (#118)

* Add custom types for actor specific functions (like actions)

* Add a forward struct declaration for all other actors
This commit is contained in:
Roman971 2020-05-06 00:53:15 +02:00 committed by GitHub
parent f114df8929
commit 1425678d8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
477 changed files with 1817 additions and 792 deletions

View file

@ -45,7 +45,7 @@ void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx) {
}
}
this->actionFunc = (ActorFunc)func_80B9D054;
this->actionFunc = func_80B9D054;
}
void ObjRoomtimer_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -64,7 +64,7 @@ void func_80B9D054(ObjRoomtimer* this, GlobalContext* globalCtx) {
}
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORTYPE_PROP);
this->actionFunc = (ActorFunc)func_80B9D0B0;
this->actionFunc = func_80B9D0B0;
}
void func_80B9D0B0(ObjRoomtimer* this, GlobalContext* globalCtx) {

View file

@ -5,9 +5,13 @@
#include <global.h>
#include <z64.h>
typedef struct {
struct ObjRoomtimer;
typedef void (*ObjRoomtimerActionFunc)(struct ObjRoomtimer*, GlobalContext*);
typedef struct ObjRoomtimer {
/* 0x0000 */ Actor actor;
/* 0x014C */ ActorFunc actionFunc;
/* 0x014C */ ObjRoomtimerActionFunc actionFunc;
/* 0x0150 */ u32 switchFlag;
} ObjRoomtimer; // size = 0x0154