diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-10-16 01:27:08 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-10-16 01:27:08 +0000 |
commit | 1ea2027d63de7df49ab7fffd2e6085db58eaa3ce (patch) | |
tree | 964fb31d35445017b4f9f3f978b16a2ad4660443 | |
parent | 50d275dc373826335aca3373dfa51957ec8e2ba7 (diff) | |
download | rockbox-1ea2027d63de7df49ab7fffd2e6085db58eaa3ce.tar.gz rockbox-1ea2027d63de7df49ab7fffd2e6085db58eaa3ce.zip |
FlipIt: * Changed button assignments for X5 to a working layout. * Added missing help screens. * Some cleanup, fix yellow builds. * Disabled for iFP for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11232 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/SOURCES | 3 | ||||
-rw-r--r-- | apps/plugins/flipit.c | 54 |
2 files changed, 41 insertions, 16 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index e0c97d671d..dbad16ae2d 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -6,7 +6,6 @@ cube.c | |||
6 | dict.c | 6 | dict.c |
7 | favorites.c | 7 | favorites.c |
8 | firmware_flash.c | 8 | firmware_flash.c |
9 | flipit.c | ||
10 | logo.c | 9 | logo.c |
11 | metronome.c | 10 | metronome.c |
12 | mosaique.c | 11 | mosaique.c |
@@ -29,6 +28,8 @@ wavplay.c | |||
29 | 28 | ||
30 | #ifndef IRIVER_IFP7XX_SERIES /* Temporarily disable plugins for iFP7xx */ | 29 | #ifndef IRIVER_IFP7XX_SERIES /* Temporarily disable plugins for iFP7xx */ |
31 | dice.c | 30 | dice.c |
31 | flipit.c | ||
32 | |||
32 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ | 33 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ |
33 | disktidy.c | 34 | disktidy.c |
34 | text_editor.c | 35 | text_editor.c |
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 0ee10265af..1fd2fa35db 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
7 | * \/ \/ \/ \/ \/ | 7 | * \/ \/ \/ \/ \/ |
8 | * $Id: flipit.c,v 1.0 2003/01/18 23:51:47 | 8 | * $Id$ |
9 | * | 9 | * |
10 | * Copyright (C) 2002 Vicentini Martin | 10 | * Copyright (C) 2002 Vicentini Martin |
11 | * | 11 | * |
@@ -75,18 +75,19 @@ PLUGIN_HEADER | |||
75 | #define FLIPIT_TOGGLE_PRE BUTTON_SELECT | 75 | #define FLIPIT_TOGGLE_PRE BUTTON_SELECT |
76 | #define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL) | 76 | #define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL) |
77 | 77 | ||
78 | #elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) | 78 | #elif CONFIG_KEYPAD == IAUDIO_X5_PAD |
79 | 79 | ||
80 | #define FLIPIT_UP BUTTON_UP | 80 | #define FLIPIT_UP BUTTON_UP |
81 | #define FLIPIT_DOWN BUTTON_DOWN | 81 | #define FLIPIT_DOWN BUTTON_DOWN |
82 | #define FLIPIT_QUIT BUTTON_POWER | 82 | #define FLIPIT_QUIT BUTTON_POWER |
83 | #define FLIPIT_SHUFFLE (BUTTON_PLAY | BUTTON_LEFT) | 83 | #define FLIPIT_SHUFFLE BUTTON_REC |
84 | #define FLIPIT_SOLVE (BUTTON_PLAY | BUTTON_RIGHT) | 84 | #define FLIPIT_SOLVE_PRE BUTTON_PLAY |
85 | #define FLIPIT_STEP_BY_STEP (BUTTON_PLAY | BUTTON_UP) | 85 | #define FLIPIT_SOLVE (BUTTON_PLAY | BUTTON_REPEAT) |
86 | #define FLIPIT_TOGGLE_PRE BUTTON_SELECT | 86 | #define FLIPIT_STEP_PRE BUTTON_PLAY |
87 | #define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL) | 87 | #define FLIPIT_STEP_BY_STEP (BUTTON_PLAY | BUTTON_REL) |
88 | #define FLIPIT_TOGGLE BUTTON_SELECT | ||
88 | 89 | ||
89 | #elif (CONFIG_KEYPAD == GIGABEAT_PAD) | 90 | #elif CONFIG_KEYPAD == GIGABEAT_PAD |
90 | 91 | ||
91 | #define FLIPIT_UP BUTTON_UP | 92 | #define FLIPIT_UP BUTTON_UP |
92 | #define FLIPIT_DOWN BUTTON_DOWN | 93 | #define FLIPIT_DOWN BUTTON_DOWN |
@@ -94,10 +95,9 @@ PLUGIN_HEADER | |||
94 | #define FLIPIT_SHUFFLE (BUTTON_POWER | BUTTON_LEFT) | 95 | #define FLIPIT_SHUFFLE (BUTTON_POWER | BUTTON_LEFT) |
95 | #define FLIPIT_SOLVE (BUTTON_POWER | BUTTON_RIGHT) | 96 | #define FLIPIT_SOLVE (BUTTON_POWER | BUTTON_RIGHT) |
96 | #define FLIPIT_STEP_BY_STEP (BUTTON_POWER | BUTTON_UP) | 97 | #define FLIPIT_STEP_BY_STEP (BUTTON_POWER | BUTTON_UP) |
97 | #define FLIPIT_TOGGLE_PRE BUTTON_MENU | 98 | #define FLIPIT_TOGGLE BUTTON_MENU |
98 | #define FLIPIT_TOGGLE (BUTTON_MENU | BUTTON_REL) | ||
99 | 99 | ||
100 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) | 100 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD |
101 | 101 | ||
102 | #define FLIPIT_UP BUTTON_SCROLL_UP | 102 | #define FLIPIT_UP BUTTON_SCROLL_UP |
103 | #define FLIPIT_DOWN BUTTON_SCROLL_DOWN | 103 | #define FLIPIT_DOWN BUTTON_SCROLL_DOWN |
@@ -361,6 +361,10 @@ static bool flipit_loop(void) | |||
361 | break; | 361 | break; |
362 | 362 | ||
363 | case FLIPIT_SOLVE: | 363 | case FLIPIT_SOLVE: |
364 | #ifdef FLIPIT_SOLVE_PRE | ||
365 | if (lastbutton != FLIPIT_SOLVE_PRE) | ||
366 | break; | ||
367 | #endif | ||
364 | /* solve the puzzle */ | 368 | /* solve the puzzle */ |
365 | if (!flipit_finished()) { | 369 | if (!flipit_finished()) { |
366 | for (i=0; i<20; i++) | 370 | for (i=0; i<20; i++) |
@@ -378,6 +382,10 @@ static bool flipit_loop(void) | |||
378 | break; | 382 | break; |
379 | 383 | ||
380 | case FLIPIT_STEP_BY_STEP: | 384 | case FLIPIT_STEP_BY_STEP: |
385 | #ifdef FLIPIT_STEP_PRE | ||
386 | if (lastbutton != FLIPIT_STEP_PRE) | ||
387 | break; | ||
388 | #endif | ||
381 | if (!flipit_finished()) { | 389 | if (!flipit_finished()) { |
382 | for (i=0; i<20; i++) | 390 | for (i=0; i<20; i++) |
383 | if (!toggle[i]) { | 391 | if (!toggle[i]) { |
@@ -442,9 +450,6 @@ static bool flipit_loop(void) | |||
442 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | 450 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) |
443 | { | 451 | { |
444 | int i, rc; | 452 | int i, rc; |
445 | #ifdef HAVE_LCD_BITMAP | ||
446 | int w, h; | ||
447 | #endif | ||
448 | 453 | ||
449 | (void)parameter; | 454 | (void)parameter; |
450 | rb = api; | 455 | rb = api; |
@@ -471,7 +476,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
471 | rb->lcd_putsxy(2, 28, "[M-LEFT] shuffle"); | 476 | rb->lcd_putsxy(2, 28, "[M-LEFT] shuffle"); |
472 | rb->lcd_putsxy(2, 38, "[M-UP] solution"); | 477 | rb->lcd_putsxy(2, 38, "[M-UP] solution"); |
473 | rb->lcd_putsxy(2, 48, "[M-RIGHT] step by step"); | 478 | rb->lcd_putsxy(2, 48, "[M-RIGHT] step by step"); |
474 | #elif CONFIG_KEYPAD == IRIVER_H100_PAD | 479 | #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ |
480 | (CONFIG_KEYPAD == IRIVER_H300_PAD) | ||
475 | rb->lcd_putsxy(2, 8, "[STOP] to stop"); | 481 | rb->lcd_putsxy(2, 8, "[STOP] to stop"); |
476 | rb->lcd_putsxy(2, 18, "[SELECT] toggle"); | 482 | rb->lcd_putsxy(2, 18, "[SELECT] toggle"); |
477 | rb->lcd_putsxy(2, 28, "[MODE] shuffle"); | 483 | rb->lcd_putsxy(2, 28, "[MODE] shuffle"); |
@@ -484,6 +490,24 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
484 | rb->lcd_putsxy(2, 28, "[S-LEFT] shuffle"); | 490 | rb->lcd_putsxy(2, 28, "[S-LEFT] shuffle"); |
485 | rb->lcd_putsxy(2, 38, "[S-PLAY] solution"); | 491 | rb->lcd_putsxy(2, 38, "[S-PLAY] solution"); |
486 | rb->lcd_putsxy(2, 48, "[S-RIGHT] step by step"); | 492 | rb->lcd_putsxy(2, 48, "[S-RIGHT] step by step"); |
493 | #elif CONFIG_KEYPAD == IAUDIO_X5_PAD | ||
494 | rb->lcd_putsxy(2, 8, "[POWER] to stop"); | ||
495 | rb->lcd_putsxy(2, 18, "[SELECT] toggle"); | ||
496 | rb->lcd_putsxy(2, 28, "[REC] shuffle"); | ||
497 | rb->lcd_putsxy(2, 38, "[PLAY..] solution"); | ||
498 | rb->lcd_putsxy(2, 48, "[PLAY] step by step"); | ||
499 | #elif CONFIG_KEYPAD == GIGABEAT_PAD | ||
500 | rb->lcd_putsxy(2, 8, "[A] to stop"); | ||
501 | rb->lcd_putsxy(2, 18, "[MENU] toggle"); | ||
502 | rb->lcd_putsxy(2, 28, "[P-LEFT] shuffle"); | ||
503 | rb->lcd_putsxy(2, 38, "[P-RIGHT] solution"); | ||
504 | rb->lcd_putsxy(2, 48, "[P-UP] step by step"); | ||
505 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD | ||
506 | rb->lcd_putsxy(2, 8, "[POWER] to stop"); | ||
507 | rb->lcd_putsxy(2, 18, "[REW] toggle"); | ||
508 | rb->lcd_putsxy(2, 28, "[PL-LEFT] shuffle"); | ||
509 | rb->lcd_putsxy(2, 38, "[PL-RIGHT] solution"); | ||
510 | rb->lcd_putsxy(2, 48, "[PL-UP] step by step"); | ||
487 | #endif | 511 | #endif |
488 | rb->lcd_update(); | 512 | rb->lcd_update(); |
489 | #else /* HAVE_LCD_CHARCELLS */ | 513 | #else /* HAVE_LCD_CHARCELLS */ |