Implement & link ac_npc_sendo

This commit is contained in:
Cuyler36
2024-01-09 07:39:51 -05:00
parent 40c4f2db0d
commit 407f2a1bb0
15 changed files with 1643 additions and 14 deletions
+2 -2
View File
@@ -384,7 +384,7 @@ static void aHNW_menu_end_wait(ACTOR* actor, GAME* game) {
Submenu* submenu = &play->submenu;
Submenu_Item_c* item;
if (submenu->flag == FALSE) {
if (submenu->open_flag == FALSE) {
if (mMsg_Check_not_series_main_wait(mMsg_Get_base_window_p()) == TRUE) {
aHNW_setupAction(actor, game, aHNW_ACTION_TALK_WITH_MASTER);
switch (haniwa->submenu_type) {
@@ -458,7 +458,7 @@ static void aHNW_menu_end_wait_for_guest(ACTOR* actor, GAME* game) {
HANIWA_ACTOR* haniwa = (HANIWA_ACTOR*)actor;
GAME_PLAY* play = (GAME_PLAY*)game;
if (play->submenu.flag == FALSE && mMsg_Check_not_series_main_wait(mMsg_Get_base_window_p()) == TRUE) {
if (play->submenu.open_flag == FALSE && mMsg_Check_not_series_main_wait(mMsg_Get_base_window_p()) == TRUE) {
aHNW_setupAction(actor, game, aHNW_ACTION_TALK_END_WAIT);
}
}
+1 -1
View File
@@ -660,7 +660,7 @@ static void aCR_msg_win_close_wait(NPC_CURATOR_ACTOR* curator, GAME_PLAY* play)
static void aCR_menu_close_wait(NPC_CURATOR_ACTOR* curator, GAME_PLAY* play) {
int talk_act;
if (play->submenu.flag == FALSE) {
if (play->submenu.open_flag == FALSE) {
talk_act = aCR_TALK_GET_DEMO_START_WAIT;
if (play->submenu.item_p->item == EMPTY_NO) {
+1 -1
View File
@@ -48,7 +48,7 @@ void aNRTC_timer_open_wait(NPCRTC_ACTOR* rtc, GAME_PLAY* play){
void aNRTC_timer_close_wait(NPCRTC_ACTOR* rtc, GAME_PLAY* play) {
if (play->submenu.flag == 0) {
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;
+85
View File
@@ -0,0 +1,85 @@
#include "ac_npc_sendo.h"
#include "m_common_data.h"
#include "ac_boat_demo.h"
#include "sys_matrix.h"
#include "m_msg.h"
#include "libultra/libultra.h"
#include "GBA2/gba2.h"
#include "m_ledit_ovl.h"
static void aSEN_actor_ct(ACTOR* actorx, GAME* game);
static void aSEN_actor_dt(ACTOR* actorx, GAME* game);
static void aSEN_actor_init(ACTOR* actorx, GAME* game);
static void aSEN_actor_move(ACTOR* actorx, GAME* game);
static void aSEN_actor_draw(ACTOR* actorx, GAME* game);
static void aSEN_actor_save(ACTOR* actorx, GAME* game);
ACTOR_PROFILE Npc_Sendo_Profile = {
mAc_PROFILE_NPC_SENDO,
ACTOR_PART_NPC,
ACTOR_STATE_NONE,
SP_NPC_SENDO,
ACTOR_OBJ_BANK_KEEP,
sizeof(NPC_SENDO_ACTOR),
&aSEN_actor_ct,
&aSEN_actor_dt,
&aSEN_actor_init,
mActor_NONE_PROC1,
&aSEN_actor_save
};
static int aSEN_talk_init(ACTOR*, GAME*);
static int aSEN_talk_end_chk(ACTOR*, GAME*);
static void aSEN_schedule_proc(NPC_ACTOR*, GAME_PLAY*, int);
static void aSEN_setup_think_proc(NPC_SENDO_ACTOR*, GAME_PLAY*, u8);
static MtxF aSEN_matrix;
static void aSEN_actor_ct(ACTOR* actorx, GAME* game) {
static aNPC_ct_data_c ct_data = {
&aSEN_actor_move,
&aSEN_actor_draw,
5,
(aNPC_TALK_REQUEST_PROC)&none_proc1,
&aSEN_talk_init,
&aSEN_talk_end_chk,
0
};
if ((*Common_Get(clip).npc_clip->birth_check_proc)(actorx, game) == TRUE) {
NPC_ACTOR* npc_actor = (NPC_ACTOR*)actorx;
GAME_PLAY* play = (GAME_PLAY*)game;
npc_actor->schedule.schedule_proc = &aSEN_schedule_proc;
(*Common_Get(clip).npc_clip->ct_proc)(actorx, game, &ct_data);
}
}
static void aSEN_actor_save(ACTOR* actorx, GAME* game) {
(*Common_Get(clip).npc_clip->save_proc)(actorx, game);
}
static void aSEN_actor_dt(ACTOR* actorx, GAME* game) {
NPC_SENDO_ACTOR* sendo = (NPC_SENDO_ACTOR*)actorx;
BOAT_DEMO_ACTOR* boat_demo;
(*Common_Get(clip).npc_clip->dt_proc)(actorx, game);
boat_demo = (BOAT_DEMO_ACTOR*)actorx->parent_actor;
if (boat_demo != NULL && boat_demo->npc_sendo_actor == sendo) {
boat_demo->npc_sendo_actor = NULL;
}
}
static void aSEN_actor_init(ACTOR* actorx, GAME* game) {
(*Common_Get(clip).npc_clip->init_proc)(actorx, game);
}
static void aSEN_actor_draw(ACTOR* actorx, GAME* game) {
Matrix_put(&aSEN_matrix);
(*Common_Get(clip).npc_clip->draw_proc)(actorx, game);
}
#include "../src/ac_npc_sendo_move.c_inc"
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -275,7 +275,7 @@ static void aSHR_talk_gomen(SHRINE_ACTOR* shrine, GAME_PLAY* play) {
{
u8 item_name[mIN_ITEM_NAME_LEN];
Submenu_Item_c* sm_item;
if (submenu->flag) {
if (submenu->open_flag) {
return;
}
+1 -1
View File
@@ -741,7 +741,7 @@ extern void mISL_gc_to_agb(Island_agb_c* agb, Island_c* gc) {
if (agb != NULL) {
bcopy(gc->name, agb->name, mISL_ISLAND_NAME_LEN);
agb->_0013 = 0;
agb->in_use = FALSE;
mISL_gc_to_agb_iandinfo(&agb->landinfo, &gc->landinfo);
mISL_gc_to_agb_fgblock(agb->fgblock[0], gc->fgblock[0]);
mISL_gc_to_agb_cottage(&agb->cottage, &gc->cottage);
+2 -2
View File
@@ -353,7 +353,7 @@ static void mSM_move_LINKWait(Submenu* submenu) {
submenu->move_proc = (SUBMENU_PROC)mSM_ovlptr_dllcnv(&mSM_menu_ovl_init, submenu, mSM_DLF_SUBMENU_OVL);
submenu->draw_proc = (SUBMENU_GAME_PROC)&none_proc1;
submenu->process_status = mSM_PROCESS_PLAY;
submenu->flag = TRUE;
submenu->open_flag = TRUE;
submenu->after_mode = 7;
submenu->unk_164 = 0;
mMl_clear_mail(&submenu->mail);
@@ -395,7 +395,7 @@ static void mSM_move_End(Submenu* submenu) {
submenu->process_status = mSM_PROCESS_WAIT;
submenu->menu_type = mSM_OVL_NONE;
submenu->wait_timer = 2;
submenu->flag = FALSE;
submenu->open_flag = FALSE;
SetGameFrame(1);
if (submenu->mode != 4) {