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()
color(colors.hud_text, colors.hud_bg)
local blank = " "
print(blank, 0, 25)
print(blank, 0, 26)
print(blank, 0, 27)
print(" LEVEL "..string.format("%02d", level), 0, 26)
print("SCORE "..string.format("%03d", score), 14, 26)
print("LIVES "..tostr(pepe.vides), 28, 26)
print("HI-SCORE "..string.format("%03d", hi_score).." "..nom_hi_score, 9, 27)
-- Banda inferior completa (5 files, rows 25..29) per a un HUD equilibrat:
-- 25: filler superior
-- 26: LEVEL / SCORE / LIVES (text centrat amb gaps regulars)
-- 27: filler intermig
-- 28: HI-SCORE i nom (centrat)
-- 29: filler inferior
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
-- Carrega config.lua si existeix. Si falta o te errors, queden els defaults.