aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rwxr-xr-xbackends/platform/gp2xwiz/build/bundle.sh1
-rwxr-xr-xbackends/platform/gp2xwiz/build/config-alleng.sh2
-rwxr-xr-xbackends/platform/gp2xwiz/build/config.sh2
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-events.cpp38
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-hw.cpp10
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-hw.h29
6 files changed, 48 insertions, 34 deletions
diff --git a/backends/platform/gp2xwiz/build/bundle.sh b/backends/platform/gp2xwiz/build/bundle.sh
index 1dcdb6389e..9c9947b909 100755
--- a/backends/platform/gp2xwiz/build/bundle.sh
+++ b/backends/platform/gp2xwiz/build/bundle.sh
@@ -22,6 +22,7 @@ cp ../../../../COPYING ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../COPYRIGHT ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../NEWS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../gui/themes/scummmodern.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../backends/vkeybd/vkeybd.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../dists/pred.dic ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data
cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins
diff --git a/backends/platform/gp2xwiz/build/config-alleng.sh b/backends/platform/gp2xwiz/build/config-alleng.sh
index 19ee308908..cfed463edf 100755
--- a/backends/platform/gp2xwiz/build/config-alleng.sh
+++ b/backends/platform/gp2xwiz/build/config-alleng.sh
@@ -17,6 +17,6 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-plugins --default-dynamic
+./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-vkeybd --enable-plugins --default-dynamic
echo Generating config for GP2X Wiz complete. Check for errors.
diff --git a/backends/platform/gp2xwiz/build/config.sh b/backends/platform/gp2xwiz/build/config.sh
index b6889fe3ac..27c1fbf0bf 100755
--- a/backends/platform/gp2xwiz/build/config.sh
+++ b/backends/platform/gp2xwiz/build/config.sh
@@ -17,6 +17,6 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-plugins --default-dynamic
+./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic
echo Generating config for GP2X Wiz complete. Check for errors.
diff --git a/backends/platform/gp2xwiz/gp2xwiz-events.cpp b/backends/platform/gp2xwiz/gp2xwiz-events.cpp
index ea1b191213..dfb36742dc 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-events.cpp
+++ b/backends/platform/gp2xwiz/gp2xwiz-events.cpp
@@ -30,7 +30,7 @@
#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-#include "backends/keymapper/keymapper.h"
+
#include "common/util.h"
#include "common/events.h"
@@ -41,6 +41,28 @@
#define JOY_XAXIS 0
#define JOY_YAXIS 1
+/* GP2X Wiz: Main Joystick Mappings */
+enum {
+ GP2X_BUTTON_UP = 0,
+ GP2X_BUTTON_UPLEFT = 1,
+ GP2X_BUTTON_LEFT = 2,
+ GP2X_BUTTON_DOWNLEFT = 3,
+ GP2X_BUTTON_DOWN = 4,
+ GP2X_BUTTON_DOWNRIGHT = 5,
+ GP2X_BUTTON_RIGHT = 6,
+ GP2X_BUTTON_UPRIGHT = 7,
+ GP2X_BUTTON_MENU = 8,
+ GP2X_BUTTON_SELECT = 9,
+ GP2X_BUTTON_L = 10,
+ GP2X_BUTTON_R = 11,
+ GP2X_BUTTON_A = 12,
+ GP2X_BUTTON_B = 13,
+ GP2X_BUTTON_X = 14,
+ GP2X_BUTTON_Y = 15,
+ GP2X_BUTTON_VOLUP = 16,
+ GP2X_BUTTON_VOLDOWN = 17
+};
+
static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) {
if (key >= SDLK_F1 && key <= SDLK_F9) {
return key - SDLK_F1 + Common::ASCII_F1;
@@ -173,8 +195,8 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
GP2X_BUTTON_Y Space Bar
GP2X_BUTTON_X Right Mouse Click
GP2X_BUTTON_L Combo Modifier (Left Trigger)
- GP2X_BUTTON_R F5 (Right Trigger)
- GP2X_BUTTON_MENU Return
+ GP2X_BUTTON_R Return (Right Trigger)
+ GP2X_BUTTON_MENU F5 (Game Menu)
GP2X_BUTTON_SELECT Escape
GP2X_BUTTON_VOLUP /dev/mixer Global Volume Up
GP2X_BUTTON_VOLDOWN /dev/mixer Global Volume Down
@@ -291,8 +313,13 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
break;
case GP2X_BUTTON_R:
if (GP2X_BUTTON_STATE_L == true) {
+#ifdef ENABLE_VKEYBD
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+#endif
} else {
event.kbd.keycode = Common::KEYCODE_RETURN;
event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
@@ -388,8 +415,13 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
break;
case GP2X_BUTTON_R:
if (GP2X_BUTTON_STATE_L == true) {
+#ifdef ENABLE_VKEYBD
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+#endif
} else {
event.kbd.keycode = Common::KEYCODE_RETURN;
event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
index c804b0d819..4d69915e27 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
+++ b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
@@ -42,6 +42,16 @@
namespace WIZ_HW {
+enum {
+ VOLUME_NOCHG = 0,
+ VOLUME_DOWN = 1,
+ VOLUME_UP = 2,
+ VOLUME_CHANGE_RATE = 8,
+ VOLUME_MIN = 0,
+ VOLUME_INITIAL = 70,
+ VOLUME_MAX = 100
+};
+
int volumeLevel = VOLUME_INITIAL;
void deviceInit() {
diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.h b/backends/platform/gp2xwiz/gp2xwiz-hw.h
index 577facc437..507841e902 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-hw.h
+++ b/backends/platform/gp2xwiz/gp2xwiz-hw.h
@@ -31,37 +31,8 @@
#ifndef GP2XWIZ_HW_H
#define GP2XWIZ_HW_H
-/* GP2X Wiz: Main Joystick Mappings */
-
-#define GP2X_BUTTON_UP (0)
-#define GP2X_BUTTON_UPLEFT (1)
-#define GP2X_BUTTON_LEFT (2)
-#define GP2X_BUTTON_DOWNLEFT (3)
-#define GP2X_BUTTON_DOWN (4)
-#define GP2X_BUTTON_DOWNRIGHT (5)
-#define GP2X_BUTTON_RIGHT (6)
-#define GP2X_BUTTON_UPRIGHT (7)
-#define GP2X_BUTTON_MENU (8)
-#define GP2X_BUTTON_SELECT (9)
-#define GP2X_BUTTON_L (10)
-#define GP2X_BUTTON_R (11)
-#define GP2X_BUTTON_A (12)
-#define GP2X_BUTTON_B (13)
-#define GP2X_BUTTON_X (14)
-#define GP2X_BUTTON_Y (15)
-#define GP2X_BUTTON_VOLUP (16)
-#define GP2X_BUTTON_VOLDOWN (17)
-
namespace WIZ_HW {
-#define VOLUME_MIN 0
-#define VOLUME_INITIAL 70 /* Default volume if you call mixerMoveVolume(0) without setting the global var. */
-#define VOLUME_MAX 100
-#define VOLUME_CHANGE_RATE 8
-#define VOLUME_NOCHG 0
-#define VOLUME_DOWN 1
-#define VOLUME_UP 2
-
extern int volumeLevel;
extern void deviceInit();