mirror of
https://github.com/zeldaret/oot
synced 2026-06-05 11:18:12 -04:00
00a5edea71
* reformat header * type -> category * done for now i think * some more stuff * first -> head * focus * flag comment * ground -> floor * remove asm, name wrapper funcs * name func, format * review * targetPriority, format * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0305ec2c2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0305ec2c2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * comment * review * feet flags * horse shadow
59 lines
2.0 KiB
C
59 lines
2.0 KiB
C
#include "global.h"
|
|
|
|
#define FLAGS 0x06000035
|
|
|
|
void (*sPlayerCallInitFunc)(Actor* thisx, GlobalContext* globalCtx);
|
|
void (*sPlayerCallDestroyFunc)(Actor* thisx, GlobalContext* globalCtx);
|
|
void (*sPlayerCallUpdateFunc)(Actor* thisx, GlobalContext* globalCtx);
|
|
void (*sPlayerCallDrawFunc)(Actor* thisx, GlobalContext* globalCtx);
|
|
|
|
void PlayerCall_Init(Actor* thisx, GlobalContext* globalCtx);
|
|
void PlayerCall_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|
void PlayerCall_Update(Actor* thisx, GlobalContext* globalCtx);
|
|
void PlayerCall_Draw(Actor* thisx, GlobalContext* globalCtx);
|
|
|
|
void Player_Init(Actor* thisx, GlobalContext* globalCtx);
|
|
void Player_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|
void Player_Update(Actor* thisx, GlobalContext* globalCtx);
|
|
void Player_Draw(Actor* thisx, GlobalContext* globalCtx);
|
|
|
|
const ActorInit Player_InitVars = {
|
|
ACTOR_PLAYER,
|
|
ACTORCAT_PLAYER,
|
|
FLAGS,
|
|
OBJECT_GAMEPLAY_KEEP,
|
|
sizeof(Player),
|
|
(ActorFunc)PlayerCall_Init,
|
|
(ActorFunc)PlayerCall_Destroy,
|
|
(ActorFunc)PlayerCall_Update,
|
|
(ActorFunc)PlayerCall_Draw,
|
|
};
|
|
|
|
void PlayerCall_InitFuncPtrs() {
|
|
sPlayerCallInitFunc = KaleidoManager_GetRamAddr(Player_Init);
|
|
sPlayerCallDestroyFunc = KaleidoManager_GetRamAddr(Player_Destroy);
|
|
sPlayerCallUpdateFunc = KaleidoManager_GetRamAddr(Player_Update);
|
|
sPlayerCallDrawFunc = KaleidoManager_GetRamAddr(Player_Draw);
|
|
}
|
|
|
|
void PlayerCall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
PlayerCall_InitFuncPtrs();
|
|
sPlayerCallInitFunc(thisx, globalCtx);
|
|
}
|
|
|
|
void PlayerCall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
sPlayerCallDestroyFunc(thisx, globalCtx);
|
|
}
|
|
|
|
void PlayerCall_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
sPlayerCallUpdateFunc(thisx, globalCtx);
|
|
}
|
|
|
|
void PlayerCall_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
sPlayerCallDrawFunc(thisx, globalCtx);
|
|
}
|