mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-08-22 05:49:04 -04:00
Implement & link m_scene.c
This commit is contained in:
@@ -8,6 +8,25 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct arrange_room_actor_s ARRANGE_ROOM_ACTOR;
|
||||
|
||||
typedef void (*aAR_REDMA_PROC)();
|
||||
|
||||
typedef struct arrange_room_actor_clip_s {
|
||||
ARRANGE_ROOM_ACTOR* arrange_room_actor_p;
|
||||
aAR_REDMA_PROC redma_proc;
|
||||
} aAR_Clip_c;
|
||||
|
||||
struct arrange_room_actor_s {
|
||||
ACTOR actor_class;
|
||||
int _174;
|
||||
u8* wall_data_p;
|
||||
int wall_num;
|
||||
u8* floor_data_p;
|
||||
int floor_num;
|
||||
aAR_Clip_c clip;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Arrange_Room_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef struct ftr_profile_s {
|
||||
typedef struct furniture_collision_s {
|
||||
f32 start[2]; /* starting xz pos */
|
||||
f32 end[2]; /* ending xz pos */
|
||||
f32 normal[2] /* xz normal */
|
||||
f32 normal[2]; /* xz normal */
|
||||
f32 height; /* collision y */
|
||||
f32 edge_contact_ratio; /* percentage of the xz collision in contact with edge to count as collision */
|
||||
} aFTR_collision_c;
|
||||
|
||||
@@ -8,6 +8,55 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct my_indoor_actor_s MY_INDOOR_ACTOR;
|
||||
|
||||
typedef mActor_name_t (*aMI_CHANGE_WALL_PROC)(mActor_name_t item);
|
||||
typedef mActor_name_t (*aMI_CHANGE_CARPET_PROC)(mActor_name_t item);
|
||||
typedef void (*aMI_INDOOR_DMA_AGAIN_PROC)();
|
||||
typedef void (*aMI_CHANGE_2_DEFAULT_PROC)();
|
||||
typedef void (*aMI_WALL_IDX_2_CHANGE_WALL_PROC)(int wall_idx, int is_original_design);
|
||||
typedef void (*aMI_FLOOR_IDX_2_CHANGE_FLOOR_PROC)(int floor_idx, int is_original_design);
|
||||
|
||||
typedef struct my_room_actor_clip_s {
|
||||
MY_INDOOR_ACTOR* my_indoor_actor_p;
|
||||
aMI_CHANGE_WALL_PROC change_wall_proc;
|
||||
aMI_CHANGE_CARPET_PROC change_carpet_proc;
|
||||
aMI_INDOOR_DMA_AGAIN_PROC indoor_dma_again_proc;
|
||||
aMI_CHANGE_2_DEFAULT_PROC change_2_default_proc;
|
||||
aMI_WALL_IDX_2_CHANGE_WALL_PROC wall_idx_2_change_wall_proc;
|
||||
aMI_FLOOR_IDX_2_CHANGE_FLOOR_PROC floor_idx_2_change_floor_proc;
|
||||
} aMI_Clip_c;
|
||||
|
||||
typedef struct my_indoor_data_bank_s {
|
||||
u8 _00[0x0C - 0x00];
|
||||
u8* floor_data_p;
|
||||
u8* wall_data_p;
|
||||
int _14;
|
||||
} aMI_bank_c;
|
||||
|
||||
struct my_indoor_actor_s {
|
||||
ACTOR actor_class;
|
||||
s16 floor_num;
|
||||
s16 wall_num;
|
||||
int floor_is_original_design;
|
||||
int wall_is_original_design;
|
||||
s16 floor_bank_idx;
|
||||
s16 wall_bank_idx;
|
||||
aMI_bank_c banks[2];
|
||||
int _1B4;
|
||||
aMI_Clip_c clip;
|
||||
s16 room_kind;
|
||||
int change_wall_flag;
|
||||
int reserved_wall_num;
|
||||
int reserved_wall_is_original_design;
|
||||
int change_floor_flag;
|
||||
int reserved_floor_num;
|
||||
int reserved_floor_is_original_design;
|
||||
int room_step[4];
|
||||
int _200; // very small chance this is part of room_step
|
||||
int house_floor_no;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE My_Indoor_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -3,11 +3,68 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_furniture.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct my_room_actor_s MY_ROOM_ACTOR;
|
||||
|
||||
typedef struct my_room_clock_info_s {
|
||||
int tick0; /* set on frame 15 */
|
||||
int tick1; /* set on frame 45 */
|
||||
int tick_stop; /* set on frame 0 */
|
||||
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, 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 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);
|
||||
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, 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);
|
||||
typedef void (*aMR_OPEN_CLOSE_COMMON_MOVE_PROC)(FTR_ACTOR* ftr_actor, ACTOR* actor, GAME* game, f32 start_frame, f32 end_frame);
|
||||
|
||||
typedef struct my_room_clip_s {
|
||||
MY_ROOM_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;
|
||||
aMR_JUDGE_PLAYER_ACTION_PROC judge_player_action_proc;
|
||||
aMR_PLAYER_MOVE_FURNITURE_PROC player_move_ftr_proc;
|
||||
aMR_FTR_ID_2_WPOS_PROC ftrId2wpos_proc;
|
||||
aMR_UNIT_NUM_2_FTR_ITEMNO_FTRID_PROC unitNum2ftrItemNoftrId_proc;
|
||||
aMR_FTR_ID_2_EXTINGUISH_FURNITURE_PROC ftrId2extinguishFtr_proc;
|
||||
aMR_REDMA_FTR_BANK_PROC redma_ftr_bank_proc;
|
||||
aMR_RESERVE_FURNITURE_PROC reserve_ftr_proc;
|
||||
aMR_COUNT_FRIEND_FURNITURE_PROC count_friend_ftr_proc;
|
||||
aMR_JUDGE_PLACE_2ND_LAYER_PROC judge_place_2nd_layer_proc;
|
||||
aMR_OPEN_CLOSE_COMMON_MOVE_PROC open_close_common_move_proc;
|
||||
/* TODO: function definitions */
|
||||
void* get_bed_action_proc;
|
||||
void* mini_disk_common_move_proc;
|
||||
void* famicom_emum_common_move_proc;
|
||||
void* set_leaf_proc;
|
||||
void* ftr2leaf_proc;
|
||||
void* leaf_start_pos_proc;
|
||||
void* pickup_ftr_layer_proc;
|
||||
void* leaf_pickuped_proc;
|
||||
void* ftrNo2bankAddress_proc;
|
||||
void* call_sit_down_ongen_pos_se_proc;
|
||||
aMR_clock_info_c* clock_info_p; /* used for playing the clock tick? sfx */
|
||||
void* sound_melody_proc;
|
||||
void* check_danna_kill_proc;
|
||||
} aMR_Clip_c;
|
||||
|
||||
/* TODO: my room actor */
|
||||
|
||||
extern ACTOR_PROFILE My_Room_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+5
-1
@@ -35,6 +35,8 @@ typedef ACTOR* (*aNPC_GET_ACTOR_AREA_PROC)(size_t, const char*, int);
|
||||
typedef void (*aNPC_FREE_ACTOR_AREA_PROC)(ACTOR*);
|
||||
typedef void (*aNPC_SET_ATTENTION_REQUEST_PROC)(u8, ACTOR*, xyz_t*);
|
||||
|
||||
typedef void (*aNPC_REBUILD_DMA_PROC)();
|
||||
|
||||
typedef int (*aNPC_FORCE_CALL_REQ_PROC)(NPC_ACTOR*, int);
|
||||
|
||||
struct ac_npc_clip_s {
|
||||
@@ -45,7 +47,9 @@ struct ac_npc_clip_s {
|
||||
aNPC_FREE_ACTOR_AREA_PROC free_actor_area_proc;
|
||||
aNPC_DMA_DRAW_DATA_PROC dma_draw_data_proc;
|
||||
aNPC_SET_ATTENTION_REQUEST_PROC set_attention_request_proc;
|
||||
void* _01C[(0x124 - 0x01C) / sizeof(void*)];
|
||||
void* _01C[(0x0F8 - 0x01C) / sizeof(void*)];
|
||||
aNPC_REBUILD_DMA_PROC rebuild_dma_proc;
|
||||
void* _0FC[(0x124 - 0x0FC) / sizeof(void*)];
|
||||
aNPC_FORCE_CALL_REQ_PROC force_call_req_proc;
|
||||
void* _128;
|
||||
};
|
||||
|
||||
@@ -8,6 +8,35 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct shop_indoor_actor_s SHOP_INDOOR_ACTOR;
|
||||
|
||||
typedef int (*aSI_CHANGE_WALL_PROC)(mActor_name_t item);
|
||||
typedef int (*aSI_CHANGE_CARPET_PROC)(mActor_name_t item);
|
||||
typedef void (*aSI_INDOOR_DMA_AGAIN_PROC)();
|
||||
typedef void (*aSI_CHANGE2DEFAULT_PROC)();
|
||||
|
||||
typedef struct shop_indoor_clip_s {
|
||||
SHOP_INDOOR_ACTOR* shop_indoor_actor;
|
||||
aSI_CHANGE_WALL_PROC change_wall_proc;
|
||||
aSI_CHANGE_CARPET_PROC change_carpet_proc;
|
||||
aSI_INDOOR_DMA_AGAIN_PROC indoor_dma_again_proc;
|
||||
aSI_CHANGE2DEFAULT_PROC change2default_proc;
|
||||
} aSI_Clip_c;
|
||||
|
||||
struct shop_indoor_actor_s {
|
||||
ACTOR actor_class;
|
||||
s16 floor_default_tex_no;
|
||||
s16 wall_default_tex_no;
|
||||
s16 floor_data_idx;
|
||||
s16 wall_data_idx;
|
||||
int _17C;
|
||||
u8* floor_data_p[2];
|
||||
u8* wall_data_p[2];
|
||||
s16 shop_idx;
|
||||
aSI_Clip_c clip;
|
||||
int fukubiki_active;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Shop_Indoor_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -8,6 +8,44 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct manekin_actor_s {
|
||||
xyz_t wpos;
|
||||
int ut_x;
|
||||
int ut_z;
|
||||
mActor_name_t item;
|
||||
u8* tex_p;
|
||||
u8* palette_p;
|
||||
mCoBG_bg_regist_c bg_regist;
|
||||
int move_bg_num;
|
||||
int _4C;
|
||||
int naked;
|
||||
} MANEKIN_ACTOR;
|
||||
|
||||
typedef struct shop_manekin_actor_s SHOP_MANEKIN_ACTOR;
|
||||
|
||||
typedef void (*aSM_MANEKIN_DMA_AGAIN_PROC)();
|
||||
typedef void (*aSM_CHANGE2NAKEDMANEKIN_PROC)(int ut_x, int ut_z);
|
||||
typedef void (*aSM_NAKED2CLOTH_PROC)(int ut_x, int ut_z);
|
||||
|
||||
typedef struct shop_manekin_clip_s {
|
||||
SHOP_MANEKIN_ACTOR* shop_manekin_actor_p;
|
||||
aSM_MANEKIN_DMA_AGAIN_PROC manekin_dma_again_proc;
|
||||
aSM_CHANGE2NAKEDMANEKIN_PROC change2naked_manekin_proc;
|
||||
aSM_NAKED2CLOTH_PROC naked2cloth_proc;
|
||||
} aSM_Clip_c;
|
||||
|
||||
struct shop_manekin_actor_s {
|
||||
ACTOR actor_class;
|
||||
int current_block_manekin_num;
|
||||
MANEKIN_ACTOR* manekin_actors;
|
||||
int now_block_x;
|
||||
int now_block_z;
|
||||
aSM_Clip_c clip;
|
||||
u8* naked_tex_p;
|
||||
u8* naked_pal_p;
|
||||
int _19C;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Shop_Manekin_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -8,6 +8,40 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct shop_umbrella_actor_s SHOP_UMBRELLA_ACTOR;
|
||||
|
||||
typedef void (*aShopUmbrella_UMBRELLA_DMA_AGAIN_PROC)();
|
||||
typedef void (*aShopUmbrella_DELETE_UMBRELLA_PROC)(int ut_x, int ut_z);
|
||||
|
||||
typedef struct shop_umbrella_actor_clip_s {
|
||||
SHOP_UMBRELLA_ACTOR* shop_umbrella_actor_p;
|
||||
aShopUmbrella_UMBRELLA_DMA_AGAIN_PROC umbrella_dma_again_proc;
|
||||
aShopUmbrella_DELETE_UMBRELLA_PROC delete_umbrella_proc;
|
||||
} aShopUmbrella_Clip_c;
|
||||
|
||||
typedef struct umbrella_actor_s {
|
||||
xyz_t wpos;
|
||||
int ut_x;
|
||||
int ut_z;
|
||||
mActor_name_t item;
|
||||
int umbrella_idx;
|
||||
int _1C;
|
||||
mCoBG_bg_regist_c bg_regist;
|
||||
int move_bg_idx;
|
||||
int _4C;
|
||||
s16 state;
|
||||
f32 scale;
|
||||
} aShopUmbrella_umbrella_c;
|
||||
|
||||
struct shop_umbrella_actor_s {
|
||||
ACTOR actor_class;
|
||||
int umbrella_num;
|
||||
aShopUmbrella_umbrella_c* umbrellas;
|
||||
int bx;
|
||||
int bz;
|
||||
aShopUmbrella_Clip_c clip;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Shop_Umbrella_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -3,11 +3,19 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "libu64/gfxprint.h"
|
||||
#include "m_personal_id.h"
|
||||
#include "m_land_h.h"
|
||||
#include "m_private.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
mLd_land_info_c land;
|
||||
PersonalID_c pid[PLAYER_NUM];
|
||||
} mCD_persistent_data_c;
|
||||
|
||||
extern u8 mCD_GetThisLandSlotNo_code(int* player_no, int* slot_card_results);
|
||||
extern void mCD_save_data_aram_malloc();
|
||||
extern void mCD_set_aram_save_data();
|
||||
|
||||
+36
-6
@@ -14,31 +14,61 @@
|
||||
#include "ac_aprilfool_control.h"
|
||||
#include "ac_groundhog_control.h"
|
||||
#include "ac_event_manager.h"
|
||||
#include "ac_shop_manekin.h"
|
||||
#include "ac_shop_indoor.h"
|
||||
#include "ac_my_room.h"
|
||||
#include "ac_my_indoor.h"
|
||||
#include "ac_arrange_room.h"
|
||||
#include "ac_shop_umbrella.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*CLIP_NONE_PROC)();
|
||||
|
||||
/* sizeof(Clip_c) == 0x104 */
|
||||
typedef struct clip_s {
|
||||
/* 0x000 */ void* _000[(0x040 - 0x000) / sizeof(void*)];
|
||||
/* 0x000 */ void* _000[(0x020 - 0x000) / sizeof(void*)];
|
||||
/* 0x020 */ int arrange_ftr_num;
|
||||
/* 0x024 */ void* _024[(0x040 - 0x024) / sizeof(void*)];
|
||||
/* 0x040 */ aNPC_Clip_c* npc_clip;
|
||||
/* 0x044 */ void* _044[(0x074 - 0x044) / sizeof(void*)];
|
||||
/* 0x044 */ void* _044[(0x060 - 0x044) / sizeof(void*)];
|
||||
/* 0x060 */ aSM_Clip_c* shop_manekin_clip;
|
||||
/* 0x064 */ void* _064;
|
||||
/* 0x068 */ CLIP_NONE_PROC _068;
|
||||
/* 0x06C */ void* _06C;
|
||||
/* 0x070 */ aSI_Clip_c* shop_indoor_clip;
|
||||
/* 0x074 */ bIT_Clip_c* bg_item_clip;
|
||||
/* 0x078 */ void* _078;
|
||||
/* 0x07C */ aINS_Clip_c* insect_clip;
|
||||
/* 0x080 */ void* _080[(0x08C - 0x080) / sizeof(void*)];
|
||||
/* 0x080 */ aMR_Clip_c* my_room_clip;
|
||||
/* 0x084 */ void* _084;
|
||||
/* 0x088 */ void* _088;
|
||||
/* 0x08C */ aSTR_Clip_c* structure_clip;
|
||||
/* 0x090 */ eEC_EffectControl_Clip_c* effect_clip;
|
||||
/* 0x094 */ aTOL_Clip_c* tools_clip;
|
||||
/* 0x098 */ void* _094[(0x0A0 - 0x098) / sizeof(void*)];
|
||||
/* 0x098 */ void* _098;
|
||||
/* 0x09C */ aMI_Clip_c* my_indoor_clip;
|
||||
/* 0x0A0 */ mDemo_Clip_c* demo_clip; /* can be multiple clip classes */
|
||||
/* 0x0A4 */ void* demo_clip2; /* can be multiple clip classes */
|
||||
/* 0x0A8 */ void* _0A8;
|
||||
/* 0x0AC */ aGYO_Clip_c* gyo_clip;
|
||||
/* 0x0B0 */ void* _0B0[(0x0DC - 0x0B0) / sizeof(void*)];
|
||||
/* 0x0B0 */ void* _0B0;
|
||||
/* 0x0B4 */ void* _0B4;
|
||||
/* 0x0B8 */ aShopUmbrella_Clip_c* shop_umbrella_clip;
|
||||
/* 0x0BC */ aAR_Clip_c* arrange_room_clip;
|
||||
/* 0x0C0 */ void* _0C0;
|
||||
/* 0x0C4 */ void* _0C4;
|
||||
/* 0x0C8 */ void* _0C8;
|
||||
/* 0x0CC */ void* _0CC;
|
||||
/* 0x0D0 */ void* _0D0;
|
||||
/* 0x0D4 */ CLIP_NONE_PROC ball_redma_proc; /* removed in DnM+ */
|
||||
/* 0x0D8 */ void* _0D8;
|
||||
/* 0x0DC */ aAL_Clip_c* animal_logo_clip;
|
||||
/* 0x0E0 */ void* _0E0[(0x0EC - 0x0E0) / sizeof(void*)];
|
||||
/* 0x0E0 */ void* _0E0;
|
||||
/* 0x0E4 */ void* _0E4;
|
||||
/* 0x0E8 */ void* _0E8;
|
||||
/* 0x0EC */ aAPC_Clip_c* aprilfool_control_clip;
|
||||
/* 0x0F0 */ aEvMgr_Clip_c* event_manager_clip;
|
||||
/* 0x0F4 */ aGHC_Clip_c* groundhog_control_clip;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "m_npc_schedule_h.h"
|
||||
#include "m_all_grow.h"
|
||||
#include "m_fishrecord.h"
|
||||
#include "m_card.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -221,7 +222,8 @@ typedef struct common_data_s {
|
||||
/* 0x02852E */ s16 goods_power;
|
||||
/* 0x028530 */ Door_data_c door_data; /* misc door data */
|
||||
/* 0x028544 */ Door_data_c structure_exit_door_data; /* door data for when exiting a building */
|
||||
/* 0x028558 */ u8 tmp1[0x028590 - 0x028558];
|
||||
/* 0x028558 */ u8 _28558[0x02857C - 0x028558];
|
||||
/* 0x02857C */ Door_data_c famicom_emu_exit_door_data;
|
||||
/* 0x028590 */ u8 remove_cut_tree_info_bitfield; /* resets the cut tree states for trees in a visible acre */
|
||||
/* 0x028591 */ u8 floor_idx;
|
||||
/* 0x028592 */ s16 demo_profiles[mDemo_CLIP_TYPE_NUM - 1];
|
||||
@@ -284,7 +286,7 @@ typedef struct common_data_s {
|
||||
/* 0x02DB40 */ u8 auto_nwrite_set; /* when true, saved nwrite time will be utilized. Seems to be used to keep same date for fishing tourney stuff. */
|
||||
/* 0x02DB42 */ u16 select_last_select_no;
|
||||
/* 0x02DB44 */ u16 select_last_top_no;
|
||||
/* 0x02DB46 */ u8 _2DB46[0x2DBA2 - 0x2DB46];
|
||||
/* 0x02DB46 */ mCD_persistent_data_c travel_persistent_data; /* used for checking if travelling back to town */
|
||||
/* 0x02DBA2 */ s16 island_weather;
|
||||
/* 0x02DBA4 */ s16 island_weather_intensity;
|
||||
/* 0x02DBA6 */ u8 _2DBA6[0x2DBAC - 0x2DBA6];
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ typedef struct home_floor_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? */
|
||||
} fllot_bit; /* Name exposed? by mISL_gc_to_agb_fllot_bit */
|
||||
} fllot_bit; /* Name exposed? by mISL_gc_to_agb_fllot_bit, may also be floor_bit_info as 'mRmTp_GetNowSceneFloorBitInfoP' */
|
||||
} mHm_flr_c;
|
||||
|
||||
/* sizeof(mHm_flg_c) == 1 */
|
||||
|
||||
@@ -241,6 +241,7 @@ extern void mNpc_SetNpcHomeYpos();
|
||||
extern void mNpc_SendRegisteredGoodbyMail();
|
||||
extern void mNpc_IslandNpcRoomDataSet(mFM_fg_data_c** sorted_fg_data_list, int fg_name_start);
|
||||
extern Animal_c* mNpc_GetAnimalInfoP(mActor_name_t npc_name);
|
||||
extern int mNpc_RegistMaskNpc(mActor_name_t mask_id, mActor_name_t npc_id, mActor_name_t cloth);
|
||||
|
||||
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
|
||||
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
|
||||
|
||||
+3
-4
@@ -33,7 +33,7 @@ struct game_play_s {
|
||||
/* 0x00E4 */ mFI_block_tbl_c block_table;
|
||||
/* 0x00F4 */ mFI_block_tbl_c last_block_table;
|
||||
/* 0x0104 */ u8 _0104[0x010C - 0x0104];
|
||||
/* 0x010C */ Scene_status_c* current_scene_data;
|
||||
/* 0x010C */ Scene_Word_u* current_scene_data;
|
||||
/* 0x0110 */ Object_Exchange_c object_exchange;
|
||||
/* 0x1A68 */ View view;
|
||||
/* 0x1B88 */ Camera2 camera;
|
||||
@@ -45,8 +45,7 @@ struct game_play_s {
|
||||
/* 0x1FA4 */ s8 unk1FA4;
|
||||
/* 0x1FA8 */ u8 _1FA4[0x1FB8 - 0x1FA8];
|
||||
/* 0x1FB8 */ PreRender prerender;
|
||||
/* 0x2000 */ Door_data_c* door_data;
|
||||
/* 0x2004 */ int _2004;
|
||||
/* 0x2000 */ Door_info_c door_info;
|
||||
/* 0x2008 */ int next_scene_no;
|
||||
/* 0x200C */ MtxF projection_matrix;
|
||||
/* 0x204C */ MtxF billboard_matrix;
|
||||
@@ -71,7 +70,7 @@ struct game_play_s {
|
||||
/* 0x2328 */ CollisionCheck_c collision_check;
|
||||
/* 0x23F8 */ DRAW_CHK_PROC draw_chk_proc; // only used by mikanbox actor
|
||||
/* 0x23FC */ u32 fade_color_value;
|
||||
/* 0x2400 */ Scene_status_c* scene_data_2400;
|
||||
/* 0x2400 */ Scene_data_status_c* scene_data_status;
|
||||
/* 0x2404 */ u8 _2400[0x2600 - 0x2404];
|
||||
};
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ extern int mPlib_Get_address_able_display();
|
||||
extern int mPlib_get_player_actor_main_index(GAME_PLAY* play);
|
||||
extern int mPlib_check_player_actor_main_index_AllWade(GAME_PLAY* play);
|
||||
|
||||
extern void mPlib_Object_Exchange_keep_new_PlayerMdl(GAME_PLAY* play);
|
||||
extern void mPlib_Object_Exchange_keep_new_PlayerTex(GAME_PLAY* play, int bank_id, int base_idx);
|
||||
extern void mPlib_Object_Exchange_keep_new_PlayerFaceTex(GAME_PLAY* play);
|
||||
extern void mPlib_Object_Exchange_keep_new_PlayerFacePallet(GAME_PLAY* play, int bank_id, int base_idx);
|
||||
|
||||
#define GET_PLAYER_ACTOR(play) get_player_actor_withoutCheck(play)
|
||||
#define GET_PLAYER_ACTOR_NOW() get_player_actor_withoutCheck((GAME_PLAY*)gamePT)
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ extern "C" {
|
||||
#define mPr_WALLET_MAX 99999
|
||||
#define mPr_DEPOSIT_MAX 999999999
|
||||
|
||||
#define mPr_FLAG_MASK_CAT_SCHEDULED (1 << 0) // Blanca appears when travelling
|
||||
#define mPr_FLAG_POSTOFFICE_GIFT0 (1 << 2) // 1,000,000 Bells
|
||||
#define mPr_FLAG_POSTOFFICE_GIFT1 (1 << 3) // 10,000,000 Bells
|
||||
#define mPr_FLAG_POSTOFFICE_GIFT2 (1 << 4) // 100,000,000 Bells
|
||||
|
||||
+164
-69
@@ -2,13 +2,17 @@
|
||||
#define M_SCENE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "m_lib.h"
|
||||
#include "famicom_emu.h"
|
||||
#include "m_scene_table.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define mSc_ARENA_SIZE 0xA000
|
||||
|
||||
typedef struct door_data_s {
|
||||
int next_scene_id;
|
||||
u8 exit_orientation;
|
||||
@@ -25,87 +29,178 @@ typedef struct door_data_s {
|
||||
typedef struct object_bank_s {
|
||||
s16 bank_id;
|
||||
char* ram_start;
|
||||
// TODO: others
|
||||
u8 _08[0x58 - 0x08];
|
||||
char* dma_start;
|
||||
u32 rom_addr;
|
||||
size_t size;
|
||||
u32 _14;
|
||||
int _18;
|
||||
int _1C;
|
||||
int _20;
|
||||
int _24;
|
||||
int _28;
|
||||
OSMessageQueue* msg_queue_p;
|
||||
OSMessage _30_msg;
|
||||
OSMessageQueue dma_controller_msg_queue;
|
||||
OSMessage dma_controller_msg;
|
||||
s16 num_exist;
|
||||
u8 _0x5A[0x5C - 0x5A];
|
||||
u8 part_id;
|
||||
u8 state;
|
||||
} Object_Bank_c;
|
||||
|
||||
typedef struct object_exchange_s {
|
||||
Object_Bank_c banks[mSc_OBJECT_BANK_NUM];
|
||||
int bank_id;
|
||||
int _192C;
|
||||
int bank_idx;
|
||||
int keep_id;
|
||||
int exchange_id;
|
||||
u8 _1934[0x1958-0x1934];
|
||||
char* next_bank_ram_address;
|
||||
char* max_ram_address;
|
||||
char* start_address_save[2];
|
||||
char* end_address_save[2];
|
||||
char* _194C;
|
||||
int selected_partition;
|
||||
int _1954;
|
||||
} Object_Exchange_c;
|
||||
|
||||
typedef struct scene_status_s{
|
||||
u8 unk0[0x13];
|
||||
u8 unk13;
|
||||
}Scene_status_c;
|
||||
enum {
|
||||
mSc_SCENE_DATA_TYPE_PLAYER_PTR,
|
||||
mSc_SCENE_DATA_TYPE_CTRL_ACTOR_PTR,
|
||||
mSc_SCENE_DATA_TYPE_ACTOR_PTR,
|
||||
mSc_SCENE_DATA_TYPE_OBJECT_EXCHANGE_BANK_PTR,
|
||||
mSc_SCENE_DATA_TYPE_DOOR_DATA_PTR,
|
||||
mSc_SCENE_DATA_TYPE_FIELD_CT,
|
||||
mSc_SCENE_DATA_TYPE_MY_ROOM_CT,
|
||||
mSc_SCENE_DATA_TYPE_ARRANGE_ROOM_CT,
|
||||
mSc_SCENE_DATA_TYPE_ARRANGE_FURNITURE_CT,
|
||||
mSc_SCENE_DATA_TYPE_SOUND,
|
||||
mSc_SCENE_DATA_TYPE_END,
|
||||
|
||||
extern Scene_status_c test01_info;
|
||||
extern Scene_status_c test02_info;
|
||||
extern Scene_status_c test03_info;
|
||||
extern Scene_status_c water_test_info;
|
||||
extern Scene_status_c test_step01_info;
|
||||
extern Scene_status_c test04_info;
|
||||
extern Scene_status_c npc_room01_info;
|
||||
extern Scene_status_c test_fd_npc_land_info;
|
||||
extern Scene_status_c field_tool_field_info;
|
||||
extern Scene_status_c shop01_info;
|
||||
extern Scene_status_c BG_TEST01_info;
|
||||
extern Scene_status_c BG_TEST01_XLU_info;
|
||||
extern Scene_status_c broker_shop_info;
|
||||
extern Scene_status_c fg_tool_in_info;
|
||||
extern Scene_status_c post_office_info;
|
||||
extern Scene_status_c start_demo1_info;
|
||||
extern Scene_status_c start_demo2_info;
|
||||
extern Scene_status_c police_box_info;
|
||||
extern Scene_status_c buggy_info;
|
||||
extern Scene_status_c player_select_info;
|
||||
extern Scene_status_c player_room_s_info;
|
||||
extern Scene_status_c player_room_m_info;
|
||||
extern Scene_status_c player_room_l_info;
|
||||
extern Scene_status_c shop02_info;
|
||||
extern Scene_status_c shop03_info;
|
||||
extern Scene_status_c shop04_1f_info;
|
||||
extern Scene_status_c test05_info;
|
||||
extern Scene_status_c PLAYER_SELECT2_info;
|
||||
extern Scene_status_c PLAYER_SELECT3_info;
|
||||
extern Scene_status_c shop04_2f_info;
|
||||
extern Scene_status_c event_notification_info;
|
||||
extern Scene_status_c kamakura_info;
|
||||
extern Scene_status_c field_tool_field_info;
|
||||
extern Scene_status_c title_demo_info;
|
||||
extern Scene_status_c PLAYER_SELECT4_info;
|
||||
extern Scene_status_c museum_entrance_info;
|
||||
extern Scene_status_c museum_picture_info;
|
||||
extern Scene_status_c museum_fossil_info;
|
||||
extern Scene_status_c museum_insect_info;
|
||||
extern Scene_status_c museum_fish_info;
|
||||
extern Scene_status_c player_room_ll1_info;
|
||||
extern Scene_status_c player_room_ll2_info;
|
||||
extern Scene_status_c p_room_bm_s_info;
|
||||
extern Scene_status_c p_room_bm_m_info;
|
||||
extern Scene_status_c p_room_bm_l_info;
|
||||
extern Scene_status_c p_room_bm_ll1_info;
|
||||
extern Scene_status_c NEEDLEWORK_info;
|
||||
extern Scene_status_c player_room_island_info;
|
||||
extern Scene_status_c npc_room_island_info;
|
||||
extern Scene_status_c start_demo3_info;
|
||||
extern Scene_status_c lighthouse_info;
|
||||
extern Scene_status_c tent_info;
|
||||
mSc_SCENE_DATA_TYPE_NUM
|
||||
};
|
||||
|
||||
extern int mSc_secure_exchange_keep_bank(Object_Exchange_c*, Object_Bank_c*, int);
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 num_actors;
|
||||
Actor_data* data_p;
|
||||
} Scene_Word_Data_Actor_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 num_ctrl_actors;
|
||||
s16* ctrl_actor_profile_p;
|
||||
} Scene_Word_Data_Ctrl_Actor_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 num_banks;
|
||||
s16* banks_p;
|
||||
} Scene_Word_Data_Object_Bank_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 num_doors;
|
||||
Door_data_c* door_data_p;
|
||||
} Scene_Word_Data_Door_Data_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 item_type;
|
||||
u8 bg_num;
|
||||
u16 bg_disp_size;
|
||||
u8 room_type;
|
||||
u8 draw_type;
|
||||
} Scene_Word_Data_FieldCt_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 arrange_ftr_num;
|
||||
} Scene_Word_Data_ArrangeFurniture_ct_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
} Scene_Word_Data_Misc_c;
|
||||
|
||||
typedef union scene_word_u {
|
||||
Scene_Word_Data_Misc_c misc; /* MY_ROOM_CT, ARRANGE_ROOM_CT, ARRANGE_FURNITURE_CT, SOUND */
|
||||
Scene_Word_Data_Actor_c actor; /* PLAYER_PTR, ACTOR_PTR */
|
||||
Scene_Word_Data_Ctrl_Actor_c control_actor;
|
||||
Scene_Word_Data_Object_Bank_c object_bank;
|
||||
Scene_Word_Data_Door_Data_c door_data;
|
||||
Scene_Word_Data_FieldCt_c field_ct;
|
||||
Scene_Word_Data_ArrangeFurniture_ct_c arrange_ftr_ct;
|
||||
} Scene_Word_u;
|
||||
|
||||
typedef struct door_info_s {
|
||||
u8 num_doors;
|
||||
Door_data_c* door_data_p;
|
||||
} Door_info_c;
|
||||
|
||||
extern Scene_Word_u test01_info[];
|
||||
extern Scene_Word_u test02_info[];
|
||||
extern Scene_Word_u test03_info[];
|
||||
extern Scene_Word_u water_test_info[];
|
||||
extern Scene_Word_u test_step01_info[];
|
||||
extern Scene_Word_u test04_info[];
|
||||
extern Scene_Word_u npc_room01_info[];
|
||||
extern Scene_Word_u test_fd_npc_land_info[];
|
||||
extern Scene_Word_u field_tool_field_info[];
|
||||
extern Scene_Word_u shop01_info[];
|
||||
extern Scene_Word_u BG_TEST01_info[];
|
||||
extern Scene_Word_u BG_TEST01_XLU_info[];
|
||||
extern Scene_Word_u broker_shop_info[];
|
||||
extern Scene_Word_u fg_tool_in_info[];
|
||||
extern Scene_Word_u post_office_info[];
|
||||
extern Scene_Word_u start_demo1_info[];
|
||||
extern Scene_Word_u start_demo2_info[];
|
||||
extern Scene_Word_u police_box_info[];
|
||||
extern Scene_Word_u buggy_info[];
|
||||
extern Scene_Word_u player_select_info[];
|
||||
extern Scene_Word_u player_room_s_info[];
|
||||
extern Scene_Word_u player_room_m_info[];
|
||||
extern Scene_Word_u player_room_l_info[];
|
||||
extern Scene_Word_u shop02_info[];
|
||||
extern Scene_Word_u shop03_info[];
|
||||
extern Scene_Word_u shop04_1f_info[];
|
||||
extern Scene_Word_u test05_info[];
|
||||
extern Scene_Word_u PLAYER_SELECT2_info[];
|
||||
extern Scene_Word_u PLAYER_SELECT3_info[];
|
||||
extern Scene_Word_u shop04_2f_info[];
|
||||
extern Scene_Word_u event_notification_info[];
|
||||
extern Scene_Word_u kamakura_info[];
|
||||
extern Scene_Word_u field_tool_field_info[];
|
||||
extern Scene_Word_u title_demo_info[];
|
||||
extern Scene_Word_u PLAYER_SELECT4_info[];
|
||||
extern Scene_Word_u museum_entrance_info[];
|
||||
extern Scene_Word_u museum_picture_info[];
|
||||
extern Scene_Word_u museum_fossil_info[];
|
||||
extern Scene_Word_u museum_insect_info[];
|
||||
extern Scene_Word_u museum_fish_info[];
|
||||
extern Scene_Word_u player_room_ll1_info[];
|
||||
extern Scene_Word_u player_room_ll2_info[];
|
||||
extern Scene_Word_u p_room_bm_s_info[];
|
||||
extern Scene_Word_u p_room_bm_m_info[];
|
||||
extern Scene_Word_u p_room_bm_l_info[];
|
||||
extern Scene_Word_u p_room_bm_ll1_info[];
|
||||
extern Scene_Word_u NEEDLEWORK_info[];
|
||||
extern Scene_Word_u player_room_island_info[];
|
||||
extern Scene_Word_u npc_room_island_info[];
|
||||
extern Scene_Word_u start_demo3_info[];
|
||||
extern Scene_Word_u lighthouse_info[];
|
||||
extern Scene_Word_u tent_info[];
|
||||
|
||||
extern char* mSc_secure_exchange_keep_bank(Object_Exchange_c* exchange, s16 bank_id, size_t size);
|
||||
extern void mSc_background_dmacopy_controller(Object_Bank_c* bank);
|
||||
extern void mSc_dmacopy_data_bank(Object_Exchange_c* exchange);
|
||||
extern int mSc_bank_regist_check(Object_Exchange_c* exchange, s16 bank_id);
|
||||
extern void mSc_regist_initial_exchange_bank(GAME_PLAY* play);
|
||||
extern void mSc_dmacopy_data_bank(Object_Exchange_c*);
|
||||
extern void mSc_data_bank_ct(GAME_PLAY*, Object_Exchange_c*);
|
||||
extern void Door_info_ct(Door_data_c**);
|
||||
extern void Scene_ct(GAME_PLAY*, void*);
|
||||
extern void mSc_decide_exchange_bank(Object_Exchange_c*);
|
||||
extern void return_emu_game(GAME*);
|
||||
extern void mSc_dmacopy_all_exchange_bank(Object_Exchange_c* exchange);
|
||||
extern void mSc_data_bank_ct(GAME_PLAY* play, Object_Exchange_c* exchange);
|
||||
extern void mSc_decide_exchange_bank(Object_Exchange_c* exchange);
|
||||
extern void Scene_ct(GAME_PLAY* play, Scene_Word_u* scene_data);
|
||||
extern void Door_info_ct(Door_info_c* door_info);
|
||||
extern int goto_other_scene(GAME_PLAY* play, Door_data_c* door_data, int update_player_mode);
|
||||
extern int goto_next_scene(GAME_PLAY* play, int next_idx, int update_player_mode);
|
||||
extern int goto_emu_game(GAME_PLAY* play, u8 famicom_rom_id);
|
||||
extern void return_emu_game(GAME* game);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef M_SCENE_FTR_H
|
||||
#define M_SCENE_FTR_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_play_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mScn_ObtainMyRoomBank(GAME_PLAY* play);
|
||||
extern void mScn_ObtainCarpetBank(GAME_PLAY* play);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
#define M_SCENE_TABLE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_scene.h"
|
||||
//#include "m_scene.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -17,6 +17,11 @@ enum field_draw_type {
|
||||
FIELD_DRAW_TYPE_NUM
|
||||
};
|
||||
|
||||
typedef struct scene_status_s {
|
||||
u8 unk0[0x13];
|
||||
u8 unk13;
|
||||
} Scene_data_status_c;
|
||||
|
||||
/*
|
||||
TODO: is this right? I assume so based on file names but
|
||||
there may be a better place for this
|
||||
@@ -94,7 +99,7 @@ enum scene_table {
|
||||
#define mSc_IS_SCENE_MUSEUM_ROOM(scene) \
|
||||
((scene) >= SCENE_MUSEUM_ENTRANCE && (scene) <= SCENE_MUSEUM_ROOM_FISH)
|
||||
|
||||
extern Scene_status_c scene_data_status[SCENE_NUM];
|
||||
extern Scene_data_status_c scene_data_status[SCENE_NUM];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ extern void mSM_submenu_move(Submenu*);
|
||||
extern void mSM_submenu_draw(Submenu*, GAME_PLAY*);
|
||||
extern int mSM_CHECK_ALL_FISH_GET();
|
||||
extern int mSM_CHECK_ALL_INSECT_GET();
|
||||
extern void mSM_Object_Exchange_keep_new_Menu(GAME_PLAY* play);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user