summaryrefslogtreecommitdiff
path: root/src/KingSystem/GameData
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2026-10-15 22:56:22 +0100
committerLéo Lam <leo@leolam.fr>2026-10-15 22:56:22 +0100
commitdff75e03e837bd35a650871543dff0fc5851d322 (patch)
tree7ea177a067b25ae2c8ffe0024f80e873d59f92db /src/KingSystem/GameData
parent0e2f35c1614c3daff9ab27edeb03b10ee94e9954 (diff)
ksys/util: bind tryCreateDualHeap to the function body
The 8-byte function only masks the bool argument and branches to the body right after it, so the body is tryCreateDualHeap and the wrapper is createDualHeap (name from the IDB). GameData calls the wrapper, so it now calls createDualHeap. (AI assisted using Claude Opus 5.5)
Diffstat (limited to 'src/KingSystem/GameData')
-rw-r--r--src/KingSystem/GameData/gdtManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/KingSystem/GameData/gdtManager.cpp b/src/KingSystem/GameData/gdtManager.cpp
index ff628407..4d418f3d 100644
--- a/src/KingSystem/GameData/gdtManager.cpp
+++ b/src/KingSystem/GameData/gdtManager.cpp
@@ -622,8 +622,8 @@ FlagHandle Manager::getRevivalFlagHandle(const sead::SafeString& object_name,
void Manager::allocParam1() {
auto* parent_heap = OverlayArenaSystem::instance()->getGameDataWorkHeap();
- auto* heap = util::tryCreateDualHeap(0, "param1", parent_heap, nullptr,
- sead::Heap::cHeapDirection_Forward, false);
+ auto* heap = util::createDualHeap(0, "param1", parent_heap, nullptr,
+ sead::Heap::cHeapDirection_Forward, false);
mFlagBuffer1 = new (heap) TriggerParam;
mFlagBuffer1->copyAllFlags(*mFlagBuffer, heap, true);
heap->adjust();
@@ -649,8 +649,8 @@ void Manager::allocRetryBuffer(sead::Heap* heap) {
if (mRetryBuffer)
return;
- auto* buffer_heap = util::tryCreateDualHeap(0x100000, "RetryBuffer", heap, nullptr,
- sead::Heap::cHeapDirection_Reverse, false);
+ auto* buffer_heap = util::createDualHeap(0x100000, "RetryBuffer", heap, nullptr,
+ sead::Heap::cHeapDirection_Reverse, false);
mRetryBuffer = new (buffer_heap) TriggerParam;
mRetryBuffer->copyPermanentFlags(*mFlagBuffer1, buffer_heap);
buffer_heap->adjust();