aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMatthew Hoops2011-04-13 16:04:29 -0400
committerMatthew Hoops2011-04-13 16:04:29 -0400
commit6d153f311c65fe414e31e99f8a9a6503c49a01a5 (patch)
tree9173f9964c0fec4215514e622f705810730d0ce9 /backends
parent47c2a9adbe8d9e6640a819386f0f34e929937672 (diff)
parent66b43f2312578f35e0718d0699de207a7bf77f1a (diff)
downloadscummvm-rg350-6d153f311c65fe414e31e99f8a9a6503c49a01a5.tar.gz
scummvm-rg350-6d153f311c65fe414e31e99f8a9a6503c49a01a5.tar.bz2
scummvm-rg350-6d153f311c65fe414e31e99f8a9a6503c49a01a5.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: video/qt_decoder.cpp
Diffstat (limited to 'backends')
-rw-r--r--backends/events/gp2xsdl/gp2xsdl-events.cpp11
-rw-r--r--backends/events/gp2xsdl/gp2xsdl-events.h3
-rw-r--r--backends/events/gph/gph-events.cpp42
-rw-r--r--backends/events/openpandora/op-events.h2
-rw-r--r--backends/events/webossdl/webossdl-events.cpp241
-rw-r--r--backends/events/webossdl/webossdl-events.h44
-rw-r--r--backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp5
-rw-r--r--backends/graphics/gph/gph-graphics.cpp2
-rw-r--r--backends/module.mk1
-rw-r--r--backends/platform/android/android.mk24
-rw-r--r--backends/platform/gp2x/build/README-GP2X54
-rwxr-xr-xbackends/platform/gp2x/build/bundle.sh10
-rw-r--r--backends/platform/gp2x/gp2x-common.h15
-rw-r--r--backends/platform/gp2x/gp2x-main.cpp10
-rw-r--r--backends/platform/gp2x/gp2x.cpp8
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-build.sh (renamed from backends/platform/gph/caanoo/build.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-bundle-debug.sh (renamed from backends/platform/gph/caanoo/bundle-debug.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-bundle.sh (renamed from backends/platform/gph/caanoo/bundle.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-config-alleng.sh (renamed from backends/platform/gph/caanoo/config-alleng.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-config.sh (renamed from backends/platform/gph/caanoo/config.sh)0
-rwxr-xr-xbackends/platform/gph/build/clean.sh2
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2x-build.sh (renamed from backends/platform/gp2x/build/build.sh)0
-rw-r--r--backends/platform/gph/build/gp2x-bundle.sh19
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2x-config-alleng.sh (renamed from backends/platform/gp2x/build/config-alleng.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2x-config.sh (renamed from backends/platform/gp2x/build/config.sh)2
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-build.sh (renamed from backends/platform/gph/build/build.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-bundle-debug.sh (renamed from backends/platform/gph/build/bundle-debug.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-bundle.sh (renamed from backends/platform/gph/build/bundle.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-config-alleng.sh (renamed from backends/platform/gph/build/config-alleng.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-config.sh (renamed from backends/platform/gph/build/config.sh)0
-rw-r--r--backends/platform/gph/build/scummvm.pngbin2656 -> 0 bytes
-rwxr-xr-xbackends/platform/gph/caanoo-bundle.mk20
-rwxr-xr-xbackends/platform/gph/caanoo/clean.sh8
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/caanoo/scummvm-gdb.gpe (renamed from backends/platform/gph/build/scummvm-gdb.gpe)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/caanoo/scummvm.gpe (renamed from backends/platform/gph/caanoo/scummvm.gpe)0
-rw-r--r--backends/platform/gph/devices/common/README-GPH (renamed from backends/platform/gph/build/README-GPH)4
-rw-r--r--backends/platform/gph/devices/common/scummvm.ini (renamed from backends/platform/gph/build/scummvm.ini)0
-rw-r--r--backends/platform/gph/devices/common/scummvm.png (renamed from backends/platform/gp2x/build/scummvm.png)bin2656 -> 2656 bytes
-rw-r--r--backends/platform/gph/devices/common/scummvmb.png (renamed from backends/platform/gph/build/scummvmb.png)bin34274 -> 34274 bytes
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/Makefile (renamed from backends/platform/gp2x/mmuhack/Makefile)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.h (renamed from backends/platform/gp2x/mmuhack/flush_uppermem_cache.h)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.s (renamed from backends/platform/gp2x/mmuhack/flush_uppermem_cache.s)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/mmuhack.c (renamed from backends/platform/gp2x/mmuhack/mmuhack.c)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o (renamed from backends/platform/gp2x/build/mmuhack.o)bin1720 -> 1720 bytes
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/readme.txt (renamed from backends/platform/gp2x/mmuhack/readme.txt)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/gp2x/scummvm.gpe (renamed from backends/platform/gp2x/build/scummvm.gpe)4
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe (renamed from backends/platform/gph/caanoo/scummvm-gdb.gpe)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/gp2xwiz/scummvm.gpe (renamed from backends/platform/gph/build/scummvm.gpe)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/gp2x-bundle.mk (renamed from backends/platform/gp2x/gp2x-bundle.mk)23
-rwxr-xr-xbackends/platform/gph/gp2xwiz-bundle.mk21
-rw-r--r--backends/platform/gph/gph-main.cpp2
-rw-r--r--backends/platform/gph/gph-sdl.h2
-rw-r--r--backends/platform/sdl/posix/posix-main.cpp2
-rw-r--r--backends/platform/sdl/sdl.cpp5
-rw-r--r--backends/platform/webos/main.cpp53
-rw-r--r--backends/platform/webos/module.mk10
-rw-r--r--backends/platform/webos/webos.cpp73
-rw-r--r--backends/platform/webos/webos.h40
-rw-r--r--backends/platform/webos/webos.mk23
59 files changed, 630 insertions, 155 deletions
diff --git a/backends/events/gp2xsdl/gp2xsdl-events.cpp b/backends/events/gp2xsdl/gp2xsdl-events.cpp
index 91feb2b447..86d4de384f 100644
--- a/backends/events/gp2xsdl/gp2xsdl-events.cpp
+++ b/backends/events/gp2xsdl/gp2xsdl-events.cpp
@@ -18,22 +18,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
-#if defined(GP2X)
+#if defined(GP2X_OLD)
#include "backends/events/gp2xsdl/gp2xsdl-events.h"
-#if defined(GP2X)
#include "backends/platform/gp2x/gp2x-hw.h"
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
-#else
-#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-#endif
#include "backends/platform/sdl/sdl.h"
@@ -88,7 +81,6 @@ enum {
GP2XSdlEventSource::GP2XSdlEventSource()
: _buttonStateL(false){
-
}
void GP2XSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
@@ -468,5 +460,4 @@ bool GP2XSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return false;
}
-
#endif
diff --git a/backends/events/gp2xsdl/gp2xsdl-events.h b/backends/events/gp2xsdl/gp2xsdl-events.h
index 5bf472d3d8..0d74c1bcac 100644
--- a/backends/events/gp2xsdl/gp2xsdl-events.h
+++ b/backends/events/gp2xsdl/gp2xsdl-events.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(BACKEND_EVENTS_SDL_GP2X_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp
index 05fd747605..d2b3483f84 100644
--- a/backends/events/gph/gph-events.cpp
+++ b/backends/events/gph/gph-events.cpp
@@ -26,7 +26,7 @@
* GPH: Device Specific Event Handling.
*/
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/events/gph/gph-events.h"
#include "backends/graphics/gph/gph-graphics.h"
@@ -78,7 +78,9 @@ int BUTTON_STATE_L = false;
BUTTON_SELECT = 62
};
-#else
+#endif
+
+#if defined(GP2XWIZ)
/* Wiz: Main Joystick Mappings */
enum {
@@ -115,6 +117,42 @@ int BUTTON_STATE_L = false;
#endif
+#if defined(GP2X)
+
+enum {
+ /* DPAD/Stick */
+ BUTTON_UP = 0,
+ BUTTON_UPLEFT = 1,
+ BUTTON_LEFT = 2,
+ BUTTON_DOWNLEFT = 3,
+ BUTTON_DOWN = 4,
+ BUTTON_DOWNRIGHT = 5,
+ BUTTON_RIGHT = 6,
+ BUTTON_UPRIGHT = 7,
+ /* Joystick Buttons */
+ BUTTON_MENU = 8, // Start on F100 GP2X
+ BUTTON_SELECT = 9,
+ BUTTON_L = 10,
+ BUTTON_R = 11,
+ BUTTON_A = 12,
+ BUTTON_B = 13,
+ BUTTON_X = 14,
+ BUTTON_Y = 15,
+ BUTTON_VOLUP = 16,
+ BUTTON_VOLDOWN = 17,
+ BUTTON_CLICK = 18
+};
+
+enum {
+ /* Unused Joystick Buttons on the GP2X */
+ BUTTON_HOME = 51,
+ BUTTON_HOLD = 52,
+ BUTTON_HELP = 53,
+ BUTTON_HELP2 = 54
+};
+
+#endif
+
enum {
/* Touchscreen TapMode */
TAPMODE_LEFT = 0,
diff --git a/backends/events/openpandora/op-events.h b/backends/events/openpandora/op-events.h
index 4b13ef2105..9aa637992a 100644
--- a/backends/events/openpandora/op-events.h
+++ b/backends/events/openpandora/op-events.h
@@ -37,8 +37,6 @@ protected:
bool _buttonStateL;
bool remapKey(SDL_Event &ev, Common::Event &event);
-
-//private:
bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
};
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
new file mode 100644
index 0000000000..fd9628995d
--- /dev/null
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -0,0 +1,241 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifdef WEBOS
+
+#include "common/scummsys.h"
+#include "sys/time.h"
+#include "time.h"
+
+#include "backends/events/webossdl/webossdl-events.h"
+#include "gui/message.h"
+
+// Inidicates if gesture area is pressed down or not.
+static bool gestureDown = false;
+
+// The timestamp when gesture area was pressed down.
+static int gestureDownTime = 0;
+
+// The timestamp when screen was pressed down.
+static int screenDownTime = 0;
+
+// The timestamp when a possible drag operation was triggered.
+static int dragStartTime = 0;
+
+// The index of the motion pointer.
+static int motionPtrIndex = -1;
+
+// The maximum horizontal motion during dragging (For tap recognition).
+static int dragDiffX = 0;
+
+// The maximum vertical motion during dragging (For tap recognition).
+static int dragDiffY = 0;
+
+// Indicates if we are in drag mode.
+static bool dragging = false;
+
+// The current mouse position on the screen.
+static int curX = 0, curY = 0;
+
+// The time (seconds after 1/1/1970) when program started.
+static time_t programStartTime = time(0);
+
+/**
+ * Returns the number of passed milliseconds since program start.
+ *
+ * @return The number of passed milliseconds.
+ */
+static time_t getMillis()
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (time(0) - programStartTime) * 1000 + tv.tv_usec / 1000;
+}
+
+/**
+ * WebOS devices only have a Shift key and a CTRL key. There is also an Alt
+ * key (the orange key) but this is already processed by WebOS to change the
+ * mode of the keys so ScummVM must not use this key as a modifier. Instead
+ * pressing down the gesture area is used as Alt key.
+ *
+ * @param mod The pressed key modifier as detected by SDL.
+ * @param event The ScummVM event to setup.
+ */
+void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod,
+ Common::Event &event) {
+ event.kbd.flags = 0;
+
+ if (mod & KMOD_SHIFT)
+ event.kbd.flags |= Common::KBD_SHIFT;
+ if (mod & KMOD_CTRL)
+ event.kbd.flags |= Common::KBD_CTRL;
+ if (gestureDown)
+ event.kbd.flags |= Common::KBD_ALT;
+}
+
+/**
+ * Before calling the original SDL implementation this method checks if the
+ * gesture area is pressed down.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
+ // Handle gesture area tap.
+ if (ev.key.keysym.sym == SDLK_WORLD_71) {
+ gestureDown = true;
+ gestureDownTime = getMillis();
+ return true;
+ }
+
+ // Call original SDL key handler.
+ return SdlEventSource::handleKeyDown(ev, event);
+}
+
+/**
+ * Before calling the original SDL implementation this method checks if the
+ * gesture area has been released.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
+ // Handle gesture area tap.
+ if (ev.key.keysym.sym == SDLK_WORLD_71) {
+ gestureDown = false;
+ return true;
+ }
+
+ // Call original SDL key handler.
+ return SdlEventSource::handleKeyUp(ev, event);
+}
+
+/**
+ * Handles mouse button press.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
+ if (motionPtrIndex == -1) {
+ motionPtrIndex = ev.button.which;
+ dragDiffX = 0;
+ dragDiffY = 0;
+ screenDownTime = getMillis();
+
+ // Start dragging when pressing the screen shortly after a tap.
+ if (getMillis() - dragStartTime < 250) {
+ dragging = true;
+ event.type = Common::EVENT_LBUTTONDOWN;
+ fillMouseEvent(event, curX, curY);
+ }
+ }
+ return true;
+}
+
+/**
+ * Handles mouse button release.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
+ if (motionPtrIndex == ev.button.which) {
+ motionPtrIndex = -1;
+
+ // When drag mode was active then simply send a mouse up event
+ if (dragging)
+ {
+ event.type = Common::EVENT_LBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ dragging = false;
+ return true;
+ }
+
+ // When mouse was moved 5 pixels or less then emulate a mouse button
+ // click.
+ if (ABS(dragDiffX) < 6 && ABS(dragDiffY) < 6)
+ {
+ int duration = getMillis() - screenDownTime;
+
+ // When screen was pressed for less than 500ms then emulate a
+ // left mouse click.
+ if (duration < 500) {
+ event.type = Common::EVENT_LBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ g_system->getEventManager()->pushEvent(event);
+ event.type = Common::EVENT_LBUTTONDOWN;
+ dragStartTime = getMillis();
+ }
+
+ // When screen was pressed for less than 1000ms then emulate a
+ // right mouse click.
+ else if (duration < 1000) {
+ event.type = Common::EVENT_RBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ g_system->getEventManager()->pushEvent(event);
+ event.type = Common::EVENT_RBUTTONDOWN;
+ }
+
+ // When screen was pressed for more than 1000ms then emulate a
+ // middle mouse click.
+ else {
+ event.type = Common::EVENT_MBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ g_system->getEventManager()->pushEvent(event);
+ event.type = Common::EVENT_MBUTTONDOWN;
+ }
+
+ }
+ }
+ return true;
+}
+
+/**
+ * Handles mouse motion.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseMotion(SDL_Event &ev, Common::Event &event) {
+ if (ev.motion.which == motionPtrIndex) {
+ int screenX = g_system->getWidth();
+ int screenY = g_system->getHeight();
+ curX = MIN(screenX, MAX(0, curX + ev.motion.xrel));
+ curY = MIN(screenY, MAX(0, curY + ev.motion.yrel));
+ dragDiffX += ev.motion.xrel;
+ dragDiffY += ev.motion.yrel;
+ event.type = Common::EVENT_MOUSEMOVE;
+ fillMouseEvent(event, curX, curY);
+ }
+ return true;
+}
+
+#endif
diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h
new file mode 100644
index 0000000000..3a41111cf2
--- /dev/null
+++ b/backends/events/webossdl/webossdl-events.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#if !defined(BACKEND_EVENTS_SDL_WEBOS_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
+#define BACKEND_EVENTS_SDL_WEBOS_H
+
+#include "backends/events/sdl/sdl-events.h"
+
+/**
+ * SDL events manager for WebOS
+ */
+class WebOSSdlEventSource : public SdlEventSource {
+protected:
+ virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
+ virtual bool handleKeyDown(SDL_Event &ev, Common::Event &event);
+ virtual bool handleKeyUp(SDL_Event &ev, Common::Event &event);
+ virtual bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
+ virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
+ virtual bool handleMouseMotion(SDL_Event &ev, Common::Event &event);
+};
+
+#endif
diff --git a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
index 75a1f17674..6e5a35a1b1 100644
--- a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
+++ b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
@@ -18,14 +18,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
-#ifdef GP2X
+#if defined(GP2X_OLD)
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
#include "graphics/scaler/aspect.h"
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index 2f971f8da1..4f2185ef4b 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -22,7 +22,7 @@
#include "common/scummsys.h"
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/graphics/gph/gph-graphics.h"
#include "backends/events/gph/gph-events.h"
diff --git a/backends/module.mk b/backends/module.mk
index c562aea4b4..426409ab73 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -14,6 +14,7 @@ MODULE_OBJS := \
events/samsungtvsdl/samsungtvsdl-events.o \
events/sdl/sdl-events.o \
events/symbiansdl/symbiansdl-events.o \
+ events/webossdl/webossdl-events.o \
events/wincesdl/wincesdl-events.o \
fs/abstract-fs.o \
fs/stdiostream.o \
diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index 01ebf73a81..77fdb139d8 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -1,7 +1,7 @@
# Android specific build targets
# These must be incremented for each market upload
-#ANDROID_VERSIONCODE = 6 Specified in dists/android/AndroidManifest.xml.in
+ANDROID_VERSIONCODE = 6
ANDROID_PLUGIN_VERSIONCODE = 6
JAVA_FILES = \
@@ -72,7 +72,8 @@ PATH_GEN = $(PATH_GEN_TOP)/$(PATH_REL)
PATH_CLASSES_MAIN = $(PATH_BUILD_CLASSES_MAIN_TOP)/$(PATH_REL)
PATH_CLASSES_PLUGIN = $(PATH_BUILD_CLASSES_PLUGIN_TOP)/$(PATH_REL)
-FILE_MANIFEST = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST_SRC = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST = $(PATH_BUILD)/AndroidManifest.xml
FILE_DEX = $(PATH_BUILD)/classes.dex
FILE_DEX_PLUGIN = $(PATH_BUILD)/plugins/classes.dex
FILE_RESOURCES = resources.ap_
@@ -87,6 +88,10 @@ CLASSES_PLUGIN = $(addprefix $(PATH_CLASSES_PLUGIN)/, $(JAVA_FILES_PLUGIN:%.java
APK_MAIN = scummvm.apk
APK_PLUGINS = $(patsubst plugins/lib%.so, scummvm-engine-%.apk, $(PLUGINS))
+$(FILE_MANIFEST): $(FILE_MANIFEST_SRC)
+ @$(MKDIR) -p $(@D)
+ sed "s/@ANDROID_VERSIONCODE@/$(ANDROID_VERSIONCODE)/" < $< > $@
+
$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8)
@$(MKDIR) -p $(PATH_GEN_TOP)
$(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR8)
@@ -110,14 +115,13 @@ $(FILE_DEX_PLUGIN): $(CLASSES_PLUGIN)
@$(MKDIR) -p $(@D)
$(DX) --dex --output=$@ $(PATH_BUILD_CLASSES_PLUGIN_TOP)
-$(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml: $(PATH_DIST)/mkmanifest.pl $(srcdir)/configure $(PATH_DIST)/AndroidManifest.xml
- $(PATH_DIST)/mkmanifest.pl --id=$* --configure=$(srcdir)/configure \
- --version-name=$(VERSION) \
- --version-code=$(ANDROID_PLUGIN_VERSIONCODE) \
- --stringres=$(PATH_STAGE_PREFIX).$*/res/values/strings.xml \
- --manifest=$(PATH_BUILD)/$*/AndroidManifest.xml \
- --master-manifest=$(PATH_DIST)/AndroidManifest.xml \
- --unpacklib=mylib/armeabi/lib$*.so
+$(PATH_BUILD)/%/AndroidManifest.xml: $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $(PATH_DIST)/plugin-manifest.xml
+ @$(MKDIR) -p $(@D)
+ $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $* $(PATH_DIST)/plugin-manifest.xml $(ANDROID_PLUGIN_VERSIONCODE) $@
+
+$(PATH_STAGE_PREFIX).%/res/values/strings.xml: $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $(PATH_DIST)/plugin-manifest.xml
+ @$(MKDIR) -p $(@D)
+ $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $* $(PATH_DIST)/plugin-strings.xml $(ANDROID_PLUGIN_VERSIONCODE) $@
$(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scummvm.png
@$(MKDIR) -p $(@D)
diff --git a/backends/platform/gp2x/build/README-GP2X b/backends/platform/gp2x/build/README-GP2X
deleted file mode 100644
index 3c6591d369..0000000000
--- a/backends/platform/gp2x/build/README-GP2X
+++ /dev/null
@@ -1,54 +0,0 @@
-ScummVM - GP2X SPECIFIC README
-------------------------------------------------------------------------
-
-Contents:
-
- * About the backend/port <#About_the_backendport>
- * Supported audio options <#Supported_audio_options>
- * Credits <#Credits>
-
-------------------------------------------------------------------------
-
-Please refer to the:
-
-GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
-WiKi: <http://wiki.scummvm.org/index.php/GP2X>
-
-for the most current information on the port and any updates to this
-documentation.
-
-The wiki includes detailed instructions on how to use the port and
-control information.
-
-------------------------------------------------------------------------
-About the backend/port
-
-This is the readme for the official GP2X ScummVM backend (also known as
-the GP2X port).
-
-This is an SVN test release of ScummVM for the GP2X, it would be
-appreciated if this SVN test distribution was not mirrored and that
-people be directed to http://scummvm.distant-earth.com/ instead for
-updated SVN builds.
-
-Full supported official releases of the GP2X ScummVM backend are made in
-line with main official releases and are avalalble from the ScummVM
-downloads page <http://www.scummvm.org/downloads.php>.
-
-------------------------------------------------------------------------
-Supported audio options
-
-Raw audio.
-MP3 audio.
-OGG Vorbis audio.
-
-FLAC audio is currently unsupported.
-
-For best results use uncompressed audio in games.
-
-------------------------------------------------------------------------
-Credits
-
-Core ScummVM code (c) The ScummVM Team
-Portions of the GP2X backend (c) John Willis
-Detailed (c) information can be found within the source code
diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh
deleted file mode 100755
index d17f8bd831..0000000000
--- a/backends/platform/gp2x/build/bundle.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-echo Quick script to make building a distribution of the GP2X port more consistent.
-
-cd ../../../..
-
-echo Building ScummVM for GP2X Wiz.
-
-make gp2x-bundle
-
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h
index 4d2a9c33cc..2a06cab788 100644
--- a/backends/platform/gp2x/gp2x-common.h
+++ b/backends/platform/gp2x/gp2x-common.h
@@ -26,7 +26,11 @@
#ifndef PLATFORM_SDL_GP2X_H
#define PLATFORM_SDL_GP2X_H
+#include "backends/base-backend.h"
+#include "backends/platform/sdl/sdl.h"
#include "backends/platform/sdl/posix/posix.h"
+#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
+#include "backends/events/gp2xsdl/gp2xsdl-events.h"
#ifndef PATH_MAX
#define PATH_MAX 255
@@ -34,12 +38,15 @@
class OSystem_GP2X : public OSystem_POSIX {
public:
- virtual void initBackend();
- virtual void quit();
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ OSystem_GP2X() {}
+
+ void initBackend();
+ void quit();
+ void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ void initSDL();
protected:
- virtual void initSDL();
+
};
#endif
diff --git a/backends/platform/gp2x/gp2x-main.cpp b/backends/platform/gp2x/gp2x-main.cpp
index a194accd77..f1ee5ed5f3 100644
--- a/backends/platform/gp2x/gp2x-main.cpp
+++ b/backends/platform/gp2x/gp2x-main.cpp
@@ -18,15 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "backends/platform/gp2x/gp2x-common.h"
-#include "backends/plugins/posix/posix-provider.h"
+#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
+#if defined(GP2X)
int main(int argc, char *argv[]) {
// Create our OSystem instance
@@ -37,7 +35,7 @@ int main(int argc, char *argv[]) {
((OSystem_GP2X *)g_system)->init();
#ifdef DYNAMIC_MODULES
- PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
#endif
// Invoke the actual ScummVM main entry point:
@@ -48,3 +46,5 @@ int main(int argc, char *argv[]) {
return res;
}
+
+#endif
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index 8ae54d679c..4cdb4cd0d5 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -31,12 +28,11 @@
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "backends/platform/sdl/sdl-sys.h"
#include "backends/platform/gp2x/gp2x-common.h"
#include "backends/platform/gp2x/gp2x-hw.h"
#include "backends/platform/gp2x/gp2x-mem.h"
-#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
-#include "backends/events/gp2xsdl/gp2xsdl-events.h"
#include "backends/saves/default/default-saves.h"
#include "common/config-manager.h"
@@ -143,7 +139,7 @@ void OSystem_GP2X::initBackend() {
if (_graphicsManager == 0)
_graphicsManager = new GP2XSdlGraphicsManager(_eventSource);
- // Call parent implementation of this method
+ /* Pass to POSIX method to do the heavy lifting */
OSystem_POSIX::initBackend();
}
diff --git a/backends/platform/gph/caanoo/build.sh b/backends/platform/gph/build/caanoo-build.sh
index 8000d2595d..8000d2595d 100755..100644
--- a/backends/platform/gph/caanoo/build.sh
+++ b/backends/platform/gph/build/caanoo-build.sh
diff --git a/backends/platform/gph/caanoo/bundle-debug.sh b/backends/platform/gph/build/caanoo-bundle-debug.sh
index 2d5cefe80e..2d5cefe80e 100755..100644
--- a/backends/platform/gph/caanoo/bundle-debug.sh
+++ b/backends/platform/gph/build/caanoo-bundle-debug.sh
diff --git a/backends/platform/gph/caanoo/bundle.sh b/backends/platform/gph/build/caanoo-bundle.sh
index 76fd31cec6..76fd31cec6 100755..100644
--- a/backends/platform/gph/caanoo/bundle.sh
+++ b/backends/platform/gph/build/caanoo-bundle.sh
diff --git a/backends/platform/gph/caanoo/config-alleng.sh b/backends/platform/gph/build/caanoo-config-alleng.sh
index 97fed942fa..97fed942fa 100755..100644
--- a/backends/platform/gph/caanoo/config-alleng.sh
+++ b/backends/platform/gph/build/caanoo-config-alleng.sh
diff --git a/backends/platform/gph/caanoo/config.sh b/backends/platform/gph/build/caanoo-config.sh
index 11d597481a..11d597481a 100755..100644
--- a/backends/platform/gph/caanoo/config.sh
+++ b/backends/platform/gph/build/caanoo-config.sh
diff --git a/backends/platform/gph/build/clean.sh b/backends/platform/gph/build/clean.sh
index 5ec1b9e62c..6d58b7a975 100755
--- a/backends/platform/gph/build/clean.sh
+++ b/backends/platform/gph/build/clean.sh
@@ -4,5 +4,5 @@ echo Quick script to make building all the time less painful.
cd ../../../..
-echo Cleaning ScummVM for the GP2X Wiz.
+echo Cleaning ScummVM for the GPH devices.
make clean
diff --git a/backends/platform/gp2x/build/build.sh b/backends/platform/gph/build/gp2x-build.sh
index 1ea77f4937..1ea77f4937 100755..100644
--- a/backends/platform/gp2x/build/build.sh
+++ b/backends/platform/gph/build/gp2x-build.sh
diff --git a/backends/platform/gph/build/gp2x-bundle.sh b/backends/platform/gph/build/gp2x-bundle.sh
new file mode 100644
index 0000000000..c4fe63ed9e
--- /dev/null
+++ b/backends/platform/gph/build/gp2x-bundle.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+echo Quick script to make building a distribution of the GP2X port more consistent.
+
+# Set the paths up here to support the build.
+
+export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
+export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
+export CXX=arm-open2x-linux-g++
+export CC=arm-open2x-linux-gcc
+export CXXFLAGS=-march=armv4t
+export LDFLAGS=-static
+export ASFLAGS=-mfloat-abi=soft
+
+cd ../../../..
+
+echo Building ScummVM for GP2X Wiz.
+
+make gp2x-bundle
diff --git a/backends/platform/gp2x/build/config-alleng.sh b/backends/platform/gph/build/gp2x-config-alleng.sh
index 4a3526d50c..4a3526d50c 100755..100644
--- a/backends/platform/gp2x/build/config-alleng.sh
+++ b/backends/platform/gph/build/gp2x-config-alleng.sh
diff --git a/backends/platform/gp2x/build/config.sh b/backends/platform/gph/build/gp2x-config.sh
index e0a1bf1209..9092b0b1ea 100755..100644
--- a/backends/platform/gp2x/build/config.sh
+++ b/backends/platform/gph/build/gp2x-config.sh
@@ -17,7 +17,7 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=gp2x --disable-mt32emu --host=gp2x --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
+./configure --backend=gp2x --disable-mt32emu --host=gp2x --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
# --disable-release --enable-debug
# --enable-plugins --default-dynamic
diff --git a/backends/platform/gph/build/build.sh b/backends/platform/gph/build/gp2xwiz-build.sh
index 876c3e378a..876c3e378a 100755..100644
--- a/backends/platform/gph/build/build.sh
+++ b/backends/platform/gph/build/gp2xwiz-build.sh
diff --git a/backends/platform/gph/build/bundle-debug.sh b/backends/platform/gph/build/gp2xwiz-bundle-debug.sh
index cd5145b31d..cd5145b31d 100755..100644
--- a/backends/platform/gph/build/bundle-debug.sh
+++ b/backends/platform/gph/build/gp2xwiz-bundle-debug.sh
diff --git a/backends/platform/gph/build/bundle.sh b/backends/platform/gph/build/gp2xwiz-bundle.sh
index 579e2dc77b..579e2dc77b 100755..100644
--- a/backends/platform/gph/build/bundle.sh
+++ b/backends/platform/gph/build/gp2xwiz-bundle.sh
diff --git a/backends/platform/gph/build/config-alleng.sh b/backends/platform/gph/build/gp2xwiz-config-alleng.sh
index 9ec8a09cd2..9ec8a09cd2 100755..100644
--- a/backends/platform/gph/build/config-alleng.sh
+++ b/backends/platform/gph/build/gp2xwiz-config-alleng.sh
diff --git a/backends/platform/gph/build/config.sh b/backends/platform/gph/build/gp2xwiz-config.sh
index ac7c34ad12..ac7c34ad12 100755..100644
--- a/backends/platform/gph/build/config.sh
+++ b/backends/platform/gph/build/gp2xwiz-config.sh
diff --git a/backends/platform/gph/build/scummvm.png b/backends/platform/gph/build/scummvm.png
deleted file mode 100644
index 128e59efc4..0000000000
--- a/backends/platform/gph/build/scummvm.png
+++ /dev/null
Binary files differ
diff --git a/backends/platform/gph/caanoo-bundle.mk b/backends/platform/gph/caanoo-bundle.mk
index b7b3c9e188..8aabca9028 100755
--- a/backends/platform/gph/caanoo-bundle.mk
+++ b/backends/platform/gph/caanoo-bundle.mk
@@ -14,11 +14,11 @@ caanoo-bundle: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm.gpe $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/caanoo/scummvm.gpe $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -45,11 +45,11 @@ caanoo-bundle-debug: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/caanoo/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
diff --git a/backends/platform/gph/caanoo/clean.sh b/backends/platform/gph/caanoo/clean.sh
deleted file mode 100755
index 5ec1b9e62c..0000000000
--- a/backends/platform/gph/caanoo/clean.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-echo Quick script to make building all the time less painful.
-
-cd ../../../..
-
-echo Cleaning ScummVM for the GP2X Wiz.
-make clean
diff --git a/backends/platform/gph/build/scummvm-gdb.gpe b/backends/platform/gph/devices/caanoo/scummvm-gdb.gpe
index 63ce193ca8..63ce193ca8 100755..100644
--- a/backends/platform/gph/build/scummvm-gdb.gpe
+++ b/backends/platform/gph/devices/caanoo/scummvm-gdb.gpe
diff --git a/backends/platform/gph/caanoo/scummvm.gpe b/backends/platform/gph/devices/caanoo/scummvm.gpe
index 37d0f65d18..37d0f65d18 100755..100644
--- a/backends/platform/gph/caanoo/scummvm.gpe
+++ b/backends/platform/gph/devices/caanoo/scummvm.gpe
diff --git a/backends/platform/gph/build/README-GPH b/backends/platform/gph/devices/common/README-GPH
index 64b9fcb76b..ea196f6649 100644
--- a/backends/platform/gph/build/README-GPH
+++ b/backends/platform/gph/devices/common/README-GPH
@@ -1,4 +1,4 @@
-ScummVM - GPH SPECIFIC README
+ScummVM - GPH DEVICE SPECIFIC README
------------------------------------------------------------------------
Contents:
@@ -29,7 +29,7 @@ control information.
About the backend/port
This is the readme for the official GPH ScummVM backend (also known as
-the GP2X port/GP2XWiz port and Caanoo port).
+the GP2X port/GP2XWiz port or Caanoo port).
This is an SVN test release of ScummVM for GPH devices, it would be
appreciated if this SVN test distribution was not mirrored and that
diff --git a/backends/platform/gph/build/scummvm.ini b/backends/platform/gph/devices/common/scummvm.ini
index c9cce92379..c9cce92379 100644
--- a/backends/platform/gph/build/scummvm.ini
+++ b/backends/platform/gph/devices/common/scummvm.ini
diff --git a/backends/platform/gp2x/build/scummvm.png b/backends/platform/gph/devices/common/scummvm.png
index 128e59efc4..128e59efc4 100644
--- a/backends/platform/gp2x/build/scummvm.png
+++ b/backends/platform/gph/devices/common/scummvm.png
Binary files differ
diff --git a/backends/platform/gph/build/scummvmb.png b/backends/platform/gph/devices/common/scummvmb.png
index 24a27bc0e1..24a27bc0e1 100644
--- a/backends/platform/gph/build/scummvmb.png
+++ b/backends/platform/gph/devices/common/scummvmb.png
Binary files differ
diff --git a/backends/platform/gp2x/mmuhack/Makefile b/backends/platform/gph/devices/gp2x/mmuhack/Makefile
index a35d5c2a98..a35d5c2a98 100644
--- a/backends/platform/gp2x/mmuhack/Makefile
+++ b/backends/platform/gph/devices/gp2x/mmuhack/Makefile
diff --git a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.h b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.h
index 520841ace7..520841ace7 100644
--- a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.h
+++ b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.h
diff --git a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.s b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.s
index 17628c156a..17628c156a 100644
--- a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.s
+++ b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.s
diff --git a/backends/platform/gp2x/mmuhack/mmuhack.c b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.c
index 7e27262e5f..7e27262e5f 100644
--- a/backends/platform/gp2x/mmuhack/mmuhack.c
+++ b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.c
diff --git a/backends/platform/gp2x/build/mmuhack.o b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o
index 475f4a54ae..475f4a54ae 100644
--- a/backends/platform/gp2x/build/mmuhack.o
+++ b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o
Binary files differ
diff --git a/backends/platform/gp2x/mmuhack/readme.txt b/backends/platform/gph/devices/gp2x/mmuhack/readme.txt
index bea49d7d6d..bea49d7d6d 100644
--- a/backends/platform/gp2x/mmuhack/readme.txt
+++ b/backends/platform/gph/devices/gp2x/mmuhack/readme.txt
diff --git a/backends/platform/gp2x/build/scummvm.gpe b/backends/platform/gph/devices/gp2x/scummvm.gpe
index c6b051831c..e8983aa2ce 100755..100644
--- a/backends/platform/gp2x/build/scummvm.gpe
+++ b/backends/platform/gph/devices/gp2x/scummvm.gpe
@@ -3,6 +3,10 @@
# Remount SD with forced Sync, does this really work?
mount -o sync,remount /dev/mmcsd/disc0/part1 /mnt/sd/
+# Export the location of any libs ScummVM depends on
+# (to avoid installing to the NAND and overwriting the broken ones there).
+export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
+
# Run ScummVM, important this bit.
./scummvm.gph
diff --git a/backends/platform/gph/caanoo/scummvm-gdb.gpe b/backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe
index 63ce193ca8..63ce193ca8 100755..100644
--- a/backends/platform/gph/caanoo/scummvm-gdb.gpe
+++ b/backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe
diff --git a/backends/platform/gph/build/scummvm.gpe b/backends/platform/gph/devices/gp2xwiz/scummvm.gpe
index 59ff562aeb..59ff562aeb 100755..100644
--- a/backends/platform/gph/build/scummvm.gpe
+++ b/backends/platform/gph/devices/gp2xwiz/scummvm.gpe
diff --git a/backends/platform/gp2x/gp2x-bundle.mk b/backends/platform/gph/gp2x-bundle.mk
index 67d22d1889..810ff8b8f0 100755..100644
--- a/backends/platform/gp2x/gp2x-bundle.mk
+++ b/backends/platform/gph/gp2x-bundle.mk
@@ -1,18 +1,21 @@
# Special target to create bundles for the GP2X.
bundle_name = release/scummvm-gp2x
+f=$(shell which $(STRIP))
+libloc = $(shell dirname $(f))
gp2x-bundle: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
$(MKDIR) "$(bundle_name)/saves"
$(MKDIR) "$(bundle_name)/engine-data"
+ $(MKDIR) "$(bundle_name)/lib"
echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.png $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/README-GP2X $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/mmuhack.o $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/scummvm.gpe $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
@@ -27,6 +30,8 @@ ifdef DYNAMIC_MODULES
$(STRIP) $(bundle_name)/plugins/*
endif
+ $(CP) $(libloc)/../arm-open2x-linux/lib/libdl.so $(bundle_name)/lib/libdl.so
+
tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
rm -R ./$(bundle_name)
@@ -37,10 +42,10 @@ gp2x-bundle-debug: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.png $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/README-GP2X $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/mmuhack.o $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/scummvm.gpe $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
@@ -54,6 +59,8 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
endif
+ $(CP) $(libloc)/../arm-open2x-linux/lib/libdl.so $(bundle_name)/lib/libdl.so
+
tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
rm -R ./$(bundle_name)
diff --git a/backends/platform/gph/gp2xwiz-bundle.mk b/backends/platform/gph/gp2xwiz-bundle.mk
index df4cae7f4f..65e2952fde 100755
--- a/backends/platform/gph/gp2xwiz-bundle.mk
+++ b/backends/platform/gph/gp2xwiz-bundle.mk
@@ -1,6 +1,5 @@
# Special target to create bundles for the GP2X Wiz.
-#bundle_name = release/scummvm-wiz-`date '+%Y-%m-%d'`
bundle_name = release/scummvm-gp2xwiz
f=$(shell which $(STRIP))
libloc = $(shell dirname $(f))
@@ -14,11 +13,11 @@ gp2xwiz-bundle: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.gpe $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2xwiz/scummvm.gpe $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -48,11 +47,11 @@ gp2xwiz-bundle-debug: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp
index c7d691fc66..f91ec8f478 100644
--- a/backends/platform/gph/gph-main.cpp
+++ b/backends/platform/gph/gph-main.cpp
@@ -24,7 +24,7 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
int main(int argc, char *argv[]) {
diff --git a/backends/platform/gph/gph-sdl.h b/backends/platform/gph/gph-sdl.h
index ef696bc3d8..51c609d29e 100644
--- a/backends/platform/gph/gph-sdl.h
+++ b/backends/platform/gph/gph-sdl.h
@@ -23,7 +23,7 @@
#ifndef GPH_H
#define GPH_H
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/base-backend.h"
#include "backends/platform/sdl/sdl.h"
diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp
index 72777e1ab7..9e778ab899 100644
--- a/backends/platform/sdl/posix/posix-main.cpp
+++ b/backends/platform/sdl/posix/posix-main.cpp
@@ -25,7 +25,7 @@
#include "common/scummsys.h"
-#if defined(UNIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA)
+#if defined(UNIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA)
#include "backends/platform/sdl/posix/posix.h"
#include "backends/plugins/sdl/sdl-provider.h"
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index bddb48ca95..d6e79248f9 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -214,6 +214,11 @@ void OSystem_SDL::initSDL() {
if (ConfMan.hasKey("disable_sdl_parachute"))
sdlFlags |= SDL_INIT_NOPARACHUTE;
+#ifdef WEBOS
+ // WebOS needs this flag or otherwise the application won't start
+ sdlFlags |= SDL_INIT_VIDEO;
+#endif
+
// Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers)
if (SDL_Init(sdlFlags) == -1)
error("Could not initialize SDL: %s", SDL_GetError());
diff --git a/backends/platform/webos/main.cpp b/backends/platform/webos/main.cpp
new file mode 100644
index 0000000000..bbf55c6efd
--- /dev/null
+++ b/backends/platform/webos/main.cpp
@@ -0,0 +1,53 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "backends/platform/webos/webos.h"
+#include "backends/plugins/sdl/sdl-provider.h"
+#include "base/main.h"
+
+#if defined(WEBOS)
+
+#include <unistd.h>
+
+int main(int argc, char* argv[]) {
+ g_system = new OSystem_SDL_WebOS();
+ assert(g_system);
+
+ ((OSystem_SDL_WebOS *)g_system)->init();
+
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
+#endif
+
+ // Invoke the actual ScummVM main entry point:
+ int res = scummvm_main(argc, argv);
+
+ // Free OSystem
+ delete (OSystem_SDL_WebOS *)g_system;
+
+ return res;
+}
+
+#endif
diff --git a/backends/platform/webos/module.mk b/backends/platform/webos/module.mk
new file mode 100644
index 0000000000..fe4ec1e079
--- /dev/null
+++ b/backends/platform/webos/module.mk
@@ -0,0 +1,10 @@
+MODULE := backends/platform/webos
+
+MODULE_OBJS := \
+ main.o \
+ webos.o
+
+# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
+MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
+OBJS := $(MODULE_OBJS) $(OBJS)
+MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp
new file mode 100644
index 0000000000..7db17f4b9f
--- /dev/null
+++ b/backends/platform/webos/webos.cpp
@@ -0,0 +1,73 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "backends/platform/webos/webos.h"
+#include "backends/events/webossdl/webossdl-events.h"
+#include "backends/keymapper/keymapper.h"
+
+#if defined(WEBOS)
+
+using namespace Common;
+
+OSystem_SDL_WebOS::OSystem_SDL_WebOS()
+ :
+ OSystem_POSIX() {
+}
+
+/**
+ * Initializes the backend.
+ */
+void OSystem_SDL_WebOS::initBackend() {
+ // Create the events manager
+ if (_eventSource == 0)
+ _eventSource = new WebOSSdlEventSource();
+
+ // Call parent implementation of this method
+ OSystem_SDL::initBackend();
+}
+
+/**
+ * Gets the original SDL hardware key set, adds WebOS specific keys and
+ * returns the new key set.
+ *
+ * @return The hardware key set with added webOS specific keys.
+ */
+HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() {
+#ifdef ENABLE_KEYMAPPER
+ // Get the original SDL hardware key set
+ HardwareKeySet *keySet = OSystem_SDL::getHardwareKeySet();
+
+ // Add WebOS specific keys
+ keySet->addHardwareKey(new HardwareKey("FORWARD",
+ KeyState((KeyCode) 229, 229, 0), "Forward", kActionKeyType));
+
+ // Return the modified hardware key set
+ return keySet;
+#else
+ return 0;
+#endif
+}
+
+#endif
diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h
new file mode 100644
index 0000000000..1cdba703e0
--- /dev/null
+++ b/backends/platform/webos/webos.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef PLATFORM_SDL_WEBOS_H
+#define PLATFORM_SDL_WEBOS_H
+
+#include "common/system.h"
+#include "backends/platform/sdl/posix/posix.h"
+
+class OSystem_SDL_WebOS : public OSystem_POSIX {
+public:
+ OSystem_SDL_WebOS();
+
+ virtual void initBackend();
+ virtual Common::HardwareKeySet *getHardwareKeySet();
+};
+
+#endif
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
new file mode 100644
index 0000000000..885c9eb90e
--- /dev/null
+++ b/backends/platform/webos/webos.mk
@@ -0,0 +1,23 @@
+# WebOS specific build targets
+
+PATH_DIST = $(srcdir)/dists/webos
+PATH_MOJO = $(PATH_DIST)/mojo
+
+STAGING_DIR=STAGING/org.scummvm.scummvm
+
+webosrelease:
+ rm -rf $(STAGING_DIR)
+ rm -f *.ipk
+ mkdir -p $(STAGING_DIR)
+ mkdir -p $(STAGING_DIR)/bin
+ mkdir -p $(STAGING_DIR)/lib
+ mkdir -p $(STAGING_DIR)/share/scummvm
+ cp -f $(PATH_MOJO)/* $(STAGING_DIR)
+ cp -f gui/themes/translations.dat $(STAGING_DIR)/share/scummvm
+ cp -f gui/themes/scummmodern.zip $(STAGING_DIR)/share/scummvm
+ cp -f scummvm $(STAGING_DIR)/bin
+ $(STRIP) $(STAGING_DIR)/bin/scummvm
+ $(WEBOS_SDK)/bin/palm-package $(STAGING_DIR)
+ rm -rf STAGING
+
+.PHONY: webosrelease