1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 22:41: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

@ -15,7 +15,6 @@ void EnOE2_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnOE2_Update(Actor* thisx, GlobalContext* globalCtx);
void EnOE2_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80ABE6A0(EnOE2* this, ActorFunc func);
void func_80ABE6DC(EnOE2* this, GlobalContext* globalCtx);
const ActorInit En_OE2_InitVars = {
@ -30,7 +29,7 @@ const ActorInit En_OE2_InitVars = {
(ActorFunc)EnOE2_Draw,
};
void EnOE2_SetupAction(EnOE2* this, ActorFunc actionFunc) {
void EnOE2_SetupAction(EnOE2* this, EnOE2ActionFunc actionFunc) {
this->actionFunc = actionFunc;
}

View file

@ -4,11 +4,16 @@
#include <ultra64.h>
#include <global.h>
typedef struct {
struct EnOE2;
typedef void (*EnOE2ActionFunc)(struct EnOE2*, GlobalContext*);
typedef struct EnOE2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x44];
/* 0x0190 */ ActorFunc actionFunc;
/* 0x0190 */ EnOE2ActionFunc actionFunc;
} EnOE2; // size = 0x0194
extern const ActorInit En_OE2_InitVars;
#endif