Initial commit.
This commit is contained in:
commit
c0f9ebbdb8
4 changed files with 134 additions and 0 deletions
29
infimap.lua
Normal file
29
infimap.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue