Files
ascii/mapedit.lua
JailDoctor 21052edd3d [FEAT] Peek & Poke
[BUG] Mode not restored after ESC
2021-12-06 12:23:36 +01:00

25 lines
419 B
Lua

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