Fixed a bug when rendering the player's remaining number of lives.

This commit is contained in:
2013-08-18 10:58:03 -04:30
parent 42d7007a35
commit a5a8650836

View File

@@ -321,15 +321,16 @@ void render(){
ClearScreen(); ClearScreen();
// Render informative text. // Render informative text.
TextOut(0, LCD_LINE1, "LIVES:"); TextOut(0, LCD_LINE1, "LIVES:");
//NumOut(35, LCD_LINE1, player.lives);
params[0] = 35; params[0] = 35;
GraphicOutEx(0, LCD_LINE1 + 1, "ship.ric", params); if(player.lives > 0){
if(player.lives > 1){
params[0] = 44;
GraphicOutEx(0, LCD_LINE1 + 1, "ship.ric", params); GraphicOutEx(0, LCD_LINE1 + 1, "ship.ric", params);
if(player.lives > 2){ if(player.lives > 1){
params[0] = 53; params[0] = 44;
GraphicOutEx(0, LCD_LINE1 + 1, "ship.ric", params); GraphicOutEx(0, LCD_LINE1 + 1, "ship.ric", params);
if(player.lives > 2){
params[0] = 53;
GraphicOutEx(0, LCD_LINE1 + 1, "ship.ric", params);
}
} }
} }
TextOut(0, LCD_LINE2, "SCORE:"); TextOut(0, LCD_LINE2, "SCORE:");