refactor: game start variables to main loop

This commit is contained in:
huaqo-games
2025-10-15 20:34:05 +02:00
parent d11d387166
commit e13094e7b7
+4 -2
View File
@@ -26,8 +26,6 @@ typedef struct {
void ConfigApp(App* app){
InitConfig(&app->config, "config/config.ini");
app->state.currentView = GetConfigInt(&app->config, "startView");
app->state.running = true;
app->state.gameStarted = false;
app->flags.showFPS = GetConfigInt(&app->config, "showFPS");
app->window.title = GetConfigString(&app->config, "window_title");
app->window.width = GetConfigInt(&app->config, "window_width");
@@ -42,6 +40,10 @@ void InitApp(App *app){
}
void UpdateApp(App *app){
app->state.running = true;
app->state.gameStarted = false;
while (app->state.running)
{
switch (app->state.currentView)