summaryrefslogtreecommitdiff
path: root/demos/isomap/isomap.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/isomap/isomap.c')
-rw-r--r--demos/isomap/isomap.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/demos/isomap/isomap.c b/demos/isomap/isomap.c
index a233659..5adf6f1 100644
--- a/demos/isomap/isomap.c
+++ b/demos/isomap/isomap.c
@@ -49,7 +49,7 @@ static bool init(GfxAppState* state, int argc, const char** argv) {
49 state->stag = isogfx_make_sprite(iso, state->stag_sheet); 49 state->stag = isogfx_make_sprite(iso, state->stag_sheet);
50 isogfx_set_sprite_position(iso, state->stag, 5, 4); 50 isogfx_set_sprite_position(iso, state->stag, 5, 4);
51 51
52 if (!(state->backend = IsoBackendInit(iso))) { 52 if (!(state->backend = iso_backend_init(iso))) {
53 return false; 53 return false;
54 } 54 }
55 55
@@ -74,32 +74,31 @@ static void render(GfxAppState* state) {
74 74
75 IsoGfx* iso = state->iso; 75 IsoGfx* iso = state->iso;
76 isogfx_render(iso); 76 isogfx_render(iso);
77 IsoBackendRender(state->backend, iso); 77 iso_backend_render(state->backend, iso);
78} 78}
79 79
80static void resize(GfxAppState* state, int width, int height) { 80static void resize(GfxAppState* state, int width, int height) {
81 assert(state); 81 assert(state);
82 82
83 IsoBackendResizeWindow(state->backend, state->iso, width, height); 83 iso_backend_resize_window(state->backend, state->iso, width, height);
84} 84}
85 85
86int main(int argc, const char** argv) { 86int main(int argc, const char** argv) {
87 GfxAppState state = {0}; 87 GfxAppState state = {0};
88 gfx_app_run( 88 gfx_app_run(
89 &(GfxAppDesc){ 89 &(GfxAppDesc){.argc = argc,
90 .argc = argc, 90 .argv = argv,
91 .argv = argv, 91 .width = WINDOW_WIDTH,
92 .width = WINDOW_WIDTH, 92 .height = WINDOW_HEIGHT,
93 .height = WINDOW_HEIGHT, 93 .max_fps = MAX_FPS,
94 .max_fps = MAX_FPS, 94 .update_delta_time =
95 .update_delta_time = MAX_FPS > 0 ? 1.0 / (double)MAX_FPS : 0.0, 95 MAX_FPS > 0 ? 1.0 / (double)MAX_FPS : 0.0,
96 .title = "Isometric Renderer", 96 .title = "Isometric Renderer",
97 .app_state = &state}, 97 .app_state = &state},
98 &(GfxAppCallbacks){ 98 &(GfxAppCallbacks){.init = init,
99 .init = init, 99 .update = update,
100 .update = update, 100 .render = render,
101 .render = render, 101 .resize = resize,
102 .resize = resize, 102 .shutdown = shutdown});
103 .shutdown = shutdown});
104 return 0; 103 return 0;
105} 104}