forked from JailDoctor/cacaus
- minimap generation for debug
- gorro implemented - objects implemented
This commit is contained in:
29
mapa.lua
29
mapa.lua
@@ -143,3 +143,32 @@ function check_tile(hab,x,y)
|
||||
return tiletype.void
|
||||
end
|
||||
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)
|
||||
for h=0,79 do
|
||||
for y=0,5 do
|
||||
for x=0,11 do
|
||||
local tile=mapa[h+1][1+x+y*12]
|
||||
if h==45 then
|
||||
print(x..","..y.."="..tile)
|
||||
end
|
||||
if tile<64 then
|
||||
pset(x+(h%10)*12,y+flr(h/10)*6,pix[1+tile])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
_update=mapa_draw_minimap
|
||||
end
|
||||
|
||||
function mapa_draw_minimap()
|
||||
--print("HOLA")
|
||||
setsource(minimap)
|
||||
setdest(0)
|
||||
cls(16)
|
||||
sspr(0,0,128,96,0,0)
|
||||
end
|
||||
Reference in New Issue
Block a user