From bc11af703e622dcc95ac337ad1a68db2d4cc16c0 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 15 Jun 2024 11:43:47 -0700 Subject: Move glad initialization to gfx-app. --- game/src/game.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'game/src') diff --git a/game/src/game.c b/game/src/game.c index 425119f..10c69aa 100644 --- a/game/src/game.c +++ b/game/src/game.c @@ -115,9 +115,9 @@ static void resize_plugin(Game* game, int width, int height) { } } -void app_end(Game* game); +static void Shutdown(Game* game); -bool app_init(Game* game, int argc, const char** argv) { +static bool Init(Game* game, int argc, const char** argv) { assert(game); if (argc <= 1) { @@ -170,11 +170,11 @@ bool app_init(Game* game, int argc, const char** argv) { cleanup: LOGE("Gfx error: %s", get_error()); - app_end(game); + Shutdown(game); return false; } -void app_end(Game* game) { +static void Shutdown(Game* game) { assert(game); shutdown_plugin(game); if (game->gfx) { @@ -188,7 +188,7 @@ void app_end(Game* game) { } } -void app_update(Game* game, double t, double dt) { +static void Update(Game* game, double t, double dt) { plugin_engine_update(game->plugin_engine); if (plugin_reloaded(game->plugin)) { shutdown_plugin(game); @@ -203,14 +203,14 @@ void app_update(Game* game, double t, double dt) { update_plugin(game, t, dt); } -void app_render(const Game* game) { +static void Render(const Game* game) { GfxCore* gfxcore = gfx_get_core(game->gfx); gfx_start_frame(gfxcore); render_plugin(game); gfx_end_frame(gfxcore); } -void app_resize(Game* game, int width, int height) { +static void Resize(Game* game, int width, int height) { game->width = width; game->height = height; -- cgit v1.2.3