diff options
| author | 3gg <3gg@shellblade.net> | 2024-03-09 08:43:26 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2024-03-09 08:43:26 -0800 |
| commit | adbd2511beec8f1caa1752bdfd755cc2f62ba425 (patch) | |
| tree | 8fde167e9d9951b43e571a2417ae55f9572bea28 /gfx-iso/include | |
| parent | 4bc4ca2796bd434880b77d3c4bcbb56107456777 (diff) | |
Make isogfx a library instead of an executable.
Diffstat (limited to 'gfx-iso/include')
| -rw-r--r-- | gfx-iso/include/isogfx/app.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <gfx/gfx_app.h> | ||
| 4 | |||
| 5 | #include <stdbool.h> | ||
| 6 | |||
| 7 | typedef struct IsoGfx IsoGfx; | ||
| 8 | typedef struct IsoGfxApp IsoGfxApp; | ||
| 9 | |||
| 10 | typedef struct IsoGfxAppState IsoGfxAppState; | ||
| 11 | |||
| 12 | typedef struct IsoGfxApp { | ||
| 13 | int pixel_scale; // 0 or 1 for 1:1 scale. | ||
| 14 | IsoGfxAppState* state; | ||
| 15 | |||
| 16 | bool (*init)(IsoGfxAppState*, IsoGfx*, int argc, const char** argv); | ||
| 17 | void (*shutdown)(IsoGfxAppState*, IsoGfx*); | ||
| 18 | void (*update)(IsoGfxAppState*, IsoGfx*, double t, double dt); | ||
| 19 | void (*render)(IsoGfxAppState*, IsoGfx*); | ||
| 20 | } IsoGfxApp; | ||
| 21 | |||
| 22 | void iso_run(int argc, const char** argv, IsoGfxApp*); | ||
