demo d_file_error OK, fmap/fmap2 work, misc (#1208)

* d_file_error OK, use J2DPane inlines everywhere

* d_menu_fmap demo work

* fmap and fmap2 work

* fix demo regression with ternary fakematch

* inline cleanup, f_pc_profile OK for demo

* fix min/max bss order

* lstair almost for demo
This commit is contained in:
LagoLunatic
2026-09-17 10:05:55 -04:00
committed by GitHub
parent 78f9557306
commit f38b962a58
33 changed files with 486 additions and 429 deletions
+3 -3
View File
@@ -100,9 +100,9 @@ public:
mRotation = angle;
calcMtx();
}
void setInfluencedAlpha(bool) {}
void setInfluencedAlpha(bool v) { mInfluencedAlpha = v; }
public:
protected:
/* 0x04 */ u32 mMagic;
/* 0x08 */ int mTag;
/* 0x0C */ JGeometry::TBox2<f32> mBounds;
@@ -118,7 +118,7 @@ public:
/* 0xAB */ u8 mCullMode;
/* 0xAC */ u8 mAlpha;
/* 0xAD */ u8 mDrawAlpha;
/* 0xAE */ u8 mInheritAlpha;
/* 0xAE */ bool mInfluencedAlpha;
/* 0xAF */ u8 mIsConnectParent;
/* 0xB0 */ JSUTree<J2DPane> mPaneTree;
};
+3 -1
View File
@@ -62,10 +62,12 @@ public:
s32 getUsedSize(u8 groupId) const;
s32 getTotalUsedSize(void) const;
CMemBlock* getHeadUsedList() const { return mHeadUsedList; }
CMemBlock* getUsedFirst() { return mHeadUsedList; }
void setAllocationMode(EAllocMode mode) {
mAllocMode = mode;
}
static s32 getUsedSize_(JKRExpHeap* heap) { return heap->mSize - heap->getTotalFreeSize(); }
static void* getState_(TState* state) { return getState_buf_(state); }
public:
/* vt[04] */ virtual u32 getHeapType(); /* override */
+7 -17
View File
@@ -83,18 +83,16 @@ public:
/* vt[23] */ virtual void state_dump(JKRHeap::TState const& p) const;
void setDebugFill(bool debugFill) { mDebugFill = debugFill; }
bool getDebugFill() const { return mDebugFill; }
void* getStartAddr() const { return (void*)mStart; }
void* getEndAddr() const { return (void*)mEnd; }
u32 getSize() const { return mSize; }
void* getStartAddr() { return (void*)mStart; }
void* getEndAddr() { return (void*)mEnd; }
bool getErrorFlag() const { return mErrorFlag; }
void callErrorHandler(JKRHeap* heap, u32 size, int alignment) {
void callErrorHandler(void* heap, u32 size, int alignment) {
if (mErrorHandler) {
(*mErrorHandler)(heap, size, alignment);
}
}
JKRHeap* getParent() const {
JKRHeap* getParent() {
JSUTree<JKRHeap>* parent = mChildTree.getParent();
return parent->getObject();
}
@@ -102,8 +100,8 @@ public:
JSUTree<JKRHeap>& getHeapTree() { return mChildTree; }
void appendDisposer(JKRDisposer* disposer) { mDisposerList.append(&disposer->mLink); }
void removeDisposer(JKRDisposer* disposer) { mDisposerList.remove(&disposer->mLink); }
void lock() { OSLockMutex(&mMutex); }
void unlock() { OSUnlockMutex(&mMutex); }
void lock() const { OSLockMutex(const_cast<OSMutex*>(&mMutex)); }
void unlock() const { OSUnlockMutex(const_cast<OSMutex*>(&mMutex)); }
u32 getHeapSize() { return mSize; }
protected:
@@ -137,6 +135,7 @@ public:
static JKRErrorHandler setErrorHandler(JKRErrorHandler errorHandler);
static bool isDefaultDebugFill() { return sDefaultFillFlag; }
static void setDefaultDebugFill(bool status) { sDefaultFillFlag = status; }
static void* getCodeStart(void) { return mCodeStart; }
static void* getCodeEnd(void) { return mCodeEnd; }
@@ -144,14 +143,9 @@ public:
static void* getUserRamEnd(void) { return mUserRamEnd; }
static u32 getMemorySize(void) { return mMemorySize; }
static JKRHeap* getRootHeap() { return sRootHeap; }
#if DEBUG
static JKRHeap* getRootHeap2() { return sRootHeap2; }
#endif
static JKRHeap* getSystemHeap() { return sSystemHeap; }
static JKRHeap* getCurrentHeap() { return sCurrentHeap; }
static void setSystemHeap(JKRHeap* heap) { sSystemHeap = heap; }
static void setCurrentHeap(JKRHeap* heap) { sCurrentHeap = heap; }
static void setState_u32ID_(TState* state, u32 id) { state->mId = id; }
static void setState_uUsedSize_(TState* state, u32 usedSize) { state->mUsedSize = usedSize; }
@@ -159,7 +153,6 @@ public:
state->mCheckCode = checkCode;
}
static void* getState_buf_(TState* state) { return &state->mBuf; }
static void* getState_(TState* state) { return getState_buf_(state); }
static void* mCodeStart;
static void* mCodeEnd;
@@ -168,9 +161,6 @@ public:
static u32 mMemorySize;
static JKRHeap* sRootHeap;
#if DEBUG
static JKRHeap* sRootHeap2;
#endif
static JKRHeap* sSystemHeap;
static JKRHeap* sCurrentHeap;
+2
View File
@@ -58,6 +58,8 @@ public:
s32 adjustSize(void);
static JKRSolidHeap* create(u32, JKRHeap*, bool);
static void* getState_(TState* state) { return getState_buf_(state); }
}; // Size: 0x80
inline JKRSolidHeap* JKRCreateSolidHeap(u32 size, JKRHeap* parent, bool errorFlag) { return JKRSolidHeap::create(size, parent, errorFlag); }
+2
View File
@@ -31,6 +31,8 @@ public:
s32 do_getSize(void* ptr) { return OSReferentSize(ptr); };
s32 do_getTotalFreeSize() { return getFreeSize(); };
static void* getState_(TState* state) { return getState_buf_(state); }
OSHeapHandle mHeapHandle;
};