DX: HUD equilibrat en 5 files, text centrat

This commit is contained in:
2026-05-15 13:26:17 +02:00
parent 8f9ba8537e
commit 67d48b6942
+11 -7
View File
@@ -669,13 +669,17 @@ end
function pintar_hud() function pintar_hud()
color(colors.hud_text, colors.hud_bg) color(colors.hud_text, colors.hud_bg)
local blank = " " local blank = " "
print(blank, 0, 25) -- Banda inferior completa (5 files, rows 25..29) per a un HUD equilibrat:
print(blank, 0, 26) -- 25: filler superior
print(blank, 0, 27) -- 26: LEVEL / SCORE / LIVES (text centrat amb gaps regulars)
print(" LEVEL "..string.format("%02d", level), 0, 26) -- 27: filler intermig
print("SCORE "..string.format("%03d", score), 14, 26) -- 28: HI-SCORE i nom (centrat)
print("LIVES "..tostr(pepe.vides), 28, 26) -- 29: filler inferior
print("HI-SCORE "..string.format("%03d", hi_score).." "..nom_hi_score, 9, 27) for y = 25, 29 do print(blank, 0, y) end
print("LEVEL "..string.format("%02d", level), 4, 26)
print("SCORE "..string.format("%03d", score), 16, 26)
print("LIVES "..tostr(pepe.vides), 29, 26)
print("HI-SCORE "..string.format("%03d", hi_score).." "..nom_hi_score, 12, 28)
end end
-- Carrega config.lua si existeix. Si falta o te errors, queden els defaults. -- Carrega config.lua si existeix. Si falta o te errors, queden els defaults.