Implement & link m_post_office.c

This commit is contained in:
Cuyler36
2023-07-08 03:07:20 -04:00
parent 778d7a27ac
commit 7612466fe1
14 changed files with 578 additions and 12 deletions
+10
View File
@@ -3,11 +3,21 @@
#include "types.h"
#include "m_actor.h"
#include "m_play.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ac_npc_clip_s aNPC_Clip_c;
typedef int (*aNPC_SETUP_ACTOR_PROC)(GAME_PLAY*, mActor_name_t, s8, int, s16, int, int, int, int);
struct ac_npc_clip_s {
aNPC_SETUP_ACTOR_PROC setupActor_proc;
void* _004[(0x12C - 0x004) / sizeof(void*)];
};
extern ACTOR_PROFILE Npc_Profile;
#ifdef __cplusplus
+2 -8
View File
@@ -10,13 +10,7 @@
extern "C" {
#endif
typedef int (*aTR0_SETUP_ACTOR_PROC)(GAME_PLAY*, mActor_name_t,int,int,int,int,int,int,int);
typedef struct ac_train0_clip_s{
aTR0_SETUP_ACTOR_PROC setup_actor_proc;
}aTR0_Clip_c;
typedef struct train0_s{
typedef struct train0_s {
ACTOR actor_class;
int steam_available;
cKF_SkeletonInfo_R_c keyframe;
@@ -32,7 +26,7 @@ typedef struct train0_s{
f32 tr1_pos;
f32 tr_speed;
u8 pad6[0x2D8 - 0x2CC];
}TRAIN0_ACTOR;
} TRAIN0_ACTOR;
extern ACTOR_PROFILE Train0_Profile;
+2 -2
View File
@@ -2,7 +2,6 @@
#define M_CLIP_H
#include "types.h"
#include "ac_train0.h"
#include "ac_gyoei_h.h"
#include "ac_insect_h.h"
#include "ac_structure.h"
@@ -10,6 +9,7 @@
#include "ef_effect_control.h"
#include "m_demo.h"
#include "bg_item_h.h"
#include "ac_npc.h"
#ifdef __cplusplus
extern "C" {
@@ -18,7 +18,7 @@ extern "C" {
/* sizeof(Clip_c) == 0x104 */
typedef struct clip_s {
/* 0x000 */ void* _000[(0x040 - 0x000) / sizeof(void*)];
/* 0x040 */ aTR0_Clip_c* train0_clip;
/* 0x040 */ aNPC_Clip_c* npc_clip;
/* 0x044 */ void* _044[(0x074 - 0x044) / sizeof(void*)];
/* 0x074 */ bIT_Clip_c* bg_item_clip;
/* 0x078 */ void* _078;
+4 -1
View File
@@ -202,7 +202,10 @@ typedef struct common_data_s {
/* 0x028866 */ u16 unused_028866;
/* 0x028868 */ u8 reset_flag;
/* 0x028869 */ u8 reset_type;
/* 0x02886A */ u8 _02886A[0x028879 - 0x02886A];
/* 0x02886A */ u8 force_mail_delivery_flag;
/* 0x02886B */ u8 post_girl_npc_type;
/* 0x02886C */ xyz_t ball_pos;
/* 0x028878 */ u8 ball_type;
/* 0x028879 */ u8 auto_nwrite_count;
/* 0x02887A */ lbRTC_year_t auto_nwrite_year;
/* 0x02887C */ u8 save_error_type; /* set to one of the mFRm_ERROR_* states when save is invalid */
+4
View File
@@ -115,6 +115,8 @@ enum event_table {
mEv_EVENT_MUSHROOM_SEASON = 47,
mEv_EVENT_FISHING_TOURNEY_2 = 54,
mEv_EVENT_GHOST = 64,
mEv_EVENT_BROKER_SALE = 75,
mEv_EVENT_SHOP_SALE = 78,
};
#define mEv_STATUS_ACTIVE (1 << 0) /* event is active */
@@ -144,6 +146,8 @@ extern int mEv_CheckArbeit();
extern int mEv_CheckTitleDemo();
extern int mEv_check_status(int event, s16 status);
extern s8* mEv_get_common_area(int type, s8 id);
extern int mEv_ArbeitPlayer(u32 player_no);
extern u16 mEv_get_special_event_type();
extern int mEv_weekday2day(lbRTC_month_t month, int week_type, lbRTC_weekday_t weekday);
extern void mEv_ClearEventInfo();
+1
View File
@@ -143,6 +143,7 @@ extern int mFI_SetFG_common(mActor_name_t item, xyz_t wpos, int update);
extern mActor_name_t* mFI_GetUnitFG(xyz_t wpos);
extern void mFI_Wpos2DepositOFF(xyz_t wpos);
extern mActor_name_t mFI_GetOtherFruit();
extern int mFI_Wpos2UtNum_inBlock(int* ut_x, int* ut_z, xyz_t wpos);
extern void mFI_PrintNowBGNum(gfxprint_t* gfxprint);
extern void mFI_PrintFgAttr(gfxprint_t* gfxprint);
+5
View File
@@ -37,6 +37,11 @@ enum {
mMl_FONT_NUM
};
enum {
mMl_TYPE_SHOP_SALE_LEAFLET = 2,
mMl_TYPE_BROKER_SALE_LEAFLET = 3
};
/* sizeof(Mail_nm_c) == 0x16 */
typedef struct mail_nm_s {
/* 0x00 */ PersonalID_c personalID;
+2
View File
@@ -32,6 +32,8 @@ typedef struct museum_mail_info_s {
mMsm_remail_info_c remail_info; /* remail info */
} mMsm_mail_info_c;
extern void mMsm_SendMuseumMail(Mail_c* mail);
#ifdef __cplusplus
}
#endif
+2
View File
@@ -865,6 +865,8 @@ extern int mNT_check_unknown(mActor_name_t item_no);
#define ITM_CALLIGRAPHY_PAD 0x2B0F
#define ITM_DIARY_END 0x2B10
#define ITM_TICKET_START 0x2C00
#define ITM_KABU_10 0x2F00
#define ITM_KABU_50 0x2F01
#define ITM_KABU_100 0x2F02
+2
View File
@@ -205,6 +205,8 @@ extern int mNpc_GetLooks(mActor_name_t npc_name);
extern void mNpc_LoadNpcNameString(u8* buf, u8 idx);
extern u8 mNpc_GetPaperType();
extern void mMl_set_mail_name_npcinfo(Mail_nm_c* mail_name, AnmPersonalID_c* anm_pid);
extern int mNpc_ReceiveHPMail(Mail_c* hp_mail);
extern void mNpc_SendMailtoNpc(Mail_c* mail);
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
+1
View File
@@ -10,6 +10,7 @@ extern "C" {
#endif
#define mPO_MAIL_STORAGE_SIZE 5
#define mPO_DELIVER_ALL_HOUSES -1
enum {
mPO_SENDTYPE_MAIL,