mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
link m_player_call
This commit is contained in:
@@ -195,6 +195,10 @@ m_olib.c:
|
||||
.rodata: [0x80642A00, 0x80642A10]
|
||||
m_pause.c:
|
||||
.text: [0x803D8A34, 0x803D8AEC]
|
||||
m_player_call.c:
|
||||
.text: [0x803D8AEC, 0x803D8CEC]
|
||||
.data: [0x8065B9A0, 0x8065B9C8]
|
||||
.bss: [0x8129CC98, 0x8129CCA8]
|
||||
m_police_box.c:
|
||||
.text: [0x803DE8A0, 0x803DEE38]
|
||||
.rodata: [0x806431C8, 0x806431D8]
|
||||
|
||||
@@ -21,6 +21,8 @@ typedef void (*mActor_proc)(ACTOR*, GAME*);
|
||||
#define mAc_MAX_ACTORS 200
|
||||
|
||||
#define ACTOR_STATE_NONE 0
|
||||
#define ACTOR_STATE_0 (1 << 0)
|
||||
#define ACTOR_STATE_2 (1 << 2)
|
||||
#define ACTOR_STATE_NO_MOVE_WHILE_CULLED (1 << 4)
|
||||
#define ACTOR_STATE_NO_DRAW_WHILE_CULLED (1 << 5)
|
||||
#define ACTOR_STATE_NO_CULL (1 << 6)
|
||||
@@ -29,6 +31,7 @@ typedef void (*mActor_proc)(ACTOR*, GAME*);
|
||||
#define ACTOR_STATE_LIGHTING (1 << 22) // does lighting NOT affect this actor?
|
||||
#define ACTOR_STATE_24 (1 << 24)
|
||||
#define ACTOR_STATE_25 (1 << 25)
|
||||
#define ACTOR_STATE_26 (1 << 26)
|
||||
#define ACTOR_STATE_CAN_MOVE_IN_DEMO_SCENES (1 << 29)
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,11 @@ struct player_actor_s {
|
||||
/* TODO: finish */
|
||||
};
|
||||
|
||||
void Player_actor_ct(ACTOR*, GAME*);
|
||||
void Player_actor_dt(ACTOR*, GAME*);
|
||||
void Player_actor_move(ACTOR*, GAME*);
|
||||
void Player_actor_draw(ACTOR*, GAME*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -104,6 +104,8 @@ struct submenu_s {
|
||||
};
|
||||
|
||||
extern void mSM_open_submenu(Submenu* submenu, int menu_type, int arg0, int arg1);
|
||||
extern void load_player(Submenu* submenu);
|
||||
extern void* mSM_ovlptr_dllcnv(void* vram, Submenu* submenu, int);
|
||||
extern void mSM_submenu_dt(Submenu*);
|
||||
extern void mSM_submenu_ovlptr_cleanup(Submenu*);
|
||||
extern void mSM_submenu_ovlptr_init(GAME_PLAY*);
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
#include "m_player_call.h"
|
||||
|
||||
#include "m_player.h"
|
||||
#include "m_name_table.h"
|
||||
#include "m_play.h"
|
||||
|
||||
mActor_proc Player_actor_ct_func;
|
||||
mActor_proc Player_actor_dt_func;
|
||||
mActor_proc Player_actor_move_func;
|
||||
mActor_proc Player_actor_draw_func;
|
||||
|
||||
void Player_actor_ct_call(ACTOR* actor, GAME* game);
|
||||
void Player_actor_dt_call(ACTOR* actor, GAME* game);
|
||||
void Player_actor_move_call(ACTOR* actor, GAME* game);
|
||||
void Player_actor_draw_call(ACTOR* actor, GAME* game);
|
||||
|
||||
ACTOR_PROFILE Player_Profile = {
|
||||
mAc_PROFILE_PLAYER,
|
||||
ACTOR_PART_PLAYER,
|
||||
ACTOR_STATE_CAN_MOVE_IN_DEMO_SCENES | ACTOR_STATE_26 | ACTOR_STATE_25 |
|
||||
ACTOR_STATE_NO_MOVE_WHILE_CULLED | ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_2 | ACTOR_STATE_0,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(PLAYER_ACTOR),
|
||||
Player_actor_ct_call,
|
||||
Player_actor_dt_call,
|
||||
Player_actor_move_call,
|
||||
Player_actor_draw_call,
|
||||
NULL,
|
||||
};
|
||||
|
||||
void initfunc(GAME_PLAY* play){
|
||||
Submenu* submenu = &play->submenu;
|
||||
|
||||
Player_actor_ct_func = mSM_ovlptr_dllcnv(&Player_actor_ct, submenu , 1);
|
||||
Player_actor_dt_func = mSM_ovlptr_dllcnv(&Player_actor_dt, submenu, 1);
|
||||
Player_actor_move_func = mSM_ovlptr_dllcnv(&Player_actor_move, submenu,1);
|
||||
Player_actor_draw_func = mSM_ovlptr_dllcnv(&Player_actor_draw, submenu,1);
|
||||
}
|
||||
|
||||
static void Player_actor_ct_call(ACTOR* actor, GAME* game){
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
load_player(&play->submenu);
|
||||
initfunc(play);
|
||||
Player_actor_ct_func(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_dt_call(ACTOR* actor, GAME* game){
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
load_player(&play->submenu);
|
||||
Player_actor_dt_func(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_move_call(ACTOR* actor, GAME* game){
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
load_player(&play->submenu);
|
||||
Player_actor_move_func(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_draw_call(ACTOR* actor, GAME* game){
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
load_player(&play->submenu);
|
||||
Player_actor_draw_func(actor, game);
|
||||
}
|
||||
Reference in New Issue
Block a user