diff options
-rw-r--r-- | src/maze.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -269,8 +269,12 @@ mf_maze_render(struct mf_maze *m, SDL_Renderer *renderer, SDL_Color *color, _mf_maze_revealed_wall(m, x, y, 0, 1)) { /* Draw h line */ if (SDL_RenderDrawLine(renderer, - (x ) * cw, (y+1) * cw, - (x+1) * cw, (y+1) * cw) + (x ) * cw - 1, (y+1) * cw - 1, + (x+1) * cw , (y+1) * cw - 1) + < 0 || + SDL_RenderDrawLine(renderer, + (x ) * cw - 1, (y+1) * cw , + (x+1) * cw , (y+1) * cw ) < 0) { SDL_LogError( SDL_LOG_CATEGORY_APPLICATION, @@ -283,8 +287,12 @@ mf_maze_render(struct mf_maze *m, SDL_Renderer *renderer, SDL_Color *color, _mf_maze_revealed_wall(m, x, y, 1, 0)) { /* Draw v line */ if (SDL_RenderDrawLine(renderer, - (x+1) * cw, (y ) * cw, - (x+1) * cw, (y+1) * cw) + (x+1) * cw - 1, (y ) * cw - 1, + (x+1) * cw - 1, (y+1) * cw ) + < 0 || + SDL_RenderDrawLine(renderer, + (x+1) * cw , (y ) * cw - 1, + (x+1) * cw , (y+1) * cw ) < 0) { SDL_LogError( SDL_LOG_CATEGORY_APPLICATION, |