Update implementation of ac_ev_speech_soncho

This commit is contained in:
Colby Austin Brown
2025-01-15 09:01:46 -08:00
parent 9de7febbc1
commit 7a3305bc10
3 changed files with 24 additions and 22 deletions
+3 -3
View File
@@ -19,12 +19,12 @@ typedef void (*aESS_SCHEDULE_PROC)(NPC_SPEECH_SONCHO* soncho, GAME_PLAY* play);
struct ac_npc_speech_soncho {
NPC_ACTOR npc_class;
/* 0x994 */ int think_proc;
/* 0x998 */ aESS_PROC _998;
/* 0x994 */ int think_proc_idk;
/* 0x998 */ aESS_PROC think_proc;
};
struct aess_think_info {
aESS_PROC proc;
aESS_PROC think_proc;
aNPC_TALK_REQUEST_PROC talk_request_proc;
aNPC_TALK_END_CHECK_PROC talk_end_check_proc;
u8 flag;
+9 -7
View File
@@ -37,13 +37,15 @@ ACTOR_PROFILE Ev_Speech_Soncho_Profile = {
// clang-format on
void aESS_actor_ct(ACTOR* actorx, GAME* game) {
static aNPC_ct_data_c ct_data = { &aESS_actor_move,
&aESS_actor_draw,
5,
mActor_NONE_PROC1,
&aESS_talk_init,
(aNPC_TALK_END_CHECK_PROC)mActor_NONE_PROC1,
1 };
static aNPC_ct_data_c ct_data = {
&aESS_actor_move,
&aESS_actor_draw,
5,
mActor_NONE_PROC1,
&aESS_talk_init,
(aNPC_TALK_END_CHECK_PROC)mActor_NONE_PROC1,
1,
};
NPC_SPEECH_SONCHO* soncho = (NPC_SPEECH_SONCHO*)actorx;
if (CLIP(npc_clip)->birth_check_proc(actorx, game) == TRUE) {
soncho->npc_class.schedule.schedule_proc = (aNPC_SCHEDULE_PROC)aESS_schedule_proc;
@@ -27,7 +27,7 @@ void aESS_think_main_proc(NPC_SPEECH_SONCHO* soncho, GAME_PLAY* play) {
aGHC_Clip_c* clip;
NPC_ACTOR* actor;
if (soncho->npc_class.action.idx == aNPC_ACT_SPECIAL) {
soncho->_998(soncho, play);
soncho->think_proc(soncho, play);
} else if (soncho->npc_class.action.step == 0xff) {
CLIP(npc_clip)->animation_init_proc((ACTOR*)soncho, 0x5, FALSE);
aESS_set_request_act(soncho);
@@ -63,7 +63,7 @@ void aESS_think_init_proc(ACTOR* actorx, GAME_PLAY* play) {
aESS_setup_think_proc((ACTOR*)soncho, next);
}
void aESS_setup_think_proc(ACTOR* actorx, int think_proc) {
void aESS_setup_think_proc(ACTOR* actorx, int think_proc_idk) {
static aESS_think_info dt_tbl[5] = {
{ (aESS_PROC)mActor_NONE_PROC1, (aNPC_TALK_REQUEST_PROC)aESS_norm_talk_request,
(aNPC_TALK_END_CHECK_PROC)aESS_norm_talk_end_chk, TRUE },
@@ -77,9 +77,9 @@ void aESS_setup_think_proc(ACTOR* actorx, int think_proc) {
(aNPC_TALK_END_CHECK_PROC)aESS_norm_talk_end_chk, TRUE },
};
NPC_SPEECH_SONCHO* soncho = (NPC_SPEECH_SONCHO*)actorx;
aESS_think_info* info = &dt_tbl[think_proc];
soncho->think_proc = think_proc;
soncho->_998 = info->proc;
aESS_think_info* info = &dt_tbl[think_proc_idk];
soncho->think_proc_idk = think_proc_idk;
soncho->think_proc = info->think_proc;
soncho->npc_class.talk_info.talk_request_proc = info->talk_request_proc;
soncho->npc_class.talk_info.talk_end_check_proc = info->talk_end_check_proc;
soncho->npc_class.head.lock_flag = info->flag;
@@ -98,7 +98,7 @@ void aESS_schedule_init_proc(NPC_SPEECH_SONCHO* soncho, GAME_PLAY* play) {
aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
soncho->npc_class.condition_info.hide_request = FALSE;
soncho->npc_class.palActorIgnoreTimer = -1;
actorx->status_data.weight = 0xfe;
actorx->status_data.weight = MASSTYPE_HEAVY;
soncho->npc_class.talk_info.turn = aNPC_TALK_TURN_NONE;
actorx->world.position.x -= 20.0f;
@@ -148,7 +148,7 @@ void aESS_set_force_talk_info() {
}
void aESS_force_talk_request(NPC_SPEECH_SONCHO* soncho, GAME_PLAY* play) {
mDemo_Request(0xa, (ACTOR*)soncho, aESS_set_force_talk_info);
mDemo_Request(mDemo_TYPE_SPEECH, (ACTOR*)soncho, aESS_set_force_talk_info);
}
int aESS_talk_init(ACTOR* actorx, GAME* game) {
@@ -160,22 +160,22 @@ int aESS_talk_init(ACTOR* actorx, GAME* game) {
int aESS_norm_talk_end_chk(NPC_SPEECH_SONCHO* soncho) {
ACTOR* actorx = (ACTOR*)soncho;
int res = 0;
int res = FALSE;
if (mDemo_Check(mDemo_TYPE_TALK, (ACTOR*)soncho) == FALSE) {
int think_proc = 4;
int think_proc_idk = 4;
if (CLIP(groundhog_control_clip) != NULL) {
switch (CLIP(groundhog_control_clip)->now_term) {
case 4:
think_proc = 0x1;
think_proc_idk = 0x1;
break;
case 5:
break;
default:
think_proc = 0;
think_proc_idk = 0;
break;
}
}
aESS_setup_think_proc(actorx, think_proc);
aESS_setup_think_proc(actorx, think_proc_idk);
res = TRUE;
}
return res;