diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2023-01-05 00:45:37 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-05 00:45:37 -0800 |
| commit | 2f764d277f50653b02fba34f38171473d4217ce6 (patch) | |
| tree | fe00693afa51d5aa1ff5719b4ccb7935f5b4d536 /include/d | |
| parent | e1114ebcf9bcadb3a82355c68c09b308ad3f9606 (diff) | |
| parent | 7303100d9b6374ee2ec235a1b752fb512e7e4eaa (diff) | |
Merge pull request #240 from TakaRikka/room
d_s_room / d_a_bg first pass
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/bg/d_bg_w_base.h | 5 | ||||
| -rw-r--r-- | include/d/com/d_com_inf_game.h | 31 | ||||
| -rw-r--r-- | include/d/com/d_com_static.h | 5 | ||||
| -rw-r--r-- | include/d/d_demo.h | 1 | ||||
| -rw-r--r-- | include/d/d_stage.h | 36 | ||||
| -rw-r--r-- | include/d/kankyo/d_kankyo.h | 2 | ||||
| -rw-r--r-- | include/d/particle/d_particle.h | 2 |
7 files changed, 76 insertions, 6 deletions
diff --git a/include/d/bg/d_bg_w_base.h b/include/d/bg/d_bg_w_base.h index 0564f0f4a7..d18386aeea 100644 --- a/include/d/bg/d_bg_w_base.h +++ b/include/d/bg/d_bg_w_base.h @@ -17,6 +17,10 @@ class dBgW_Base : public cBgW_BgId { public: enum PushPullLabel {}; + enum PRIORITY { + PRIORITY_0, + }; + typedef s32 (*PushPull_CallBack)(cBgS_PolyInfo const&, fopAc_ac_c*, s16, dBgW_Base::PushPullLabel); @@ -91,6 +95,7 @@ public: bool ChkPushPullOk() const { return m_pushPull_Ok; } void SetRoomId(int id) { m_roomId = id; } bool ChkPriority(int prio) { return m_priority == prio; } + void SetPriority(PRIORITY priority) { m_priority = priority; } private: /* 0x08 */ u8 m_priority; diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index cdb09b53fc..b6187c81c0 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -825,6 +825,7 @@ BOOL dComIfGs_isEventBit(u16 i_flag); int dComIfGs_isItemFirstBit(u8 i_no); u16 dComIfGs_getRupee(); static u16 dComIfGs_getLife(); +s8 dComIfGs_BossLife_public_Get(); inline void dComIfGs_init() { g_dComIfG_gameInfo.info.init(); @@ -1523,6 +1524,10 @@ inline void dComIfGs_setMemoryToCard(u8* i_saveData, int i_dataNum) { g_dComIfG_gameInfo.info.memory_to_card((char*)i_saveData, i_dataNum); } +inline int dComIfGs_createZone(int roomNo) { + return g_dComIfG_gameInfo.info.createZone(roomNo); +} + void dComIfGp_setSelectItem(int index); s32 dComIfGp_offHeapLockFlag(int flag); @@ -1544,6 +1549,7 @@ int dComIfGp_getSelectItemMaxNum(int index); void dComIfGp_mapShow(); void dComIfGp_mapHide(); bool dComIfGp_checkMapShow(); +void dComIfGp_ret_wp_set(s8); s32 dComIfGp_setHeapLockFlag(u8 flag); u8 dComIfGp_world_dark_get(); JKRExpHeap* dComIfGp_getSubHeap2D(int flag); @@ -1567,6 +1573,7 @@ static u8 dComIfGp_getDoStatus(); static u8 dComIfGp_getRStatus(); static dAttCatch_c* dComIfGp_att_getCatghTarget(); static void dComIfGp_setBottleStatus(u8 param_0, u8 param_1); +bool dComIfGp_getMapTrans(int i_roomNo, f32* o_transX, f32* o_transY, s16* o_angle); inline bool i_dComIfGp_checkPlayerStatus0(int param_0, u32 flag) { return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, flag); @@ -2347,6 +2354,10 @@ inline s32 dComIfGp_roomControl_getStayNo() { return dStage_roomControl_c::getStayNo(); } +inline s32 dComIfGp_roomControl_getZoneNo(int i_roomNo) { + return dStage_roomControl_c::getZoneNo(i_roomNo); +} + inline void dComIfGp_roomControl_initZone() { g_dComIfG_gameInfo.play.getRoomControl()->initZone(); } @@ -2375,12 +2386,28 @@ inline void dComIfGp_roomControl_setStayNo(int stayNo) { g_dComIfG_gameInfo.play.getRoomControl()->setStayNo(stayNo); } +inline void dComIfGp_roomControl_setZoneNo(int roomNo, int zoneNo) { + g_dComIfG_gameInfo.play.getRoomControl()->setZoneNo(roomNo, zoneNo); +} + inline dKy_tevstr_c* dComIfGp_roomControl_getTevStr(int i_roomNo) { return g_dComIfG_gameInfo.play.getRoomControl()->getTevStr(i_roomNo); } -inline bool dComIfGp_roomControl_checkStatusFlag(int i_roomNo, u8 flag) { - return g_dComIfG_gameInfo.play.mRoomControl.checkStatusFlag(i_roomNo, flag); +inline BOOL dComIfGp_roomControl_checkStatusFlag(int i_roomNo, u8 flag) { + return g_dComIfG_gameInfo.play.getRoomControl()->checkStatusFlag(i_roomNo, flag); +} + +inline void dComIfGp_roomControl_offStatusFlag(int i_roomNo, u8 flag) { + return g_dComIfG_gameInfo.play.getRoomControl()->offStatusFlag(i_roomNo, flag); +} + +inline void dComIfGp_roomControl_onStatusFlag(int i_roomNo, u8 flag) { + return g_dComIfG_gameInfo.play.getRoomControl()->onStatusFlag(i_roomNo, flag); +} + +inline void dComIfGp_roomControl_setStatusFlag(int i_roomNo, u8 flag) { + return g_dComIfG_gameInfo.play.getRoomControl()->setStatusFlag(i_roomNo, flag); } inline void dComIfGp_roomControl_zoneCountCheck(int i_roomNo) { diff --git a/include/d/com/d_com_static.h b/include/d/com/d_com_static.h index ba51a8f505..540fed86e5 100644 --- a/include/d/com/d_com_static.h +++ b/include/d/com/d_com_static.h @@ -48,6 +48,11 @@ public: /* 80031434 */ static bool check(s8 i_roomNo, cXyz const& i_pos); /* 800315A4 */ static void execute(); + static void reset(int roomNo) { + room_c* room = (room_c*)mRoom; // tmp + room[roomNo].reset(); + } + static u8 mData[1152]; static u8 mRoom[256]; static s16 mSetTop; diff --git a/include/d/d_demo.h b/include/d/d_demo.h index 9238020210..82d79c0b63 100644 --- a/include/d/d_demo.h +++ b/include/d/d_demo.h @@ -273,6 +273,7 @@ public: static dDemo_actor_c* getActor(u8 param_0) { return m_object->getActor(param_0); } static u32 getFrameNoMsg() { return m_frameNoMsg; } static s32 getMode() { return m_mode; } + static int getFrame() { return m_frame; } static JStudio::stb::TControl* getControl() { return m_control; } static bool isStatus(u32 status) { return m_status & status; } static void onStatus(u32 status) { m_status |= status; } diff --git a/include/d/d_stage.h b/include/d/d_stage.h index be7e187b07..e74c7acbb3 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -684,6 +684,7 @@ public: /* 0x68 */ int mVrboxcolNumInfo; }; // Size: 0x6C +class dBgW_base; class dStage_roomStatus_c { public: /* 0x000 */ dStage_roomDt_c mRoomDt; @@ -695,7 +696,7 @@ public: /* 0x3F8 */ s8 mMemBlockID; /* 0x3F9 */ u8 mRegionNo; /* 0x3FC */ int mProcID; - /* 0x400 */ int field_0x400; + /* 0x400 */ dBgW_base* mpBgW; int getZoneNo() const { return mZoneNo; } ~dStage_roomStatus_c() {} @@ -723,6 +724,11 @@ public: /* 0x04 */ void** m_dzs; }; + struct nameData { + /* 0x0 */ s8 m_num; + /* 0x1 */ char m_names[32][10]; // ? + }; + static void createRoomDzs(u8 i_num) { m_roomDzs.create(i_num); } static void* addRoomDzs(u8 i_num, u8 roomNo) { return m_roomDzs.add(i_num, roomNo); } static void removeRoomDzs() { m_roomDzs.remove(); } @@ -744,7 +750,7 @@ public: /* 80024940 */ static char* getArcBank(int); /* 80024954 */ static bool resetArchiveBank(int); /* 80024DB0 */ static void SetTimePass(int); - /* 8025BAAC */ void setZoneNo(int, int); + /* 8025BAAC */ static void setZoneNo(int, int); static s32 GetTimePass(); static s8 getStayNo() { return mStayNo; } @@ -763,14 +769,28 @@ public: static void offNoChangeRoom() { mNoChangeRoom = false; } static void setProcID(u32 id) { mProcID = id; } static u32 getProcID() { return mProcID; } + static void setStatusProcID(int i_roomNo, unsigned int i_id) { mStatus[i_roomNo].mProcID = i_id; } static int getStatusProcID(int i_roomNo) { return mStatus[i_roomNo].mProcID; } static void setFileList2(int i_roomNo, dStage_FileList2_dt_c* list) { mStatus[i_roomNo].mRoomDt.mFileList2Info = list; } - bool checkStatusFlag(int i_roomNo, u8 flag) const { + + static void setBgW(int param_0, dBgW_base* i_bgw) { + mStatus[param_0].mpBgW = i_bgw; + } + + BOOL checkStatusFlag(int i_roomNo, u8 flag) const { return cLib_checkBit(mStatus[i_roomNo].mFlag, flag); } + void offStatusFlag(int i_roomNo, u8 flag) { + return cLib_offBit(mStatus[i_roomNo].mFlag, flag); + } + + void onStatusFlag(int i_roomNo, u8 flag) { + return cLib_onBit(mStatus[i_roomNo].mFlag, flag); + } + static JKRExpHeap* mMemoryBlock[19]; static char mArcBank[32][10]; static dStage_roomStatus_c mStatus[0x40]; @@ -917,6 +937,12 @@ static s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0); void dStage_restartRoom(u32 roomParam, u32 mode, int param_2); struct cBgS_GndChk; int dStage_RoomCheck(cBgS_GndChk* gndChk); +void dStage_dt_c_roomReLoader(void* i_data, dStage_dt_c* stageDt, int param_2); +void dStage_dt_c_roomLoader(void* i_data, dStage_dt_c* stageDt, int param_2); + +inline bool dStage_roomRead_dt_c_ChkBg(u8 param_0) { + return param_0 & 0x80; +} inline s32 dStage_roomRead_dt_c_GetVrboxswitch(roomRead_data_class& data) { return data.field_0x2 & 8; @@ -970,6 +996,10 @@ inline s8 dStage_stagInfo_GetTimeH(stage_stag_info_class* p_info) { return p_info->field_0x0c >> 8; } +inline BOOL dStage_staginfo_GetArchiveHeap(stage_stag_info_class* p_info) { + return p_info->field_0x0a & 0x1000; +} + inline u32 dStage_sclsInfo_getSceneLayer(stage_scls_info_class* p_info) { return p_info->field_0xb & 0xF; } diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h index 331228746f..9e0c1dbcf6 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -37,7 +37,7 @@ static void GxFog_set(); static void GxXFog_set(); u8 dKy_pol_argument_get(cBgS_PolyInfo const* i_poly); void dKy_Sound_set(cXyz param_0, int param_1, unsigned int param_2, int param_3); - +void dKy_bg_MAxx_proc(void* param_0); struct LIGHT_INFLUENCE { /* 800CFC7C */ ~LIGHT_INFLUENCE() {} diff --git a/include/d/particle/d_particle.h b/include/d/particle/d_particle.h index b2c122b130..2224e4a00f 100644 --- a/include/d/particle/d_particle.h +++ b/include/d/particle/d_particle.h @@ -344,6 +344,8 @@ public: JKRExpHeap* getResHeap() { return m_resHeap; } + void levelAllForceOnEventMove() { field_0x210.allForceOnEventMove(); } + static void onStatus(u8 status) { mStatus |= status; } static void offStatus(u8 status) { mStatus &= ~status; } static bool isStatus(u8 status) { return mStatus & status; } |
