summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/recorder/boxes.c7
-rw-r--r--apps/recorder/sokoban.c16
2 files changed, 9 insertions, 14 deletions
diff --git a/apps/recorder/boxes.c b/apps/recorder/boxes.c
index 60fdef6f9b..9c38cd4e83 100644
--- a/apps/recorder/boxes.c
+++ b/apps/recorder/boxes.c
@@ -38,14 +38,11 @@
static void ss_loop(void)
{
int b;
- int x2 = LCD_WIDTH/2;
- int y2 = LCD_HEIGHT/2;
int x = LCD_WIDTH/2;
int y = LCD_HEIGHT/2;
int i = 0;
int center = 0;
int factor = 0;
- int offset = 0;
if (LCD_HEIGHT < LCD_WIDTH)
center = LCD_HEIGHT/2;
@@ -67,14 +64,12 @@ static void ss_loop(void)
i = center;
}
- offset=i*factor;
-
b = button_get(false);
if ( b & BUTTON_OFF )
return;
lcd_clear_display();
- lcd_drawrect(x-offset, y-offset, x2+offset, y2+offset);
+ lcd_drawrect(x-i, y-i, 2*i+1, 2*i+1);
lcd_update();
i+=factor;
diff --git a/apps/recorder/sokoban.c b/apps/recorder/sokoban.c
index 6ce19e6a41..6947180ec9 100644
--- a/apps/recorder/sokoban.c
+++ b/apps/recorder/sokoban.c
@@ -931,8 +931,8 @@ void update_screen(void) {
for (c=0 ; c<20 ; c++) {
switch ( board[b][c] ) {
case 0: /* this is a black space */
- lcd_drawrect (c*4, b*4, c*4+3, b*4+3);
- lcd_drawrect (c*4+1, b*4+1, c*4+2, b*4+2);
+ lcd_drawrect (c*4, b*4, 4, 4);
+ lcd_drawrect (c*4+1, b*4+1, 2, 2);
break;
case 2: /* this is a wall */
@@ -947,11 +947,11 @@ void update_screen(void) {
break;
case 3: /* this is a home location */
- lcd_drawrect (c*4+1, b*4+1, c*4+2, b*4+2);
+ lcd_drawrect (c*4+1, b*4+1, 2, 2);
break;
case 4: /* this is a box */
- lcd_drawrect (c*4, b*4, c*4+3, b*4+3);
+ lcd_drawrect (c*4, b*4, 4, 4);
break;
case 5: /* this is you */
@@ -963,8 +963,8 @@ void update_screen(void) {
break;
case 7: /* this is a box on a home spot */
- lcd_drawrect (c*4, b*4, c*4+3, b*4+3);
- lcd_drawrect (c*4+1, b*4+1, c*4+2, b*4+2);
+ lcd_drawrect (c*4, b*4, 4, 4);
+ lcd_drawrect (c*4+1, b*4+1, 2, 2);
break;
}
}
@@ -976,8 +976,8 @@ void update_screen(void) {
snprintf (s, sizeof(s), "%d", moves);
lcd_putsxy (86, 54, s, 0);
- lcd_drawrect (80,0,111,31);
- lcd_drawrect (80,32,111,63);
+ lcd_drawrect (80,0,32,32);
+ lcd_drawrect (80,32,32,64);
lcd_putsxy (81, 10, "Level", 0);
lcd_putsxy (81, 42, "Moves", 0);
/* print out the screen */