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 | |
| parent | 2d094c263e6145e69e254ec8ad4e71e3ea95a72b (diff) | |
demo work (#1172)
* Some d_message demo matches
* More demo matches
* fix jpn
Diffstat (limited to 'include')
| -rw-r--r-- | include/DynamicLink.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJoint.h | 18 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DPacket.h | 18 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_w.h | 2 | ||||
| -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 | ||||
| -rw-r--r-- | include/dolphin/mtx/vec.h | 8 |
12 files changed, 66 insertions, 46 deletions
diff --git a/include/DynamicLink.h b/include/DynamicLink.h index 72433542..68cc044d 100644 --- a/include/DynamicLink.h +++ b/include/DynamicLink.h @@ -62,7 +62,7 @@ struct DynamicModuleControl : DynamicModuleControlBase { virtual bool do_unlink(); DynamicModuleControl(char const*); static JKRArchive* mountCallback(void*); - static void mountCreate(); + static mDoDvdThd_callback_c* mountCreate(); static bool initialize(); static bool callback(void*); diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index 6f46ba1b..bc0bd18f 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -133,14 +133,14 @@ class J3DJoint : public J3DNode { public: void initialize(); void addMesh(J3DMaterial*); - void calcIn(); - void calcOut(); - void entryIn(); - u32 getType() const { return 'NJNT'; } + virtual void calcIn(); + virtual void calcOut(); + virtual void entryIn(); + virtual u32 getType() const { return 'NJNT'; } void recursiveCalc(); J3DJoint() { initialize(); } - ~J3DJoint() {} + virtual ~J3DJoint() {} J3DMaterial* getMesh() { return mMesh; } u16 getJntNo() const { return mJntNo; } @@ -176,4 +176,12 @@ private: /* 0x60 */ J3DMaterial* mMesh; }; // Size: 0x64 +inline BOOL checkScaleOne(Vec v) { + if (v.x == 1.0f && v.y == 1.0f && v.z == 1.0f) { + return TRUE; + } else { + return FALSE; + } +} + #endif /* J3DJOINT_H */ diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index d934eefd..a33d01c4 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -3,6 +3,7 @@ #include "JSystem/J3DGraphBase/J3DDrawBuffer.h" #include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/JUtility/JUTAssert.h" #include "dolphin/gd/GDBase.h" #include "dolphin/types.h" @@ -197,15 +198,20 @@ public: void beginDiff(); void endDiff(); - J3DMaterial* getMaterial() const { return mpMaterial; } - J3DShapePacket* getShapePacket() const { return mpShapePacket; } + J3DMaterial* getMaterial() { return mpMaterial; } + J3DShapePacket* getShapePacket() { return mpShapePacket; } void setShapePacket(J3DShapePacket* packet) { mpShapePacket = packet; } - void setMaterial(J3DMaterial* pMaterial) { mpMaterial = pMaterial; } + void setMaterial(J3DMaterial* pMaterial) { + J3D_ASSERT(646, pMaterial != NULL, "Error : null pointer."); + mpMaterial = pMaterial; + } void setTexture(J3DTexture* pTexture) { mpTexture = pTexture; } void setInitShapePacket(J3DShapePacket* packet) { mpInitShapePacket = packet; } - void setMaterialAnmID(J3DMaterialAnm* materialAnm) { mpMaterialAnm = materialAnm; } - bool isChanged() const { return mDiffFlag & 0x80000000; } - bool isEnabled_Diff() const { return mpInitShapePacket->getDisplayListObj() != NULL; } + void setMaterialAnmID(u32 materialAnm) { mpMaterialAnm = (J3DMaterialAnm*)materialAnm; } + void setMaterialID(u32 id) { mDiffFlag = id; } + bool isChanged() { return mDiffFlag & 0x80000000; } + bool isEnabled_Diff() { return mpInitShapePacket->getDisplayListObj() != NULL; } + J3DTexture* getTexture() { return mpTexture; } virtual ~J3DMatPacket(); virtual int entry(J3DDrawBuffer* param_1) { diff --git a/include/SSystem/SComponent/c_bg_w.h b/include/SSystem/SComponent/c_bg_w.h index 9726b5fd..b0972393 100644 --- a/include/SSystem/SComponent/c_bg_w.h +++ b/include/SSystem/SComponent/c_bg_w.h @@ -141,7 +141,7 @@ public: }; enum PRIORITY { - + // TODO }; cBgW(); 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; diff --git a/include/dolphin/mtx/vec.h b/include/dolphin/mtx/vec.h index 48f0bbfc..fa3e9042 100644 --- a/include/dolphin/mtx/vec.h +++ b/include/dolphin/mtx/vec.h @@ -47,14 +47,6 @@ f32 PSVECDistance(const Vec* a, const Vec* b); void C_VECHalfAngle(const Vec* a, const Vec* b, Vec* half); void C_VECReflect(const Vec* src, const Vec* normal, Vec* dst); -inline BOOL checkScaleOne(Vec v) { - if (v.x == 1.0f && v.y == 1.0f && v.z == 1.0f) { - return TRUE; - } else { - return FALSE; - } -} - /* When compiling in debug mode, use C implementations */ #if defined(DEBUG) || !defined(__MWERKS__) #define VECAdd C_VECAdd |
