ksys/evt: Implement eventFlowAlloc/Free

This commit is contained in:
Léo Lam 2021-06-17 23:51:57 +02:00
parent 357ef77879
commit 328354f857
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
2 changed files with 20 additions and 2 deletions

View File

@ -75787,8 +75787,8 @@
0x0000007100dc3368,EventResource::areCameraAndModelAndXlinkReady,108,
0x0000007100dc33d4,EventResource::processResourceLoad,292,
0x0000007100dc34f8,EventResource::load,416,
0x0000007100dc36a8,EventFlowAllocImpl,44,
0x0000007100dc36d4,EventFlowFreeImpl,32,
0x0000007100dc36a8,EventFlowAllocImpl,44,_ZN4ksys3evt14eventFlowAllocEmmPv
0x0000007100dc36d4,EventFlowFreeImpl,32,_ZN4ksys3evt13eventFlowFreeEPvS1_
0x0000007100dc36f4,sub_7100DC36F4,2764,
0x0000007100dc41c0,sub_7100DC41C0,92,
0x0000007100dc421c,EventResource::EventAddExtraModelRes_stuff,172,

Can't render this file because it is too large.

View File

@ -1 +1,19 @@
#include "KingSystem/Event/evtEventResource.h"
#include <heap/seadHeap.h>
namespace ksys::evt {
void* eventFlowAlloc(size_t size, size_t alignment, void* userdata) {
auto* heap = static_cast<sead::Heap*>(userdata);
if (!heap)
return nullptr;
return heap->tryAlloc(size, static_cast<int>(alignment));
}
void eventFlowFree(void* ptr, void* userdata) {
auto* heap = static_cast<sead::Heap*>(userdata);
if (heap)
heap->free(ptr);
}
} // namespace ksys::evt