From adbd2511beec8f1caa1752bdfd755cc2f62ba425 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 9 Mar 2024 08:43:26 -0800 Subject: Make isogfx a library instead of an executable. --- gfx-iso/include/isogfx/app.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 gfx-iso/include/isogfx/app.h (limited to 'gfx-iso/include') diff --git a/gfx-iso/include/isogfx/app.h b/gfx-iso/include/isogfx/app.h new file mode 100644 index 0000000..0a0fcc1 --- /dev/null +++ b/gfx-iso/include/isogfx/app.h @@ -0,0 +1,22 @@ +#pragma once + +#include + +#include + +typedef struct IsoGfx IsoGfx; +typedef struct IsoGfxApp IsoGfxApp; + +typedef struct IsoGfxAppState IsoGfxAppState; + +typedef struct IsoGfxApp { + int pixel_scale; // 0 or 1 for 1:1 scale. + IsoGfxAppState* state; + + bool (*init)(IsoGfxAppState*, IsoGfx*, int argc, const char** argv); + void (*shutdown)(IsoGfxAppState*, IsoGfx*); + void (*update)(IsoGfxAppState*, IsoGfx*, double t, double dt); + void (*render)(IsoGfxAppState*, IsoGfx*); +} IsoGfxApp; + +void iso_run(int argc, const char** argv, IsoGfxApp*); -- cgit v1.2.3