- [FIX] El layer frontal no se veïa (encara que no se si al final s'usarà)
This commit is contained in:
@@ -19,7 +19,7 @@ editor={
|
|||||||
menu.show({ {"NEW MAP", editor.new},
|
menu.show({ {"NEW MAP", editor.new},
|
||||||
{"LOAD MAP", function() textbox.show("FILENAME TO LOAD:",editor.load, mapa.name) end},
|
{"LOAD MAP", function() textbox.show("FILENAME TO LOAD:",editor.load, mapa.name) end},
|
||||||
{"SAVE MAP", function() if mapa.name~=nil then editor.save(mapa.name) else textbox.show("FILENAME TO SAVE:",editor.save, mapa.name) end end},
|
{"SAVE MAP", function() if mapa.name~=nil then editor.save(mapa.name) else textbox.show("FILENAME TO SAVE:",editor.save, mapa.name) end end},
|
||||||
{mapa.front_layer and "DISABLE FRONT LAYER" or "ENABLE FRONT LAYER", editor.toggle_front_layer},
|
{editor.editing_front_layer and "DISABLE FRONT LAYER" or "ENABLE FRONT LAYER", editor.toggle_front_layer},
|
||||||
{"RESIZE MAP", editor.resize},
|
{"RESIZE MAP", editor.resize},
|
||||||
{"RELOAD TEXTURES", editor.reload_textures},
|
{"RELOAD TEXTURES", editor.reload_textures},
|
||||||
{"EXIT", main_init},
|
{"EXIT", main_init},
|
||||||
@@ -40,6 +40,10 @@ editor={
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
toggle_front_layer=function()
|
toggle_front_layer=function()
|
||||||
|
if editor.editing_front_layer then
|
||||||
|
setmap(mapa.surface)
|
||||||
|
editor.editing_front_layer=false;
|
||||||
|
else
|
||||||
if not mapa.front_layer then
|
if not mapa.front_layer then
|
||||||
mapa.front_layer=newsurf(mapa.w,mapa.h)
|
mapa.front_layer=newsurf(mapa.w,mapa.h)
|
||||||
editor.editing_front_layer=true
|
editor.editing_front_layer=true
|
||||||
@@ -50,7 +54,9 @@ editor={
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mapa.front_layer=nil
|
editor.editing_front_layer=true
|
||||||
|
setmap(mapa.front_layer)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
editor.paused=false
|
editor.paused=false
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ game={
|
|||||||
restart=function()
|
restart=function()
|
||||||
flags={}
|
flags={}
|
||||||
objects.list={}
|
objects.list={}
|
||||||
actors.main={name="jailer",x=9,y=14,o="u",gfx={x=32,y=0},level="repro"}
|
actors.main={name="jailer",x=6,y=30,o="u",gfx={x=32,y=0},level="vella"}
|
||||||
game.init("repro")
|
game.init("vella")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
init=function(levelname,f,objs)
|
init=function(levelname,f,objs)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ mapa={
|
|||||||
mset(x,y,0)
|
mset(x,y,0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
mapa.front_layer=nil
|
||||||
end,
|
end,
|
||||||
|
|
||||||
load = function(filename)
|
load = function(filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user