diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-12-30 12:21:33 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-12-30 12:21:33 +0000 |
commit | 2307c68184744567d1c2d50bbbcd25a8dd2d0d02 (patch) | |
tree | 0e0dcd0e038c3564eddb6ae71114a8632a4048d5 /main.lua | |
parent | a98a8b4506d4dc71b3342b15ae83c91a31090815 (diff) | |
download | storage-chaos-2307c68184744567d1c2d50bbbcd25a8dd2d0d02.tar.gz storage-chaos-2307c68184744567d1c2d50bbbcd25a8dd2d0d02.zip |
Slighly nicer render for space out of the map
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -15,13 +15,13 @@ function love.load() { '#', '#', '#', '#', '#', '#', '#' } }, { - { '#','#','#','#','#','#',' ',' '}, - { '#',' ',' ',' ',' ','#','#','#'}, - { '#',' ','#',' ','$',' ',' ','#'}, - { '#','.','.','.','*','$','@','#'}, - { '#',' ','#',' ','$',' ',' ','#'}, - { '#',' ',' ',' ','#','#','#','#'}, - { '#','#','#','#','#',' ',' ',' '} + { '#', '#', '#', '#', '#', '#', 'x', 'x' }, + { '#', ' ', ' ', ' ', ' ', '#', '#', '#' }, + { '#', ' ', '#', ' ', '$', ' ', ' ', '#' }, + { '#', '.', '.', '.', '*', '$', '@', '#' }, + { '#', ' ', '#', ' ', '$', ' ', ' ', '#' }, + { '#', ' ', ' ', ' ', '#', '#', '#', '#' }, + { '#', '#', '#', '#', '#', 'x', 'x', 'x' } } } @@ -271,8 +271,10 @@ function love.draw() draw_x = 10 + x * 64 draw_y = 10 + y * 64 - -- always draw the ground - love.graphics.draw(ground, draw_x, draw_y) + -- draw ground unless in empty + if cell ~= 'x' then + love.graphics.draw(ground, draw_x, draw_y) + end if cell == '#' then love.graphics.draw(wall, draw_x, draw_y) elseif cell == '$' then |