diff options
Diffstat (limited to 'app.cpp')
-rw-r--r-- | app.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -524,7 +524,22 @@ int WinMain( (void)show_cmd; g_instance = instance; SetProcessDPIAware(); - return entrypoint(); + char* mem = (char*)malloc(app_memory_size); + Arena* arena = (Arena*)mem; + App* a; + mem += sizeof * arena; + init_arena(arena, mem, app_memory_size - sizeof * arena); + a = entrypoint(arena); + a->arena = arena; + a->on_init(); + while (a->running) { + a->begin(); + a->on_update(); + a->end(); + } + a->on_destroy(); + a->destroy(); + return 0; } #endif |