Rockblox: Map touchscreen top-middle to rotate CW

- Add support for defining a secondary 'rotate CCW' action - could be needed by
  future touchscreen targets

- Update manual accordingly


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24895 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tomer Shalev 2010-02-24 21:16:48 +00:00
parent 321843198d
commit 83d589dad1
2 changed files with 13 additions and 9 deletions

View file

@ -249,6 +249,7 @@ PLUGIN_HEADER
#define ROCKBLOX_RESTART BUTTON_RC_MODE #define ROCKBLOX_RESTART BUTTON_RC_MODE
#elif CONFIG_KEYPAD == COWON_D2_PAD #elif CONFIG_KEYPAD == COWON_D2_PAD
#define ROCKBLOX_OFF BUTTON_POWER #define ROCKBLOX_OFF BUTTON_POWER
#define ROCKBLOX_RESTART BUTTON_MENU #define ROCKBLOX_RESTART BUTTON_MENU
@ -342,6 +343,7 @@ PLUGIN_HEADER
#define ROCKBLOX_ROTATE_CW2 BUTTON_BOTTOMRIGHT #define ROCKBLOX_ROTATE_CW2 BUTTON_BOTTOMRIGHT
#else #else
#define ROCKBLOX_ROTATE_CW BUTTON_BOTTOMRIGHT #define ROCKBLOX_ROTATE_CW BUTTON_BOTTOMRIGHT
#define ROCKBLOX_ROTATE_CW2 BUTTON_TOPMIDDLE
#endif #endif
#ifndef ROCKBLOX_DOWN #ifndef ROCKBLOX_DOWN
#define ROCKBLOX_DOWN BUTTON_BOTTOMMIDDLE #define ROCKBLOX_DOWN BUTTON_BOTTOMMIDDLE
@ -1371,6 +1373,10 @@ static int rockblox_loop (void)
/* if it's enabled, go ahead and rotate.. */ /* if it's enabled, go ahead and rotate.. */
if(wheel_enabled) if(wheel_enabled)
#endif
#ifdef ROCKBLOX_ROTATE_CCW2
/* fallback */
case ROCKBLOX_ROTATE_CCW2:
#endif #endif
move_block (0, 0, (rockblox_status.co + 1) % figures[rockblox_status.cf].max_or); move_block (0, 0, (rockblox_status.co + 1) % figures[rockblox_status.cf].max_or);
break; break;
@ -1382,18 +1388,16 @@ static int rockblox_loop (void)
wheel_events++; wheel_events++;
if(wheel_enabled) if(wheel_enabled)
#endif
#ifdef ROCKBLOX_ROTATE_CW2
/* fallback */
case ROCKBLOX_ROTATE_CW2:
#endif #endif
move_block (0, 0, move_block (0, 0,
(rockblox_status.co + figures[rockblox_status.cf].max_or - (rockblox_status.co + figures[rockblox_status.cf].max_or -
1) % figures[rockblox_status.cf].max_or); 1) % figures[rockblox_status.cf].max_or);
break; break;
#ifdef ROCKBLOX_ROTATE_CCW2
case ROCKBLOX_ROTATE_CCW2:
move_block (0, 0, (rockblox_status.co + 1) % figures[rockblox_status.cf].max_or);
break;
#endif
case ROCKBLOX_DOWN: case ROCKBLOX_DOWN:
case ROCKBLOX_DOWN | BUTTON_REPEAT: case ROCKBLOX_DOWN | BUTTON_REPEAT:
move_block (0, 1, rockblox_status.co); move_block (0, 1, rockblox_status.co);

View file

@ -61,7 +61,7 @@ the blocks fall faster. If the pile of blocks reaches the ceiling, the game is o
\opt{MROBE100_PAD}{\ButtonMenu} \opt{MROBE100_PAD}{\ButtonMenu}
\opt{COWON_D2_PAD}{\TouchBottomLeft} \opt{COWON_D2_PAD}{\TouchBottomLeft}
\opt{HAVEREMOTEKEYMAP}{& } \opt{HAVEREMOTEKEYMAP}{& }
& Rotate left\\ & Rotate CCW\\
\opt{PLAYER_PAD}{\ButtonPlay} \opt{PLAYER_PAD}{\ButtonPlay}
\opt{RECORDER_PAD,ONDIO_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD} \opt{RECORDER_PAD,ONDIO_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD}
{\ButtonUp} {\ButtonUp}
@ -71,9 +71,9 @@ the blocks fall faster. If the pile of blocks reaches the ceiling, the game is o
\opt{SANSA_C200_PAD}{\ButtonVolUp/\ButtonUp} \opt{SANSA_C200_PAD}{\ButtonVolUp/\ButtonUp}
\opt{GIGABEAT_PAD,GIGABEAT_S_PAD}{\ButtonVolDown} \opt{GIGABEAT_PAD,GIGABEAT_S_PAD}{\ButtonVolDown}
\opt{MROBE100_PAD}{\ButtonPlay} \opt{MROBE100_PAD}{\ButtonPlay}
\opt{COWON_D2_PAD}{\TouchBottomRight} \opt{COWON_D2_PAD}{\TouchBottomRight{} / \TouchTopMiddle }
\opt{HAVEREMOTEKEYMAP}{& } \opt{HAVEREMOTEKEYMAP}{& }
& Rotate right\\ & Rotate CW\\
\opt{PLAYER_PAD,RECORDER_PAD}{\ButtonOn} \opt{PLAYER_PAD,RECORDER_PAD}{\ButtonOn}
\opt{ONDIO_PAD}{\ButtonMenu} \opt{ONDIO_PAD}{\ButtonMenu}
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonMode} \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonMode}