summaryrefslogtreecommitdiff
path: root/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app.cpp')
-rw-r--r--app.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/app.cpp b/app.cpp
index ff8d7ba..6628e0e 100644
--- a/app.cpp
+++ b/app.cpp
@@ -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