Reduced some number crunching in the generator

This commit is contained in:
2023-07-31 02:05:21 +10:00
parent b3179d96f2
commit 577aa47fbd
5 changed files with 50 additions and 35 deletions

View File

@@ -2,6 +2,13 @@
#include "drive_system.h"
#include "toy_memory.h"
//modified allocator
void* speedyMemoryAllocator(void* pointer, size_t oldSize, size_t newSize) {
return realloc(pointer, newSize);
}
int main(int argc, char* argv[]) {
//debugging tools
#ifdef _DEBUG
@@ -9,6 +16,9 @@ int main(int argc, char* argv[]) {
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif//win32 && debug
//set the memory allocator
Toy_setMemoryAllocator(speedyMemoryAllocator);
//the drive system maps filepaths to "drives", which specifies which folders can be accessed by the scripts
Toy_initDriveSystem();