mirror of https://github.com/zeldaret/botw.git
ksys/evt: Implement eventFlowAlloc/Free
This commit is contained in:
parent
357ef77879
commit
328354f857
|
|
@ -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.
|
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue