diff options
-rw-r--r-- | apps/plugins/brickmania.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index e741b56976..d9c39d263f 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -1597,13 +1597,6 @@ static int brickmania_game_loop(void) | |||
1597 | rb->lcd_putsxy(LCD_WIDTH/2-2, INT3(STRINGPOS_FLIP), s); | 1597 | rb->lcd_putsxy(LCD_WIDTH/2-2, INT3(STRINGPOS_FLIP), s); |
1598 | } | 1598 | } |
1599 | 1599 | ||
1600 | /* write life num */ | ||
1601 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) | ||
1602 | #define LIFE_STR "L:%d" | ||
1603 | #else | ||
1604 | #define LIFE_STR "Life: %d" | ||
1605 | #endif | ||
1606 | rb->lcd_putsxyf(0, 0, LIFE_STR, life); | ||
1607 | 1600 | ||
1608 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) | 1601 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) |
1609 | rb->snprintf(s, sizeof(s), "L%d", level+1); | 1602 | rb->snprintf(s, sizeof(s), "L%d", level+1); |
@@ -1619,6 +1612,16 @@ static int brickmania_game_loop(void) | |||
1619 | rb->lcd_getstringsize(s, &sw, NULL); | 1612 | rb->lcd_getstringsize(s, &sw, NULL); |
1620 | rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s); | 1613 | rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s); |
1621 | 1614 | ||
1615 | /* write life num */ | ||
1616 | rb->snprintf(s, sizeof(s), "Life: %d", life); | ||
1617 | |||
1618 | /* hijack i - it's reset to 0 in 17 lines */ | ||
1619 | i = sw; | ||
1620 | rb->lcd_getstringsize(s, &sw, NULL); | ||
1621 | if (sw >= (LCD_WIDTH/2-i/2)) | ||
1622 | rb->snprintf(s, sizeof(s), "L: %d", life); | ||
1623 | rb->lcd_putsxy(0, 0, s); | ||
1624 | |||
1622 | /* continue game */ | 1625 | /* continue game */ |
1623 | if (game_state == ST_PAUSE) | 1626 | if (game_state == ST_PAUSE) |
1624 | { | 1627 | { |