diff options
-rw-r--r-- | src/maze.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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) && |