bool NetworkInitialize() { gs_NetworkAllocator = AllocatorCreateHeap(AllocatorGetHeap()); AllocatorSetGroup(gs_NetworkAllocator, "Network"); ENetCallbacks callbacks; callbacks.malloc = enet_custom_malloc; callbacks.free = enet_custom_free; int ret = enet_initialize_with_callbacks(ENET_VERSION, &callbacks); if(ret != 0) { LogError("Error initializing ENet"); return false; } LogInfo("Initialized ENet %d.%d.%d networking layer", ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH); return true; }
void InputInitialize() { gs_InputAllocator = AllocatorCreateHeap( AllocatorGetHeap() ); AllocatorSetGroup(gs_InputAllocator, "Input"); }
void ResourcesInitialize() { gs_ResourcesAllocator = AllocatorCreateHeap( AllocatorGetHeap() ); AllocatorSetGroup(gs_ResourcesAllocator, "Resources"); }