Compare commits

...

2 Commits

6 changed files with 19 additions and 5 deletions

View File

@@ -28,9 +28,11 @@ actors={
local frame=((v.dx+v.dy)%2)*16
--print(v.o)
if v.o=='u' then
sspr(v.gfx.x+frame,v.gfx.y+16,16,16,v.x*8-4+v.dx*2,v.y*8-12+v.dy*2,16,16)
--print(v.dy>1.." "..frame)
sspr(v.gfx.x+frame,v.gfx.y+16,16,16,v.x*8-4+v.dx*2,v.y*8-12+v.dy*2,16,16,v.dy>1)
elseif v.o=='d' then
sspr(v.gfx.x+frame,v.gfx.y,16,16,v.x*8-4+v.dx*2,v.y*8-12+v.dy*2,16,16)
--print(-v.dy>1.." "..frame)
sspr(v.gfx.x+frame,v.gfx.y,16,16,v.x*8-4+v.dx*2,v.y*8-12+v.dy*2,16,16,-v.dy>2)
elseif v.o=='l' then
sspr(v.gfx.x+frame,v.gfx.y+32,16,16,v.x*8-4+v.dx*2,v.y*8-12+v.dy*2,16,16)
elseif v.o=='r' then

View File

@@ -7,7 +7,8 @@ editor={
init=function()
set_update(editor.update)
editor.show_menu()
--editor.show_menu()
editor.new()
end,
show_menu=function()

View File

@@ -32,6 +32,14 @@ game={
fade.fadein()
end,
show_menu=function()
menu.show({ {"GUARDAR PARTIDA", editor.new},
{"CARREGAR PARTIDA", function() textbox.show("FILENAME TO LOAD:",editor.load, mapa.name) end},
{"EIXIR", function() if mapa.name~=nil then editor.save(mapa.name) else textbox.show("FILENAME TO SAVE:",editor.save, mapa.name) end end},
{"EXIT", main_init},
}, function()editor.paused=false end)
end,
update=function()
local hero = actors.search("jailer")
if hero then
@@ -56,6 +64,8 @@ game={
hero.path={pos=0,route='l',keys=true}
elseif btn(KEY_RIGHT) then
hero.path={pos=0,route='r',keys=true}
elseif btnp(KEY_ESCAPE) then
game.show_menu()
end
end

View File

@@ -6,7 +6,7 @@ function _init()
setsource(tiles)
local pal=loadpal("tiles.gif")
setpal(pal)
beat(6)
beat(12)
fade.init()
main_init()
end

View File

@@ -13,10 +13,11 @@ menu = {
end,
update=function()
menu.old_update()
--menu.old_update()
rectfill(10,20, 150, 34+#menu.options*10,6)
rect(10,20, 150, 34+#menu.options*10,8)
rect(9,19, 151, 35+#menu.options*10,6)
for i,v in ipairs(menu.options) do
color(4) if menu.selected==i then color(15) prnt(">",20,20+i*10) end

BIN
data/objects.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B