appstate flag for fps drawing

This commit is contained in:
huaqo-games
2025-04-10 12:39:52 +02:00
parent 5af3161430
commit 06369907ef
5 changed files with 36 additions and 28 deletions
+4 -3
View File
@@ -34,6 +34,7 @@ int main(void)
app.state.currentScreen = LOGO;
app.state.running = true;
app.state.gameStarted = false;
app.state.flagFPS = true;
app.display = display;
app.font = LoadFont("assets/SproutLandsUI/fonts/pixelFont-7-8x14-sproutLands.fnt");
@@ -51,17 +52,17 @@ int main(void)
case LOGO:
{
UpdateLogo(&app.logo, &app.state);
RenderLogo(&app.logo);
RenderLogo(&app.logo, &app.state);
}break;
case MENU:
{
UpdateMenu(&app.menu, &app.state);
RenderMenu(&app.menu, &app.font, app.display.name);
RenderMenu(&app.menu, &app.state, &app.font, app.display.name);
}break;
case GAMEPLAY:
{
UpdateGame(&app.game, &app.state);
RenderGame(&app.game);
RenderGame(&app.game, &app.state);
}break;
default: break;
}