Files
mm/src/code/z_player_call.c
T
Anghelo Carvajal 997c45c2d2 Introduce z64pause_menu.h header (#1505)
* z64pause_menu.h

* move functions and variables

* Move PauseMenuPage

* move stuff that seems public to the new header

* KALEIDO_OVL_MAX

* bss

* review

* IS_PAUSED

* format

* add argument to pause macros

* Update include/z64pause_menu.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* bss

* More IS_PAUSED I missed

* early returns

* bss

* empty commit to trigger GHA

* bss

* bss

* bss

* includes

* bss

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-03-31 20:05:02 -07:00

58 lines
1.8 KiB
C

#include "prevent_bss_reordering.h"
#include "global.h"
#include "z64pause_menu.h"
#define FLAGS \
(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | \
ACTOR_FLAG_2000000 | ACTOR_FLAG_CAN_PRESS_SWITCH | ACTOR_FLAG_80000000)
ActorFunc sPlayerCallInitFunc;
ActorFunc sPlayerCallDestroyFunc;
ActorFunc sPlayerCallUpdateFunc;
ActorFunc sPlayerCallDrawFunc;
ActorInit Player_InitVars = {
/**/ ACTOR_PLAYER,
/**/ ACTORCAT_PLAYER,
/**/ FLAGS,
/**/ GAMEPLAY_KEEP,
/**/ sizeof(Player),
/**/ PlayerCall_Init,
/**/ PlayerCall_Destroy,
/**/ PlayerCall_Update,
/**/ PlayerCall_Draw,
};
void Player_Init(Actor* thisx, PlayState* play);
void Player_Destroy(Actor* thisx, PlayState* play);
void Player_Update(Actor* thisx, PlayState* play);
void Player_Draw(Actor* thisx, PlayState* play);
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, PlayState* play) {
KaleidoScopeCall_LoadPlayer();
PlayerCall_InitFuncPtrs();
sPlayerCallInitFunc(thisx, play);
}
void PlayerCall_Destroy(Actor* thisx, PlayState* play) {
KaleidoScopeCall_LoadPlayer();
sPlayerCallDestroyFunc(thisx, play);
}
void PlayerCall_Update(Actor* thisx, PlayState* play) {
KaleidoScopeCall_LoadPlayer();
sPlayerCallUpdateFunc(thisx, play);
}
void PlayerCall_Draw(Actor* thisx, PlayState* play) {
KaleidoScopeCall_LoadPlayer();
sPlayerCallDrawFunc(thisx, play);
}