From fc883e0b0449509ba2e1c5d14d187feee098ab34 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 18 Jan 2024 19:33:18 -0800 Subject: Simplify game callbacks. --- gltfview/src/game.h | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'gltfview/src/game.h') diff --git a/gltfview/src/game.h b/gltfview/src/game.h index 2a7b7ef..53725c7 100644 --- a/gltfview/src/game.h +++ b/gltfview/src/game.h @@ -1,19 +1,13 @@ +/* + * Header file defining the game state, included by plugins. + */ #pragma once -#include -#include -#include -#include -#include -#include - -#include - -typedef struct Plugin Plugin; typedef struct PluginEngine PluginEngine; - -/// The delta time the game should be updated with. -static const double game_dt = 1.0 / 60.0; +typedef struct Plugin Plugin; +typedef struct Gfx Gfx; +typedef struct Scene Scene; +typedef struct SceneCamera SceneCamera; /// Game state. typedef struct { @@ -22,16 +16,6 @@ typedef struct { PluginEngine* plugin_engine; Plugin* plugin; Gfx* gfx; - Scene* scene; - SceneCamera* camera; + Scene* scene; // TODO: Move scene graph to plugin? + SceneCamera* camera; // TODO: Move too. } Game; - -bool game_new(Game*, int argc, const char** argv); - -void game_end(Game*); - -void game_update(Game*, double t, double dt); - -void game_render(const Game*); - -void game_set_viewport(Game*, int width, int height); -- cgit v1.2.3