mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-07 03:55:01 -04:00
Merge branch 'master' of https://github.com/Prakxo/ac-decomp
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#ifndef M_BG_TEX_H
|
||||
#define M_BG_TEX_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct bg_tex_obj_s {
|
||||
void* data;
|
||||
size_t size;
|
||||
} mBGTex_obj_c;
|
||||
|
||||
extern u8 sprashC_tex_dummy[];
|
||||
extern u8 sprashA_tex_dummy[];
|
||||
extern u8 wave3_tex_dummy[];
|
||||
extern u8 wave2_tex_dummy[];
|
||||
extern u8 wave1_tex_dummy[];
|
||||
extern u8 sand_tex_dummy[];
|
||||
extern u8 beach_pal_dummy2[];
|
||||
extern u8 beach2_tex_dummy2[];
|
||||
extern u8 beach1_tex_dummy2[];
|
||||
extern u8 beach_tex_dummy[];
|
||||
extern u8 tunnel_tex_dummy[];
|
||||
extern u8 rail_pal_dummy[];
|
||||
extern u8 bush_pal_dummy[];
|
||||
extern u8 cliff_pal_dummy[];
|
||||
extern u8 earth_pal_dummy[];
|
||||
extern u8 station_pal_dummy[];
|
||||
extern u8 bridge_2_pal_dummy[];
|
||||
extern u8 bridge_1_pal_dummy[];
|
||||
extern u8 tekkyo_tex_dummy[];
|
||||
extern u8 bridge_2_tex_dummy[];
|
||||
extern u8 bridge_1_tex_dummy[];
|
||||
extern u8 water_2_tex_dummy[];
|
||||
extern u8 water_1_tex_dummy[];
|
||||
extern u8 river_tex_dummy[];
|
||||
extern u8 stone_tex_dummy[];
|
||||
extern u8 station_tex_dummy[];
|
||||
extern u8 rail_tex_dummy[];
|
||||
extern u8 grass_tex_dummy[];
|
||||
extern u8 bush_b_tex_dummy[];
|
||||
extern u8 bush_a_tex_dummy[];
|
||||
extern u8 cliff_tex_dummy[];
|
||||
extern u8 earth_tex_dummy[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -14,6 +14,7 @@ extern void mBGMPsComp_scene_mode(int scene_mode);
|
||||
extern void mBGMPsComp_make_ps_wipe(u16 ps_wipe);
|
||||
extern void mBGMPsComp_delete_ps_demo(u8 bgm_num, u16 stop_type);
|
||||
extern void mBGMPsComp_make_ps_demo(u8 bgm_no, u16 stop_type);
|
||||
extern void mBGMPsComp_museum_status(int museum_status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ extern int mCoBG_BnumUnum2HoleNumber(int block_x, int block_z, int ut_x, int ut_
|
||||
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 int mCoBG_Change2PoorAttr(mCoBG_Collision_u* col);
|
||||
|
||||
extern void mCoBG_InitMoveBgData();
|
||||
extern void mCoBG_InitBlockBgCheckMode();
|
||||
|
||||
@@ -209,13 +209,16 @@ typedef struct common_data_s {
|
||||
/* 0x02852E */ s16 goods_power;
|
||||
/* 0x028530 */ Door_data_c door_data; /* misc door data */
|
||||
/* 0x028544 */ Door_data_c structure_exit_door_data; /* door data for when exiting a building */
|
||||
/* 0x028558 */ u8 tmp1[0x028592 - 0x028558];
|
||||
/* 0x028558 */ u8 tmp1[0x028591 - 0x028558];
|
||||
/* 0x028591 */ u8 floor_idx;
|
||||
/* 0x028592 */ s16 demo_profiles[mDemo_CLIP_TYPE_NUM - 1];
|
||||
/* 0x028596 */ u8 _28596[0x285C0 - 0x28596];
|
||||
/* 0x0285C0 */ s8 player_decoy_flag;
|
||||
/* 0x0285C1 */ u8 _285C1[0x0285C6 - 0x0285C1];
|
||||
/* 0x0285C1 */ u8 _285C1;
|
||||
/* 0x0285C2 */ u8 make_npc2_actor;
|
||||
/* 0x0285C3 */ u8 _285C3[0x0285C6 - 0x0285C3];
|
||||
/* 0x0285C6 */ u8 event_id;
|
||||
/* 0x0285C7 */ u8 _285C3[0x0287F8 - 0x0285C7];
|
||||
/* 0x0285C7 */ u8 _285C7[0x0287F8 - 0x0285C7];
|
||||
/* 0x0287F8 */ s8 current_famicom_rom;
|
||||
/* 0x0287F9 */ s8 famicom_287F9;
|
||||
/* 0x0287FA */ u8 _287FA[0x28838 - 0x0287FA];
|
||||
|
||||
@@ -244,6 +244,7 @@ extern int mEv_ArbeitPlayer(u32 player_no);
|
||||
extern u16 mEv_get_special_event_type();
|
||||
extern int mEv_ClearEventSaveInfo(mEv_event_save_c* event_save_data);
|
||||
extern void mEv_EventON(u32 event_kind);
|
||||
extern int mEv_CheckGateway();
|
||||
|
||||
extern int mEv_weekday2day(lbRTC_month_t month, int week_type, lbRTC_weekday_t weekday);
|
||||
extern void mEv_ClearEventInfo();
|
||||
|
||||
+17
-1
@@ -5,7 +5,7 @@
|
||||
#include "libu64/gfxprint.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_collision_bg.h"
|
||||
|
||||
#include "m_field_make.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -18,6 +18,12 @@ extern "C" {
|
||||
#define mFI_UT_WORLDSIZE_X_F ((f32)mFI_UT_WORLDSIZE_X)
|
||||
#define mFI_UT_WORLDSIZE_Z_F ((f32)mFI_UT_WORLDSIZE_Z)
|
||||
|
||||
#define mFI_UT_WORLDSIZE_HALF_X_F (mFI_UT_WORLDSIZE_X_F / 2.0f)
|
||||
#define mFI_UT_WORLDSIZE_HALF_Z_F (mFI_UT_WORLDSIZE_X_F / 2.0f)
|
||||
|
||||
#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_ROW_TO_CHARSTR(row) ((row) + 'A')
|
||||
#define mFI_COL_TO_CHARSTR(col) ((col) + '0')
|
||||
|
||||
@@ -164,6 +170,16 @@ extern f32 mFI_GetBlockWidth();
|
||||
extern f32 mFI_GetBlockHeight();
|
||||
extern int mFI_Wpos2BkandUtNuminBlock(int* block_x, int* block_z, int* ut_x, int* ut_z, xyz_t wpos);
|
||||
extern int mFI_GetItemNumOnBlockInField(int block_x, int block_z, mActor_name_t start_item, mActor_name_t end_item);
|
||||
extern int mFI_CheckShopFieldName(mActor_name_t field_name);
|
||||
extern int mFI_GetMoveActorListIdx(mFM_move_actor_c* move_actor_list, int list_size, mActor_name_t name);
|
||||
extern int mFI_GetNowPlayerHouseFloorNo();
|
||||
extern int mFI_BlockUtNumtoFGSet(mActor_name_t item, int bx, int bz, int ut_x, int ut_z);
|
||||
extern void mFI_InitMoveActorBitData();
|
||||
extern void mFI_ClearColKeep();
|
||||
extern void mFI_InitAreaInfo();
|
||||
extern void mFI_InitRegisterBgInfo();
|
||||
extern mFM_block_info_c* mFI_GetBlockTopP();
|
||||
extern int mFI_GetBlockNum(int block_x, int block_z);
|
||||
|
||||
extern void mFI_PrintNowBGNum(gfxprint_t* gfxprint);
|
||||
extern void mFI_PrintFgAttr(gfxprint_t* gfxprint);
|
||||
|
||||
+138
-7
@@ -5,7 +5,9 @@
|
||||
#include "m_actor_type.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
#include "game_h.h"
|
||||
#include "m_play.h"
|
||||
#include "m_play_h.h"
|
||||
#include "evw_anime.h"
|
||||
#include "m_collision_bg.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -34,6 +36,21 @@ extern "C" {
|
||||
#define BLOCKXZ_2_BLOCKIDX(x, z) ((z) * BLOCK_X_NUM + (x))
|
||||
|
||||
#define mFM_VISIBLE_BLOCK_NUM 4 /* number of visible blocks (nearest to the Player) */
|
||||
#define mFM_SOUND_SOURCE_NUM 6
|
||||
#define mFM_MOVE_ACTOR_NUM 16
|
||||
#define mFM_HANIWA_STEP_NUM 4
|
||||
|
||||
#define mFM_BG_ID_MAX 293
|
||||
|
||||
#define mFM_FG_START 0
|
||||
#define mFM_FG_NUM 416
|
||||
#define mFM_FG_NPC_START mFM_FG_NUM
|
||||
#define mFM_FG_NPC_NUM 536
|
||||
#define mFM_FG_ID_MAX (mFM_FG_NUM + mFM_FG_NPC_NUM)
|
||||
#define mFM_FG2_ID_MAX 743
|
||||
|
||||
#define mFM_FIELD_PAL_NUM 12
|
||||
#define mFM_FIELD_TEX_NUM 27
|
||||
|
||||
/* sizeof(mFM_combination_c) == 2 */
|
||||
typedef struct block_combination_s {
|
||||
@@ -73,30 +90,144 @@ typedef struct field_pal_s {
|
||||
u16* golden_tree_pal;
|
||||
} mFM_field_pal_c;
|
||||
|
||||
typedef struct field_bg_sound_source_s {
|
||||
s16 kind;
|
||||
xyz_t pos;
|
||||
} mFM_bg_sound_source_c;
|
||||
|
||||
typedef struct field_bg_info_s {
|
||||
mFM_combination_c bg_id;
|
||||
Gfx* oapque_gfx;
|
||||
Gfx* opaque_gfx;
|
||||
Gfx* translucent_gfx;
|
||||
|
||||
EVW_ANIME_DATA* animation;
|
||||
s8 animation_count;
|
||||
u8 block_type;
|
||||
u32 block_kind;
|
||||
int _18;
|
||||
int _1C;
|
||||
mCoBG_Collision_u collision[UT_Z_NUM][UT_X_NUM];
|
||||
u8 keep_h[UT_Z_NUM][UT_X_NUM]; // base height?
|
||||
mFM_bg_sound_source_c sound_source[mFM_SOUND_SOURCE_NUM];
|
||||
} mFM_bg_info_c;
|
||||
|
||||
typedef struct field_fg_move_actor_s {
|
||||
mActor_name_t name_id;
|
||||
s8 ut_x;
|
||||
s8 ut_z;
|
||||
s8 npc_info_idx;
|
||||
s16 arg;
|
||||
} mFM_move_actor_c;
|
||||
|
||||
typedef struct field_fg_move_actor_data_s {
|
||||
mActor_name_t name_id;
|
||||
int block_x;
|
||||
int block_z;
|
||||
u8 ut_x;
|
||||
u8 ut_z;
|
||||
s8 npc_info_idx;
|
||||
s16 arg;
|
||||
u32 desired_block_kind;
|
||||
} mFM_move_actor_data_c;
|
||||
|
||||
typedef struct field_fg_info_s {
|
||||
mActor_name_t fg_id;
|
||||
mActor_name_t* items_p;
|
||||
u16* deposit_p;
|
||||
mFM_move_actor_c move_actors[mFM_MOVE_ACTOR_NUM];
|
||||
u16 move_actor_bit_data;
|
||||
u8 haniwa_step[mFM_HANIWA_STEP_NUM];
|
||||
} mFM_fg_info_c;
|
||||
|
||||
typedef struct field_block_info_s {
|
||||
mFM_bg_info_c bg_info;
|
||||
mFM_fg_info_c fg_info;
|
||||
} mFM_block_info_c;
|
||||
|
||||
typedef struct field_bg_sound_source_data_s {
|
||||
s16 kind;
|
||||
u8 ut_x;
|
||||
u8 ut_z;
|
||||
} mFM_bg_sound_source_data_c;
|
||||
|
||||
typedef struct field_bg_data_s {
|
||||
mActor_name_t bg_id;
|
||||
Gfx* opaque_gfx;
|
||||
Gfx* translucent_gfx;
|
||||
EVW_ANIME_DATA* animation;
|
||||
s8 animation_count;
|
||||
u32 _14;
|
||||
u32 _18;
|
||||
mCoBG_Collision_u collision[UT_Z_NUM][UT_X_NUM];
|
||||
mFM_bg_sound_source_data_c sound_source[mFM_SOUND_SOURCE_NUM];
|
||||
} mFM_bg_data_c;
|
||||
|
||||
typedef struct field_fg_data_s {
|
||||
mActor_name_t fg_id;
|
||||
mActor_name_t items[UT_Z_NUM][UT_X_NUM];
|
||||
u8 haniwa_step[mFM_HANIWA_STEP_NUM];
|
||||
} mFM_fg_data_c;
|
||||
|
||||
typedef struct field_data_s {
|
||||
mActor_name_t field_name;
|
||||
u8 block_x_max;
|
||||
u8 block_z_max;
|
||||
mFM_combination_c combi[BLOCK_TOTAL_NUM];
|
||||
mFM_move_actor_data_c* move_actor_data;
|
||||
u32 _94;
|
||||
u32 _98;
|
||||
u32 _9C;
|
||||
u32 _A0;
|
||||
} mFM_field_data_c;
|
||||
|
||||
typedef struct field_info_s {
|
||||
mActor_name_t field_id;
|
||||
u32 _04; // only set, never read?
|
||||
mFM_field_draw_info_c bg_draw_info[mFM_VISIBLE_BLOCK_NUM];
|
||||
u8* bg_display_list_p[mFM_VISIBLE_BLOCK_NUM];
|
||||
mFM_field_pal_c field_palette;
|
||||
|
||||
mFM_block_info_c* block_info;
|
||||
mActor_name_t** fg2_p;
|
||||
int last_bg_idx[mFM_VISIBLE_BLOCK_NUM];
|
||||
u16 bg_max;
|
||||
u8 bg_num;
|
||||
u8 update_fg;
|
||||
u8 born_item;
|
||||
u8 born_actor;
|
||||
u8 block_x_max;
|
||||
u8 block_z_max;
|
||||
} mFM_fdinfo_c;
|
||||
|
||||
enum {
|
||||
mFM_BG_TEX_TRIANGLE,
|
||||
mFM_BG_TEX_SQUARE,
|
||||
mFM_BG_TEX_CIRCLE,
|
||||
|
||||
mFM_BG_TEX_NUM
|
||||
};
|
||||
|
||||
extern u8* g_block_type_p;
|
||||
extern int* g_block_kind_p;
|
||||
|
||||
extern void mFM_FieldInit(GAME_PLAY*);
|
||||
extern void mFM_Field_dt();
|
||||
extern mFM_fdinfo_c* g_fdinfo;
|
||||
extern int l_bg_disp_num;
|
||||
extern int l_bg_disp_size;
|
||||
|
||||
extern mFM_bg_data_c data_bgd[];
|
||||
extern int data_bgd_number;
|
||||
|
||||
extern void mFM_GetPolicePos(int* bx, int* bz, int* ut_x, int* ut_z);
|
||||
extern void mFM_DecideBgTexIdx(u8* bg_tex_idx);
|
||||
extern void mFM_SetFieldInitData(int bg_disp_num, int bg_disp_size);
|
||||
extern void mFM_FieldInit(GAME_PLAY* play);
|
||||
extern void mFM_Field_dt();
|
||||
extern void mFM_SetBlockKindLoadCombi();
|
||||
extern void mFM_InitFgCombiSaveData(GAME* game);
|
||||
extern mActor_name_t mFM_GetReserveName(int block_x, int block_z);
|
||||
extern void mFM_RenewalReserve();
|
||||
extern mActor_name_t mFM_GetReseveName(int bx, int bz);
|
||||
extern void mFM_toSummer();
|
||||
extern void mFM_returnSeason();
|
||||
extern void mFM_RestoreIslandBG(int* island_x_blocks, int bx_num);
|
||||
extern void mFM_SetIslandNpcRoomData(GAME* game, int malloc_flag);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1306,6 +1306,8 @@ extern mActor_name_t bg_item_fg_sub_tree_grow(mActor_name_t tree, int past_days,
|
||||
#define RSV_WALL_NO 0xFFFE /* interior wall item, no collision */
|
||||
#define RSV_NO 0xFFFF /* reserved space, can't interact but no collision */
|
||||
|
||||
#define mNT_IS_RESERVE(n) ((n) >= SIGN00 && (n) <= SIGN20)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "m_quest.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_private_h.h"
|
||||
#include "m_field_make.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -232,6 +233,13 @@ extern u8 mNpc_CheckNormalMail_length(int* len, u8* body);
|
||||
extern mActor_name_t mNpc_GetNpcFurniture(AnmPersonalID_c* pid);
|
||||
extern void mNpc_GetNpcWorldNameTableNo(u8* buf, mActor_name_t name_id);
|
||||
extern void mNpc_GetRandomAnimalName(u8* buf);
|
||||
extern int mNpc_GetIslandRoomFtrNum();
|
||||
extern mActor_name_t* mNpc_GetIslandRoomP(mActor_name_t npc_name);
|
||||
extern void mNpc_ChangeIslandRoom(mActor_name_t* items);
|
||||
extern void mNpc_SetNpcFurnitureRandom(mFM_fg_data_c** fg_data_list, int fg_name_start);
|
||||
extern void mNpc_SetNpcHomeYpos();
|
||||
extern void mNpc_SendRegisteredGoodbyMail();
|
||||
extern void mNpc_IslandNpcRoomDataSet(mFM_fg_data_c** sorted_fg_data_list, int fg_name_start);
|
||||
|
||||
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
|
||||
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "types.h"
|
||||
#include "m_random_field_h.h"
|
||||
#include "m_field_make.h"
|
||||
#include "game_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -58,6 +59,7 @@ typedef struct gate_s {
|
||||
int ut1;
|
||||
} mRF_gate_c;
|
||||
|
||||
extern void mRF_MakeRandomField(mFM_combination_c* combi_table, mFM_combo_info_c* combo_info, int combo_count, GAME* game);
|
||||
extern u32 mRF_Type2BlockInfo(u8 type);
|
||||
extern int mRF_SearchPond(int* ut_x, int* ut_z, int block_x, int block_z);
|
||||
extern mRF_gate_c* mRF_BlockTypeDirect2GateData(int* gate_count, u8 block_type, int direct);
|
||||
|
||||
@@ -123,5 +123,7 @@ extern int mRmTp_PleaseDrawLightSwitch();
|
||||
extern mActor_name_t mRmTp_Item1ItemNo2FtrItemNo_AtPlayerRoom(mActor_name_t item_no, int flag);
|
||||
extern void mRmTp_SetDefaultLightSwitchData(int state);
|
||||
extern int mRmTp_GetEntranceBasePosition(xyz_t* pos);
|
||||
extern mActor_name_t mRmTp_GetPlayerRoomCollisionIdx(mActor_name_t field_name, mActor_name_t bg_name);
|
||||
extern u8 mRmTp_GetFloorIdx();
|
||||
|
||||
#endif
|
||||
@@ -79,6 +79,14 @@ enum scene_table {
|
||||
SCENE_NUM
|
||||
};
|
||||
|
||||
#define mSc_IS_SCENE_PLAYER_ROOM(scene) \
|
||||
((scene) == SCENE_MY_ROOM_S || (scene) == SCENE_MY_ROOM_M || (scene) == SCENE_MY_ROOM_L || \
|
||||
(scene) == SCENE_MY_ROOM_LL1 || (scene) == SCENE_MY_ROOM_LL2 || (scene) == SCENE_MY_ROOM_BASEMENT_S || \
|
||||
(scene) == SCENE_MY_ROOM_BASEMENT_M || (scene) == (SCENE_MY_ROOM_BASEMENT_L) || (scene) == SCENE_MY_ROOM_BASEMENT_LL1 || \
|
||||
(scene) == SCENE_COTTAGE_MY)
|
||||
|
||||
#define mSc_IS_SCENE_MUSEUM_ROOM(scene) \
|
||||
((scene) >= SCENE_MUSEUM_ENTRANCE && (scene) <= SCENE_MUSEUM_ROOM_FISH)
|
||||
|
||||
extern Scene_status_c scene_data_status[SCENE_NUM];
|
||||
|
||||
|
||||
@@ -140,6 +140,8 @@ extern int mSP_SearchItemCategoryPriority(mActor_name_t item_no, int category, i
|
||||
extern mActor_name_t mSP_RandomOneFossilSelect(int multi_fossil);
|
||||
extern mActor_name_t mSP_RandomHaniwaSelect(mActor_name_t* item_buf, int num);
|
||||
extern mActor_name_t mSP_SelectFishginPresent(int player_no);
|
||||
extern mActor_name_t mSP_GetNowShopFgNum();
|
||||
extern mActor_name_t mSP_GetNowShopBgNum();
|
||||
|
||||
extern void mItemDebug_ItemDebugMain();
|
||||
extern void mItemDebug_ItemDebugDraw(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef M_SONCHO_H
|
||||
#define M_SONCHO_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern u32 mSC_check_ArbeitPlayer();
|
||||
extern int mSC_LightHouse_travel_check();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user