summaryrefslogtreecommitdiff
path: root/gfx-iso/include/isogfx/app.h
blob: fe60d04a25d7031b85adb3a9a7905fe85c36f5ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <gfx/app.h>

#include <stdbool.h>

// TODO: Define an isogfx-gl backend library. Remove all these callbacks.

typedef struct IsoGfx    IsoGfx;
typedef struct IsoGfxApp IsoGfxApp;

typedef struct IsoGfxAppState IsoGfxAppState;

typedef struct IsoGfxApp {
  int             pixel_scale; // Use 0 or 1 for 1:1 scaling.
  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*);