mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Match ac_my_room.c
This commit is contained in:
+40
-4
@@ -12,6 +12,9 @@ extern "C" {
|
||||
|
||||
typedef struct furniture_actor_s FTR_ACTOR;
|
||||
|
||||
#define aFTR_KEEP_ITEM_COUNT (mCoBG_LAYER_NUM - 1)
|
||||
#define aFTR_CHECK_INTERACTION(inter, type) (((inter) >> (type)) & 1)
|
||||
|
||||
enum {
|
||||
aFTR_STATE_STOP,
|
||||
aFTR_STATE_WAIT_PUSH,
|
||||
@@ -62,7 +65,7 @@ enum {
|
||||
|
||||
enum {
|
||||
aFTR_INTERACTION_STORAGE_DRAWERS = 1, // dressers
|
||||
aFTR_INTERACTION_STORAGE_WARDROBE, // double doors
|
||||
aFTR_INTERACTION_STORAGE_WARDROBE = 2, // double doors
|
||||
aFTR_INTERACTION_STORAGE_CLOSET = 4, // single door
|
||||
aFTR_INTERACTION_MUSIC_DISK = 8,
|
||||
aFTR_INTERACTION_NO_COLLISION = 0x10,
|
||||
@@ -78,19 +81,52 @@ enum {
|
||||
aFTR_INTERACTION_FAMICOM_ITEM = 0x2000,
|
||||
aFTR_INTERACTION_RADIO_AEROBICS = 0x4000,
|
||||
aFTR_INTERACTION_TOGGLE = 0x8000,
|
||||
aFTR_INTERACTION_NUM = 15,
|
||||
};
|
||||
|
||||
enum {
|
||||
aFTR_INTERACTION_TYPE_DRAWERS,
|
||||
aFTR_INTERACTION_TYPE_WARDROBE,
|
||||
aFTR_INTERACTION_TYPE_CLOSET,
|
||||
aFTR_INTERACTION_TYPE_MUSIC_DISK,
|
||||
aFTR_INTERACTION_TYPE_NO_COLLISION,
|
||||
aFTR_INTERACTION_TYPE_HANIWA,
|
||||
aFTR_INTERACTION_TYPE_FISH,
|
||||
aFTR_INTERACTION_TYPE_INSECT,
|
||||
aFTR_INTERACTION_TYPE_MANNEKIN,
|
||||
aFTR_INTERACTION_TYPE_UMBRELLA,
|
||||
aFTR_INTERACTION_TYPE_FOSSIL,
|
||||
aFTR_INTERACTION_TYPE_FAMICOM,
|
||||
aFTR_INTERACTION_TYPE_START_DISABLED,
|
||||
aFTR_INTERACTION_TYPE_FAMICOM_ITEM,
|
||||
aFTR_INTERACTION_TYPE_RADIO_AEROBICS,
|
||||
aFTR_INTERACTION_TYPE_TOGGLE,
|
||||
|
||||
aFTR_INTERACTION_NUM,
|
||||
};
|
||||
|
||||
#define aFTR_IS_STORAGE(profile) \
|
||||
(aFTR_CHECK_INTERACTION((profile)->interaction_type, aFTR_INTERACTION_TYPE_DRAWERS) || \
|
||||
aFTR_CHECK_INTERACTION((profile)->interaction_type, aFTR_INTERACTION_TYPE_WARDROBE) || \
|
||||
aFTR_CHECK_INTERACTION((profile)->interaction_type, aFTR_INTERACTION_TYPE_CLOSET) || \
|
||||
aFTR_CHECK_INTERACTION((profile)->interaction_type, aFTR_INTERACTION_TYPE_MUSIC_DISK))
|
||||
enum {
|
||||
aFTR_CONTACT_ACTION_CHAIR_UNIDIRECTIONAL = 1, // only can sit from the front
|
||||
aFTR_CONTACT_ACTION_CHAIR_MULTIDIRECTIONAL = 2, // can sit from any direction
|
||||
aFTR_CONTACT_ACTION_CHAIR_SOFA = 4, // cam sit anywhere from the front
|
||||
aFTR_CONTACT_ACTION_BED_SINGLE = 8, // single bed (can't roll)
|
||||
aFTR_CONTACT_ACTION_BED_DOUBLE = 0x10, // double bed (can roll)
|
||||
aFTR_CONTACT_ACTION_BED_DOUBLE = 0x10, // double bed (can roll)
|
||||
|
||||
aFTR_CONTACT_ACTION_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aFTR_SET_TYPE_NORMAL, /* Can't be placed on top and is not a table (layer0) */
|
||||
aFTR_SET_TYPE_SURFACE, /* Is a surface (layer0) */
|
||||
aFTR_SET_TYPE_ON_SURFACE, /* Can be placed on a surface (layer0/layer1) */
|
||||
|
||||
aFTR_SET_TYPE_NUM
|
||||
};
|
||||
|
||||
typedef void (*aFTR_FTR_CT_PROC)(FTR_ACTOR*, u8*);
|
||||
typedef void (*aFTR_FTR_MOVE_PROC)(FTR_ACTOR*, ACTOR*, GAME*, u8*);
|
||||
typedef void (*aFTR_FTR_DRAW_PROC)(FTR_ACTOR*, ACTOR*, GAME*, u8*);
|
||||
@@ -186,7 +222,7 @@ struct furniture_actor_s {
|
||||
s16 _83E;
|
||||
s16 open_music_disk; /* set when a music player is interacted with */
|
||||
s16 dust_timer;
|
||||
mActor_name_t items[mCoBG_LAYER_NUM - 1]; /* used for holding items (music players & wardrobes) */
|
||||
mActor_name_t items[aFTR_KEEP_ITEM_COUNT]; /* used for holding items (music players & wardrobes) */
|
||||
int _84C;
|
||||
u16* pal_p; /* used for furniture actors with dynamic palettes such as the structure model items */
|
||||
int _854;
|
||||
|
||||
+32
-12
@@ -10,6 +10,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define aMR_MAX_UNIT 8
|
||||
#define aMR_HANIWA_ON_TABLE_NUM 14
|
||||
|
||||
typedef struct my_room_actor_s MY_ROOM_ACTOR;
|
||||
|
||||
enum {
|
||||
@@ -29,6 +32,23 @@ enum {
|
||||
aMR_CONTACT_DIR_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aMR_FRIEND_ALL,
|
||||
aMR_FRIEND_ON,
|
||||
aMR_FRIEND_OFF,
|
||||
|
||||
aMR_FRIEND_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aMR_DIRECT_UP,
|
||||
aMR_DIRECT_LEFT,
|
||||
aMR_DIRECT_DOWN,
|
||||
aMR_DIRECT_RIGHT,
|
||||
|
||||
aMR_DIRECT_NUM
|
||||
};
|
||||
|
||||
typedef struct my_room_contact_s {
|
||||
int contact_flag;
|
||||
int ftr_no;
|
||||
@@ -48,18 +68,18 @@ typedef struct my_room_clock_info_s {
|
||||
int frame; /* 0-119 */
|
||||
} aMR_clock_info_c;
|
||||
|
||||
typedef int (*aMR_JUDGE_BREED_NEW_FTR_PROC)(GAME_PLAY* play, u16 ftr_no, int* ut_x, int* ut_z, u16* rotation,
|
||||
typedef int (*aMR_JUDGE_BREED_NEW_FTR_PROC)(GAME* game, u16 ftr_no, int* ut_x, int* ut_z, u16* rotation,
|
||||
int* square_offset, int* layer);
|
||||
typedef mActor_name_t (*aMR_SEARCH_PICKUP_FURNITURE_PROC)(GAME_PLAY* play);
|
||||
typedef void (*aMR_FURNITURE2ITEMBAG_PROC)(GAME_PLAY* play);
|
||||
typedef mActor_name_t (*aMR_SEARCH_PICKUP_FURNITURE_PROC)(GAME* game);
|
||||
typedef void (*aMR_FURNITURE2ITEMBAG_PROC)(GAME* game);
|
||||
typedef int (*aMR_JUDGE_PLAYER_ACTION_PROC)(xyz_t* wpos0, xyz_t* wpos1, int ftr_actor_idx);
|
||||
typedef void (*aMR_PLAYER_MOVE_FURNITURE_PROC)(int ftr_actor_idx, xyz_t* wpos);
|
||||
typedef int (*aMR_FTR_ID_2_WPOS_PROC)(xyz_t* wpos, int ftr_id);
|
||||
typedef int (*aMR_UNIT_NUM_2_FTR_ITEMNO_FTRID_PROC)(mActor_name_t* ftr_item_no, int* ftr_id, int ut_x, int ut_z,
|
||||
s16 layer);
|
||||
int layer);
|
||||
typedef void (*aMR_FTR_ID_2_EXTINGUISH_FURNITURE_PROC)(int ftr_id);
|
||||
typedef void (*aMR_REDMA_FTR_BANK_PROC)();
|
||||
typedef int (*aMR_RESERVE_FURNITURE_PROC)(GAME_PLAY* play, u16 ftr_no, int judge_res, int ut_x, int ut_z, u16 rotation,
|
||||
typedef void (*aMR_REDMA_FTR_BANK_PROC)(void);
|
||||
typedef int (*aMR_RESERVE_FURNITURE_PROC)(GAME* game, u16 ftr_no, int judge_res, int ut_x, int ut_z, u16 rotation,
|
||||
int square_offset, int layer);
|
||||
typedef int (*aMR_COUNT_FRIEND_FURNITURE_PROC)(FTR_ACTOR* ftr_actor, u8 switch_on);
|
||||
typedef int (*aMR_JUDGE_PLACE_2ND_LAYER_PROC)(int ut_x, int ut_z);
|
||||
@@ -75,13 +95,13 @@ typedef int (*aMR_PICKUP_FTR_LAYER_PROC)(void);
|
||||
typedef void (*aMR_LEAF_PICKUPED_PROC)(void);
|
||||
typedef void (*aMR_FAMICOM_EMU_COMMON_MOVE_PROC)(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, int rom_no,
|
||||
int agb_rom_no);
|
||||
typedef u32 (*aMR_FTR_NO_2_BANK_ADDRESS_PROC)(u16 ftr_no);
|
||||
typedef u8* (*aMR_FTR_NO_2_BANK_ADDRESS_PROC)(u16 ftr_no);
|
||||
typedef void (*aMR_CALL_SIT_DOWN_ONGEN_POS_SE_PROC)(const xyz_t* pos);
|
||||
typedef void (*aMR_SOUND_MELODY_PROC)(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, int idx);
|
||||
typedef int (*aMR_CHECK_DANNA_KILL_PROC)(xyz_t* pos);
|
||||
|
||||
typedef struct my_room_clip_s {
|
||||
MY_ROOM_ACTOR* my_room_actor_p;
|
||||
ACTOR* my_room_actor_p;
|
||||
aMR_JUDGE_BREED_NEW_FTR_PROC judge_breed_new_ftr_proc;
|
||||
aMR_SEARCH_PICKUP_FURNITURE_PROC search_pickup_ftr_proc;
|
||||
aMR_FURNITURE2ITEMBAG_PROC ftr2itemBag_proc;
|
||||
@@ -162,7 +182,7 @@ typedef struct emu_info_s {
|
||||
int _10;
|
||||
int card_famicom_count;
|
||||
int memory_game_select;
|
||||
char** famicom_names_p;
|
||||
char* famicom_names_p;
|
||||
s16 save_msg_timer;
|
||||
s16 external_rom;
|
||||
} aMR_emu_info_c;
|
||||
@@ -215,7 +235,7 @@ struct my_room_actor_s {
|
||||
s16 keep_pull_flag;
|
||||
xyz_t pull_target_pos0;
|
||||
xyz_t pull_target_pos1;
|
||||
int haniwa_on_table[14];
|
||||
int haniwa_on_table[aMR_HANIWA_ON_TABLE_NUM];
|
||||
aMR_bgm_info_c bgm_info;
|
||||
aMR_room_info_c room_info;
|
||||
aMR_emu_info_c emu_info;
|
||||
@@ -257,8 +277,8 @@ extern int aMR_GetFurnitureUnit(mActor_name_t ftr);
|
||||
extern mActor_name_t aMR_FurnitureFg_to_FurnitureFgWithDirect(mActor_name_t ftr, int direct);
|
||||
extern void aMR_SameFurnitureSwitchOFF(u16 ftr_name);
|
||||
extern aMR_contact_info_c* aMR_GetContactInfoLayer1(void);
|
||||
extern FTR_ACTOR* aMR_GetParentFactor();
|
||||
extern s16 aMR_GetParentAngleOffset(FTR_ACTOR* ftr_actor, MY_ROOM_ACTOR* my_room_actor);
|
||||
extern FTR_ACTOR* aMR_GetParentFactor(FTR_ACTOR* ftr_actor, ACTOR* my_room_actorx);
|
||||
extern s16 aMR_GetParentAngleOffset(FTR_ACTOR* ftr_actor, ACTOR* my_room_actorx);
|
||||
extern void aMR_SetSurprise(ACTOR* my_room_actor, s16 rot);
|
||||
extern void aMR_RadioCommonMove(FTR_ACTOR* ftr_actor, ACTOR* my_room_actorx);
|
||||
|
||||
|
||||
+2
-2
@@ -69,8 +69,8 @@ extern void sAdo_Pause(u8 mode);
|
||||
|
||||
extern f32 sAdo_GetRhythmAnimCounter(u32 id);
|
||||
extern s8 sAdo_GetRhythmDelay(u32 id);
|
||||
extern f32 sAdo_GetRhythmInfo(u32 id);
|
||||
extern void sAdo_SetRhythmInfo(f32 p);
|
||||
extern void sAdo_GetRhythmInfo(TempoBeat_c* rhythm);
|
||||
extern void sAdo_SetRhythmInfo(TempoBeat_c* rhythm);
|
||||
|
||||
extern int sAdo_InstCountGet();
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define RHYTHM_H
|
||||
|
||||
#include "types.h"
|
||||
#include "audio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,8 +13,8 @@ extern void Na_RhythmStop(u32);
|
||||
extern void Na_RhythmAllStop();
|
||||
extern f32 Na_GetRhythmAnimCounter(u32);
|
||||
extern s8 Na_GetRhythmDelay(u32);
|
||||
extern f32 Na_GetRhythmInfo(u32);
|
||||
extern void Na_SetRhythmInfo(f32);
|
||||
extern void Na_GetRhythmInfo(TempoBeat_c* rhythm);
|
||||
extern void Na_SetRhythmInfo(TempoBeat_c* rhythm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ typedef struct common_data_s {
|
||||
/* 0x02DBA4 */ s16 island_weather_intensity;
|
||||
/* 0x02DBA6 */ s16 _2DBA6;
|
||||
/* 0x02DBA8 */ u8 memcard_slot;
|
||||
/* 0X02DBAC */ int famicom_2DBAC;
|
||||
/* 0X02DBAC */ int my_room_message_control_flags;
|
||||
/* 0x02DBB0 */ s16 can_look_goki_count;
|
||||
/* 0x02DBB4 */ f32 rainbow_opacity; /* current opacity of rainbow (0.0f - 1.0f) */
|
||||
/* 0x02DBB8 */ u32 event_flags[mEv_EVENT_TYPE_NUM];
|
||||
|
||||
+105
-103
@@ -19,169 +19,171 @@ extern "C" {
|
||||
#define mHm_LAYER_NUM 4
|
||||
|
||||
enum {
|
||||
mHm_ROOM_MAIN,
|
||||
mHm_ROOM_UPPER,
|
||||
mHm_ROOM_BASEMENT,
|
||||
mHm_ROOM_MAIN,
|
||||
mHm_ROOM_UPPER,
|
||||
mHm_ROOM_BASEMENT,
|
||||
|
||||
mHm_ROOM_NUM
|
||||
mHm_ROOM_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mHm_ROOMTYPE_SMALL,
|
||||
mHm_ROOMTYPE_MEDIUM,
|
||||
mHm_ROOMTYPE_LARGE,
|
||||
mHm_ROOMTYPE_COTTAGE,
|
||||
mHm_ROOMTYPE_SMALL,
|
||||
mHm_ROOMTYPE_MEDIUM,
|
||||
mHm_ROOMTYPE_LARGE,
|
||||
mHm_ROOMTYPE_COTTAGE,
|
||||
|
||||
mHm_ROOMTYPE_NUM
|
||||
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_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
|
||||
mHm_HOMESIZE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mHm_HANIWA_TRADE_0,
|
||||
mHm_HANIWA_TRADE_1,
|
||||
mHm_HANIWA_TRADE_2,
|
||||
mHm_HANIWA_TRADE_3,
|
||||
|
||||
mHm_HANIWA_TRADE_NUM
|
||||
mHm_HANIWA_TRADE_0,
|
||||
mHm_HANIWA_TRADE_1,
|
||||
mHm_HANIWA_TRADE_2,
|
||||
mHm_HANIWA_TRADE_3,
|
||||
|
||||
mHm_HANIWA_TRADE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mHm_OUTLOOK_PAL_0,
|
||||
mHm_OUTLOOK_PAL_1,
|
||||
mHm_OUTLOOK_PAL_2,
|
||||
mHm_OUTLOOK_PAL_3,
|
||||
mHm_OUTLOOK_PAL_4,
|
||||
mHm_OUTLOOK_PAL_5,
|
||||
mHm_OUTLOOK_PAL_6,
|
||||
mHm_OUTLOOK_PAL_7,
|
||||
mHm_OUTLOOK_PAL_8,
|
||||
mHm_OUTLOOK_PAL_9,
|
||||
mHm_OUTLOOK_PAL_10,
|
||||
mHm_OUTLOOK_PAL_11,
|
||||
mHm_OUTLOOK_PAL_0,
|
||||
mHm_OUTLOOK_PAL_1,
|
||||
mHm_OUTLOOK_PAL_2,
|
||||
mHm_OUTLOOK_PAL_3,
|
||||
mHm_OUTLOOK_PAL_4,
|
||||
mHm_OUTLOOK_PAL_5,
|
||||
mHm_OUTLOOK_PAL_6,
|
||||
mHm_OUTLOOK_PAL_7,
|
||||
mHm_OUTLOOK_PAL_8,
|
||||
mHm_OUTLOOK_PAL_9,
|
||||
mHm_OUTLOOK_PAL_10,
|
||||
mHm_OUTLOOK_PAL_11,
|
||||
|
||||
mHm_OUTLOOK_PAL_NUM
|
||||
mHm_OUTLOOK_PAL_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 */
|
||||
/* 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? */
|
||||
/* 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 */
|
||||
/* 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 */
|
||||
/* 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;
|
||||
/* 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 */
|
||||
/* 0x09 */ u8 pad; /* unused outside of being initalized to 0 */
|
||||
/* 0x00 */ lbRTC_time_c time; /* last time updated */
|
||||
/* 0x08 */ u8 num; /* number of cockroaches in the house */
|
||||
/* 0x09 */ u8 pad; /* unused outside of being initalized to 0 */
|
||||
} 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 */
|
||||
/* 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 haniwa_step[8]; /* Only referenced in mISL_gc_to_agb_layer */
|
||||
} mHm_lyr_c;
|
||||
|
||||
typedef struct floor_bit_info_s {
|
||||
u8 wall_original:1; /* is wallpaper a pattern (original)? */
|
||||
u8 floor_original:1; /* is flooring a pattern (original)? */
|
||||
u8 bit_2_7:6; /* unused? */
|
||||
u8 wall_original : 1; /* is wallpaper a pattern (original)? */
|
||||
u8 floor_original : 1; /* is flooring a pattern (original)? */
|
||||
u8 bit_2_7 : 6; /* unused? */
|
||||
} mHm_fllot_bit_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 */ mHm_fllot_bit_c floor_bit_info;
|
||||
/* 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 */ mHm_fllot_bit_c floor_bit_info;
|
||||
} 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 hra_reward0:1; /* earned 70k HRA points reward */
|
||||
u8 hra_reward1:1; /* earned 100k HRA points reward */
|
||||
u8 bit_6:1; /* unused */
|
||||
u8 bit_7:1; /* unused */
|
||||
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 hra_reward0 : 1; /* earned 70k HRA points reward */
|
||||
u8 hra_reward1 : 1; /* earned 100k HRA points reward */
|
||||
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_c 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? */
|
||||
/* 0x0000 */ PersonalID_c ownerID; /* owner player's ID */
|
||||
/* 0x0014 */ u8 unk_14[6];
|
||||
/* 0x001A */ TempoBeat_c haniwa_tempo; /* unsure about this */
|
||||
/* 0x001C */ lbRTC_ymd_c 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? */
|
||||
/* 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
|
||||
|
||||
@@ -1100,7 +1100,7 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define FTR_CLOTH_MANNIQUIN254_WEST 0x1BA7
|
||||
#define FTR_CLOTH_END FTR_CLOTH_MANNIQUIN254_WEST
|
||||
#define FTR_CLOTH_MANNIQUIN_MY_ORIGINAL0 0x1BA8
|
||||
|
||||
#define FTR_CLOTH_MYMANNIQUIN_END 0x1BC7
|
||||
#define FTR_INSECT_START 0x1BC8
|
||||
#define FTR_INSECT00 FTR_INSECT_START
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2274
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+4
-5
@@ -219,14 +219,13 @@ extern s8 sAdo_GetRhythmDelay(u32 p) {
|
||||
return Na_GetRhythmDelay(p);
|
||||
}
|
||||
|
||||
extern f32 sAdo_GetRhythmInfo(u32 p) {
|
||||
extern void sAdo_GetRhythmInfo(TempoBeat_c* rhythm) {
|
||||
|
||||
return Na_GetRhythmInfo(p);
|
||||
Na_GetRhythmInfo(rhythm);
|
||||
}
|
||||
|
||||
extern void sAdo_SetRhythmInfo(f32 p) {
|
||||
|
||||
Na_SetRhythmInfo(p);
|
||||
extern void sAdo_SetRhythmInfo(TempoBeat_c* rhythm) {
|
||||
Na_SetRhythmInfo(rhythm);
|
||||
}
|
||||
|
||||
extern int sAdo_InstCountGet() {
|
||||
|
||||
+3
-3
@@ -77,7 +77,7 @@ extern void famicom_emu_main(GAME* famicom) {
|
||||
|
||||
if (famicom_done == 0) {
|
||||
if (famicom_rom_load_check() < 0) {
|
||||
Common_Set(famicom_2DBAC, Common_Get(famicom_2DBAC) | 1);
|
||||
Common_Set(my_room_message_control_flags, Common_Get(my_room_message_control_flags) | 1);
|
||||
famicom_done = 1;
|
||||
famicom_done_countdown = 0;
|
||||
} else {
|
||||
@@ -152,7 +152,7 @@ extern void famicom_emu_init(GAME* game) {
|
||||
my_alloc_init(game, freeXfbBase, freeXfbSize);
|
||||
|
||||
if (famicom_init(rom_id, &my_malloc_func, player) != 0) {
|
||||
Common_Set(famicom_2DBAC, Common_Get(famicom_2DBAC) | 1);
|
||||
Common_Set(my_room_message_control_flags, Common_Get(my_room_message_control_flags) | 1);
|
||||
return_emu_game(game);
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ extern void famicom_emu_cleanup(GAME* game) {
|
||||
JC_JFWDisplay_startFadeIn(JC_JFWDisplay_getManager(), 1);
|
||||
|
||||
if (famicom_cleanup() != 0) {
|
||||
Common_Set(famicom_2DBAC, Common_Get(famicom_2DBAC) | 2);
|
||||
Common_Set(my_room_message_control_flags, Common_Get(my_room_message_control_flags) | 2);
|
||||
}
|
||||
|
||||
my_alloc_cleanup();
|
||||
|
||||
+11
-30
@@ -57,7 +57,7 @@ static void fIJHOUI_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u
|
||||
cKF_SkeletonInfo_R_c* keyf = &ftr_actor->keyframe;
|
||||
FTR_ACTOR* parent;
|
||||
|
||||
parent = aMR_GetParentFactor();
|
||||
parent = aMR_GetParentFactor(ftr_actor, my_room_actor);
|
||||
fIJHOUI_Status2SetMode(ftr_actor, ftr_actor);
|
||||
|
||||
if (parent != NULL) {
|
||||
@@ -88,14 +88,14 @@ static void fIJHOUI_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u
|
||||
ftr_actor->dynamic_work_s[0] = ftr_actor->state;
|
||||
}
|
||||
|
||||
static int fIJHOUI_DrawBefore(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointNum, Gfx** joint, u8* jointFlag, void* arg,
|
||||
s_xyz* joint1, xyz_t* trans) {
|
||||
static int fIJHOUI_DrawBefore(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointNum, Gfx** joint, u8* jointFlag,
|
||||
void* arg, s_xyz* joint1, xyz_t* trans) {
|
||||
FTR_ACTOR* actor = (FTR_ACTOR*)arg;
|
||||
|
||||
int offset = 10430.378f * (0.017453292f * actor->dynamic_work_f[1]);
|
||||
|
||||
if (jointNum == 3) {
|
||||
MY_ROOM_ACTOR* my_room_actor;
|
||||
ACTOR* my_room_actor;
|
||||
int exists = FALSE;
|
||||
|
||||
if ((Common_Get(clip).my_room_clip != NULL && Common_Get(clip).my_room_clip->my_room_actor_p != NULL)) {
|
||||
@@ -114,15 +114,15 @@ static int fIJHOUI_DrawBefore(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointN
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int fIJHOUI_DrawAfter(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointNum, Gfx** joint, u8* jointFlag, void* arg,
|
||||
s_xyz* joint1, xyz_t* trans) {
|
||||
static int fIJHOUI_DrawAfter(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointNum, Gfx** joint, u8* jointFlag,
|
||||
void* arg, s_xyz* joint1, xyz_t* trans) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void fIJHOUI_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
Mtx* mtx = ftr_actor->skeleton_mtx[game->frame_counter & 1];
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -131,29 +131,10 @@ static void fIJHOUI_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fIJHOUI_func = {
|
||||
&fIJHOUI_ct,
|
||||
&fIJHOUI_mv,
|
||||
&fIJHOUI_dw,
|
||||
NULL,
|
||||
NULL,
|
||||
&fIJHOUI_ct, &fIJHOUI_mv, &fIJHOUI_dw, NULL, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_ike_jny_houi01 = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
40.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEA,
|
||||
mCoBG_FTR_TYPEA,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
&fIJHOUI_func,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 40.0f, 0.01f, aFTR_SHAPE_TYPEA, mCoBG_FTR_TYPEA,
|
||||
0, 2, 0, 0, &fIJHOUI_func,
|
||||
};
|
||||
|
||||
+502
-556
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -2019,9 +2019,9 @@ extern void mRmTp_MakeFamicom_Fdebug() {
|
||||
u16 ftr_idx;
|
||||
int res;
|
||||
Clip_c* clip;
|
||||
GAME_PLAY* play = (GAME_PLAY*)gamePT;
|
||||
GAME* game = gamePT;
|
||||
|
||||
if ((gamePT->pads[PAD1].on.button & BUTTON_Z) == BUTTON_Z && play != NULL) {
|
||||
if ((gamePT->pads[PAD1].on.button & BUTTON_Z) == BUTTON_Z && game != NULL) {
|
||||
clip = Common_GetPointer(clip);
|
||||
|
||||
if (clip->my_room_clip != NULL) {
|
||||
@@ -2036,10 +2036,10 @@ extern void mRmTp_MakeFamicom_Fdebug() {
|
||||
ftr_idx = 0x36A + mRmTp_famicom_idx;
|
||||
}
|
||||
|
||||
res = (*clip->my_room_clip->judge_breed_new_ftr_proc)(play, ftr_idx, &ut_x, &ut_z, &direct, &ofs, &layer);
|
||||
res = (*clip->my_room_clip->judge_breed_new_ftr_proc)(game, ftr_idx, &ut_x, &ut_z, &direct, &ofs, &layer);
|
||||
|
||||
if (res >= 0) {
|
||||
(*clip->my_room_clip->reserve_ftr_proc)(play, ftr_idx, res, ut_x, ut_z, direct, ofs, layer);
|
||||
(*clip->my_room_clip->reserve_ftr_proc)(game, ftr_idx, res, ut_x, ut_z, direct, ofs, layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-9
@@ -10,14 +10,13 @@ def unpack_dir(archive: pyjkernel.JKRArchive, dir: str, verbose=False):
|
||||
if verbose:
|
||||
print('Dumping file: ' + file.name)
|
||||
with open(os.path.join(dir, file.name), "wb") as f:
|
||||
f.write(archive.get_file(dir + "/" + file.name).data)
|
||||
f.write(archive.get_file(dir + os.sep + file.name).data)
|
||||
|
||||
# create all subdirectories and recurse through them
|
||||
for subdir in archive.list_folders(dir):
|
||||
if not os.path.exists(dir + "/" + subdir):
|
||||
os.mkdir(dir + "/" + subdir)
|
||||
unpack_dir(archive, dir + "/" + subdir, verbose)
|
||||
|
||||
if not os.path.exists(dir + os.sep + subdir):
|
||||
os.mkdir(dir + os.sep + subdir)
|
||||
unpack_dir(archive, dir + os.sep + subdir, verbose)
|
||||
|
||||
def unpack_archive(path: str, out_path: str, verbose=False):
|
||||
archive = pyjkernel.from_archive_file(path, True)
|
||||
@@ -38,13 +37,13 @@ def pack_dir(archive: pyjkernel.JKRArchive, path: str, verbose=False):
|
||||
for root, dirs, files in os.walk(local_root):
|
||||
files.sort(key=lambda item: (item.lower(), item))
|
||||
for dir in dirs:
|
||||
archive.create_folder(root + "/" + dir)
|
||||
archive.create_folder(root + os.sep + dir)
|
||||
|
||||
for file in files:
|
||||
if verbose:
|
||||
print('Packing file: ' + root + '/' + file)
|
||||
with open(root + "/" + file, "rb") as f:
|
||||
archive.create_file(root + "/" + file, bytearray(f.read()), pyjkernel.JKRPreloadType.ARAM)
|
||||
print('Packing file: ' + root + os.sep + file)
|
||||
with open(root + os.sep + file, "rb") as f:
|
||||
archive.create_file(root + os.sep + file, bytearray(f.read()), pyjkernel.JKRPreloadType.ARAM)
|
||||
os.chdir(orig_dir)
|
||||
|
||||
def pack_archive(root_path: str, out_path: str, verbose=False):
|
||||
|
||||
Reference in New Issue
Block a user