diff options
author | P. J. McDermott <pj@pehjota.net> | 2022-01-26 16:46:31 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2022-01-26 16:46:31 (EST) |
commit | 8f4be98e2a8abb6c33788538d408ea98f3f6eb82 (patch) | |
tree | 8d1f471717bff02f0b0d7e1ebb2b7455f50b28a9 | |
parent | 01e2f6af97c858b810e834b53aa25c356b940a38 (diff) | |
download | mazefight-8f4be98e2a8abb6c33788538d408ea98f3f6eb82.zip mazefight-8f4be98e2a8abb6c33788538d408ea98f3f6eb82.tar.gz mazefight-8f4be98e2a8abb6c33788538d408ea98f3f6eb82.tar.bz2 |
maze: Double wall thickness
This will allow characters and pickups to have even sizes. It also
makes the maze look a little more cartoonish and less professional.
-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, |