diff options
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/blank.c | 16 | ||||
-rw-r--r-- | apps/recorder/bounce.c | 5 | ||||
-rw-r--r-- | apps/recorder/boxes.c | 5 | ||||
-rw-r--r-- | apps/recorder/boxes.h | 4 | ||||
-rw-r--r-- | apps/recorder/sokoban.c | 5 | ||||
-rw-r--r-- | apps/recorder/sokoban.h | 4 | ||||
-rw-r--r-- | apps/recorder/tetris.c | 5 |
7 files changed, 31 insertions, 13 deletions
diff --git a/apps/recorder/blank.c b/apps/recorder/blank.c index 835420f63b..2c59ec66bc 100644 --- a/apps/recorder/blank.c +++ b/apps/recorder/blank.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "button.h" | 25 | #include "button.h" |
26 | #include "kernel.h" | 26 | #include "kernel.h" |
27 | #include "menu.h" | ||
27 | 28 | ||
28 | #ifdef SIMULATOR | 29 | #ifdef SIMULATOR |
29 | #include <stdio.h> | 30 | #include <stdio.h> |
@@ -33,7 +34,7 @@ | |||
33 | #define SS_TITLE "Blank" | 34 | #define SS_TITLE "Blank" |
34 | #define SS_TITLE_FONT 2 | 35 | #define SS_TITLE_FONT 2 |
35 | 36 | ||
36 | void blank(void) | 37 | Menu blank(void) |
37 | { | 38 | { |
38 | int w, h; | 39 | int w, h; |
39 | char *off = "[Off] to stop"; | 40 | char *off = "[Off] to stop"; |
@@ -76,15 +77,16 @@ void blank(void) | |||
76 | lcd_update(); | 77 | lcd_update(); |
77 | sleep(HZ); | 78 | sleep(HZ); |
78 | 79 | ||
79 | lcd_clear_display(); | 80 | lcd_clear_display(); |
80 | lcd_update(); | 81 | lcd_update(); |
81 | 82 | ||
82 | while(1) { | 83 | while(1) { |
83 | if(button_get(false)) | 84 | if(button_get(false)) |
84 | return; | 85 | return MENU_OK; |
85 | sleep(HZ/10); | 86 | sleep(HZ/10); |
86 | } | 87 | } |
87 | 88 | ||
89 | return MENU_OK; | ||
88 | } | 90 | } |
89 | 91 | ||
90 | #endif | 92 | #endif |
diff --git a/apps/recorder/bounce.c b/apps/recorder/bounce.c index 6b500964f0..cb080a0d00 100644 --- a/apps/recorder/bounce.c +++ b/apps/recorder/bounce.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "button.h" | 25 | #include "button.h" |
26 | #include "kernel.h" | 26 | #include "kernel.h" |
27 | #include "menu.h" | ||
27 | 28 | ||
28 | #ifdef SIMULATOR | 29 | #ifdef SIMULATOR |
29 | #include <stdio.h> | 30 | #include <stdio.h> |
@@ -83,7 +84,7 @@ static void loopit(void) | |||
83 | } | 84 | } |
84 | 85 | ||
85 | 86 | ||
86 | void bounce(void) | 87 | Menu bounce(void) |
87 | { | 88 | { |
88 | int w, h; | 89 | int w, h; |
89 | char *off = "[Off] to stop"; | 90 | char *off = "[Off] to stop"; |
@@ -126,6 +127,8 @@ void bounce(void) | |||
126 | lcd_update(); | 127 | lcd_update(); |
127 | sleep(HZ); | 128 | sleep(HZ); |
128 | loopit(); | 129 | loopit(); |
130 | |||
131 | return MENU_OK; | ||
129 | } | 132 | } |
130 | 133 | ||
131 | #endif | 134 | #endif |
diff --git a/apps/recorder/boxes.c b/apps/recorder/boxes.c index 6b6d0065c9..60fdef6f9b 100644 --- a/apps/recorder/boxes.c +++ b/apps/recorder/boxes.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "lcd.h" | 25 | #include "lcd.h" |
26 | #include "button.h" | 26 | #include "button.h" |
27 | #include "kernel.h" | 27 | #include "kernel.h" |
28 | #include "menu.h" | ||
28 | 29 | ||
29 | #ifdef SIMULATOR | 30 | #ifdef SIMULATOR |
30 | #include <stdio.h> | 31 | #include <stdio.h> |
@@ -82,7 +83,7 @@ static void ss_loop(void) | |||
82 | } | 83 | } |
83 | } | 84 | } |
84 | 85 | ||
85 | void boxes(void) | 86 | Menu boxes(void) |
86 | { | 87 | { |
87 | int w, h; | 88 | int w, h; |
88 | char *off = "[Off] to stop"; | 89 | char *off = "[Off] to stop"; |
@@ -125,6 +126,8 @@ void boxes(void) | |||
125 | lcd_update(); | 126 | lcd_update(); |
126 | sleep(HZ/2); | 127 | sleep(HZ/2); |
127 | ss_loop(); | 128 | ss_loop(); |
129 | |||
130 | return MENU_OK; | ||
128 | } | 131 | } |
129 | 132 | ||
130 | #endif | 133 | #endif |
diff --git a/apps/recorder/boxes.h b/apps/recorder/boxes.h index bf3e095a65..2defb0bbfc 100644 --- a/apps/recorder/boxes.h +++ b/apps/recorder/boxes.h | |||
@@ -20,7 +20,9 @@ | |||
20 | #ifndef __BOXES_H__ | 20 | #ifndef __BOXES_H__ |
21 | #define __BOXES_H__ | 21 | #define __BOXES_H__ |
22 | 22 | ||
23 | void boxes(void); | 23 | #include "menu.h" |
24 | |||
25 | Menu boxes(void); | ||
24 | 26 | ||
25 | #endif /* __BOXES_H__ */ | 27 | #endif /* __BOXES_H__ */ |
26 | 28 | ||
diff --git a/apps/recorder/sokoban.c b/apps/recorder/sokoban.c index 2795d745e6..6ce19e6a41 100644 --- a/apps/recorder/sokoban.c +++ b/apps/recorder/sokoban.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "lcd.h" | 23 | #include "lcd.h" |
24 | #include "button.h" | 24 | #include "button.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "menu.h" | ||
26 | 27 | ||
27 | #ifdef SIMULATOR | 28 | #ifdef SIMULATOR |
28 | #include <stdio.h> | 29 | #include <stdio.h> |
@@ -1334,7 +1335,7 @@ void sokoban_loop(void) { | |||
1334 | } | 1335 | } |
1335 | 1336 | ||
1336 | 1337 | ||
1337 | void sokoban(void) | 1338 | Menu sokoban(void) |
1338 | { | 1339 | { |
1339 | int w, h; | 1340 | int w, h; |
1340 | int len = strlen(SOKOBAN_TITLE); | 1341 | int len = strlen(SOKOBAN_TITLE); |
@@ -1371,4 +1372,6 @@ void sokoban(void) | |||
1371 | sleep(HZ*2); | 1372 | sleep(HZ*2); |
1372 | lcd_clear_display(); | 1373 | lcd_clear_display(); |
1373 | sokoban_loop(); | 1374 | sokoban_loop(); |
1375 | |||
1376 | return MENU_OK; | ||
1374 | } | 1377 | } |
diff --git a/apps/recorder/sokoban.h b/apps/recorder/sokoban.h index 8e6c54c43e..ee1398c011 100644 --- a/apps/recorder/sokoban.h +++ b/apps/recorder/sokoban.h | |||
@@ -20,10 +20,12 @@ | |||
20 | #ifndef __SOKOBAN__ | 20 | #ifndef __SOKOBAN__ |
21 | #define __SOKOBAN__ | 21 | #define __SOKOBAN__ |
22 | 22 | ||
23 | #include "menu.h" | ||
24 | |||
23 | void load_level(int); | 25 | void load_level(int); |
24 | void update_screen(void); | 26 | void update_screen(void); |
25 | void sokoban_loop(void); | 27 | void sokoban_loop(void); |
26 | void sokoban(void); | 28 | Menu sokoban(void); |
27 | 29 | ||
28 | #endif /*__SOKOBAN__ */ | 30 | #endif /*__SOKOBAN__ */ |
29 | 31 | ||
diff --git a/apps/recorder/tetris.c b/apps/recorder/tetris.c index 76d1940889..910374920f 100644 --- a/apps/recorder/tetris.c +++ b/apps/recorder/tetris.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "button.h" | 27 | #include "button.h" |
28 | #include "kernel.h" | 28 | #include "kernel.h" |
29 | #include <string.h> | 29 | #include <string.h> |
30 | #include "menu.h" | ||
30 | 31 | ||
31 | #ifdef SIMULATOR | 32 | #ifdef SIMULATOR |
32 | #include <stdio.h> | 33 | #include <stdio.h> |
@@ -388,7 +389,7 @@ void init_tetris(void) | |||
388 | next_f = 0; | 389 | next_f = 0; |
389 | } | 390 | } |
390 | 391 | ||
391 | void tetris(void) | 392 | Menu tetris(void) |
392 | { | 393 | { |
393 | init_tetris(); | 394 | init_tetris(); |
394 | 395 | ||
@@ -400,6 +401,8 @@ void tetris(void) | |||
400 | next_f = t_rand(block_frames[next_b]); | 401 | next_f = t_rand(block_frames[next_b]); |
401 | new_block(); | 402 | new_block(); |
402 | game_loop(); | 403 | game_loop(); |
404 | |||
405 | return MENU_OK; | ||
403 | } | 406 | } |
404 | 407 | ||
405 | #endif | 408 | #endif |