summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/maze.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/maze.c b/src/maze.c
index d991328..92c1410 100644
--- a/src/maze.c
+++ b/src/maze.c
@@ -250,6 +250,19 @@ mf_maze_render(struct mf_maze *m, SDL_Renderer *renderer, SDL_Color *color,
SDL_GetError());
e = -1;
}
+
+ x = m->w * cw - 1;
+ y = m->h * cw - 1;
+ if (
+ SDL_RenderDrawLine(renderer, 0, 0, x, 0) < 0 ||
+ SDL_RenderDrawLine(renderer, 0, y, x, y) < 0 ||
+ SDL_RenderDrawLine(renderer, 0, 0, 0, y) < 0 ||
+ SDL_RenderDrawLine(renderer, x, 0, x, y) < 0) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
+ "Couldn't draw line: %s", SDL_GetError());
+ e = -1;
+ }
+
for (y = 0; y < m->h; ++y) {
for (x = 0; x < m->w; ++x) {
if (y < m->h - 1 && mf_maze_is_wall(m, x, y, 0, 1) &&