diff options
Diffstat (limited to 'apps/recorder/sokoban.c')
-rw-r--r-- | apps/recorder/sokoban.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/apps/recorder/sokoban.c b/apps/recorder/sokoban.c index 3e5d447ae9..68961f775d 100644 --- a/apps/recorder/sokoban.c +++ b/apps/recorder/sokoban.c | |||
@@ -1846,14 +1846,14 @@ static void update_screen(void) { | |||
1846 | 1846 | ||
1847 | 1847 | ||
1848 | snprintf (s, sizeof(s), "%d", current_level+1); | 1848 | snprintf (s, sizeof(s), "%d", current_level+1); |
1849 | lcd_putsxy (86, 22, s, 0); | 1849 | lcd_putsxy (86, 22, s); |
1850 | snprintf (s, sizeof(s), "%d", moves); | 1850 | snprintf (s, sizeof(s), "%d", moves); |
1851 | lcd_putsxy (86, 54, s, 0); | 1851 | lcd_putsxy (86, 54, s); |
1852 | 1852 | ||
1853 | lcd_drawrect (80,0,32,32); | 1853 | lcd_drawrect (80,0,32,32); |
1854 | lcd_drawrect (80,32,32,64); | 1854 | lcd_drawrect (80,32,32,64); |
1855 | lcd_putsxy (81, 10, str(LANG_SOKOBAN_LEVEL), 0); | 1855 | lcd_putsxy (81, 10, str(LANG_SOKOBAN_LEVEL)); |
1856 | lcd_putsxy (81, 42, str(LANG_SOKOBAN_MOVE), 0); | 1856 | lcd_putsxy (81, 42, str(LANG_SOKOBAN_MOVE)); |
1857 | /* print out the screen */ | 1857 | /* print out the screen */ |
1858 | lcd_update(); | 1858 | lcd_update(); |
1859 | } | 1859 | } |
@@ -2197,7 +2197,7 @@ static bool sokoban_loop(void) | |||
2197 | if (current_level == NUM_LEVELS) { | 2197 | if (current_level == NUM_LEVELS) { |
2198 | for(ii=0; ii<30 ; ii++) { | 2198 | for(ii=0; ii<30 ; ii++) { |
2199 | lcd_clear_display(); | 2199 | lcd_clear_display(); |
2200 | lcd_putsxy(10, 20, str(LANG_SOKOBAN_WIN), 2); | 2200 | lcd_putsxy(10, 20, str(LANG_SOKOBAN_WIN)); |
2201 | lcd_update(); | 2201 | lcd_update(); |
2202 | lcd_invertrect(0,0,111,63); | 2202 | lcd_invertrect(0,0,111,63); |
2203 | lcd_update(); | 2203 | lcd_update(); |
@@ -2220,12 +2220,12 @@ bool sokoban(void) | |||
2220 | { | 2220 | { |
2221 | bool result; | 2221 | bool result; |
2222 | int w, h; | 2222 | int w, h; |
2223 | int len = strlen(SOKOBAN_TITLE); | 2223 | int len; |
2224 | 2224 | ||
2225 | lcd_getfontsize(SOKOBAN_TITLE_FONT, &w, &h); | 2225 | lcd_getstringsize(SOKOBAN_TITLE, &w, &h); |
2226 | 2226 | ||
2227 | /* Get horizontel centering for text */ | 2227 | /* Get horizontel centering for text */ |
2228 | len *= w; | 2228 | len = w; |
2229 | if (len%2 != 0) | 2229 | if (len%2 != 0) |
2230 | len = ((len+1)/2)+(w/2); | 2230 | len = ((len+1)/2)+(w/2); |
2231 | else | 2231 | else |
@@ -2237,18 +2237,17 @@ bool sokoban(void) | |||
2237 | h /= 2; | 2237 | h /= 2; |
2238 | 2238 | ||
2239 | lcd_clear_display(); | 2239 | lcd_clear_display(); |
2240 | lcd_putsxy(LCD_WIDTH/2-len, (LCD_HEIGHT/2)-h, SOKOBAN_TITLE, | 2240 | lcd_putsxy(LCD_WIDTH/2-len, (LCD_HEIGHT/2)-h, SOKOBAN_TITLE); |
2241 | SOKOBAN_TITLE_FONT); | ||
2242 | 2241 | ||
2243 | lcd_update(); | 2242 | lcd_update(); |
2244 | sleep(HZ*2); | 2243 | sleep(HZ*2); |
2245 | 2244 | ||
2246 | lcd_clear_display(); | 2245 | lcd_clear_display(); |
2247 | 2246 | ||
2248 | lcd_putsxy( 3,12, str(LANG_SOKOBAN_QUIT), 0); | 2247 | lcd_putsxy( 3,12, str(LANG_SOKOBAN_QUIT)); |
2249 | lcd_putsxy( 3,22, str(LANG_SOKOBAN_F1),0); | 2248 | lcd_putsxy( 3,22, str(LANG_SOKOBAN_F1)); |
2250 | lcd_putsxy( 3,32, str(LANG_SOKOBAN_F2),0); | 2249 | lcd_putsxy( 3,32, str(LANG_SOKOBAN_F2)); |
2251 | lcd_putsxy( 3,42, str(LANG_SOKOBAN_F3),0); | 2250 | lcd_putsxy( 3,42, str(LANG_SOKOBAN_F3)); |
2252 | 2251 | ||
2253 | lcd_update(); | 2252 | lcd_update(); |
2254 | sleep(HZ*2); | 2253 | sleep(HZ*2); |