mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-08-08 18:13:05 -04:00
Implement & link ac_my_house
This commit is contained in:
+24
-16
@@ -8,24 +8,33 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
aID_STATE_0,
|
||||
aID_STATE_TAKEN_HOUSE,
|
||||
aID_STATE_FREE_HOUSE,
|
||||
// more?
|
||||
|
||||
aID_STATE_NUM
|
||||
};
|
||||
|
||||
typedef struct actor_intor_demo_s INTRO_DEMO_ACTOR;
|
||||
|
||||
struct actor_intor_demo_s {
|
||||
ACTOR actor_class;
|
||||
int action;
|
||||
int rcn_action;
|
||||
void (*action_proc)(ACTOR*, GAME*);
|
||||
void* train1_actor_p; // TODO: correct type
|
||||
void* station_master_actor_p; // TODO: correct type
|
||||
void* rcn_guide_actor_p; // TODO: correct type
|
||||
int player_in_intro_demo;
|
||||
int player_intro_demo_state;
|
||||
int selected_house;
|
||||
int _198;
|
||||
u8 first_field_bgm_state;
|
||||
int _1A0;
|
||||
int _1A4;
|
||||
int _1A8;
|
||||
ACTOR actor_class;
|
||||
int action;
|
||||
int rcn_action;
|
||||
void (*action_proc)(ACTOR*, GAME*);
|
||||
void* train1_actor_p; // TODO: correct type
|
||||
void* station_master_actor_p; // TODO: correct type
|
||||
void* rcn_guide_actor_p; // TODO: correct type
|
||||
int player_in_intro_demo;
|
||||
int player_intro_demo_state;
|
||||
int selected_house;
|
||||
int _198;
|
||||
u8 first_field_bgm_state;
|
||||
int _1A0;
|
||||
int _1A4;
|
||||
int _1A8;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Intro_Demo_Profile;
|
||||
@@ -35,4 +44,3 @@ extern ACTOR_PROFILE Intro_Demo_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+4
-21
@@ -3,32 +3,16 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_structure.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct actor_my_house_s MY_HOUSE_ACTOR;
|
||||
typedef struct my_house_actor_s MY_HOUSE_ACTOR;
|
||||
|
||||
struct actor_my_house_s {
|
||||
ACTOR actor_class;
|
||||
int _174;
|
||||
cKF_SkeletonInfo_R_c keyframe;
|
||||
int _1E8;
|
||||
s_xyz work_area[15];
|
||||
s_xyz morph_area[15];
|
||||
u8 _2A0[0x2B0 - 0x2A0];
|
||||
int door_rotation_speed_idx;
|
||||
int house_no;
|
||||
int house_shape;
|
||||
int _2BC;
|
||||
int _2C0;
|
||||
int intro_flag;
|
||||
f32 door_pos_x;
|
||||
f32 door_poz_z;
|
||||
f32 door_rotation_speed;
|
||||
f32 _2D4;
|
||||
int season;
|
||||
struct my_house_actor_s {
|
||||
STRUCTURE_ACTOR structure_class;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE MyHouse_Profile;
|
||||
@@ -38,4 +22,3 @@ extern ACTOR_PROFILE MyHouse_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+157
-153
@@ -11,218 +11,220 @@ extern "C" {
|
||||
#define mCoBG_HEIGHT_MAX 31
|
||||
|
||||
enum field_layer {
|
||||
mCoBG_LAYER0,
|
||||
mCoBG_LAYER1,
|
||||
mCoBG_LAYER2,
|
||||
mCoBG_LAYER3,
|
||||
mCoBG_LAYER0,
|
||||
mCoBG_LAYER1,
|
||||
mCoBG_LAYER2,
|
||||
mCoBG_LAYER3,
|
||||
|
||||
mCoBG_LAYER_NUM
|
||||
mCoBG_LAYER_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mCoBG_FTR_TYPEA,
|
||||
mCoBG_FTR_TYPEB_0,
|
||||
mCoBG_FTR_TYPEB_180,
|
||||
mCoBG_FTR_TYPEB_270,
|
||||
mCoBG_FTR_TYPEB_90,
|
||||
mCoBG_FTR_TYPEC,
|
||||
mCoBG_FTR_TYPEA,
|
||||
mCoBG_FTR_TYPEB_0,
|
||||
mCoBG_FTR_TYPEB_180,
|
||||
mCoBG_FTR_TYPEB_270,
|
||||
mCoBG_FTR_TYPEB_90,
|
||||
mCoBG_FTR_TYPEC,
|
||||
|
||||
mCoBG_FTR_TYPE_NUM
|
||||
mCoBG_FTR_TYPE_NUM
|
||||
};
|
||||
|
||||
enum background_attribute {
|
||||
/* TODO: finish */
|
||||
mCoBG_ATTRIBUTE_GRASS0,
|
||||
mCoBG_ATTRIBUTE_GRASS1,
|
||||
mCoBG_ATTRIBUTE_GRASS2,
|
||||
mCoBG_ATTRIBUTE_GRASS3,
|
||||
mCoBG_ATTRIBUTE_SOIL0,
|
||||
mCoBG_ATTRIBUTE_SOIL1,
|
||||
mCoBG_ATTRIBUTE_SOIL2,
|
||||
mCoBG_ATTRIBUTE_STONE,
|
||||
mCoBG_ATTRIBUTE_FLOOR,
|
||||
mCoBG_ATTRIBUTE_BUSH,
|
||||
mCoBG_ATTRIBUTE_HOLE,
|
||||
mCoBG_ATTRIBUTE_WAVE,
|
||||
mCoBG_ATTRIBUTE_WATER,
|
||||
mCoBG_ATTRIBUTE_WATERFALL,
|
||||
mCoBG_ATTRIBUTE_RIVER_N,
|
||||
mCoBG_ATTRIBUTE_RIVER_NW,
|
||||
mCoBG_ATTRIBUTE_RIVER_W,
|
||||
mCoBG_ATTRIBUTE_RIVER_SW,
|
||||
mCoBG_ATTRIBUTE_RIVER_S,
|
||||
mCoBG_ATTRIBUTE_RIVER_SE,
|
||||
mCoBG_ATTRIBUTE_RIVER_E,
|
||||
mCoBG_ATTRIBUTE_RIVER_NE,
|
||||
mCoBG_ATTRIBUTE_SAND,
|
||||
mCoBG_ATTRIBUTE_WOOD,
|
||||
mCoBG_ATTRIBUTE_SEA,
|
||||
// ...
|
||||
/* TODO: finish */
|
||||
mCoBG_ATTRIBUTE_GRASS0,
|
||||
mCoBG_ATTRIBUTE_GRASS1,
|
||||
mCoBG_ATTRIBUTE_GRASS2,
|
||||
mCoBG_ATTRIBUTE_GRASS3,
|
||||
mCoBG_ATTRIBUTE_SOIL0,
|
||||
mCoBG_ATTRIBUTE_SOIL1,
|
||||
mCoBG_ATTRIBUTE_SOIL2,
|
||||
mCoBG_ATTRIBUTE_STONE,
|
||||
mCoBG_ATTRIBUTE_FLOOR,
|
||||
mCoBG_ATTRIBUTE_BUSH,
|
||||
mCoBG_ATTRIBUTE_HOLE,
|
||||
mCoBG_ATTRIBUTE_WAVE,
|
||||
mCoBG_ATTRIBUTE_WATER,
|
||||
mCoBG_ATTRIBUTE_WATERFALL,
|
||||
mCoBG_ATTRIBUTE_RIVER_N,
|
||||
mCoBG_ATTRIBUTE_RIVER_NW,
|
||||
mCoBG_ATTRIBUTE_RIVER_W,
|
||||
mCoBG_ATTRIBUTE_RIVER_SW,
|
||||
mCoBG_ATTRIBUTE_RIVER_S,
|
||||
mCoBG_ATTRIBUTE_RIVER_SE,
|
||||
mCoBG_ATTRIBUTE_RIVER_E,
|
||||
mCoBG_ATTRIBUTE_RIVER_NE,
|
||||
mCoBG_ATTRIBUTE_SAND,
|
||||
mCoBG_ATTRIBUTE_WOOD,
|
||||
mCoBG_ATTRIBUTE_SEA,
|
||||
// ...
|
||||
|
||||
mCoBG_ATTRIBUTE_NONE = 100
|
||||
};
|
||||
|
||||
enum {
|
||||
mCoBG_PLANT0 = 0, /* Stay a sapling */
|
||||
mCoBG_PLANT1 = 1, /* Grow until the first stage of growth */
|
||||
mCoBG_PLANT2 = 2, /* Grow until the second stage of growth */
|
||||
mCoBG_PLANT3 = 3, /* Grow until the third stage of growth */
|
||||
mCoBG_PLANT4 = 4, /* Fully grow */
|
||||
mCoBG_PLANT0 = 0, /* Stay a sapling */
|
||||
mCoBG_PLANT1 = 1, /* Grow until the first stage of growth */
|
||||
mCoBG_PLANT2 = 2, /* Grow until the second stage of growth */
|
||||
mCoBG_PLANT3 = 3, /* Grow until the third stage of growth */
|
||||
mCoBG_PLANT4 = 4, /* Fully grow */
|
||||
|
||||
mCoBG_KILL_PLANT = 7 /* No growth, all plants die on this unit */
|
||||
mCoBG_KILL_PLANT = 7 /* No growth, all plants die on this unit */
|
||||
};
|
||||
|
||||
enum {
|
||||
mCoBG_DIRECT_N,
|
||||
mCoBG_DIRECT_W,
|
||||
mCoBG_DIRECT_S,
|
||||
mCoBG_DIRECT_E,
|
||||
mCoBG_DIRECT_NW,
|
||||
mCoBG_DIRECT_NE,
|
||||
mCoBG_DIRECT_SE,
|
||||
mCoBG_DIRECT_SW,
|
||||
mCoBG_DIRECT_N,
|
||||
mCoBG_DIRECT_W,
|
||||
mCoBG_DIRECT_S,
|
||||
mCoBG_DIRECT_E,
|
||||
mCoBG_DIRECT_NW,
|
||||
mCoBG_DIRECT_NE,
|
||||
mCoBG_DIRECT_SE,
|
||||
mCoBG_DIRECT_SW,
|
||||
|
||||
mCoBG_DIRECT_NUM
|
||||
mCoBG_DIRECT_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mCoBG_AREA_N,
|
||||
mCoBG_AREA_W,
|
||||
mCoBG_AREA_S,
|
||||
mCoBG_AREA_E,
|
||||
mCoBG_AREA_N,
|
||||
mCoBG_AREA_W,
|
||||
mCoBG_AREA_S,
|
||||
mCoBG_AREA_E,
|
||||
|
||||
mCoBG_AREA_NUM
|
||||
mCoBG_AREA_NUM
|
||||
};
|
||||
|
||||
/* sizeof(mCoBG_CollisionData_c) == 4*/
|
||||
typedef struct collision_bg_data_s {
|
||||
/* 1------- -------- -------- -------- */ u32 shape:1; /* collision shape */
|
||||
/* -11111-- -------- -------- -------- */ u32 center:5;
|
||||
/* ------11 111----- -------- -------- */ u32 top_left:5;
|
||||
/* -------- ---11111 -------- -------- */ u32 bot_left:5;
|
||||
/* -------- -------- 11111--- -------- */ u32 top_right:5;
|
||||
/* -------- -------- -----111 11------ */ u32 bot_right:5;
|
||||
/* -------- -------- -------- --111111 */ u32 unit_attribute:6; /* background_attribute type */
|
||||
/* 1------- -------- -------- -------- */ u32 shape : 1; /* collision shape */
|
||||
/* -11111-- -------- -------- -------- */ u32 center : 5;
|
||||
/* ------11 111----- -------- -------- */ u32 top_left : 5;
|
||||
/* -------- ---11111 -------- -------- */ u32 bot_left : 5;
|
||||
/* -------- -------- 11111--- -------- */ u32 top_right : 5;
|
||||
/* -------- -------- -----111 11------ */ u32 bot_right : 5;
|
||||
/* -------- -------- -------- --111111 */ u32 unit_attribute : 6; /* background_attribute type */
|
||||
} mCoBG_CollisionData_c;
|
||||
|
||||
/* sizeof (mCoBG_Collision_u) == 4 */
|
||||
typedef union collision_bg_u {
|
||||
mCoBG_CollisionData_c data;
|
||||
u32 raw;
|
||||
mCoBG_CollisionData_c data;
|
||||
u32 raw;
|
||||
} mCoBG_Collision_u;
|
||||
|
||||
typedef struct collision_unit_info_s {
|
||||
mCoBG_Collision_u* collision;
|
||||
f32 leftUp_offset;
|
||||
f32 leftDown_offset;
|
||||
f32 rightDown_offset;
|
||||
f32 rightUp_offset;
|
||||
f32 base_height;
|
||||
f32 pos_x;
|
||||
f32 pos_z;
|
||||
int ut_x;
|
||||
int ut_z;
|
||||
int shape;
|
||||
u8 attribute;
|
||||
mActor_name_t item;
|
||||
mCoBG_Collision_u* collision;
|
||||
f32 leftUp_offset;
|
||||
f32 leftDown_offset;
|
||||
f32 rightDown_offset;
|
||||
f32 rightUp_offset;
|
||||
f32 base_height;
|
||||
f32 pos_x;
|
||||
f32 pos_z;
|
||||
int ut_x;
|
||||
int ut_z;
|
||||
int shape;
|
||||
u8 attribute;
|
||||
mActor_name_t item;
|
||||
} mCoBG_UnitInfo_c;
|
||||
|
||||
#define mCoBG_HIT_WALL (1 << 0) /* in contact with *any* wall */
|
||||
#define mCoBG_HIT_WALL (1 << 0) /* in contact with *any* wall */
|
||||
#define mCoBG_HIT_WALL_FRONT (1 << 1) /* in contact with wall to the front */
|
||||
#define mCoBG_HIT_WALL_RIGHT (1 << 2) /* in contact with wall to the right */
|
||||
#define mCoBG_HIT_WALL_LEFT (1 << 3) /* in contact with wall to the left */
|
||||
#define mCoBG_HIT_WALL_BACK (1 << 4) /* in contact with wall to the back */
|
||||
#define mCoBG_HIT_WALL_LEFT (1 << 3) /* in contact with wall to the left */
|
||||
#define mCoBG_HIT_WALL_BACK (1 << 4) /* in contact with wall to the back */
|
||||
|
||||
typedef struct collision_bg_check_result_s {
|
||||
u32 on_ground:1;
|
||||
u32 hit_attribute_wall:5;
|
||||
u32 hit_wall:5;
|
||||
u32 hit_wall_count:3;
|
||||
u32 unk_flag0:1;
|
||||
u32 unit_attribute:6;
|
||||
u32 is_on_move_bg_obj:1;
|
||||
u32 is_in_water:1;
|
||||
u32 unk_flag1:1;
|
||||
u32 unk_flag2:1;
|
||||
u32 unk_flag3:1;
|
||||
u32 unk_flag4:1;
|
||||
u32 unk_flag5:1;
|
||||
u32 unk_flag6:4;
|
||||
u32 on_ground : 1;
|
||||
u32 hit_attribute_wall : 5;
|
||||
u32 hit_wall : 5;
|
||||
u32 hit_wall_count : 3;
|
||||
u32 unk_flag0 : 1;
|
||||
u32 unit_attribute : 6;
|
||||
u32 is_on_move_bg_obj : 1;
|
||||
u32 is_in_water : 1;
|
||||
u32 unk_flag1 : 1;
|
||||
u32 unk_flag2 : 1;
|
||||
u32 unk_flag3 : 1;
|
||||
u32 unk_flag4 : 1;
|
||||
u32 unk_flag5 : 1;
|
||||
u32 unk_flag6 : 4;
|
||||
} mCoBG_CheckResult_c;
|
||||
|
||||
typedef struct wall_info_s {
|
||||
s16 angleY;
|
||||
s16 type;
|
||||
s16 angleY;
|
||||
s16 type;
|
||||
} mCoBG_WallInfo_c;
|
||||
|
||||
typedef struct collision_bg_check_s {
|
||||
mCoBG_Collision_u collision_units[5];
|
||||
mCoBG_CheckResult_c result;
|
||||
f32 wall_top_y;
|
||||
f32 wall_bottom_y;
|
||||
f32 ground_y;
|
||||
mCoBG_WallInfo_c wall_info[2];
|
||||
s16 in_front_wall_angle_y;
|
||||
mCoBG_Collision_u collision_units[5];
|
||||
mCoBG_CheckResult_c result;
|
||||
f32 wall_top_y;
|
||||
f32 wall_bottom_y;
|
||||
f32 ground_y;
|
||||
mCoBG_WallInfo_c wall_info[2];
|
||||
s16 in_front_wall_angle_y;
|
||||
} mCoBG_Check_c;
|
||||
|
||||
typedef struct bg_side_contact_s {
|
||||
s16 name;
|
||||
s16 angle;
|
||||
s16 name;
|
||||
s16 angle;
|
||||
} mCoBG_side_contact_c;
|
||||
|
||||
typedef struct bg_contact_s {
|
||||
mCoBG_side_contact_c side_contact[5];
|
||||
int side_count;
|
||||
s16 on_contact_names[5];
|
||||
int on_count;
|
||||
mCoBG_side_contact_c side_contact[5];
|
||||
int side_count;
|
||||
s16 on_contact_names[5];
|
||||
int on_count;
|
||||
} mCoBG_bg_contact_c;
|
||||
|
||||
typedef struct bg_size_s {
|
||||
f32 right_size; // x | *->
|
||||
f32 left_size; // x | <-*
|
||||
f32 up_size; // z | ^
|
||||
f32 down_size; // z | v
|
||||
f32 right_size; // x | *->
|
||||
f32 left_size; // x | <-*
|
||||
f32 up_size; // z | ^
|
||||
f32 down_size; // z | v
|
||||
} mCoBG_bg_size_c;
|
||||
|
||||
typedef struct bg_register_s {
|
||||
xyz_t* wpos;
|
||||
xyz_t* last_wpos;
|
||||
s16* angle_y;
|
||||
mCoBG_bg_contact_c* contact;
|
||||
mCoBG_bg_size_c* bg_size;
|
||||
xyz_t* base_ofs;
|
||||
f32 height;
|
||||
u32 attribute;
|
||||
f32 active_dist;
|
||||
f32* scale_percent;
|
||||
xyz_t* wpos;
|
||||
xyz_t* last_wpos;
|
||||
s16* angle_y;
|
||||
mCoBG_bg_contact_c* contact;
|
||||
mCoBG_bg_size_c* bg_size;
|
||||
xyz_t* base_ofs;
|
||||
f32 height;
|
||||
u32 attribute;
|
||||
f32 active_dist;
|
||||
f32* scale_percent;
|
||||
} mCoBG_bg_regist_c;
|
||||
|
||||
typedef struct collision_offset_table_s {
|
||||
u8 unit_attribute;
|
||||
s8 centerRight_offset;
|
||||
s8 leftUp_offset;
|
||||
s8 leftDown_offset;
|
||||
s8 rightDown_offset;
|
||||
s8 rightUp_offset;
|
||||
s8 shape;
|
||||
u8 unit_attribute;
|
||||
s8 centerRight_offset;
|
||||
s8 leftUp_offset;
|
||||
s8 leftDown_offset;
|
||||
s8 rightDown_offset;
|
||||
s8 rightUp_offset;
|
||||
s8 shape;
|
||||
} mCoBG_OffsetTable_c;
|
||||
|
||||
typedef struct collision_actor_info_s {
|
||||
mActor_name_t name_id;
|
||||
u8 _02;
|
||||
u8 on_ground;
|
||||
u8 _04;
|
||||
u8 in_water;
|
||||
u8 _06[2]; // alignment?
|
||||
mCoBG_CheckResult_c* check_res_p;
|
||||
xz_t speed_xz0;
|
||||
xz_t speed_xz1;
|
||||
xyz_t center_pos;
|
||||
xyz_t old_center_pos;
|
||||
xyz_t rev_pos;
|
||||
u8 _40[4];
|
||||
f32 _44;
|
||||
f32 _48;
|
||||
f32 _4C;
|
||||
u8 _50[0x20];
|
||||
mActor_name_t name_id;
|
||||
u8 _02;
|
||||
u8 on_ground;
|
||||
u8 _04;
|
||||
u8 in_water;
|
||||
u8 _06[2]; // alignment?
|
||||
mCoBG_CheckResult_c* check_res_p;
|
||||
xz_t speed_xz0;
|
||||
xz_t speed_xz1;
|
||||
xyz_t center_pos;
|
||||
xyz_t old_center_pos;
|
||||
xyz_t rev_pos;
|
||||
u8 _40[4];
|
||||
f32 _44;
|
||||
f32 _48;
|
||||
f32 _4C;
|
||||
u8 _50[0x20];
|
||||
} mCoBG_ActorInf_c;
|
||||
|
||||
extern u32 mCoBG_Wpos2BgAttribute_Original(xyz_t wpos);
|
||||
@@ -235,15 +237,17 @@ extern int mCoBG_CheckHole_OrgAttr(u32 attribute);
|
||||
extern f32 mCoBG_GetBgY_OnlyCenter_FromWpos(xyz_t wpos, f32 dist);
|
||||
extern f32 mCoBG_GetBgY_OnlyCenter_FromWpos2(xyz_t wpos, f32 foot_dist);
|
||||
extern int mCoBG_Attribute2CheckPlant(u32 attribute, const xyz_t* wpos);
|
||||
extern void mCoBG_BgCheckControll(xyz_t* reverse_pos, ACTOR* actor, f32 check_range, f32 offset_y, s16 wall_attr_check, s16 no_reverse, s16 check_type);
|
||||
extern void mCoBG_BgCheckControll(xyz_t* reverse_pos, ACTOR* actor, f32 check_range, f32 offset_y, s16 wall_attr_check,
|
||||
s16 no_reverse, s16 check_type);
|
||||
extern int mCoBG_Height2GetLayer(f32 height);
|
||||
extern void mCoBG_SetPlussOffset(xyz_t wpos, s16 offset, s16 new_attrib);
|
||||
extern int mCoBG_GetLayer(const xyz_t* wpos);
|
||||
extern int mCoBG_GetLayer(const xyz_t* wpos);
|
||||
extern int mCoBG_BnumUnum2HoleNumber(int block_x, int block_z, int ut_x, int ut_z);
|
||||
extern u32 mCoBG_UtNum2BgAttr(int ut_x, int ut_z);
|
||||
extern f32 mCoBG_UtNum2UtCenterY(int ut_x, int ut_z);
|
||||
extern int mCoBG_CheckCliffAttr(u32 attribute);
|
||||
extern void mCoBG_SetPluss5PointOffset_file(xyz_t pos, mCoBG_OffsetTable_c offsetptr, const char* file, int line);
|
||||
#define mCoBG_SetPluss5PointOffset(pos, offsetptr) mCoBG_SetPluss5PointOffset_file(pos, offsetptr, __FILE__, __LINE__);
|
||||
extern int mCoBG_Change2PoorAttr(mCoBG_Collision_u* col);
|
||||
extern int mCoBG_CheckHole(xyz_t wpos);
|
||||
extern int mCoBG_CheckSkySwing(xyz_t wpos);
|
||||
|
||||
@@ -209,8 +209,7 @@ typedef struct common_data_s {
|
||||
/* 0x0264E4 */ mNpc_NpcList_c island_npclist[1]; // TODO: define for island npc count
|
||||
/* 0x02651C */ mActor_name_t house_owner_name;
|
||||
/* 0x02651E */ mActor_name_t last_field_id;
|
||||
/* 0x026520 */ u8
|
||||
in_initial_block; /* when TRUE, the player is in the acre which they exited a building. FALSE otherwise. */
|
||||
/* 0x026520 */ u8 in_initial_block; /* when TRUE, the player is in acre they exited a building. FALSE otherwise. */
|
||||
/* 0x026521 */ u8 submenu_disabled; /* when set, submenus cannot be accessed from start button */
|
||||
/* 0x026522 */ u8 sunlight_flag;
|
||||
/* 0x026523 */ u8 train_flag;
|
||||
|
||||
@@ -2699,6 +2699,10 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define NPC_END (NPC_START + 236)
|
||||
|
||||
#define DUMMY_START 0xF000
|
||||
#define DUMMY_HOUSE0 0xF0F3
|
||||
#define DUMMY_HOUSE1 0xF0F4
|
||||
#define DUMMY_HOUSE2 0xF0F5
|
||||
#define DUMMY_HOUSE3 0xF0F6
|
||||
#define DUMMY_HANIWA0 0xF0FB
|
||||
#define DUMMY_HANIWA1 (DUMMY_HANIWA0 + 1)
|
||||
#define DUMMY_HANIWA2 (DUMMY_HANIWA1 + 1)
|
||||
|
||||
@@ -27,7 +27,7 @@ extern void mPlib_change_player_cloth_info_lv2(Private_c* priv, mActor_name_t cl
|
||||
extern int mPlib_Get_address_able_display();
|
||||
extern int mPlib_get_player_actor_main_index(GAME* game);
|
||||
extern int mPlib_check_player_actor_main_index_AllWade(GAME_PLAY* play);
|
||||
extern int mPlib_request_main_demo_wait_type1(GAME_PLAY* play, int param_2, void* param_3);
|
||||
extern int mPlib_request_main_demo_wait_type1(GAME* game, int param_2, void* param_3);
|
||||
extern int mPlib_request_main_talk_type1(GAME_PLAY* play, ACTOR* other_actor, int turn, int flag);
|
||||
extern int mPlib_request_main_talk_end_type1(GAME_PLAY* play, int return_demo_wait, int return_get_golden_axe_demo);
|
||||
extern int mPlib_request_main_door_type1(GAME* game, const xyz_t* pos, s16 angle_y, int door_type, void* door_label);
|
||||
@@ -45,7 +45,8 @@ extern int mPlib_Check_able_force_speak_label(GAME* game, ACTOR* label);
|
||||
extern int mPlib_able_submenu_type1(GAME* game);
|
||||
extern void mPlib_request_main_demo_wait_from_submenu(ACTOR* force_speak_label);
|
||||
extern void mPlib_Load_PlayerTexAndPallet(void* tex_p, void* pal_p, int idx);
|
||||
extern void mPlib_request_main_give_from_submenu(mActor_name_t disp_item, int submenu_ovl, int present_flag, int counter_flag);
|
||||
extern void mPlib_request_main_give_from_submenu(mActor_name_t disp_item, int submenu_ovl, int present_flag,
|
||||
int counter_flag);
|
||||
extern int mPlib_Check_tree_shaken_big(const xyz_t* pos);
|
||||
extern int mPlib_Check_tree_shaken_little(const xyz_t* pos);
|
||||
extern int mPlib_request_main_recieve_wait_type1(GAME* game, mActor_name_t item, int counter_flag);
|
||||
@@ -56,6 +57,8 @@ extern int mPlib_Get_end_player_demo_walk();
|
||||
extern int mPlib_request_main_demo_geton_boat_type1(f32 goal_x, f32 goal_z, s16 angleY);
|
||||
extern int mPlib_request_main_demo_getoff_boat_standup_type1(const xyz_t* pos, s16 angleY);
|
||||
extern int mPlib_check_player_actor_main_index_RecieveMove(GAME* game);
|
||||
extern int mPlib_check_label_player_demo_wait(GAME* game, void* label);
|
||||
extern int mPlib_check_player_outdoor_start(GAME* game);
|
||||
|
||||
extern mPlayer_change_data_from_submenu_c* mPlib_Get_change_data_from_submenu_p();
|
||||
|
||||
|
||||
+92
-80
@@ -13,125 +13,138 @@ extern "C" {
|
||||
|
||||
#define mSc_ARENA_SIZE 0xA000
|
||||
|
||||
enum {
|
||||
mSc_DIRECT_SOUTH,
|
||||
mSc_DIRECT_SOUTH_EAST,
|
||||
mSc_DIRECT_EAST,
|
||||
mSc_DIRECT_NORTH_EAST,
|
||||
mSc_DIRECT_NORTH,
|
||||
mSc_DIRECT_NORTH_WEST,
|
||||
mSc_DIRECT_WEST,
|
||||
mSc_DIRECT_SOUTH_WEST,
|
||||
|
||||
mSc_DIRECT_NUM
|
||||
};
|
||||
|
||||
typedef struct door_data_s {
|
||||
int next_scene_id;
|
||||
u8 exit_orientation;
|
||||
u8 exit_type; // 0 = normal, 1 = restart game?
|
||||
u16 extra_data;
|
||||
s_xyz exit_position;
|
||||
mActor_name_t door_actor_name;
|
||||
u8 wipe_type;
|
||||
u8 pad[3]; // possibly necessary due to struct copy
|
||||
int next_scene_id;
|
||||
u8 exit_orientation;
|
||||
u8 exit_type; // 0 = normal, 1 = restart game?
|
||||
u16 extra_data;
|
||||
s_xyz exit_position;
|
||||
mActor_name_t door_actor_name;
|
||||
u8 wipe_type;
|
||||
u8 pad[3]; // possibly necessary due to struct copy
|
||||
} Door_data_c;
|
||||
|
||||
#define mSc_OBJECT_BANK_NUM 70
|
||||
|
||||
typedef struct object_bank_s {
|
||||
s16 bank_id;
|
||||
char* ram_start;
|
||||
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 part_id;
|
||||
u8 state;
|
||||
s16 bank_id;
|
||||
char* ram_start;
|
||||
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 part_id;
|
||||
u8 state;
|
||||
} Object_Bank_c;
|
||||
|
||||
typedef struct object_exchange_s {
|
||||
Object_Bank_c banks[mSc_OBJECT_BANK_NUM];
|
||||
int bank_idx;
|
||||
int keep_id;
|
||||
int exchange_id;
|
||||
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_Bank_c banks[mSc_OBJECT_BANK_NUM];
|
||||
int bank_idx;
|
||||
int keep_id;
|
||||
int exchange_id;
|
||||
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;
|
||||
|
||||
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,
|
||||
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,
|
||||
|
||||
mSc_SCENE_DATA_TYPE_NUM
|
||||
mSc_SCENE_DATA_TYPE_NUM
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 num_actors;
|
||||
Actor_data* data_p;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
u8 type;
|
||||
u8 arrange_ftr_num;
|
||||
} Scene_Word_Data_ArrangeFurniture_ct_c;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
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_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;
|
||||
u8 num_doors;
|
||||
Door_data_c* door_data_p;
|
||||
} Door_info_c;
|
||||
|
||||
extern Scene_Word_u test01_info[];
|
||||
@@ -202,7 +215,6 @@ 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
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user