summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/J2DGraph/J2DPictureEx.h10
-rw-r--r--include/JSystem/J3DGraphBase/J3DMaterial.h2
-rw-r--r--include/JSystem/JFramework/JFWSystem.h6
-rw-r--r--include/JSystem/JGadget/define.h46
-rw-r--r--include/JSystem/JGeometry.h2
-rw-r--r--include/JSystem/JHostIO/JORReflexible.h4
-rw-r--r--include/JSystem/JMath/JMath.h7
-rw-r--r--include/JSystem/JStage/JSGActor.h10
-rw-r--r--include/JSystem/JStudio/JStudio/jstudio-object.h2
-rw-r--r--include/JSystem/JStudio/JStudio_JStage/control.h9
-rw-r--r--include/JSystem/JUtility/JUTConsole.h2
-rw-r--r--include/JSystem/JUtility/JUTGraphFifo.h2
12 files changed, 86 insertions, 16 deletions
diff --git a/include/JSystem/J2DGraph/J2DPictureEx.h b/include/JSystem/J2DGraph/J2DPictureEx.h
index f138657749..e8252bb4f5 100644
--- a/include/JSystem/J2DGraph/J2DPictureEx.h
+++ b/include/JSystem/J2DGraph/J2DPictureEx.h
@@ -33,8 +33,8 @@ public:
/* 803069D8 */ virtual void setCullBack(_GXCullMode);
/* 803069B8 */ virtual void setAlpha(u8);
/* 80303AB4 */ virtual void drawSelf(f32, f32, f32 (*)[3][4]);
- /* 80306A24 */ virtual void isUsed(ResTIMG const*);
- /* 803071A4 */ virtual void isUsed(ResFONT const*);
+ /* 80306A24 */ virtual bool isUsed(ResTIMG const*);
+ /* 803071A4 */ virtual bool isUsed(ResFONT const*);
/* 80306A0C */ virtual void rewriteAlpha();
/* 803071C4 */ virtual void setAnimation(J2DAnmBase*);
/* 80256064 */ virtual void setAnimation(J2DAnmTransform* transform) { J2DPane::setAnimation(transform); }
@@ -44,7 +44,7 @@ public:
/* 80306B48 */ virtual void setAnimation(J2DAnmTevRegKey*);
/* 80306B74 */ virtual void setAnimation(J2DAnmVisibilityFull*);
/* 80306B7C */ virtual void setAnimation(J2DAnmVtxColor*);
- /* 80306C70 */ virtual void animationPane(J2DAnmTransform const*);
+ /* 80306C70 */ virtual const J2DAnmTransform* animationPane(J2DAnmTransform const*);
/* 80303640 */ virtual void initiate(ResTIMG const*, ResTLUT const*);
/* 803039CC */ virtual bool prepareTexture(u8);
/* 80306ED4 */ virtual bool append(ResTIMG const*, f32);
@@ -84,8 +84,8 @@ public:
/* 80306370 */ virtual bool setBlack(JUtility::TColor);
/* 803063F8 */ virtual bool setWhite(JUtility::TColor);
/* 80306480 */ virtual bool setBlackWhite(JUtility::TColor, JUtility::TColor);
- /* 803068F8 */ virtual void getBlack() const;
- /* 80306958 */ virtual void getWhite() const;
+ /* 803068F8 */ virtual JUtility::TColor getBlack() const;
+ /* 80306958 */ virtual JUtility::TColor getWhite() const;
/* 80256034 */ virtual J2DMaterial* getMaterial() const { return mMaterial; }
/* 80303B80 */ virtual void drawFullSet(f32, f32, f32, f32, f32 (*)[3][4]);
/* 80303BDC */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16,
diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h
index e6b668d27f..902a24ba55 100644
--- a/include/JSystem/J3DGraphBase/J3DMaterial.h
+++ b/include/JSystem/J3DGraphBase/J3DMaterial.h
@@ -52,7 +52,7 @@ public:
J3DTevBlock* getTevBlock() const { return mTevBlock; }
J3DColorBlock* getColorBlock() const { return mColorBlock; }
J3DTexGenBlock* getTexGenBlock() const { return mTexGenBlock; }
- J3DDisplayListObj* getSharedDisplayListObj() const { return mSharedDLObj; }
+ J3DDisplayListObj* getSharedDisplayListObj() { return mSharedDLObj; }
J3DIndBlock* getIndBlock() const { return mIndBlock; }
J3DShape* getShape() { return mShape; }
J3DJoint* getJoint() { return mJoint; }
diff --git a/include/JSystem/JFramework/JFWSystem.h b/include/JSystem/JFramework/JFWSystem.h
index 7a3fa71c66..fd8156e587 100644
--- a/include/JSystem/JFramework/JFWSystem.h
+++ b/include/JSystem/JFramework/JFWSystem.h
@@ -23,9 +23,9 @@ struct JFWSystem {
static u32 fifoBufSize;
static u32 aramAudioBufSize;
static u32 aramGraphBufSize;
- static u32 streamPriority;
- static u32 decompPriority;
- static u32 aPiecePriority;
+ static s32 streamPriority;
+ static s32 decompPriority;
+ static s32 aPiecePriority;
static ResFONT* systemFontRes;
static GXRenderModeObj* renderMode;
static u32 exConsoleBufferSize;
diff --git a/include/JSystem/JGadget/define.h b/include/JSystem/JGadget/define.h
new file mode 100644
index 0000000000..753bc9d5ab
--- /dev/null
+++ b/include/JSystem/JGadget/define.h
@@ -0,0 +1,46 @@
+#ifndef DEFINE_H
+#define DEFINE_H
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+
+class JGadget_outMessage {
+public:
+ typedef void (*MessageFunc)(const char*, int, const char*);
+
+ static void warning(const char*, int, const char*);
+
+ JGadget_outMessage(MessageFunc fn, const char* file, int line);
+ ~JGadget_outMessage();
+
+ JGadget_outMessage& operator<<(int param_1) { return *this << (s32)param_1; }
+ JGadget_outMessage& operator<<(u16);
+ JGadget_outMessage& operator<<(unsigned int);
+ JGadget_outMessage& operator<<(u8);
+ JGadget_outMessage& operator<<(const char* str);
+ JGadget_outMessage& operator<<(s8);
+ JGadget_outMessage& operator<<(s32);
+ JGadget_outMessage& operator<<(u32);
+ JGadget_outMessage& operator<<(const void*);
+
+private:
+ MessageFunc mMsgFunc;
+ char mBuffer[256];
+ char* mWrite_p;
+ char* mFile;
+ int mLine;
+};
+
+#define JGADGET_ASSERTWARN(cond) ((cond) || (false))
+
+#define JGADGET_EXITWARN(cond) \
+ if (!(cond)) { \
+ false; \
+ return false; \
+ }
+}
+#endif
+
+#endif
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index a34ec2b705..fca7ba42f5 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -341,7 +341,7 @@ struct TVec3<f32> : public Vec {
}
bool isZero() const {
- return squared() <= 32.0f * FLT_EPSILON;
+ return squared() <= TUtil<f32>::epsilon();
}
void cross(const TVec3<f32>& a, const TVec3<f32>& b) {
diff --git a/include/JSystem/JHostIO/JORReflexible.h b/include/JSystem/JHostIO/JORReflexible.h
index 3a066f70ad..0e82126cc7 100644
--- a/include/JSystem/JHostIO/JORReflexible.h
+++ b/include/JSystem/JHostIO/JORReflexible.h
@@ -35,11 +35,14 @@ struct JORServer;
class JOREventListener {
public:
+#ifdef DEBUG
virtual void listenPropertyEvent(const JORPropertyEvent*) = 0;
+#endif
};
class JORReflexible : public JOREventListener {
public:
+#ifdef DEBUG
JORReflexible();
static JORServer* getJORServer();
@@ -48,6 +51,7 @@ public:
virtual void genObjectInfo(const JORGenEvent*);
virtual void genMessage(JORMContext*) = 0;
virtual void listenNodeEvent(const JORNodeEvent*);
+#endif
};
#endif /* JORREFLEXIBLE_H */
diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h
index 8298d44481..321c22646a 100644
--- a/include/JSystem/JMath/JMath.h
+++ b/include/JSystem/JMath/JMath.h
@@ -212,16 +212,15 @@ namespace JMathInlineVEC {
#endif
}
- inline f32 C_VECSquareMag(const Vec* v) {
+ inline f32 C_VECSquareMag(register const Vec* v) {
register f32 x_y;
register f32 z;
register f32 res;
- register const f32* src = &v->x;
#ifdef __MWERKS__
asm {
- psq_l x_y, 0(src), 0, 0
+ psq_l x_y, 0(v), 0, 0
ps_mul x_y, x_y, x_y
- lfs z, 8(src)
+ lfs z, 8(v)
ps_madd res, z, z, x_y
ps_sum0 res, res, x_y, x_y
}
diff --git a/include/JSystem/JStage/JSGActor.h b/include/JSystem/JStage/JSGActor.h
index 4deeae1c66..ed3fc82930 100644
--- a/include/JSystem/JStage/JSGActor.h
+++ b/include/JSystem/JStage/JSGActor.h
@@ -10,6 +10,16 @@ namespace JStage {
*
*/
struct TActor : public TObject {
+ enum {
+ ID_NORMAL = -1,
+ ID_UNK_1 = 1,
+ ID_UNK_2 = 2,
+ ID_UNK_3 = 3,
+ ID_UNK_4 = 4,
+ ID_UNK_5 = 5,
+ ID_UNK_6 = 6,
+ };
+
/* 80280A48 */ virtual ~TActor() = 0;
/* 80280AA8 */ virtual s32 JSGFGetType() const;
/* 80280AB0 */ virtual void JSGGetTranslation(Vec*) const;
diff --git a/include/JSystem/JStudio/JStudio/jstudio-object.h b/include/JSystem/JStudio/JStudio/jstudio-object.h
index 182b2bbc43..a9b411a1f1 100644
--- a/include/JSystem/JStudio/JStudio/jstudio-object.h
+++ b/include/JSystem/JStudio/JStudio/jstudio-object.h
@@ -178,6 +178,8 @@ struct TAdaptor {
/* 80286648 */ static void adaptor_setVariableValue_FVR_INDEX_(JStudio::TAdaptor*, JStudio::TControl*,
u32, void const*, u32);
+ const char* adaptor_getID_string() const;
+
void adaptor_setObject_(const TObject* pObject) {
pObject_ = pObject;
}
diff --git a/include/JSystem/JStudio/JStudio_JStage/control.h b/include/JSystem/JStudio/JStudio_JStage/control.h
index 19d7f69ba5..45052de6f7 100644
--- a/include/JSystem/JStudio/JStudio_JStage/control.h
+++ b/include/JSystem/JStudio/JStudio_JStage/control.h
@@ -157,7 +157,10 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T
JStage::TActor* get_pJSG_() { return (JStage::TActor*) pJSGObject_; }
+ // TODO: Why doesn't this line compile with MWCC version Wii/1.0?
+#if __MWERKS__ && __MWERKS__ < 0x4200
static TVVOutputObject saoVVOutput_[2];
+#endif
static TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[3];
/* 0x130 */ u32 field_0x130;
@@ -220,7 +223,10 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera, public TAdaptor_object
JStage::TCamera* get_pJSG_() { return (JStage::TCamera*)pJSGObject_; }
+ // TODO: Why doesn't this line compile with MWCC version Wii/1.0?
+#if __MWERKS__ && __MWERKS__ < 0x4200
static TVVOutput saoVVOutput_[5];
+#endif
/* 0x108 */ int field_0x108;
/* 0x10C */ JStage::TObject* field_0x10c;
@@ -248,7 +254,10 @@ struct TAdaptor_fog : public JStudio::TAdaptor_fog, public TAdaptor_object_ {
JStage::TFog* get_pJSG_() { return (JStage::TFog*)pJSGObject_; }
+ // TODO: Why doesn't this line compile with MWCC version Wii/1.0?
+#if __MWERKS__ && __MWERKS__ < 0x4200
static TVariableValueOutput_object_<TAdaptor_fog, JStage::TFog> saoVVOutput_[3];
+#endif
};
struct TAdaptor_light : public JStudio::TAdaptor_light, public TAdaptor_object_ {
diff --git a/include/JSystem/JUtility/JUTConsole.h b/include/JSystem/JUtility/JUTConsole.h
index 233469b652..a1c0cf11d7 100644
--- a/include/JSystem/JUtility/JUTConsole.h
+++ b/include/JSystem/JUtility/JUTConsole.h
@@ -50,7 +50,7 @@ public:
mFontSizeX = x;
mFontSizeY = y;
}
- void setHeight(u32 height) {
+ void setHeight(unsigned int height) {
mHeight = height;
if (mHeight > mMaxLines) {
mHeight = mMaxLines;
diff --git a/include/JSystem/JUtility/JUTGraphFifo.h b/include/JSystem/JUtility/JUTGraphFifo.h
index 1c53ecef78..3672001890 100644
--- a/include/JSystem/JUtility/JUTGraphFifo.h
+++ b/include/JSystem/JUtility/JUTGraphFifo.h
@@ -35,6 +35,6 @@ private:
/* 0x10 */ u8 field_0x10[0xC];
};
-inline void JUTCreateFifo(u32 bufSize) { new JUTGraphFifo(bufSize); }
+inline JUTGraphFifo* JUTCreateFifo(u32 bufSize) { return new JUTGraphFifo(bufSize); }
#endif /* JUTGRAPHFIFO_H */