diff options
Diffstat (limited to 'include')
44 files changed, 487 insertions, 369 deletions
diff --git a/include/JSystem/J2DGraph/J2DAnimation.h b/include/JSystem/J2DGraph/J2DAnimation.h index a4bd2fb07d..fe36766b7a 100644 --- a/include/JSystem/J2DGraph/J2DAnimation.h +++ b/include/JSystem/J2DGraph/J2DAnimation.h @@ -151,12 +151,8 @@ public: mTranslateValues = pTranslateValues; mKind = KIND_TRANSFORM; } - #ifdef __dt__15J2DAnmTransformFv_DEFINED - /* 80184370 */ virtual ~J2DAnmTransform(); - #else /* 80184370 */ virtual ~J2DAnmTransform() {} - #endif - /* 80191130 */ virtual void getTransform(u16, J3DTransformInfo*) const; + /* 80191130 */ virtual void getTransform(u16, J3DTransformInfo*) const; // {} (should be inline) /* 0x10 */ f32* mScaleValues; /* 0x14 */ s16* mRotationValues; diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index db868228b1..61989f4f58 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -88,13 +88,19 @@ public: /* vt 0x20 */ virtual void setCullBack(_GXCullMode cmode); /* vt 0x24 */ virtual void setAlpha(u8); /* vt 0x28 */ virtual bool setConnectParent(bool connected); - /* vt 0x2C */ virtual void calcMtx(); + /* vt 0x2C */ virtual void calcMtx() { + if (mPaneTree.getParent() != NULL) { + makeMatrix(mTranslateX, mTranslateY); + } + } /* vt 0x30 */ virtual void update(); /* vt 0x34 */ virtual void drawSelf(f32 arg1, f32 arg2); /* vt 0x38 */ virtual void drawSelf(f32 arg1, f32 arg2, Mtx* mtx); /* vt 0x3C */ virtual J2DPane* search(u64 tag); /* vt 0x40 */ virtual J2DPane* searchUserInfo(u64 tag); - /* vt 0x44 */ virtual void makeMatrix(f32, f32); + /* vt 0x44 */ virtual void makeMatrix(f32 a, f32 b) { + makeMatrix(a, b, -mBounds.i.x, -mBounds.i.y); + } /* vt 0x48 */ virtual void makeMatrix(f32 a, f32 b, f32 c, f32 d); /* vt 0x4C */ virtual bool isUsed(const ResTIMG* timg); /* vt 0x50 */ virtual bool isUsed(const ResFONT* font); diff --git a/include/JSystem/J2DGraph/J2DPicture.h b/include/JSystem/J2DGraph/J2DPicture.h index 4bad6b8019..e391869896 100644 --- a/include/JSystem/J2DGraph/J2DPicture.h +++ b/include/JSystem/J2DGraph/J2DPicture.h @@ -106,9 +106,19 @@ public: /* 802FDAC8 */ virtual const ResTIMG* changeTexture(char const*, u8, JUTPalette*); /* 800539DC */ virtual JUTTexture* getTexture(u8) const; /* 802FF634 */ virtual u8 getTextureCount() const; - /* 80053C6C */ virtual bool setBlack(JUtility::TColor); - /* 80053C44 */ virtual bool setWhite(JUtility::TColor); - /* 8018BEE0 */ virtual bool setBlackWhite(JUtility::TColor i_black, JUtility::TColor i_white); + /* 80053C6C */ virtual bool setBlack(JUtility::TColor i_black) { + mBlack = i_black; + return true; + } + /* 80053C44 */ virtual bool setWhite(JUtility::TColor i_white) { + mWhite = i_white; + return true; + } + /* 8018BEE0 */ virtual bool setBlackWhite(JUtility::TColor i_black, JUtility::TColor i_white) { + mBlack = i_black; + mWhite = i_white; + return true; + } /* 801DFA4C */ virtual JUtility::TColor getBlack() const; /* 801DFA40 */ virtual JUtility::TColor getWhite() const; /* 8025603C */ virtual J2DMaterial* getMaterial() const { return NULL; } diff --git a/include/JSystem/J2DGraph/J2DScreen.h b/include/JSystem/J2DGraph/J2DScreen.h index 29d41577b9..ed4a0311a5 100644 --- a/include/JSystem/J2DGraph/J2DScreen.h +++ b/include/JSystem/J2DGraph/J2DScreen.h @@ -55,7 +55,7 @@ public: /* 802F90E0 */ virtual J2DPane* searchUserInfo(u64); /* 802F9600 */ virtual bool isUsed(ResTIMG const*); /* 802F9620 */ virtual bool isUsed(ResFONT const*); - /* 80053BA0 */ virtual void clearAnmTransform(); + /* 80053BA0 */ virtual void clearAnmTransform() { J2DPane::clearAnmTransform(); } /* 802F9704 */ virtual void setAnimation(J2DAnmColor*); /* 80192414 */ virtual void setAnimation(J2DAnmTransform* i_bck) { J2DPane::setAnimation(i_bck); } /* 802F9798 */ virtual void setAnimation(J2DAnmTextureSRTKey*); diff --git a/include/JSystem/J2DGraph/J2DTextBox.h b/include/JSystem/J2DGraph/J2DTextBox.h index 55b0a6a641..3a2e94a17a 100644 --- a/include/JSystem/J2DGraph/J2DTextBox.h +++ b/include/JSystem/J2DGraph/J2DTextBox.h @@ -75,7 +75,7 @@ public: /* 80300278 */ virtual void setFont(JUTFont*); /* 8021C7F4 */ virtual JUTFont* getFont() const { return mFont; } /* 80254408 */ virtual bool setBlack(JUtility::TColor); - /* 80186C84 */ virtual bool setWhite(JUtility::TColor); + /* 80186C84 */ virtual bool setWhite(JUtility::TColor white) { mWhiteColor = white; return true; } /* 8019230C */ virtual bool setBlackWhite(JUtility::TColor, JUtility::TColor); /* 801DFA34 */ virtual JUtility::TColor getBlack() const; /* 801DFA28 */ virtual JUtility::TColor getWhite() const; diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index fa1c4e66b7..2d6107db5c 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -174,13 +174,13 @@ struct J3DAnmVtxColorFullData { /* 0x0A */ s16 mFrameMax; /* 0x0C */ u16 mAnmTableNum[2]; /* 0x10 */ u8 field_0x10[0x18 - 0x10]; - /* 0x18 */ s32 mTableOffsets[2]; - /* 0x20 */ s32 mVtxColorIndexDataOffsets[2]; - /* 0x28 */ s32 mVtxColorIndexPointerOffsets[2]; - /* 0x30 */ s32 mRValuesOffset; - /* 0x34 */ s32 mGValuesOffset; - /* 0x38 */ s32 mBValuesOffset; - /* 0x3C */ s32 mAValuesOffset; + /* 0x18 */ void* mTableOffsets[2]; + /* 0x20 */ void* mVtxColorIndexDataOffsets[2]; + /* 0x28 */ void* mVtxColorIndexPointerOffsets[2]; + /* 0x30 */ void* mRValuesOffset; + /* 0x34 */ void* mGValuesOffset; + /* 0x38 */ void* mBValuesOffset; + /* 0x3C */ void* mAValuesOffset; }; // Size = 0x40 STATIC_ASSERT(sizeof(J3DAnmVtxColorFullData) == 0x40); @@ -196,8 +196,8 @@ struct J3DAnmVisibilityFullData { /* 0x0A */ s16 mFrameMax; /* 0x0C */ u16 field_0xc; /* 0x0E */ u16 field_0xe; - /* 0x10 */ s32 mTableOffset; - /* 0x14 */ s32 mValuesOffset; + /* 0x10 */ void* mTableOffset; + /* 0x14 */ void* mValuesOffset; }; // Size = 0x18 STATIC_ASSERT(sizeof(J3DAnmVisibilityFullData) == 0x18); @@ -213,10 +213,10 @@ struct J3DAnmTransformFullData { /* 0x0A */ s16 mFrameMax; /* 0x0C */ u16 field_0xc; /* 0x0E */ u8 field_0xe[0x14 - 0xe]; - /* 0x14 */ s32 mTableOffset; - /* 0x18 */ s32 mScaleValOffset; - /* 0x1C */ s32 mRotValOffset; - /* 0x20 */ s32 mTransValOffset; + /* 0x14 */ void* mTableOffset; + /* 0x18 */ void* mScaleValOffset; + /* 0x1C */ void* mRotValOffset; + /* 0x20 */ void* mTransValOffset; }; // Size = 0x24 STATIC_ASSERT(sizeof(J3DAnmTransformFullData) == 0x24); @@ -235,13 +235,13 @@ struct J3DAnmColorKeyData { /* 0x12 */ u16 field_0x12; /* 0x14 */ u16 field_0x14; /* 0x16 */ u16 field_0x16; - /* 0x18 */ s32 mTableOffset; /* Created by retype action */ - /* 0x1C */ s32 mUpdateMaterialIDOffset; - /* 0x20 */ s32 mNameTabOffset; /* Created by retype action */ - /* 0x24 */ s32 mRValOffset; - /* 0x28 */ s32 mGValOffset; - /* 0x2C */ s32 mBValOffset; - /* 0x30 */ s32 mAValOffset; + /* 0x18 */ void* mTableOffset; + /* 0x1C */ void* mUpdateMaterialIDOffset; + /* 0x20 */ void* mNameTabOffset; + /* 0x24 */ void* mRValOffset; + /* 0x28 */ void* mGValOffset; + /* 0x2C */ void* mBValOffset; + /* 0x30 */ void* mAValOffset; }; // Size = 0x34 STATIC_ASSERT(sizeof(J3DAnmColorKeyData) == 0x34); @@ -259,26 +259,26 @@ struct J3DAnmTextureSRTKeyData { /* 0x0E */ u16 field_0xe; /* 0x10 */ u16 field_0x10; /* 0x12 */ u16 field_0x12; - /* 0x14 */ s32 mTableOffset; - /* 0x18 */ s32 mUpdateMatIDOffset; - /* 0x1C */ s32 mNameTab1Offset; - /* 0x20 */ s32 mUpdateTexMtxIDOffset; - /* 0x24 */ s32 unkOffset; - /* 0x28 */ s32 mScaleValOffset; - /* 0x2C */ s32 mRotValOffset; - /* 0x30 */ s32 mTransValOffset; + /* 0x14 */ void* mTableOffset; + /* 0x18 */ void* mUpdateMatIDOffset; + /* 0x1C */ void* mNameTab1Offset; + /* 0x20 */ void* mUpdateTexMtxIDOffset; + /* 0x24 */ void* unkOffset; + /* 0x28 */ void* mScaleValOffset; + /* 0x2C */ void* mRotValOffset; + /* 0x30 */ void* mTransValOffset; /* 0x34 */ u16 field_0x34; /* 0x36 */ u16 field_0x36; /* 0x38 */ u16 field_0x38; /* 0x3A */ u16 field_0x3a; - /* 0x3C */ s32 mInfoTable2Offset; - /* 0x40 */ s32 field_0x40; - /* 0x44 */ u32 mNameTab2Offset; - /* 0x48 */ s32 field_0x48; - /* 0x4C */ s32 field_0x4c; - /* 0x50 */ s32 field_0x50; - /* 0x54 */ s32 field_0x54; - /* 0x58 */ s32 field_0x58; + /* 0x3C */ void* mInfoTable2Offset; + /* 0x40 */ void* field_0x40; + /* 0x44 */ void* mNameTab2Offset; + /* 0x48 */ void* field_0x48; + /* 0x4C */ void* field_0x4c; + /* 0x50 */ void* field_0x50; + /* 0x54 */ void* field_0x54; + /* 0x58 */ void* field_0x58; /* 0x5C */ s32 field_0x5c; }; // Size = 0x60 @@ -295,13 +295,13 @@ struct J3DAnmVtxColorKeyData { /* 0x0A */ s16 mFrameMax; /* 0x0C */ u16 mAnmTableNum[2]; /* 0x10 */ u8 field_0x10[0x18 - 0x10]; - /* 0x18 */ s32 mTableOffsets[2]; - /* 0x20 */ s32 mVtxColoIndexDataOffset[2]; - /* 0x28 */ s32 mVtxColoIndexPointerOffset[2]; - /* 0x30 */ s32 mRValOffset; - /* 0x34 */ s32 mGValOffset; - /* 0x38 */ s32 mBValOffset; - /* 0x3C */ s32 mAValOffset; + /* 0x18 */ void* mTableOffsets[2]; + /* 0x20 */ void* mVtxColoIndexDataOffset[2]; + /* 0x28 */ void* mVtxColoIndexPointerOffset[2]; + /* 0x30 */ void* mRValOffset; + /* 0x34 */ void* mGValOffset; + /* 0x38 */ void* mBValOffset; + /* 0x3C */ void* mAValOffset; }; // Size = 0x40 STATIC_ASSERT(sizeof(J3DAnmVtxColorKeyData) == 0x40); @@ -317,10 +317,10 @@ struct J3DAnmTexPatternFullData { /* 0x0A */ s16 mFrameMax; /* 0x0C */ u16 field_0xc; /* 0x0E */ u16 field_0xe; - /* 0x10 */ s32 mTableOffset; - /* 0x14 */ s32 mValuesOffset; - /* 0x18 */ s32 mUpdateMaterialIDOffset; - /* 0x1C */ s32 mNameTabOffset; + /* 0x10 */ void* mTableOffset; + /* 0x14 */ void* mValuesOffset; + /* 0x18 */ void* mUpdateMaterialIDOffset; + /* 0x1C */ void* mNameTabOffset; }; // Size = 0x20 STATIC_ASSERT(sizeof(J3DAnmTexPatternFullData) == 0x20); @@ -344,20 +344,20 @@ struct J3DAnmTevRegKeyData { /* 0x1A */ u16 field_0x1a; /* 0x1C */ u16 field_0x1c; /* 0x1E */ u16 field_0x1e; - /* 0x20 */ s32 mCRegTableOffset; - /* 0x24 */ s32 mKRegTableOffset; - /* 0x28 */ s32 mCRegUpdateMaterialIDOffset; - /* 0x2C */ s32 mKRegUpdateMaterialIDOffset; - /* 0x30 */ s32 mCRegNameTabOffset; - /* 0x34 */ s32 mKRegNameTabOffset; - /* 0x38 */ s32 mCRValuesOffset; - /* 0x3C */ s32 mCGValuesOffset; - /* 0x40 */ s32 mCBValuesOffset; - /* 0x44 */ s32 mCAValuesOffset; - /* 0x48 */ s32 mKRValuesOffset; - /* 0x4C */ s32 mKGValuesOffset; - /* 0x50 */ s32 mKBValuesOffset; - /* 0x54 */ s32 mKAValuesOffset; + /* 0x20 */ void* mCRegTableOffset; + /* 0x24 */ void* mKRegTableOffset; + /* 0x28 */ void* mCRegUpdateMaterialIDOffset; + /* 0x2C */ void* mKRegUpdateMaterialIDOffset; + /* 0x30 */ void* mCRegNameTabOffset; + /* 0x34 */ void* mKRegNameTabOffset; + /* 0x38 */ void* mCRValuesOffset; + /* 0x3C */ void* mCGValuesOffset; + /* 0x40 */ void* mCBValuesOffset; + /* 0x44 */ void* mCAValuesOffset; + /* 0x48 */ void* mKRValuesOffset; + /* 0x4C */ void* mKGValuesOffset; + /* 0x50 */ void* mKBValuesOffset; + /* 0x54 */ void* mKAValuesOffset; }; // Size = 0x58 STATIC_ASSERT(sizeof(J3DAnmTevRegKeyData) == 0x58); @@ -373,13 +373,13 @@ struct J3DAnmColorFullData { /* PlaceHolder Structure */ /* 0x0C */ s16 mFrameMax; /* 0x0E */ u16 mUpdateMaterialNum; /* 0x10 */ u8 field_0x10[0x18 - 0x10]; - /* 0x18 */ s32 mTableOffset; - /* 0x1C */ s32 mUpdateMaterialIDOffset; - /* 0x20 */ s32 mNameTabOffset; - /* 0x24 */ s32 mRValuesOffset; - /* 0x28 */ s32 mGValuesOffset; - /* 0x2C */ s32 mBValuesOffset; - /* 0x30 */ s32 mAValuesOffset; + /* 0x18 */ void* mTableOffset; + /* 0x1C */ void* mUpdateMaterialIDOffset; + /* 0x20 */ void* mNameTabOffset; + /* 0x24 */ void* mRValuesOffset; + /* 0x28 */ void* mGValuesOffset; + /* 0x2C */ void* mBValuesOffset; + /* 0x30 */ void* mAValuesOffset; }; // Size = 0x34 STATIC_ASSERT(sizeof(J3DAnmColorFullData) == 0x34); @@ -403,10 +403,10 @@ struct J3DAnmTransformKeyData { /* 0x0A */ s16 mFrameMax; /* 0x0C */ u16 field_0xc; /* 0x10 */ int field_0x10; - /* 0x14 */ s32 mTableOffset; - /* 0x18 */ s32 field_0x18; - /* 0x1c */ s32 field_0x1c; - /* 0x20 */ s32 field_0x20; + /* 0x14 */ void* mTableOffset; + /* 0x18 */ void* field_0x18; + /* 0x1c */ void* field_0x1c; + /* 0x20 */ void* field_0x20; }; /** @@ -418,8 +418,8 @@ struct J3DAnmClusterKeyData { /* 0x08 */ u8 field_0x8; /* 0x0A */ s16 mFrameMax; /* 0x0C */ s32 field_0xc; - /* 0x10 */ s32 mTableOffset; - /* 0x14 */ s32 mWeightOffset; + /* 0x10 */ void* mTableOffset; + /* 0x14 */ void* mWeightOffset; }; /** @@ -431,8 +431,8 @@ struct J3DAnmClusterFullData { /* 0x08 */ u8 field_0x8; /* 0x0A */ s16 mFrameMax; /* 0x0C */ s32 field_0xc; - /* 0x10 */ s32 mTableOffset; - /* 0x14 */ s32 mWeightOffset; + /* 0x10 */ void* mTableOffset; + /* 0x14 */ void* mWeightOffset; }; /** @@ -487,7 +487,7 @@ public: /* 80328E40 */ J3DAnmTransform(s16, f32*, s16*, f32*); /* 8003B93C */ virtual ~J3DAnmTransform() {} - /* 8003C77C */ virtual s32 getKind() const; + /* 8003C77C */ virtual s32 getKind() const { return 0; } virtual void getTransform(u16, J3DTransformInfo*) const = 0; /* 0x0C */ f32* mScaleData; @@ -512,9 +512,11 @@ public: /* 80329A34 */ void calcTransform(f32, u16, J3DTransformInfo*) const; - /* 8003B8D0 */ virtual ~J3DAnmTransformKey(); - /* 8003C800 */ virtual s32 getKind() const; - /* 8003C808 */ virtual void getTransform(u16, J3DTransformInfo*) const; + /* 8003B8D0 */ virtual ~J3DAnmTransformKey() {} + /* 8003C800 */ virtual s32 getKind() const { return 8; } + /* 8003C808 */ virtual void getTransform(u16 param_0, J3DTransformInfo* param_1) const { + calcTransform(mFrame, param_0, param_1); + } /* 0x20 */ int mDecShift; /* 0x24 */ J3DAnmTransformKeyTable* mAnmTable; @@ -860,8 +862,8 @@ public: mVisibility = NULL; } - /* 8033979C */ virtual ~J3DAnmVisibilityFull(); - /* 803397F8 */ virtual s32 getKind() const; + /* 8033979C */ virtual ~J3DAnmVisibilityFull() {} + /* 803397F8 */ virtual s32 getKind() const { return 6; } /* 0x0C */ u16 mUpdateMaterialNum; /* 0x0E */ u16 field_0xe; @@ -921,4 +923,49 @@ public: /* 0x10 */ f32 mFrame; }; // Size: 0x14 +struct J3DMtxCalcAnmBase: public J3DMtxCalc { + J3DMtxCalcAnmBase(J3DAnmTransform* param_0) { mAnmTransform = param_0; } + /* 8000D8EC */ ~J3DMtxCalcAnmBase() {} + /* 80014FB8 */ J3DAnmTransform* getAnmTransform() { return mAnmTransform; } + /* 80014FC0 */ void setAnmTransform(J3DAnmTransform* param_0) { mAnmTransform = param_0; } + + J3DAnmTransform* mAnmTransform; +}; + +struct J3DMtxCalcAnimationAdaptorBase { + J3DMtxCalcAnimationAdaptorBase() {} + void change(J3DAnmTransform*) {} +}; + +template <typename A0> +struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase { + J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* param_0) {} + void calc(J3DMtxCalcAnmBase* param_0) { + J3DTransformInfo transform; + J3DTransformInfo* transform_p; + if (param_0->getAnmTransform() != NULL) { + u16 jnt_no = J3DMtxCalc::getJoint()->getJntNo(); + param_0->getAnmTransform()->getTransform(jnt_no, &transform); + transform_p = &transform; + } else { + transform_p = &J3DMtxCalc::getJoint()->getTransformInfo(); + } + A0::calcTransform(*transform_p); + } +}; + +template <typename A0, typename B0> +struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase { + J3DMtxCalcAnimation(J3DAnmTransform* param_0) : J3DMtxCalcAnmBase(param_0), field_0x8(param_0) {} + ~J3DMtxCalcAnimation() {} + void setAnmTransform(J3DAnmTransform* param_0) { + mAnmTransform = param_0; + field_0x8.change(param_0); + } + void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); } + void calc() { field_0x8.calc(this); } + + A0 field_0x8; +}; + #endif /* J3DANIMATION_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index 8ae6fbe944..ff9d189779 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -18,12 +18,12 @@ public: /* 80325D1C */ static void setMtxBuffer(J3DMtxBuffer*); /* 8000D948 */ virtual ~J3DMtxCalc() {} - /* 80014E90 */ virtual void setAnmTransform(J3DAnmTransform*); - /* 80014E9C */ virtual J3DAnmTransform* getAnmTransform(); - /* 80014E8C */ virtual void setAnmTransform(u8, J3DAnmTransform*); - /* 80014E94 */ virtual J3DAnmTransform* getAnmTransform(u8); - /* 80014EA4 */ virtual void setWeight(u8, f32); - /* 80014EA8 */ virtual void getWeight(u8) const; + /* 80014E90 */ virtual void setAnmTransform(J3DAnmTransform*) {} + /* 80014E9C */ virtual J3DAnmTransform* getAnmTransform() { return NULL; } + /* 80014E8C */ virtual void setAnmTransform(u8, J3DAnmTransform*) {} + /* 80014E94 */ virtual J3DAnmTransform* getAnmTransform(u8) { return NULL; } + /* 80014EA4 */ virtual void setWeight(u8, f32) {} + /* 80014EA8 */ virtual f32 getWeight(u8) const { return 0.0f; } virtual void init(const Vec& param_0, const Mtx&) = 0; virtual void calc() = 0; diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 18e7c7ec19..9ab7424801 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -78,12 +78,12 @@ public: /* 803172FC */ virtual s32 countDLSize(); virtual u32 getType() = 0; /* 8031741C */ virtual void setTexGenNum(u32 const*); - /* 8000E0D0 */ virtual void setTexGenNum(u32); - /* 8000DFE8 */ virtual u32 getTexGenNum() const; - /* 8000E0CC */ virtual void setTexCoord(u32, J3DTexCoord const*); - /* 8000DFE0 */ virtual J3DTexCoord* getTexCoord(u32); + /* 8000E0D0 */ virtual void setTexGenNum(u32) {} + /* 8000DFE8 */ virtual u32 getTexGenNum() const { return 0; } + /* 8000E0CC */ virtual void setTexCoord(u32, J3DTexCoord const*) {} + /* 8000DFE0 */ virtual J3DTexCoord* getTexCoord(u32) { return NULL; } /* 8003AB2C */ virtual void setTexMtx(u32, J3DTexMtx*) {} - /* 8000DFD8 */ virtual J3DTexMtx* getTexMtx(u32); + /* 8000DFD8 */ virtual J3DTexMtx* getTexMtx(u32) { return NULL; } /* 80317424 */ virtual void setNBTScale(J3DNBTScale const*); /* 80317420 */ virtual void setNBTScale(J3DNBTScale); /* 80317334 */ virtual J3DNBTScale* getNBTScale(); @@ -217,37 +217,37 @@ public: virtual u32 getType() = 0; /* 8031730C */ virtual s32 countDLSize(); /* 80323544 */ virtual void setTexNo(u32, u16 const*); - /* 8000E0AC */ virtual void setTexNo(u32, u16); - /* 8000DF94 */ virtual u16 getTexNo(u32) const; + /* 8000E0AC */ virtual void setTexNo(u32, u16) {} + /* 8000DF94 */ virtual u16 getTexNo(u32) const { return 0xffff; } /* 80323548 */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 8000E0BC */ virtual void setTevOrder(u32, J3DTevOrder); - /* 8000DFB8 */ virtual J3DTevOrder* getTevOrder(u32); + /* 8000E0BC */ virtual void setTevOrder(u32, J3DTevOrder) {} + /* 8000DFB8 */ virtual J3DTevOrder* getTevOrder(u32) { return NULL; } /* 80110E80 */ virtual void setTevColor(u32, J3DGXColorS10 const*); - /* 8000E0C4 */ virtual void setTevColor(u32, J3DGXColorS10); - /* 8000DFC8 */ virtual J3DGXColorS10* getTevColor(u32); - /* 800732AC */ virtual void setTevKColor(u32, J3DGXColor const*); - /* 8000E0C0 */ virtual void setTevKColor(u32, J3DGXColor); - /* 8000DFC0 */ virtual J3DGXColor* getTevKColor(u32); + /* 8000E0C4 */ virtual void setTevColor(u32, J3DGXColorS10) {} + /* 8000DFC8 */ virtual J3DGXColorS10* getTevColor(u32) { return NULL; } + /* 800732AC */ virtual void setTevKColor(u32, J3DGXColor const*) {} + /* 8000E0C0 */ virtual void setTevKColor(u32, J3DGXColor) {} + /* 8000DFC0 */ virtual J3DGXColor* getTevKColor(u32) { return NULL; } /* 80322950 */ virtual void setTevKColorSel(u32, u8 const*); - /* 8000E0B8 */ virtual void setTevKColorSel(u32, u8); - /* 8000DFB0 */ virtual bool getTevKColorSel(u32); + /* 8000E0B8 */ virtual void setTevKColorSel(u32, u8) {} + /* 8000DFB0 */ virtual bool getTevKColorSel(u32) { return false; } /* 80322954 */ virtual void setTevKAlphaSel(u32, u8 const*); - /* 8000E0B4 */ virtual void setTevKAlphaSel(u32, u8); - /* 8000DFA8 */ virtual bool getTevKAlphaSel(u32); + /* 8000E0B4 */ virtual void setTevKAlphaSel(u32, u8) {} + /* 8000DFA8 */ virtual bool getTevKAlphaSel(u32) { return false; } /* 8032354C */ virtual void setTevStageNum(u8 const*); - /* 8000E0C8 */ virtual void setTevStageNum(u8); - /* 8000DFD0 */ virtual u8 getTevStageNum() const; + /* 8000E0C8 */ virtual void setTevStageNum(u8) {} + /* 8000DFD0 */ virtual u8 getTevStageNum() const { return 1; } /* 80323550 */ virtual void setTevStage(u32, J3DTevStage const*); - /* 8000E0A8 */ virtual void setTevStage(u32, J3DTevStage); - /* 8000DF8C */ virtual J3DTevStage* getTevStage(u32); + /* 8000E0A8 */ virtual void setTevStage(u32, J3DTevStage) {} + /* 8000DF8C */ virtual J3DTevStage* getTevStage(u32) { return NULL; } /* 8032295C */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); /* 80322958 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); /* 80322960 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 8000E0B0 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 8000DFA0 */ virtual J3DTevSwapModeTable* getTevSwapModeTable(u32); + /* 8000E0B0 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable) {} + /* 8000DFA0 */ virtual J3DTevSwapModeTable* getTevSwapModeTable(u32) { return NULL; } /* 80323554 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 8000E0A4 */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 8000DF84 */ virtual J3DIndTevStage* getIndTevStage(u32); + /* 8000E0A4 */ virtual void setIndTevStage(u32, J3DIndTevStage) {} + /* 8000DF84 */ virtual J3DIndTevStage* getIndTevStage(u32) { return NULL; } /* 80323558 */ virtual u32 getTexNoOffset() const; /* 80322964 */ virtual bool getTevRegOffset() const; /* 80321FE0 */ virtual void setTexNoOffset(u32); @@ -809,19 +809,19 @@ public: virtual u32 getType() = 0; /* 80317368 */ virtual void setFog(J3DFog); /* 80317364 */ virtual void setFog(J3DFog*); - /* 8000DF5C */ virtual J3DFog* getFog(); + /* 8000DF5C */ virtual J3DFog* getFog() { return NULL; } /* 8031736C */ virtual void setAlphaComp(J3DAlphaComp const*); - /* 8000E01C */ virtual void setAlphaComp(J3DAlphaComp const&); - /* 8000DF54 */ virtual J3DAlphaComp* getAlphaComp(); + /* 8000E01C */ virtual void setAlphaComp(J3DAlphaComp const&) {} + /* 8000DF54 */ virtual J3DAlphaComp* getAlphaComp() { return NULL; } /* 80317370 */ virtual void setBlend(J3DBlend const*); - /* 8000E018 */ virtual void setBlend(J3DBlend const&); - /* 8000DF4C */ virtual J3DBlend* getBlend(); + /* 8000E018 */ virtual void setBlend(J3DBlend const&) {} + /* 8000DF4C */ virtual J3DBlend* getBlend() { return NULL; } /* 80317374 */ virtual void setZMode(J3DZMode const*); - /* 8000E014 */ virtual void setZMode(J3DZMode); - /* 8000DF44 */ virtual J3DZMode* getZMode(); + /* 8000E014 */ virtual void setZMode(J3DZMode) {} + /* 8000DF44 */ virtual J3DZMode* getZMode() { return NULL; } /* 80317378 */ virtual void setZCompLoc(u8 const*); - /* 8000E010 */ virtual void setZCompLoc(u8); - /* 8000DF3C */ virtual u8 getZCompLoc() const; + /* 8000E010 */ virtual void setZCompLoc(u8) {} + /* 8000DF3C */ virtual u8 getZCompLoc() const { return 0; } /* 80317380 */ virtual void setDither(u8 const*); /* 8031737C */ virtual void setDither(u8); /* 80317384 */ virtual u8 getDither() const; @@ -1054,17 +1054,17 @@ public: virtual void load() = 0; /* 80317314 */ virtual s32 countDLSize(); virtual u32 getType() = 0; - /* 8000E0A0 */ virtual void setIndTexStageNum(u8); - /* 8000DF7C */ virtual u8 getIndTexStageNum() const; + /* 8000E0A0 */ virtual void setIndTexStageNum(u8) {} + /* 8000DF7C */ virtual u8 getIndTexStageNum() const { return 0; } /* 80317410 */ virtual void setIndTexOrder(u32, J3DIndTexOrder); /* 8031740C */ virtual void setIndTexOrder(u32, J3DIndTexOrder const*); - /* 8000DF74 */ virtual J3DIndTexOrder* getIndTexOrder(u32); + /* 8000DF74 */ virtual J3DIndTexOrder* getIndTexOrder(u32) { return NULL; } /* 80317414 */ virtual void setIndTexMtx(u32, J3DIndTexMtx const*); - /* 8000E060 */ virtual void setIndTexMtx(u32, J3DIndTexMtx); - /* 8000DF6C */ virtual J3DIndTexMtx* getIndTexMtx(u32); - /* 8000E020 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); + /* 8000E060 */ virtual void setIndTexMtx(u32, J3DIndTexMtx) {} + /* 8000DF6C */ virtual J3DIndTexMtx* getIndTexMtx(u32) { return NULL; } + /* 8000E020 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale) {} /* 80317418 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); - /* 8000DF64 */ virtual J3DIndTexCoordScale* getIndTexCoordScale(u32); + /* 8000DF64 */ virtual J3DIndTexCoordScale* getIndTexCoordScale(u32) { return NULL; } /* 8031726C */ virtual ~J3DIndBlock() {} }; @@ -1215,17 +1215,17 @@ public: /* 80317304 */ virtual s32 countDLSize(); virtual u32 getType() = 0; /* 80317448 */ virtual void setMatColor(u32, J3DGXColor const*); - /* 8000E0DC */ virtual void setMatColor(u32, J3DGXColor); - /* 8000E000 */ virtual J3DGXColor* getMatColor(u32); + /* 8000E0DC */ virtual void setMatColor(u32, J3DGXColor) {} + /* 8000E000 */ virtual J3DGXColor* getMatColor(u32) { return NULL; } /* 801A4C0C */ virtual void setAmbColor(u32, J3DGXColor const*); - /* 8000E0D4 */ virtual void setAmbColor(u32, J3DGXColor); - /* 8000DFF0 */ virtual J3DGXColor* getAmbColor(u32); - /* 8000E0E0 */ virtual void setColorChanNum(u8); + /* 8000E0D4 */ virtual void setAmbColor(u32, J3DGXColor) {} + /* 8000DFF0 */ virtual J3DGXColor* getAmbColor(u32) { return NULL; } + /* 8000E0E0 */ virtual void setColorChanNum(u8) {} /* 8031744C */ virtual void setColorChanNum(u8 const*); - /* 8000E008 */ virtual u8 getColorChanNum() const; - /* 8000E0D8 */ virtual void setColorChan(u32, J3DColorChan const&); + /* 8000E008 */ virtual u8 getColorChanNum() const { return 0; } + /* 8000E0D8 */ virtual void setColorChan(u32, J3DColorChan const&) {} /* 80317450 */ virtual void setColorChan(u32, J3DColorChan const*); - /* 8000DFF8 */ virtual J3DColorChan* getColorChan(u32); + /* 8000DFF8 */ virtual J3DColorChan* getColorChan(u32) { return NULL; } /* 801A4C08 */ virtual void setLight(u32, J3DLightObj*); /* 80317454 */ virtual bool getLight(u32); /* 80317460 */ virtual void setCullMode(u8 const*); diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/include/JSystem/J3DGraphBase/J3DTevs.h index f27215544f..136df1f7a5 100644 --- a/include/JSystem/J3DGraphBase/J3DTevs.h +++ b/include/JSystem/J3DGraphBase/J3DTevs.h @@ -65,7 +65,10 @@ extern J3DTevSwapModeInfo const j3dDefaultTevSwapMode; * */ struct J3DTevStage { - /* 8000E230 */ J3DTevStage(); + /* 8000E230 */ J3DTevStage() { + setTevStageInfo(j3dDefaultTevStageInfo); + setTevSwapModeInfo(j3dDefaultTevSwapMode); + } void setTevColorOp(u8 param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5) { mTevColorOp = mTevColorOp & ~(0x01 << 2) | param_1 << 2; if (param_1 <= 1) { @@ -237,13 +240,14 @@ struct J3DTevOrder : public J3DTevOrderInfo { }; extern u8 j3dTevSwapTableTable[1024]; +extern u8 const data_804563F8; /** * @ingroup jsystem-j3d * */ struct J3DTevSwapModeTable { - /* 8000E134 */ J3DTevSwapModeTable(); + /* 8000E134 */ J3DTevSwapModeTable() { mIdx = data_804563F8; } J3DTevSwapModeTable(J3DTevSwapModeTableInfo const& info) { mIdx = calcTevSwapTableID(info.field_0x0, info.field_0x1, info.field_0x2, info.field_0x3); } diff --git a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h b/include/JSystem/J3DGraphLoader/J3DAnmLoader.h index 789f52bfa0..b59a6c2cac 100644 --- a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h +++ b/include/JSystem/J3DGraphLoader/J3DAnmLoader.h @@ -1,6 +1,7 @@ #ifndef J3DANMLOADER_H #define J3DANMLOADER_H +#include "JSystem/J3DGraphAnimator/J3DAnimation.h" enum J3DAnmLoaderDataBaseFlag { J3DLOADER_UNK_FLAG0, @@ -20,4 +21,57 @@ struct J3DAnmLoaderDataBase { static J3DAnmBase* load(void const* param_0) { return load(param_0, J3DLOADER_UNK_FLAG0); } }; +class J3DAnmLoader { +public: + virtual J3DAnmBase* load(const void*) = 0; + virtual void setResource(J3DAnmBase*, const void*) = 0; + /* 80339800 */ virtual ~J3DAnmLoader() {} +}; + +class J3DAnmKeyLoader_v15 : public J3DAnmLoader { +public: + /* 803384E0 */ J3DAnmKeyLoader_v15(); + /* 80338FEC */ void readAnmTransform(J3DAnmTransformKeyData const*); + /* 80339014 */ void setAnmTransform(J3DAnmTransformKey*, J3DAnmTransformKeyData const*); + /* 803390B0 */ void readAnmTextureSRT(J3DAnmTextureSRTKeyData const*); + /* 803390D8 */ void setAnmTextureSRT(J3DAnmTextureSRTKey*, J3DAnmTextureSRTKeyData const*); + /* 803392B0 */ void readAnmColor(J3DAnmColorKeyData const*); + /* 803392D8 */ void setAnmColor(J3DAnmColorKey*, J3DAnmColorKeyData const*); + /* 803393C4 */ void readAnmCluster(J3DAnmClusterKeyData const*); + /* 803393EC */ void setAnmCluster(J3DAnmClusterKey*, J3DAnmClusterKeyData const*); + /* 80339458 */ void readAnmTevReg(J3DAnmTevRegKeyData const*); + /* 80339480 */ void setAnmTevReg(J3DAnmTevRegKey*, J3DAnmTevRegKeyData const*); + /* 8033960C */ void readAnmVtxColor(J3DAnmVtxColorKeyData const*); + /* 80339634 */ void setAnmVtxColor(J3DAnmVtxColorKey*, J3DAnmVtxColorKeyData const*); + + /* 80338D44 */ virtual J3DAnmBase* load(void const*); + /* 80338E8C */ virtual void setResource(J3DAnmBase*, void const*); + /* 803384FC */ virtual ~J3DAnmKeyLoader_v15(); + + /* 0x4 */ J3DAnmBase* mAnm; +}; + +class J3DAnmFullLoader_v15 : public J3DAnmLoader { +public: + /* 80338468 */ J3DAnmFullLoader_v15(); + /* 80338800 */ void readAnmTransform(J3DAnmTransformFullData const*); + /* 80338828 */ void setAnmTransform(J3DAnmTransformFull*, J3DAnmTransformFullData const*); + /* 803388BC */ void readAnmColor(J3DAnmColorFullData const*); + /* 803388E4 */ void setAnmColor(J3DAnmColorFull*, J3DAnmColorFullData const*); + /* 803389B0 */ void readAnmTexPattern(J3DAnmTexPatternFullData const*); + /* 803389D8 */ void setAnmTexPattern(J3DAnmTexPattern*, J3DAnmTexPatternFullData const*); + /* 80338A7C */ void readAnmVisibility(J3DAnmVisibilityFullData const*); + /* 80338AA4 */ void setAnmVisibility(J3DAnmVisibilityFull*, J3DAnmVisibilityFullData const*); + /* 80338B20 */ void readAnmCluster(J3DAnmClusterFullData const*); + /* 80338B48 */ void setAnmCluster(J3DAnmClusterFull*, J3DAnmClusterFullData const*); + /* 80338BB4 */ void readAnmVtxColor(J3DAnmVtxColorFullData const*); + /* 80338BDC */ void setAnmVtxColor(J3DAnmVtxColorFull*, J3DAnmVtxColorFullData const*); + + /* 80338558 */ virtual J3DAnmBase* load(void const*); + /* 803386A0 */ virtual void setResource(J3DAnmBase*, void const*); + /* 80338484 */ virtual ~J3DAnmFullLoader_v15(); + + /* 0x4 */ J3DAnmBase* mAnm; +}; + #endif /* J3DANMLOADER_H */ diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 673f99c328..4f82b1152c 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -171,7 +171,9 @@ struct TVec3<f32> : public Vec { } inline TVec3<f32> operator+(const TVec3<f32>& b) { - return *this += b; + TVec3<f32> a = *this; + a += b; + return a; } // inline TVec3<f32> operator+(const TVec3<f32>& b) { diff --git a/include/JSystem/JParticle/JPAParticle.h b/include/JSystem/JParticle/JPAParticle.h index 5d057476d9..ed303c3b42 100644 --- a/include/JSystem/JParticle/JPAParticle.h +++ b/include/JSystem/JParticle/JPAParticle.h @@ -81,9 +81,9 @@ public: class JPAParticleCallBack { public: JPAParticleCallBack() {} - virtual ~JPAParticleCallBack(); - virtual void execute(JPABaseEmitter*, JPABaseParticle*); - virtual void draw(JPABaseEmitter*, JPABaseParticle*); + virtual ~JPAParticleCallBack() = 0; + virtual void execute(JPABaseEmitter*, JPABaseParticle*) {} + virtual void draw(JPABaseEmitter*, JPABaseParticle*) {} }; // not sure where this belongs diff --git a/include/JSystem/JUtility/JUTFont.h b/include/JSystem/JUtility/JUTFont.h index b0a1a5c848..ec7c7a1099 100644 --- a/include/JSystem/JUtility/JUTFont.h +++ b/include/JSystem/JUtility/JUTFont.h @@ -77,7 +77,7 @@ public: }; /* 0x0C */ virtual void setGX() = 0; - /* 0x10 */ virtual void setGX(JUtility::TColor col1, JUtility::TColor col2); + /* 0x10 */ virtual void setGX(JUtility::TColor col1, JUtility::TColor col2) { setGX(); } /* 0x14 */ virtual f32 drawChar_scale(f32 a1, f32 a2, f32 a3, f32 a4, int a5, bool a6) = 0; /* 0x18 */ virtual int getLeading() const = 0; /* 0x1C */ virtual s32 getAscent() const = 0; @@ -85,8 +85,8 @@ public: /* 0x24 */ virtual s32 getHeight() const = 0; /* 0x28 */ virtual s32 getWidth() const = 0; /* 0x2C */ virtual void getWidthEntry(int i_no, TWidth* width) const = 0; - /* 0x30 */ virtual int getCellWidth() const; - /* 0x34 */ virtual s32 getCellHeight() const; + /* 0x30 */ virtual s32 getCellWidth() const { return getWidth(); } + /* 0x34 */ virtual s32 getCellHeight() const { return getHeight(); } /* 0x38 */ virtual int getFontType() const = 0; /* 0x3C */ virtual ResFONT* getResFont() const = 0; /* 0x40 */ virtual bool isLeadByte(int a1) const = 0; diff --git a/include/JSystem/JUtility/JUTResFont.h b/include/JSystem/JUtility/JUTResFont.h index 36e79aa3bc..99574b712e 100644 --- a/include/JSystem/JUtility/JUTResFont.h +++ b/include/JSystem/JUtility/JUTResFont.h @@ -33,7 +33,7 @@ public: /* 802DE01C */ virtual s32 getHeight() const; /* 802DDFF8 */ virtual s32 getWidth() const; /* 802DFC64 */ virtual void getWidthEntry(int, JUTFont::TWidth*) const; - /* 802DFD0C */ virtual int getCellWidth() const; + /* 802DFD0C */ virtual s32 getCellWidth() const; /* 802DFD58 */ virtual s32 getCellHeight() const; /* 802DDFE0 */ virtual int getFontType() const; /* 802DDFD8 */ virtual ResFONT* getResFont() const; diff --git a/include/c/c_damagereaction.h b/include/c/c_damagereaction.h index c46af62ddd..e4bfa31286 100644 --- a/include/c/c_damagereaction.h +++ b/include/c/c_damagereaction.h @@ -3,15 +3,16 @@ #include "JSystem/JParticle/JPAParticle.h" -class JPTraceParticleCallBack4 /* : JPAParticleCallBack */ { +class JPTraceParticleCallBack4 : JPAParticleCallBack { public: /* 8001817C */ void execute(JPABaseEmitter*, JPABaseParticle*); /* 800182A4 */ void draw(JPABaseEmitter*, JPABaseParticle*); - /* 80018328 */ ~JPTraceParticleCallBack4(); + /* 80018328 */ ~JPTraceParticleCallBack4() {} }; BOOL cDmrNowMidnaTalk(); extern u8 cDmr_SkipInfo; +extern JPTraceParticleCallBack4 JPTracePCB4; #endif /* C_C_DAMAGEREACTION_H */ diff --git a/include/d/actor/d_a_do.h b/include/d/actor/d_a_do.h index c73d636c77..53a5eab79d 100644 --- a/include/d/actor/d_a_do.h +++ b/include/d/actor/d_a_do.h @@ -63,7 +63,7 @@ struct daDo_HIO_tmp { class daDo_HIO_c { public: /* 80667D4C */ daDo_HIO_c(); - /* 8066ED40 */ virtual ~daDo_HIO_c(); // should be inlined + /* 8066ED40 */ virtual ~daDo_HIO_c() {} /* 0x04 */ s8 field_0x04; /* 0x08 */ f32 mBaseSize; diff --git a/include/d/actor/d_a_dshutter.h b/include/d/actor/d_a_dshutter.h index 5b84d1806b..d523acaa3c 100644 --- a/include/d/actor/d_a_dshutter.h +++ b/include/d/actor/d_a_dshutter.h @@ -18,10 +18,10 @@ public: public: typedef int (daDsh_c::*actionFunc)(); - /* action_c(actionFunc i_initFunc, actionFunc i_execFunc) { + action_c(actionFunc i_initFunc, actionFunc i_execFunc) { mInitFunc = i_initFunc; mExecuteFunc = i_execFunc; - } */ + } actionFunc& getInit() { return mInitFunc; } actionFunc& getExecute() { return mExecuteFunc; } @@ -65,15 +65,15 @@ public: f32 getCloseBoundSpeed() { return CLOSE_BOUND_SPEED; } f32 getCloseBoundRatio() { return CLOSE_BOUND_RATIO; } - static f32 OPEN_SIZE; - static f32 OPEN_ACCEL; - static f32 OPEN_SPEED; - static f32 OPEN_BOUND_SPEED; - static f32 OPEN_BOUND_RATIO; - static f32 CLOSE_ACCEL; - static f32 CLOSE_SPEED; - static f32 CLOSE_BOUND_SPEED; - static f32 CLOSE_BOUND_RATIO; + static f32 const OPEN_SIZE; + static f32 const OPEN_ACCEL; + static f32 const OPEN_SPEED; + static f32 const OPEN_BOUND_SPEED; + static f32 const OPEN_BOUND_RATIO; + static f32 const CLOSE_ACCEL; + static f32 const CLOSE_SPEED; + static f32 const CLOSE_BOUND_SPEED; + static f32 const CLOSE_BOUND_RATIO; /* 0x5A0 */ dComIfG_resLoader_c mResLoader; /* 0x5B0 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_e_ba.h b/include/d/actor/d_a_e_ba.h index 07dbbf314f..1b72ccf1d5 100644 --- a/include/d/actor/d_a_e_ba.h +++ b/include/d/actor/d_a_e_ba.h @@ -79,7 +79,7 @@ public: /* 0x698 */ f32 mKnockbackSpeed; /* 0x69C */ s16 mKnockbackAngle; /* 0x69E */ csXyz mChanceAngle; - /* 0x6A4 */ bool mIsDying; + /* 0x6A4 */ s8 mIsDying; /* 0x6A6 */ s16 mTimer[4]; /* 0x6AE */ s16 mIFrames; /* 0x6B0 */ cXyz field_0x6b0; diff --git a/include/d/actor/d_a_nbomb.h b/include/d/actor/d_a_nbomb.h index 4e3a669804..6d39c762c7 100644 --- a/include/d/actor/d_a_nbomb.h +++ b/include/d/actor/d_a_nbomb.h @@ -76,9 +76,12 @@ public: /* 804CAEE8 */ int execute(); /* 804CBC60 */ int draw(); - virtual BOOL checkExplodeNow(); - virtual void deleteBombAndEffect(); - virtual void setCargoBombExplode(); + virtual BOOL checkExplodeNow() { return field_0xb51 != 0; } + virtual void deleteBombAndEffect() { + fopAcM_delete(this); + onStateFlg0(FLG0_UNK_40); + } + virtual void setCargoBombExplode() { onStateFlg0(FLG0_BOMB_HIT); } void onStateFlg0(daNbomb_FLG0 i_flag) { mStateFlg0 |= i_flag; } void offStateFlg0(daNbomb_FLG0 i_flag) { mStateFlg0 &= ~i_flag; } diff --git a/include/d/actor/d_a_obj_carry.h b/include/d/actor/d_a_obj_carry.h index e2fc67ddb1..cd003078d6 100644 --- a/include/d/actor/d_a_obj_carry.h +++ b/include/d/actor/d_a_obj_carry.h @@ -208,7 +208,7 @@ public: } static u8 const mData[2072]; - static Vec mPos[5]; + static cXyz mPos[5]; static u8 mSttsFlag[5]; static s8 mRoomNo[5]; static bool mSaveFlag; diff --git a/include/d/actor/d_a_obj_movebox.h b/include/d/actor/d_a_obj_movebox.h index 41d024a4c7..f5f2d76839 100644 --- a/include/d/actor/d_a_obj_movebox.h +++ b/include/d/actor/d_a_obj_movebox.h @@ -191,7 +191,7 @@ namespace daObjMovebox { void off_switch1() const { fopAcM_offSwitch(this, prm_get_swSave1()); } void off_switch2() const { fopAcM_offSwitch(this, prmZ_get_swSave2()); } - static s16 M_dir_base[4]; + static const s16 M_dir_base[4]; static const char* const M_arcname[8]; static const dCcD_SrcCyl M_cyl_src; static const daObjMovebox::Hio_c::Attr_c M_attr[8]; diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 110f2245df..3f30e73e69 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -945,7 +945,7 @@ public: inline BOOL i_checkSwordGet(); inline bool i_checkShieldGet() const; inline static BOOL checkNowWolf(); - inline static u32 i_checkNowWolf() { return dComIfGp_getLinkPlayer()->checkWolf(); } + inline static u32 i_checkNowWolf() { return ((daPy_py_c*)dComIfGp_getLinkPlayer())->checkWolf(); } inline bool checkZoraWearFlg() const; inline bool checkMagicArmorWearFlg() const; inline static BOOL i_checkFirstMidnaDemo() { return dComIfGs_isEventBit(0xc10); } diff --git a/include/d/actor/d_a_suspend.h b/include/d/actor/d_a_suspend.h index 8512d2620e..fc4657a3e7 100644 --- a/include/d/actor/d_a_suspend.h +++ b/include/d/actor/d_a_suspend.h @@ -21,8 +21,8 @@ public: /* 800310C8 */ u8 check(fopAc_ac_c*); /* 80031038 */ bool check(cXyz const&); /* 80031150 */ void execute(); - /* 80031F28 */ ~data_c(); - /* 80031F64 */ data_c(); + /* 80031F28 */ ~data_c() {} + /* 80031F64 */ data_c() { reset(); } void setNext(data_c* i_next) { mpNext = i_next; } data_c* getNext() { return mpNext; } @@ -44,7 +44,7 @@ public: public: /* 80031190 */ void add(daSus_c::data_c*); /* 800311FC */ void reset(); - /* 80031EE4 */ room_c(); + /* 80031EE4 */ room_c() { init(); } void init() { mpData = NULL; } /* 0x0 */ data_c* mpData; @@ -68,8 +68,8 @@ public: u8 getSw() { return fopAcM_GetParam(this) & 0xFF; } u8 getRoom() { return fopAcM_GetParam(this) >> 10; } - static u8 mData[1152]; - static u8 mRoom[256]; + static data_c mData[0x20]; + static room_c mRoom[0x40]; static s16 mSetTop; }; diff --git a/include/d/actor/d_a_ykgr.h b/include/d/actor/d_a_ykgr.h index b5dbb597cb..2f164c5bb9 100644 --- a/include/d/actor/d_a_ykgr.h +++ b/include/d/actor/d_a_ykgr.h @@ -8,21 +8,27 @@ #include "d/d_com_inf_game.h" #include "d/d_particle.h" -struct daYkgr_HIO_c { - /* 805A8D98 */ ~daYkgr_HIO_c(); +struct daYkgr_HIO_c : mDoHIO_entry_c { + daYkgr_HIO_c(); + /* 805A8D98 */ virtual ~daYkgr_HIO_c(); - u32 vtable; - u8 field_0x4[0x20 - 0x4]; - f32 field_0x20; - f32 field_0x24; + /* 0x04 */ u8 field_0x4; + /* 0x08 */ s32 field_0x8; + /* 0x0C */ s32 field_0xc; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; }; -struct dPa_YkgrPcallBack /*: public JPAParticleCallBack */ { - /* 805A8E3C */ ~dPa_YkgrPcallBack(); +struct dPa_YkgrPcallBack : public JPAParticleCallBack { + dPa_YkgrPcallBack(); + /* 805A8E3C */ ~dPa_YkgrPcallBack() {} /* 805A848C */ void draw(JPABaseEmitter*, JPABaseParticle*); /* 805A84D4 */ void setParam(f32); - u32 vtable; /* 0x04 */ f32 field_0x4; /* 0x08 */ f32 field_0x8; /* 0x0C */ f32 field_0xc; @@ -32,10 +38,6 @@ struct dPa_YkgrPcallBack /*: public JPAParticleCallBack */ { /* 0x1C */ s8 field_0x1c; }; -extern "C" u8 m_flag__8daYkgr_c; -extern "C" u8 m_alpha_flag__8daYkgr_c; -extern "C" u8 m_alpha__8daYkgr_c; - /** * @ingroup actors-unsorted * @class daYkgr_c @@ -94,11 +96,11 @@ public: static f32 m_aim_rate; static dPath* m_path; - u8 field_0x568[0x570 - 0x568]; - Mtx field_0x570; - u32 field_0x5a0; - f32 field_0x5a4; - f32 field_0x5a8; + /* 0x568 */ u8 field_0x568[0x570 - 0x568]; + /* 0x570 */ Mtx field_0x570; + /* 0x5A0 */ u32 field_0x5a0; + /* 0x5A4 */ f32 field_0x5a4; + /* 0x5A8 */ f32 field_0x5a8; }; STATIC_ASSERT(sizeof(daYkgr_c) == 0x5AC); diff --git a/include/d/d_bg_w_kcol.h b/include/d/d_bg_w_kcol.h index ab788fa959..d8716e31cd 100644 --- a/include/d/d_bg_w_kcol.h +++ b/include/d/d_bg_w_kcol.h @@ -45,7 +45,7 @@ struct KCol_Header { class dBgWKCol : public dBgW_Base { public: /* 8007E6F4 */ dBgWKCol(); - /* 8007E7D0 */ static void initKCollision(void*); + /* 8007E7D0 */ static void* initKCollision(void*); /* 8007E804 */ void create(void* pprism, void* plc); /* 8007E850 */ void getTriNrm(KC_PrismData*, Vec**) const; /* 8007E8C0 */ cM3dGPla GetTriPla(int) const; diff --git a/include/d/d_bomb.h b/include/d/d_bomb.h index 983d205d8f..dfbc553a8a 100644 --- a/include/d/d_bomb.h +++ b/include/d/d_bomb.h @@ -32,9 +32,9 @@ public: static bool checkWaterBomb(fopAc_ac_c*); static bool checkInsectBombMove(fopAc_ac_c*); - virtual BOOL checkExplodeNow(); - virtual void deleteBombAndEffect(); - virtual void setCargoBombExplode(); + virtual BOOL checkExplodeNow() { return FALSE; } + virtual void deleteBombAndEffect() {} + virtual void setCargoBombExplode() {} bool checkStateExplode() { return fopAcM_GetParam(this) == 0; } diff --git a/include/d/d_cam_param.h b/include/d/d_cam_param.h index 438a796283..170c3223b8 100644 --- a/include/d/d_cam_param.h +++ b/include/d/d_cam_param.h @@ -21,7 +21,7 @@ public: /* 0x8 */ int mInputSpeed; /* 0xC */ u8 field_0xc[4]; - /* 800889B0 */ virtual ~dCstick_c(); + /* 800889B0 */ virtual ~dCstick_c() {} f32 SwTHH() { return mThresholdHigh; } }; @@ -64,7 +64,7 @@ struct dCamStyleData { /* 0x0 */ u32 field_0x0; /* 0x4 */ u16 field_0x4; /* 0x6 */ u16 field_0x6; - /* 0x8 */ u8 field_0x8[0x78 - 0x8]; + /* 0x8 */ f32 field_0x8[28]; }; // Size: 0x78 /* 0x0 */ u8 field_0x0[4]; @@ -77,16 +77,19 @@ public: /* 800884F0 */ dCamParam_c(s32); /* 800885D4 */ int Change(s32); /* 80088620 */ int SearchStyle(u32); - /* 80182C60 */ void Arg2(s16); - /* 80182C3C */ void Arg2(); - /* 80182C48 */ void Arg1(); - /* 80182C6C */ void Arg1(u8); - /* 80182C50 */ void Arg0(); - /* 80182C74 */ void Arg0(u8); - /* 80182C7C */ void Fovy(u8); - /* 80182C58 */ void Fovy(); + + /* 80182C60 */ void Arg2(s16 val) { mMapToolArg2 = val; } + /* 80182C3C */ int Arg2() { return mMapToolArg2; } + /* 80182C48 */ u8 Arg1() { return mMapToolArg1; } + /* 80182C6C */ void Arg1(u8 val) { mMapToolArg1 = val; } + /* 80182C50 */ u8 Arg0() { return mMapToolArg0; } + /* 80182C74 */ void Arg0(u8 val) { mMapToolArg0 = val; } + /* 80182C7C */ void Fovy(u8 val) { mMapToolFovy = val; } + /* 80182C58 */ u8 Fovy() { return mMapToolFovy; } /* 80182CB4 */ bool CheckFlag(u16 flag) { return mCurrentStyle->field_0x6 & flag; } - /* 80182CD0 */ void Val(s32, int); + /* 80182CD0 */ f32 Val(s32 param_0, int param_1) { + return mCamStyleData[param_0].field_0x8[param_1]; + } /* 0x00 */ u8 mMapToolFovy; /* 0x01 */ u8 mMapToolArg0; @@ -103,7 +106,7 @@ public: int Algorythmn() { return mCurrentStyle->field_0x4; } bool Flag(s32 param_0, u16 param_1) { return mCamStyleData[param_0].field_0x6 & param_1; } - /* 8008858C */ virtual ~dCamParam_c(); + /* 8008858C */ virtual ~dCamParam_c() {} }; class dCamSetup_c { @@ -111,16 +114,17 @@ public: /* 80088668 */ dCamSetup_c(); /* 80088918 */ bool CheckLatitudeRange(s16*); /* 80088988 */ f32 PlayerHideDist(); - /* 80182BB8 */ void CheckFlag2(u16); - /* 80182BE8 */ void WaitRollSpeed(); - /* 80182BF0 */ void WaitRollTimer(); - /* 80182C1C */ // void ThrowTimer(); - /* 80182C24 */ void ThrowCushion(); - /* 80182C2C */ void ThrowVAngle(); - /* 80182C34 */ void ThrowCtrAdjust(); - /* 80182CEC */ void ChargeBRatio(); - /* 80182CF4 */ void ChargeTimer(); - /* 80182CFC */ void ChargeLatitude(); + + /* 80182BB8 */ bool CheckFlag2(u16 i_flag) { return mFlags2 & i_flag; } + /* 80182BE8 */ f32 WaitRollSpeed() { return mWaitRollSpeed; } + /* 80182BF0 */ int WaitRollTimer() { return mWaitRollTimer; } + /* 80182C1C */ int ThrowTimer() { return mThrowTimer; } + /* 80182C24 */ f32 ThrowCushion() { return mThrowCushion; } + /* 80182C2C */ f32 ThrowVAngle() { return mThrowVAngle; } + /* 80182C34 */ f32 ThrowCtrAdjust() { return mThrowCtrOffset; } + /* 80182CEC */ f32 ChargeBRatio() { return mChargeBRatio; } + /* 80182CF4 */ int ChargeTimer() { return mChargeTimer; } + /* 80182CFC */ f32 ChargeLatitude() { return mChargeLatitude; } bool CheckFlag(u16 i_flag) { return mDebugFlags & i_flag; } f32 ManualEndVal() { return mManualEndVal; } @@ -128,14 +132,13 @@ public: f32 VistaTrimHeight() { return mTrimVistaHeight; } f32 ForceLockOffTimer() { return mForceLockOffTimer; } f32 ForceLockOffDist() { return mForceLockOffDist; } - int ThrowTimer() { return mThrowTimer; } f32 USOValue() { return mFalseValue; } f32 USOAngle() { return mFalseAngle; } /* 0x000 */ f32 mDrawNear; /* 0x004 */ f32 mDrawFar; /* 0x008 */ u16 mDebugFlags; - /* 0x00A */ u16 field_0xa; + /* 0x00A */ u16 mFlags2; /* 0x00C */ int field_0xc; /* 0x010 */ int mModeSwitchType; /* 0x014 */ void* mTypeTable; @@ -199,7 +202,7 @@ public: /* 0x0F8 */ f32 field_0xf8; /* 0x0FC vtable */ - /* 800888B8 */ virtual ~dCamSetup_c(); + /* 800888B8 */ virtual ~dCamSetup_c() {} /* 0x100 */ dCstick_c mCStick; /* 0x114 */ dCamBGChk_c mBGChk; diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index f6dcf5a0d9..7310b55380 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -345,16 +345,12 @@ public: void setXluListZxlu() { setXluDrawList(mDrawBuffers[DB_LIST_Z_XLU]); } void setOpaListFilter() { setOpaDrawList(mDrawBuffers[DB_LIST_FILTER]); } void setXluListFilter() { setXluDrawList(mDrawBuffers[DB_LIST_FILTER]); } - void set3DlineMat(mDoExt_3DlineMat_c *param_1) { - #ifndef NON_VIRTUAL_3DLINEMAT + void set3DlineMat(mDoExt_3DlineMat_c *param_1) { m3DLineMatSortPacket[param_1->getMaterialID()].setMat(param_1); - #endif } void set3DlineMatDark(mDoExt_3DlineMat_c *param_1) { - #ifndef NON_VIRTUAL_3DLINEMAT m3DLineMatSortPacket[param_1->getMaterialID()].setMatDark(param_1); - #endif } void peekZdata() { mPeekZ.peekData(); } diff --git a/include/d/d_file_select.h b/include/d/d_file_select.h index f5781ddbd1..52db7307da 100644 --- a/include/d/d_file_select.h +++ b/include/d/d_file_select.h @@ -3,25 +3,36 @@ #include "d/d_com_inf_game.h" #include "d/d_file_sel_warning.h" +#include "d/d_msg_string.h" #include "d/d_name.h" #include "JSystem/J3DGraphLoader/J3DModelLoader.h" #include "JSystem/J3DGraphLoader/J3DAnmLoader.h" class dFile_info_c; -class dDlst_FileSel_c { +class dDlst_FileSel_c : public dDlst_base_c { public: /* 8018DEBC */ void draw(); - /* 8019135C */ ~dDlst_FileSel_c(); + /* 8019135C */ ~dDlst_FileSel_c() { + delete Scr; + delete mpMessageString; + } + + dDlst_FileSel_c() { + mpMessageFont[0] = mDoExt_getMesgFont(); + mpMessageFont[1] = mDoExt_getSubFont(); + mpMessageString = new dMsgString_c(); + } - /* 0x00 */ void* vtable; /* 0x04 */ J2DScreen* Scr; + /* 0x08 */ JUTFont* mpMessageFont[2]; + /* 0x0C */ dMsgString_c* mpMessageString; }; class dFile_select3D_c { public: /* 801902F0 */ dFile_select3D_c(); - /* 80190380 */ /* virtual */ ~dFile_select3D_c(); + /* 80190380 */ virtual ~dFile_select3D_c(); /* 801903DC */ void _create(u8, u8); /* 8019049C */ void _delete(); /* 801904A0 */ void freeHeap(); @@ -40,7 +51,6 @@ public: void setBasePane(CPaneMgr* paneMgr) { mPaneMgr = paneMgr; } void setBase2Pane(J2DPane* pane) { mPane = pane; } - /* 0x0000 */ void* vtable; /* 0x0004 */ JKRSolidHeap* mpHeap; /* 0x0008 */ J3DModel* mpModel; /* 0x000C */ mDoExt_bckAnm* mBckAnm; @@ -59,78 +69,48 @@ public: /* 0x03CF */ u8 mMaskIdx; }; -class dDlst_FileSelYn_c { +class dDlst_FileSelYn_c : public dDlst_base_c { public: /* 8018E0C0 */ void draw(); - /* 801911F4 */ ~dDlst_FileSelYn_c(); + /* 801911F4 */ virtual ~dDlst_FileSelYn_c() { delete ScrYn; } - /* 0x00 */ void* vtable; /* 0x04 */ J2DScreen* ScrYn; /* 0x08 */ u8 field_0x08[4]; }; -class dDlst_FileSelDt_c { +class dDlst_FileSelDt_c : public dDlst_base_c { public: /* 8018DEF4 */ void draw(); - /* 801912E4 */ ~dDlst_FileSelDt_c(); + /* 801912E4 */ virtual ~dDlst_FileSelDt_c() { delete ScrDt; } - /* 0x00 */ void* vtable; /* 0x04 */ J2DScreen* ScrDt; /* 0x08 */ J2DPane* mpPane; /* 0x0C */ J2DPane* mpPane2; }; -class dDlst_FileSelCp_c { +class dDlst_FileSelCp_c : public dDlst_base_c { public: /* 8018DFFC */ void draw(); - /* 8019126C */ ~dDlst_FileSelCp_c(); + /* 8019126C */ virtual ~dDlst_FileSelCp_c() { delete Scr; } - /* 0x00 */ void* vtable; /* 0x04 */ J2DScreen* Scr; /* 0x08 */ bool field_0x08; /* 0x0C */ J2DPane* mpPane1; /* 0x10 */ J2DPane* mpPane2; }; -class dDlst_FileSel3m_c { +class dDlst_FileSel3m_c : public dDlst_base_c { public: /* 8018E0F8 */ void draw(); - /* 8019117C */ ~dDlst_FileSel3m_c(); + /* 8019117C */ virtual ~dDlst_FileSel3m_c() { delete Scr3m; } - /* 0x00 */ void* vtable; /* 0x04 */ J2DScreen* Scr3m; }; -// temp struct in order to get matches -class dFs_HIO_c_tmp { -public: - /* 0x0000 */ void* vtable; - /* 0x0004 */ s8 field_0x0004; - /* 0x0005 */ u8 field_0x0005; - /* 0x0006 */ u8 field_0x0006; - /* 0x0007 */ u8 field_0x0007; - /* 0x0008 */ u8 field_0x0008; - /* 0x0009 */ u8 field_0x0009; - /* 0x000A */ u8 field_0x000a; - /* 0x000B */ u8 field_0x000b; - /* 0x000C */ u8 field_0x000c; - /* 0x000D */ u8 field_0x000d; - /* 0x000E */ u8 field_0x000e[2]; - /* 0x0010 */ float field_0x0010[3]; - /* 0x001C */ u8 field_0x001c; - /* 0x001D */ u8 field_0x001d; - /* 0x001E */ u8 field_0x001e; - /* 0x001F */ u8 field_0x001f; - /* 0x0020 */ u8 field_0x0020; - /* 0x0021 */ u8 field_0x0021; - /* 0x0022 */ u8 field_0x0022; - /* 0x0023 */ u8 field_0x0023; -}; - class dFs_HIO_c { public: /* 801835F8 */ dFs_HIO_c(); - /* 801913E0 */ virtual ~dFs_HIO_c(); + /* 801913E0 */ virtual ~dFs_HIO_c() {} /* 0x0000 */ // void* vtable; /* 0x0004 */ s8 field_0x0004; @@ -163,7 +143,7 @@ public: typedef void (dFile_select_c::*DispFunc)(); /* 8018366C */ dFile_select_c(JKRArchive*); - /* 8018375C */ ~dFile_select_c(); + /* 8018375C */ virtual ~dFile_select_c(); /* 801843CC */ void _create(); /* 801844FC */ void _move(); /* 80184664 */ void selFileWakuAnm(); @@ -326,24 +306,21 @@ public: u8 getSelectNum() { return mSelectNum; } void setUseType(u8 type) { mUseType = type; } - /* 0x0000 */ void* vtable; - /* 0x0004 */ u8 field_0x04[4]; - /* 0x0008 */ JKRArchive* mpArchive; - /* 0x000C */ dFile_select3D_c* mpFileSelect3d; - /* 0x0010 */ dDlst_FileSel_c fileSel; - /* 0x0018 */ JUTFont* mpMessageFont[2]; - /* 0x0020 */ dMsgString_c* mpMessageString; - /* 0x0024 */ dDlst_FileSelDt_c mSelDt; - /* 0x0034 */ dDlst_FileSelCp_c mCpSel; - /* 0x0048 */ dDlst_FileSelYn_c mYnSel; - /* 0x0054 */ dDlst_FileSel3m_c m3mSel; + /* 0x0004 */ u8 field_0x04[4]; + /* 0x0008 */ JKRArchive* mpArchive; + /* 0x000C */ dFile_select3D_c* mpFileSelect3d; + /* 0x0010 */ dDlst_FileSel_c fileSel; + /* 0x0024 */ dDlst_FileSelDt_c mSelDt; + /* 0x0034 */ dDlst_FileSelCp_c mCpSel; + /* 0x0048 */ dDlst_FileSelYn_c mYnSel; + /* 0x0054 */ dDlst_FileSel3m_c m3mSel; /* 0x005C */ u8 field_0x005c[4]; - /* 0x0060 */ dSelect_cursor_c* mSelIcon; - /* 0x0064 */ dSelect_cursor_c* mSelIcon2; + /* 0x0060 */ dSelect_cursor_c* mSelIcon; + /* 0x0064 */ dSelect_cursor_c* mSelIcon2; /* 0x0068 */ dName_c* mpName; - /* 0x006C */ dFile_warning_c* mpFileWarning; + /* 0x006C */ dFile_warning_c* mpFileWarning; /* 0x0070 */ dFile_info_c* field_0x0070[3]; - /* 0x007C */ dFile_info_c* mpFileInfo[2]; + /* 0x007C */ dFile_info_c* mpFileInfo[2]; /* 0x0084 */ J2DAnmTransform* field_0x0084; /* 0x0088 */ J2DAnmTransform* field_0x0088; /* 0x008C */ J2DAnmTransform* field_0x008c; @@ -352,8 +329,8 @@ public: /* 0x0098 */ J2DAnmTransform* field_0x0098; /* 0x009C */ J2DAnmTransform* field_0x009c; /* 0x00A0 */ s32 field_0x00a0; - /* 0x00A4 */ CPaneMgr* field_0x00a4; - /* 0x00A8 */ u8 field_0x00a8[0xb0-0xa8]; + /* 0x00A4 */ CPaneMgr* field_0x00a4; + /* 0x00A8 */ u8 field_0x00a8[0xb0-0xa8]; /* 0x00B0 */ s32 field_0x00b0; /* 0x00B4 */ s32 field_0x00b4; /* 0x00B8 */ u8 field_0x00b8; @@ -369,10 +346,10 @@ public: /* 0x00F8 */ s32 field_0x00f8[2]; /* 0x0100 */ s32 field_0x0100; /* 0x0104 */ s32 field_0x0104; - /* 0x0108 */ bool field_0x0108; - /* 0x0109 */ bool field_0x0109; - /* 0x010A */ u8 field_0x10a[2]; - /* 0x010C */ J2DPane* mpPane; + /* 0x0108 */ bool field_0x0108; + /* 0x0109 */ bool field_0x0109; + /* 0x010A */ u8 field_0x10a[2]; + /* 0x010C */ J2DPane* mpPane; /* 0x0110 */ int field_0x0110; /* 0x0114 */ int field_0x0114; /* 0x0118 */ J2DPane* field_0x0118; diff --git a/include/d/d_gameover.h b/include/d/d_gameover.h index 46ab16304c..2a231ecf89 100644 --- a/include/d/d_gameover.h +++ b/include/d/d_gameover.h @@ -10,7 +10,7 @@ class dDlst_Gameover_CAPTURE_c : public dDlst_base_c { public: /* 8019ACF8 */ virtual void draw(); - /* 8019C2CC */ virtual ~dDlst_Gameover_CAPTURE_c(); // supposed to be inlined + /* 8019C2CC */ virtual ~dDlst_Gameover_CAPTURE_c() {} }; class dMsgScrnLight_c; diff --git a/include/d/d_menu_collect.h b/include/d/d_menu_collect.h index b359918d12..3149f5ddf0 100644 --- a/include/d/d_menu_collect.h +++ b/include/d/d_menu_collect.h @@ -21,7 +21,7 @@ class dMenu_Collect2DTop_c : public dDlst_base_c { public: dMenu_Collect2DTop_c(dMenu_Collect2D_c* param_0) { mpCollect2D = param_0; } /* 801B77A4 */ virtual void draw(); - /* 801B7EB8 */ virtual ~dMenu_Collect2DTop_c(); + /* 801B7EB8 */ virtual ~dMenu_Collect2DTop_c() {} /* 0x4 */ dMenu_Collect2D_c* mpCollect2D; }; @@ -102,7 +102,7 @@ public: /* 801B61BC */ void setItemNameString(u8, u8); /* 801B6344 */ void setItemNameStringNull(); - /* 801B7F00 */ virtual void draw(); + /* 801B7F00 */ virtual void draw() { _draw(); } /* 801AFE34 */ virtual ~dMenu_Collect2D_c(); u8 getCursorX() { return mCursorX; } diff --git a/include/d/d_menu_save.h b/include/d/d_menu_save.h index 12a022e90d..3998edae21 100644 --- a/include/d/d_menu_save.h +++ b/include/d/d_menu_save.h @@ -265,7 +265,7 @@ public: /* 801F69B8 */ void _draw(); /* 801F69FC */ void _draw2(); - /* 802844D0 */ virtual ~dMenu_save_c(); + /* 802844D0 */ virtual ~dMenu_save_c() {} u8 getSaveStatus() { return mSaveStatus; } u8 getEndStatus() { return mEndStatus; } diff --git a/include/d/d_meter2.h b/include/d/d_meter2.h index 52a26cdd00..9c2942abe3 100644 --- a/include/d/d_meter2.h +++ b/include/d/d_meter2.h @@ -19,20 +19,12 @@ class dMeterHaihai_c; class dMeterSub_c : public dDlst_base_c { public: - // these seem to be inlined, but generates in the wrong order in d_scope.cpp - /* 8019412C */ //virtual void draw() {} - /* 801940D4 */ //virtual ~dMeterSub_c() {} - /* 8019411C */ //virtual int _create() { return 0; } - /* 80194130 */ //virtual int _execute(u32) { return 0; } - /* 80194124 */ //virtual int _delete() { return 0; } - /* 80194138 */ //virtual int isDead() { return 0; } - - /* 8019412C */ virtual void draw(); + /* 8019412C */ virtual void draw() {} /* 801940D4 */ virtual ~dMeterSub_c() {} - /* 8019411C */ virtual int _create(); - /* 80194130 */ virtual int _execute(u32); - /* 80194124 */ virtual int _delete(); - /* 80194138 */ virtual bool isDead(); + /* 8019411C */ virtual int _create() { return 0; } + /* 80194130 */ virtual int _execute(u32) { return 0; } + /* 80194124 */ virtual int _delete() { return 0; } + /* 80194138 */ virtual bool isDead() { return false; } }; class dMeter2_c : public msg_class { diff --git a/include/d/d_meter2_draw.h b/include/d/d_meter2_draw.h index a4f83569e2..cd66fe9e5f 100644 --- a/include/d/d_meter2_draw.h +++ b/include/d/d_meter2_draw.h @@ -354,8 +354,8 @@ private: /* 0x518 */ J2DPicture* mpItemXYPane[3]; /* 0x524 */ int field_0x524[2][2]; /* 0x534 */ J2DAnmTransformKey* mPikariBck; - /* 0x538 */ J2DAnmColorKey* mPikariBpk; - /* 0x53C */ J2DAnmColorKey* mpOxygenBpk[3]; + /* 0x538 */ J2DAnmColor* mPikariBpk; + /* 0x53C */ J2DAnmColor* mpOxygenBpk[3]; /* 0x548 */ JUtility::TColor mPikariBlack; /* 0x54C */ JUtility::TColor mPikariWhite; /* 0x550 */ f32 field_0x550; diff --git a/include/d/d_msg_scrn_3select.h b/include/d/d_msg_scrn_3select.h index 3dd9a99206..5ca4ac98dc 100644 --- a/include/d/d_msg_scrn_3select.h +++ b/include/d/d_msg_scrn_3select.h @@ -5,7 +5,7 @@ class J2DScreen; class J2DAnmTransform; -class J2DAnmColor; +class J2DAnmColorKey; class J2DAnmTextureSRTKey; class dSelect_cursor_c; class CPaneMgr; @@ -58,7 +58,7 @@ public: private: /* 0x004 */ J2DScreen* mpScreen; /* 0x008 */ J2DAnmTransform* mpAnmBck; - /* 0x00C */ J2DAnmColor* mpAnmBpk; + /* 0x00C */ J2DAnmColorKey* mpAnmBpk; /* 0x010 */ J2DAnmTextureSRTKey* mpAnmBtk; /* 0x014 */ dSelect_cursor_c* mpSelectCursor; /* 0x018 */ CPaneMgr* mpParent; diff --git a/include/d/d_msg_string.h b/include/d/d_msg_string.h index ffbce2c3f2..7a80ee4a14 100644 --- a/include/d/d_msg_string.h +++ b/include/d/d_msg_string.h @@ -12,7 +12,14 @@ public: /* 80249CA0 */ dMsgString_c(u8); /* 80249D28 */ ~dMsgString_c(); - /* 80191B6C */ virtual f32 getString(u32, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*, u8); + /* 80191B6C */ virtual f32 getString(u32 param_0, J2DTextBox* param_1, J2DTextBox* param_2, + JUTFont* param_3, COutFont_c* param_4, u8 param_5) { + if (param_4 == NULL && mpOutFont != NULL) { + return getStringLocal(param_0, param_1, param_2, param_3, mpOutFont, param_5); + } else { + return getStringLocal(param_0, param_1, param_2, param_3, param_4, param_5); + } + } /* 801E1D10 */ virtual void getStringPage(u32, u8, u8, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*, u8); /* 80249DB4 */ virtual void resetStringLocal(J2DTextBox*); diff --git a/include/d/d_particle.h b/include/d/d_particle.h index 6171193961..45a95833ca 100644 --- a/include/d/d_particle.h +++ b/include/d/d_particle.h @@ -193,10 +193,10 @@ public: setModel(param_0, param_1, param_2, param_3, param_4, param_5); } - static dPa_modelEcallBack& getEcallback() { return (dPa_modelEcallBack&)mEcallback; } - static dPa_modelEcallBack* mEcallback; // Should be dPa_modelEcallBack + static dPa_modelEcallBack& getEcallback() { return mEcallback; } + static dPa_modelEcallBack mEcallback; - static u8 mPcallback[4]; + static dPa_modelPcallBack mPcallback; static model_c* mModel; }; @@ -415,15 +415,15 @@ public: static JPAEmitterManager* getEmitterManager() { return mEmitterMng; } - static JPAParticleCallBack* getLight8PcallBack() { + static dPa_light8PcallBack* getLight8PcallBack() { return &mLight8PcallBack; } - static JPAParticleCallBack* getGen_b_Light8PcallBack() { + static dPa_gen_b_light8PcallBack* getGen_b_Light8PcallBack() { return &m_b_Light8PcallBack; } - static JPAParticleCallBack* getGen_d_Light8PcallBack() { + static dPa_gen_d_light8PcallBack* getGen_d_Light8PcallBack() { return &m_d_Light8PcallBack; } @@ -439,11 +439,11 @@ public: return &mLight8EcallBack; } - static JPAParticleCallBack* getParticleTracePCB() { + static dPa_particleTracePcallBack_c* getParticleTracePCB() { return &mParticleTracePCB; } - static JPAParticleCallBack* getFsenthPcallBack() { + static dPa_fsenthPcallBack* getFsenthPcallBack() { return &mFsenthPcallBack; } @@ -455,15 +455,15 @@ public: static u8 mLifeBall[24]; static Mtx mWindViewMatrix; static JPAEmitterManager* mEmitterMng; - static JPAParticleCallBack mWaterBubblePcallBack; - static JPAParticleCallBack mFsenthPcallBack; + static dPa_wbPcallBack_c mWaterBubblePcallBack; + static dPa_fsenthPcallBack mFsenthPcallBack; static dPa_light8EcallBack mLight8EcallBack; - static JPAParticleCallBack mLight8PcallBack; + static dPa_light8PcallBack mLight8PcallBack; static dPa_gen_b_light8EcallBack m_b_Light8EcallBack; - static JPAParticleCallBack m_b_Light8PcallBack; + static dPa_gen_b_light8PcallBack m_b_Light8PcallBack; static dPa_gen_d_light8EcallBack m_d_Light8EcallBack; - static JPAParticleCallBack m_d_Light8PcallBack; - static JPAParticleCallBack mParticleTracePCB; + static dPa_gen_d_light8PcallBack m_d_Light8PcallBack; + static dPa_particleTracePcallBack_c mParticleTracePCB; static u8 mStatus; private: diff --git a/include/d/d_select_cursor.h b/include/d/d_select_cursor.h index ba57898dcf..99af9373d5 100644 --- a/include/d/d_select_cursor.h +++ b/include/d/d_select_cursor.h @@ -10,7 +10,7 @@ class dSelect_cursorHIO_c { public: /* 801941E4 */ dSelect_cursorHIO_c(); - /* 80195978 */ virtual ~dSelect_cursorHIO_c(); + /* 80195978 */ virtual ~dSelect_cursorHIO_c() {} /* 0x04 */ s8 field_0x4; /* 0x08 */ f32 field_0x8; diff --git a/include/d/d_select_icon.h b/include/d/d_select_icon.h index aa3e2ccbce..60800f34b5 100644 --- a/include/d/d_select_icon.h +++ b/include/d/d_select_icon.h @@ -2,11 +2,12 @@ #define D_D_SELECT_ICON_H #include "JSystem/J2DGraph/J2DScreen.h" +#include "d/d_drawlist.h" #include "d/d_pane_class.h" class dSi_HIO_c { public: - virtual ~dSi_HIO_c(); + virtual ~dSi_HIO_c() {} dSi_HIO_c(); u8 field_0x4[4]; @@ -20,10 +21,10 @@ public: virtual ~dSelect_icon_c() {} void drawSelf() { - // Not sure what field_0x4 is + field_0x4.draw(); } - /* 0x04 */ u8 field_0x4[4]; + /* 0x04 */ dDlst_base_c field_0x4; // type is a guess /* 0x08 */ J2DScreen* field_0x8; /* 0x0C */ CPaneMgrAlpha* field_0xc; /* 0x10 */ CPaneMgr* field_0x10; diff --git a/include/f_op/f_op_actor_enemy.h b/include/f_op/f_op_actor_enemy.h index d8cf625ff6..049f7381f3 100644 --- a/include/f_op/f_op_actor_enemy.h +++ b/include/f_op/f_op_actor_enemy.h @@ -48,18 +48,16 @@ static int setMidnaBindEffect(fopEn_enemy_c* i_actorP, Z2CreatureEnemy* i_creatu sp68.x = -cM_atan2s(sp60.y, JMAFastSqrt(sp60.x * sp60.x + sp60.z * sp60.z)); sp68.z = 0; - s32 room_no = fopAcM_GetRoomNo(a_this); JPABaseEmitter* emitter = dComIfGp_particle_set( - 0x29B, i_effPos, &a_this->tevStr, &sp68, i_effSize, 0xFF, NULL, room_no, - &e_prim[darkworld_check], &e_env[darkworld_check], NULL); + 0x29B, i_effPos, &a_this->tevStr, &sp68, i_effSize, 0xFF, NULL, + fopAcM_GetRoomNo(a_this), &e_prim[darkworld_check], &e_env[darkworld_check], NULL); if (emitter != NULL) { emitter->setGlobalParticleHeightScale((JREG_F(7) + 0.01f) * sp60.abs()); } - room_no = fopAcM_GetRoomNo(a_this); dComIfGp_particle_set(0x29C, i_effPos, &a_this->tevStr, &a_this->shape_angle, i_effSize, - 0xFF, NULL, room_no, &e_prim[darkworld_check], + 0xFF, NULL, fopAcM_GetRoomNo(a_this), &e_prim[darkworld_check], &e_env[darkworld_check], NULL); i_creatureP->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_ON, 0, -1); @@ -75,7 +73,7 @@ static int setMidnaBindEffect(fopEn_enemy_c* i_actorP, Z2CreatureEnemy* i_creatu &e_env[darkworld_check], NULL); } - i_creatureP->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_SUS, 0, -1); + i_creatureP->startCreatureSoundLevel(Z2SE_MIDNA_BIND_LOCK_SUS, 0, -1); return 1; } diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 5ff787c1bb..5a328e208c 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -171,8 +171,8 @@ enum fopAcM_STATUS { /* 0x100000 */ fopAcM_STATUS_HOOK_CARRY_NOW = 1 << 20, }; -inline s32 fopAcM_GetRoomNo(const fopAc_ac_c* pActor) { - return (s8)pActor->current.roomNo; +inline s8 fopAcM_GetRoomNo(const fopAc_ac_c* pActor) { + return pActor->current.roomNo; } inline fpc_ProcID fopAcM_GetID(const void* pActor) { @@ -691,23 +691,19 @@ inline s32 fopAcM_seenPlayerAngleY(const fopAc_ac_c* i_actor) { s8 dComIfGp_getReverb(int roomNo); inline void fopAcM_seStartCurrent(const fopAc_ac_c* actor, u32 sfxID, u32 param_2) { - s8 roomNo = fopAcM_GetRoomNo(actor); - mDoAud_seStart(sfxID, &actor->current.pos, param_2, dComIfGp_getReverb(roomNo)); + mDoAud_seStart(sfxID, &actor->current.pos, param_2, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); } inline void fopAcM_seStart(const fopAc_ac_c* actor, u32 sfxID, u32 param_2) { - s8 roomNo = fopAcM_GetRoomNo(actor); - mDoAud_seStart(sfxID, &actor->eyePos, param_2, dComIfGp_getReverb(roomNo)); + mDoAud_seStart(sfxID, &actor->eyePos, param_2, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); } inline void fopAcM_seStartLevel(const fopAc_ac_c* actor, u32 sfxID, u32 param_2) { - s8 roomNo = fopAcM_GetRoomNo(actor); - mDoAud_seStartLevel(sfxID, &actor->eyePos, param_2, dComIfGp_getReverb(roomNo)); + mDoAud_seStartLevel(sfxID, &actor->eyePos, param_2, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); } inline void fopAcM_seStartCurrentLevel(const fopAc_ac_c* actor, u32 sfxID, u32 param_2) { - s8 roomNo = fopAcM_GetRoomNo(actor); - mDoAud_seStartLevel(sfxID, &actor->current.pos, param_2, dComIfGp_getReverb(roomNo)); + mDoAud_seStartLevel(sfxID, &actor->current.pos, param_2, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); } inline void fopAcM_offActor(fopAc_ac_c* pActor, u32 flag) { diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h index 4643877124..18cf932620 100644 --- a/include/m_Do/m_Do_MemCard.h +++ b/include/m_Do/m_Do_MemCard.h @@ -1,6 +1,7 @@ #ifndef M_DO_M_DO_MEMCARD_H #define M_DO_M_DO_MEMCARD_H +#include "card.h" #include "dolphin/os/OSMutex.h" #include "global.h" @@ -42,6 +43,14 @@ public: void clearProbeStat() { mProbeStat = 2; } void setCopyToPos(u8 param_0) { mCopyToPos = param_0; } u32 getDataVersion() { return mDataVersion; } + void setDataVersion(u32 version) { mDataVersion = version; } + void getCardStatus(s32 fileNo, CARDStat* stat) { CARDGetStatus(mChannel, fileNo, stat); } + void setCardStatus(s32 fileNo, CARDStat* stat) { CARDSetStatus(mChannel, fileNo, stat); } + void setSerialNo() { + u64 serial_no; + CARDGetSerialNo(mChannel, &serial_no); + mSerialNo = serial_no; + } /* 0x0000 */ u8 mData[0x1FBC]; /* 0x1FBC */ u8 mChannel; @@ -111,8 +120,24 @@ inline u32 mDoMemCd_LoadSync(void* buffer, u32 size, u32 index) { return g_mDoMemCd_control.LoadSync(buffer, size, index); } -inline s32 mDoMemCd_getDataVersion() { +inline u32 mDoMemCd_getDataVersion() { return g_mDoMemCd_control.getDataVersion(); } +inline void mDoMemCd_setDataVersion(u32 version) { + g_mDoMemCd_control.setDataVersion(version); +} + +inline void mDoMemCd_setSerialNo() { + g_mDoMemCd_control.setSerialNo(); +} + +inline void mDoMemCd_getCardStatus(s32 fileNo, CARDStat* stat) { + g_mDoMemCd_control.getCardStatus(fileNo, stat); +} + +inline void mDoMemCd_setCardStatus(s32 fileNo, CARDStat* stat) { + g_mDoMemCd_control.setCardStatus(fileNo, stat); +} + #endif /* M_DO_M_DO_MEMCARD_H */ diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 5b10aa786f..5197702f5f 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -43,7 +43,7 @@ private: class mDoExt_transAnmBas : public J3DAnmTransformKey { public: mDoExt_transAnmBas(void* bas) { mBas = bas; } - virtual ~mDoExt_transAnmBas(); + virtual ~mDoExt_transAnmBas() {} void* getBas() { return mBas; } @@ -224,10 +224,10 @@ private: class mDoExt_invJntPacket : public J3DPacket { public: - /* 8000E654 */ mDoExt_invJntPacket(); + /* 8000E654 */ mDoExt_invJntPacket() {} /* 80012220 */ virtual void draw(); - /* 8000E5F8 */ virtual ~mDoExt_invJntPacket(); + /* 8000E5F8 */ virtual ~mDoExt_invJntPacket() {} void setJoint(J3DModel* i_model, u16 param_1, u8 param_2) { field_0x10 = i_model; @@ -450,7 +450,7 @@ struct mDoExt_MtxCalcAnmBlendTbl /* 800D00BC */ J3DAnmTransform* getAnm(int); - /* 80014F3C */ virtual ~mDoExt_MtxCalcAnmBlendTbl(); + /* 80014F3C */ virtual ~mDoExt_MtxCalcAnmBlendTbl() {} /* 8000F26C */ virtual void calc(); /* 0x4 */ int mNum; @@ -465,7 +465,7 @@ struct mDoExt_MtxCalcAnmBlendTblOld : public mDoExt_MtxCalcAnmBlendTbl { : mDoExt_MtxCalcAnmBlendTbl(num, anmRatio) { mOldFrame = oldFrame; } - /* 80014EB0 */ virtual ~mDoExt_MtxCalcAnmBlendTblOld(); + /* 80014EB0 */ virtual ~mDoExt_MtxCalcAnmBlendTblOld() {} /* 8000F4B0 */ virtual void calc(); /* 0xC */ mDoExt_MtxCalcOldFrame* mOldFrame; diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h index 221be23319..cbfee44297 100644 --- a/include/m_Do/m_Do_graphic.h +++ b/include/m_Do/m_Do_graphic.h @@ -8,8 +8,6 @@ class JUTFader; int mDoGph_Create(); -extern u8 mBlureFlag__13mDoGph_gInf_c; // Blure -extern u8 mFade__13mDoGph_gInf_c; // Fade extern bool data_80450BE7; // AutoForcus struct ResTIMG; @@ -17,7 +15,7 @@ class mDoGph_gInf_c { public: class bloom_c { public: - // bloom_c() { m_buffer = NULL; } matches sinit + bloom_c() { m_buffer = NULL; } /* 80009544 */ void create(); /* 800095F8 */ void remove(); /* 80009650 */ void draw(); |
