mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-10 04:46:50 -04:00
Refactor & improvements for ac_npc_rtc
This commit is contained in:
+12
-13
@@ -9,22 +9,22 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct actor_npc_rtc_s NPCRTC_ACTOR;
|
||||
typedef struct actor_npc_rtc_s NPC_RTC_ACTOR;
|
||||
|
||||
typedef void (*aNPCRTC_SUB_PROC)(NPCRTC_ACTOR* rtc, GAME_PLAY* play);
|
||||
typedef void (*aNRTC_PROC)(NPC_RTC_ACTOR* rtc, GAME_PLAY* play);
|
||||
|
||||
struct actor_npc_rtc_s{
|
||||
struct actor_npc_rtc_s {
|
||||
NPC_ACTOR npc_class;
|
||||
int unk994;
|
||||
int unk998;
|
||||
aNPCRTC_SUB_PROC unk99C;
|
||||
int unk9A0;
|
||||
int talk_idx;
|
||||
int unk998;
|
||||
aNRTC_PROC talk_proc;
|
||||
int talk_flag;
|
||||
int unk9A4;
|
||||
int unk9A8;
|
||||
int unk9AC;
|
||||
int unk9B0;
|
||||
int unk9B4;
|
||||
int unk9B8;
|
||||
int think_idx;
|
||||
int counter;
|
||||
int fade_timer;
|
||||
int bgm_timer;
|
||||
int first_talk_timer;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Npc_Rtc_Profile;
|
||||
@@ -34,4 +34,3 @@ extern ACTOR_PROFILE Npc_Rtc_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -124,6 +124,8 @@ extern void mChoice_no_b_set(mChoice_c* choice);
|
||||
extern void mChoice_no_b_close_set(mChoice_c* choice);
|
||||
|
||||
/* Macros */
|
||||
#define mChoice_CHECK_MAIN_NORMAL() mChoice_check_main_normal(mChoice_Get_base_window_p())
|
||||
|
||||
#define mChoice_GET_CHOSENUM() mChoice_Get_ChoseNum(mChoice_Get_base_window_p())
|
||||
#define mChoice_CLEAR_CHOSENUM() mChoice_Clear_ChoseNum(mChoice_Get_base_window_p())
|
||||
#define mChoice_NO_B_SET() mChoice_no_b_set(mChoice_Get_base_window_p())
|
||||
|
||||
@@ -359,10 +359,14 @@ extern void mMsg_sound_unset_voice_silent(mMsg_Window_c* msg_p, int update_mode)
|
||||
|
||||
#define mMsg_GET_MSG_NUM() mMsg_Get_msg_num(mMsg_Get_base_window_p())
|
||||
|
||||
#define mMsg_SET_IDLING_REQ() mMsg_Set_idling_req(mMsg_Get_base_window_p())
|
||||
|
||||
#define mMsg_CHECK_MAINNORMALCONTINUE() mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p())
|
||||
#define mMsg_CHECK_MAINNORMAL() mMsg_Check_MainNormal(mMsg_Get_base_window_p())
|
||||
#define mMsg_CHECK_MAINDISAPPEAR() mMsg_Check_MainDisappear(mMsg_Get_base_window_p())
|
||||
#define mMsg_CHECK_MAINHIDE() mMsg_Check_MainHide(mMsg_Get_base_window_p())
|
||||
#define mMsg_CHECK_MAIN_WAIT() mMsg_Check_main_wait(mMsg_Get_base_window_p())
|
||||
#define mMsg_CHECK_NOT_SERIES_MAIN_WAIT() mMsg_Check_not_series_main_wait(mMsg_Get_base_window_p())
|
||||
|
||||
#define mMsg_REQUEST_MAIN_DISAPPEAR() mMsg_request_main_disappear(mMsg_Get_base_window_p())
|
||||
#define mMsg_REQUEST_MAIN_DISAPPEAR_WAIT_TYPE1() mMsg_request_main_disappear_wait_type1(mMsg_Get_base_window_p())
|
||||
|
||||
+78
-31
@@ -1,4 +1,5 @@
|
||||
#include "ac_npc_rtc.h"
|
||||
|
||||
#include "m_name_table.h"
|
||||
#include "m_common_data.h"
|
||||
#include "m_player_lib.h"
|
||||
@@ -10,49 +11,96 @@
|
||||
#include "boot.h"
|
||||
#include "m_string.h"
|
||||
#include "libultra/libultra.h"
|
||||
#include "m_timeIn_ovl.h"
|
||||
|
||||
extern void aNRTC_actor_ct(ACTOR*, GAME*);
|
||||
extern void aNRTC_actor_dt(ACTOR*, GAME*);
|
||||
extern void aNRTC_actor_init(ACTOR*, GAME*);
|
||||
extern void aNRTC_actor_save(ACTOR*, GAME*);
|
||||
enum {
|
||||
aNRTC_THINK_START,
|
||||
aNRTC_THINK_TITLE,
|
||||
aNRTC_THINK_DOOR,
|
||||
aNRTC_THINK_CHECK,
|
||||
aNRTC_THINK_IPMENU,
|
||||
aNRTC_THINK_WAIT,
|
||||
|
||||
ACTOR_PROFILE Npc_Rtc_Profile = {
|
||||
mAc_PROFILE_NPC_RTC, ACTOR_PART_NPC, ACTOR_STATE_NONE, SP_NPC_RTC, ACTOR_OBJ_BANK_KEEP, sizeof(NPCRTC_ACTOR),
|
||||
aNRTC_actor_ct, aNRTC_actor_dt, aNRTC_actor_init, mActor_NONE_PROC1, aNRTC_actor_save,
|
||||
aNRTC_THINK_NUM
|
||||
};
|
||||
|
||||
extern void aNRTC_actor_move(ACTOR*, GAME*);
|
||||
extern void aNRTC_actor_draw(ACTOR*, GAME*);
|
||||
enum {
|
||||
aNRTC_TALK_BREAK_DATA,
|
||||
aNRTC_TALK_BREAK_DATA2,
|
||||
aNRTC_TALK_RTC_ERR,
|
||||
aNRTC_TALK_TIMER_OPEN_MSG_WAIT,
|
||||
aNRTC_TALK_TIMER_OPEN_WAIT,
|
||||
aNRTC_TALK_TIMER_CLOSE_WAIT,
|
||||
aNRTC_TALK_DELETE_BF,
|
||||
aNRTC_TALK_DELETE,
|
||||
aNRTC_TALK_FORMAT_CHK,
|
||||
aNRTC_TALK_FORMAT,
|
||||
aNRTC_TALK_END,
|
||||
|
||||
extern int aNRTC_talk_init(ACTOR*, GAME*);
|
||||
extern int aNRTC_talk_end_chk(ACTOR*, GAME*);
|
||||
aNRTC_TALK_NUM
|
||||
};
|
||||
|
||||
extern void aNRTC_schedule_proc(NPC_ACTOR*, GAME_PLAY*, int);
|
||||
static void aNRTC_actor_ct(ACTOR*, GAME*);
|
||||
static void aNRTC_actor_dt(ACTOR*, GAME*);
|
||||
static void aNRTC_actor_init(ACTOR*, GAME*);
|
||||
static void aNRTC_actor_save(ACTOR*, GAME*);
|
||||
|
||||
extern void aNRTC_talk_request(ACTOR* actor, GAME*);
|
||||
// clang-format off
|
||||
ACTOR_PROFILE Npc_Rtc_Profile = {
|
||||
mAc_PROFILE_NPC_RTC,
|
||||
ACTOR_PART_NPC,
|
||||
ACTOR_STATE_NONE,
|
||||
SP_NPC_RTC,
|
||||
ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(NPC_RTC_ACTOR),
|
||||
&aNRTC_actor_ct,
|
||||
&aNRTC_actor_dt,
|
||||
&aNRTC_actor_init,
|
||||
mActor_NONE_PROC1,
|
||||
&aNRTC_actor_save,
|
||||
};
|
||||
|
||||
extern void aNRTC_change_talk_proc(NPCRTC_ACTOR* rtc, int idx);
|
||||
static void aNRTC_actor_move(ACTOR*, GAME*);
|
||||
static void aNRTC_actor_draw(ACTOR*, GAME*);
|
||||
|
||||
u8 aNRTC_sound_mode[] = { 0x00, 0x01, 0x02, 0x00 };
|
||||
u8 aNRTC_voice_mode[] = { 0x00, 0x01, 0x02, 0x00 };
|
||||
static int aNRTC_talk_init(ACTOR*, GAME*);
|
||||
static int aNRTC_talk_end_chk(ACTOR*, GAME*);
|
||||
|
||||
void aNRTC_actor_ct(ACTOR* actor, GAME* game) {
|
||||
static aNPC_ct_data_c ct_data = { &aNRTC_actor_move, &aNRTC_actor_draw, 5, mActor_NONE_PROC1,
|
||||
&aNRTC_talk_init, &aNRTC_talk_end_chk, 0 };
|
||||
static void aNRTC_schedule_proc(NPC_ACTOR*, GAME_PLAY*, int);
|
||||
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
static void aNRTC_talk_request(ACTOR* actor, GAME*);
|
||||
|
||||
static void aNRTC_change_talk_proc(NPC_RTC_ACTOR* rtc, int idx);
|
||||
|
||||
static u8 aNRTC_sound_mode[] = { Config_SOUND_MODE_0, Config_SOUND_MODE_1, Config_SOUND_MODE_2 };
|
||||
static u8 aNRTC_voice_mode[] = { Config_VOICE_MODE_ANIMALESE, Config_VOICE_MODE_CLICK, Config_VOICE_MODE_SILENT };
|
||||
|
||||
static void aNRTC_actor_ct(ACTOR* actor, GAME* game) {
|
||||
// clang-format off
|
||||
static aNPC_ct_data_c ct_data = {
|
||||
&aNRTC_actor_move,
|
||||
&aNRTC_actor_draw,
|
||||
5,
|
||||
mActor_NONE_PROC1,
|
||||
&aNRTC_talk_init,
|
||||
&aNRTC_talk_end_chk,
|
||||
0,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
PLAYER_ACTOR* player;
|
||||
xyz_t center;
|
||||
xyz_t eye;
|
||||
if (Common_Get(clip.npc_clip)->birth_check_proc(actor, game) == TRUE) {
|
||||
rtc->npc_class.schedule.schedule_proc = aNRTC_schedule_proc;
|
||||
rtc->npc_class.schedule.schedule_proc = &aNRTC_schedule_proc;
|
||||
Common_Get(clip.npc_clip)->ct_proc(actor, game, &ct_data);
|
||||
actor->status_data.weight = MASSTYPE_IMMOVABLE;
|
||||
mPlib_request_main_demo_wait_type1(game, 0, NULL);
|
||||
player = GET_PLAYER_ACTOR(play);
|
||||
if (player != NULL) {
|
||||
player->actor_class.state_bitfield |= 0x80;
|
||||
player->actor_class.state_bitfield |= ACTOR_STATE_INVISIBLE;
|
||||
}
|
||||
|
||||
center.x = 100.0f;
|
||||
@@ -70,30 +118,30 @@ void aNRTC_actor_ct(ACTOR* actor, GAME* game) {
|
||||
rtc->npc_class.condition_info.hide_request = 0;
|
||||
rtc->npc_class.talk_info.default_act = 9;
|
||||
rtc->npc_class.talk_info.melody_inst = 0;
|
||||
rtc->unk9A0 = 0;
|
||||
rtc->talk_flag = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void aNRTC_actor_save(ACTOR* actor, GAME* game) {
|
||||
static void aNRTC_actor_save(ACTOR* actor, GAME* game) {
|
||||
Common_Get(clip.npc_clip)->save_proc(actor, game);
|
||||
}
|
||||
|
||||
void aNRTC_actor_dt(ACTOR* actor, GAME* game) {
|
||||
static void aNRTC_actor_dt(ACTOR* actor, GAME* game) {
|
||||
Common_Get(clip.npc_clip)->dt_proc(actor, game);
|
||||
}
|
||||
|
||||
void aNRTC_actor_init(ACTOR* actor, GAME* game) {
|
||||
static void aNRTC_actor_init(ACTOR* actor, GAME* game) {
|
||||
Common_Get(clip.npc_clip)->init_proc(actor, game);
|
||||
}
|
||||
|
||||
void aNRTC_actor_move(ACTOR* actor, GAME* game) {
|
||||
static void aNRTC_actor_move(ACTOR* actor, GAME* game) {
|
||||
StaffRollInfo_c info;
|
||||
f32 val = 0.5f;
|
||||
u8 arm_flag = TRUE;
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
if (rtc->npc_class.draw.animation_id == 0x76) {
|
||||
if (rtc->npc_class.draw.animation_id == aNPC_ANIM_4HAKU_E1) {
|
||||
sAdos_GetStaffRollInfo(&info);
|
||||
if (info.staffroll_part != STAFFROLL_PART_FINISH) {
|
||||
val = 0.0f;
|
||||
@@ -109,10 +157,9 @@ void aNRTC_actor_move(ACTOR* actor, GAME* game) {
|
||||
mSC_change_player_freeze(play);
|
||||
}
|
||||
|
||||
void aNRTC_actor_draw(ACTOR* actor, GAME* game) {
|
||||
static void aNRTC_actor_draw(ACTOR* actor, GAME* game) {
|
||||
Common_Get(clip.npc_clip)->draw_proc(actor, game);
|
||||
}
|
||||
|
||||
#include "../src/ac_npc_rtc_think.c.inc"
|
||||
|
||||
#include "../src/ac_npc_rtc_talk.c.inc"
|
||||
|
||||
+166
-175
@@ -1,69 +1,67 @@
|
||||
static void aNRTC_set_slot_name(int slot_id, int str_no) {
|
||||
u8 name[mIN_ITEM_NAME_LEN];
|
||||
|
||||
mString_Load_StringFromRom(name, sizeof(name), 0x6CD + slot_id);
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), str_no, name, sizeof(name));
|
||||
mString_Load_StringFromRom(name, sizeof(name), 0x06CD + slot_id);
|
||||
mMsg_SET_FREE_STR(str_no, name, sizeof(name));
|
||||
}
|
||||
|
||||
static void aNRTC_rtc_err(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int num;
|
||||
|
||||
if (mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p()) == 1) {
|
||||
num = mChoice_Get_ChoseNum(mChoice_Get_base_window_p());
|
||||
switch (num) {
|
||||
case 0:
|
||||
aNRTC_change_talk_proc(rtc, 3);
|
||||
static void aNRTC_rtc_err(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
if (mMsg_CHECK_MAINNORMALCONTINUE() == TRUE) {
|
||||
switch (mChoice_GET_CHOSENUM()) {
|
||||
case mChoice_CHOICE0:
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_TIMER_OPEN_MSG_WAIT);
|
||||
break;
|
||||
case 1:
|
||||
rtc->unk9A8 = 1;
|
||||
aNRTC_change_talk_proc(rtc, 10);
|
||||
case mChoice_CHOICE1:
|
||||
rtc->think_idx = aNRTC_THINK_TITLE;
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_timer_open_msg_wait(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int order = mDemo_Get_OrderValue(4, 9);
|
||||
static void aNRTC_timer_open_msg_wait(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int order = mDemo_Get_OrderValue(mDemo_TYPE_4, 9);
|
||||
|
||||
if (order == 1) {
|
||||
if (mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p()) == 1) {
|
||||
mDemo_Set_OrderValue(4, 9, 0);
|
||||
aNRTC_change_talk_proc(rtc, 4);
|
||||
mMsg_request_main_disappear_wait_type1(mMsg_Get_base_window_p());
|
||||
if (mMsg_CHECK_MAINNORMALCONTINUE() == TRUE) {
|
||||
mDemo_Set_OrderValue(mDemo_TYPE_4, 9, 0);
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_TIMER_OPEN_WAIT);
|
||||
mMsg_REQUEST_MAIN_DISAPPEAR_WAIT_TYPE1();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_timer_open_wait(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
static void aNRTC_timer_open_wait(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
Submenu* submenu = &play->submenu;
|
||||
if (mMsg_Check_main_wait(mMsg_Get_base_window_p()) == 1) {
|
||||
aNRTC_change_talk_proc(rtc, 5);
|
||||
mSM_open_submenu(submenu, 3, 1, 0);
|
||||
mMsg_request_main_appear_wait_type1(mMsg_Get_base_window_p());
|
||||
|
||||
if (mMsg_CHECK_MAIN_WAIT() == TRUE) {
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_THINK_WAIT);
|
||||
mSM_open_submenu(submenu, mSM_OVL_TIMEIN, mTI_OVL_OPEN_INITIAL, 0);
|
||||
mMsg_REQUEST_MAIN_APPEAR_WAIT_TYPE1();
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_timer_close_wait(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
static void aNRTC_timer_close_wait(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
if (play->submenu.open_flag == FALSE) {
|
||||
if (mMsg_Check_not_series_main_wait(mMsg_Get_base_window_p()) == 1) {
|
||||
mMsg_Set_ForceNext(mMsg_Get_base_window_p());
|
||||
rtc->unk9A8 = 2;
|
||||
aNRTC_change_talk_proc(rtc, 0xA);
|
||||
if (mMsg_CHECK_NOT_SERIES_MAIN_WAIT() == TRUE) {
|
||||
mMsg_SET_FORCENEXT();
|
||||
rtc->think_idx = aNRTC_THINK_DOOR;
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_delete_bf(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int order = mDemo_Get_OrderValue(4, 9);
|
||||
static void aNRTC_delete_bf(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int order = mDemo_Get_OrderValue(mDemo_TYPE_4, 9);
|
||||
|
||||
if ((mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p()) == 1) && (order != 0)) {
|
||||
if ((mMsg_CHECK_MAINNORMALCONTINUE() == TRUE) && (order != 0)) {
|
||||
|
||||
mMsg_Set_LockContinue(mMsg_Get_base_window_p());
|
||||
aNRTC_change_talk_proc(rtc, 7);
|
||||
mMsg_SET_LOCKCONTINUE();
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_DELETE);
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_delete(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
static void aNRTC_delete(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
mMsg_Window_c* window;
|
||||
int card;
|
||||
int card_ret;
|
||||
@@ -73,258 +71,251 @@ static void aNRTC_delete(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
|
||||
switch (card_ret) {
|
||||
case 0:
|
||||
rtc->unk9A8 = 3;
|
||||
mMsg_Set_continue_msg_num(window, 0x9DE);
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
mMsg_Set_continue_msg_num(window, 0x09DE);
|
||||
break;
|
||||
case 22:
|
||||
case 2:
|
||||
rtc->unk9A8 = 1;
|
||||
mMsg_Set_continue_msg_num(window, 0x9DF);
|
||||
rtc->think_idx = aNRTC_THINK_TITLE;
|
||||
mMsg_Set_continue_msg_num(window, 0x09DF);
|
||||
break;
|
||||
case 25:
|
||||
return;
|
||||
case 15:
|
||||
rtc->unk9A8 = 3;
|
||||
mMsg_Set_continue_msg_num(window, 0x9E1);
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
mMsg_Set_continue_msg_num(window, 0x09E1);
|
||||
break;
|
||||
default:
|
||||
rtc->unk9A8 = 1;
|
||||
mMsg_Set_continue_msg_num(window, 0x9DF);
|
||||
rtc->think_idx = aNRTC_THINK_TITLE;
|
||||
mMsg_Set_continue_msg_num(window, 0x09DF);
|
||||
break;
|
||||
}
|
||||
|
||||
if (card_ret != 0x19) {
|
||||
if (card_ret != 25) {
|
||||
mMsg_Unset_LockContinue(window);
|
||||
aNRTC_change_talk_proc(rtc, 10);
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_format_chk(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int num;
|
||||
|
||||
if (mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p()) == 1) {
|
||||
aNRTC_change_talk_proc(rtc, 0xA);
|
||||
num = mChoice_Get_ChoseNum(mChoice_Get_base_window_p());
|
||||
switch (num) {
|
||||
case 0:
|
||||
rtc->unk9A8 = 3;
|
||||
static void aNRTC_format_chk(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
if (mMsg_CHECK_MAINNORMALCONTINUE() == TRUE) {
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
switch (mChoice_GET_CHOSENUM()) {
|
||||
case mChoice_CHOICE0:
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
break;
|
||||
case 1:
|
||||
rtc->unk9A8 = 2;
|
||||
case mChoice_CHOICE1:
|
||||
rtc->think_idx = aNRTC_THINK_DOOR;
|
||||
break;
|
||||
case 2:
|
||||
rtc->unk9A8 = 1;
|
||||
case mChoice_CHOICE2:
|
||||
rtc->think_idx = aNRTC_THINK_TITLE;
|
||||
break;
|
||||
case 3:
|
||||
rtc->unk9A8 = 3;
|
||||
aNRTC_change_talk_proc(rtc, 9);
|
||||
case mChoice_CHOICE3:
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_FORMAT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_format(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
static void aNRTC_format(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int order;
|
||||
mMsg_Window_c* window;
|
||||
int card_ret;
|
||||
|
||||
window = mMsg_Get_base_window_p();
|
||||
order = mDemo_Get_OrderValue(4, 9);
|
||||
order = mDemo_Get_OrderValue(mDemo_TYPE_4, 9);
|
||||
switch (order) {
|
||||
case 1:
|
||||
mDemo_Set_OrderValue(4, 9, 2);
|
||||
mDemo_Set_OrderValue(mDemo_TYPE_4, 9, 2);
|
||||
mMsg_Set_LockContinue(window);
|
||||
break;
|
||||
case 2:
|
||||
card_ret = mCD_card_format_bg(Common_Get(memcard_slot));
|
||||
switch (card_ret) {
|
||||
case 1:
|
||||
mMsg_Set_continue_msg_num(window, 0x9E9);
|
||||
switch (mCD_card_format_bg(Common_Get(memcard_slot))) {
|
||||
case mCD_RESULT_SUCCESS:
|
||||
mMsg_Set_continue_msg_num(window, 0x09E9);
|
||||
mMsg_Unset_LockContinue(window);
|
||||
aNRTC_change_talk_proc(rtc, 0xA);
|
||||
rtc->unk9A8 = 3;
|
||||
mDemo_Set_OrderValue(4, 9, 0);
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
mDemo_Set_OrderValue(mDemo_TYPE_4, 9, 0);
|
||||
break;
|
||||
case -1:
|
||||
case mCD_RESULT_ERROR:
|
||||
mMsg_Unset_LockContinue(window);
|
||||
aNRTC_change_talk_proc(rtc, 0xA);
|
||||
rtc->unk9A8 = 1;
|
||||
mMsg_Set_continue_msg_num(window, 0x9E7);
|
||||
mDemo_Set_OrderValue(4, 9, 0);
|
||||
case 0:
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
rtc->think_idx = aNRTC_THINK_TITLE;
|
||||
mMsg_Set_continue_msg_num(window, 0x09E7);
|
||||
mDemo_Set_OrderValue(mDemo_TYPE_4, 9, 0);
|
||||
case mCD_RESULT_BUSY:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_break_data(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int num;
|
||||
|
||||
if (mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p()) == 1) {
|
||||
aNRTC_change_talk_proc(rtc, 0xA);
|
||||
num = mChoice_Get_ChoseNum(mChoice_Get_base_window_p());
|
||||
switch (num) {
|
||||
case 0:
|
||||
rtc->unk9A8 = 3;
|
||||
static void aNRTC_break_data(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
if (mMsg_CHECK_MAINNORMALCONTINUE() == TRUE) {
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
switch (mChoice_GET_CHOSENUM()) {
|
||||
case mChoice_CHOICE0:
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
break;
|
||||
case 1:
|
||||
aNRTC_change_talk_proc(rtc, 6);
|
||||
case mChoice_CHOICE1:
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_DELETE_BF);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_break_data_2(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
int num;
|
||||
|
||||
if (mMsg_Check_MainNormalContinue(mMsg_Get_base_window_p()) == 1) {
|
||||
aNRTC_change_talk_proc(rtc, 0xA);
|
||||
num = mChoice_Get_ChoseNum(mChoice_Get_base_window_p());
|
||||
switch (num) {
|
||||
case 0:
|
||||
rtc->unk9A8 = 3;
|
||||
static void aNRTC_break_data_2(NPC_RTC_ACTOR* rtc, GAME_PLAY* play) {
|
||||
if (mMsg_CHECK_MAINNORMALCONTINUE() == TRUE) {
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_END);
|
||||
switch (mChoice_GET_CHOSENUM()) {
|
||||
case mChoice_CHOICE0:
|
||||
rtc->think_idx = aNRTC_THINK_CHECK;
|
||||
break;
|
||||
case 1:
|
||||
rtc->unk9A8 = 2;
|
||||
case mChoice_CHOICE1:
|
||||
rtc->think_idx = aNRTC_THINK_DOOR;
|
||||
break;
|
||||
case 2:
|
||||
rtc->unk9A8 = 1;
|
||||
case mChoice_CHOICE2:
|
||||
rtc->think_idx = aNRTC_THINK_TITLE;
|
||||
break;
|
||||
case 3:
|
||||
rtc->unk9A8 = 4;
|
||||
case mChoice_CHOICE3:
|
||||
rtc->think_idx = aNRTC_THINK_IPMENU;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_change_talk_proc(NPCRTC_ACTOR* rtc, int idx) {
|
||||
static aNPCRTC_SUB_PROC process[] = {
|
||||
aNRTC_break_data,
|
||||
aNRTC_break_data_2,
|
||||
aNRTC_rtc_err,
|
||||
aNRTC_timer_open_msg_wait,
|
||||
aNRTC_timer_open_wait,
|
||||
aNRTC_timer_close_wait,
|
||||
aNRTC_delete_bf,
|
||||
aNRTC_delete,
|
||||
aNRTC_format_chk,
|
||||
aNRTC_format,
|
||||
(aNPCRTC_SUB_PROC)none_proc1,
|
||||
static void aNRTC_change_talk_proc(NPC_RTC_ACTOR* rtc, int idx) {
|
||||
// clang-format off
|
||||
static aNRTC_PROC process[] = {
|
||||
&aNRTC_break_data,
|
||||
&aNRTC_break_data_2,
|
||||
&aNRTC_rtc_err,
|
||||
&aNRTC_timer_open_msg_wait,
|
||||
&aNRTC_timer_open_wait,
|
||||
&aNRTC_timer_close_wait,
|
||||
&aNRTC_delete_bf,
|
||||
&aNRTC_delete,
|
||||
&aNRTC_format_chk,
|
||||
&aNRTC_format,
|
||||
(aNRTC_PROC)&none_proc1,
|
||||
};
|
||||
rtc->unk994 = idx;
|
||||
rtc->unk99C = process[idx];
|
||||
// clang-format on
|
||||
|
||||
rtc->talk_idx = idx;
|
||||
rtc->talk_proc = process[idx];
|
||||
}
|
||||
|
||||
static void aNRTC_set_talk_info_talk_request() {
|
||||
int msg;
|
||||
|
||||
switch (Common_Get(save_error_type)) {
|
||||
case 0:
|
||||
msg = 0x9CC;
|
||||
case mFRm_ERROR_BAD_RTC:
|
||||
msg = 0x09CC;
|
||||
break;
|
||||
case 2:
|
||||
msg = 0x9D1;
|
||||
case mFRm_ERROR_DATA_CORRUPTED:
|
||||
msg = 0x09D1;
|
||||
break;
|
||||
case 6:
|
||||
msg = 0x9DA;
|
||||
case mFRm_ERROR_MEMCARD_INVALID:
|
||||
msg = 0x09DA;
|
||||
break;
|
||||
case 7:
|
||||
msg = 0x9D8;
|
||||
case mFRm_ERROR_MEMCARD_NO_SPACE:
|
||||
msg = 0x09D8;
|
||||
break;
|
||||
case 9:
|
||||
msg = 0x9D4;
|
||||
case mFRm_ERROR_NO_MEMCARD:
|
||||
msg = 0x09D4;
|
||||
break;
|
||||
case 1:
|
||||
msg = 0x9E2;
|
||||
case mFRm_ERROR_MEMCARD_TRAVELDATA_CONFLICT:
|
||||
msg = 0x09E2;
|
||||
break;
|
||||
case 4:
|
||||
msg = 0x9E4;
|
||||
case mFRm_ERROR_MEMCARD_DAMAGED:
|
||||
msg = 0x09E4;
|
||||
break;
|
||||
case 3:
|
||||
msg = 0x9E3;
|
||||
case mFRm_ERROR_MEMCARD_NO_FILES:
|
||||
msg = 0x09E3;
|
||||
break;
|
||||
case 5:
|
||||
msg = 0x9E5;
|
||||
case mFRm_ERROR_MEMCARD_FORMAT:
|
||||
msg = 0x09E5;
|
||||
break;
|
||||
case 8:
|
||||
msg = 0x9E6;
|
||||
case mFRm_ERROR_NOT_MEMCARD:
|
||||
msg = 0x09E6;
|
||||
break;
|
||||
default:
|
||||
msg = 0x9D4;
|
||||
msg = 0x09D4;
|
||||
break;
|
||||
}
|
||||
|
||||
mDemo_Set_msg_num(msg);
|
||||
mDemo_Set_camera(1);
|
||||
mDemo_Set_camera(TRUE);
|
||||
}
|
||||
|
||||
static void aNRTC_talk_request(ACTOR* actor, GAME* game) {
|
||||
mDemo_Request(8, actor, aNRTC_set_talk_info_talk_request);
|
||||
mDemo_Request(mDemo_TYPE_SPEAK, actor, &aNRTC_set_talk_info_talk_request);
|
||||
}
|
||||
|
||||
static int aNRTC_talk_init(ACTOR* actor, GAME* game) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
|
||||
mDemo_Set_ListenAble();
|
||||
aNRTC_set_slot_name(Common_Get(memcard_slot), mMsg_FREE_STR4);
|
||||
switch (Common_Get(save_error_type)) {
|
||||
case 0:
|
||||
aNRTC_change_talk_proc(rtc, 2);
|
||||
case mFRm_ERROR_BAD_RTC:
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_RTC_ERR);
|
||||
break;
|
||||
case 2:
|
||||
aNRTC_change_talk_proc(rtc, 0);
|
||||
case mFRm_ERROR_DATA_CORRUPTED:
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_BREAK_DATA);
|
||||
break;
|
||||
case 5:
|
||||
aNRTC_change_talk_proc(rtc, 8);
|
||||
case mFRm_ERROR_MEMCARD_FORMAT:
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_FORMAT_CHK);
|
||||
break;
|
||||
default:
|
||||
aNRTC_change_talk_proc(rtc, 1);
|
||||
aNRTC_change_talk_proc(rtc, aNRTC_TALK_BREAK_DATA2);
|
||||
break;
|
||||
}
|
||||
rtc->npc_class.talk_info.talk_request_proc = mActor_NONE_PROC1;
|
||||
mMsg_Set_idling_req(mMsg_Get_base_window_p());
|
||||
return 1;
|
||||
mMsg_SET_IDLING_REQ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int aNRTC_talk_end_chk(ACTOR* actor, GAME* game) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
int res = 0;
|
||||
int res = FALSE;
|
||||
mMsg_Window_c* window;
|
||||
|
||||
window = mMsg_Get_base_window_p();
|
||||
rtc->unk99C(rtc, play);
|
||||
(*rtc->talk_proc)(rtc, play);
|
||||
|
||||
if (mMsg_Check_idling_now(window) == 1) {
|
||||
if (mMsg_Check_idling_now(window) == TRUE) {
|
||||
mMsg_request_main_disappear_wait_type1(window);
|
||||
aNRTC_think_init_proc(&rtc->npc_class, play);
|
||||
rtc->unk9A0 = 0;
|
||||
res = 1;
|
||||
rtc->unk9B4 = 0x32;
|
||||
rtc->unk9B0 = 0x4B;
|
||||
rtc->talk_flag = FALSE;
|
||||
res = TRUE;
|
||||
rtc->bgm_timer = 50;
|
||||
rtc->fade_timer = 75;
|
||||
bzero(&play->fade_color_value, sizeof(rgba8888_t));
|
||||
} else {
|
||||
int unk9AC;
|
||||
unk9AC = rtc->unk9AC;
|
||||
if ((mMsg_Check_MainNormal(mMsg_Get_base_window_p()) == 1) ||
|
||||
(((mChoice_check_main_normal(mChoice_Get_base_window_p()) == 1) != 0))) {
|
||||
unk9AC++;
|
||||
if (unk9AC > 0x258) {
|
||||
unk9AC = 0x258;
|
||||
int counter = rtc->counter;
|
||||
|
||||
if ((mMsg_CHECK_MAINNORMAL() == TRUE) || (mChoice_CHECK_MAIN_NORMAL() == TRUE)) {
|
||||
counter++;
|
||||
if (counter > 600) {
|
||||
counter = 600;
|
||||
}
|
||||
} else {
|
||||
unk9AC = 0;
|
||||
counter = 0;
|
||||
}
|
||||
if (mDemo_Get_OrderValue(4, 0) == 0) {
|
||||
if (unk9AC >= 0x258) {
|
||||
if (rtc->npc_class.draw.animation_id != 0x76) {
|
||||
mDemo_Set_OrderValue(4, 0, 0xFF);
|
||||
|
||||
if (mDemo_Get_OrderValue(mDemo_TYPE_4, 0) == 0) {
|
||||
if (counter >= 600) {
|
||||
if (rtc->npc_class.draw.animation_id != aNPC_ANIM_4HAKU_E1) {
|
||||
mDemo_Set_OrderValue(mDemo_TYPE_4, 0, 0xFF);
|
||||
}
|
||||
} else if (rtc->npc_class.draw.animation_id == 0x76) {
|
||||
mDemo_Set_OrderValue(4, 0, 0xFD);
|
||||
} else if (rtc->npc_class.draw.animation_id == aNPC_ANIM_4HAKU_E1) {
|
||||
mDemo_Set_OrderValue(mDemo_TYPE_4, 0, 0xFD);
|
||||
}
|
||||
}
|
||||
rtc->unk9AC = unk9AC;
|
||||
rtc->counter = counter;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
+62
-42
@@ -2,30 +2,40 @@
|
||||
static void aNRTC_talk_request(ACTOR* actor, GAME*);
|
||||
|
||||
static void aNRTC_think_start(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
if (rtc->unk9B8 > 0) {
|
||||
rtc->unk9B8--;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
if (rtc->first_talk_timer > 0) {
|
||||
rtc->first_talk_timer--;
|
||||
} else {
|
||||
rtc->unk9A0 = 1;
|
||||
rtc->npc_class.talk_info.talk_request_proc = aNRTC_talk_request;
|
||||
rtc->npc_class.condition_info.demo_flg = 0x100;
|
||||
rtc->talk_flag = TRUE;
|
||||
rtc->npc_class.talk_info.talk_request_proc = &aNRTC_talk_request;
|
||||
rtc->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT;
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_think_title(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
|
||||
play->fb_wipe_type = 3;
|
||||
play->fb_fade_type = 4;
|
||||
mPlib_request_main_invade_type1(play);
|
||||
Actor_info_save_actor(play);
|
||||
rtc->unk9A8 = 5;
|
||||
rtc->think_idx = aNRTC_THINK_WAIT;
|
||||
}
|
||||
|
||||
Door_data_c door_data = { SCENE_PLAYERSELECT, 4, FALSE, 0, { 100, 0, 120 }, EMPTY_NO, 3, { 0, 0, 0 } };
|
||||
// clang-format off
|
||||
static Door_data_c door_data = {
|
||||
SCENE_PLAYERSELECT,
|
||||
mSc_DIRECT_NORTH,
|
||||
FALSE,
|
||||
0,
|
||||
{ 100, 0, 120 },
|
||||
EMPTY_NO,
|
||||
3,
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static void aNRTC_think_door(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
if (sAdo_BgmFadeoutCheck() != 0) {
|
||||
goto_other_scene(play, &door_data, 1);
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
@@ -33,54 +43,61 @@ static void aNRTC_think_door(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
}
|
||||
|
||||
static void aNRTC_think_check(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
if (sAdo_BgmFadeoutCheck() != 0) {
|
||||
goto_other_scene(play, &door_data, 1);
|
||||
mCD_ReCheckLoadLand(play);
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
rtc->unk9A8 = 5;
|
||||
rtc->think_idx = aNRTC_THINK_WAIT;
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_think_ipmenu(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
if (sAdo_BgmFadeoutCheck() != 0) {
|
||||
HotResetIplMenu();
|
||||
rtc->unk9A8 = 5;
|
||||
rtc->think_idx = aNRTC_THINK_WAIT;
|
||||
}
|
||||
}
|
||||
|
||||
aNPC_SUB_PROC aNRTC_proc_table[] = {
|
||||
aNRTC_think_start, aNRTC_think_title, aNRTC_think_door,
|
||||
aNRTC_think_check, aNRTC_think_ipmenu, (aNPC_SUB_PROC)mActor_NONE_PROC1,
|
||||
// clang-format off
|
||||
static aNPC_SUB_PROC aNRTC_proc_table[] = {
|
||||
&aNRTC_think_start,
|
||||
&aNRTC_think_title,
|
||||
&aNRTC_think_door,
|
||||
&aNRTC_think_check,
|
||||
&aNRTC_think_ipmenu,
|
||||
(aNPC_SUB_PROC)mActor_NONE_PROC1,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static void aNRTC_think_main_proc(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
if (rtc->unk9B0 > 0) {
|
||||
rtc->unk9B0--;
|
||||
if (rtc->unk9B0 == 0) {
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
if (rtc->fade_timer > 0) {
|
||||
rtc->fade_timer--;
|
||||
if (rtc->fade_timer == 0) {
|
||||
play->fade_color_value.c.a = -1;
|
||||
} else if (rtc->unk9B0 < 25) {
|
||||
play->fade_color_value.c.a = 255.0f * (1.0f - (0.04f * rtc->unk9B0));
|
||||
} else if (rtc->fade_timer < 25) {
|
||||
play->fade_color_value.c.a = 255.0f * (1.0f - (0.04f * rtc->fade_timer));
|
||||
}
|
||||
} else if (rtc->unk9A0 == 0) {
|
||||
aNRTC_proc_table[rtc->unk9A8](actor, play);
|
||||
} else if (rtc->talk_flag == 0) {
|
||||
aNRTC_proc_table[rtc->think_idx](actor, play);
|
||||
}
|
||||
if (rtc->unk9B4 == 0) {
|
||||
if (rtc->unk9A8 == 1) {
|
||||
|
||||
if (rtc->bgm_timer == 0) {
|
||||
if (rtc->think_idx == 1) {
|
||||
mBGMPsComp_make_ps_wipe(0x21C2);
|
||||
} else {
|
||||
mBGMPsComp_make_ps_wipe(0x621C);
|
||||
}
|
||||
rtc->unk9B4 = -2;
|
||||
} else if (rtc->unk9B4 > 0) {
|
||||
rtc->unk9B4--;
|
||||
rtc->bgm_timer = -2;
|
||||
} else if (rtc->bgm_timer > 0) {
|
||||
rtc->bgm_timer--;
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_think_init_proc(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
rtc->npc_class.request.act_priority = 4;
|
||||
rtc->npc_class.request.act_idx = 8;
|
||||
rtc->npc_class.request.act_type = 0;
|
||||
@@ -88,34 +105,37 @@ static void aNRTC_think_init_proc(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
static void aNRTC_think_proc(NPC_ACTOR* actor, GAME_PLAY* play, int idx) {
|
||||
static aNPC_SUB_PROC think_proc[] = {
|
||||
aNRTC_think_init_proc,
|
||||
aNRTC_think_main_proc,
|
||||
&aNRTC_think_init_proc,
|
||||
&aNRTC_think_main_proc,
|
||||
};
|
||||
|
||||
think_proc[idx](actor, play);
|
||||
}
|
||||
|
||||
static void aNRTC_schedule_init_proc(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
rtc->npc_class.draw._5BE = 1;
|
||||
rtc->npc_class.talk_info.default_animation = 0x76;
|
||||
rtc->unk9B4 = -1;
|
||||
rtc->unk9B0 = 0;
|
||||
rtc->unk9B8 = 0x5A;
|
||||
rtc->npc_class.talk_info.default_animation = aNPC_ANIM_4HAKU_E1;
|
||||
rtc->bgm_timer = -1;
|
||||
rtc->fade_timer = 0;
|
||||
rtc->first_talk_timer = 90;
|
||||
rtc->npc_class.think.think_proc = aNRTC_think_proc;
|
||||
rtc->unk9A8 = 0;
|
||||
Common_Get(clip.npc_clip)->think_proc(actor, play, 6, 0);
|
||||
rtc->think_idx = 0;
|
||||
Common_Get(clip.npc_clip)->think_proc(actor, play, aNPC_THINK_IN_BLOCK, 0);
|
||||
}
|
||||
|
||||
static void aNRTC_schedule_main_proc(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPCRTC_ACTOR* rtc = (NPCRTC_ACTOR*)actor;
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
if (Common_Get(clip.npc_clip)->think_proc(actor, play, -1, 1) == 0) {
|
||||
Common_Get(clip.npc_clip)->think_proc(actor, play, -1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
static void aNRTC_schedule_proc(NPC_ACTOR* actor, GAME_PLAY* play, int idx) {
|
||||
static aNPC_SUB_PROC sche_proc[] = { aNRTC_schedule_init_proc, aNRTC_schedule_main_proc };
|
||||
static aNPC_SUB_PROC sche_proc[] = {
|
||||
&aNRTC_schedule_init_proc,
|
||||
&aNRTC_schedule_main_proc,
|
||||
};
|
||||
|
||||
sche_proc[idx](actor, play);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user