mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-11 13:08:34 -04:00
Implement & link m_house.c, m_home.c
This commit is contained in:
@@ -18,9 +18,6 @@ extern "C" {
|
||||
#define G_SETCOMBINE_TEV 0xD0
|
||||
#define G_SETTILE_DOLPHIN 0xD2
|
||||
|
||||
#define G_OFF 0
|
||||
#define G_ON 1
|
||||
|
||||
#define G_FIRST_CMD G_SETTEXEDGEALPHA
|
||||
|
||||
/* Triangle/Quad vertex bit size */
|
||||
@@ -209,7 +206,7 @@ typedef struct {
|
||||
unsigned int d1:3;
|
||||
unsigned int Ab1:3;
|
||||
unsigned int Ad1:3;
|
||||
} Gsetcombine;
|
||||
} Gsetcombine_new;
|
||||
|
||||
typedef struct {
|
||||
int cmd:8; /* 0xCF */
|
||||
@@ -367,6 +364,7 @@ typedef struct {
|
||||
unsigned int alpha1:3;
|
||||
} combiner_tev_alpha;
|
||||
|
||||
/*
|
||||
static combiner_tev_alpha tbla[8] = {
|
||||
{ 0, TEV_ALPHA_COMBINED, 0, TEV_ALPHA_ONE },
|
||||
{ 0, TEV_ALPHA_TEXEL0, 0, TEV_ALPHA_TEXEL0 },
|
||||
@@ -412,6 +410,7 @@ static combiner_tev_color tblc[32] = {
|
||||
{ 0, TEV_ZERO, 0, TEV_ZERO, 0, TEV_ZERO, 0, TEV_ZERO },
|
||||
{ 0, TEV_ZERO, 0, TEV_ZERO, 0, TEV_ZERO, 0, TEV_ZERO }
|
||||
};
|
||||
*/
|
||||
|
||||
/* New Command Macros */
|
||||
#define gsDPParam2(cmd, tag, param, extra) \
|
||||
|
||||
@@ -10,12 +10,12 @@ extern "C" {
|
||||
|
||||
/* sizeof(mCD_player_calendar_c) == 0x68 */
|
||||
typedef struct calendar_player_info_s {
|
||||
u32 played_days[lbRTC_MONTHS_MAX]; /* bitfield of days where 1 bit represents a day played */
|
||||
u32 event_days[lbRTC_MONTHS_MAX]; /* bitfield of events where 1 bit represents an event was on that day */
|
||||
u16 event_flags; /* flags for specific event days the player played on */
|
||||
u16 edit; /* unsure, might have something to do with saving an edit */
|
||||
lbRTC_year_t year; /* year calendar was last updated */
|
||||
lbRTC_month_t month; /* month calendar was last updated */
|
||||
/* 0x00 */ u32 played_days[lbRTC_MONTHS_MAX]; /* bitfield of days where 1 bit represents a day played */
|
||||
/* 0x30 */ u32 event_days[lbRTC_MONTHS_MAX]; /* bitfield of events where 1 bit represents an event was on that day */
|
||||
/* 0x60 */ u16 event_flags; /* flags for specific event days the player played on */
|
||||
/* 0x62 */ u8 edit; /* unsure, might have something to do with saving an edit */
|
||||
/* 0x64 */ lbRTC_year_t year; /* year calendar was last updated */
|
||||
/* 0x66 */ lbRTC_month_t month; /* month calendar was last updated */
|
||||
} mCD_player_calendar_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef M_COCKROACH_H
|
||||
#define M_COCKROACH_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_home_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mCkRh_InitGokiSaveData_1Room_ByHomeData(mHm_hs_c* home);
|
||||
extern void mCkRh_InitGokiSaveData_IslandPlayerRoom();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "m_land_h.h"
|
||||
#include "lb_rtc.h"
|
||||
#include "m_flashrom.h"
|
||||
#include "m_home.h"
|
||||
#include "m_home_h.h"
|
||||
#include "m_private.h"
|
||||
#include "m_npc.h"
|
||||
#include "m_field_make.h"
|
||||
@@ -77,9 +77,13 @@ typedef struct Save_s {
|
||||
/* 0x0212DC */ lbRTC_time_c last_grow_time; /* last time that a new villager moved into town */
|
||||
/* 0x0212E4 */ u8 _tmp4[0xAA];
|
||||
/* 0x02138E */ u8 saved_rom_debug; /* flag to set save to 'debug rom' mode */
|
||||
/* 0x02138F */ u8 _tmp5[0x1199];
|
||||
/* 0x02138F */ u8 _tmp5[0x11];
|
||||
/* 0x0213A0 */ u8 keep_house_size[PLAYER_NUM]; /* saved flags for house sizes */
|
||||
/* 0x0213A4 */ u8 _tmp6[0x1184];
|
||||
/* 0x022528 */ OSTime time_delta; /* time delta against GC RTC */
|
||||
/* 0x022530 */ u8 _tmp6[0x3AD0];
|
||||
/* 0x022530 */ u8 _tmp7[0x1C30];
|
||||
/* 0x024160 */ Anmret_c return_animal; /* information about villager which moved back in to your town after moving to someone else's town */
|
||||
/* 0x02416C */ u8 _tmp8[0x1E94];
|
||||
} Save_t;
|
||||
|
||||
typedef union save_u {
|
||||
@@ -97,6 +101,8 @@ typedef struct common_data_s {
|
||||
/* 0x026008 */ int player_data_mode;
|
||||
/* 0x02600C */ u8 _clip[0x104]; /* Temporary, clip is a struct with size 0x104 */
|
||||
/* 0x026110 */ Time_c time;
|
||||
/* 0x02613C */ Private_c* now_private;
|
||||
/* 0x026140 */ mHm_hs_c* now_home;
|
||||
} common_data_t;
|
||||
|
||||
extern common_data_t common_data;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include "m_lib.h"
|
||||
#include "graph.h"
|
||||
#include "game.h"
|
||||
#include "gbi_extensions.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+10
-102
@@ -2,6 +2,7 @@
|
||||
#define M_HOME_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_home_h.h"
|
||||
#include "m_field_make.h"
|
||||
#include "m_actor_type.h"
|
||||
#include "m_personal_id.h"
|
||||
@@ -13,109 +14,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define HOME_MAILBOX_SIZE 10
|
||||
#define HANIWA_ITEM_HOLD_NUM 4
|
||||
#define HANIWA_MESSAGE_LEN 128
|
||||
|
||||
/* sizeof(mHm_rmsz_c) == 6 */
|
||||
typedef struct home_size_info_s {
|
||||
/* 0x00 */ struct {
|
||||
/* 0x00 */ u8 day;
|
||||
/* 0x01 */ u8 month;
|
||||
/* 0x02 */ u16 year;
|
||||
} upgrade_order_date; /* date you ordered an upgrade, seems to be a struct */
|
||||
|
||||
/* 0x04 */ u8 size:3; /* current house size */
|
||||
/* 0x04 */ u8 next_size:3; /* next house size when upgrade is ordered */
|
||||
/* 0x04 */ u8 statue_rank:2; /* statue ranking, 0 = gold, 1 = silver, 2 = bronze, 3 = jade */
|
||||
/* 0x05 */ u8 renew:1; /* refresh house size & 'outlook' palette */
|
||||
/* 0x05 */ u8 statue_ordered:1; /* set when statue is ordered from Nook */
|
||||
/* 0x05 */ u8 basement_ordered:1; /* set when basement has been ordered */
|
||||
/* 0x05 */ u8 pad:5; /* unused? */
|
||||
} mHm_rmsz_c;
|
||||
|
||||
/* sizeof(Haniwa_Item_c) == 8 */
|
||||
typedef struct home_haniwa_item_s {
|
||||
/* 0x00 */ mActor_name_t item; /* held item */
|
||||
/* 0x02 */ s16 exchange_type; /* type of exchange (sale, free, trade) */
|
||||
/* 0x04 */ u32 extra_data; /* trade related data */
|
||||
} Haniwa_Item_c;
|
||||
|
||||
/* sizeof(Haniwa_c) == 0xA4 */
|
||||
typedef struct home_haniwa_s {
|
||||
/* 0x00 */ Haniwa_Item_c items[HANIWA_ITEM_HOLD_NUM]; /* held items */
|
||||
/* 0x20 */ u8 message[HANIWA_MESSAGE_LEN]; /* message for visitors */
|
||||
/* 0xA0 */ u32 bells; /* held bells from selling items */
|
||||
} Haniwa_c;
|
||||
|
||||
/* sizeof(mHm_wf_c) == 2 */
|
||||
typedef struct home_wall_floor_s {
|
||||
/* 0x00 */ u8 flooring_idx;
|
||||
/* 0x01 */ u8 wallpaper_idx;
|
||||
} mHm_wf_c;
|
||||
|
||||
/* sizeof(mHm_goki_c) == 0xA */
|
||||
typedef struct home_goki_s {
|
||||
/* 0x00 */ lbRTC_time_c time; /* last time updated */
|
||||
/* 0x08 */ u8 num; /* number of cockroaches in the house */
|
||||
} mHm_goki_c;
|
||||
|
||||
/* sizeof(mHm_lyr_c) == 0x228 */
|
||||
typedef struct home_layer_s {
|
||||
/* 0x000 */ mActor_name_t items[UT_Z_NUM][UT_X_NUM]; /* Furniture item actors */
|
||||
/* 0x200 */ u64 ftr_switch; /* Bitfield for controlling which furniture items are active, max of 64 */
|
||||
/* 0x208 */ u32 unk_208[8]; /* Only referenced in mISL_gc_to_agb_layer */
|
||||
} mHm_lyr_c;
|
||||
|
||||
/* sizeof(mHm_flr_c) == 0x8A8 */
|
||||
typedef struct home_floor_s {
|
||||
/* 0x000 */ mHm_lyr_c layer_main;
|
||||
/* 0x228 */ mHm_lyr_c layer_secondary; /* Also storage layer 0 */
|
||||
/* 0x450 */ mHm_lyr_c layer_storage1;
|
||||
/* 0x678 */ mHm_lyr_c layer_storage2;
|
||||
/* 0x8A0 */ mHm_wf_c wall_floor;
|
||||
/* 0x8A2 */ TempoBeat_c tempo_beat;
|
||||
/* 0x8A4 */ struct {
|
||||
u8 wall_original:1; /* is wallpaper a pattern (original)? */
|
||||
u8 floor_original:1; /* is flooring a pattern (original)? */
|
||||
u8 bit_2_7:6; /* unused? */
|
||||
} fllot_bit; /* Name exposed? by mISL_gc_to_agb_fllot_bit */
|
||||
} mHm_flr_c;
|
||||
|
||||
/* sizeof(mHm_hs_c) == 0x26B0 */
|
||||
typedef struct home_s {
|
||||
/* 0x0000 */ PersonalID_c ownerID; /* owner player's ID */
|
||||
/* 0x0014 */ u8 unk_14[6];
|
||||
/* 0x001A */ TempoBeat_c haniwa_tempo; /* unsure about this */
|
||||
/* 0x001C */ lbRTC_ymd_t hra_mark_time; /* last HRA judge date */
|
||||
/* 0x0020 */ u32 hra_mark_info; /* bitfield of HRA info pulled when HRA mails letter */
|
||||
/* 0x0024 */ struct {
|
||||
u8 house_updated:1; /* signals HRA to re-score house */
|
||||
u8 has_saved:1; /* whether or not the player has saved at this house before */
|
||||
u8 hra_member:1; /* whether or not the house has been setup for HRA membership */
|
||||
u8 has_basement:1; /* set when the basement is built */
|
||||
u8 bit_4:1; /* unused */
|
||||
u8 bit_5:1; /* unused */
|
||||
u8 bit_6:1; /* unused */
|
||||
u8 bit_7:1; /* unused */
|
||||
} flags;
|
||||
/* 0x0026 */ mHm_rmsz_c size_info; /* home size info */
|
||||
/* 0x002C */ u8 outlook_pal; /* current house palette */
|
||||
/* 0x002D */ u8 ordered_outlook_pal; /* house palette ordered at Nook's via upgrade */
|
||||
/* 0x002E */ u8 next_outlook_pal; /* next house palette set via all other means (villager, Wisp, paint @ Nook's, ...) */
|
||||
/* 0x002F */ u8 door_original; /* player design shown on door, apparently called 'original', maybe 'original design'? */
|
||||
/* 0x0030 */ u8 unk_30[8]; /* unused? */
|
||||
/* 0x0038 */ mHm_flr_c main_floor; /* main floor */
|
||||
/* 0x08E0 */ mHm_flr_c upper_floor; /* second floor */
|
||||
/* 0x1188 */ mHm_flr_c basement; /* basement floor */
|
||||
/* 0x1A30 */ Mail_c mailbox[HOME_MAILBOX_SIZE]; /* mailbox */
|
||||
/* 0x25D4 */ Haniwa_c haniwa; /* gyroid info */
|
||||
/* 0x2678 */ mHm_goki_c goki; /* cockroach info */
|
||||
/* 0x2684 */ u32 music_box[2]; /* bitfield of inserted music */
|
||||
/* 0x268C */ u8 unk_286C[36]; /* unused? */
|
||||
} mHm_hs_c;
|
||||
|
||||
extern void mHm_ClearHomeInfo(int home_no);
|
||||
extern void mHm_ClearAllHomeInfo();
|
||||
extern void mHm_SetNowHome();
|
||||
extern void mHm_SetDefaultPlayerRoomData(int home_no);
|
||||
extern void mHm_InitHomeInfo(mHm_hs_c* home, int player_no);
|
||||
extern void mHm_CheckRehouseOrder();
|
||||
extern int mHm_KeepHouseSize(u8 player_no);
|
||||
extern int mHm_CheckKeepHouseSize(u8 player_no);
|
||||
extern int mHm_SetBasement(u8 home_no);
|
||||
extern void mHm_InitCottage(mHm_cottage_c* cottage);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
#ifndef M_HOME_H_H
|
||||
#define M_HOME_H_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_field_make.h"
|
||||
#include "m_actor_type.h"
|
||||
#include "m_personal_id.h"
|
||||
#include "audio.h"
|
||||
#include "lb_rtc.h"
|
||||
#include "m_mail.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define HOME_MAILBOX_SIZE 10
|
||||
#define HANIWA_ITEM_HOLD_NUM 4
|
||||
#define HANIWA_MESSAGE_LEN 128
|
||||
|
||||
enum {
|
||||
mHm_ROOM_MAIN,
|
||||
mHm_ROOM_UPPER,
|
||||
mHm_ROOM_BASEMENT,
|
||||
|
||||
mHm_ROOM_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mHm_ROOMTYPE_SMALL,
|
||||
mHm_ROOMTYPE_MEDIUM,
|
||||
mHm_ROOMTYPE_LARGE,
|
||||
mHm_ROOMTYPE_COTTAGE,
|
||||
|
||||
mHm_ROOMTYPE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mHm_HOMESIZE_SMALL, /* initial size */
|
||||
mHm_HOMESIZE_MEDIUM, /* paid off first debt */
|
||||
mHm_HOMESIZE_LARGE, /* paid off second debt (excluding basement) */
|
||||
mHm_HOMESIZE_UPPER, /* paid off third debt & basement */
|
||||
mHm_HOMESIZE_STATUE, /* paid off final debt */
|
||||
|
||||
mHm_HOMESIZE_NUM
|
||||
};
|
||||
|
||||
/* sizeof(mHm_rmsz_c) == 6 */
|
||||
typedef struct home_size_info_s {
|
||||
/* 0x00 */ struct {
|
||||
/* 0x00 */ u8 day;
|
||||
/* 0x01 */ u8 month;
|
||||
/* 0x02 */ u16 year;
|
||||
} upgrade_order_date; /* date you ordered an upgrade, seems to be a struct */
|
||||
|
||||
/* 0x04 */ u8 size:3; /* current house size */
|
||||
/* 0x04 */ u8 next_size:3; /* next house size when upgrade is ordered */
|
||||
/* 0x04 */ u8 statue_rank:2; /* statue ranking, 0 = gold, 1 = silver, 2 = bronze, 3 = jade */
|
||||
/* 0x05 */ u8 renew:1; /* refresh house size & 'outlook' palette */
|
||||
/* 0x05 */ u8 statue_ordered:1; /* set when statue is ordered from Nook */
|
||||
/* 0x05 */ u8 basement_ordered:1; /* set when basement has been ordered */
|
||||
/* 0x05 */ u8 pad:5; /* unused? */
|
||||
} mHm_rmsz_c;
|
||||
|
||||
/* sizeof(Haniwa_Item_c) == 8 */
|
||||
typedef struct home_haniwa_item_s {
|
||||
/* 0x00 */ mActor_name_t item; /* held item */
|
||||
/* 0x02 */ s16 exchange_type; /* type of exchange (sale, free, trade) */
|
||||
/* 0x04 */ u32 extra_data; /* trade related data */
|
||||
} Haniwa_Item_c;
|
||||
|
||||
/* sizeof(Haniwa_c) == 0xA4 */
|
||||
typedef struct home_haniwa_s {
|
||||
/* 0x00 */ Haniwa_Item_c items[HANIWA_ITEM_HOLD_NUM]; /* held items */
|
||||
/* 0x20 */ u8 message[HANIWA_MESSAGE_LEN]; /* message for visitors */
|
||||
/* 0xA0 */ u32 bells; /* held bells from selling items */
|
||||
} Haniwa_c;
|
||||
|
||||
/* sizeof(mHm_wf_c) == 2 */
|
||||
typedef struct home_wall_floor_s {
|
||||
/* 0x00 */ u8 flooring_idx;
|
||||
/* 0x01 */ u8 wallpaper_idx;
|
||||
} mHm_wf_c;
|
||||
|
||||
/* sizeof(mHm_goki_c) == 0xA */
|
||||
typedef struct home_goki_s {
|
||||
/* 0x00 */ lbRTC_time_c time; /* last time updated */
|
||||
/* 0x08 */ u8 num; /* number of cockroaches in the house */
|
||||
} mHm_goki_c;
|
||||
|
||||
/* sizeof(mHm_lyr_c) == 0x228 */
|
||||
typedef struct home_layer_s {
|
||||
/* 0x000 */ mActor_name_t items[UT_Z_NUM][UT_X_NUM]; /* Furniture item actors */
|
||||
/* 0x200 */ u64 ftr_switch; /* Bitfield for controlling which furniture items are active, max of 64 */
|
||||
/* 0x208 */ u32 unk_208[8]; /* Only referenced in mISL_gc_to_agb_layer */
|
||||
} mHm_lyr_c;
|
||||
|
||||
/* sizeof(mHm_flr_c) == 0x8A8 */
|
||||
typedef struct home_floor_s {
|
||||
/* 0x000 */ mHm_lyr_c layer_main;
|
||||
/* 0x228 */ mHm_lyr_c layer_secondary; /* Also storage layer 0 */
|
||||
/* 0x450 */ mHm_lyr_c layer_storage1;
|
||||
/* 0x678 */ mHm_lyr_c layer_storage2;
|
||||
/* 0x8A0 */ mHm_wf_c wall_floor;
|
||||
/* 0x8A2 */ TempoBeat_c tempo_beat;
|
||||
/* 0x8A4 */ struct {
|
||||
u8 wall_original:1; /* is wallpaper a pattern (original)? */
|
||||
u8 floor_original:1; /* is flooring a pattern (original)? */
|
||||
u8 bit_2_7:6; /* unused? */
|
||||
} fllot_bit; /* Name exposed? by mISL_gc_to_agb_fllot_bit */
|
||||
} mHm_flr_c;
|
||||
|
||||
/* sizeof(mHm_flg_c) == 1 */
|
||||
typedef struct home_flags_s {
|
||||
u8 house_updated:1; /* signals HRA to re-score house */
|
||||
u8 has_saved:1; /* whether or not the player has saved at this house before */
|
||||
u8 hra_member:1; /* whether or not the house has been setup for HRA membership */
|
||||
u8 has_basement:1; /* set when the basement is built */
|
||||
u8 bit_4:1; /* unused */
|
||||
u8 bit_5:1; /* unused */
|
||||
u8 bit_6:1; /* unused */
|
||||
u8 bit_7:1; /* unused */
|
||||
} mHm_flg_c;
|
||||
|
||||
/* sizeof(mHm_hs_c) == 0x26B0 */
|
||||
typedef struct home_s {
|
||||
/* 0x0000 */ PersonalID_c ownerID; /* owner player's ID */
|
||||
/* 0x0014 */ u8 unk_14[6];
|
||||
/* 0x001A */ TempoBeat_c haniwa_tempo; /* unsure about this */
|
||||
/* 0x001C */ lbRTC_ymd_t hra_mark_time; /* last HRA judge date */
|
||||
/* 0x0020 */ u32 hra_mark_info; /* bitfield of HRA info pulled when HRA mails letter */
|
||||
/* 0x0024 */ mHm_flg_c flags;
|
||||
/* 0x0026 */ mHm_rmsz_c size_info; /* home size info */
|
||||
/* 0x002C */ u8 outlook_pal; /* current house palette */
|
||||
/* 0x002D */ u8 ordered_outlook_pal; /* house palette ordered at Nook's via upgrade */
|
||||
/* 0x002E */ u8 next_outlook_pal; /* next house palette set via all other means (villager, Wisp, paint @ Nook's, ...) */
|
||||
/* 0x002F */ u8 door_original; /* player design shown on door, apparently called 'original', maybe 'original design'? */
|
||||
/* 0x0030 */ u8 unk_30[8]; /* unused? */
|
||||
/* 0x0038 */ mHm_flr_c floors[mHm_ROOM_NUM]; /* house floors, might be a union idk */
|
||||
/* 0x1A30 */ Mail_c mailbox[HOME_MAILBOX_SIZE]; /* mailbox */
|
||||
/* 0x25D4 */ Haniwa_c haniwa; /* gyroid info */
|
||||
/* 0x2678 */ mHm_goki_c goki; /* cockroach info */
|
||||
/* 0x2684 */ u32 music_box[2]; /* bitfield of inserted music */
|
||||
/* 0x268C */ u8 unk_286C[36]; /* unused? */
|
||||
} mHm_hs_c;
|
||||
|
||||
/* sizeof(mHm_cottage_c) == 0x8C8 */
|
||||
typedef struct home_cottage_s {
|
||||
/* 0x000 */ mHm_wf_c unused_wall_floor; /* Has wallpaper & flooring bounds checks in sChk_CheckSaveData_Cattage */
|
||||
/* 0x002 */ u8 unk_2[2]; /* struct/array that is two bytes long, maybe another wall floor? */
|
||||
/* 0x004 */ u8 unk_4; /* direct copy in agb_to_gc_cottage, GBA only? */
|
||||
/* 0x005 */ u8 unk_5; /* direct copy in agb_to_gc_cottage, GBA only? */
|
||||
/* 0x008 */ mHm_flr_c room; /* Cottage room */
|
||||
/* 0x8B0 */ mHm_goki_c goki; /* Cottage cockroaches */
|
||||
/* 0x8BC */ u32 music_box[2]; /* Cottage music storage... separate from main home? */
|
||||
} mHm_cottage_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef M_HOUSE_H
|
||||
#define M_HOUSE_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* House arrangement byte breakdown
|
||||
*
|
||||
* PX = player x
|
||||
* HX = house x
|
||||
*
|
||||
* xx xx xx xx
|
||||
* P3 P2 P1 P0
|
||||
*
|
||||
* Example:
|
||||
* 01 11 10 00
|
||||
* P3 P2 P1 P0
|
||||
* H1 H3 H2 H0
|
||||
**/
|
||||
|
||||
enum {
|
||||
mHS_HOUSE0, /* Top-left house */
|
||||
mHS_HOUSE1, /* Top-right house */
|
||||
mHS_HOUSE2, /* Bottom-left house */
|
||||
mHS_HOUSE3, /* Bottom-right house */
|
||||
|
||||
mHS_HOUSE_NUM
|
||||
};
|
||||
|
||||
extern void mHS_house_init();
|
||||
extern int mHS_get_arrange_idx(int player_no);
|
||||
extern int mHS_get_pl_no(int house_no);
|
||||
extern int mHS_get_pl_no_detail(int home_no);
|
||||
extern int mHS_set_use(int player_no, int house_no);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef M_ISLAND_H
|
||||
#define M_ISLAND_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -59,6 +59,9 @@ typedef struct mail_s {
|
||||
/* 0x02E */ Mail_ct_c content;
|
||||
} Mail_c;
|
||||
|
||||
extern int mMl_strlen(u8* str, int maxlen, u8 check_char);
|
||||
extern void mMl_clear_mail_box(Mail_c* mail_box, int count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef M_NAME_TABLE_H
|
||||
#define M_NAME_TABLE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor_type.h"
|
||||
|
||||
/* TODO: these defintions are likely included from an auto-gen source */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EMPTY_NO 0x0000
|
||||
|
||||
#define FTR_REDALOHASHIRT 0x1814
|
||||
#define FTR_BLUEALOHASHIRT 0x1818
|
||||
|
||||
#define FTR_TAPEDECK 0x1E58
|
||||
|
||||
#define ITM_COLLEGERULE 0x2B00
|
||||
|
||||
#define FTR_ORANGEBOX 0x30F8
|
||||
|
||||
#define DOOR_START 0x4000
|
||||
#define DOOR0 DOOR_START /* 0x4000 */
|
||||
#define DOOR1 (DOOR0 + 1) /* 0x4001 */
|
||||
|
||||
#define EXIT_DOOR 0x4080
|
||||
|
||||
#define RSV_DOOR 0xFE1B
|
||||
#define RSV_WALL_NO 0xFFFE /* interior wall item, no collision */
|
||||
#define RSV_NO 0xFFFF /* reserved space, can't interact but no collision */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -111,6 +111,20 @@ typedef struct animal_s {
|
||||
/* 0x000 */ u8 unused[24]; /* unknown usage/unused */
|
||||
} Animal_c;
|
||||
|
||||
/*
|
||||
Struct for keeping track of an event where a villager can briefly return to your town after
|
||||
moving away to another town. The time limit seems to be 60 days, and the villager will only
|
||||
appear once per player during that time if the player talks to them.
|
||||
*/
|
||||
|
||||
/* sizeof(Anmret_c) == 0xC */
|
||||
typedef struct animal_return_s {
|
||||
/* 0x00 */ mActor_name_t npc_id; /* id of the villager who left */
|
||||
/* 0x02 */ u8 talk_bit; /* which players have already interacted with this villager */
|
||||
/* 0x03 */ u8 exist; /* if the villager exists */
|
||||
/* 0x04 */ lbRTC_time_c renew_time; /* time that this struct was updated */
|
||||
} Anmret_c;
|
||||
|
||||
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
|
||||
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
|
||||
|
||||
|
||||
@@ -160,6 +160,10 @@ extern s16 mPr_GetGoodsPower();
|
||||
extern s16 mPr_GetMoneyPower();
|
||||
|
||||
extern void mPr_PrintMapInfo_debug(gfxprint_t* gfxprint);
|
||||
extern int mPr_NullCheckPersonalID(PersonalID_c* pid);
|
||||
extern int mPr_CheckCmpPersonalID(PersonalID_c* pid_a, PersonalID_c* pid_b);
|
||||
extern void mPr_ClearPersonalID(PersonalID_c* pid);
|
||||
extern void mPr_CopyPersonalID(PersonalID_c* dst, PersonalID_c* src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user