mirror of
https://github.com/zeldaret/tp
synced 2026-07-08 14:36:36 -04:00
Debug version now builds OK and all_source compiles (#2343)
* Fix missing arg to JUT_ASSERT * Fix some MWCC version diff errors * Compile m_Do_ext, d_demo, actor_mng * Add VSCode task to quickly switch between versions * Unlink magLift for debug * Update the hash of the debug dol The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment. The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol. The DOL now builds OK. * Fix all debug REL dtor splits All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds. * Add genMessage declarations to all HIO subclasses * Fixing more compilation errors * m_Do_mtx 100% on debug Cannot be linked due to weak function name mangling? * Improve various matches * Fix all remaining compilation errors * Fix new compilation errors from main * Fix retail regression * Link f_pc_profile_lst
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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_ {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user