mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-08-21 21:40:36 -04:00
Implement & link m_start_data_init
This commit is contained in:
+19
-7
@@ -24,7 +24,10 @@
|
||||
#include "m_field_assessment.h"
|
||||
#include "m_mushroom.h"
|
||||
#include "m_clip.h"
|
||||
#include "m_event.h"
|
||||
#include "m_scene.h"
|
||||
#include "m_npc_walk.h"
|
||||
#include "m_mask_cat.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -78,7 +81,8 @@ typedef struct Save_s {
|
||||
/* 0x020330 */ AnmPersonalID_c last_removed_animal_id; /* ID of last villager who left town */
|
||||
/* 0x020340 */ Shop_c shop; /* Nook's shop */
|
||||
/* 0x020480 */ Kabu_price_c kabu_price_schedule; /* Stalk Market info */
|
||||
/* 0x020498 */ u8 _tmp3[0x1F0]; /* saved events go here, but have a lot of structs in a union so holding off */
|
||||
/* 0x020498 */ mEv_event_save_c event_save_data;
|
||||
/* 0x020554 */ u8 _20554[0x20688 - 0x20554]; /* active event data? */
|
||||
/* 0x020688 */ mActor_name_t fruit; /* town fruit type */
|
||||
/* 0x02068A */ u8 house_arrangement; /* 2 bits for each player for the # of house they own */
|
||||
/* 0x02068B */ u8 num_statues; /* number of statues built for players who have paid off their debts */
|
||||
@@ -119,7 +123,8 @@ typedef struct Save_s {
|
||||
/* 0x022500 */ u8 _tmp7[0x22528 - 0x22500];
|
||||
/* 0x022528 */ OSTime time_delta; /* time delta against GC RTC */
|
||||
/* 0x022540 */ Island_c island; /* island data */
|
||||
/* 0x023E40 */ u8 _tmp9[0x320];
|
||||
/* 0x023E40 */ u8 _23E40[0x23F20 - 0x23E40];
|
||||
/* 0x023F20 */ MaskCat_c mask_cat;
|
||||
/* 0x024160 */ Anmret_c return_animal; /* information about villager which moved back in to your town after moving to someone else's town */
|
||||
/* 0x02416C */ u8 _tmp10[0x24174 - 0x2416C];
|
||||
/* 0x024174 */ u8 insect_term; /* current insect term idx */
|
||||
@@ -127,9 +132,12 @@ typedef struct Save_s {
|
||||
/* 0x024176 */ u8 gyoei_term; /* current fish term idx */
|
||||
/* 0x024177 */ u8 gyoei_term_transition_offset; /* days offset from end of term to begin transition */
|
||||
/* 0x024178 */ mFAs_GoodField_c good_field; /* field assessment last info */
|
||||
/* 0x024184 */ u8 _tmp11[0x241A0 - 0x24184];
|
||||
/* 0x024184 */ u8 bg_tex_idx; /* Grass type */
|
||||
/* 0x024185 */ u8 _24185[0x2418A - 0x24185];
|
||||
/* 0x02418A */ u8 town_day;
|
||||
/* 0x02418B */ u8 _2418B[0x241A0 - 0x2418B];
|
||||
/* 0x0241A0 */ lbRTC_time_c saved_auto_nwrite_time; /* save data notice time used for fishing tourney results? */
|
||||
/* 0x0241A8 */ u8 _tmp12[0x26000 - 0x241A8];
|
||||
/* 0x0241A8 */ u8 _241A8[0x26000 - 0x241A8];
|
||||
} Save_t;
|
||||
|
||||
typedef union save_u {
|
||||
@@ -151,7 +159,8 @@ typedef struct common_data_s {
|
||||
/* 0x02613C */ Private_c* now_private;
|
||||
/* 0x026140 */ mHm_hs_c* now_home;
|
||||
/* 0x026144 */ u8 map_flag;
|
||||
/* 0x026145 */ u8 tmp0[0x2614D - 0x26145];
|
||||
/* 0x026145 */ u8 fish_location;
|
||||
/* 0x026146 */ u8 tmp0[0x2614D - 0x26146];
|
||||
/* 0x02614D */ u8 transFadeDuration;
|
||||
/* 0x02614E */ u8 transWipeSpeed;
|
||||
/* 0x02614F */ u8 wipeType; /* maybe unused? */
|
||||
@@ -171,9 +180,12 @@ typedef struct common_data_s {
|
||||
/* 0x02666C */ s16 weather;
|
||||
/* 0x02666E */ s16 weather_intensity;
|
||||
/* 0x026670 */ lbRTC_time_c weather_time;
|
||||
/* 0x026678 */ u8 _26678[0x266A4 - 0x26678];
|
||||
/* 0x026678 */ u8 _26678[0x2669C - 0x26678];
|
||||
/* 0x02669C */ mQst_not_saved_c quest;
|
||||
/* 0x0266A4 */ int scene_from_title_demo; /* next scene to be loaded when title demo finishes */
|
||||
/* 0x0266A8 */ u8 _266A8[0x2852C - 0x266A8];
|
||||
/* 0x0266A8 */ u8 _266A8[0x267A8 - 0x266A8];
|
||||
/* 0x0267A8 */ mNpc_walk_c npc_walk;
|
||||
/* 0x026838 */ u8 _26838[0x2852C - 0x26838];
|
||||
/* 0x02852C */ s16 money_power;
|
||||
/* 0x02852E */ s16 goods_power;
|
||||
/* 0x028530 */ Door_data_c door_data; /* misc door data */
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "libu64/gfxprint.h"
|
||||
#include "m_personal_id.h"
|
||||
#include "m_private.h"
|
||||
#include "m_time.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -140,6 +142,95 @@ typedef struct ghost_common_s {
|
||||
u8 _0C[0x2C - 0x0C];
|
||||
} mEv_gst_common_c;
|
||||
|
||||
#define mEv_DESGINER_NUM 3
|
||||
|
||||
typedef struct kabu_peddler_event_s {
|
||||
PersonalID_c spoken_pids[TOTAL_PLAYER_NUM];
|
||||
} mEv_kabu_peddler_c;
|
||||
|
||||
typedef struct dozaemon_event_s {
|
||||
u32 flags;
|
||||
} mEv_dozaemon_c;
|
||||
|
||||
typedef union {
|
||||
mEv_kabu_peddler_c kabu_peddler;
|
||||
mEv_dozaemon_c dozaemon;
|
||||
} mEv_weekly_u;
|
||||
|
||||
typedef struct bargin_event_s {
|
||||
lbRTC_time_c start_time;
|
||||
lbRTC_time_c end_time;
|
||||
mActor_name_t items[5];
|
||||
int kind;
|
||||
} mEv_bargin_c;
|
||||
|
||||
typedef struct designer_event_s {
|
||||
PersonalID_c pids[mEv_DESGINER_NUM];
|
||||
int used;
|
||||
mActor_name_t gifted_cloths[mEv_DESGINER_NUM];
|
||||
} mEv_designer_c;
|
||||
|
||||
typedef struct broker_event_s {
|
||||
PersonalID_c pid[2];
|
||||
lbRTC_time_c end_time;
|
||||
int used;
|
||||
mActor_name_t sold_items[2];
|
||||
mActor_name_t items[3];
|
||||
} mEv_broker_c;
|
||||
|
||||
typedef struct artist_event_s {
|
||||
PersonalID_c pids[2];
|
||||
int used;
|
||||
mActor_name_t walls[2];
|
||||
} mEv_artist_c;
|
||||
|
||||
typedef struct arabian_event_s {
|
||||
int used;
|
||||
mActor_name_t carpet;
|
||||
} mEv_arabian_c;
|
||||
|
||||
typedef struct gypsy_event_s {
|
||||
int _00;
|
||||
int block_z;
|
||||
int block_x;
|
||||
int ut_z;
|
||||
int ut_x;
|
||||
} mEv_gypsy_c;
|
||||
|
||||
typedef union {
|
||||
mEv_bargin_c bargin;
|
||||
mEv_designer_c designer;
|
||||
mEv_broker_c broker;
|
||||
mEv_artist_c artist;
|
||||
mEv_arabian_c arabian;
|
||||
mEv_gypsy_c gypsy;
|
||||
} mEv_special_u;
|
||||
|
||||
typedef struct special_event_s {
|
||||
lbRTC_time_c scheduled;
|
||||
u32 type;
|
||||
mEv_special_u;
|
||||
} mEv_special_c;
|
||||
|
||||
typedef struct save_event_data_s {
|
||||
mEv_special_c special;
|
||||
mEv_weekly_u weekly;
|
||||
u32 flags;
|
||||
} mEv_event_save_c;
|
||||
|
||||
typedef struct event_s {
|
||||
u8 day;
|
||||
u8 hour;
|
||||
u8 _02;
|
||||
u8 state;
|
||||
u8 month;
|
||||
u8 year;
|
||||
s16 changed_num;
|
||||
int block_z;
|
||||
int block_x;
|
||||
int unused[5];
|
||||
} Event_c;
|
||||
|
||||
extern int mEv_CheckFirstJob();
|
||||
extern int mEv_CheckFirstIntro();
|
||||
extern int mEv_CheckArbeit();
|
||||
@@ -148,10 +239,14 @@ 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();
|
||||
mEv_ClearEventSaveInfo(mEv_event_save_c* event_save_data);
|
||||
|
||||
extern int mEv_weekday2day(lbRTC_month_t month, int week_type, lbRTC_weekday_t weekday);
|
||||
extern void mEv_ClearEventInfo();
|
||||
|
||||
extern void mEv_init(Event_c* event);
|
||||
extern void mEv_2nd_init(Event_c* event);
|
||||
|
||||
extern int mEv_CheckTitleDemo();
|
||||
extern void mEv_SetTitleDemo(int titledemo_no);
|
||||
|
||||
|
||||
@@ -151,6 +151,8 @@ extern int mFI_BkNum2WposXZ(f32* wpos_x, f32* wpos_z, int block_x, int block_z);
|
||||
extern void mFI_SetBearActor(GAME_PLAY* play, xyz_t wpos, int update_before_block_table);
|
||||
extern void mFI_FieldMove(xyz_t player_wpos);
|
||||
extern int mFI_search_unit_around(xyz_t* wpos, mActor_name_t item);
|
||||
extern void mFI_BlockDepositOFF(u16* deposit, int ut_x, int ut_z);
|
||||
extern void mFI_PullTanukiPathTrees();
|
||||
|
||||
extern void mFI_PrintNowBGNum(gfxprint_t* gfxprint);
|
||||
extern void mFI_PrintFgAttr(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "types.h"
|
||||
#include "m_actor_type.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
#include "game_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -89,6 +90,9 @@ typedef struct field_info_s {
|
||||
extern u8* g_block_type_p;
|
||||
extern int* g_block_kind_p;
|
||||
|
||||
extern void mFM_DecideBgTexIdx(u8* bg_tex_idx);
|
||||
extern void mFM_InitFgCombiSaveData(GAME* game);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -44,6 +44,7 @@ typedef struct island_s {
|
||||
} Island_c;
|
||||
|
||||
extern void mISL_ClearKeepIsland();
|
||||
extern void mISL_init(Island_c* island);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef M_MARK_ROOM_H
|
||||
#define M_MARK_ROOM_H
|
||||
|
||||
#include "types.h"
|
||||
#include "game_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mMkRm_MarkRoom(GAME* game);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef M_MASK_CAT_H
|
||||
#define M_MASK_CAT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_needlework.h"
|
||||
#include "m_time.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct mask_cat_s {
|
||||
mNW_original_design_c design;
|
||||
u8 palette_no;
|
||||
u8 cloth_no;
|
||||
u8 talk_idx;
|
||||
lbRTC_time_c time;
|
||||
} MaskCat_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef M_MELODY_H
|
||||
#define M_MELODY_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mMld_SetDefaultMelody();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -331,6 +331,11 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define FTR_PAPA_BEAR_NORTH 0x10EA
|
||||
#define FTR_PAPA_BEAR_WEST 0x10EB
|
||||
|
||||
#define FTR_BIRTHDAY_CAKE 0x11FC
|
||||
#define FTR_BIRTHDAY_CAKE_EAST 0x11FD
|
||||
#define FTR_BIRTHDAY_CAKE_NORTH 0x11FE
|
||||
#define FTR_BIRTHDAY_CAKE_WEST 0x11FF
|
||||
|
||||
#define FTR_DRACAENA 0x13B0
|
||||
#define FTR_DRACAENA_EAST 0x13B1
|
||||
#define FTR_DRACAENA_NORTH 0x13B2
|
||||
@@ -368,11 +373,6 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
|
||||
#define FTR_UMBRELLA31_WEST 0x1D87
|
||||
|
||||
#define FTR_BIRTHDAY_CAKE 0x11FC
|
||||
#define FTR_BIRTHDAY_CAKE_EAST 0x11FD
|
||||
#define FTR_BIRTHDAY_CAKE_NORTH 0x11FE
|
||||
#define FTR_BIRTHDAY_CAKE_WEST 0x11FF
|
||||
|
||||
#define FTR_TAPEDECK 0x1E58
|
||||
|
||||
#define FTR_PIGGY_BANK 0x1FAC
|
||||
@@ -884,7 +884,7 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
|
||||
#define FTR_ORANGEBOX 0x30F8
|
||||
|
||||
#define FTR_COLLEGERULE_SOUTH 0x30FC
|
||||
#define FTR_COLLEGERULE 0x30FC
|
||||
|
||||
#define FTR_CALLIGRAPHY_PAD_WEST 0x313B
|
||||
|
||||
|
||||
@@ -208,6 +208,8 @@ extern void mMl_set_mail_name_npcinfo(Mail_nm_c* mail_name, AnmPersonalID_c* anm
|
||||
extern int mNpc_ReceiveHPMail(Mail_c* hp_mail);
|
||||
extern void mNpc_SendMailtoNpc(Mail_c* mail);
|
||||
extern void mNpc_SetNpcinfo(ACTOR* actor, s8 npc_info_idx);
|
||||
extern void mNpc_InitNpcAllInfo(int malloc_flag);
|
||||
extern void mNpc_SetRemoveAnimalNo(u8* remove_animal_no, Animal_c* animals, int remove_no);
|
||||
|
||||
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
|
||||
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#ifndef M_NPC_WALK_H
|
||||
#define M_NPC_WALK_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_npc_personal_id.h"
|
||||
#include "m_npc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define mNpcW_GET_WALK_NUM(x) (int)((x) / 3)
|
||||
#define mNpcW_MAX mNpcW_GET_WALK_NUM(ANIMAL_NUM_MAX)
|
||||
|
||||
typedef struct goal_data_s {
|
||||
u8* types;
|
||||
u8 count;
|
||||
int end_time;
|
||||
} mNpcW_GoalData_c;
|
||||
|
||||
typedef struct goal_data_table_s {
|
||||
mNpcW_GoalData_c* data_p;
|
||||
int count;
|
||||
} mNpc_GoalDataTable_c;
|
||||
|
||||
enum {
|
||||
mNpcW_GOAL_SHRINE, /* Shrine/Wishing Well acre */
|
||||
mNpcW_GOAL_HOME, /* Randomly selected acre with a villager house */
|
||||
mNpcW_GOAL_ALONE, /* Randomly selected acre with no other animals in it */
|
||||
mNpcW_GOAL_MY_HOME, /* Acre containing the villager's house */
|
||||
|
||||
mNpcW_GOAL_NUM
|
||||
};
|
||||
|
||||
typedef struct npc_walk_appear_s {
|
||||
u8 state;
|
||||
u8 target_direction;
|
||||
} mNpcW_appear_c;
|
||||
|
||||
typedef struct npc_walk_information_s {
|
||||
AnmPersonalID_c id;
|
||||
int idx;
|
||||
u8 state;
|
||||
u8 goal_type;
|
||||
u8 goal_block_x;
|
||||
u8 goal_block_z;
|
||||
mNpcW_appear_c appear_info;
|
||||
} mNpcW_info_c;
|
||||
|
||||
typedef struct npc_walk_s {
|
||||
mNpcW_info_c info[mNpcW_MAX];
|
||||
u16 used_idx_bitfield;
|
||||
u8 used_info_num;
|
||||
u8 info_max;
|
||||
} mNpc_walk_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+2
-1
@@ -11,6 +11,7 @@
|
||||
#include "m_lights.h"
|
||||
#include "m_pause.h"
|
||||
#include "m_field_info.h"
|
||||
#include "m_event.h"
|
||||
#include "m_fbdemo_wipe.h"
|
||||
#include "m_collision_obj.h"
|
||||
#include "m_play_h.h"
|
||||
@@ -53,7 +54,7 @@ struct game_play_s {
|
||||
/* 0x20A0 */ s16* ctrl_actor_data;
|
||||
/* 0x20A4 */ s16* obj_bank_data;
|
||||
/* 0x20A8 */ int _20A8;
|
||||
/* 0x20AC */ u8 _20AC[0x20D0 - 0x20AC];
|
||||
/* 0x20AC */ Event_c event;
|
||||
/* 0x20D0 */ u8 fb_fade_type;
|
||||
/* 0x20D1 */ u8 fb_wipe_type;
|
||||
/* 0x20D2 */ u8 fb_mode;
|
||||
|
||||
@@ -113,6 +113,12 @@ typedef struct quest_errand_s {
|
||||
/* 0x2C */ mQst_errand_info_u info; /* errand type-specific data */
|
||||
} mQst_errand_c;
|
||||
|
||||
/* 'Not Saved' Quest */
|
||||
typedef struct not_saved_quest_s {
|
||||
int work;
|
||||
u8 h;
|
||||
} mQst_not_saved_c;
|
||||
|
||||
extern void mQst_PrintQuestInfo(gfxprint_t* gfxprint);
|
||||
extern void mQst_ClearGrabItemInfo();
|
||||
|
||||
|
||||
@@ -109,5 +109,6 @@ extern int mRmTp_GetFurnitureData(mActor_name_t ftr, int ut_x, int ut_z, mRmTp_F
|
||||
extern int mRmTp_FurnitureIdx2FurnitureKind(int ftr_idx);
|
||||
extern int mRmTp_PleaseDrawLightSwitch();
|
||||
extern mActor_name_t mRmTp_Item1ItemNo2FtrItemNo_AtPlayerRoom(mActor_name_t item_no, int flag);
|
||||
extern void mRmTp_SetDefaultLightSwitchData(int state);
|
||||
|
||||
#endif
|
||||
@@ -27,6 +27,7 @@ enum {
|
||||
|
||||
extern void mSDI_StartInitAfter(GAME* game, int renewal_reserve_flag, int malloc_flag);
|
||||
extern int mSDI_StartInitBefore(GAME* game, int player_no, int init_mode, int malloc_flag);
|
||||
extern int mSDI_StartDataInit(GAME* game, int player_no, int init_mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@ extern "C" {
|
||||
#define mString_DAY_START 0x64E
|
||||
#define mString_MONTH_START 0x66D
|
||||
#define mString_ARTICLE_START 0x737
|
||||
#define mString_HANIWA_MSG0 0x76A
|
||||
#define mString_HANIWA_MSG1 0x76B
|
||||
#define mString_HANIWA_MSG2 0x76C
|
||||
#define mString_HANIWA_MSG3 0x76D
|
||||
|
||||
|
||||
extern void mString_aram_init();
|
||||
|
||||
@@ -25,7 +25,7 @@ enum {
|
||||
mTRC_ACTION_NUM
|
||||
};
|
||||
|
||||
extern void mTRC_init();
|
||||
extern void mTRC_init(GAME* game);
|
||||
extern void mTRC_move(GAME_PLAY* play);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user