diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-08-16 18:05:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-16 18:05:17 -0400 |
| commit | e389a9b814baaabdbf497cd32edcdd2c30d3ff3f (patch) | |
| tree | 56ad6749c02048448a4f5ce90688efdc7dab1dbe /include/d | |
| parent | 2d094c263e6145e69e254ec8ad4e71e3ea95a72b (diff) | |
demo work (#1172)
* Some d_message demo matches
* More demo matches
* fix jpn
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/actor/d_a_obj_movebox.h | 21 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_toripost.h | 2 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 29 | ||||
| -rw-r--r-- | include/d/d_flower.h | 2 | ||||
| -rw-r--r-- | include/d/d_resorce.h | 6 | ||||
| -rw-r--r-- | include/d/d_s_logo.h | 2 | ||||
| -rw-r--r-- | include/d/d_save.h | 2 |
7 files changed, 39 insertions, 25 deletions
diff --git a/include/d/actor/d_a_obj_movebox.h b/include/d/actor/d_a_obj_movebox.h index e151c144..718b5e6a 100644 --- a/include/d/actor/d_a_obj_movebox.h +++ b/include/d/actor/d_a_obj_movebox.h @@ -169,9 +169,24 @@ namespace daObjMovebox { int prm_get_type() const { return daObj::PrmAbstract(this, PRM_TYPE_W, PRM_TYPE_S); } int prm_get_swSave() const { return daObj::PrmAbstract(this, PRM_SWSAVE_W, PRM_SWSAVE_S); } int prm_get_swSave1() const; - int prmZ_get_swSave2() const { return mType == TYPE_BLACK_BOX_WITH_MKIE ? 0xFF : (u8)(mPrmZ >> 8); } - int prmZ_get_swSave2_MkieB() const { return mType == TYPE_BLACK_BOX_WITH_MKIE ? (u8)(mPrmZ >> 8) : 0xFF; } - int prmZ_get_pathId() const { return mType == TYPE_BLACK_BOX_WITH_MKIE ? 0xFF : (mPrmZ & 0x00FF) >> 0; } + int prmZ_get_swSave2() const { + if (mType == TYPE_BLACK_BOX_WITH_MKIE) { + return 0xFF; + } + return (u32)(mPrmZ >> 8) & 0xFF; + } + int prmZ_get_swSave2_MkieB() const { + if (mType == TYPE_BLACK_BOX_WITH_MKIE) { + return (u32)(mPrmZ >> 8) & 0xFF; + } + return 0xFF; + } + int prmZ_get_pathId() const { + if (mType == TYPE_BLACK_BOX_WITH_MKIE) { + return 0xFF; + } + return mPrmZ & 0xFF; + } int prmX_get_evId() const { return (mPrmX & 0x00FF) >> 0; } int prm_get_itemNo() const { return daObj::PrmAbstract(this, PRM_ITEMNO_W, PRM_ITEMNO_S); } int prm_get_itemSave() const { return daObj::PrmAbstract(this, PRM_ITEMSAVE_W, PRM_ITEMSAVE_S); } diff --git a/include/d/actor/d_a_obj_toripost.h b/include/d/actor/d_a_obj_toripost.h index 07dee22c..75a8aa5a 100644 --- a/include/d/actor/d_a_obj_toripost.h +++ b/include/d/actor/d_a_obj_toripost.h @@ -92,7 +92,7 @@ public: static const dCcD_SrcCyl m_cyl_src; private: - static const s32 m_send_price[]; + static const int m_send_price[]; /* 0x6C4 */ u32 mCurMode; /* 0x6C8 */ s8 mBckIdx; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index fc82d7d0..ec3c3823 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -634,14 +634,8 @@ public: JKRAramBlock* getPictureBoxData(int i) { return mPictureBoxData[i]; } void setPictureBoxData(JKRAramBlock* aramBlock, int i) { mPictureBoxData[i] = aramBlock; } bool isPictureFlag(u8 i) { return mPictureFlag & (u8)(1 << i); } - void onPictureFlag(u8 i) { - u8 mask = (1 << i); - mPictureFlag |= mask; - } - void offPictureFlag(u8 i) { - u8 mask = (1 << i); - mPictureFlag &= ~mask; - } + void onPictureFlag(u8 i) { mPictureFlag |= (u8)(1 << i); } + void offPictureFlag(u8 i) { mPictureFlag &= ~(u8)(1 << i); } u8 getPictureFormat() { return mPictureFormat; } void setPictureFormat(u8 fmt) { mPictureFormat = fmt; } u8 getSelectPicture() { return mSelectPicture; } @@ -1190,15 +1184,13 @@ inline BOOL dComIfGs_isGetItemReserve(u8 i_no) { return g_dComIfG_gameInfo.save.getPlayer().getGetBagItem().isReserve(i_no); } -inline void dComIfGs_onGetItemReserve(int i_no) { +inline void dComIfGs_onGetItemReserve(u8 i_no) { g_dComIfG_gameInfo.save.getPlayer().getGetBagItem().onReserve(i_no); } -#if VERSION == VERSION_DEMO inline void dComIfGs_offGetItemReserve(u8 i_no) { g_dComIfG_gameInfo.save.getPlayer().getGetBagItem().offReserve(i_no); } -#endif inline BOOL dComIfGs_isGetCollectMap(int i_no) { return g_dComIfG_gameInfo.save.getPlayer().getMap().isGetMap(i_no - 1); @@ -4393,9 +4385,18 @@ inline int dComIfG_getTimerRestTimeMs() { return limit - now; } -inline void dComIfG_TimerDeleteRequest() { - if (dComIfG_getTimerPtr() != NULL) - dComIfG_getTimerPtr()->deleteRequest(); +inline int dComIfG_TimerDeleteRequest(int i_mode) { + if (i_mode == dComIfG_getTimerMode()) { + dTimer_c* timer = dComIfG_getTimerPtr(); + if (timer != NULL) { + timer->deleteRequest(); + return 1; + } else { + return 0; + } + } + + return 0; } inline void dComIfG_TimerStart(int mode, s16 timer) { if (dComIfG_getTimerMode() == mode && dComIfG_getTimerPtr() != NULL) { diff --git a/include/d/d_flower.h b/include/d/d_flower.h index ffb772cb..b59e3f8c 100644 --- a/include/d/d_flower.h +++ b/include/d/d_flower.h @@ -59,7 +59,7 @@ public: dFlower_data_c* newData(s8, cXyz&, int, s8); int newAnm(); void setAnm(int, s16); - void deleteRoom(s32 roomNo) { mRoom[roomNo].deleteData(); } + void deleteRoom(int roomNo) { mRoom[roomNo].deleteData(); } virtual void draw(); virtual ~dFlower_packet_c(); diff --git a/include/d/d_resorce.h b/include/d/d_resorce.h index e61d328f..6b5b3a5d 100644 --- a/include/d/d_resorce.h +++ b/include/d/d_resorce.h @@ -52,7 +52,7 @@ class dRes_control_c { public: dRes_control_c() {} ~dRes_control_c(); - static BOOL setRes(char const*, dRes_info_c*, int, char const*, u8, JKRHeap*); + static int setRes(char const*, dRes_info_c*, int, char const*, u8, JKRHeap*); static int syncRes(char const*, dRes_info_c*, int); static int deleteRes(char const*, dRes_info_c*, int); static void* getRes(char const*, char const*, dRes_info_c*, int); @@ -62,11 +62,11 @@ public: static void* getRes(char const*, s32, dRes_info_c*, int); static void* getIDRes(char const*, u16, dRes_info_c*, int); static int syncAllRes(dRes_info_c*, int); - BOOL setStageRes(char const*, JKRHeap*); + int setStageRes(char const*, JKRHeap*); void dump(); int getObjectResName2Index(char const*, char const*); - BOOL setObjectRes(const char* name, u8 direction, JKRHeap* heap) { + int setObjectRes(const char* name, u8 direction, JKRHeap* heap) { return setRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo), "/res/Object/", direction, heap); } diff --git a/include/d/d_s_logo.h b/include/d/d_s_logo.h index 32e2ff52..1000519d 100644 --- a/include/d/d_s_logo.h +++ b/include/d/d_s_logo.h @@ -25,7 +25,7 @@ public: /* 0x1F2 */ u16 field_0x1f2; /* 0x1F4 */ u16 field_0x1f4; /* 0x1F8 */ void * field_0x1f8; - /* 0x1FC */ u32 field_0x1fc; + /* 0x1FC */ void * field_0x1fc; }; #endif /* D_S_LOGO_H */ diff --git a/include/d/d_save.h b/include/d/d_save.h index 4159cff5..ab0a3a3d 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -240,9 +240,7 @@ public: void onBait(u8); BOOL isBait(u8); void onReserve(u8); -#if VERSION == VERSION_DEMO void offReserve(u8); -#endif BOOL isReserve(u8); /* 0x0 */ u32 mReserveFlags; |
