diff options
Diffstat (limited to 'src/sdl')
-rw-r--r-- | src/sdl/draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sdl/draw.c b/src/sdl/draw.c index 482bfb2..14307b5 100644 --- a/src/sdl/draw.c +++ b/src/sdl/draw.c @@ -126,8 +126,10 @@ draw_sprites_on_size( // draw floor for (size_t y = 0; y < level_size.y; y++) { for (size_t x = 0; x < level_size.x; x++) { - const sok_pos_t pos = { x, y }; - draw_cell(draw_ctx, pos, SPRITE_FLOOR); + if (x > 0 && y > 0 && x < level_size.x - 1 && y < level_size.y - 1) { + const sok_pos_t pos = { x, y }; + draw_cell(draw_ctx, pos, SPRITE_FLOOR); + } } } |