summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2025-04-12 00:54:08 +0300
committerGitHub <noreply@github.com>2025-04-11 14:54:08 -0700
commitcc3e0856bfc1d7597c47c84fb428da5f8e0a5536 (patch)
tree4dadb3c5af2b853451ab4d879aeaef75e1c11502 /include
parent0b50e106ccc4fb32b52ee6d9487bc9b3d5fc16aa (diff)
Misc Matches using debug (#2388)
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J2DGraph/J2DPane.h2
-rw-r--r--include/JSystem/JGadget/binary.h3
-rw-r--r--include/JSystem/JGadget/pointer.h3
-rw-r--r--include/JSystem/JMath/JMath.h2
-rw-r--r--include/JSystem/JMath/random.h15
-rw-r--r--include/JSystem/JUtility/JUTAssert.h4
-rw-r--r--include/Z2AudioLib/Z2SceneMgr.h4
-rw-r--r--include/Z2AudioLib/Z2SpeechMgr2.h2
-rw-r--r--include/d/d_demo.h2
-rw-r--r--include/d/d_event.h1
-rw-r--r--include/d/d_meter_HIO.h10
-rw-r--r--include/m_Do/m_Do_graphic.h3
12 files changed, 37 insertions, 14 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h
index 1278e455a9..97a9e1235a 100644
--- a/include/JSystem/J2DGraph/J2DPane.h
+++ b/include/JSystem/J2DGraph/J2DPane.h
@@ -144,7 +144,7 @@ public:
MtxP getGlbMtx() { return mGlobalMtx; }
- JGeometry::TBox2<f32>& getGlbBounds() { return mGlobalBounds; }
+ const JGeometry::TBox2<f32>& getGlbBounds() const { return mGlobalBounds; }
void setMtx(Mtx m) { MTXCopy(m, mPositionMtx); }
diff --git a/include/JSystem/JGadget/binary.h b/include/JSystem/JGadget/binary.h
index 3f4485803b..71be3ed553 100644
--- a/include/JSystem/JGadget/binary.h
+++ b/include/JSystem/JGadget/binary.h
@@ -93,7 +93,7 @@ struct TValueIterator {
const void* get() const { return mBegin; }
typename Parser::ParseType operator*() const {
- return *(typename Parser::ParseType*)get();
+ return Parser::parse(get());
}
TValueIterator& operator++() {
@@ -127,7 +127,6 @@ struct TParseValue_misaligned : TParseValue_raw_<T> {
template<typename T>
struct TValueIterator_misaligned : public TValueIterator<TParseValue_misaligned<T>, sizeof(T)> {
- TValueIterator_misaligned(const TValueIterator_misaligned<T>& other) : TValueIterator<TParseValue_misaligned<T>, sizeof(T)>(other) {}
TValueIterator_misaligned(const void* begin) : TValueIterator<TParseValue_misaligned<T>, sizeof(T)>(begin) {}
};
diff --git a/include/JSystem/JGadget/pointer.h b/include/JSystem/JGadget/pointer.h
index 183684237f..ac38df93f9 100644
--- a/include/JSystem/JGadget/pointer.h
+++ b/include/JSystem/JGadget/pointer.h
@@ -7,6 +7,7 @@ template<class T>
class TPointer {
public:
TPointer(T* ptr) : mPtr(ptr) {}
+ ~TPointer() {}
void set(T* ptr) { mPtr = ptr; }
T* mPtr;
};
@@ -22,4 +23,4 @@ public:
}
-#endif \ No newline at end of file
+#endif
diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h
index 50ad426d36..68cfab2315 100644
--- a/include/JSystem/JMath/JMath.h
+++ b/include/JSystem/JMath/JMath.h
@@ -12,7 +12,7 @@ void JMAVECScaleAdd(register const Vec* vec1, register const Vec* vec2, register
register f32 scale);
inline int JMAAbs(int value) {
- return value > 0 ? value : -value;
+ return __abs(value);
}
inline f32 JMAFastReciprocal(f32 value) {
diff --git a/include/JSystem/JMath/random.h b/include/JSystem/JMath/random.h
index 4b4babb2f7..cfb8ecc1aa 100644
--- a/include/JSystem/JMath/random.h
+++ b/include/JSystem/JMath/random.h
@@ -20,10 +20,6 @@ struct TRandom_fast_ {
u32 get_bit32(void) { return this->get(); }
- u8 get_uint8(u8 param_0) {
- return get_ufloat_1() * param_0;
- }
-
// due to the float constant, having this function inlined adds that float to data,
// making it not match
float get_ufloat_1(void) {
@@ -39,6 +35,17 @@ struct TRandom_fast_ {
void setSeed(u32 seed) { value = seed; }
};
+
+template <class RandomT>
+class TRandom_ : public RandomT {
+public:
+ TRandom_(u32 value) : RandomT(value) {}
+
+ u8 get_uint8(u8 param_0) {
+ return get_ufloat_1() * param_0;
+ }
+};
+
} // namespace JMath
#endif /* RANDOM_H */
diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h
index fa8dc58074..95767093ed 100644
--- a/include/JSystem/JUtility/JUTAssert.h
+++ b/include/JSystem/JUtility/JUTAssert.h
@@ -17,6 +17,9 @@
#define JUT_WARN(LINE, ...) \
JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__); \
+#define JUT_WARN_1(LINE, ...) \
+ JUTAssertion::setWarningMessage_f(1, __FILE__, LINE, __VA_ARGS__); \
+
#define JUT_LOG(LINE, ...) \
JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__)
@@ -28,6 +31,7 @@
#define JUT_ASSERT_MSG(...) (void)0;
#define JUT_PANIC(...)
#define JUT_WARN(...)
+#define JUT_WARN_1(...)
#define JUT_LOG(...)
#define JUT_CONFIRM(...)
#endif
diff --git a/include/Z2AudioLib/Z2SceneMgr.h b/include/Z2AudioLib/Z2SceneMgr.h
index da2db509b0..2db1c7edfe 100644
--- a/include/Z2AudioLib/Z2SceneMgr.h
+++ b/include/Z2AudioLib/Z2SceneMgr.h
@@ -30,13 +30,13 @@ public:
bool loadSeWave(u32);
bool loadBgmWave(u32);
- bool isSceneExist() const { return sceneExist; }
+ bool isSceneExist() { return sceneExist; }
int getCurrentSceneNum() const { return sceneNum; }
s8 getCurrentRoomNum() { return roomNum; }
bool isInGame() const { return inGame; }
void setInGame(bool i_inGame) { inGame = i_inGame; }
bool isInDarkness() const { return inDarkness; }
- s8 getRoomReverb() const { return dComIfGp_getReverb(roomNum); }
+ s8 getRoomReverb() { return dComIfGp_getReverb(roomNum); }
bool isMovieDemo() { return sceneNum == 2 || sceneNum == 8 || sceneNum == 9; }
s32 getSeLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 0); }
s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); }
diff --git a/include/Z2AudioLib/Z2SpeechMgr2.h b/include/Z2AudioLib/Z2SpeechMgr2.h
index cf5cf9514f..ee0e3a5e19 100644
--- a/include/Z2AudioLib/Z2SpeechMgr2.h
+++ b/include/Z2AudioLib/Z2SpeechMgr2.h
@@ -33,7 +33,7 @@ struct Z2SpeechMgr2 : public JASGlobalInstance<Z2SpeechMgr2> {
/* 0x000 */ JAISoundHandle field_0x0;
/* 0x004 */ JAISoundHandle field_0x4;
- /* 0x008 */ JMath::TRandom_fast_ random;
+ /* 0x008 */ JMath::TRandom_<JMath::TRandom_fast_> random;
/* 0x00C */ Z2SpeechStarter mSpeech;
/* 0x010 */ u16 mText[500];
/* 0x3F8 */ s16 mTextNum;
diff --git a/include/d/d_demo.h b/include/d/d_demo.h
index 47be9c8d55..d8d88941cc 100644
--- a/include/d/d_demo.h
+++ b/include/d/d_demo.h
@@ -121,7 +121,7 @@ public:
}
void setModel(J3DModel* p_model) { mModel = p_model; }
- u8 checkEnable(u16 flag) { return mFlags & flag; }
+ BOOL checkEnable(u16 flag) { return mFlags & flag; }
void onEnable(u16 flag) { mFlags |= flag; }
cXyz& getTrans() { return mTrans; }
cXyz& getScale() { return mScale; }
diff --git a/include/d/d_event.h b/include/d/d_event.h
index 6f8e892a30..d47e8da71c 100644
--- a/include/d/d_event.h
+++ b/include/d/d_event.h
@@ -132,6 +132,7 @@ public:
u8 getGtItm() { return mGtItm; }
void startCheckSkipEdge(void* param_0) { setSkipProc(param_0, dEv_noFinishSkipProc, 0); }
bool checkSkipEdge() { return chkFlag2(8) != false; }
+ void setDebugStb(u8 stb) { mDebugStb = stb; }
public:
/* 0x000 */ u8 field_0x0[4];
diff --git a/include/d/d_meter_HIO.h b/include/d/d_meter_HIO.h
index 9c7d6d6aa5..b928ec7afe 100644
--- a/include/d/d_meter_HIO.h
+++ b/include/d/d_meter_HIO.h
@@ -552,13 +552,21 @@ public:
/* 0xA8 */ u8 mAnimDebug;
}; // Size: 0xAC
-class dMeter_drawHIO_c {
+class dMeter_drawHIO_c : public JORReflexible {
public:
/* 801FF5B8 */ dMeter_drawHIO_c();
/* 80201128 */ virtual ~dMeter_drawHIO_c() {}
+ #ifdef DEBUG
+ virtual void listenPropertyEvent(const JORPropertyEvent*);
+ virtual void genMessage(JORMContext*);
+ #endif
+
/* 0x000 */ // vtable
/* 0x004 */ s8 field_0x4;
+ #ifdef DEBUG
+ int field_0x8_debug;
+ #endif
/* 0x008 */ f32 mLifeTopPosX;
/* 0x00C */ f32 mLifeTopPosY;
/* 0x010 */ f32 mNoMagicPosY;
diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h
index c58396868c..e146e6db81 100644
--- a/include/m_Do/m_Do_graphic.h
+++ b/include/m_Do/m_Do_graphic.h
@@ -106,6 +106,9 @@ public:
static void setWideZoomLightProjection(Mtx m) {}
static void setFrameRate(u16 i_rate) { JFWDisplay::getManager()->setFrameRate(i_rate); }
+ // NONMATCHING - Need to define all mDoGph_gInf_c shieldD members
+ static u8 isWide() { return false; }
+
static GXTexObj mFrameBufferTexObj;
static GXTexObj mZbufferTexObj;
static bloom_c m_bloom;