- Passat a mini v1.3.6
This commit is contained in:
@@ -48,7 +48,7 @@ function mapa_new()
|
||||
end
|
||||
|
||||
function mapa_save()
|
||||
file = io.open("data/map.lua", "w")
|
||||
local file = io.open("data/map.lua", "w")
|
||||
io.output(file)
|
||||
io.write("mapa={\n")
|
||||
for i=1,80 do
|
||||
@@ -93,7 +93,7 @@ function mapa_draw(hab)
|
||||
for tx=0,11 do
|
||||
local tile=mapa[1+hab][1+tx+ty*12]
|
||||
if tile~=256 and (tile<126 or mapa.step>4) then
|
||||
blit((tile&15)*8,64+(tile>>4)*8,8,8,tx*8,ty*8)
|
||||
draw.surf((tile&15)*8,64+(tile>>4)*8,8,8,tx*8,ty*8)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -148,8 +148,8 @@ end
|
||||
pix={14,10,7,1,0,0,0,0,4,4,4,4,0,0,0,8,14,14,14,14,14,14,0,0,10,10,10,10,10,10,10,10,7,7,7,7,7,7,2,2,1,1,1,1,1,1,12,12,1,1,1,9,9,9,10,10,10,0,0,0,0,0,0,0}
|
||||
|
||||
function mapa_create_minimap()
|
||||
minimap = newsurf(128,96)
|
||||
setdest(minimap)
|
||||
minimap = surf.new(128,96)
|
||||
surf.target(minimap)
|
||||
for h=0,79 do
|
||||
for y=0,5 do
|
||||
for x=0,11 do
|
||||
@@ -158,7 +158,7 @@ function mapa_create_minimap()
|
||||
print(x..","..y.."="..tile)
|
||||
end
|
||||
if tile<64 then
|
||||
pset(x+(h%10)*12,y+math.floor(h/10)*6,pix[1+tile])
|
||||
surf.pixel(x+(h%10)*12,y+math.floor(h/10)*6,pix[1+tile])
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -168,8 +168,8 @@ end
|
||||
|
||||
function mapa_draw_minimap()
|
||||
--print("HOLA")
|
||||
setsource(minimap)
|
||||
setdest(0)
|
||||
cls(16)
|
||||
blit(0,0,128,96,0,0)
|
||||
surf.source(minimap)
|
||||
surf.target(0)
|
||||
surf.cls(16)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
end
|
||||
Reference in New Issue
Block a user