diff --git a/picotron/wolfenstein_src/main.lua b/picotron/wolfenstein_src/main.lua index 1868355..81ac757 100644 --- a/picotron/wolfenstein_src/main.lua +++ b/picotron/wolfenstein_src/main.lua @@ -32,6 +32,7 @@ end function draw_minimap() local tile_size = 4 map(0, 0, 20, 20, 31, 31, 0x0000, tile_size, tile_size) + circfill(20 + (player.origin.x * tile_size), 20 + (player.origin.y * tile_size), 2, 5) end function _draw() @@ -45,3 +46,10 @@ function _draw() end draw_minimap() end + +function _update() + if (btn(0)) player.origin.x -= 2 + if (btn(1)) player.origin.x += 2 + if (btn(2)) player.origin.y -= 2 + if (btn(3)) player.origin.y += 2 +end