diff options
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPane.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRExpHeap.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRHeap.h | 24 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRSolidHeap.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRStdHeap.h | 2 |
5 files changed, 17 insertions, 21 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index 646c7ce3..49dacd67 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -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; }; diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h index cdbc89f1..b1043ae3 100644 --- a/include/JSystem/JKernel/JKRExpHeap.h +++ b/include/JSystem/JKernel/JKRExpHeap.h @@ -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 */ diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index d0b9d283..9323fcbe 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -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; diff --git a/include/JSystem/JKernel/JKRSolidHeap.h b/include/JSystem/JKernel/JKRSolidHeap.h index 9c0b6c98..ba14ff58 100644 --- a/include/JSystem/JKernel/JKRSolidHeap.h +++ b/include/JSystem/JKernel/JKRSolidHeap.h @@ -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); } diff --git a/include/JSystem/JKernel/JKRStdHeap.h b/include/JSystem/JKernel/JKRStdHeap.h index 21a5eb08..55573696 100644 --- a/include/JSystem/JKernel/JKRStdHeap.h +++ b/include/JSystem/JKernel/JKRStdHeap.h @@ -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; }; |
