summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2026-06-23 03:29:49 +0100
committerGitHub <noreply@github.com>2026-06-22 19:29:49 -0700
commit8eae8919c8f53c4c5015ef9b664c6cd2f7c31f8b (patch)
tree357701f6f546e596eed918ca3ef6e7bf2aceab1e /include
parentdb28ce3942423be923838aa6cf72d252f55370e1 (diff)
m_Do_main mostly matching for Wii versions (#3165)
* m_Do_main mostly matching for Wii versions * Use machine-specific PCH for all m_Do TUs
Diffstat (limited to 'include')
-rw-r--r--include/m_Do/m_Do_ext.h1
-rw-r--r--include/m_Do/m_Do_hostIO.h32
-rw-r--r--include/m_Do/m_Do_main.h36
-rw-r--r--include/m_Do/machine.h10
-rw-r--r--include/m_Do/machine.pch15
5 files changed, 63 insertions, 31 deletions
diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h
index 13576c7134..778b73ba87 100644
--- a/include/m_Do/m_Do_ext.h
+++ b/include/m_Do/m_Do_ext.h
@@ -6,7 +6,6 @@
#include "JSystem/J3DGraphAnimator/J3DModel.h"
#include "Z2AudioLib/Z2SoundObject.h"
#include "d/d_kankyo_tev_str.h"
-#include "m_Do/m_Do_audio.h"
#include "m_Do/m_Do_mtx.h"
class JKRArchive;
diff --git a/include/m_Do/m_Do_hostIO.h b/include/m_Do/m_Do_hostIO.h
index fa4eb8b1af..98af766929 100644
--- a/include/m_Do/m_Do_hostIO.h
+++ b/include/m_Do/m_Do_hostIO.h
@@ -23,22 +23,6 @@ public:
/* 0x1C */ JORReflexible* mPt;
};
-class mDoHIO_entry_c : public JORReflexible {
-public:
-#if DEBUG
- mDoHIO_entry_c();
- void entryHIO(const char* i_name);
- void removeHIO();
-
- virtual ~mDoHIO_entry_c();
-
- /* 0x4 */ s8 mNo;
- /* 0x5 */ u8 mCount;
-#else
- virtual ~mDoHIO_entry_c() {}
-#endif
-};
-
class mDoHIO_subRoot_c : public JORReflexible {
public:
mDoHIO_subRoot_c() {}
@@ -68,6 +52,22 @@ public:
/* 0x4 */ mDoHIO_subRoot_c mSub;
};
+class mDoHIO_entry_c : public JORReflexible {
+public:
+#if DEBUG
+ mDoHIO_entry_c();
+ void entryHIO(const char* i_name);
+ void removeHIO();
+
+ virtual ~mDoHIO_entry_c();
+
+ /* 0x4 */ s8 mNo;
+ /* 0x5 */ u8 mCount;
+#else
+ virtual ~mDoHIO_entry_c() {}
+#endif
+};
+
extern mDoHIO_root_c mDoHIO_root;
void mDoHIO_updateChild(s8 i_no);
diff --git a/include/m_Do/m_Do_main.h b/include/m_Do/m_Do_main.h
index 9bedc21a39..12428e30d6 100644
--- a/include/m_Do/m_Do_main.h
+++ b/include/m_Do/m_Do_main.h
@@ -8,7 +8,6 @@ class JKRExpHeap;
extern OSThread mainThread;
-void version_check();
s32 LOAD_COPYDATE(void*);
extern OSThread mainThread;
@@ -16,44 +15,53 @@ const int HeapCheckTableNum = 8;
class HeapCheck {
public:
- HeapCheck(JKRExpHeap* heap, const char* name, const char* jName) {
- mName = name;
- mJName = jName;
- setHeap(heap);
- }
+#if VERSION != VERSION_WII_USA_R0
+ HeapCheck(JKRExpHeap* heap, const char* name, const char* jName);
+#endif
void CheckHeap1(void);
s32 getUsedCount(void) const;
+#if VERSION == VERSION_WII_USA_R0
+ void heapDisplay(void);
+#else
void heapDisplay(void) const;
+#endif
u32& getUsedCountRef() { return mUsedCount; }
u32& getTotalUsedSizeRef() { return mTotalUsedSize; }
JKRExpHeap* getHeap() { return mHeap; }
+#if VERSION != VERSION_WII_USA_R0
void setHeapSize(u32 i_size) { mTargetHeapSize = i_size; }
+#endif
s32 getMaxTotalUsedSize() const { return mMaxTotalUsedSize; }
s32 getMaxTotalFreeSize() { return mMaxTotalFreeSize; }
const char* getName() const { return mName; }
+#if VERSION != VERSION_WII_USA_R0
const char* getJName() const { return mJName; }
+#endif
void saveRelBase() {
mUsedCount = getUsedCount();
mTotalUsedSize = mHeap->getTotalUsedSize();
}
- void setHeap(JKRExpHeap* i_heap) {
- mHeap = i_heap;
- if (i_heap != NULL) {
- mTargetHeapSize = i_heap->getHeapSize();
- }
- }
+ void setHeap(JKRExpHeap* i_heap);
- u32 getTargetHeapSize() const { return mTargetHeapSize; }
+#if VERSION == VERSION_WII_USA_R0
+ u32 getTargetHeapSize();
+#else
+ u32 getTargetHeapSize() const {
+ return mTargetHeapSize;
+ }
+#endif
u32 getRelUsedCount() const { return getUsedCount() - mUsedCount; }
u32 getRelTotalUsedSize() const { return mHeap->getTotalUsedSize() - mTotalUsedSize; }
-private:
+public:
/* 0x00 */ const char* mName;
+#if VERSION != VERSION_WII_USA_R0
/* 0x04 */ const char* mJName;
+#endif
/* 0x08 */ JKRExpHeap* mHeap;
/* 0x0C */ s32 mMaxTotalUsedSize;
/* 0x10 */ s32 mMaxTotalFreeSize;
diff --git a/include/m_Do/machine.h b/include/m_Do/machine.h
new file mode 100644
index 0000000000..1bf270eee9
--- /dev/null
+++ b/include/m_Do/machine.h
@@ -0,0 +1,10 @@
+#ifndef M_DO_MACHINE_H
+#define M_DO_MACHINE_H
+
+#ifdef __MWERKS__
+#include "m_Do/machine.mch"
+#else
+#include "m_Do/machine.pch"
+#endif
+
+#endif // M_DO_MACHINE_H
diff --git a/include/m_Do/machine.pch b/include/m_Do/machine.pch
new file mode 100644
index 0000000000..d5629bf72e
--- /dev/null
+++ b/include/m_Do/machine.pch
@@ -0,0 +1,15 @@
+#ifndef DOLZEL_MINIMAL_PCH
+#define DOLZEL_MINIMAL_PCH
+
+#include "JSystem/JKernel/JKRDisposer.h" // IWYU pragma: keep
+#include "JSystem/JKernel/JKRHeap.h" // IWYU pragma: keep
+#include "JSystem/J2DGraph/J2DOrthograph.h" // IWYU pragma: keep
+#include "JSystem/J3DGraphBase/J3DPacket.h" // IWYU pragma: keep
+#include "JSystem/J3DGraphAnimator/J3DJoint.h" // IWYU pragma: keep
+#include "JSystem/JUtility/JUTFont.h" // IWYU pragma: keep
+#include "SSystem/SComponent/c_xyz.h" // IWYU pragma: keep
+#include "m_Do/m_Do_graphic.h" // IWYU pragma: keep
+#include "m_Do/m_Do_ext.h" // IWYU pragma: keep
+#include <limits> // IWYU pragma: keep
+
+#endif // DOLZEL_MINIMAL_PCH