[FEAT] Peek & Poke

[BUG] Mode not restored after ESC
This commit is contained in:
2021-12-06 12:23:36 +01:00
parent 69976ee9f6
commit 21052edd3d
2 changed files with 39 additions and 5 deletions

24
mapedit.lua Normal file
View File

@@ -0,0 +1,24 @@
ind = 22
function init()
setmode(2)
map = {}
for i=0,299 do
map[i] = 32
end
map[ind] = 65
end
function update()
if btn(KEY_TAB) then
for i=0,255 do
poke(i, i)
poke(300+i, 0x0f)
end
local mx, my = mousex(), mousey()
poke(300+(mx+my*20), 0x4e)
else
for i=0,299 do
poke(i, map[i])
end
end
end