- [NEW] Actualitzat per a usar l'última versió de mini (v1.3.10)
This commit is contained in:
@@ -58,13 +58,13 @@ editor={
|
||||
|
||||
toggle_front_layer=function()
|
||||
if editor.editing_front_layer then
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
editor.editing_front_layer=false;
|
||||
else
|
||||
if not mapa.front_layer then
|
||||
mapa.front_layer=surf.new(mapa.w,mapa.h)
|
||||
editor.editing_front_layer=true
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
for y=0,mapa.h-1 do
|
||||
for x=0,mapa.w-1 do
|
||||
map.tile(x,y,0)
|
||||
@@ -72,7 +72,7 @@ editor={
|
||||
end
|
||||
else
|
||||
editor.editing_front_layer=true
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
end
|
||||
end
|
||||
editor.paused=false
|
||||
@@ -95,14 +95,14 @@ editor={
|
||||
mapa.surface=surf.new(mapa.w,mapa.h)
|
||||
for y=0,mapa.h-1 do
|
||||
for x=0,mapa.w-1 do
|
||||
map.set(old_surface)
|
||||
map.surf(old_surface)
|
||||
local value=map.tile(x,y)
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
map.tile(x,y,value)
|
||||
end
|
||||
end
|
||||
surf.free(old_surface)
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
editor.paused=false
|
||||
end,
|
||||
|
||||
@@ -175,19 +175,19 @@ editor={
|
||||
|
||||
update=function()
|
||||
surf.cls()
|
||||
view.origin(editor.cam.x, editor.cam.y)
|
||||
view.origin(-editor.cam.x, -editor.cam.y)
|
||||
surf.source(tiles)
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
map.draw() --map(0,0,0,0,mapa.w, mapa.h)
|
||||
if mapa.front_layer then
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
map.draw() --map(0,0,0,0,mapa.w, mapa.h)
|
||||
end
|
||||
if editor.editing_front_layer then
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
text("EDITING FRONT LAYER",12,2,10)
|
||||
else
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
end
|
||||
local mx,my=mouse.pos()
|
||||
local tx,ty=(mx+editor.cam.x)>>3,(my+editor.cam.y)>>3
|
||||
|
||||
@@ -144,9 +144,9 @@ game={
|
||||
|
||||
draw=function()
|
||||
surf.cls(6)
|
||||
view.origin(game.cam.x, game.cam.y)
|
||||
view.origin(-game.cam.x, -game.cam.y)
|
||||
surf.source(tiles)
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
map.draw()--map(0,0,0,0,mapa.w, mapa.h)
|
||||
switches.draw();
|
||||
surf.source(sprites)
|
||||
@@ -164,10 +164,10 @@ game={
|
||||
end
|
||||
if mapa.front_layer then
|
||||
surf.source(tiles)
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
map.draw() -- map(0,0,0,0,mapa.w, mapa.h)
|
||||
end
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
view.origin(0,0)
|
||||
for i=0,15 do draw.rectf(20+i*4,0,4,4,i) end
|
||||
end,
|
||||
|
||||
@@ -9,7 +9,7 @@ mapa={
|
||||
mapa.w,mapa.h=w,h
|
||||
if mapa.surface~=-1 then surf.free(mapa.surface) end
|
||||
mapa.surface=surf.new(w,h)
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
for y=0,127 do
|
||||
for x=0,127 do
|
||||
map.tile(x,y,0)
|
||||
@@ -39,7 +39,7 @@ mapa={
|
||||
|
||||
if num_layers==2 then
|
||||
mapa.front_layer=surf.new(mapa.w,mapa.h)
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
|
||||
for y=0,mapa.h-1 do
|
||||
local line = io.read()
|
||||
@@ -50,7 +50,7 @@ mapa={
|
||||
end
|
||||
end
|
||||
end
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
io.close(file)
|
||||
end
|
||||
end,
|
||||
@@ -63,7 +63,7 @@ mapa={
|
||||
io.write(mapa.w.."\n")
|
||||
io.write(mapa.h.."\n")
|
||||
if mapa.front_layer then io.write("2\n") else io.write("1\n") end
|
||||
map.set(mapa.surface)
|
||||
map.surf(mapa.surface)
|
||||
for y=0,mapa.h-1 do
|
||||
for x=0,mapa.w-1 do
|
||||
io.write(map.tile(x,y)..",")
|
||||
@@ -71,7 +71,7 @@ mapa={
|
||||
io.write("\n")
|
||||
end
|
||||
if mapa.front_layer then
|
||||
map.set(mapa.front_layer)
|
||||
map.surf(mapa.front_layer)
|
||||
for y=0,mapa.h-1 do
|
||||
for x=0,mapa.w-1 do
|
||||
io.write(map.tile(x,y)..",")
|
||||
|
||||
Reference in New Issue
Block a user