1
0
Fork 0
forked from len0rd/rockbox

brickmania: fix position of score in function brickmania_sleep.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22429 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2009-08-19 13:57:40 +00:00
parent 237d36cd93
commit 2bbcf505dd

View file

@ -765,11 +765,7 @@ static void brickmania_sleep(int secs)
vscore--; vscore--;
rb->snprintf(s, sizeof(s), "%d", vscore); rb->snprintf(s, sizeof(s), "%d", vscore);
rb->lcd_getstringsize(s, &sw, &w); rb->lcd_getstringsize(s, &sw, &w);
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s); rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s);
#else
rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 2, s);
#endif
rb->lcd_update_rect(0,0,LCD_WIDTH,w+2); rb->lcd_update_rect(0,0,LCD_WIDTH,w+2);
} }
rb->yield(); rb->yield();
@ -942,7 +938,7 @@ static int brickmania_pad_check(int ballxc, int mode, int pon ,int ballnum)
if (ball[ballnum].x > 0) if (ball[ballnum].x > 0)
return ballxc; return ballxc;
else else
return ballxc*-1; return ballxc*-1;
} }
} }
@ -1022,11 +1018,7 @@ static int brickmania_game_loop(void)
if (vscore<score) vscore++; if (vscore<score) vscore++;
rb->snprintf(s, sizeof(s), "%d", vscore); rb->snprintf(s, sizeof(s), "%d", vscore);
rb->lcd_getstringsize(s, &sw, NULL); rb->lcd_getstringsize(s, &sw, NULL);
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s); rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s);
#else
rb->lcd_putsxy(LCD_WIDTH/2-sw/2, 0, s);
#endif
/* continue game */ /* continue game */
if (game_state==ST_PAUSE) { if (game_state==ST_PAUSE) {