mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-22 22:24:16 -04:00
Finish & link ac_my_room
This commit is contained in:
@@ -459,6 +459,11 @@ ac_my_indoor.c:
|
||||
.text: [0x8046EE38, 0x80470288]
|
||||
.rodata: [0x80644A88, 0x80644A98]
|
||||
.data: [0x806870F0, 0x806873E8]
|
||||
ac_my_room.c:
|
||||
.text: [0x80470288, 0x80482D9C]
|
||||
.rodata: [0x80644A98, 0x80644C28]
|
||||
.data: [0x806873E8, 0x8068A378]
|
||||
.bss: [0x812FBEB0, 0x812FC5E0]
|
||||
ac_psnowman.c:
|
||||
.text: [0x80484098, 0x80484694]
|
||||
.rodata: [0x80644C30, 0x80644C60]
|
||||
|
||||
@@ -13,6 +13,7 @@ extern "C" {
|
||||
|
||||
#define SQRT2 (1.4142135623730950488016887242097)
|
||||
#define F_SQRT2 ((f32)SQRT2)
|
||||
#define F_SQRT2_DIV2 (0.707106f)
|
||||
|
||||
#define SQRTF(f) (__frsqrte(f))
|
||||
|
||||
|
||||
+28
-4
@@ -66,6 +66,7 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
aFTR_INTERACTION_NONE = 0,
|
||||
aFTR_INTERACTION_STORAGE_DRAWERS = 1, // dressers
|
||||
aFTR_INTERACTION_STORAGE_WARDROBE = 2, // double doors
|
||||
aFTR_INTERACTION_STORAGE_CLOSET = 4, // single door
|
||||
@@ -122,6 +123,21 @@ enum {
|
||||
aFTR_CONTACT_ACTION_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aFTR_CONTACT_ACTION_TYPE_CHAIR1,
|
||||
aFTR_CONTACT_ACTION_TYPE_CHAIR4,
|
||||
aFTR_CONTACT_ACTION_TYPE_SOFA,
|
||||
aFTR_CONTACT_ACTION_TYPE_BED_SINGLE,
|
||||
aFTR_CONTACT_ACTION_TYPE_BED_DOUBLE,
|
||||
|
||||
aFTR_CONTACT_ACTION_TYPE_NUM
|
||||
};
|
||||
|
||||
#define aFTR_CHK_CONTACT_ACTION(cnt, action) (((cnt) >> (aFTR_CONTACT_ACTION_TYPE_##action)) & 1)
|
||||
#define aFTR_CHK_CHAIR(cnt) \
|
||||
(aFTR_CHK_CONTACT_ACTION(cnt, CHAIR1) || aFTR_CHK_CONTACT_ACTION(cnt, CHAIR4) || aFTR_CHK_CONTACT_ACTION(cnt, SOFA))
|
||||
#define aFTR_CHK_BED(cnt) (aFTR_CHK_CONTACT_ACTION(cnt, BED_SINGLE) || aFTR_CHK_CONTACT_ACTION(cnt, BED_DOUBLE))
|
||||
|
||||
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) */
|
||||
@@ -130,6 +146,14 @@ enum {
|
||||
aFTR_SET_TYPE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aFTR_KANKYO_MAP_NONE,
|
||||
aFTR_KANKYO_MAP_OPA,
|
||||
aFTR_KANKYO_MAP_XLU,
|
||||
|
||||
aFTR_KANKYO_MAP_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*);
|
||||
@@ -190,10 +214,10 @@ struct furniture_actor_s {
|
||||
xyz_t position;
|
||||
xyz_t last_position;
|
||||
xyz_t target_position;
|
||||
int target_distance; /* distance to target position */
|
||||
f32 player_distance; /* distance to the player */
|
||||
f32 angle_y; /* current Y angle */
|
||||
f32 angle_y_target; /* goal Y angle */
|
||||
int target_direction; /* direction to target position */
|
||||
f32 player_distance; /* distance to the player */
|
||||
f32 angle_y; /* current Y angle */
|
||||
f32 angle_y_target; /* goal Y angle */
|
||||
s16 state;
|
||||
u8 shape_type; /* current size & shape (rotation) */
|
||||
u8 original_shape_type; /* original size & shape (rotation) */
|
||||
|
||||
@@ -149,7 +149,7 @@ typedef struct room_pickup_s {
|
||||
int picking_up_flag;
|
||||
s16 layer;
|
||||
s16 dust_effect_timer;
|
||||
u16 icon;
|
||||
s16 icon;
|
||||
} aMR_pickup_info_c;
|
||||
|
||||
typedef struct room_rsv_ftr_s {
|
||||
@@ -291,6 +291,11 @@ extern FTR_ACTOR* aMR_GetParentFactor(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor
|
||||
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);
|
||||
extern void aMR_SaveWaltzTempo2(void);
|
||||
extern u8 aMR_GetAlphaEdge(u16 ftr_name);
|
||||
extern int aMR_DrawDolphinMode(u16 ftr_name);
|
||||
extern Gfx* aMR_IconNo2Gfx1(int icon_no);
|
||||
extern Gfx* aMR_IconNo2Gfx2(int icon_no);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ extern void sAdo_OngenTrgStart(u16 id, const xyz_t* pos);
|
||||
extern void sAdo_SetOutMode(u8 mode);
|
||||
extern void sAdo_SetVoiceMode(u8 mode);
|
||||
|
||||
extern void sAdo_FloorTrgStart(u16 id, const xyz_t* pos);
|
||||
extern void sAdo_FloorTrgStart(u8 id, const xyz_t* pos);
|
||||
|
||||
extern void sAdo_RhythmStart(u32 id, s8 type, s8 wait);
|
||||
extern void sAdo_RhythmStop(u32 id);
|
||||
|
||||
@@ -60,6 +60,9 @@ typedef enum audio_sound_effects {
|
||||
NA_SE_TOOL_BROKEN2,
|
||||
NA_SE_TOOL_BROKEN3,
|
||||
|
||||
NA_SE_STONECOIN_ROLL = 0x7D,
|
||||
NA_SE_STONECOIN_DRAG = 0x7E,
|
||||
|
||||
NA_SE_ROD_STROKE = 0x109,
|
||||
NA_SE_ROD_BACK,
|
||||
|
||||
@@ -86,6 +89,7 @@ typedef enum audio_sound_effects {
|
||||
|
||||
NA_SE_166 = 0x166,
|
||||
NA_SE_UCHIWA = 0x167,
|
||||
NA_SE_LAWNMOWER = 0x177,
|
||||
|
||||
NA_SE_SCOOP_SHIGEMI = 0x401,
|
||||
|
||||
@@ -98,6 +102,8 @@ typedef enum audio_sound_effects {
|
||||
NA_SE_BED_NEGAERI,
|
||||
NA_SE_BED_OUT,
|
||||
|
||||
NA_SE_ROTATE = 0x41A,
|
||||
|
||||
NA_SE_SOFT_CHAIR_SIT = 0x41F,
|
||||
NA_SE_HARD_CHAIR_SIT,
|
||||
NA_SE_BUBU_CHAIR_SIT,
|
||||
|
||||
@@ -29,7 +29,7 @@ extern void Na_OngenPos(u32, u8, u16, f32);
|
||||
extern void Na_OngenTrgStart(u16, u16, f32);
|
||||
extern void Na_SetOutMode(u8);
|
||||
extern void Na_SetVoiceMode(u8);
|
||||
extern void Na_FloorTrgStart(u16, u16, f32);
|
||||
extern void Na_FloorTrgStart(u8, u16, f32);
|
||||
extern void Na_Pause(u8);
|
||||
extern void Na_RhythmPos(u32, u8, u16, f32);
|
||||
extern void Na_SpecChange(int);
|
||||
|
||||
@@ -1187,16 +1187,9 @@ extern void Actor_get_overlay_area(ACTOR_DLFTBL* dlftbl, int unused, size_t allo
|
||||
extern void Actor_init_actor_class(ACTOR* actor, ACTOR_PROFILE* profile, ACTOR_DLFTBL* dlftbl, GAME_PLAY* play,
|
||||
int bank_idx, f32 x, f32 y, f32 z, s16 rot_x, s16 rot_y, s16 rot_z, s8 block_x,
|
||||
s8 block_z, s16 move_actor_list_idx, mActor_name_t name_id, s16 arg);
|
||||
#ifndef MUST_MATCH
|
||||
extern ACTOR* Actor_info_make_actor(Actor_info* actor_info, GAME* game, s16 profile_no, f32 x, f32 y, f32 z, s16 rot_x,
|
||||
s16 rot_y, s16 rot_z, s8 block_x, s8 block_z, s16 move_actor_list_idx,
|
||||
mActor_name_t name_id, s16 arg, s8 npc_info_idx, int data_bank_idx);
|
||||
#else
|
||||
extern asm ACTOR* Actor_info_make_actor(Actor_info* actor_info, GAME* game, s16 profile_no, f32 x, f32 y, f32 z,
|
||||
s16 rot_x, s16 rot_y, s16 rot_z, s8 block_x, s8 block_z,
|
||||
s16 move_actor_list_idx, mActor_name_t name_id, s16 arg, s8 npc_info_idx,
|
||||
int data_bank_idx);
|
||||
#endif
|
||||
extern ACTOR* Actor_info_make_child_actor(Actor_info* actor_info, ACTOR* parent_actor, GAME* game, s16 profile, f32 x,
|
||||
f32 y, f32 z, s16 rot_x, s16 rot_y, s16 rot_z, s16 move_actor_list_idx,
|
||||
mActor_name_t name_id, s16 arg, int data_bank_idx);
|
||||
|
||||
+106
-109
@@ -15,8 +15,8 @@ extern "C" {
|
||||
#define mFI_UNIT_BASE_SIZE 40
|
||||
#define mFI_UNIT_BASE_SIZE_F ((f32)mFI_UNIT_BASE_SIZE)
|
||||
|
||||
#define mFI_UT_WORLDSIZE_X 40
|
||||
#define mFI_UT_WORLDSIZE_Z 40
|
||||
#define mFI_UT_WORLDSIZE_X mFI_UNIT_BASE_SIZE
|
||||
#define mFI_UT_WORLDSIZE_Z mFI_UNIT_BASE_SIZE
|
||||
|
||||
#define mFI_UT_WORLDSIZE_X_F ((f32)mFI_UT_WORLDSIZE_X)
|
||||
#define mFI_UT_WORLDSIZE_Z_F ((f32)mFI_UT_WORLDSIZE_Z)
|
||||
@@ -30,6 +30,8 @@ extern "C" {
|
||||
#define mFI_BK_WORLDSIZE_X_F (mFI_UT_WORLDSIZE_X_F * UT_X_NUM)
|
||||
#define mFI_BK_WORLDSIZE_Z_F (mFI_UT_WORLDSIZE_Z_F * UT_Z_NUM)
|
||||
|
||||
#define mFI_POS2UT(pos) ((int)((pos) / mFI_UNIT_BASE_SIZE_F))
|
||||
|
||||
#define mFI_ROW_TO_CHARSTR(row) ((row) + 'A')
|
||||
#define mFI_COL_TO_CHARSTR(col) ((col) + '0')
|
||||
|
||||
@@ -39,24 +41,24 @@ extern "C" {
|
||||
#define mFI_MAX_SHELLS_PER_BLOCK 4
|
||||
|
||||
enum field_type {
|
||||
mFI_FIELDTYPE_FG,
|
||||
mFI_FIELDTYPE_1,
|
||||
mFI_FIELDTYPE_2,
|
||||
mFI_FIELDTYPE_ROOM,
|
||||
mFI_FIELDTYPE_NPC_ROOM,
|
||||
mFI_FIELDTYPE_DEMO,
|
||||
mFI_FIELDTYPE_PLAYER_ROOM,
|
||||
mFI_FIELDTYPE_FG,
|
||||
mFI_FIELDTYPE_1,
|
||||
mFI_FIELDTYPE_2,
|
||||
mFI_FIELDTYPE_ROOM,
|
||||
mFI_FIELDTYPE_NPC_ROOM,
|
||||
mFI_FIELDTYPE_DEMO,
|
||||
mFI_FIELDTYPE_PLAYER_ROOM,
|
||||
|
||||
mFI_FIELDTYPE_NUM
|
||||
mFI_FIELDTYPE_NUM
|
||||
};
|
||||
|
||||
enum field_type2 {
|
||||
mFI_FIELDTYPE2_FG,
|
||||
mFI_FIELDTYPE2_PLAYER_ROOM,
|
||||
mFI_FIELDTYPE2_NPC_ROOM,
|
||||
mFI_FIELDTYPE2_ROOM,
|
||||
mFI_FIELDTYPE2_FG,
|
||||
mFI_FIELDTYPE2_PLAYER_ROOM,
|
||||
mFI_FIELDTYPE2_NPC_ROOM,
|
||||
mFI_FIELDTYPE2_ROOM,
|
||||
|
||||
mFI_FIELDTYPE2_NUM
|
||||
mFI_FIELDTYPE2_NUM
|
||||
};
|
||||
|
||||
#define mFI_TO_FIELD_ID(type, index) (((type) << 12) | (index))
|
||||
@@ -64,134 +66,126 @@ enum field_type2 {
|
||||
#define mFI_TYPE(type) ((type) << 12)
|
||||
|
||||
enum field_room {
|
||||
/* TODO: others */
|
||||
mFI_FIELD_FG = mFI_TO_FIELD_ID(mFI_FIELDTYPE_FG, 0),
|
||||
/* TODO: others */
|
||||
mFI_FIELD_FG = mFI_TO_FIELD_ID(mFI_FIELDTYPE_FG, 0),
|
||||
|
||||
mFI_FIELD_ROOM0 = mFI_TO_FIELD_ID(mFI_FIELDTYPE_ROOM, 0),
|
||||
mFI_FIELD_ROOM_SHOP0, /* 0x3001 */
|
||||
mFI_FIELD_ROOM_BROKER_SHOP, /* 0x3002 */
|
||||
mFI_FIELD_ROOM_POST_OFFICE, /* 0x3003 */
|
||||
mFI_FIELD_ROOM_POLICE_BOX, /* 0x3004 */
|
||||
mFI_FIELD_ROOM_BUGGY, /* 0x3005 */
|
||||
mFI_FIELD_ROOM_SHOP1, /* 0x3006 */
|
||||
mFI_FIELD_ROOM_SHOP2, /* 0x3007 */
|
||||
mFI_FIELD_ROOM_SHOP3_1, /* 0x3008 */
|
||||
mFI_FIELD_ROOM_SHOP3_2, /* 0x3009 */
|
||||
mFI_FIELD_ROOM_KAMAKURA, /* 0x300A */
|
||||
mFI_FIELD_ROOM_MUSEUM_ENTRANCE, /* 0x300B */
|
||||
mFI_FIELD_ROOM_MUSEUM_PAINTING, /* 0x300C */
|
||||
mFI_FIELD_ROOM_MUSEUM_FOSSIL, /* 0x300D */
|
||||
mFI_FIELD_ROOM_MUSEUM_INSECT, /* 0x300E */
|
||||
mFI_FIELD_ROOM_MUSEUM_FISH, /* 0x300F */
|
||||
mFI_FIELD_ROOM_NEEDLEWORK, /* 0x3010 */
|
||||
mFI_FIELD_ROOM_LIGHTHOUSE, /* 0x3011 */
|
||||
mFI_FIELD_ROOM_TENT, /* 0x3012 */
|
||||
mFI_FIELD_ROOM0 = mFI_TO_FIELD_ID(mFI_FIELDTYPE_ROOM, 0),
|
||||
mFI_FIELD_ROOM_SHOP0, /* 0x3001 */
|
||||
mFI_FIELD_ROOM_BROKER_SHOP, /* 0x3002 */
|
||||
mFI_FIELD_ROOM_POST_OFFICE, /* 0x3003 */
|
||||
mFI_FIELD_ROOM_POLICE_BOX, /* 0x3004 */
|
||||
mFI_FIELD_ROOM_BUGGY, /* 0x3005 */
|
||||
mFI_FIELD_ROOM_SHOP1, /* 0x3006 */
|
||||
mFI_FIELD_ROOM_SHOP2, /* 0x3007 */
|
||||
mFI_FIELD_ROOM_SHOP3_1, /* 0x3008 */
|
||||
mFI_FIELD_ROOM_SHOP3_2, /* 0x3009 */
|
||||
mFI_FIELD_ROOM_KAMAKURA, /* 0x300A */
|
||||
mFI_FIELD_ROOM_MUSEUM_ENTRANCE, /* 0x300B */
|
||||
mFI_FIELD_ROOM_MUSEUM_PAINTING, /* 0x300C */
|
||||
mFI_FIELD_ROOM_MUSEUM_FOSSIL, /* 0x300D */
|
||||
mFI_FIELD_ROOM_MUSEUM_INSECT, /* 0x300E */
|
||||
mFI_FIELD_ROOM_MUSEUM_FISH, /* 0x300F */
|
||||
mFI_FIELD_ROOM_NEEDLEWORK, /* 0x3010 */
|
||||
mFI_FIELD_ROOM_LIGHTHOUSE, /* 0x3011 */
|
||||
mFI_FIELD_ROOM_TENT, /* 0x3012 */
|
||||
|
||||
mFI_FIELD_NPCROOM0 = mFI_TO_FIELD_ID(mFI_FIELDTYPE_NPC_ROOM, 0),
|
||||
mFI_FIELD_NPCROOM_FIELD_TOOL_INSIDE,
|
||||
mFI_FIELD_NPCROOM0 = mFI_TO_FIELD_ID(mFI_FIELDTYPE_NPC_ROOM, 0),
|
||||
mFI_FIELD_NPCROOM_FIELD_TOOL_INSIDE,
|
||||
|
||||
mFI_FIELD_DEMO_STARTDEMO = mFI_TO_FIELD_ID(mFI_FIELDTYPE_DEMO, 0),
|
||||
mFI_FIELD_DEMO_STARTDEMO2,
|
||||
mFI_FIELD_DEMO_PLAYERSELECT,
|
||||
mFI_FIELD_DEMO_STARTDEMO3,
|
||||
mFI_FIELD_DEMO_STARTDEMO = mFI_TO_FIELD_ID(mFI_FIELDTYPE_DEMO, 0),
|
||||
mFI_FIELD_DEMO_STARTDEMO2,
|
||||
mFI_FIELD_DEMO_PLAYERSELECT,
|
||||
mFI_FIELD_DEMO_STARTDEMO3,
|
||||
|
||||
mFI_FIELD_PLAYER0_ROOM = mFI_TO_FIELD_ID(mFI_FIELDTYPE_PLAYER_ROOM, 0),
|
||||
mFI_FIELD_PLAYER1_ROOM,
|
||||
mFI_FIELD_PLAYER2_ROOM,
|
||||
mFI_FIELD_PLAYER3_ROOM,
|
||||
mFI_FIELD_PLAYER0_ROOM = mFI_TO_FIELD_ID(mFI_FIELDTYPE_PLAYER_ROOM, 0),
|
||||
mFI_FIELD_PLAYER1_ROOM,
|
||||
mFI_FIELD_PLAYER2_ROOM,
|
||||
mFI_FIELD_PLAYER3_ROOM,
|
||||
|
||||
/* TODO: others */
|
||||
/* TODO: others */
|
||||
};
|
||||
|
||||
#define mFI_GET_PLAYER_ROOM_NO(field_id) (((field_id)-mFI_FIELD_PLAYER0_ROOM) & 3)
|
||||
#define mFI_IS_PLAYER_ROOM(field_id) \
|
||||
((field_id) == mFI_FIELD_PLAYER0_ROOM || (field_id) == mFI_FIELD_PLAYER1_ROOM || \
|
||||
(field_id) == mFI_FIELD_PLAYER2_ROOM || (field_id) == mFI_FIELD_PLAYER3_ROOM)
|
||||
#define mFI_GET_PLAYER_ROOM_NO(field_id) (((field_id) - mFI_FIELD_PLAYER0_ROOM) & 3)
|
||||
#define mFI_IS_PLAYER_ROOM(field_id) \
|
||||
((field_id) == mFI_FIELD_PLAYER0_ROOM || (field_id) == mFI_FIELD_PLAYER1_ROOM || \
|
||||
(field_id) == mFI_FIELD_PLAYER2_ROOM || (field_id) == mFI_FIELD_PLAYER3_ROOM)
|
||||
|
||||
/* "wade" between acres (acre transition) */
|
||||
enum player_wade_state {
|
||||
mFI_WADE_NONE,
|
||||
mFI_WADE_START,
|
||||
mFI_WADE_INPROGRESS,
|
||||
mFI_WADE_END,
|
||||
mFI_WADE_ERROR,
|
||||
mFI_WADE_NONE,
|
||||
mFI_WADE_START,
|
||||
mFI_WADE_INPROGRESS,
|
||||
mFI_WADE_END,
|
||||
mFI_WADE_ERROR,
|
||||
|
||||
mFI_WADE_NUM
|
||||
mFI_WADE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mFI_DEPOSIT_ON,
|
||||
mFI_DEPOSIT_OFF,
|
||||
mFI_DEPOSIT_GET,
|
||||
mFI_DEPOSIT_ON,
|
||||
mFI_DEPOSIT_OFF,
|
||||
mFI_DEPOSIT_GET,
|
||||
|
||||
mFI_DEPOSIT_NUM
|
||||
mFI_DEPOSIT_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mFI_MOVEDIR_NONE,
|
||||
mFI_MOVEDIR_RIGHT,
|
||||
mFI_MOVEDIR_LEFT,
|
||||
mFI_MOVEDIR_UP,
|
||||
mFI_MOVEDIR_DOWN,
|
||||
mFI_MOVEDIR_NONE,
|
||||
mFI_MOVEDIR_RIGHT,
|
||||
mFI_MOVEDIR_LEFT,
|
||||
mFI_MOVEDIR_UP,
|
||||
mFI_MOVEDIR_DOWN,
|
||||
|
||||
mFI_MOVEDIR_NUM
|
||||
mFI_MOVEDIR_NUM
|
||||
};
|
||||
|
||||
/* Not sure about these other than the island one */
|
||||
enum { mFI_CLIMATE_0, mFI_CLIMATE_ISLAND, mFI_CLIMATE_2, mFI_CLIMATE_3, mFI_CLIMATE_4, mFI_CLIMATE_5, mFI_CLIMATE_NUM };
|
||||
|
||||
enum {
|
||||
mFI_CLIMATE_0,
|
||||
mFI_CLIMATE_ISLAND,
|
||||
mFI_CLIMATE_2,
|
||||
mFI_CLIMATE_3,
|
||||
mFI_CLIMATE_4,
|
||||
mFI_CLIMATE_5,
|
||||
mFI_CLIMATE_NUM
|
||||
mFI_DIGSTATUS_MISS,
|
||||
mFI_DIGSTATUS_CANCEL,
|
||||
mFI_DIGSTATUS_FILLIN,
|
||||
mFI_DIGSTATUS_DIG,
|
||||
mFI_DIGSTATUS_PUT_ITEM,
|
||||
mFI_DIGSTATUS_GET_ITEM,
|
||||
|
||||
mFI_DIGSTATUS_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mFI_DIGSTATUS_MISS,
|
||||
mFI_DIGSTATUS_CANCEL,
|
||||
mFI_DIGSTATUS_FILLIN,
|
||||
mFI_DIGSTATUS_DIG,
|
||||
mFI_DIGSTATUS_PUT_ITEM,
|
||||
mFI_DIGSTATUS_GET_ITEM,
|
||||
|
||||
mFI_DIGSTATUS_NUM
|
||||
};
|
||||
mFI_SET_STRUCTURE_SET,
|
||||
mFI_SET_STRUCTURE_REMOVE,
|
||||
|
||||
enum {
|
||||
mFI_SET_STRUCTURE_SET,
|
||||
mFI_SET_STRUCTURE_REMOVE,
|
||||
|
||||
mFI_SET_STRUCTURE_NUM
|
||||
mFI_SET_STRUCTURE_NUM
|
||||
};
|
||||
|
||||
/* sizeof(mFI_unit_c) == 0x14 */
|
||||
typedef struct location_info_s {
|
||||
/* 0x00 */ int block_x;
|
||||
/* 0x04 */ int block_z;
|
||||
/* 0x08 */ int unit_x;
|
||||
/* 0x0C */ int unit_z;
|
||||
/* 0x10 */ mActor_name_t* block_data;
|
||||
/* 0x00 */ int block_x;
|
||||
/* 0x04 */ int block_z;
|
||||
/* 0x08 */ int unit_x;
|
||||
/* 0x0C */ int unit_z;
|
||||
/* 0x10 */ mActor_name_t* block_data;
|
||||
} mFI_unit_c;
|
||||
|
||||
typedef struct block_table_s {
|
||||
s8 block_x;
|
||||
s8 block_z;
|
||||
s8 block_x;
|
||||
s8 block_z;
|
||||
|
||||
f32 pos_x;
|
||||
f32 pos_z;
|
||||
f32 pos_x;
|
||||
f32 pos_z;
|
||||
|
||||
mActor_name_t* items;
|
||||
mActor_name_t* items;
|
||||
} mFI_block_tbl_c;
|
||||
|
||||
typedef struct visible_block_item_info_s {
|
||||
int count;
|
||||
mFI_block_tbl_c block_info_tbl[mFM_VISIBLE_BLOCK_NUM];
|
||||
int count;
|
||||
mFI_block_tbl_c block_info_tbl[mFM_VISIBLE_BLOCK_NUM];
|
||||
} mFI_item_table_c;
|
||||
|
||||
enum {
|
||||
mFI_SOUND_SOURCE_POND = 3, // TODO: might not be correct name
|
||||
mFI_SOUND_SOURCE_POND = 3, // TODO: might not be correct name
|
||||
};
|
||||
|
||||
extern void mFI_ClearFieldData();
|
||||
@@ -269,7 +263,7 @@ extern int mFI_GetItemTable(mFI_item_table_c* item_table, xyz_t wpos, char* file
|
||||
extern int mFI_FGisUpDate();
|
||||
extern void mFI_SetFGUpData();
|
||||
extern void mFI_BornItemON();
|
||||
//extern MATCH_FORCESTRIP void mFI_BornItemOFF();
|
||||
// extern MATCH_FORCESTRIP void mFI_BornItemOFF();
|
||||
extern int mFI_ItemisBorn();
|
||||
extern int mFI_ActorisBorn();
|
||||
extern void mFI_SetBearActor(GAME_PLAY* play, xyz_t wpos, int set_flag);
|
||||
@@ -288,9 +282,10 @@ extern void mFI_SetMoveActorBitData(int bx, int bz, u16 move_actor_bit_data);
|
||||
extern void mFI_SetMoveActorBitData_ON(s16 move_actor_idx, int bx, int bz);
|
||||
extern void mFI_SetMoveActorBitData_OFF(s16 move_actor_idx, int bx, int bz);
|
||||
extern void mFI_MyMoveActorBitData_ON(ACTOR* actor);
|
||||
//extern MATCH_FORCESTRIP void mFI_MyMoveActorBitData_OFF(ACTOR* actor);
|
||||
// extern MATCH_FORCESTRIP void mFI_MyMoveActorBitData_OFF(ACTOR* actor);
|
||||
extern int mFI_GetMoveActorListIdx(mFM_move_actor_c* move_actor_list, int list_size, mActor_name_t actor_name);
|
||||
extern int mFI_RegistMoveActorList(mActor_name_t actor_name, int bx, int bz, int ut_x, int ut_z, int npc_info_idx, s16 arg);
|
||||
extern int mFI_RegistMoveActorList(mActor_name_t actor_name, int bx, int bz, int ut_x, int ut_z, int npc_info_idx,
|
||||
s16 arg);
|
||||
extern int mFI_UnregistMoveActorList(mActor_name_t actor_name, int bx, int bz);
|
||||
extern int mFI_AddMoveActorList(mActor_name_t actor_name, int bx, int bz, int ut_x, int ut_z, s16 arg);
|
||||
extern mFM_move_actor_c* mFI_MoveActorListDma(int bx, int bz);
|
||||
@@ -302,12 +297,12 @@ extern int mFI_GetNextBlockNum(int* bx, int* bz);
|
||||
extern u16* mFI_GetDepositP(int bx, int bz);
|
||||
extern void mFI_ClearDeposit(int bx, int bz);
|
||||
extern int mFI_GetLineDeposit(u16* deposit, int ut_x);
|
||||
//extern MATCH_FORCESTRIP void mFI_BlockDepositON(u16* deposit_p, int ut_x, int ut_z);
|
||||
// extern MATCH_FORCESTRIP void mFI_BlockDepositON(u16* deposit_p, int ut_x, int ut_z);
|
||||
extern void mFI_BlockDepositOFF(u16* deposit_p, int ut_x, int ut_z);
|
||||
extern int mFI_GetBlockDeposit(u16* deposit_p, int ut_x, int ut_z);
|
||||
//extern MATCH_FORCESTRIP void mFI_BkUtNum2DepositON(int bx, int bz, int ut_x, int ut_z);
|
||||
// extern MATCH_FORCESTRIP void mFI_BkUtNum2DepositON(int bx, int bz, int ut_x, int ut_z);
|
||||
extern void mFI_BkUtNum2DepositOFF(int bx, int bz, int ut_x, int ut_z);
|
||||
//extern MATCH_FORCESTRIP int mFI_BkUtNum2DepositGet(int bx, int bz, int ut_x, int ut_z);
|
||||
// extern MATCH_FORCESTRIP int mFI_BkUtNum2DepositGet(int bx, int bz, int ut_x, int ut_z);
|
||||
extern void mFI_UtNum2DepositON(int ut_x, int ut_z);
|
||||
extern void mFI_UtNum2DepositOFF(int ut_x, int ut_z);
|
||||
extern int mFI_UtNum2DepositGet(int ut_x, int ut_z);
|
||||
@@ -320,12 +315,14 @@ extern int mFI_GetDigStatus(mActor_name_t* item, xyz_t wpos, int golden_shovel);
|
||||
extern void mFI_ClearHoleBlock(int bx, int bz);
|
||||
extern void mFI_ClearBeecomb(int bx, int bz);
|
||||
extern int mFI_SetFGStructure_common(mActor_name_t structure_name, int bx, int bz, int ut_x, int ut_z, int set_type);
|
||||
extern int mFI_CheckStructureArea(int ut_x, int ut_z, mActor_name_t structure_name, int structure_ut_x, int structure_ut_z);
|
||||
extern int mFI_CheckStructureArea(int ut_x, int ut_z, mActor_name_t structure_name, int structure_ut_x,
|
||||
int structure_ut_z);
|
||||
extern mActor_name_t mFI_GetOtherFruit();
|
||||
extern int mFI_CheckFGNpcOn(mActor_name_t item);
|
||||
extern int mFI_CheckLapPolice(int bx, int bz, int ut_x, int ut_z);
|
||||
extern int mFI_GetWaveUtinBlock(int* ut_x, int* ut_z, int bx, int bz);
|
||||
extern int mFI_ClearBlockItemRandom_common(mActor_name_t item, int clear_num, mActor_name_t* fg_p, u16* deposit_p, int delete_buried);
|
||||
extern int mFI_ClearBlockItemRandom_common(mActor_name_t item, int clear_num, mActor_name_t* fg_p, u16* deposit_p,
|
||||
int delete_buried);
|
||||
extern void mFI_SetFirstSetShell();
|
||||
extern void mFI_FieldMove(xyz_t player_pos);
|
||||
extern void mFI_PrintNowBGNum(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -2253,6 +2253,7 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define ETC_START 0x8000
|
||||
#define ETC_AIRPLANE ETC_START
|
||||
#define ETC_BALL (ETC_START + 1)
|
||||
#define ETC_MY_ROOM (ETC_START + 2)
|
||||
#define ETC_MBG (ETC_START + 3)
|
||||
#define ETC_BOXTRICK (ETC_START + 4)
|
||||
#define ETC_BOXMANAGER (ETC_START + 5)
|
||||
|
||||
+287
-269
@@ -5,6 +5,7 @@
|
||||
#include "m_actor.h"
|
||||
#include "m_lib.h"
|
||||
#include "c_keyframe.h"
|
||||
#include "libultra/ultratypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -22,314 +23,331 @@ typedef struct player_actor_s PLAYER_ACTOR;
|
||||
#define mPlayer_FORCE_POSITION_ANGLE_ROTZ (1 << 6)
|
||||
|
||||
enum {
|
||||
mPlayer_ADDRESSABLE_TRUE,
|
||||
mPlayer_ADDRESSABLE_FALSE_MOVEMENT,
|
||||
mPlayer_ADDRESSABLE_FALSE_TALKING,
|
||||
mPlayer_ADDRESSABLE_FALSE_USING_TOOL,
|
||||
mPlayer_ADDRESSABLE_TRUE,
|
||||
mPlayer_ADDRESSABLE_FALSE_MOVEMENT,
|
||||
mPlayer_ADDRESSABLE_FALSE_TALKING,
|
||||
mPlayer_ADDRESSABLE_FALSE_USING_TOOL,
|
||||
|
||||
mPlayer_ADDRESSABLE_NUM
|
||||
mPlayer_ADDRESSABLE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mPlayer_INDEX_DMA,
|
||||
mPlayer_INDEX_INTRO,
|
||||
mPlayer_INDEX_REFUSE,
|
||||
mPlayer_INDEX_REFUSE_PICKUP,
|
||||
mPlayer_INDEX_RETURN_DEMO,
|
||||
mPlayer_INDEX_RETURN_OUTDOOR,
|
||||
mPlayer_INDEX_RETURN_OUTDOOR2,
|
||||
mPlayer_INDEX_WAIT,
|
||||
mPlayer_INDEX_WALK,
|
||||
mPlayer_INDEX_RUN,
|
||||
mPlayer_INDEX_DASH,
|
||||
mPlayer_INDEX_TUMBLE,
|
||||
mPlayer_INDEX_TUMBLE_GETUP,
|
||||
mPlayer_INDEX_TURN_DASH,
|
||||
mPlayer_INDEX_FALL,
|
||||
mPlayer_INDEX_WADE,
|
||||
mPlayer_INDEX_DOOR,
|
||||
mPlayer_INDEX_OUTDOOR,
|
||||
mPlayer_INDEX_INVADE,
|
||||
mPlayer_INDEX_HOLD,
|
||||
mPlayer_INDEX_PUSH,
|
||||
mPlayer_INDEX_PULL,
|
||||
mPlayer_INDEX_ROTATE_FURNITURE,
|
||||
mPlayer_INDEX_OPEN_FURNITURE,
|
||||
mPlayer_INDEX_WAIT_OPEN_FURNITURE,
|
||||
mPlayer_INDEX_CLOSE_FURNITURE,
|
||||
mPlayer_INDEX_LIE_BED,
|
||||
mPlayer_INDEX_WAIT_BED,
|
||||
mPlayer_INDEX_ROLL_BED,
|
||||
mPlayer_INDEX_STANDUP_BED,
|
||||
mPlayer_INDEX_PICKUP,
|
||||
mPlayer_INDEX_PICKUP_JUMP,
|
||||
mPlayer_INDEX_PICKUP_FURNITURE,
|
||||
mPlayer_INDEX_PICKUP_EXCHANGE,
|
||||
mPlayer_INDEX_SITDOWN,
|
||||
mPlayer_INDEX_SITDOWN_WAIT,
|
||||
mPlayer_INDEX_STANDUP,
|
||||
mPlayer_INDEX_SWING_AXE,
|
||||
mPlayer_INDEX_AIR_AXE,
|
||||
mPlayer_INDEX_REFLECT_AXE,
|
||||
mPlayer_INDEX_BROKEN_AXE,
|
||||
mPlayer_INDEX_SLIP_NET,
|
||||
mPlayer_INDEX_READY_NET,
|
||||
mPlayer_INDEX_READY_WALK_NET,
|
||||
mPlayer_INDEX_SWING_NET,
|
||||
mPlayer_INDEX_PULL_NET,
|
||||
mPlayer_INDEX_STOP_NET,
|
||||
mPlayer_INDEX_NOTICE_NET,
|
||||
mPlayer_INDEX_PUTAWAY_NET,
|
||||
mPlayer_INDEX_READY_ROD,
|
||||
mPlayer_INDEX_CAST_ROD,
|
||||
mPlayer_INDEX_AIR_ROD,
|
||||
mPlayer_INDEX_RELAX_ROD,
|
||||
mPlayer_INDEX_COLLECT_ROD,
|
||||
mPlayer_INDEX_VIB_ROD,
|
||||
mPlayer_INDEX_FLY_ROD,
|
||||
mPlayer_INDEX_NOTICE_ROD,
|
||||
mPlayer_INDEX_PUTAWAY_ROD,
|
||||
mPlayer_INDEX_DIG_SCOOP,
|
||||
mPlayer_INDEX_FILL_SCOOP,
|
||||
mPlayer_INDEX_REFLECT_SCOOP,
|
||||
mPlayer_INDEX_AIR_SCOOP,
|
||||
mPlayer_INDEX_GET_SCOOP,
|
||||
mPlayer_INDEX_PUTAWAY_SCOOP,
|
||||
mPlayer_INDEX_PUTIN_SCOOP,
|
||||
mPlayer_INDEX_TALK,
|
||||
mPlayer_INDEX_RECIEVE_WAIT,
|
||||
mPlayer_INDEX_RECIEVE_STRETCH,
|
||||
mPlayer_INDEX_RECIEVE,
|
||||
mPlayer_INDEX_RECIEVE_PUTAWAY,
|
||||
mPlayer_INDEX_GIVE,
|
||||
mPlayer_INDEX_GIVE_WAIT,
|
||||
mPlayer_INDEX_TAKEOUT_ITEM,
|
||||
mPlayer_INDEX_PUTIN_ITEM,
|
||||
mPlayer_INDEX_DEMO_WAIT,
|
||||
mPlayer_INDEX_DEMO_WALK,
|
||||
mPlayer_INDEX_DEMO_GETON_TRAIN,
|
||||
mPlayer_INDEX_DEMO_GETON_TRAIN_WAIT,
|
||||
mPlayer_INDEX_DEMO_GETOFF_TRAIN,
|
||||
mPlayer_INDEX_DEMO_STANDING_TRAIN,
|
||||
mPlayer_INDEX_DEMO_WADE,
|
||||
mPlayer_INDEX_HIDE,
|
||||
mPlayer_INDEX_GROUNDHOG,
|
||||
mPlayer_INDEX_RELEASE_CREATURE,
|
||||
mPlayer_INDEX_WASH_CAR,
|
||||
mPlayer_INDEX_TIRED,
|
||||
mPlayer_INDEX_ROTATE_OCTAGON,
|
||||
mPlayer_INDEX_THROW_MONEY,
|
||||
mPlayer_INDEX_PRAY,
|
||||
mPlayer_INDEX_SHAKE_TREE,
|
||||
mPlayer_INDEX_MAIL_JUMP,
|
||||
mPlayer_INDEX_MAIL_LAND,
|
||||
mPlayer_INDEX_READY_PITFALL,
|
||||
mPlayer_INDEX_FALL_PITFALL,
|
||||
mPlayer_INDEX_STRUGGLE_PITFALL,
|
||||
mPlayer_INDEX_CLIMBUP_PITFALL,
|
||||
mPlayer_INDEX_STUNG_BEE,
|
||||
mPlayer_INDEX_NOTICE_BEE,
|
||||
mPlayer_INDEX_REMOVE_GRASS,
|
||||
mPlayer_INDEX_SHOCK,
|
||||
mPlayer_INDEX_KNOCK_DOOR,
|
||||
mPlayer_INDEX_CHANGE_CLOTH,
|
||||
mPlayer_INDEX_PUSH_SNOWBALL,
|
||||
mPlayer_INDEX_ROTATE_UMBRELLA,
|
||||
mPlayer_INDEX_WADE_SNOWBALL,
|
||||
mPlayer_INDEX_COMPLETE_PAYMENT,
|
||||
mPlayer_INDEX_FAIL_EMU,
|
||||
mPlayer_INDEX_STUNG_MOSQUITO,
|
||||
mPlayer_INDEX_NOTICE_MOSQUITO,
|
||||
mPlayer_INDEX_SWING_FAN,
|
||||
mPlayer_INDEX_SWITCH_ON_LIGHTHOUSE,
|
||||
mPlayer_INDEX_RADIO_EXERCISE,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT_SITDOWN,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT_WAIT,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT_WADE,
|
||||
mPlayer_INDEX_DEMO_GETOFF_BOAT_STANDUP,
|
||||
mPlayer_INDEX_DEMO_GETOFF_BOAT,
|
||||
mPlayer_INDEX_DEMO_GET_GOLDEN_ITEM,
|
||||
mPlayer_INDEX_DEMO_GET_GOLDEN_ITEM2,
|
||||
mPlayer_INDEX_DEMO_GET_GOLDEN_AXE_WAIT
|
||||
mPlayer_INDEX_DMA,
|
||||
mPlayer_INDEX_INTRO,
|
||||
mPlayer_INDEX_REFUSE,
|
||||
mPlayer_INDEX_REFUSE_PICKUP,
|
||||
mPlayer_INDEX_RETURN_DEMO,
|
||||
mPlayer_INDEX_RETURN_OUTDOOR,
|
||||
mPlayer_INDEX_RETURN_OUTDOOR2,
|
||||
mPlayer_INDEX_WAIT,
|
||||
mPlayer_INDEX_WALK,
|
||||
mPlayer_INDEX_RUN,
|
||||
mPlayer_INDEX_DASH,
|
||||
mPlayer_INDEX_TUMBLE,
|
||||
mPlayer_INDEX_TUMBLE_GETUP,
|
||||
mPlayer_INDEX_TURN_DASH,
|
||||
mPlayer_INDEX_FALL,
|
||||
mPlayer_INDEX_WADE,
|
||||
mPlayer_INDEX_DOOR,
|
||||
mPlayer_INDEX_OUTDOOR,
|
||||
mPlayer_INDEX_INVADE,
|
||||
mPlayer_INDEX_HOLD,
|
||||
mPlayer_INDEX_PUSH,
|
||||
mPlayer_INDEX_PULL,
|
||||
mPlayer_INDEX_ROTATE_FURNITURE,
|
||||
mPlayer_INDEX_OPEN_FURNITURE,
|
||||
mPlayer_INDEX_WAIT_OPEN_FURNITURE,
|
||||
mPlayer_INDEX_CLOSE_FURNITURE,
|
||||
mPlayer_INDEX_LIE_BED,
|
||||
mPlayer_INDEX_WAIT_BED,
|
||||
mPlayer_INDEX_ROLL_BED,
|
||||
mPlayer_INDEX_STANDUP_BED,
|
||||
mPlayer_INDEX_PICKUP,
|
||||
mPlayer_INDEX_PICKUP_JUMP,
|
||||
mPlayer_INDEX_PICKUP_FURNITURE,
|
||||
mPlayer_INDEX_PICKUP_EXCHANGE,
|
||||
mPlayer_INDEX_SITDOWN,
|
||||
mPlayer_INDEX_SITDOWN_WAIT,
|
||||
mPlayer_INDEX_STANDUP,
|
||||
mPlayer_INDEX_SWING_AXE,
|
||||
mPlayer_INDEX_AIR_AXE,
|
||||
mPlayer_INDEX_REFLECT_AXE,
|
||||
mPlayer_INDEX_BROKEN_AXE,
|
||||
mPlayer_INDEX_SLIP_NET,
|
||||
mPlayer_INDEX_READY_NET,
|
||||
mPlayer_INDEX_READY_WALK_NET,
|
||||
mPlayer_INDEX_SWING_NET,
|
||||
mPlayer_INDEX_PULL_NET,
|
||||
mPlayer_INDEX_STOP_NET,
|
||||
mPlayer_INDEX_NOTICE_NET,
|
||||
mPlayer_INDEX_PUTAWAY_NET,
|
||||
mPlayer_INDEX_READY_ROD,
|
||||
mPlayer_INDEX_CAST_ROD,
|
||||
mPlayer_INDEX_AIR_ROD,
|
||||
mPlayer_INDEX_RELAX_ROD,
|
||||
mPlayer_INDEX_COLLECT_ROD,
|
||||
mPlayer_INDEX_VIB_ROD,
|
||||
mPlayer_INDEX_FLY_ROD,
|
||||
mPlayer_INDEX_NOTICE_ROD,
|
||||
mPlayer_INDEX_PUTAWAY_ROD,
|
||||
mPlayer_INDEX_DIG_SCOOP,
|
||||
mPlayer_INDEX_FILL_SCOOP,
|
||||
mPlayer_INDEX_REFLECT_SCOOP,
|
||||
mPlayer_INDEX_AIR_SCOOP,
|
||||
mPlayer_INDEX_GET_SCOOP,
|
||||
mPlayer_INDEX_PUTAWAY_SCOOP,
|
||||
mPlayer_INDEX_PUTIN_SCOOP,
|
||||
mPlayer_INDEX_TALK,
|
||||
mPlayer_INDEX_RECIEVE_WAIT,
|
||||
mPlayer_INDEX_RECIEVE_STRETCH,
|
||||
mPlayer_INDEX_RECIEVE,
|
||||
mPlayer_INDEX_RECIEVE_PUTAWAY,
|
||||
mPlayer_INDEX_GIVE,
|
||||
mPlayer_INDEX_GIVE_WAIT,
|
||||
mPlayer_INDEX_TAKEOUT_ITEM,
|
||||
mPlayer_INDEX_PUTIN_ITEM,
|
||||
mPlayer_INDEX_DEMO_WAIT,
|
||||
mPlayer_INDEX_DEMO_WALK,
|
||||
mPlayer_INDEX_DEMO_GETON_TRAIN,
|
||||
mPlayer_INDEX_DEMO_GETON_TRAIN_WAIT,
|
||||
mPlayer_INDEX_DEMO_GETOFF_TRAIN,
|
||||
mPlayer_INDEX_DEMO_STANDING_TRAIN,
|
||||
mPlayer_INDEX_DEMO_WADE,
|
||||
mPlayer_INDEX_HIDE,
|
||||
mPlayer_INDEX_GROUNDHOG,
|
||||
mPlayer_INDEX_RELEASE_CREATURE,
|
||||
mPlayer_INDEX_WASH_CAR,
|
||||
mPlayer_INDEX_TIRED,
|
||||
mPlayer_INDEX_ROTATE_OCTAGON,
|
||||
mPlayer_INDEX_THROW_MONEY,
|
||||
mPlayer_INDEX_PRAY,
|
||||
mPlayer_INDEX_SHAKE_TREE,
|
||||
mPlayer_INDEX_MAIL_JUMP,
|
||||
mPlayer_INDEX_MAIL_LAND,
|
||||
mPlayer_INDEX_READY_PITFALL,
|
||||
mPlayer_INDEX_FALL_PITFALL,
|
||||
mPlayer_INDEX_STRUGGLE_PITFALL,
|
||||
mPlayer_INDEX_CLIMBUP_PITFALL,
|
||||
mPlayer_INDEX_STUNG_BEE,
|
||||
mPlayer_INDEX_NOTICE_BEE,
|
||||
mPlayer_INDEX_REMOVE_GRASS,
|
||||
mPlayer_INDEX_SHOCK,
|
||||
mPlayer_INDEX_KNOCK_DOOR,
|
||||
mPlayer_INDEX_CHANGE_CLOTH,
|
||||
mPlayer_INDEX_PUSH_SNOWBALL,
|
||||
mPlayer_INDEX_ROTATE_UMBRELLA,
|
||||
mPlayer_INDEX_WADE_SNOWBALL,
|
||||
mPlayer_INDEX_COMPLETE_PAYMENT,
|
||||
mPlayer_INDEX_FAIL_EMU,
|
||||
mPlayer_INDEX_STUNG_MOSQUITO,
|
||||
mPlayer_INDEX_NOTICE_MOSQUITO,
|
||||
mPlayer_INDEX_SWING_FAN,
|
||||
mPlayer_INDEX_SWITCH_ON_LIGHTHOUSE,
|
||||
mPlayer_INDEX_RADIO_EXERCISE,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT_SITDOWN,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT_WAIT,
|
||||
mPlayer_INDEX_DEMO_GETON_BOAT_WADE,
|
||||
mPlayer_INDEX_DEMO_GETOFF_BOAT_STANDUP,
|
||||
mPlayer_INDEX_DEMO_GETOFF_BOAT,
|
||||
mPlayer_INDEX_DEMO_GET_GOLDEN_ITEM,
|
||||
mPlayer_INDEX_DEMO_GET_GOLDEN_ITEM2,
|
||||
mPlayer_INDEX_DEMO_GET_GOLDEN_AXE_WAIT
|
||||
};
|
||||
|
||||
enum {
|
||||
mPlayer_CREATURE_INSECT,
|
||||
mPlayer_CREATURE_GYOEI,
|
||||
mPlayer_CREATURE_BALLOON,
|
||||
mPlayer_CREATURE_INSECT,
|
||||
mPlayer_CREATURE_GYOEI,
|
||||
mPlayer_CREATURE_BALLOON,
|
||||
|
||||
mPlayer_CREATURE_NUM
|
||||
mPlayer_CREATURE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mPlayer_BED_ACTION_NONE,
|
||||
mPlayer_BED_ACTION_ROLL,
|
||||
mPlayer_BED_ACTION_OUT,
|
||||
|
||||
mPlayer_BED_ACTION_NUM
|
||||
};
|
||||
|
||||
typedef struct player_request_give_from_submenu_s {
|
||||
xyz_t unused; // assumed based on size
|
||||
mActor_name_t item;
|
||||
int mode_after; // player mode after the action finishes
|
||||
int present_flag; // set if the item is wrapped as presnet
|
||||
int counter_flag; // set when the item slides across a counter
|
||||
xyz_t unused; // assumed based on size
|
||||
mActor_name_t item;
|
||||
int mode_after; // player mode after the action finishes
|
||||
int present_flag; // set if the item is wrapped as presnet
|
||||
int counter_flag; // set when the item slides across a counter
|
||||
} mPlayer_request_give_from_submenu_c;
|
||||
|
||||
typedef struct player_request_putin_scoop_from_submenu_s {
|
||||
xyz_t wpos;
|
||||
mActor_name_t item;
|
||||
int got_gold_scoop;
|
||||
xyz_t wpos;
|
||||
mActor_name_t item;
|
||||
int got_gold_scoop;
|
||||
} mPlayer_request_putin_scoop_from_submenu_data_c;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int got_gold_scoop;
|
||||
s16 angle_y;
|
||||
s16 item;
|
||||
int type;
|
||||
int got_gold_scoop;
|
||||
s16 angle_y;
|
||||
s16 item;
|
||||
} mPlayer_request_release_creature_gyoei_from_submenu_c;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int got_gold_scoop;
|
||||
xyz_t wpos;
|
||||
int insect_type;
|
||||
int type;
|
||||
int got_gold_scoop;
|
||||
xyz_t wpos;
|
||||
int insect_type;
|
||||
} mPlayer_request_release_creature_insect_from_submenu_c;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int got_gold_scoop;
|
||||
int balloon_shape_type;
|
||||
int type;
|
||||
int got_gold_scoop;
|
||||
int balloon_shape_type;
|
||||
} mPlayer_request_release_creature_balloon_from_submenu_c;
|
||||
|
||||
typedef struct {
|
||||
int _0;
|
||||
ACTOR* speak_actor;
|
||||
int _0;
|
||||
ACTOR* speak_actor;
|
||||
} mPlayer_request_demo_wait_from_submenu_c;
|
||||
|
||||
typedef struct {
|
||||
int direct;
|
||||
s16 angle;
|
||||
xyz_t wpos;
|
||||
int ftr_name;
|
||||
int direct;
|
||||
s16 angle;
|
||||
xyz_t wpos;
|
||||
int ftr_name;
|
||||
} mPlayer_request_lie_bed_c;
|
||||
|
||||
typedef union {
|
||||
mPlayer_request_give_from_submenu_c give_from_submenu;
|
||||
mPlayer_request_putin_scoop_from_submenu_data_c putin_scoop_from_submenu;
|
||||
mPlayer_request_release_creature_gyoei_from_submenu_c release_creature_gyoei_from_submenu;
|
||||
mPlayer_request_release_creature_insect_from_submenu_c release_creature_insect_from_submenu;
|
||||
mPlayer_request_release_creature_balloon_from_submenu_c release_creature_balloon_from_submenu;
|
||||
mPlayer_request_demo_wait_from_submenu_c demo_wait_from_submenu;
|
||||
mPlayer_request_lie_bed_c lie_bed;
|
||||
/* TODO: others */
|
||||
u8 force_size[72]; // TEMP
|
||||
mPlayer_request_give_from_submenu_c give_from_submenu;
|
||||
mPlayer_request_putin_scoop_from_submenu_data_c putin_scoop_from_submenu;
|
||||
mPlayer_request_release_creature_gyoei_from_submenu_c release_creature_gyoei_from_submenu;
|
||||
mPlayer_request_release_creature_insect_from_submenu_c release_creature_insect_from_submenu;
|
||||
mPlayer_request_release_creature_balloon_from_submenu_c release_creature_balloon_from_submenu;
|
||||
mPlayer_request_demo_wait_from_submenu_c demo_wait_from_submenu;
|
||||
mPlayer_request_lie_bed_c lie_bed;
|
||||
/* TODO: others */
|
||||
u8 force_size[72]; // TEMP
|
||||
} mPlayer_request_main_data;
|
||||
|
||||
typedef struct {
|
||||
int requested_main_index;
|
||||
int requested_index_pending;
|
||||
mPlayer_request_main_data request_main_data;
|
||||
int requested_main_index;
|
||||
int requested_index_pending;
|
||||
mPlayer_request_main_data request_main_data;
|
||||
} mPlayer_change_data_from_submenu_c;
|
||||
|
||||
/* sizeof(struct player_actor_s) == 0x13A8 */
|
||||
struct player_actor_s {
|
||||
/* 0x0000 */ ACTOR actor_class;
|
||||
/* 0x0174 */ cKF_SkeletonInfo_R_c keyframe0;
|
||||
/* 0x01E4 */ cKF_SkeletonInfo_R_c keyframe1;
|
||||
/* 0x0252 */ s_xyz joint_data[27];
|
||||
/* 0x02F4 */ s_xyz morph_data[27];
|
||||
/* 0x0398 */ Mtx work_mtx[2][13]; /* swapped between frames */
|
||||
/* 0x0A18 */ cKF_SkeletonInfo_R_c item_keyframe; /* for item animations */
|
||||
/* 0x0A88 */ s_xyz item_joint_data[8];
|
||||
/* 0x0AB8 */ s_xyz item_morph_data[8];
|
||||
/* 0x0AE8 */ Mtx item_work_mtx[2][4]; /* swapped between frames */
|
||||
/* 0x0CE8 */ s16 eye_pattern_normal;
|
||||
/* 0x0CEA */ s16 eye_pattern_normal_timer;
|
||||
/* 0x0CEC */ int blink_count;
|
||||
/* 0x0CF0 */ int eye_tex_idx;
|
||||
/* 0x0CF4 */ int mouth_tex_idx;
|
||||
/* 0x0CF8 */ int now_main_index;
|
||||
/* 0x0CFC */ int prev_main_index;
|
||||
/* 0x0D00 */ int changed_main_index;
|
||||
/* 0x0D04 */ int item_main_index;
|
||||
/* 0x0D08 */ int requested_main_index;
|
||||
/* 0x0D0C */ int requested_main_index_priority;
|
||||
/* 0x0D10 */ int requested_main_index_changed;
|
||||
/* 0x0D14 */ int settled_requested_main_index_priority;
|
||||
/* 0x0D18 */ u8 main_index_data[72]; // TODO: Union of many types...
|
||||
/* 0x0D60 */ u8 requested_main_index_data[72]; // TODO: Union of many types...
|
||||
/* 0x0DA8 */ u8 _0DA8[0x1270 - 0x0DA8]; /* TODO: finish */
|
||||
/* 0x1270 */ int (*request_main_invade_all_proc)(GAME*, int);
|
||||
/* 0x1274 */ int (*request_main_refuse_all_proc)(GAME*, int);
|
||||
/* 0x1278 */ int (*request_main_return_demo_all_proc)(GAME*, int, f32, int);
|
||||
/* 0x127C */ int (*request_main_wait_all_proc)(GAME*, f32, int, int);
|
||||
/* 0x1280 */ int (*request_main_talk_all_proc)(GAME*, ACTOR*, int, f32, int, int);
|
||||
/* 0x1284 */ int (*request_main_hold_all_proc)(GAME*, int, int, const xyz_t*, f32, int, int);
|
||||
/* 0x1288 */ int (*request_main_recieve_wait_all_proc)(GAME*, ACTOR*, int, int, mActor_name_t, int, int);
|
||||
/* 0x128C */ int (*request_main_give_all_proc)(GAME*, ACTOR*, int, int, mActor_name_t, int, int, int, int);
|
||||
/* 0x1290 */ int (*request_main_sitdown_all_proc)(GAME*, int, const xyz_t*, int, int);
|
||||
/* 0x1294 */ int (*request_main_close_furniture_all_proc)(GAME*, int);
|
||||
/* 0x1298 */ int (*request_main_lie_bed_all_proc)(GAME*, int, const xyz_t*, int, int, int);
|
||||
/* 0x129C */ int (*request_main_hide_all_proc)(GAME*, int);
|
||||
/* 0x12A0 */ int (*request_main_groundhog_proc)(GAME*, int);
|
||||
/* 0x12A4 */ int (*request_main_door_all_proc)(GAME*, const xyz_t*, s16, int, void*, int);
|
||||
/* 0x12A8 */ int (*request_main_outdoor_all_proc)(GAME*, int, int, int);
|
||||
/* 0x12AC */ int (*request_main_wash_car_all_proc)(GAME*, const xyz_t*, const xyz_t*, s16, ACTOR*, int);
|
||||
/* 0x12B0 */ int (*request_main_rotate_octagon_all_proc)(GAME*, ACTOR*, int, int, const xyz_t*, s16, int);
|
||||
/* 0x12B4 */ int (*request_main_throw_money_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12B8 */ int (*request_main_pray_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12BC */ int (*request_main_mail_jump_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12C0 */ int (*request_main_demo_wait_all_proc)(GAME*, int, void*, int);
|
||||
/* 0x12C4 */ int (*request_main_demo_walk_all_proc)(GAME*, f32, f32, f32, int, int);
|
||||
/* 0x12C8 */ int (*request_main_demo_geton_train_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12CC */ int (*request_main_demo_getoff_train_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12D0 */ int (*request_main_demo_standing_train_all_proc)(GAME*, int);
|
||||
/* 0x12D4 */ int (*request_main_stung_bee_all_proc)(GAME*, int);
|
||||
/* 0x12D8 */ int (*request_main_shock_all_proc)(GAME*, f32, s16, s8, int, int);
|
||||
/* 0x12DC */ int (*request_main_change_cloth_forNPC_proc)(GAME*, mActor_name_t, int);
|
||||
/* 0x12E0 */ int (*request_main_push_snowball_all_proc)(GAME*, void*, int, int);
|
||||
/* 0x12E4 */ int (*request_main_stung_mosquito_all_proc)(GAME*, int, int);
|
||||
/* 0x12E8 */ int (*request_main_switch_on_lighthouse_all_proc)(GAME*, const xyz_t*, int, int);
|
||||
/* 0x12EC */ int (*request_main_demo_geton_boat_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12F0 */ int (*request_main_demo_getoff_boat_standup_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12F4 */ int (*request_main_demo_get_golden_item2_all_proc)(GAME*, int, int);
|
||||
/* 0x12F8 */ int (*request_main_demo_get_golden_axe_wait_all_proc)(GAME*, int);
|
||||
/* 0x12FC */ int (*check_request_main_priority_proc)(GAME*, int);
|
||||
/* 0x1300 */ void* (*get_door_label_proc)(GAME*);
|
||||
/* 0x1304 */ int (*Set_Item_net_catch_request_table_proc)(ACTOR*, GAME*, u32, s8, const xyz_t*, f32);
|
||||
/* 0x1308 */ f32 (*Get_Item_net_catch_swing_timer_proc)(ACTOR*, GAME*);
|
||||
/* 0x130C */ u8 (*Set_Item_net_catch_request_force_proc)(ACTOR*, GAME*, u32, s8);
|
||||
/* 0x1310 */ void (*Set_force_position_angle_proc)(GAME*, const xyz_t*, const s_xyz*, u8);
|
||||
/* 0x1314 */ u8 (*Get_force_position_angle_proc)(GAME*, xyz_t*, s_xyz*);
|
||||
/* 0x1318 */ int (*Get_WadeEndPos_proc)(GAME*, xyz_t*);
|
||||
/* 0x131C */ int (*Check_Label_main_push_snowball_proc)(GAME*, void*);
|
||||
/* 0x1320 */ int (*SetParam_for_push_snowball_proc)(GAME*, const xyz_t*, s16, f32);
|
||||
/* 0x1324 */ int (*able_submenu_request_main_index_proc)(GAME*);
|
||||
/* 0x1328 */ int (*check_able_change_camera_normal_index_proc)(ACTOR*);
|
||||
/* 0x132C */ int (*Check_able_force_speak_label_proc)(GAME*, ACTOR*);
|
||||
/* 0x1330 */ int (*check_cancel_request_change_proc_index_proc)(int);
|
||||
/* 0x1334 */ u32 (*Get_item_net_catch_label_proc)(ACTOR*);
|
||||
/* 0x1338 */ int (*Change_item_net_catch_label_proc)(ACTOR*, u32, s8);
|
||||
/* 0x133C */ int (*Check_StopNet_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1340 */ int (*Check_HitAxe_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1344 */ int (*Check_VibUnit_OneFrame_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x1348 */ int (*Check_HitScoop_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x134C */ int (*Check_DigScoop_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1350 */ int (*check_request_change_item_proc)(GAME*);
|
||||
/* 0x1354 */ int (*Check_RotateOctagon_proc)(GAME*);
|
||||
/* 0x1358 */ int (*Check_end_stung_bee_proc)(ACTOR*);
|
||||
/* 0x135C */ int (*Get_status_for_bee_proc)(ACTOR*);
|
||||
/* 0x1360 */ int (*Set_ScrollDemo_forWade_snowball_proc)(ACTOR*, int, const xyz_t*);
|
||||
/* 0x1364 */ int (*Check_tree_shaken_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x1368 */ int (*Check_tree_shaken_little_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x136C */ int (*Check_tree_shaken_big_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x1370 */ int (*Check_Label_main_wade_snowball_proc)(GAME*, void*);
|
||||
/* 0x1374 */ int (*GetSnowballPos_forWadeSnowball_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1378 */ int (*CheckCondition_forWadeSnowball_proc)(GAME*, const xyz_t*, s16);
|
||||
/* 0x137C */ mActor_name_t (*Get_itemNo_forWindow_proc)(ACTOR*);
|
||||
/* 0x1380 */ int (*check_cancel_event_without_priority_proc)(GAME*);
|
||||
/* 0x1384 */ int (*CheckScene_AbleSubmenu_proc)();
|
||||
/* 0x1388 */ int (*Check_stung_mosquito_proc)(GAME*, ACTOR*);
|
||||
/* 0x138C */ int a_btn_pressed;
|
||||
/* 0x1390 */ int a_btn_triggers_submenu;
|
||||
/* 0x1394 */ mActor_name_t item_in_front; /* item directly in front of the player */
|
||||
/* 0x1398 */ xyz_t foward_ut_pos; /* wpos of unit in front of player */
|
||||
/* 0x13A4 */ s8 update_scene_bg_mode;
|
||||
/* 0x0000 */ ACTOR actor_class;
|
||||
/* 0x0174 */ cKF_SkeletonInfo_R_c keyframe0;
|
||||
/* 0x01E4 */ cKF_SkeletonInfo_R_c keyframe1;
|
||||
/* 0x0252 */ s_xyz joint_data[27];
|
||||
/* 0x02F4 */ s_xyz morph_data[27];
|
||||
/* 0x0398 */ Mtx work_mtx[2][13]; /* swapped between frames */
|
||||
/* 0x0A18 */ cKF_SkeletonInfo_R_c item_keyframe; /* for item animations */
|
||||
/* 0x0A88 */ s_xyz item_joint_data[8];
|
||||
/* 0x0AB8 */ s_xyz item_morph_data[8];
|
||||
/* 0x0AE8 */ Mtx item_work_mtx[2][4]; /* swapped between frames */
|
||||
/* 0x0CE8 */ s16 eye_pattern_normal;
|
||||
/* 0x0CEA */ s16 eye_pattern_normal_timer;
|
||||
/* 0x0CEC */ int blink_count;
|
||||
/* 0x0CF0 */ int eye_tex_idx;
|
||||
/* 0x0CF4 */ int mouth_tex_idx;
|
||||
/* 0x0CF8 */ int now_main_index;
|
||||
/* 0x0CFC */ int prev_main_index;
|
||||
/* 0x0D00 */ int changed_main_index;
|
||||
/* 0x0D04 */ int item_main_index;
|
||||
/* 0x0D08 */ int requested_main_index;
|
||||
/* 0x0D0C */ int requested_main_index_priority;
|
||||
/* 0x0D10 */ int requested_main_index_changed;
|
||||
/* 0x0D14 */ int settled_requested_main_index_priority;
|
||||
/* 0x0D18 */ u8 main_index_data[72]; // TODO: Union of many types...
|
||||
/* 0x0D60 */ u8 requested_main_index_data[72]; // TODO: Union of many types...
|
||||
/* 0x0DA8 */ u8 _0DA8[0x1010 - 0x0DA8]; /* TODO: finish */
|
||||
/* 0x1010 */ ClObjPipe_c col_pipe;
|
||||
/* 0x102C */ xyz_t head_pos;
|
||||
/* 0x1038 */ xyz_t feel_pos;
|
||||
/* 0x1044 */ xyz_t right_hand_pos;
|
||||
/* 0x1050 */ xyz_t right_hand_move;
|
||||
/* 0x105C */ xyz_t left_hand_pos;
|
||||
/* 0x1068 */ MtxF right_hand_mtx;
|
||||
/* 0x10A8 */ MtxF left_hand_mtx;
|
||||
/* 0x10E8 */ u8 _10E8[0x1270 - 0x10E8];
|
||||
/* 0x1270 */ int (*request_main_invade_all_proc)(GAME*, int);
|
||||
/* 0x1274 */ int (*request_main_refuse_all_proc)(GAME*, int);
|
||||
/* 0x1278 */ int (*request_main_return_demo_all_proc)(GAME*, int, f32, int);
|
||||
/* 0x127C */ int (*request_main_wait_all_proc)(GAME*, f32, int, int);
|
||||
/* 0x1280 */ int (*request_main_talk_all_proc)(GAME*, ACTOR*, int, f32, int, int);
|
||||
/* 0x1284 */ int (*request_main_hold_all_proc)(GAME*, int, int, const xyz_t*, f32, int, int);
|
||||
/* 0x1288 */ int (*request_main_recieve_wait_all_proc)(GAME*, ACTOR*, int, int, mActor_name_t, int, int);
|
||||
/* 0x128C */ int (*request_main_give_all_proc)(GAME*, ACTOR*, int, int, mActor_name_t, int, int, int, int);
|
||||
/* 0x1290 */ int (*request_main_sitdown_all_proc)(GAME*, int, const xyz_t*, int, int);
|
||||
/* 0x1294 */ int (*request_main_close_furniture_all_proc)(GAME*, int);
|
||||
/* 0x1298 */ int (*request_main_lie_bed_all_proc)(GAME*, int, const xyz_t*, int, int, int);
|
||||
/* 0x129C */ int (*request_main_hide_all_proc)(GAME*, int);
|
||||
/* 0x12A0 */ int (*request_main_groundhog_proc)(GAME*, int);
|
||||
/* 0x12A4 */ int (*request_main_door_all_proc)(GAME*, const xyz_t*, s16, int, void*, int);
|
||||
/* 0x12A8 */ int (*request_main_outdoor_all_proc)(GAME*, int, int, int);
|
||||
/* 0x12AC */ int (*request_main_wash_car_all_proc)(GAME*, const xyz_t*, const xyz_t*, s16, ACTOR*, int);
|
||||
/* 0x12B0 */ int (*request_main_rotate_octagon_all_proc)(GAME*, ACTOR*, int, int, const xyz_t*, s16, int);
|
||||
/* 0x12B4 */ int (*request_main_throw_money_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12B8 */ int (*request_main_pray_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12BC */ int (*request_main_mail_jump_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12C0 */ int (*request_main_demo_wait_all_proc)(GAME*, int, void*, int);
|
||||
/* 0x12C4 */ int (*request_main_demo_walk_all_proc)(GAME*, f32, f32, f32, int, int);
|
||||
/* 0x12C8 */ int (*request_main_demo_geton_train_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12CC */ int (*request_main_demo_getoff_train_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12D0 */ int (*request_main_demo_standing_train_all_proc)(GAME*, int);
|
||||
/* 0x12D4 */ int (*request_main_stung_bee_all_proc)(GAME*, int);
|
||||
/* 0x12D8 */ int (*request_main_shock_all_proc)(GAME*, f32, s16, s8, int, int);
|
||||
/* 0x12DC */ int (*request_main_change_cloth_forNPC_proc)(GAME*, mActor_name_t, int);
|
||||
/* 0x12E0 */ int (*request_main_push_snowball_all_proc)(GAME*, void*, int, int);
|
||||
/* 0x12E4 */ int (*request_main_stung_mosquito_all_proc)(GAME*, int, int);
|
||||
/* 0x12E8 */ int (*request_main_switch_on_lighthouse_all_proc)(GAME*, const xyz_t*, int, int);
|
||||
/* 0x12EC */ int (*request_main_demo_geton_boat_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12F0 */ int (*request_main_demo_getoff_boat_standup_all_proc)(GAME*, const xyz_t*, s16, int);
|
||||
/* 0x12F4 */ int (*request_main_demo_get_golden_item2_all_proc)(GAME*, int, int);
|
||||
/* 0x12F8 */ int (*request_main_demo_get_golden_axe_wait_all_proc)(GAME*, int);
|
||||
/* 0x12FC */ int (*check_request_main_priority_proc)(GAME*, int);
|
||||
/* 0x1300 */ void* (*get_door_label_proc)(GAME*);
|
||||
/* 0x1304 */ int (*Set_Item_net_catch_request_table_proc)(ACTOR*, GAME*, u32, s8, const xyz_t*, f32);
|
||||
/* 0x1308 */ f32 (*Get_Item_net_catch_swing_timer_proc)(ACTOR*, GAME*);
|
||||
/* 0x130C */ u8 (*Set_Item_net_catch_request_force_proc)(ACTOR*, GAME*, u32, s8);
|
||||
/* 0x1310 */ void (*Set_force_position_angle_proc)(GAME*, const xyz_t*, const s_xyz*, u8);
|
||||
/* 0x1314 */ u8 (*Get_force_position_angle_proc)(GAME*, xyz_t*, s_xyz*);
|
||||
/* 0x1318 */ int (*Get_WadeEndPos_proc)(GAME*, xyz_t*);
|
||||
/* 0x131C */ int (*Check_Label_main_push_snowball_proc)(GAME*, void*);
|
||||
/* 0x1320 */ int (*SetParam_for_push_snowball_proc)(GAME*, const xyz_t*, s16, f32);
|
||||
/* 0x1324 */ int (*able_submenu_request_main_index_proc)(GAME*);
|
||||
/* 0x1328 */ int (*check_able_change_camera_normal_index_proc)(ACTOR*);
|
||||
/* 0x132C */ int (*Check_able_force_speak_label_proc)(GAME*, ACTOR*);
|
||||
/* 0x1330 */ int (*check_cancel_request_change_proc_index_proc)(int);
|
||||
/* 0x1334 */ u32 (*Get_item_net_catch_label_proc)(ACTOR*);
|
||||
/* 0x1338 */ int (*Change_item_net_catch_label_proc)(ACTOR*, u32, s8);
|
||||
/* 0x133C */ int (*Check_StopNet_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1340 */ int (*Check_HitAxe_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1344 */ int (*Check_VibUnit_OneFrame_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x1348 */ int (*Check_HitScoop_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x134C */ int (*Check_DigScoop_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1350 */ int (*check_request_change_item_proc)(GAME*);
|
||||
/* 0x1354 */ int (*Check_RotateOctagon_proc)(GAME*);
|
||||
/* 0x1358 */ int (*Check_end_stung_bee_proc)(ACTOR*);
|
||||
/* 0x135C */ int (*Get_status_for_bee_proc)(ACTOR*);
|
||||
/* 0x1360 */ int (*Set_ScrollDemo_forWade_snowball_proc)(ACTOR*, int, const xyz_t*);
|
||||
/* 0x1364 */ int (*Check_tree_shaken_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x1368 */ int (*Check_tree_shaken_little_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x136C */ int (*Check_tree_shaken_big_proc)(ACTOR*, const xyz_t*);
|
||||
/* 0x1370 */ int (*Check_Label_main_wade_snowball_proc)(GAME*, void*);
|
||||
/* 0x1374 */ int (*GetSnowballPos_forWadeSnowball_proc)(ACTOR*, xyz_t*);
|
||||
/* 0x1378 */ int (*CheckCondition_forWadeSnowball_proc)(GAME*, const xyz_t*, s16);
|
||||
/* 0x137C */ mActor_name_t (*Get_itemNo_forWindow_proc)(ACTOR*);
|
||||
/* 0x1380 */ int (*check_cancel_event_without_priority_proc)(GAME*);
|
||||
/* 0x1384 */ int (*CheckScene_AbleSubmenu_proc)();
|
||||
/* 0x1388 */ int (*Check_stung_mosquito_proc)(GAME*, ACTOR*);
|
||||
/* 0x138C */ int a_btn_pressed;
|
||||
/* 0x1390 */ int a_btn_triggers_submenu;
|
||||
/* 0x1394 */ mActor_name_t item_in_front; /* item directly in front of the player */
|
||||
/* 0x1398 */ xyz_t foward_ut_pos; /* wpos of unit in front of player */
|
||||
/* 0x13A4 */ s8 update_scene_bg_mode;
|
||||
};
|
||||
|
||||
void Player_actor_ct(ACTOR*, GAME*);
|
||||
|
||||
@@ -67,6 +67,9 @@ extern int mPlib_request_main_close_furniture_type1(GAME* game);
|
||||
extern int mPlib_request_main_shock_type1(GAME* game, f32 time, s16 angle_y, int axe_swing);
|
||||
extern int mPlib_request_main_hold_type1(GAME* game, int ftr_no, int player_direct, const xyz_t* player_pos);
|
||||
extern int mPlib_check_player_warp_forEvent(void);
|
||||
extern int mPlib_check_player_actor_main_index_Furniture_Move(GAME* game);
|
||||
extern int mPlib_request_main_sitdown_type1(GAME* game, int direct, const xyz_t* pos, int ftr_no);
|
||||
extern int mPlib_request_main_lie_bed_type1(GAME* game, int direct, const xyz_t* pos, int head_direct, int ftr_no);
|
||||
|
||||
extern mPlayer_change_data_from_submenu_c* mPlib_Get_change_data_from_submenu_p();
|
||||
|
||||
|
||||
+72
-8
@@ -17,6 +17,7 @@
|
||||
#include "m_debug.h"
|
||||
#include "m_mark_room.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
enum {
|
||||
aMR_ICON_LEAF,
|
||||
@@ -110,6 +111,27 @@ enum {
|
||||
aMR_MSG_STATE_NUM
|
||||
};
|
||||
|
||||
static void My_Room_Actor_ct(ACTOR*, GAME*);
|
||||
static void My_Room_Actor_dt(ACTOR*, GAME*);
|
||||
static void My_Room_Actor_move(ACTOR*, GAME*);
|
||||
static void My_Room_Actor_draw(ACTOR*, GAME*);
|
||||
|
||||
// clang-format off
|
||||
ACTOR_PROFILE My_Room_Profile = {
|
||||
mAc_PROFILE_MY_ROOM,
|
||||
ACTOR_PART_BG,
|
||||
ACTOR_STATE_CAN_MOVE_IN_DEMO_SCENES | ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_NO_MOVE_WHILE_CULLED,
|
||||
ETC_MY_ROOM,
|
||||
ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(MY_ROOM_ACTOR),
|
||||
&My_Room_Actor_ct,
|
||||
&My_Room_Actor_dt,
|
||||
&My_Room_Actor_move,
|
||||
&My_Room_Actor_draw,
|
||||
NULL
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#include "../src/ac_furniture_data.c_inc"
|
||||
#include "../src/ac_my_room_data.c_inc"
|
||||
|
||||
@@ -146,10 +168,48 @@ static int aMR_SetFurniture2FG(FTR_ACTOR* ftr_actor, xyz_t pos, int on_flag);
|
||||
static int aMR_FtrIdx2ChangeFtrSwitch(ACTOR* actorx, int ftr_id);
|
||||
static aFTR_PROFILE* aMR_GetFurnitureProfile(u16 ftr_no);
|
||||
static mActor_name_t* aMR_GetLayerTopFg(s16 layer);
|
||||
|
||||
#include "../src/ac_my_room_msg_ctrl.c_inc"
|
||||
#include "../src/ac_my_room_goki.c_inc"
|
||||
#include "../src/ac_my_room_melody.c_inc"
|
||||
static void aMR_TidyItemInFurniture(FTR_ACTOR* ftr_actor);
|
||||
static int aMR_GetItemCountInFurniture(FTR_ACTOR* ftr_actor);
|
||||
static int aMR_ItemPutInFurniture(FTR_ACTOR* ftr_actor, mActor_name_t item);
|
||||
static void aMR_AllMDSwitchOff(void);
|
||||
static void aMR_OneMDSwitchOn_TheOtherSwitchOff(FTR_ACTOR* ftr_actor);
|
||||
static void aMR_ReserveBgm(ACTOR* actorx, int bgm_no, FTR_ACTOR* ftr_actor, s16 timer);
|
||||
static void aMR_SetMDFtrDemoData(MY_ROOM_ACTOR* my_room, FTR_ACTOR* ftr_actor, aMR_contact_info_c* contact_info);
|
||||
static int aMR_CheckHikidashi(FTR_ACTOR* ftr_actor, PLAYER_ACTOR* player, aMR_contact_info_c* contact_info);
|
||||
static int aMR_JudgeDemoStart(MY_ROOM_ACTOR* my_room, aMR_contact_info_c* contact_info, GAME* game,
|
||||
PLAYER_ACTOR* player);
|
||||
static void aMR_PlacePushFurniture(MY_ROOM_ACTOR* my_room, aMR_contact_info_c* contact_info, f32* point,
|
||||
PLAYER_ACTOR* player, GAME* game);
|
||||
static void aMR_PlacePullFurniture(MY_ROOM_ACTOR* my_room, aMR_contact_info_c* contact_info, PLAYER_ACTOR* player,
|
||||
GAME* game);
|
||||
static void aMR_PlaceKurukuruFurniture(MY_ROOM_ACTOR* my_room, aMR_contact_info_c* contact_info, PLAYER_ACTOR* player,
|
||||
GAME* game);
|
||||
static void aMR_SitDownFurniture(MY_ROOM_ACTOR* my_room, aMR_contact_info_c* contact_info, PLAYER_ACTOR* player,
|
||||
GAME* game);
|
||||
static void aMR_JudgeGoToBed(MY_ROOM_ACTOR* my_room, aMR_contact_info_c* contact_info, PLAYER_ACTOR* player,
|
||||
GAME* game);
|
||||
static void aMR_SetMelodyData(u8* melody_data);
|
||||
static void aMR_GokiInfoCt(ACTOR* actorx, GAME* game);
|
||||
static void aMR_GokiInfoDt(void);
|
||||
static void aMR_CheckFtrAndGoki(ACTOR* actorx, FTR_ACTOR* ftr_actor, GAME* game);
|
||||
static void aMR_MakeGokiburi(xyz_t* pos, GAME* game, s16 arg);
|
||||
static void aMR_RequestPlayerBikkuri(ACTOR* actorx, GAME* game);
|
||||
static void aMR_GetFtrShape4Position(xyz_t* p0, xyz_t* p1, xyz_t* p2, xyz_t* p3, FTR_ACTOR* ftr_actor);
|
||||
static u8 aMR_JudgeStickFull(int direct, GAME* game);
|
||||
static int aMR_JudgeFurnitureMove(u8 type, int ut);
|
||||
static int aMR_RequestItemToFitFurniture(ACTOR* actorx, FTR_ACTOR* ftr_actor);
|
||||
static void aMR_SetPullMoveAnime(FTR_ACTOR* ftr_actor, GAME* game, MY_ROOM_ACTOR* my_room,
|
||||
aMR_contact_info_c* contact_info);
|
||||
static int aMR_PullDirect2PushDirect(int pull_direct);
|
||||
static void aMR_SetPushMoveAnime(FTR_ACTOR* ftr_actor, GAME* game, MY_ROOM_ACTOR* my_room,
|
||||
aMR_contact_info_c* contact_info);
|
||||
static void aMR_MoveShapeCenter(FTR_ACTOR* ftr_actor);
|
||||
static void aMR_RotateY(f32* xz, f32 amount);
|
||||
static int aMR_3DStickNuetral(void);
|
||||
static void aMR_SetNicePos(xyz_t* nice_pos, xyz_t player_pos, f32* col_start_xz, f32* col_end_xz,
|
||||
aMR_contact_info_c* contact_info, int type);
|
||||
static int aMR_GetPlayerDirect(const f32* normal_xz);
|
||||
static int aMR_Get3dDirectStatus(int direct);
|
||||
|
||||
static aFTR_PROFILE* aMR_GetFurnitureProfile(u16 ftr_no) {
|
||||
if (ftr_no < FTR_NUM) {
|
||||
@@ -237,7 +297,7 @@ static int aMR_ItemNo2IconNo(mActor_name_t item_no) {
|
||||
return aMR_ICON_LEAF;
|
||||
}
|
||||
|
||||
static Gfx* aMR_IconNo2Gfx1(int icon_no) {
|
||||
extern Gfx* aMR_IconNo2Gfx1(int icon_no) {
|
||||
aMR_icon_display_data_c* icon;
|
||||
|
||||
if (icon_no < 0) {
|
||||
@@ -249,7 +309,7 @@ static Gfx* aMR_IconNo2Gfx1(int icon_no) {
|
||||
return aMR_icon_display_data[icon_no].mat_gfx;
|
||||
}
|
||||
|
||||
static Gfx* aMR_IconNo2Gfx2(int icon_no) {
|
||||
extern Gfx* aMR_IconNo2Gfx2(int icon_no) {
|
||||
if (icon_no < 0) {
|
||||
icon_no = 0;
|
||||
} else if (icon_no >= aMR_ICON_NUM) {
|
||||
@@ -1402,6 +1462,8 @@ static int aMR_GetSceneFurnitureMax(void) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
#include "../src/ac_my_room_msg_ctrl.c_inc"
|
||||
|
||||
static void aMR_SecureFurnitureRam(ACTOR* actorx) {
|
||||
l_aMR_work.ftr_actor_list = (FTR_ACTOR*)zelda_malloc(l_aMR_work.list_size * sizeof(FTR_ACTOR));
|
||||
l_aMR_work.used_list = (u8*)zelda_malloc(l_aMR_work.list_size * sizeof(u8));
|
||||
@@ -1719,8 +1781,6 @@ static void aMR_SetMDIslandNPC(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_GokiInfoCt(ACTOR* actorx, GAME* game);
|
||||
|
||||
static void My_Room_Actor_ct(ACTOR* actorx, GAME* game) {
|
||||
MY_ROOM_ACTOR* my_room = (MY_ROOM_ACTOR*)actorx;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
@@ -1878,6 +1938,8 @@ static int aMR_PickupFtrLayer(void) {
|
||||
return mCoBG_LAYER0;
|
||||
}
|
||||
|
||||
#include "../src/ac_my_room_goki.c_inc"
|
||||
|
||||
static void aMR_LeafStartPos(xyz_t* pos) {
|
||||
static xyz_t leaf_start0 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
@@ -1958,7 +2020,9 @@ static void My_Room_Actor_dt(ACTOR* actorx, GAME* game) {
|
||||
}
|
||||
}
|
||||
|
||||
#include "../src/ac_my_room_melody.c_inc"
|
||||
#include "../src/ac_my_room_move.c_inc"
|
||||
#include "../src/ac_my_room_draw.c_inc"
|
||||
|
||||
static void aMR_RedmaFtrBank(void) {
|
||||
int i;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+160
-22
@@ -22,32 +22,170 @@ typedef struct {
|
||||
xyz_t offset;
|
||||
} aMR_type_target_c;
|
||||
|
||||
static aMR_type_target_c type_target_table[] = {
|
||||
{ 2, { 0.0f, 0.0f, -40.0f } }, { 2, { 0.0f, 0.0f, -40.0f } }, { 2, { 0.0f, 0.0f, -40.0f } },
|
||||
{ 0, { 0.0f, 0.0f, 0.0f } }, { 0, { 0.0f, 0.0f, 0.0f } }, { 0, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 0, { 0.0f, 0.0f, 0.0f } }, { 2, { 0.0f, 0.0f, -40.0f } }, { 1, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 3, { -40.0f, 0.0f, 0.0f } }, { 3, { -40.0f, 0.0f, 0.0f } }, { 3, { -40.0f, 0.0f, 0.0f } },
|
||||
{ 3, { -40.0f, 0.0f, 0.0f } }, { 1, { 0.0f, 0.0f, 0.0f } }, { 1, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 1, { 0.0f, 0.0f, 0.0f } }, { 2, { 0.0f, 0.0f, 0.0f } }, { 2, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 2, { 0.0f, 0.0f, 0.0f } }, { 0, { 0.0f, 0.0f, 40.0f } }, { 0, { 0.0f, 0.0f, 40.0f } },
|
||||
{ 0, { 0.0f, 0.0f, 40.0f } }, { 0, { 0.0f, 0.0f, 40.0f } }, { 2, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 1, { 40.0f, 0.0f, 0.0f } }, { 3, { 0.0f, 0.0f, 0.0f } }, { 3, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 3, { 0.0f, 0.0f, 0.0f } }, { 3, { 0.0f, 0.0f, 0.0f } }, { 1, { 40.0f, 0.0f, 0.0f } },
|
||||
{ 1, { 40.0f, 0.0f, 0.0f } }, { 1, { 40.0f, 0.0f, 0.0f } },
|
||||
static aMR_type_target_c type_target_table[4][4][2] = {
|
||||
{
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, -40.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, -40.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, -40.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, -40.0f } },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_180, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_0, { -40.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_0, { -40.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_0, { -40.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_0, { -40.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_180, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_180, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_180, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 40.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 40.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 40.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_90, { 0.0f, 0.0f, 40.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_270, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_180, { 40.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_0, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_0, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_0, { 0.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_0, { 0.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_180, { 40.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
{
|
||||
{ aFTR_SHAPE_TYPEB_180, { 40.0f, 0.0f, 0.0f } },
|
||||
{ aFTR_SHAPE_TYPEB_180, { 40.0f, 0.0f, 0.0f } },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static s16 rotate_forbid_table[][2] = {
|
||||
{ -1, 0 }, { -1, -1 }, { 0, 0 }, { 1, 0 }, { -1, 1 }, { 0, 0 }, { -1, 0 }, { 1, 0 },
|
||||
{ 0, 1 }, { -1, 0 }, { -1, 0 }, { 0, -1 }, { 1, 0 }, { 0, 1 }, { 0, 1 }, { -1, 0 },
|
||||
{ 0, -1 }, { 0, 1 }, { 0, 0 }, { -1, 1 }, { 0, -1 }, { 0, 0 }, { 1, 1 }, { 0, 1 },
|
||||
typedef struct rotate_forbid_data_s {
|
||||
s_xyz left[2];
|
||||
s_xyz right[2];
|
||||
} aMR_rotate_forbid_data_c;
|
||||
|
||||
static aMR_rotate_forbid_data_c rotate_forbid_table[4] = {
|
||||
{
|
||||
{
|
||||
{ -1, 0, -1 },
|
||||
{ -1, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 1, 0, -1 },
|
||||
{ 1, 0, 0 },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ -1, 0, 1 },
|
||||
{ 0, 0, 1 },
|
||||
},
|
||||
{
|
||||
{ -1, 0, -1 },
|
||||
{ 0, 0, -1 },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 1 },
|
||||
},
|
||||
{
|
||||
{ -1, 0, 0 },
|
||||
{ -1, 0, 1 },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ 0, 0, -1 },
|
||||
{ 1, 0, -1 },
|
||||
},
|
||||
{
|
||||
{ 0, 0, 1 },
|
||||
{ 1, 0, 1 },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static s16 rotate_forbid_friction_table[][2] = {
|
||||
{ 0x0000, 0x0000 }, { 0x0001, 0x0001 }, { 0x0000, 0x0000 }, { 0x0000, 0x0000 }, { 0x0001, 0xffff },
|
||||
{ 0x0000, 0x0000 }, { 0x0001, 0x0000 }, { 0x0000, 0x0000 }, { 0x0000, 0xffff }, { 0x0001, 0x0000 },
|
||||
{ 0x0000, 0x0000 }, { 0x0000, 0x0001 }, { 0x0000, 0x0000 }, { 0xffff, 0xffff }, { 0x0000, 0x0000 },
|
||||
{ 0x0000, 0x0000 }, { 0xffff, 0x0001 }, { 0x0000, 0x0000 }, { 0xffff, 0x0000 }, { 0x0000, 0x0000 },
|
||||
{ 0x0000, 0x0001 }, { 0xffff, 0x0000 }, { 0x0000, 0x0000 }, { 0x0000, 0xffff },
|
||||
static aMR_rotate_forbid_data_c rotate_forbid_friction_table[4] = {
|
||||
{
|
||||
{
|
||||
{ 0, 0, 1 },
|
||||
{ 1, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 0, 0, 1 },
|
||||
{ -1, 0, 0 },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ 1, 0, 0 },
|
||||
{ 0, 0, -1 },
|
||||
},
|
||||
{
|
||||
{ 1, 0, 0 },
|
||||
{ 0, 0, 1 },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ 0, 0, -1 },
|
||||
{ -1, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 0, 0, -1 },
|
||||
{ 1, 0, 0 },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
{ -1, 0, 0 },
|
||||
{ 0, 0, 1 },
|
||||
},
|
||||
{
|
||||
{ -1, 0, 0 },
|
||||
{ 0, 0, -1 },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
static void aMR_SetKankyoMapping(FTR_ACTOR* ftr_actor, GAME_PLAY* play) {
|
||||
aFTR_PROFILE* profile = aMR_GetFurnitureProfile(ftr_actor->name);
|
||||
|
||||
switch (profile->kankyo_map) {
|
||||
case aFTR_KANKYO_MAP_OPA:
|
||||
Setpos_HiliteReflect_init(&ftr_actor->position, play);
|
||||
break;
|
||||
case aFTR_KANKYO_MAP_XLU:
|
||||
Setpos_HiliteReflect_xlu_init(&ftr_actor->position, play);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_LoadPallet(aFTR_PROFILE* profile, GAME* game) {
|
||||
if (profile->palette != NULL) {
|
||||
if (profile->opaque0 != NULL || profile->opaque1 != NULL || profile->rig != NULL) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPPipeSync(NEXT_POLY_OPA_DISP);
|
||||
gDPLoadTLUT_pal16(NEXT_POLY_OPA_DISP, 15, profile->palette);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
if (profile->translucent0 != NULL || profile->translucent1 != NULL || profile->rig != NULL) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPPipeSync(NEXT_POLY_XLU_DISP);
|
||||
gDPLoadTLUT_pal16(NEXT_POLY_XLU_DISP, 15, profile->palette);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_LoadTexture(aFTR_PROFILE* profile, GAME* game) {
|
||||
if (profile->texture != NULL) {
|
||||
if (profile->opaque0 != NULL || profile->opaque1 != NULL || profile->rig != NULL) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPPipeSync(NEXT_POLY_OPA_DISP);
|
||||
gDPLoadTextureBlockS(NEXT_POLY_OPA_DISP, profile->texture, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0,
|
||||
G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 7, 7, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
if (profile->translucent0 != NULL || profile->translucent1 != NULL || profile->rig != NULL) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPPipeSync(NEXT_POLY_XLU_DISP);
|
||||
gDPLoadTextureBlockS(NEXT_POLY_XLU_DISP, profile->texture, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0,
|
||||
G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 7, 7, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_SetLoopTextureAnime(FTR_ACTOR* ftr_actor, aFTR_PROFILE* profile, GAME* game) {
|
||||
aFTR_tex_anim_c* tex_anime = profile->tex_anim;
|
||||
|
||||
if (tex_anime != NULL) {
|
||||
u8* tex_p = tex_anime->animation[ftr_actor->tex_animation.frame];
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, tex_p);
|
||||
gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, tex_p);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_DrawRegistModel(aFTR_PROFILE* profile, GAME* game) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
if (profile->opaque0 != NULL || profile->opaque1 != NULL) {
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
}
|
||||
|
||||
if (profile->opaque0 != NULL) {
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, profile->opaque0);
|
||||
}
|
||||
|
||||
if (profile->opaque1 != NULL) {
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, profile->opaque1);
|
||||
}
|
||||
|
||||
if (profile->translucent0 != NULL || profile->translucent1 != NULL) {
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
}
|
||||
|
||||
if (profile->translucent0 != NULL) {
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, profile->translucent0);
|
||||
}
|
||||
|
||||
if (profile->translucent1 != NULL) {
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, profile->translucent1);
|
||||
}
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void aMR_DrawSkelShape(FTR_ACTOR* ftr_actor, aFTR_PROFILE* profile, GAME* game) {
|
||||
if (profile->rig != NULL) {
|
||||
cKF_SkeletonInfo_R_c* keyframe = &ftr_actor->keyframe;
|
||||
int mtx_idx = game->frame_counter & 1;
|
||||
Mtx* mtx = ftr_actor->skeleton_mtx[mtx_idx];
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
|
||||
cKF_Si3_draw_R_SV(game, keyframe, mtx, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_DrawUniqueShape(FTR_ACTOR* ftr_actor, ACTOR* actorx, aFTR_PROFILE* profile, GAME* game) {
|
||||
if (profile->vtable != NULL && profile->vtable->draw_proc != NULL) {
|
||||
u8* bank = aMR_FtrNo2BankAddress(ftr_actor->name);
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
|
||||
profile->vtable->draw_proc(ftr_actor, actorx, game, bank);
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_DrawItemOnMovingFurniture(ACTOR* actorx, FTR_ACTOR* ftr_actor, GAME* game) {
|
||||
MY_ROOM_ACTOR* my_room = (MY_ROOM_ACTOR*)actorx;
|
||||
aMR_parent_ftr_c* parent_ftr = &my_room->parent_ftr;
|
||||
|
||||
if (parent_ftr->ftrID == ftr_actor->id) {
|
||||
int i;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_OPA_DISP, 144);
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_XLU_DISP, 144);
|
||||
|
||||
for (i = 0; i < aMR_FIT_FTR_MAX; i++) {
|
||||
if (parent_ftr->fit_ftr_table[i].exist_flag == TRUE) {
|
||||
mActor_name_t item_no = parent_ftr->fit_ftr_table[i].item_no;
|
||||
xyz_t* pos = &parent_ftr->fit_ftr_table[i].ut_pos;
|
||||
|
||||
if (Common_Get(clip).shop_goods_clip != NULL &&
|
||||
Common_Get(clip).shop_goods_clip->single_draw_proc != NULL) {
|
||||
Common_Get(clip).shop_goods_clip->single_draw_proc(game, item_no, pos, 0.01f,
|
||||
parent_ftr->fit_ftr_table[i].angle_y +
|
||||
(ftr_actor->s_angle_y - parent_ftr->angle_y),
|
||||
mCoBG_LAYER1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
}
|
||||
|
||||
static int aMR_GetFitNo(ACTOR* actorx, FTR_ACTOR* ftr_actor) {
|
||||
MY_ROOM_ACTOR* my_room = (MY_ROOM_ACTOR*)actorx;
|
||||
aMR_parent_ftr_c* parent_ftr = &my_room->parent_ftr;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < aMR_FIT_FTR_MAX; i++) {
|
||||
if (parent_ftr->fit_ftr_table[i].ftr_ID == ftr_actor->id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void aMR_FurnitureLightSet(FTR_ACTOR* ftr_actor, GAME_PLAY* play) {
|
||||
LightsN* lights;
|
||||
xyz_t center;
|
||||
|
||||
aMR_GetFtrShapeCenter(¢er, ftr_actor);
|
||||
lights = Global_light_read(&play->global_light, play->game.graph);
|
||||
LightsN_list_check(lights, play->global_light.list, ¢er);
|
||||
LightsN_disp(lights, play->game.graph);
|
||||
}
|
||||
|
||||
static void aMR_DrawOneFurniture(FTR_ACTOR* ftr_actor, ACTOR* actorx, GAME* game, int fit_flag) {
|
||||
xyz_t ftr_scale = ftr_actor->scale;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
MY_ROOM_ACTOR* my_room = (MY_ROOM_ACTOR*)actorx;
|
||||
aFTR_PROFILE* profile;
|
||||
|
||||
profile = aMR_GetFurnitureProfile(ftr_actor->name);
|
||||
if (profile != NULL) {
|
||||
f32 scale = profile->scale;
|
||||
|
||||
_texture_z_light_fog_prim_xlu(game->graph);
|
||||
_texture_z_light_fog_prim(game->graph);
|
||||
aMR_FurnitureLightSet(ftr_actor, play);
|
||||
aMR_LoadTexture(profile, game);
|
||||
aMR_LoadPallet(profile, game);
|
||||
aMR_SetKankyoMapping(ftr_actor, play);
|
||||
|
||||
if (fit_flag == TRUE) {
|
||||
aMR_parent_ftr_c* parent_ftr = &my_room->parent_ftr;
|
||||
FTR_ACTOR* fit_ftr_p = &l_aMR_work.ftr_actor_list[parent_ftr->ftrID];
|
||||
int fit_no = aMR_GetFitNo(actorx, ftr_actor);
|
||||
s16 angle = fit_ftr_p->s_angle_y - parent_ftr->angle_y;
|
||||
aMR_fit_ftr_c* fit_ftr_info_p = &parent_ftr->fit_ftr_table[fit_no & 3];
|
||||
xyz_t* pos = &fit_ftr_info_p->pos;
|
||||
|
||||
Matrix_translate(fit_ftr_p->position.x, fit_ftr_p->position.y, fit_ftr_p->position.z, 0);
|
||||
Matrix_RotateY(angle, 1);
|
||||
Matrix_translate(fit_ftr_p->base_position.x, fit_ftr_p->base_position.y, fit_ftr_p->base_position.z, 1);
|
||||
|
||||
if (ftr_actor->name == 0x9A) { /* lower alarm clock ftr's height */
|
||||
Matrix_translate(pos->x, pos->y - 4.0f, pos->z, 1);
|
||||
} else {
|
||||
Matrix_translate(pos->x, pos->y, pos->z, 1);
|
||||
}
|
||||
|
||||
Matrix_RotateY(ftr_actor->s_angle_y, 1);
|
||||
Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, 1);
|
||||
|
||||
if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) {
|
||||
Matrix_translate(mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1);
|
||||
}
|
||||
Matrix_scale(ftr_scale.x, ftr_scale.y, ftr_scale.z, 1);
|
||||
|
||||
if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) {
|
||||
Matrix_translate(-mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1);
|
||||
}
|
||||
Matrix_scale(scale, scale, scale, 1);
|
||||
} else {
|
||||
if (ftr_actor->name == 0x9A) { /* lower alarm clock ftr's height */
|
||||
Matrix_translate(ftr_actor->position.x, ftr_actor->position.y - 4.0f, ftr_actor->position.z, 0);
|
||||
} else {
|
||||
Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, 0);
|
||||
}
|
||||
|
||||
Matrix_RotateY(ftr_actor->s_angle_y, 1);
|
||||
|
||||
if (Save_Get(scene_no) == SCENE_MUSEUM_ROOM_FOSSIL &&
|
||||
aFTR_CHECK_INTERACTION(profile->interaction_type, aFTR_INTERACTION_TYPE_FOSSIL) &&
|
||||
profile->shape <= aFTR_SHAPE_TYPEB_0) {
|
||||
Matrix_translate(ftr_actor->base_position.x + 2.5f, ftr_actor->base_position.y,
|
||||
ftr_actor->base_position.z, 1);
|
||||
} else {
|
||||
Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, 1);
|
||||
}
|
||||
|
||||
if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) {
|
||||
Matrix_translate(mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1);
|
||||
}
|
||||
Matrix_scale(ftr_scale.x, ftr_scale.y, ftr_scale.z, 1);
|
||||
|
||||
if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) {
|
||||
Matrix_translate(-mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1);
|
||||
}
|
||||
Matrix_scale(scale, scale, scale, 1);
|
||||
}
|
||||
|
||||
aMR_SetLoopTextureAnime(ftr_actor, profile, game);
|
||||
aMR_DrawRegistModel(profile, game);
|
||||
aMR_DrawSkelShape(ftr_actor, profile, game);
|
||||
aMR_DrawUniqueShape(ftr_actor, actorx, profile, game);
|
||||
aMR_DrawItemOnMovingFurniture(actorx, ftr_actor, game);
|
||||
}
|
||||
}
|
||||
|
||||
static void aMR_DrawFurniture(MY_ROOM_ACTOR* my_room, GAME_PLAY* play, int ftr_flag, u16 ftr_no) {
|
||||
ACTOR* actorx = (ACTOR*)my_room;
|
||||
GAME* game = (GAME*)play;
|
||||
int i;
|
||||
int z;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_OPA_DISP, 127);
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_XLU_DISP, 127);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
|
||||
for (z = UT_Z_NUM - 1; z >= 0; z--) {
|
||||
FTR_ACTOR* ftr_actor = l_aMR_work.ftr_actor_list;
|
||||
u8* used = l_aMR_work.used_list;
|
||||
|
||||
for (i = 0; i < l_aMR_work.list_size; i++) {
|
||||
if (*used == TRUE && mFI_POS2UT(ftr_actor->position.z) == z) {
|
||||
if ((ftr_flag == FALSE && ftr_actor->name != ftr_no) ||
|
||||
(ftr_flag == TRUE && ftr_actor->name == ftr_no)) {
|
||||
int alpha_edge;
|
||||
int fit_flag = (ftr_actor->layer == mCoBG_LAYER0 || my_room->parent_ftr.ftrID == -1 ||
|
||||
(my_room->parent_ftr.ftrID != -1 &&
|
||||
my_room->parent_ftr.fit_ftr_table[0].ftr_ID != ftr_actor->id &&
|
||||
my_room->parent_ftr.fit_ftr_table[1].ftr_ID != ftr_actor->id &&
|
||||
my_room->parent_ftr.fit_ftr_table[2].ftr_ID != ftr_actor->id &&
|
||||
my_room->parent_ftr.fit_ftr_table[3].ftr_ID != ftr_actor->id)) == FALSE;
|
||||
|
||||
alpha_edge = aMR_GetAlphaEdge(ftr_actor->name);
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_OPA_DISP, alpha_edge);
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_XLU_DISP, alpha_edge);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
|
||||
if (aMR_DrawDolphinMode(ftr_actor->name)) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetTextureAdjustMode(NEXT_POLY_OPA_DISP, G_TA_DOLPHIN);
|
||||
gDPSetTextureAdjustMode(NEXT_POLY_XLU_DISP, G_TA_DOLPHIN);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
aMR_DrawOneFurniture(ftr_actor, actorx, game, fit_flag);
|
||||
|
||||
if (aMR_DrawDolphinMode(ftr_actor->name)) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetTextureAdjustMode(NEXT_POLY_OPA_DISP, G_TA_N64);
|
||||
gDPSetTextureAdjustMode(NEXT_POLY_XLU_DISP, G_TA_N64);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ftr_actor++;
|
||||
used++;
|
||||
}
|
||||
}
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_OPA_DISP, 144);
|
||||
gDPSetTexEdgeAlpha(NEXT_POLY_XLU_DISP, 144);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void aMR_DrawLeaf(MY_ROOM_ACTOR* my_room, GAME_PLAY* play) {
|
||||
GAME* game = (GAME*)play;
|
||||
|
||||
if (my_room->leaf_info.exist_flag) {
|
||||
f32 scale = my_room->leaf_info.scale;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
_texture_z_light_fog_prim(game->graph);
|
||||
Matrix_translate(my_room->leaf_info.pos.x, my_room->leaf_info.pos.y, my_room->leaf_info.pos.z, 0);
|
||||
Matrix_scale(scale, scale, scale, 1);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, aMR_IconNo2Gfx1(my_room->pickup_info.icon));
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, aMR_IconNo2Gfx2(my_room->pickup_info.icon));
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
|
||||
my_room->leaf_info.exist_flag = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void My_Room_Actor_draw(ACTOR* actorx, GAME* game) {
|
||||
MY_ROOM_ACTOR* my_room = (MY_ROOM_ACTOR*)actorx;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
aMR_DrawFurniture(my_room, play, FALSE, 0x41C); /* lighthouse model */
|
||||
aMR_DrawFurniture(my_room, play, TRUE, 0x41C); /* lighthouse model */
|
||||
aMR_DrawLeaf(my_room, play);
|
||||
}
|
||||
+22
-20
@@ -5,16 +5,16 @@ typedef struct process_info_s {
|
||||
s16 unit_ofs[4];
|
||||
} aMR_process_info_c;
|
||||
|
||||
static aMR_process_info_c aMR_process_typeB90 = { 2, { 0, -UT_X_NUM, 0, 0 } };
|
||||
static aMR_process_info_c aMR_process_typeB180 = { 2, { 0, -1, 0, 0 } };
|
||||
static aMR_process_info_c aMR_process_typeB270 = { 2, { 0, UT_X_NUM, 0, 0 } };
|
||||
static aMR_process_info_c aMR_process_typeB0 = { 2, { 0, 1, 0, 0 } };
|
||||
static aMR_process_info_c aMR_process_typeA = { 1, { 0, 0, 0, 0 } };
|
||||
static aMR_process_info_c aMR_process_typeC = { 4, { 0, 1, UT_X_NUM, UT_X_NUM + 1 } };
|
||||
static aMR_process_info_c aMR_poccess_typeB90 = { 2, { 0, -UT_X_NUM, 0, 0 } };
|
||||
static aMR_process_info_c aMR_poccess_typeB180 = { 2, { 0, -1, 0, 0 } };
|
||||
static aMR_process_info_c aMR_poccess_typeB270 = { 2, { 0, UT_X_NUM, 0, 0 } };
|
||||
static aMR_process_info_c aMR_poccess_typeB0 = { 2, { 0, 1, 0, 0 } };
|
||||
static aMR_process_info_c aMR_poccess_typeA = { 1, { 0, 0, 0, 0 } };
|
||||
static aMR_process_info_c aMR_poccess_typeC = { 4, { 0, 1, UT_X_NUM, UT_X_NUM + 1 } };
|
||||
|
||||
static aMR_process_info_c* aMR_process_table[aFTR_SHAPE_TYPE_NUM] = {
|
||||
&aMR_process_typeB90, &aMR_process_typeB180, &aMR_process_typeB270,
|
||||
&aMR_process_typeB0, &aMR_process_typeA, &aMR_process_typeC,
|
||||
static aMR_process_info_c* aMR_poccess_table[aFTR_SHAPE_TYPE_NUM] = {
|
||||
&aMR_poccess_typeB90, &aMR_poccess_typeB180, &aMR_poccess_typeB270,
|
||||
&aMR_poccess_typeB0, &aMR_poccess_typeA, &aMR_poccess_typeC,
|
||||
};
|
||||
|
||||
static int aMR_GetFurniturePoccessUnitNo(int* ut_info, int ut_x, int ut_z, u8 type) {
|
||||
@@ -22,7 +22,7 @@ static int aMR_GetFurniturePoccessUnitNo(int* ut_info, int ut_x, int ut_z, u8 ty
|
||||
int ut = ut_x + ut_z * UT_X_NUM;
|
||||
|
||||
if (type < aFTR_SHAPE_TYPE_NUM) {
|
||||
aMR_process_info_c* process_info = aMR_process_table[type];
|
||||
aMR_process_info_c* process_info = aMR_poccess_table[type];
|
||||
int count = process_info->unit_count;
|
||||
int i;
|
||||
|
||||
@@ -360,19 +360,19 @@ static void aMR_SetCleanUpFtrSE(xyz_t pos) {
|
||||
}
|
||||
|
||||
static int aMR_GetPlayerDirect(const f32* normal_xz) {
|
||||
if (normal_xz[0] > (F_PI / 4.0f)) {
|
||||
if (normal_xz[0] > F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_LEFT;
|
||||
}
|
||||
|
||||
if (normal_xz[0] < -(F_PI / 4.0f)) {
|
||||
if (normal_xz[0] < -F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_RIGHT;
|
||||
}
|
||||
|
||||
if (normal_xz[1] > (F_PI / 4.0f)) {
|
||||
if (normal_xz[1] > F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_UP;
|
||||
}
|
||||
|
||||
if (normal_xz[1] < -(F_PI / 4.0f)) {
|
||||
if (normal_xz[1] < -F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_DOWN;
|
||||
}
|
||||
|
||||
@@ -397,19 +397,19 @@ static void aMR_MoveShapeCenter(FTR_ACTOR* ftr_actor) {
|
||||
}
|
||||
|
||||
static int aMR_Norm2DirectName(f32* normal_xz) {
|
||||
if (normal_xz[0] > (F_PI / 4.0f)) {
|
||||
if (normal_xz[0] > F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_RIGHT;
|
||||
}
|
||||
|
||||
if (normal_xz[0] <= -(F_PI / 4.0f)) {
|
||||
if (normal_xz[0] <= -F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_LEFT;
|
||||
}
|
||||
|
||||
if (normal_xz[1] > (F_PI / 4.0f)) {
|
||||
if (normal_xz[1] > F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_DOWN;
|
||||
}
|
||||
|
||||
if (normal_xz[1] <= -(F_PI / 4.0f)) {
|
||||
if (normal_xz[1] <= -F_SQRT2_DIV2) {
|
||||
return aMR_DIRECT_UP;
|
||||
}
|
||||
|
||||
@@ -1332,6 +1332,8 @@ static void aMR_MngFtrContactAction(ACTOR* actorx, GAME* game) {
|
||||
}
|
||||
}
|
||||
|
||||
#include "../src/ac_my_room_action.c_inc"
|
||||
|
||||
static f32 aMR_GetDistXZ(const xyz_t* pos0, const xyz_t* pos1) {
|
||||
f32 diff_x = pos0->x - pos1->x;
|
||||
f32 diff_z = pos0->z - pos1->z;
|
||||
@@ -1472,14 +1474,14 @@ static int aMR_CheckPlaceSituation(int ut, int target_ut, u16 ftr_no, u16 angle_
|
||||
aFTR_PROFILE* profile = aMR_GetFurnitureProfile(ftr_no);
|
||||
|
||||
if (profile != NULL) {
|
||||
u32 shape = profile->shape;
|
||||
u8 shape = profile->shape;
|
||||
|
||||
if (shape == aFTR_SHAPE_TYPEB_0) {
|
||||
static u8 rotate_angle_types[] = {
|
||||
aFTR_SHAPE_TYPEB_0,
|
||||
aFTR_SHAPE_TYPEB_90,
|
||||
aFTR_SHAPE_TYPEB_180,
|
||||
aFTR_SHAPE_TYPEB_270,
|
||||
aFTR_SHAPE_TYPEB_0,
|
||||
};
|
||||
|
||||
shape = rotate_angle_types[angle_idx & 3];
|
||||
|
||||
@@ -147,7 +147,6 @@ static void aMR_SetEmulatorStartMessage(ACTOR* actorx, int internal_rom) {
|
||||
mMsg_Unset_LockContinue(mMsg_Get_base_window_p());
|
||||
mMsg_Set_ForceNext(mMsg_Get_base_window_p());
|
||||
break;
|
||||
case FAMICOM_RESULT_NOFILE:
|
||||
default:
|
||||
mMsg_Set_continue_msg_num(mMsg_Get_base_window_p(), 0x3071);
|
||||
mMsg_Unset_LockContinue(mMsg_Get_base_window_p());
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ extern void sAdo_SetVoiceMode(u8 mode) {
|
||||
Na_SetVoiceMode(mode);
|
||||
}
|
||||
|
||||
extern void sAdo_FloorTrgStart(u16 id, const xyz_t* pos) {
|
||||
extern void sAdo_FloorTrgStart(u8 id, const xyz_t* pos) {
|
||||
|
||||
u16 scalc;
|
||||
f32 fcalc;
|
||||
|
||||
+15
-22
@@ -608,18 +608,18 @@ extern void Actor_get_overlay_area(ACTOR_DLFTBL* dlftbl, int unused, size_t allo
|
||||
}
|
||||
}
|
||||
|
||||
static int Actor_data_bank_regist_check_npc(int* bank_id, ACTOR_PROFILE* profile, ACTOR_DLFTBL* dlftbl, GAME* game,
|
||||
static int Actor_data_bank_regist_check_npc(int* bank_id, ACTOR_PROFILE* profile, ACTOR_DLFTBL* dlftbl, GAME_PLAY* play,
|
||||
mActor_name_t name_id) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int Actor_data_bank_regist_check(int* bank_id, ACTOR_PROFILE* profile, ACTOR_DLFTBL* dlftbl, GAME* game,
|
||||
static int Actor_data_bank_regist_check(int* bank_id, ACTOR_PROFILE* profile, ACTOR_DLFTBL* dlftbl, GAME_PLAY* play,
|
||||
mActor_name_t name_id) {
|
||||
int res = TRUE;
|
||||
|
||||
if (*bank_id == -1) {
|
||||
if (profile->part == ACTOR_PART_NPC) {
|
||||
res = Actor_data_bank_regist_check_npc(bank_id, profile, dlftbl, game, name_id);
|
||||
res = Actor_data_bank_regist_check_npc(bank_id, profile, dlftbl, play, name_id);
|
||||
} else {
|
||||
// in DnM, this was another func call
|
||||
res = TRUE;
|
||||
@@ -687,31 +687,32 @@ extern void Actor_init_actor_class(ACTOR* actor, ACTOR_PROFILE* profile, ACTOR_D
|
||||
actor->npc_id = name_id;
|
||||
}
|
||||
|
||||
#ifndef MUST_MATCH
|
||||
/* @nonmatching */
|
||||
typedef struct overlay_struct {
|
||||
const char* actor_name;
|
||||
} mAc_overlay_info_c;
|
||||
|
||||
extern ACTOR* Actor_info_make_actor(Actor_info* actor_info, GAME* game, s16 profile_no, f32 x, f32 y, f32 z, s16 rot_x,
|
||||
s16 rot_y, s16 rot_z, s8 block_x, s8 block_z, s16 move_actor_list_idx,
|
||||
mActor_name_t name_id, s16 arg, s8 npc_info_idx, int data_bank_idx) {
|
||||
const char* test = "";
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
GAME_PLAY* play;
|
||||
ACTOR* actor;
|
||||
ACTOR_PROFILE* profile;
|
||||
ACTOR_DLFTBL* dlftbl;
|
||||
mAc_overlay_info_c overlay_info; /* Required to be a struct, stubbed in GC */
|
||||
|
||||
test = ""; // removing this line helps a bit...
|
||||
|
||||
dlftbl = &actor_dlftbls[profile_no];
|
||||
|
||||
play = (GAME_PLAY*)game;
|
||||
dlftbl = actor_dlftbls + profile_no;
|
||||
overlay_info.actor_name = "";
|
||||
if (actor_info->total_num > mAc_MAX_ACTORS) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
profile = dlftbl->profile;
|
||||
if (Actor_data_bank_regist_check(&data_bank_idx, profile, dlftbl, game, name_id) == FALSE) {
|
||||
if (Actor_data_bank_regist_check(&data_bank_idx, profile, dlftbl, play, name_id) == FALSE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (Actor_malloc_actor_class(&actor, profile, dlftbl, test, name_id) == FALSE) {
|
||||
if (Actor_malloc_actor_class(&actor, profile, dlftbl, overlay_info.actor_name, name_id) == FALSE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -720,18 +721,10 @@ extern ACTOR* Actor_info_make_actor(Actor_info* actor_info, GAME* game, s16 prof
|
||||
move_actor_list_idx, name_id, arg);
|
||||
Actor_info_part_new(actor_info, actor, profile->part);
|
||||
mNpc_SetNpcinfo(actor, npc_info_idx);
|
||||
Actor_ct(actor, (GAME*)play);
|
||||
Actor_ct(actor, game);
|
||||
|
||||
return actor;
|
||||
}
|
||||
#else
|
||||
extern asm ACTOR* Actor_info_make_actor(Actor_info* actor_info, GAME* game, s16 profile_no, f32 x, f32 y, f32 z,
|
||||
s16 rot_x, s16 rot_y, s16 rot_z, s8 block_x, s8 block_z,
|
||||
s16 move_actor_list_idx, mActor_name_t name_id, s16 arg, s8 npc_info_idx,
|
||||
int data_bank_idx) {
|
||||
#include "asm/80375830.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
extern ACTOR* Actor_info_make_child_actor(Actor_info* actor_info, ACTOR* parent_actor, GAME* game, s16 profile, f32 x,
|
||||
f32 y, f32 z, s16 rot_x, s16 rot_y, s16 rot_z, s16 move_actor_list_idx,
|
||||
|
||||
Reference in New Issue
Block a user