summaryrefslogtreecommitdiff
path: root/apps/plugins/sudoku/sudoku.h
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-08 09:47:40 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-11 16:37:17 -0400
commit2a471e288c16b91a7186a60b3fb84dd55a494c7a (patch)
tree3e746212c5fa69b59f61d19b6e29d11aa8a5e31b /apps/plugins/sudoku/sudoku.h
parent5efaa9ef8073bb216e3dcdbb4476f2fa7c672b76 (diff)
downloadrockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.tar.gz
rockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.zip
New port: AIGO EROS Q / EROS K
The Q and K have a slightly different case, but the hardware under the shell is completely identical. These models are rebadged versions: * Hifiwalker H2 (== Q) * AGPTek H3 (== K) * Surfans F20 (== K) Other notes: * Significant improvements in the shared Hiby-platform launcher/loader * SD card can theoretically be hot-swapped now * Support external USB mass storage! * Some consolidation of Hiby-platform targets * Some consolidation of plugin keymaps Todo/known issues: * Keymaps need to be gone over properly * Convert to HAVE_SCROLLWHEEL? Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
Diffstat (limited to 'apps/plugins/sudoku/sudoku.h')
-rw-r--r--apps/plugins/sudoku/sudoku.h37
1 files changed, 11 insertions, 26 deletions
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index 749087260d..36f47a377a 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -404,21 +404,7 @@
404#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) 404#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
405#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_PWRALT) 405#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_PWRALT)
406 406
407#elif CONFIG_KEYPAD == XDUOO_X3II_PAD 407#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
408#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
409#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
410#define SUDOKU_BUTTON_UP BUTTON_HOME
411#define SUDOKU_BUTTON_DOWN BUTTON_OPTION
412#define SUDOKU_BUTTON_LEFT BUTTON_PREV
413#define SUDOKU_BUTTON_RIGHT BUTTON_NEXT
414#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN
415#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP
416#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_PLAY
417#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER
418#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
419#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
420
421#elif CONFIG_KEYPAD == XDUOO_X20_PAD
422#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER 408#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
423#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) 409#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
424#define SUDOKU_BUTTON_UP BUTTON_HOME 410#define SUDOKU_BUTTON_UP BUTTON_HOME
@@ -446,7 +432,7 @@
446#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) 432#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
447#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER) 433#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
448 434
449#elif CONFIG_KEYPAD == IHIFI_770_PAD 435#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
450#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER 436#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
451#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) 437#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
452#define SUDOKU_BUTTON_UP BUTTON_PREV 438#define SUDOKU_BUTTON_UP BUTTON_PREV
@@ -460,19 +446,18 @@
460#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) 446#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
461#define SUDOKU_BUTTON_POSSIBLE (BUTTON_POWER | BUTTON_HOME) 447#define SUDOKU_BUTTON_POSSIBLE (BUTTON_POWER | BUTTON_HOME)
462 448
463#elif CONFIG_KEYPAD == IHIFI_800_PAD 449#elif CONFIG_KEYPAD == EROSQ_PAD
464#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER 450#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
465#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) 451#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
466#define SUDOKU_BUTTON_UP BUTTON_PREV 452#define SUDOKU_BUTTON_UP BUTTON_PREV
467#define SUDOKU_BUTTON_DOWN BUTTON_NEXT 453#define SUDOKU_BUTTON_DOWN BUTTON_NEXT
468#define SUDOKU_BUTTON_LEFT BUTTON_HOME 454#define SUDOKU_BUTTON_LEFT BUTTON_SCROLL_BACK
469#define SUDOKU_BUTTON_RIGHT BUTTON_VOL_DOWN 455#define SUDOKU_BUTTON_RIGHT BUTTON_SCROLL_FWD
470#define SUDOKU_BUTTON_TOGGLEBACK (BUTTON_POWER | BUTTON_VOL_DOWN) 456#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN
471#define SUDOKU_BUTTON_TOGGLE (BUTTON_POWER | BUTTON_VOL_UP) 457#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP
472#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_PLAY 458#define SUDOKU_BUTTON_MENU_PRE BUTTON_MENU
473#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER 459#define SUDOKU_BUTTON_MENU (BUTTON_MENU | BUTTON_REL)
474#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) 460#define SUDOKU_BUTTON_POSSIBLE BUTTON_BACK
475#define SUDOKU_BUTTON_POSSIBLE (BUTTON_POWER | BUTTON_HOME)
476 461
477#else 462#else
478#error No keymap defined! 463#error No keymap defined!
@@ -512,7 +497,7 @@ struct sudoku_state_t {
512 char savedboard[9][9]; /* Cached copy of saved state */ 497 char savedboard[9][9]; /* Cached copy of saved state */
513 int x,y; /* Cursor position */ 498 int x,y; /* Cursor position */
514 int editmode; /* We are editing the start board */ 499 int editmode; /* We are editing the start board */
515#ifdef SUDOKU_BUTTON_POSSIBLE 500#ifdef SUDOKU_BUTTON_POSSIBLE
516 short possiblevals[9][9]; /* possible values a cell could be, user sets them */ 501 short possiblevals[9][9]; /* possible values a cell could be, user sets them */
517 short savedpossible[9][9]; /* cached copy of possible cell values */ 502 short savedpossible[9][9]; /* cached copy of possible cell values */
518#endif 503#endif