diff options
Diffstat (limited to 'src/JSystem')
| -rw-r--r-- | src/JSystem/J2DGraph/J2DPane.cpp | 8 | ||||
| -rw-r--r-- | src/JSystem/JKernel/JKRExpHeap.cpp | 17 | ||||
| -rw-r--r-- | src/JSystem/JKernel/JKRStdHeap.cpp | 6 |
3 files changed, 17 insertions, 14 deletions
diff --git a/src/JSystem/J2DGraph/J2DPane.cpp b/src/JSystem/J2DGraph/J2DPane.cpp index b8417d52..8403d6ef 100644 --- a/src/JSystem/J2DGraph/J2DPane.cpp +++ b/src/JSystem/J2DGraph/J2DPane.cpp @@ -53,7 +53,7 @@ void J2DPane::initiate() { mRotation = 0.0f; mCullMode = GX_CULL_NONE; mAlpha = 0xFF; - mInheritAlpha = TRUE; + mInfluencedAlpha = true; mDrawAlpha = 0xFF; mIsConnectParent = 0; calcMtx(); @@ -106,9 +106,9 @@ void J2DPane::makePaneStream(J2DPane* pParentPane, JSURandomInputStream* pStream size--; } - mInheritAlpha = TRUE; + mInfluencedAlpha = true; if (size != 0) { - mInheritAlpha = pStream->readU8() != 0; + mInfluencedAlpha = pStream->readU8() != 0; size--; } @@ -175,7 +175,7 @@ void J2DPane::draw(f32 x, f32 y, const J2DGrafContext* pCtx, bool clip) { } mDrawAlpha = mAlpha; - if (mInheritAlpha) + if (mInfluencedAlpha) mDrawAlpha = (mAlpha * pParentPane->mDrawAlpha) / 0xFF; } else { mGlobalBounds.addPos(x, y); diff --git a/src/JSystem/JKernel/JKRExpHeap.cpp b/src/JSystem/JKernel/JKRExpHeap.cpp index a47d561a..89a53732 100644 --- a/src/JSystem/JKernel/JKRExpHeap.cpp +++ b/src/JSystem/JKernel/JKRExpHeap.cpp @@ -358,7 +358,7 @@ void JKRExpHeap::do_freeAll() { JKRHeap::callAllDisposer(); mHeadFreeList = (CMemBlock*)getStartAddr(); mTailFreeList = mHeadFreeList; - mHeadFreeList->initiate(NULL, NULL, getSize() - 0x10, 0, 0); + mHeadFreeList->initiate(NULL, NULL, getHeapSize() - 0x10, 0, 0); mHeadUsedList = NULL; mTailUsedList = NULL; unlock(); @@ -1009,12 +1009,13 @@ static void dummy2() { void JKRExpHeap::state_register(TState* p, u32 param_1) const { JUT_ASSERT(VERSION_SELECT(2271, 2420, 2423, 2423), p != NULL); JUT_ASSERT(VERSION_SELECT(2272, 2421, 2424, 2424), p->getHeap() == this); - p->mId = param_1; + + getState_(p); + setState_u32ID_(p, param_1); if (param_1 <= 0xff) { - p->mUsedSize = getUsedSize(param_1); + setState_uUsedSize_(p, getUsedSize(param_1)); } else { - s32 freeSize = const_cast<JKRExpHeap*>(this)->getTotalFreeSize(); - p->mUsedSize = getSize() - freeSize; + setState_uUsedSize_(p, getUsedSize_(const_cast<JKRExpHeap*>(this))); } u32 checkCode = 0; @@ -1028,18 +1029,18 @@ void JKRExpHeap::state_register(TState* p, u32 param_1) const { checkCode += (u32)block * 3; } } - p->mCheckCode = checkCode; + setState_u32CheckCode_(p, checkCode); } /* 802B31D4-802B327C .text state_compare__10JKRExpHeapCFRCQ27JKRHeap6TStateRCQ27JKRHeap6TState */ bool JKRExpHeap::state_compare(const JKRHeap::TState& r1, const JKRHeap::TState& r2) const { JUT_ASSERT(VERSION_SELECT(2319, 2468, 2471, 2471), r1.getHeap() == r2.getHeap()); bool result = true; - if (r1.mCheckCode != r2.mCheckCode) { + if (r1.getCheckCode() != r2.getCheckCode()) { result = false; } - if (r1.mUsedSize != r2.mUsedSize) { + if (r1.getUsedSize() != r2.getUsedSize()) { result = false; } diff --git a/src/JSystem/JKernel/JKRStdHeap.cpp b/src/JSystem/JKernel/JKRStdHeap.cpp index 03ea37bb..91ee6233 100644 --- a/src/JSystem/JKernel/JKRStdHeap.cpp +++ b/src/JSystem/JKernel/JKRStdHeap.cpp @@ -125,6 +125,8 @@ void* JKRStdHeap::do_getMaxFreeBlock() { void JKRStdHeap::state_register(JKRHeap::TState* p, u32 id) const { JUT_ASSERT(370, p != NULL); JUT_ASSERT(371, p->getHeap() == this); + + getState_(p); setState_u32ID_(p, id); setState_uUsedSize_(p, 0); setState_u32CheckCode_(p, 0); @@ -134,11 +136,11 @@ void JKRStdHeap::state_register(JKRHeap::TState* p, u32 id) const { bool JKRStdHeap::state_compare(const JKRHeap::TState& r1, const JKRHeap::TState& r2) const { JUT_ASSERT(394, r1.getHeap() == r2.getHeap()); bool result = true; - if (r1.mCheckCode != r2.mCheckCode) { + if (r1.getCheckCode() != r2.getCheckCode()) { result = false; } - if (r1.mUsedSize != r2.mUsedSize) { + if (r1.getUsedSize() != r2.getUsedSize()) { result = false; } |
