diff options
author | 3gg <3gg@shellblade.net> | 2024-06-15 11:43:47 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2024-06-15 11:43:47 -0700 |
commit | bc11af703e622dcc95ac337ad1a68db2d4cc16c0 (patch) | |
tree | ec2ad303bb5a9ef1983b3e2f6fe88aec25a8d4a5 /game/src/game.c | |
parent | 6dedc3c72f0772bee98a3e2dd01430603e8b2d58 (diff) |
Move glad initialization to gfx-app.
Diffstat (limited to 'game/src/game.c')
-rw-r--r-- | game/src/game.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) { | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | void app_end(Game* game); | 118 | static void Shutdown(Game* game); |
119 | 119 | ||
120 | bool app_init(Game* game, int argc, const char** argv) { | 120 | static bool Init(Game* game, int argc, const char** argv) { |
121 | assert(game); | 121 | assert(game); |
122 | 122 | ||
123 | if (argc <= 1) { | 123 | if (argc <= 1) { |
@@ -170,11 +170,11 @@ bool app_init(Game* game, int argc, const char** argv) { | |||
170 | 170 | ||
171 | cleanup: | 171 | cleanup: |
172 | LOGE("Gfx error: %s", get_error()); | 172 | LOGE("Gfx error: %s", get_error()); |
173 | app_end(game); | 173 | Shutdown(game); |
174 | return false; | 174 | return false; |
175 | } | 175 | } |
176 | 176 | ||
177 | void app_end(Game* game) { | 177 | static void Shutdown(Game* game) { |
178 | assert(game); | 178 | assert(game); |
179 | shutdown_plugin(game); | 179 | shutdown_plugin(game); |
180 | if (game->gfx) { | 180 | if (game->gfx) { |
@@ -188,7 +188,7 @@ void app_end(Game* game) { | |||
188 | } | 188 | } |
189 | } | 189 | } |
190 | 190 | ||
191 | void app_update(Game* game, double t, double dt) { | 191 | static void Update(Game* game, double t, double dt) { |
192 | plugin_engine_update(game->plugin_engine); | 192 | plugin_engine_update(game->plugin_engine); |
193 | if (plugin_reloaded(game->plugin)) { | 193 | if (plugin_reloaded(game->plugin)) { |
194 | shutdown_plugin(game); | 194 | shutdown_plugin(game); |
@@ -203,14 +203,14 @@ void app_update(Game* game, double t, double dt) { | |||
203 | update_plugin(game, t, dt); | 203 | update_plugin(game, t, dt); |
204 | } | 204 | } |
205 | 205 | ||
206 | void app_render(const Game* game) { | 206 | static void Render(const Game* game) { |
207 | GfxCore* gfxcore = gfx_get_core(game->gfx); | 207 | GfxCore* gfxcore = gfx_get_core(game->gfx); |
208 | gfx_start_frame(gfxcore); | 208 | gfx_start_frame(gfxcore); |
209 | render_plugin(game); | 209 | render_plugin(game); |
210 | gfx_end_frame(gfxcore); | 210 | gfx_end_frame(gfxcore); |
211 | } | 211 | } |
212 | 212 | ||
213 | void app_resize(Game* game, int width, int height) { | 213 | static void Resize(Game* game, int width, int height) { |
214 | game->width = width; | 214 | game->width = width; |
215 | game->height = height; | 215 | game->height = height; |
216 | 216 | ||