diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2022-06-30 16:20:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-30 16:20:26 -0700 |
| commit | 7d2e4e81dc2e1e598b41fc41a859faa8668514e8 (patch) | |
| tree | 7ceebcfd86a24530ea395c146ac1759683bd585b /include/d | |
| parent | 046d178003035ea87d3042a61917c2d482c68c74 (diff) | |
| parent | a2e21275cb2722aed941cd5290b57b29732ce6d7 (diff) | |
Merge pull request #202 from lepelog/inline-stuff
move inlines
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/a/d_a_alink.h | 4 | ||||
| -rw-r--r-- | include/d/a/d_a_obj_item.h | 1 | ||||
| -rw-r--r-- | include/d/cc/d_cc_uty.h | 2 | ||||
| -rw-r--r-- | include/d/com/d_com_inf_game.h | 106 | ||||
| -rw-r--r-- | include/d/d_bomb.h | 2 | ||||
| -rw-r--r-- | include/d/d_stage.h | 5 | ||||
| -rw-r--r-- | include/d/kankyo/d_kankyo.h | 1 | ||||
| -rw-r--r-- | include/d/meter/d_meter2_info.h | 4 |
8 files changed, 116 insertions, 9 deletions
diff --git a/include/d/a/d_a_alink.h b/include/d/a/d_a_alink.h index f146bda476..955cb4d060 100644 --- a/include/d/a/d_a_alink.h +++ b/include/d/a/d_a_alink.h @@ -21,6 +21,8 @@ #include "dolphin/types.h" #include "rel/d/a/kytag/d_a_kytag05/d_a_kytag05.h" #include "rel/d/a/tag/d_a_tag_mmsg/d_a_tag_mmsg.h" +#include "f_op/f_op_scene.h" +#include "f_op/f_op_actor_mng.h" class fopEn_enemy_c; class daAlinkHIO_anm_c; @@ -4801,4 +4803,4 @@ static void* daAlink_searchCanoe(fopAc_ac_c* param_0, void* param_1); static void* daAlink_searchBoar(fopAc_ac_c* param_0, void* param_1); static fopAc_ac_c* daAlink_searchLightBall(fopAc_ac_c* p_actor, void* param_1); -#endif /* D_A_D_A_ALINK_H */
\ No newline at end of file +#endif /* D_A_D_A_ALINK_H */ diff --git a/include/d/a/d_a_obj_item.h b/include/d/a/d_a_obj_item.h index b139320fd9..77e766fe3c 100644 --- a/include/d/a/d_a_obj_item.h +++ b/include/d/a/d_a_obj_item.h @@ -2,6 +2,7 @@ #define A_OBJ_D_A_OBJ_ITEM_H #include "d/a/d_a_item_static.h" +#include "f_op/f_op_actor_mng.h" namespace daItem_prm { static inline u8 getItemNo(daItem_c* item) { diff --git a/include/d/cc/d_cc_uty.h b/include/d/cc/d_cc_uty.h index 877354fbd5..243bcce721 100644 --- a/include/d/cc/d_cc_uty.h +++ b/include/d/cc/d_cc_uty.h @@ -3,7 +3,7 @@ #include "d/com/d_com_inf_game.h" #include "dolphin/types.h" -#include "f_op/f_op_actor_mng.h" +#include "f_op/f_op_actor.h" struct dCcU_AtInfo { /* 0x00 */ cCcD_Obj* mpCollider; diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index 58b15bb758..9207fa790d 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -774,8 +774,13 @@ u16 dComIfGs_getMaxLifeGauge(); void dComIfGs_setWarpMarkFlag(u8); void dComIfGs_setSelectEquipSword(u8 i_itemNo); void dComIfGs_setSelectEquipShield(u8 i_itemNo); -int dComIfGs_isItemFirstBit(u8 i_itemNo); -u16 dComIfGs_getRupee(); +inline int i_dComIfGs_isItemFirstBit(u8 i_no) { + return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no); +} + +inline u16 i_dComIfGs_getRupee() { + return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getRupee(); +} BOOL dComIfGs_isVisitedRoom(int i_roomNo); void dComIfGs_onZoneSwitch(int swBit, int roomNo); void dComIfGs_onOneZoneSwitch(int param_0, int param_1); @@ -920,6 +925,10 @@ inline void dComIfGs_onEventBit(u16 id) { g_dComIfG_gameInfo.info.getSavedata().getEvent().onEventBit(id); } +inline BOOL i_dComIfGs_isEventBit(u16 id) { + return g_dComIfG_gameInfo.info.getEvent().isEventBit(id); +} + inline void dComIfGs_onLightDropFlag(u8 i_nowLevel) { g_dComIfG_gameInfo.info.getPlayer().getLightDrop().onLightDropGetFlag(i_nowLevel); } @@ -936,6 +945,10 @@ inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo) { return g_dComIfG_gameInfo.info.isSwitch(i_no, i_roomNo); } +inline void dComIfGs_onSvZoneSwitch(int zoneNo, int swBit) { + g_dComIfG_gameInfo.info.getZone(zoneNo).getZoneBit().onSwitch(swBit); +} + inline s32 dComIfGs_isDungeonItemMap() { return g_dComIfG_gameInfo.info.getMemory().getBit().isDungeonItemMap(); } @@ -993,6 +1006,10 @@ inline u16 dComIfGs_getMaxLife() { return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getMaxLife(); } +inline u16 i_dComIfGs_getLife() { + return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife(); +} + inline void dComIfGs_offEventBit(u16 event) { g_dComIfG_gameInfo.info.getSavedata().getEvent().offEventBit(event); } @@ -1093,6 +1110,10 @@ inline void dComIfGs_setKeyNum(u8 keyNum) { g_dComIfG_gameInfo.info.getMemory().getBit().setKeyNum(keyNum); } +inline BOOL dComIfGs_isSaveVisitedRoom(int param_0, int param_1) { + return g_dComIfG_gameInfo.info.getSavedata().getSave2(param_0)->isVisitedRoom(param_1); +} + inline s16 dComIfGs_getOil() { return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getOil(); } @@ -1387,6 +1408,14 @@ inline u8 dComIfGs_checkBombBag(u8 i_itemNo) { return g_dComIfG_gameInfo.info.getPlayer().getItem().checkBombBag(i_itemNo); } +inline bool i_dComIfGp_checkPlayerStatus0(int param_0, u32 flag) { + return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, flag); +} + +inline bool i_dComIfGp_checkPlayerStatus1(int param_0, u32 flag) { + return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 1, flag); +} + inline s64 dComIfGs_getTotalTime() { return g_dComIfG_gameInfo.info.getPlayer().getPlayerInfo().getTotalTime(); } @@ -1439,8 +1468,13 @@ inline void dComIfGs_setMemoryToCard(u8* p_saveData, int dataNum) { g_dComIfG_gameInfo.info.memory_to_card((char*)p_saveData, dataNum); } -void dComIfGp_setItemLifeCount(f32 amount, u8 type); -void dComIfGp_setItemRupeeCount(long amount); + +inline void i_dComIfGp_setItemLifeCount(float amount, u8 type) { + g_dComIfG_gameInfo.play.setItemLifeCount(amount, type); +} +inline void i_dComIfGp_setItemRupeeCount(int amount) { + g_dComIfG_gameInfo.play.setItemRupeeCount(amount); +} void dComIfGp_setSelectItem(int index); s32 dComIfGp_offHeapLockFlag(int flag); void dComIfGp_createSubExpHeap2D(); @@ -1496,6 +1530,14 @@ inline void* dComIfGp_getPlayer(int idx) { return g_dComIfG_gameInfo.play.getPlayer(idx); } +inline s8 i_dComIfGp_getPlayerCameraID(int idx) { + return g_dComIfG_gameInfo.play.getPlayerCameraID(idx); +} + +inline daHorse_c* i_dComIfGp_getHorseActor() { + return (daHorse_c*)g_dComIfG_gameInfo.play.getPlayerPtr(1); +} + inline dMsgObject_c* dComIfGp_getMsgObjectClass() { return g_dComIfG_gameInfo.play.getMsgObjectClass(); } @@ -1952,6 +1994,10 @@ inline void dComIfGp_clearPlayerStatus0(int param_0, u32 flag) { g_dComIfG_gameInfo.play.clearPlayerStatus(param_0, 0, flag); } +inline dStage_stageDt_c* i_dComIfGp_getStage() { + return &g_dComIfG_gameInfo.play.getStage(); +} + inline stage_scls_info_dummy_class* dComIfGp_getStageSclsInfo() { return g_dComIfG_gameInfo.play.getStage().getSclsInfo(); } @@ -2174,6 +2220,26 @@ inline void dComIfGp_roomControl_zoneCountCheck(int i_roomNo) { g_dComIfG_gameInfo.play.mRoomControl.zoneCountCheck(i_roomNo); } +inline u8 i_dComIfGp_getRStatus() { + return g_dComIfG_gameInfo.play.getRStatus(); +} + +inline void i_dComIfGp_setBottleStatus(u8 param_0, u8 param_1) { + g_dComIfG_gameInfo.play.setBottleStatus(param_0, param_1); +} + +inline u8 i_dComIfGp_getDoStatus() { + return g_dComIfG_gameInfo.play.getDoStatus(); +} + +inline dEvt_control_c& i_dComIfGp_getEvent() { + return g_dComIfG_gameInfo.play.getEvent(); +} + +inline dEvent_manager_c& i_dComIfGp_getEventManager() { + return g_dComIfG_gameInfo.play.getEvtManager(); +} + inline BOOL dComIfGp_event_compulsory(void* param_0, const char* param_1, u16 param_2) { return g_dComIfG_gameInfo.play.getEvent().compulsory(param_0, param_1, param_2); } @@ -2227,6 +2293,25 @@ inline void* dComIfGp_event_getPt2() { return g_dComIfG_gameInfo.play.getEvent().convPId(pt2); } +inline BOOL i_dComIfGp_event_runCheck() { + return g_dComIfG_gameInfo.play.getEvent().runCheck(); +} + +inline u16 dComIfGp_event_checkHind(u16 flag) { + if (!i_dComIfGp_event_runCheck()) { + return false; + } + return g_dComIfG_gameInfo.play.getEvent().checkHind(flag); +} + +inline u16 i_dComIfGp_event_chkEventFlag(u16 flag) { + return g_dComIfG_gameInfo.play.getEvent().chkEventFlag(flag); +} + +inline void dComIfGp_event_setCullRate(f32 f) { + g_dComIfG_gameInfo.play.getEvent().setCullRate(f); +} + inline int i_dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, int param_2) { return dComIfGp_getPEvtManager()->getMyStaffId(pName, pActor, param_2); } @@ -2369,6 +2454,19 @@ int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3 f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8, dKy_tevstr_c* param_9, s16 param_10, f32 param_11, _GXTexObj* param_12); + +inline int dComIfGd_setRealShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3, + f32 param_4, f32 param_5, dKy_tevstr_c* param_6) { + return g_dComIfG_gameInfo.drawlist.setRealShadow(param_0, param_1, param_2, param_3, param_4, + param_5, param_6); +} + +inline int dComIfGd_setSimpleShadow(cXyz* pos, f32 param_1, f32 param_2, cXyz* param_3, s16 angle, + f32 param_5, _GXTexObj* tex) { + return g_dComIfG_gameInfo.drawlist.setSimpleShadow(pos, param_1, param_2, param_3, angle, + param_5, tex); +} + inline void dComIfGd_drawListItem3d() { g_dComIfG_gameInfo.drawlist.drawOpaListItem3d(); g_dComIfG_gameInfo.drawlist.drawXluListItem3d(); diff --git a/include/d/d_bomb.h b/include/d/d_bomb.h index cc3d612a85..71ffb5100d 100644 --- a/include/d/d_bomb.h +++ b/include/d/d_bomb.h @@ -5,7 +5,7 @@ #include "d/bg/d_bg_s_acch.h" #include "d/cc/d_cc_d.h" #include "d/kankyo/d_kankyo.h" -#include "f_op/f_op_actor.h" +#include "f_op/f_op_actor_mng.h" class daNbomb_c { public: diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 835b4bbd8f..3a91c9252b 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -7,7 +7,6 @@ #include "d/save/d_save.h" #include "dolphin/types.h" #include "f_op/f_op_actor.h" -#include "f_op/f_op_actor_mng.h" struct stage_vrboxcol_info_class { // VRB @@ -908,6 +907,10 @@ inline int dStage_stagInfo_GetMsgGroup(stage_stag_info_class* p_info) { return p_info->mMsgGroup; } +inline s32 i_dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) { + return param_0->field_0x09 >> 1 & 0x1f; +} + 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 b5393ddcab..27f9c97011 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -490,7 +490,6 @@ public: }; // Size: 0x1310 extern dScnKy_env_light_c g_env_light; -extern Z2EnvSeMgr g_mEnvSeMgr; STATIC_ASSERT(sizeof(dScnKy_env_light_c) == 4880); diff --git a/include/d/meter/d_meter2_info.h b/include/d/meter/d_meter2_info.h index dd61939d35..237196040a 100644 --- a/include/d/meter/d_meter2_info.h +++ b/include/d/meter/d_meter2_info.h @@ -327,6 +327,10 @@ inline void dMeter2Info_allUseButton() { g_meter2_info.allUseButton(); } +inline void i_dMeter2Info_offUseButton(int flag) { + g_meter2_info.offUseButton(flag); +} + inline void dMeter2Info_resetGameStatus() { g_meter2_info.resetGameStatus(); } |
