mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Implement & link ac_groundhog_npc0
This commit is contained in:
@@ -9,57 +9,69 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define aGHC_TIME_CHECK(hour, min, sec) (Common_Get(time.now_sec) >= ((hour) * mTM_SECONDS_IN_HOUR + (min) * mTM_SECONDS_IN_MINUTE + (sec)))
|
||||
#define aGHC_TIME_CHECK(hour, min, sec) \
|
||||
(Common_Get(time.now_sec) >= ((hour) * mTM_SECONDS_IN_HOUR + (min) * mTM_SECONDS_IN_MINUTE + (sec)))
|
||||
|
||||
typedef struct groundhog_control_actor_s GROUNDHOG_CONTROL_ACTOR;
|
||||
|
||||
enum {
|
||||
aGHC_ACTION_BEFORE_800,
|
||||
aGHC_ACTION_BIRTH_RESET_WAIT,
|
||||
aGHC_ACTION_BIRTH_RESET,
|
||||
aGHC_ACTION_RETIRE_RESET_WAIT,
|
||||
aGHC_ACTION_RESET_SPEECH_BGM_START_WAIT,
|
||||
aGHC_ACTION_SONCHO_SPEECH_START_WAIT,
|
||||
aGHC_ACTION_SONCHO_SPEECH_END_WAIT,
|
||||
aGHC_ACTION_FADE_OUT_START_WAIT,
|
||||
aGHC_ACTION_AFTER_800,
|
||||
aGHC_ACTION_BEFORE_800,
|
||||
aGHC_ACTION_BIRTH_RESET_WAIT,
|
||||
aGHC_ACTION_BIRTH_RESET,
|
||||
aGHC_ACTION_RETIRE_RESET_WAIT,
|
||||
aGHC_ACTION_RESET_SPEECH_BGM_START_WAIT,
|
||||
aGHC_ACTION_SONCHO_SPEECH_START_WAIT,
|
||||
aGHC_ACTION_SONCHO_SPEECH_END_WAIT,
|
||||
aGHC_ACTION_FADE_OUT_START_WAIT,
|
||||
aGHC_ACTION_AFTER_800,
|
||||
|
||||
aGHC_ACTION_NUM
|
||||
aGHC_ACTION_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aGHC_ATTENTION_SONCHO,
|
||||
aGHC_ATTENTION_GROUNDHOG,
|
||||
aGHC_ATTENTION_SONCHO,
|
||||
aGHC_ATTENTION_GROUNDHOG,
|
||||
|
||||
aGHC_ATTENTION_NUM
|
||||
aGHC_ATTENTION_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aGHC_EVENT_STATE_NONE, /* nothing to report */
|
||||
aGHC_EVENT_STATE_MAJIN_DONE, /* ac_ev_majin signals it is done */
|
||||
aGHC_EVENT_STATE_SONCHO_DONE, /* ac_ev_speech_soncho signals it is done */
|
||||
aGHC_EVENT_STATE_NONE, /* nothing to report */
|
||||
aGHC_EVENT_STATE_MAJIN_DONE, /* ac_ev_majin signals it is done */
|
||||
aGHC_EVENT_STATE_SONCHO_DONE, /* ac_ev_speech_soncho signals it is done */
|
||||
|
||||
aGHC_EVENT_STATE_NUM
|
||||
aGHC_EVENT_STATE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aGHC_TERM_1_HOUR,
|
||||
aGHC_TERM_30_MIN,
|
||||
aGHC_TERM_15_MIN,
|
||||
aGHC_TERM_5_MIN,
|
||||
aGHC_TERM_1_MIN,
|
||||
aGHC_TERM_EVENT_TIME,
|
||||
|
||||
aGHC_TERM_NUM
|
||||
};
|
||||
|
||||
typedef struct groundhog_control_clip_s {
|
||||
int now_term;
|
||||
ACTOR* groundhog_npc_actor;
|
||||
ACTOR* attention_target_actor;
|
||||
int fading_title;
|
||||
int now_term;
|
||||
ACTOR* groundhog_npc_actor;
|
||||
ACTOR* attention_target_actor;
|
||||
int fading_title;
|
||||
} aGHC_Clip_c;
|
||||
|
||||
typedef void (*aGHC_ACTION_PROC)(GROUNDHOG_CONTROL_ACTOR*, GAME_PLAY*);
|
||||
|
||||
struct groundhog_control_actor_s {
|
||||
ACTOR actor_class;
|
||||
int action;
|
||||
aGHC_ACTION_PROC action_proc;
|
||||
int event_state;
|
||||
int timer;
|
||||
aGHC_Clip_c clip;
|
||||
aGHC_event_area_c* event_area_p;
|
||||
int attention_mode;
|
||||
ACTOR actor_class;
|
||||
int action;
|
||||
aGHC_ACTION_PROC action_proc;
|
||||
int event_state;
|
||||
int timer;
|
||||
aGHC_Clip_c clip;
|
||||
aGHC_event_area_c* event_area_p;
|
||||
int attention_mode;
|
||||
};
|
||||
|
||||
typedef struct groundhog_save_s {
|
||||
|
||||
@@ -3,11 +3,27 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_npc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct groundhog_npc0_actor_s GROUNDHOG_NPC0_ACTOR;
|
||||
|
||||
typedef void (*aGH0_ACT_PROC)(GROUNDHOG_NPC0_ACTOR* actor, GAME_PLAY* play);
|
||||
|
||||
struct groundhog_npc0_actor_s {
|
||||
NPC_ACTOR npc_class;
|
||||
int action;
|
||||
int next_action;
|
||||
aGH0_ACT_PROC act_proc;
|
||||
int now_term;
|
||||
int event_idx;
|
||||
s16 def_angle;
|
||||
int start_kf_pos_randomized;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Groundhog_Npc0_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -15,4 +31,3 @@ extern ACTOR_PROFILE Groundhog_Npc0_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user