a_pleasant_stroll/infimap.lua
2019-12-04 18:48:04 -05:00

30 lines
559 B
Lua

function _init()
init_movement()
init_mapgen()
generate_map({0, 0})
debug = true
end
function _update()
handle_input()
if (btn(5) and btn(4) and btnp(3)) debug = not debug
end
function _draw()
rectfill(0, 0, 127, 127, 0)
-- the screen is 128x128 pixels, so we can only draw 16x16 sprites
map(camera_pos[1], camera_pos[2], 0, 0, 16, 16)
draw_player()
debug_me_baby()
end
function debug_me_baby()
if debug then
clip(0, 0, 32, 8)
rectfill(0, 0, 32, 8, 0)
print(stat(0), 0, 0, 15)
clip()
end
end