mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
git subrepo clone https://github.com/HarbourMasters/soh.git
subrepo: subdir: "soh" merged: "ba904bbd0" upstream: origin: "https://github.com/HarbourMasters/soh.git" branch: "master" commit: "ba904bbd0" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
This commit is contained in:
parent
0bb0e7b53b
commit
39cc86c260
2466 changed files with 451557 additions and 0 deletions
59
soh/src/code/z_player_call.c
Normal file
59
soh/src/code/z_player_call.c
Normal file
|
@ -0,0 +1,59 @@
|
|||
#include "global.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26)
|
||||
|
||||
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,
|
||||
NULL,
|
||||
};
|
||||
|
||||
void PlayerCall_InitFuncPtrs(void) {
|
||||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue