diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/android/android.mk | 24 | ||||
-rw-r--r-- | backends/platform/gp2x/build/README-GP2X | 54 | ||||
-rwxr-xr-x | backends/platform/gp2x/build/bundle.sh | 10 | ||||
-rw-r--r-- | backends/platform/gp2x/gp2x-common.h | 15 | ||||
-rw-r--r-- | backends/platform/gp2x/gp2x-main.cpp | 10 | ||||
-rw-r--r-- | backends/platform/gp2x/gp2x.cpp | 8 | ||||
-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-x | backends/platform/gph/build/clean.sh | 2 | ||||
-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.sh | 19 | ||||
-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.png | bin | 2656 -> 0 bytes | |||
-rwxr-xr-x | backends/platform/gph/caanoo-bundle.mk | 20 | ||||
-rwxr-xr-x | backends/platform/gph/caanoo/clean.sh | 8 | ||||
-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) | bin | 2656 -> 2656 bytes | |||
-rw-r--r-- | backends/platform/gph/devices/common/scummvmb.png (renamed from backends/platform/gph/build/scummvmb.png) | bin | 34274 -> 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) | bin | 1720 -> 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-x | backends/platform/gph/gp2xwiz-bundle.mk | 21 | ||||
-rw-r--r-- | backends/platform/gph/gph-main.cpp | 2 | ||||
-rw-r--r-- | backends/platform/gph/gph-sdl.h | 2 | ||||
-rw-r--r-- | backends/platform/sdl/posix/posix-main.cpp | 2 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 5 | ||||
-rw-r--r-- | backends/platform/webos/main.cpp | 53 | ||||
-rw-r--r-- | backends/platform/webos/module.mk | 10 | ||||
-rw-r--r-- | backends/platform/webos/webos.cpp | 73 | ||||
-rw-r--r-- | backends/platform/webos/webos.h | 40 | ||||
-rw-r--r-- | backends/platform/webos/webos.mk | 23 |
50 files changed, 301 insertions, 133 deletions
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 Binary files differdeleted file mode 100644 index 128e59efc4..0000000000 --- a/backends/platform/gph/build/scummvm.png +++ /dev/null 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 Binary files differindex 128e59efc4..128e59efc4 100644 --- a/backends/platform/gp2x/build/scummvm.png +++ b/backends/platform/gph/devices/common/scummvm.png diff --git a/backends/platform/gph/build/scummvmb.png b/backends/platform/gph/devices/common/scummvmb.png Binary files differindex 24a27bc0e1..24a27bc0e1 100644 --- a/backends/platform/gph/build/scummvmb.png +++ b/backends/platform/gph/devices/common/scummvmb.png 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 Binary files differindex 475f4a54ae..475f4a54ae 100644 --- a/backends/platform/gp2x/build/mmuhack.o +++ b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o 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 |