mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Implement & link ac_normal_npc
This commit is contained in:
+1
-1
@@ -1106,7 +1106,7 @@ config.libs = [
|
||||
Object(NonMatching, "actor/npc/ac_harvest_npc1.c"),
|
||||
Object(Matching, "actor/npc/ac_hatumode_npc0.c"),
|
||||
Object(NonMatching, "actor/npc/ac_kamakura_npc0.c"),
|
||||
Object(NonMatching, "actor/npc/ac_normal_npc.c"),
|
||||
Object(Matching, "actor/npc/ac_normal_npc.c"),
|
||||
Object(Matching, "actor/npc/ac_npc.c"),
|
||||
Object(Matching, "actor/npc/ac_npc2.c"),
|
||||
Object(Matching, "actor/npc/ac_npc_conv_master.c"),
|
||||
|
||||
@@ -3,11 +3,18 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_npc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct normal_npc_actor_s NORMAL_NPC_ACTOR;
|
||||
|
||||
struct normal_npc_actor_s {
|
||||
NPC_ACTOR npc_class;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Normal_Npc_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -15,4 +22,3 @@ extern ACTOR_PROFILE Normal_Npc_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "ac_normal_npc.h"
|
||||
|
||||
#include "m_common_data.h"
|
||||
|
||||
static void aNOR_actor_ct(ACTOR* actorx, GAME* game);
|
||||
static void aNOR_actor_dt(ACTOR* actorx, GAME* game);
|
||||
static void aNOR_actor_move(ACTOR* actorx, GAME* game);
|
||||
static void aNOR_actor_draw(ACTOR* actorx, GAME* game);
|
||||
static void aNOR_actor_init(ACTOR* actorx, GAME* game);
|
||||
static void aNOR_actor_save(ACTOR* actorx, GAME* game);
|
||||
|
||||
// clang-format off
|
||||
ACTOR_PROFILE Normal_Npc_Profile = {
|
||||
mAc_PROFILE_NORMAL_NPC,
|
||||
ACTOR_PART_NPC,
|
||||
ACTOR_STATE_NONE,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(NORMAL_NPC_ACTOR),
|
||||
aNOR_actor_ct,
|
||||
aNOR_actor_dt,
|
||||
aNOR_actor_init,
|
||||
mActor_NONE_PROC1,
|
||||
aNOR_actor_save,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static void aNOR_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
static aNPC_ct_data_c ct_data = {
|
||||
// clang-format off
|
||||
aNOR_actor_move,
|
||||
aNOR_actor_draw,
|
||||
aNPC_CT_SCHED_TYPE_NORMAL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
if (CLIP(npc_clip)->birth_check_proc(actorx, game) == TRUE) {
|
||||
CLIP(npc_clip)->ct_proc(actorx, game, &ct_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void aNOR_actor_dt(ACTOR* actorx, GAME* game) {
|
||||
CLIP(npc_clip)->dt_proc(actorx, game);
|
||||
}
|
||||
|
||||
static void aNOR_actor_save(ACTOR* actorx, GAME* game) {
|
||||
CLIP(npc_clip)->save_proc(actorx, game);
|
||||
}
|
||||
|
||||
static void aNOR_actor_init(ACTOR* actorx, GAME* game) {
|
||||
CLIP(npc_clip)->init_proc(actorx, game);
|
||||
}
|
||||
|
||||
static void aNOR_actor_move(ACTOR* actorx, GAME* game) {
|
||||
CLIP(npc_clip)->move_proc(actorx, game);
|
||||
}
|
||||
|
||||
static void aNOR_actor_draw(ACTOR* actorx, GAME* game) {
|
||||
CLIP(npc_clip)->draw_proc(actorx, game);
|
||||
}
|
||||
Reference in New Issue
Block a user