mirror of
https://github.com/zeldaret/botw
synced 2026-06-24 17:03:19 -04:00
20 lines
494 B
C++
20 lines
494 B
C++
#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
|