summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-02 16:26:20 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-02 16:26:20 (EDT)
commit947c9712a31c8031d1045e34b222384613cfa9b4 (patch)
treeeea16aa218084080af273d2034121bfe42ceb588 /src
parent1ec10cdffee8e291329e10d7ea3559806ab9d9b9 (diff)
downloadmazefight-947c9712a31c8031d1045e34b222384613cfa9b4.zip
mazefight-947c9712a31c8031d1045e34b222384613cfa9b4.tar.gz
mazefight-947c9712a31c8031d1045e34b222384613cfa9b4.tar.bz2
maze: Fix rendering
Wow.
Diffstat (limited to 'src')
-rw-r--r--src/maze.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/maze.c b/src/maze.c
index e830e01..028e940 100644
--- a/src/maze.c
+++ b/src/maze.c
@@ -199,9 +199,9 @@ mf_maze_render(struct mf_maze *m, SDL_Renderer *renderer, SDL_Color *color,
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)) {
- /* Draw v line */
+ /* Draw h line */
if (SDL_RenderDrawLine(renderer,
- (x+1) * cw, (y ) * cw,
+ (x ) * cw, (y+1) * cw,
(x+1) * cw, (y+1) * cw)
< 0) {
SDL_LogError(
@@ -212,9 +212,9 @@ mf_maze_render(struct mf_maze *m, SDL_Renderer *renderer, SDL_Color *color,
}
}
if (x < m->w - 1 && mf_maze_is_wall(m, x, y, 1, 0)) {
- /* Draw h line */
+ /* Draw v line */
if (SDL_RenderDrawLine(renderer,
- (x ) * cw, (y+1) * cw,
+ (x+1) * cw, (y ) * cw,
(x+1) * cw, (y+1) * cw)
< 0) {
SDL_LogError(