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
+3
View File
@@ -13,6 +13,9 @@
extern "C" {
#endif
#define aBTD_LOADER_SIZE 0xC83C
#define aBTD_PROGRAM_SIZE 0x15244
enum {
aBTD_ACTION_SENDO_BIRTH_WAIT,
aBTD_ACTION_PL_RIDE_ON_START_WAIT,
+6 -3
View File
@@ -159,7 +159,11 @@ typedef struct npc_draw_info_s {
/* 0x548 */ u8 _548[0x580 - 0x548];
/* 0x580 */ int animation_id;
/* 0x584 */ int texture_bank_idx;
/* 0x588 */ u8 _588[0x5BD - 0x588];
/* 0x588 */ u8 _588[0x5B9 - 0x588];
/* 0x5B9 */ u8 _5B9;
/* 0x5BA */ u8 _5BA;
/* 0x5BB */ u8 _5BB;
/* 0x5BC */ u8 _5BC;
/* 0x5BD */ u8 _5BD;
/* 0x5BE */ u8 _5BE;
/* 0x5BE */ u8 _5BF[0x630 - 0x5BF];
@@ -386,8 +390,7 @@ typedef void (*aNPC_SUB_PROC)(NPC_ACTOR* npc_actorx, GAME_PLAY* play);
struct npc_actor_s {
ACTOR actor_class;
int _174;
int _178;
s_xyz _174;
NpcActorInfo_c npc_info;
aNPC_draw_info_c draw;
aNPC_think_info_c think;
+12 -1
View File
@@ -11,9 +11,20 @@ extern "C" {
typedef struct npc_sendo_s NPC_SENDO_ACTOR;
typedef void (*aSEN_PROC)(NPC_SENDO_ACTOR*, GAME_PLAY*);
struct npc_sendo_s {
NPC_ACTOR npc_class;
// TODO
u8 action;
u8 next_action;
u8 use_island_data_in_ram;
u8 agb_trans_se;
aSEN_PROC action_proc;
int talk_action;
aSEN_PROC talk_proc;
u16 kappa_counter;
f32 anime_progress; // only loaded, never set?
int gba_comm_tries;
};
extern ACTOR_PROFILE Npc_Sendo_Profile;
+34 -1
View File
@@ -31,6 +31,39 @@ enum {
mISL_ISLAND_BLOCK_NUM
};
#define mISL_PLAYER_ACTION_DIG_SCOOP (1 << 0)
#define mISL_PLAYER_ACTION_PLANT_FLOWER (1 << 1)
#define mISL_PLAYER_ACTION_CHANGE_FLAG (1 << 2)
#define mISL_PLAYER_ACTION_SHAKE_TREE (1 << 3)
#define mISL_PLAYER_ACTION_TRAMPLE_FLOWER (1 << 4)
#define mISL_PLAYER_ACTION_TRAMPLE_ALL_FLOWERS (1 << 5) // seems to be incorrectly? set when only a single flower was trampled
#define mISL_PLAYER_ACTION_CHOP_PALM_TREE (1 << 6)
#define mISL_PLAYER_ACTION_CHOP_TREE (1 << 7)
#define mISL_PLAYER_ACTION_PLANT_TREE (1 << 8)
#define mISL_PLAYER_ACTION_UZAI_PUSHED (1 << 9)
#define mISL_PLAYER_ACTION_UZAI_HIT (1 << 10)
#define mISL_PLAYER_ACTION_BEST_FRIEND (1 << 11) // seemingly unused but based on intention from dialogue
#define mISL_PLAYER_ACTION_UZAI_HIT_NET (1 << 12) // set at the same time as "UZAI_HIT"
#define mISL_PLAYER_ACTION_FALL_PITFALL (1 << 13)
#define mISL_PLAYER_ACTION_PLANT_APPLE_TREE (1 << 14)
#define mISL_PLAYER_ACTION_PLANT_PEACH_TREE (1 << 15)
#define mISL_PLAYER_ACTION_PLANT_CHERRY_TREE (1 << 16)
#define mISL_PLAYER_ACTION_PLANT_PEAR_TREE (1 << 17)
#define mISL_PLAYER_ACTION_PLANT_ORANGE_TREE (1 << 18)
#define mISL_PLAYER_ACTION_PLANT_COCONUT_TREE (1 << 19)
#define mISL_PLAYER_ACTION_PICKUP_COCONUT (1 << 20)
#define mISL_PLAYER_ACTION_EAT_COCONUT (1 << 21)
#define mISL_PLAYER_ACTION_TUMBLE (1 << 22)
#define mISL_PLAYER_ACTION_DESTINY_POPULAR (1 << 23)
#define mISL_PLAYER_ACTION_DESTINY_UNPOPULAR (1 << 24)
#define mISL_PLAYER_ACTION_DESTINY_BAD_LUCK (1 << 25)
#define mISL_PLAYER_ACTION_DESTINY_MONEY_LUCK (1 << 26)
#define mISL_PLAYER_ACTION_DESTINY_GOODS_LUCK (1 << 27)
#define mISL_PLAYER_ACTION_SEX_MALE (1 << 28)
#define mISL_PLAYER_ACTION_SEX_FEMALE (1 << 29)
#define mISL_PLAYER_ACTION_TRADE_CLOTH (1 << 30)
#define mISL_PLAYER_ACTION_NOTICE_FISHING_ROD (1 << 31)
/* sizeof(Island_c) == 0x1900 */
typedef struct island_s {
/* 0x0000 */ u8 name[mISL_ISLAND_NAME_LEN]; /* island name */
@@ -162,7 +195,7 @@ typedef struct island_agb_s {
/* 0x0008 */ u8 name[mISL_ISLAND_NAME_LEN]; /* island name */
/* 0x0010 */ u8 grass_tex_type; /* grass type */
/* 0x0011 */ u8 _0011[2];
/* 0x0013 */ u8 _0013;
/* 0x0013 */ u8 in_use; /* Set on the GBA when the island has been transferred already */
/* 0x0014 */ mISL_landinfo_agb_c landinfo; /* land info for town */
/* 0x0020 */ u8 _0020[4];
/* 0x0024 */ mFM_fg_c fgblock[mISL_FG_BLOCK_Z_NUM][mISL_FG_BLOCK_X_NUM]; /* island item actor data */
+26
View File
@@ -0,0 +1,26 @@
#ifndef M_LEDIT_OVL_H
#define M_LEDIT_OVL_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
enum {
mLE_TYPE_PLAYER_NAME,
mLE_TYPE_COUNTRY_NAME,
mLE_TYPE_EPHRASE,
mLE_TYPE_RESET,
mLE_TYPE_REQUEST,
mLE_TYPE_MYORIGINAL_NAME,
mLE_TYPE_ISLAND_NAME,
mLE_TYPE_NUM
};
#ifdef __cplusplus
}
#endif
#endif
+1 -1
View File
@@ -150,7 +150,7 @@ struct submenu_s {
/* 0x034 */ SUBMENU_GAME_PROC draw_proc;
/* 0x038 */ Mail_c mail; /* selected mail */
/* 0x162 */ u8 flag; // only set to 0 or 1, checked at least once in aQMgr_actor_move_talk_sub_hand_item_wait
/* 0x162 */ u8 open_flag; // only set to 0 or 1, checked at least once in aQMgr_actor_move_talk_sub_hand_item_wait
/* 0x163 */ u8 after_mode; /* relates to code which runs after the submenu process */
/* 0x164 */ u8 unk_164; // only set to 0 in mSM_move_LINKWait in AC
/* 0x165 */ u8 disable_start_btn_flag; /* when set to TRUE, the START button input will be ignored */