DX: ofset +1 al logo del title per a centrar-lo millor

This commit is contained in:
2026-05-15 13:37:31 +02:00
parent a3f05edd28
commit f8f63111b0
+14 -7
View File
@@ -170,13 +170,20 @@ function carregar_mapa(num)
end end
end end
function pintar_mapa() -- offset_x permet desplacar tot el mapa horitzontalment al pintar
-- (s'usa al title per a centrar millor el logo, que esta lleugerament
-- esbiaixat a l'esquerra en el 0.map original).
function pintar_mapa(offset_x)
offset_x = offset_x or 0
for x = 0, MAP_W-1 do for x = 0, MAP_W-1 do
for y = 0, MAP_H-1 do local px = x + offset_x
local c = mapa[x][y] if px >= 0 and px < MAP_W then
if c.tipo ~= BUIT then for y = 0, MAP_H-1 do
color(c.color, colors.bg) local c = mapa[x][y]
print(chr(glif[c.tipo]), x, y) if c.tipo ~= BUIT then
color(c.color, colors.bg)
print(chr(glif[c.tipo]), px, y)
end
end end
end end
end end
@@ -367,7 +374,7 @@ function update_title()
end end
neteja_fons() neteja_fons()
pintar_mapa() pintar_mapa(1) -- desplacem +1 col per a centrar el logo de map 0
-- Missatge parpadejant ("Prem l'espai per a jugar") -- Missatge parpadejant ("Prem l'espai per a jugar")
if flr(cnt() / 30) % 2 == 0 then if flr(cnt() / 30) % 2 == 0 then