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