DX: arregla 'Vides /' al game over (bug de tostr amb negatius)
This commit is contained in:
+3
-1
@@ -745,7 +745,9 @@ function pintar_hud()
|
||||
-- Text dins del marc
|
||||
print(textos.level_label.." "..string.format("%02d", level), 3, 26)
|
||||
print(textos.score_label.." "..string.format("%03d", score), 16, 26)
|
||||
print(textos.lives_label.." "..tostr(pepe.vides), 29, 26)
|
||||
-- max(0, ...) evita que la pantalla mostre "Vides /" en el game over:
|
||||
-- l'implementacio de tostr() d'ascii torna "/" per a -1 (bug intern).
|
||||
print(textos.lives_label.." "..tostr(max(0, pepe.vides)), 29, 26)
|
||||
local r = textos.record_label.." "..string.format("%03d", hi_score).." "..nom_hi_score
|
||||
print(r, flr((40 - strlen(r)) / 2), 28)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user