[FEAT] Peek & Poke
[BUG] Mode not restored after ESC
This commit is contained in:
24
mapedit.lua
Normal file
24
mapedit.lua
Normal 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
|
||||
Reference in New Issue
Block a user