diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-09-17 10:05:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-17 10:05:55 -0400 |
| commit | f38b962a5844502889ec00a98d0c9ed2a1151695 (patch) | |
| tree | 26f19c014075891d18af15af95b2764feb63beaf /src/JSystem/JKernel | |
| parent | 78f95573067988ad5812c040d8a6a77a78eb0dea (diff) | |
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
Diffstat (limited to 'src/JSystem/JKernel')
| -rw-r--r-- | src/JSystem/JKernel/JKRExpHeap.cpp | 17 | ||||
| -rw-r--r-- | src/JSystem/JKernel/JKRStdHeap.cpp | 6 |
2 files changed, 13 insertions, 10 deletions
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; } |
