summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/sokoban.c433
1 files changed, 408 insertions, 25 deletions
diff --git a/apps/recorder/sokoban.c b/apps/recorder/sokoban.c
index ff3f13fe13..7e3ee0cdbb 100644
--- a/apps/recorder/sokoban.c
+++ b/apps/recorder/sokoban.c
@@ -31,7 +31,7 @@
31 31
32#define SOKOBAN_TITLE "Sokoban" 32#define SOKOBAN_TITLE "Sokoban"
33#define SOKOBAN_TITLE_FONT 2 33#define SOKOBAN_TITLE_FONT 2
34#define NUM_LEVELS 4 34#define NUM_LEVELS 25
35 35
36int board[16][20]; 36int board[16][20];
37int current_level=0; 37int current_level=0;
@@ -110,24 +110,374 @@ int levels[320*NUM_LEVELS] = {
1100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1130,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1130,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
114/* level 40 114/* level 05 */
1150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1190,0,0,0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,
1200,0,0,0,0,0,0,2,5,1,2,2,2,0,0,0,0,0,0,0,
1210,0,0,0,0,0,0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,1,3,2,2,2,2,3,2,2,0,0,0,0,
4630,0,0,0,0,2,1,4,3,4,1,4,1,5,2,0,0,0,0,0,
4640,0,0,0,0,2,1,1,3,1,1,1,1,2,2,0,0,0,0,0,
4650,0,0,0,0,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,
4660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
4670,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
4680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
4690,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
4700,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
471/* level 26 */
472
473/* level 27 */
474
475/* level 28 */
476
477/* level 29 */
478
479/* level 30 */
480
131}; 481};
132 482
133 483
@@ -137,6 +487,7 @@ void load_level(int level_to_load) {
137 int b = 0; 487 int b = 0;
138 int c = 0; 488 int c = 0;
139 489
490 boxes_to_go = 0;
140 /* load level into board */ 491 /* load level into board */
141 /* get to the current level in the level array */ 492 /* get to the current level in the level array */
142 a = level_to_load*320; 493 a = level_to_load*320;
@@ -238,11 +589,34 @@ void sokoban_loop(void) {
238 } 589 }
239 590
240 591
241 if ( b & BUTTON_F1 ) { 592 if ( b & BUTTON_F3 ) {
242 /* get out of here */ 593 /* increase level */
243 boxes_to_go=0; 594 boxes_to_go=0;
244 } 595 }
245 596
597 if ( b & BUTTON_F2 ) {
598 /* same level */
599 load_level(current_level);
600 lcd_clear_display();
601 update_screen();
602 moves=0;
603
604 }
605
606 if ( b & BUTTON_F1 ) {
607 /* previous level */
608 if (current_level==0) {
609 current_level=0;
610 }
611 else {
612 current_level--;
613 }
614 load_level(current_level);
615 lcd_clear_display();
616 update_screen();
617 moves=0;
618 }
619
246 if ( b & BUTTON_LEFT ) { 620 if ( b & BUTTON_LEFT ) {
247 /* if it is a blank spot */ 621 /* if it is a blank spot */
248 if (board[row][col-1]==1) { 622 if (board[row][col-1]==1) {
@@ -528,17 +902,18 @@ void sokoban_loop(void) {
528 update_screen(); 902 update_screen();
529 } 903 }
530 904
905
906
531 if (boxes_to_go==0) { 907 if (boxes_to_go==0) {
532 moves=0; 908 moves=0;
533 current_level++; 909 current_level++;
534 if (current_level == NUM_LEVELS) { 910 if (current_level == NUM_LEVELS) {
535 lcd_clear_display(); 911 for(ii=0; ii<30 ; ii++) {
536 lcd_putsxy(10, 20, "YOU WIN!!", 2); 912 lcd_clear_display();
537 913 lcd_putsxy(10, 20, "YOU WIN!!", 2);
538 lcd_update();
539 for (ii=0 ; ii<20 ; ii++) {
540 lcd_invertrect(0,0,111,63);
541 lcd_update(); 914 lcd_update();
915 lcd_invertrect(0,0,111,63);
916 lcd_update();*/
542 } 917 }
543 return; 918 return;
544 } 919 }
@@ -572,8 +947,16 @@ void sokoban(void)
572 lcd_clear_display(); 947 lcd_clear_display();
573 lcd_putsxy(LCD_WIDTH/2-len, (LCD_HEIGHT/2)-h, SOKOBAN_TITLE, 948 lcd_putsxy(LCD_WIDTH/2-len, (LCD_HEIGHT/2)-h, SOKOBAN_TITLE,
574 SOKOBAN_TITLE_FONT); 949 SOKOBAN_TITLE_FONT);
575 lcd_putsxy( 3,42, "[Off] to stop", 0); 950
576 lcd_putsxy( 3,52, "[F1] + level",0); 951 lcd_update();
952 sleep(HZ*2);
953
954 lcd_clear_display();
955
956 lcd_putsxy( 3,12, "[Off] to stop", 0);
957 lcd_putsxy( 3,22, "[F1] - level",0);
958 lcd_putsxy( 3,32, "[F2] same level",0);
959 lcd_putsxy( 3,42, "[F3] + level",0);
577 960
578 lcd_update(); 961 lcd_update();
579 sleep(HZ*2); 962 sleep(HZ*2);