diff options
author | Antoine Cellerier <dionoea@videolan.org> | 2007-06-03 21:09:32 +0000 |
---|---|---|
committer | Antoine Cellerier <dionoea@videolan.org> | 2007-06-03 21:09:32 +0000 |
commit | ffcc94ea9215a7958799eb22aa3212fdfd15c4e5 (patch) | |
tree | e6ed274bc253e2b1c69c0a329bd9e5a26a453df5 | |
parent | e9680ae24fb7a4ed3185f2cd61311c433d639660 (diff) |
* xobox.c: Don't call lcd_clear_display() since we're redrawing every single screen pixel afterwards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13545 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/xobox.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 01afac69a7..fbcb321d4a 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -371,7 +371,7 @@ static int percentage (void) for (i = 1; i < BOARD_W - 1; i++) if (board[j][i] == FILLED) filled++; - return filled * 100 / ((BOARD_W - 2) * (BOARD_H - 4)); + return (filled * 100) / ((BOARD_W - 2) * (BOARD_H - 4)); } /* draw the board on with all the game figures */ @@ -381,7 +381,6 @@ static void refresh_board (void) char str[25]; rb->lcd_set_background (LCD_BLACK); - rb->lcd_clear_display (); for (j = 0; j < BOARD_H; j++) { unsigned last_color = board[j][0]; @@ -402,6 +401,7 @@ static void refresh_board (void) BOARD_Y + CUBE_SIZE * j, CUBE_SIZE * (i - last_i), CUBE_SIZE); } + rb->lcd_set_foreground (LCD_BLACK); rb->lcd_set_background (CLR_LTBLUE); rb->snprintf (str, sizeof (str), "Level %d", player.level + 1); @@ -418,6 +418,7 @@ static void refresh_board (void) rb->lcd_set_background (board[player.j][player.i]); rb->lcd_mono_bitmap (pics[PIC_PLAYER], player.i * CUBE_SIZE + BOARD_X, player.j * CUBE_SIZE + BOARD_Y, CUBE_SIZE, CUBE_SIZE); + rb->lcd_set_background (EMPTIED); rb->lcd_set_drawmode (DRMODE_FG); rb->lcd_set_foreground (LCD_WHITE); |