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
This commit is contained in:
Max Roncace
2026-06-23 03:29:49 +01:00
committed by GitHub
parent db28ce3942
commit 8eae8919c8
35 changed files with 690 additions and 378 deletions
-1
View File
@@ -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;
+16 -16
View File
@@ -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);
+22 -14
View File
@@ -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;
+10
View File
@@ -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
+15
View File
@@ -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