diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-08-21 14:46:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-21 11:46:13 -0700 |
| commit | 74ba3014c974ae9a260d6485be71258310edb59a (patch) | |
| tree | 2f6bf91ad410b1246118c80c21721347c0433252 /src/code | |
| parent | 021809c0ec3b9c2b877c130389d7a4e2292824f8 (diff) | |
`m_player_call` OK (#68)
* C file
* most funcs
* initfunc and migrate data/bss
* format
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/m_player_call.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/code/m_player_call.c b/src/code/m_player_call.c new file mode 100644 index 0000000..2ab20e0 --- /dev/null +++ b/src/code/m_player_call.c @@ -0,0 +1,59 @@ +#include "ultra64.h" +#include "m_actor.h" +#include "m_actor_dlftbls.h" +#include "m_object.h" +#include "overlays/gamestates/ovl_play/m_play.h" +#include "overlays/actors/player_actor/m_player.h" + +ActorFunc Player_actor_ct_func; +ActorFunc Player_actor_dt_func; +ActorFunc Player_actor_move_func; +ActorFunc Player_actor_draw_func; + +void Player_actor_ct_call(Actor* thisx, Game_Play* game_play); +void Player_actor_dt_call(Actor* thisx, Game_Play* game_play); +void Player_actor_move_call(Actor* thisx, Game_Play* game_play); +void Player_actor_draw_call(Actor* thisx, Game_Play* game_play); + +ActorProfile Player_Profile = { + /* */ ACTOR_PLAYER, + /* */ ACTOR_PART_PLAYER, + /* */ ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_2000000 | ACTOR_FLAG_4000000 | + ACTOR_FLAG_20000000, + /* */ 0, + /* */ GAMEPLAY_KEEP, + /* */ sizeof(Player), + /* */ Player_actor_ct_call, + /* */ Player_actor_dt_call, + /* */ Player_actor_move_call, + /* */ Player_actor_draw_call, + /* */ NULL, +}; + +void initfunc(Game_Play* game_play) { + Player_actor_ct_func = mSM_ovlptr_dllcnv(Player_actor_ct, &game_play->unk_1CBC); + Player_actor_dt_func = mSM_ovlptr_dllcnv(Player_actor_dt, &game_play->unk_1CBC); + Player_actor_move_func = mSM_ovlptr_dllcnv(Player_actor_move, &game_play->unk_1CBC); + Player_actor_draw_func = mSM_ovlptr_dllcnv(Player_actor_draw, &game_play->unk_1CBC); +} + +void Player_actor_ct_call(Actor* thisx, Game_Play* game_play) { + load_player(&game_play->unk_1CBC); + initfunc(game_play); + Player_actor_ct_func(thisx, game_play); +} + +void Player_actor_dt_call(Actor* thisx, Game_Play* game_play) { + load_player(&game_play->unk_1CBC); + Player_actor_dt_func(thisx, game_play); +} + +void Player_actor_move_call(Actor* thisx, Game_Play* game_play) { + load_player(&game_play->unk_1CBC); + Player_actor_move_func(thisx, game_play); +} + +void Player_actor_draw_call(Actor* thisx, Game_Play* game_play) { + load_player(&game_play->unk_1CBC); + Player_actor_draw_func(thisx, game_play); +} |
