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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/isomap/isomap.c b/demos/isomap/isomap.c
index 471ef57..e66d14d 100644
--- a/demos/isomap/isomap.c
+++ b/demos/isomap/isomap.c
@@ -47,7 +47,7 @@ static bool init(GfxApp* app, GfxAppState* state, int argc, const char** argv) {
47 Gfx2d* iso = state->gfx; 47 Gfx2d* iso = state->gfx;
48 48
49 if (!gfx2d_load_map( 49 if (!gfx2d_load_map(
50 iso, "/home/jeanne/Nextcloud/assets/tilemaps/scrabling1.tm")) { 50 iso, "/home/jeanne/Nextcloud/assets/tilemaps/desert1.tm")) {
51 return false; 51 return false;
52 } 52 }
53 53
@@ -100,9 +100,9 @@ static void update(GfxApp* app, GfxAppState* state, double t, double dt) {
100 assert(state); 100 assert(state);
101 101
102 state->camera = vec2_add(state->camera, get_camera_movement(app, (R)dt)); 102 state->camera = vec2_add(state->camera, get_camera_movement(app, (R)dt));
103 gfx2d_clip_camera(state->gfx, &state->camera.x, &state->camera.y);
103 104
104 Gfx2d* iso = state->gfx; 105 Gfx2d* iso = state->gfx;
105 gfx2d_set_camera(iso, (int)state->camera.x, (int)state->camera.y);
106 gfx2d_update(iso, t); 106 gfx2d_update(iso, t);
107} 107}
108 108
@@ -111,7 +111,7 @@ static void render(const GfxApp* app, GfxAppState* state) {
111 assert(state); 111 assert(state);
112 112
113 Gfx2d* iso = state->gfx; 113 Gfx2d* iso = state->gfx;
114 gfx2d_render(iso); 114 gfx2d_render(iso, (int)state->camera.x, (int)state->camera.y);
115 gfx2d_backend_render(state->backend, iso); 115 gfx2d_backend_render(state->backend, iso);
116} 116}
117 117