summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2007-06-03 21:09:32 +0000
committerAntoine Cellerier <dionoea@videolan.org>2007-06-03 21:09:32 +0000
commitffcc94ea9215a7958799eb22aa3212fdfd15c4e5 (patch)
treee6ed274bc253e2b1c69c0a329bd9e5a26a453df5 /apps
parente9680ae24fb7a4ed3185f2cd61311c433d639660 (diff)
downloadrockbox-ffcc94ea9215a7958799eb22aa3212fdfd15c4e5.tar.gz
rockbox-ffcc94ea9215a7958799eb22aa3212fdfd15c4e5.zip
* 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
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/xobox.c5
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)
371 for (i = 1; i < BOARD_W - 1; i++) 371 for (i = 1; i < BOARD_W - 1; i++)
372 if (board[j][i] == FILLED) 372 if (board[j][i] == FILLED)
373 filled++; 373 filled++;
374 return filled * 100 / ((BOARD_W - 2) * (BOARD_H - 4)); 374 return (filled * 100) / ((BOARD_W - 2) * (BOARD_H - 4));
375} 375}
376 376
377/* draw the board on with all the game figures */ 377/* draw the board on with all the game figures */
@@ -381,7 +381,6 @@ static void refresh_board (void)
381 char str[25]; 381 char str[25];
382 382
383 rb->lcd_set_background (LCD_BLACK); 383 rb->lcd_set_background (LCD_BLACK);
384 rb->lcd_clear_display ();
385 for (j = 0; j < BOARD_H; j++) 384 for (j = 0; j < BOARD_H; j++)
386 { 385 {
387 unsigned last_color = board[j][0]; 386 unsigned last_color = board[j][0];
@@ -402,6 +401,7 @@ static void refresh_board (void)
402 BOARD_Y + CUBE_SIZE * j, 401 BOARD_Y + CUBE_SIZE * j,
403 CUBE_SIZE * (i - last_i), CUBE_SIZE); 402 CUBE_SIZE * (i - last_i), CUBE_SIZE);
404 } 403 }
404
405 rb->lcd_set_foreground (LCD_BLACK); 405 rb->lcd_set_foreground (LCD_BLACK);
406 rb->lcd_set_background (CLR_LTBLUE); 406 rb->lcd_set_background (CLR_LTBLUE);
407 rb->snprintf (str, sizeof (str), "Level %d", player.level + 1); 407 rb->snprintf (str, sizeof (str), "Level %d", player.level + 1);
@@ -418,6 +418,7 @@ static void refresh_board (void)
418 rb->lcd_set_background (board[player.j][player.i]); 418 rb->lcd_set_background (board[player.j][player.i]);
419 rb->lcd_mono_bitmap (pics[PIC_PLAYER], player.i * CUBE_SIZE + BOARD_X, 419 rb->lcd_mono_bitmap (pics[PIC_PLAYER], player.i * CUBE_SIZE + BOARD_X,
420 player.j * CUBE_SIZE + BOARD_Y, CUBE_SIZE, CUBE_SIZE); 420 player.j * CUBE_SIZE + BOARD_Y, CUBE_SIZE, CUBE_SIZE);
421
421 rb->lcd_set_background (EMPTIED); 422 rb->lcd_set_background (EMPTIED);
422 rb->lcd_set_drawmode (DRMODE_FG); 423 rb->lcd_set_drawmode (DRMODE_FG);
423 rb->lcd_set_foreground (LCD_WHITE); 424 rb->lcd_set_foreground (LCD_WHITE);