From 70b7ebb33901d3dff5426c1c2fa12bc5087b721a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 22 Aug 2009 12:35:49 +0000 Subject: [PATCH] Patch #2826508: "Motorola A1200/E6/A1600 (motoezx) patch" svn-id: r43636 --- AUTHORS | 3 + backends/platform/linuxmoto/hardwarekeys.cpp | 100 +++++++++ .../platform/linuxmoto/linuxmoto-events.cpp | 190 ++++++++++++++++++ backends/platform/linuxmoto/linuxmoto-sdl.cpp | 69 +++++++ backends/platform/linuxmoto/linuxmoto-sdl.h | 46 +++++ backends/platform/linuxmoto/main.cpp | 45 +++++ backends/platform/linuxmoto/module.mk | 29 +++ backends/platform/sdl/events.cpp | 2 + backends/platform/sdl/main.cpp | 2 +- backends/platform/sdl/sdl.cpp | 5 +- backends/platform/sdl/sdl.h | 2 + configure | 53 ++++- dists/motoezx/scummvm-sm.png | Bin 0 -> 1435 bytes dists/motoezx/scummvm.desktop | 9 + dists/motoezx/scummvm.lin | 10 + dists/motoezx/scummvm.png | Bin 0 -> 1681 bytes gui/credits.h | 3 + ports.mk | 16 +- tools/credits.pl | 4 + 19 files changed, 582 insertions(+), 6 deletions(-) create mode 100644 backends/platform/linuxmoto/hardwarekeys.cpp create mode 100644 backends/platform/linuxmoto/linuxmoto-events.cpp create mode 100644 backends/platform/linuxmoto/linuxmoto-sdl.cpp create mode 100644 backends/platform/linuxmoto/linuxmoto-sdl.h create mode 100644 backends/platform/linuxmoto/main.cpp create mode 100644 backends/platform/linuxmoto/module.mk create mode 100644 dists/motoezx/scummvm-sm.png create mode 100644 dists/motoezx/scummvm.desktop create mode 100644 dists/motoezx/scummvm.lin create mode 100644 dists/motoezx/scummvm.png diff --git a/AUTHORS b/AUTHORS index f6032b13444..c7cc26627be 100644 --- a/AUTHORS +++ b/AUTHORS @@ -159,6 +159,9 @@ ScummVM Team iPhone: Oystein Eftevaag + LinuxMoto: + Lubomyr Lisen + Maemo: Frantisek Dufka diff --git a/backends/platform/linuxmoto/hardwarekeys.cpp b/backends/platform/linuxmoto/hardwarekeys.cpp new file mode 100644 index 00000000000..2f64e7dbaed --- /dev/null +++ b/backends/platform/linuxmoto/hardwarekeys.cpp @@ -0,0 +1,100 @@ +/* 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/linuxmoto/linuxmoto-sdl.h" +#include "backends/keymapper/keymapper.h" +#include "common/keyboard.h" + +#ifdef ENABLE_KEYMAPPER + +using namespace Common; + +struct Key { + const char *hwId; + KeyCode keycode; + uint16 ascii; + const char *desc; + KeyType preferredAction; + bool shiftable; +}; + +static const Key keys[] = { + {"FIRE", KEYCODE_RETURN, ASCII_RETURN, "Fire", kActionKeyType, false}, + {"CAMERA", KEYCODE_PAUSE, 0, "Camera", kActionKeyType, false}, + {"HANGUP", KEYCODE_ESCAPE, ASCII_ESCAPE, "Hangup", kStartKeyType, false}, + {"CALL", KEYCODE_SPACE, ASCII_SPACE, "Call", kActionKeyType, false}, + {"PLUS", KEYCODE_PLUS, '+', "+", kActionKeyType, false}, + {"MINUS", KEYCODE_MINUS, '-', "-", kActionKeyType, false}, + + {"a", KEYCODE_a, 'a', "a", kActionKeyType, true}, + {"b", KEYCODE_b, 'b', "b", kActionKeyType, true}, + {"c", KEYCODE_c, 'c', "c", kActionKeyType, true}, + {"d", KEYCODE_d, 'd', "d", kActionKeyType, true}, + {"e", KEYCODE_e, 'e', "e", kActionKeyType, true}, + {"f", KEYCODE_f, 'f', "f", kActionKeyType, true}, + {"g", KEYCODE_g, 'g', "g", kActionKeyType, true}, + {"h", KEYCODE_h, 'h', "h", kActionKeyType, true}, + {"i", KEYCODE_i, 'i', "i", kActionKeyType, true}, + {"j", KEYCODE_j, 'j', "j", kActionKeyType, true}, + + // Numeric keypad + + // Arrows + Home/End pad + {"UP", KEYCODE_UP, 0, "Up", kDirUpKeyType, false}, + {"DOWN", KEYCODE_DOWN, 0, "Down", kDirDownKeyType, false}, + {"RIGHT", KEYCODE_RIGHT, 0, "Right", kDirRightKeyType, false}, + {"LEFT", KEYCODE_LEFT, 0, "Left", kDirLeftKeyType, false}, + + // Function keys + + // Miscellaneous function keys + + {0, KEYCODE_INVALID, 0, 0, kGenericKeyType, false} +}; + +struct Mod { + byte flag; + const char *id; + const char *desc; + bool shiftable; +}; + +static const Mod modifiers[] = { + { 0, "", "", false }, + { KBD_CTRL, "C+", "Ctrl+", false }, + { KBD_ALT, "A+", "Alt+", false }, + { KBD_SHIFT, "", "", true }, + { KBD_CTRL | KBD_ALT, "C+A+", "Ctrl+Alt+", false }, + { KBD_SHIFT | KBD_CTRL, "S+C+", "Shift+Ctrl+", true }, + { KBD_SHIFT | KBD_CTRL | KBD_ALT, "C+A+", "Ctrl+Alt+", true }, + { 0, 0, 0, false } +}; +#endif + + +Common::HardwareKeySet *OSystem_LINUXMOTO::getHardwareKeySet() { + OSystem_SDL::getHardwareKeySet(); +} diff --git a/backends/platform/linuxmoto/linuxmoto-events.cpp b/backends/platform/linuxmoto/linuxmoto-events.cpp new file mode 100644 index 00000000000..2a40d734b02 --- /dev/null +++ b/backends/platform/linuxmoto/linuxmoto-events.cpp @@ -0,0 +1,190 @@ +/* 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/linuxmoto/linuxmoto-sdl.h" +#include "backends/platform/sdl/sdl.h" + +static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { + if (key >= SDLK_F1 && key <= SDLK_F9) { + return key - SDLK_F1 + Common::ASCII_F1; + } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { + return key - SDLK_KP0 + '0'; + } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { + return key; + } else if (unicode) { + return unicode; + } else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) { + return key & ~0x20; + } else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) { + return 0; + } + return key; +} + +bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) { + // Motorol A1200/E6/A1600 remapkey by Lubomyr +#ifdef MOTOEZX + // Quit on MOD+Camera Key on A1200 + if (ev.key.keysym.sym == SDLK_e) { + event.type = Common::EVENT_QUIT; + return true; + } + // '1' Bypass security protection - MOD+Call key + if (ev.key.keysym.sym == SDLK_f) { + ev.key.keysym.sym=SDLK_1; + } + // F5 Game Menu - Call key + else if (ev.key.keysym.sym == SDLK_SPACE) { + ev.key.keysym.sym=SDLK_F5; + } + // Camera to VirtualKeyboard + else if (ev.key.keysym.sym == SDLK_PAUSE) { + ev.key.keysym.sym=SDLK_F7; + } + // mod+fire to enter + else if (ev.key.keysym.sym == SDLK_b) { + ev.key.keysym.sym=SDLK_RETURN; + } +#endif + // Motorola Z6/V8 remapkey by Ant-On +#ifdef MOTOMAGX + // Quit on cancel + if (ev.key.keysym.sym == SDLK_ESCAPE) { + event.type = Common::EVENT_QUIT; + return true; + } else + // F5 Game Menu - Call key + if (ev.key.keysym.sym == SDLK_SPACE) { + ev.key.keysym.sym=SDLK_F5; + } + // 'y' - Mod+Right key + // 'y' - Left soft + else if (ev.key.keysym.sym == SDLK_F9) { + ev.key.keysym.sym=SDLK_y; + } + // 'n' - Mod+Left key + // 'n' - rigth soft + else if (ev.key.keysym.sym == SDLK_F11) { + ev.key.keysym.sym=SDLK_n; + } +#endif + +// Joystick to Mouse + else if (ev.key.keysym.sym == SDLK_LEFT) { + if (ev.type == SDL_KEYDOWN) { + _km.x_vel = -1; + _km.x_down_count = 1; + } else { + _km.x_vel = 0; + _km.x_down_count = 0; + } + + event.type = Common::EVENT_MOUSEMOVE; + fillMouseEvent(event, _km.x, _km.y); + return true; + } else if (ev.key.keysym.sym == SDLK_RIGHT) { + if (ev.type == SDL_KEYDOWN) { + _km.x_vel = 1; + _km.x_down_count = 1; + } else { + _km.x_vel = 0; + _km.x_down_count = 0; + } + + event.type = Common::EVENT_MOUSEMOVE; + fillMouseEvent(event, _km.x, _km.y); + return true; + } else if (ev.key.keysym.sym == SDLK_DOWN) { + if (ev.type == SDL_KEYDOWN) { + _km.y_vel = 1; + _km.y_down_count = 1; + } else { + _km.y_vel = 0; + _km.y_down_count = 0; + } + + event.type = Common::EVENT_MOUSEMOVE; + fillMouseEvent(event, _km.x, _km.y); + return true; + } else if (ev.key.keysym.sym == SDLK_UP) { + if (ev.type == SDL_KEYDOWN) { + _km.y_vel = -1; + _km.y_down_count = 1; + } else { + _km.y_vel = 0; + _km.y_down_count = 0; + } + + event.type = Common::EVENT_MOUSEMOVE; + fillMouseEvent(event, _km.x, _km.y); + return true; + } + // Joystick center to pressing Left Mouse + else if (ev.key.keysym.sym == SDLK_RETURN) { + // _km.y_vel = 0; + // _km.y_down_count = 0; + if (ev.key.type == SDL_KEYDOWN) { + event.type = Common::EVENT_LBUTTONDOWN; + } else { + event.type = Common::EVENT_LBUTTONUP; + } + fillMouseEvent(event, _km.x, _km.y); + return true; + } + // Volume Up to pressing Right Mouse + else if (ev.key.keysym.sym == SDLK_PLUS) { + // _km.y_vel = 0; + // _km.y_down_count = 0; + if (ev.key.type == SDL_KEYDOWN ) { + event.type = Common::EVENT_RBUTTONDOWN; + } else { + event.type = Common::EVENT_RBUTTONUP; + } + fillMouseEvent(event, _km.x, _km.y); + return true; + } + // Volume Down to pressing Left Mouse + else if (ev.key.keysym.sym == SDLK_MINUS) { + //_km.y_vel = 0; + //_km.y_down_count = 0; + if (ev.key.type == SDL_KEYDOWN) { + event.type = Common::EVENT_LBUTTONDOWN; + } else { + event.type = Common::EVENT_LBUTTONUP; + } + fillMouseEvent(event, _km.x, _km.y); + return true; + } else { + // Let the events fall through if we didn't change them, this may not be the best way to + // set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though. + // and yes i have an huge terminal size so i dont wrap soon enough. + event.type = Common::EVENT_KEYDOWN; + event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym; + event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode); + } + + return false; +} diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.cpp b/backends/platform/linuxmoto/linuxmoto-sdl.cpp new file mode 100644 index 00000000000..bc163c807cb --- /dev/null +++ b/backends/platform/linuxmoto/linuxmoto-sdl.cpp @@ -0,0 +1,69 @@ +/* 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/linuxmoto/linuxmoto-sdl.h" + +void OSystem_LINUXMOTO::preprocessEvents(SDL_Event *event) { + if (event->type == SDL_ACTIVEEVENT) { + if (event->active.state == SDL_APPINPUTFOCUS && !event->active.gain) { + suspendAudio(); + for (;;) { + if (!SDL_WaitEvent(event)) { + SDL_Delay(10); + continue; + } + if (event->type == SDL_QUIT) + return; + if (event->type != SDL_ACTIVEEVENT) + continue; + if (event->active.state == SDL_APPINPUTFOCUS && event->active.gain) { + resumeAudio(); + return; + } + } + } + } +} + +void OSystem_LINUXMOTO::suspendAudio() { + SDL_CloseAudio(); + _audioSuspended = true; +} + +int OSystem_LINUXMOTO::resumeAudio() { + if (!_audioSuspended) + return -2; + if (SDL_OpenAudio(&_obtained, NULL) < 0){ + return -1; + } + SDL_PauseAudio(0); + _audioSuspended = false; + return 0; +} + +void OSystem_LINUXMOTO::setupMixer() { + OSystem_SDL::setupMixer(); +} diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.h b/backends/platform/linuxmoto/linuxmoto-sdl.h new file mode 100644 index 00000000000..27c423b0719 --- /dev/null +++ b/backends/platform/linuxmoto/linuxmoto-sdl.h @@ -0,0 +1,46 @@ +/* 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 LINUXMOTO_SDL +#define LINUXMOTO_SDL + +#include "backends/platform/sdl/sdl.h" + +#include + +class OSystem_LINUXMOTO : public OSystem_SDL { +private: + bool _audioSuspended; +public: + virtual bool remapKey(SDL_Event &ev, Common::Event &event); + virtual void preprocessEvents(SDL_Event *event); + virtual void setupMixer(); + virtual Common::HardwareKeySet *getHardwareKeySet(); + void suspendAudio(); + int resumeAudio(); +}; + +#endif diff --git a/backends/platform/linuxmoto/main.cpp b/backends/platform/linuxmoto/main.cpp new file mode 100644 index 00000000000..1e37fe617a8 --- /dev/null +++ b/backends/platform/linuxmoto/main.cpp @@ -0,0 +1,45 @@ +/* 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 +#include + +#include +#include + +#include "backends/platform/linuxmoto/linuxmoto-sdl.h" +#include "base/main.h" +#include "base/internal_version.h" + +int main(int argc, char *argv[]) { + + g_system = new OSystem_LINUXMOTO(); + assert(g_system); + // Invoke the actual ScummVM main entry point: + int res = scummvm_main(argc, argv); + g_system->quit(); // TODO: Consider removing / replacing this! + + return res; +} diff --git a/backends/platform/linuxmoto/module.mk b/backends/platform/linuxmoto/module.mk new file mode 100644 index 00000000000..4d816eb2274 --- /dev/null +++ b/backends/platform/linuxmoto/module.mk @@ -0,0 +1,29 @@ +MODULE := backends/platform/linuxmoto + +MODULE_OBJS := \ + main.o \ + hardwarekeys.o \ + linuxmoto-events.o \ + linuxmoto-sdl.o + +MODULE_DIRS += \ + backends/platform/linuxmoto/ + +# We don't use the rules.mk here on purpose +OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS) + +MODULE := backends/platform/sdl + +MODULE_OBJS := \ + events.o \ + graphics.o \ + hardwarekeys.o \ + main.o \ + sdl.o + +MODULE_DIRS += \ + backends/platform/sdl/ + +# We don't use the rules.mk here on purpose +OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS) + diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index feb2c9a9c5c..e6c8d716e3c 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -186,6 +186,8 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { } while (SDL_PollEvent(&ev)) { + preprocessEvents(&ev); + switch (ev.type) { case SDL_KEYDOWN:{ b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState()); diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp index 021bda155c0..fa8f6ededb2 100644 --- a/backends/platform/sdl/main.cpp +++ b/backends/platform/sdl/main.cpp @@ -37,7 +37,7 @@ #include "SymbianOs.h" #endif -#if !defined(__MAEMO__) && !defined(_WIN32_WCE) && !defined(GP2XWIZ) +#if !defined(__MAEMO__) && !defined(_WIN32_WCE) && !defined(GP2XWIZ)&& !defined(LINUXMOTO) #if defined (WIN32) int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*iShowCmd*/) { diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 7c1107582b9..a4f4114d108 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -695,7 +695,6 @@ void OSystem_SDL::mixCallback(void *sys, byte *samples, int len) { void OSystem_SDL::setupMixer() { SDL_AudioSpec desired; - SDL_AudioSpec obtained; // Determine the desired output sampling frequency. _samplesPerSec = 0; @@ -725,7 +724,7 @@ void OSystem_SDL::setupMixer() { _mixer = new Audio::MixerImpl(this); assert(_mixer); - if (SDL_OpenAudio(&desired, &obtained) != 0) { + if (SDL_OpenAudio(&desired, &_obtained) != 0) { warning("Could not open audio device: %s", SDL_GetError()); _samplesPerSec = 0; _mixer->setReady(false); @@ -733,7 +732,7 @@ void OSystem_SDL::setupMixer() { // Note: This should be the obtained output rate, but it seems that at // least on some platforms SDL will lie and claim it did get the rate // even if it didn't. Probably only happens for "weird" rates, though. - _samplesPerSec = obtained.freq; + _samplesPerSec = _obtained.freq; debug(1, "Output sample rate: %d Hz", _samplesPerSec); // Tell the mixer that we are ready and start the sound processing diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 3da9a433b71..e5c41e66114 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -216,6 +216,7 @@ public: virtual bool hasFeature(Feature f); virtual void setFeatureState(Feature f, bool enable); virtual bool getFeatureState(Feature f); + virtual void preprocessEvents(SDL_Event *event) {}; #ifdef USE_OSD void displayMessageOnOSD(const char *msg); @@ -230,6 +231,7 @@ public: protected: bool _inited; + SDL_AudioSpec _obtained; #ifdef USE_OSD SDL_Surface *_osdSurface; diff --git a/configure b/configure index d7b43f05cc1..d6060a4a4bc 100755 --- a/configure +++ b/configure @@ -555,7 +555,7 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (sdl, dc, gp2x, gp2xwiz, iphone, morphos, nds, psp, wii, wince, null) [sdl] + --backend=BACKEND backend to build (sdl, dc, gp2x, gp2xwiz, iphone, morphos, nds, psp, wii, wince, linuxmoto, null) [sdl] Installation directories: --prefix=DIR use this prefix for installing ScummVM [/usr/local] @@ -799,6 +799,16 @@ linupy) _host_os=linux _host_cpu=arm ;; +motoezx) + _host_os=linux + _host_cpu=arm + _host_alias=arm-linux-gnu + ;; +motomagx) + _host_os=linux + _host_cpu=arm + _host_alias=arm-linux-gnueabi + ;; arm-riscos) _host_os=riscos _host_cpu=arm @@ -1221,6 +1231,40 @@ if test -n "$_host"; then add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' ;; + motoezx) + echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" + DEFINES="$DEFINES -DUNIX -DMOTOEZX -DUSE_ARM_SMUSH_ASM" + #not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen + _endian=little + _need_memalign=yes + type_1_byte='char' + type_2_byte='short' + type_4_byte='int' + add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' + add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' + _ar="$_host_alias-ar cru" + _as="$_host_alias-as -mfpu=vfp" + _ranlib=$_host_alias-ranlib + _strip=$_host_alias-strip + _backend="linuxmoto" + ;; + motomagx) + echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" + DEFINES="$DEFINES -DUNIX -DMOTOMAGX -DUSE_ARM_SMUSH_ASM" + #not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen + _endian=little + _need_memalign=yes + type_1_byte='char' + type_2_byte='short' + type_4_byte='int' + add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' + add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' + _ar="$_host_alias-ar cru" + _as="$_host_alias-as -mfpu=vfp" + _ranlib=$_host_alias-ranlib + _strip=$_host_alias-strip + _backend="linuxmoto" + ;; bfin*) _need_memalign=yes ;; @@ -2073,6 +2117,12 @@ case $_backend in LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" DEFINES="$DEFINES -DSDL_BACKEND" ;; + linuxmoto) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND -DLINUXMOTO" + ;; gp2x) find_sdlconfig INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" @@ -2291,6 +2341,7 @@ LIBS += $LIBS RANLIB := $_ranlib STRIP := $_strip AR := $_ar +AS := $_as WINDRES := $_windres WIN32PATH=$_win32path AOS4PATH=$_aos4path diff --git a/dists/motoezx/scummvm-sm.png b/dists/motoezx/scummvm-sm.png new file mode 100644 index 0000000000000000000000000000000000000000..e6341243c4798067dc13bd061ccbc7a7bb8b3ffc GIT binary patch literal 1435 zcmV;M1!Ve(P)c3* z3tiO&e$a$q*1DBH9Cpsm8RL`5Y~^##wKgxyKwcJzVri|-(x}k}01(l8zY3lCD<@6j zJg*pIs?ql>AcSQ$Bcp$Zsd zJYwEC0O$>~&F#URcdqTcy*22&;bu>e5&)=o)4Wkt^z8AogT2|e5AwxSSA{dm5<=2g z-neo7tFIneYcBz$oy6LfF@9yM^Scjre({Ibwl=MXDX59J5w=UuGVcH>005(DIj7$~ z-rxIX{`9dq{1-Zj=)n5SPn*P6RlItGRS zif-lzffh%(p1XQDn;e?NxPg2AApYcUyqvvg&kDdU0(@|U5XR}R|M=SOpR6@|#rKa? zVbNQg!?D(2f`McpHAUil0RZF0TxLns&o+Nl?|ssmS|WlmS_t_<^Rw)|UZ#vjM8V0s zA8;ZoHGPC<;pBl2Q?ME%Qu9aPob)|FNtJ+ewqCZ?|rmThhd3|Fge0 z`6&Si08kb6s>AC&h!PP(=w`{E|H|I{O-m+~&OIli#ODaHgBoR09K*B2=;#SQenL-= z+S60bBIAiKPWbBgFJ_0edk`lvA!w`v(%gJI?P0J50IdiFM!Eu=^0L?47;MzH?p)t} z@AbR8;`O_U^0Q{is)eV7nzoJNbA8qU8>3#MRPbKSlGdvmSNg;@)FBbW5N3pI#=*Ey z7El8s64f6iy^Z?nZE^dZq*2xMh&mexAuk0KMV)4;wXJU4J1VOWZo`?l%^?Y zJaiZ#WD(=Rd*f>Be7!s+(dq4<`6{<32Q+wcv556iu^K^AMwGC{ggp5grpHVvkFM_$ zSE|L_hluuD?^GyqV>Bd(vy&!|6|tjDIQSA(MF8M(K-x*IZ3*IN(EZi>Z(X@cCSx_; z_ebB*{jc5lfY_EKeU3@T2G)3Vz{}-P+tO*_nx$)y9PfwngkBC{j0wq|bClBE-@kG1 z!yo_Tx7WAt$Yg-Rr$&d9r+DyhaV_1s`Bqo8CPA8OGM*f(vbQ|Vwf3gA(|xuAoT+qv z4`eKi(TEsD^yl|RPR=Z^dppg$uOggo7gJr%A^=E+x@kQpVWv%$kL#QkdvsA+8Jj9(>BVwW;tm}9$aSXih8g>k^1Fx zRC!ptTjw7#<^X_{Zry=5-fR2Yz~j)36XPouO8{Uk1Auwc06?%%)`TkC8b&aXnCN4C z^v`HEhSe@AmgPENHKsPt~Koko^7ee4Mni{R~)>-cyQX0G$g2!>($>K+QhnM%@ zqGegEv;lx_H`T_jq=Wxm{r@eLOToC{RZ(Z1bo_j}mg=Riij_$zob%qhS6;c=w&ydF pa|QrMM-xO!DI${QvL^)q{0GWH1B)+E$9Mn$002ovPDHLkV1n$Jz1{!- literal 0 HcmV?d00001 diff --git a/dists/motoezx/scummvm.desktop b/dists/motoezx/scummvm.desktop new file mode 100644 index 00000000000..ddd8ad7f57a --- /dev/null +++ b/dists/motoezx/scummvm.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +BigIcon=scummvm.png +Comment=ScummVM +Exec=scummvm.lin +Icon=scummvm-sm.png +Name=ScummVM +OsVersion=0.1 +Shared=0 +Type=Application diff --git a/dists/motoezx/scummvm.lin b/dists/motoezx/scummvm.lin new file mode 100644 index 00000000000..a3c6f3831b4 --- /dev/null +++ b/dists/motoezx/scummvm.lin @@ -0,0 +1,10 @@ +#!/bin/sh +. /home/native/.profile +myfile=`basename $0` +mypath=`echo $0 | sed -e 's/'$myfile'//g'` +export LD_LIBRARY_PATH=/mmc/mmca1/games/lib:$LD_LIBRARY_PATH +#export SDL_QT_INVERT_ROTATION=1 +export SDL_QT_MODIFICATOR=1 +export HOME=/mmc/mmca1/games +cd $mypath +exec $mypath/scummvm --path=/mmc/mmca1/games/data --gfx-mode=1x > /mmc/mmca1/games/logs/scummvm.log 2>&1 diff --git a/dists/motoezx/scummvm.png b/dists/motoezx/scummvm.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0c65b5442834d4fcaeb6305283627505891568 GIT binary patch literal 1681 zcmcJL`%e>h0KmUcv{1kmWg;&*4MH)lN}-6Y70UHWi?nyUD-_&G?dVxLdp&FqDJYW} zHy#lM94KH|WPrk?Mw}?f%Pk5Ui{gyp#%9L3N{txq$e184>@F~Nz$-cZG z9ss~sty16s0O*aL8~}i#x%>(M9Dt?j5U$q(p0C$Cev20S^Ogqr1c!P12l_1w@CywM z2#Ht}zSb9td^bEiG(yaal6b~!;>B(ZTo)ZF+b9wwE)=00vC3PT#fgWbkPLpJR-n#Y znVRF1Qs9B^1?hRdTXLeQ-3i-wYg0=+(hhliQ0B3FH{LkI< zzu@ew^I;Dq6jjIUX!F|nHs-*kCZ`-t@91Ci^7{PdWmbwci%+WKY=U4T#y+{PMM3UknMh}0Q@ z%7)2Iav0J{2o*^o7@J{db&N%3wh8TK*yuoMQUeW2l~Y2?ABgpS2K6W6xGyE23UxC{ z%o8~~p)<}%t&fDz6Bq^>CRIVBQaV{^MAL2BBojeUh}4b?L3%ojBr!Nb%cL|ZWXKd- z41py}?Szogq?iF=*CNI=DXkGIlk^sZu;NO}Aa$TZnNklM2nnVlae$$i9mW|1H50I% zK#V9s;{-&YN*Qhu8LU7~p}2#9Ntp`Ps~L-qwjs0$W*D6zl8 z954cy#n2pFBSSG5PLm)yl0Yy5x1(AHmzxb5yBaYnWHb^3X_J*Y!lKq#m4H&i4um0b z8j}&QGZ%`d;J9oClG&87%_yO0GTWkOt!hhwb{C|uM5C-&UjPx1h9npVV=Ayxjyx;N zLX>4a&4^=ckccEmDVq&bv?SL=<_h%|N^Ns$&6ENHs0h)o(GZZFl&c+isRgXekpr`o zgtCz|tBA2MqU>y`JP+2;5(Py9n;v7;xI>FV3fPDu-usaN0NenJYl-={26$`b|C1d8 z`DOsz6V(d2&UuVFTxM@d^hX+&x&^kaSzYfJdx<88OG~{4O%t^ylYe&X{QQa=9i{PE z-#={sxMcj=82O}VRZv;?&u+(8UMTHe0NshyCiD)@gL#d6V&dGgB@3VI(7kMV_WJqr z=*Lr!qe^$(9|D7~A6y+Xo*!Q>?r3iEnAv9rp>>U6yY5`6D>!(MK2el8HF3soBDnI| zw;!JhzMC80ut7O+=V4qnztPQ|kG}f%N^D_8&oA)mk%v91OM`Cws^|AUnyBwnZWfM> zP?^^+hWLam11k?-yE&Yz>1()nabP5UG$m}>T>Q|r{?>5kti0BPopohQYV+nj6Tg~H z;N)-Yit9`HtYyW>`zH!Vn=fQ#az^SZdViXod~r>%-^lg!(ryi`6)%@IP9Il)7g)V8 z0Ia|CLURLII$1Ss4IRIVuPB*p7THgWMY5?0=he}5_>sMzxT!F!>*ji&Uw6vJ(}M~( z6#A}shAjq)C{P(%htY;5qpM7(yeu0{=hy$ZzNnHWM1!ppZ8PiXOnZOys{4H8w8QZ4YT9?ZI1oM1l~(BfVj?&Zn<)W4$jMUicB{-vjL z+erBLZq;08DIvJ6sJ?f0kEm{2RLFrLO!&`jzQ6iPZp0`j%vFtWug~aT{ua^eYtPDvwb;bvmcR?mp_BbvE2S3IG6VM5}NmZQJ)B(Ty+J literal 0 HcmV?d00001 diff --git a/gui/credits.h b/gui/credits.h index 21f69d4465a..9a9bd4deb5d 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -180,6 +180,9 @@ static const char *credits[] = { "C1""iPhone", "C0""Oystein Eftevaag", "", +"C1""LinuxMoto", +"C0""Lubomyr Lisen", +"", "C1""Maemo", "C0""Frantisek Dufka", "", diff --git a/ports.mk b/ports.mk index 6fc2796cc8e..84c9845ee07 100644 --- a/ports.mk +++ b/ports.mk @@ -204,7 +204,21 @@ ifneq ($(DIST_FILES_ENGINEDATA),) endif $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip wiidist/scummvm/ -.PHONY: deb bundle osxsnap win32dist wiidist install uninstall +# +# Linuxmoto/motoezx specific +# + +# Special target to create a motoezx snapshot +motoezx: $(EXECUTABLE) + $(MKDIR) motoezx/scummvm + $(CP) $(EXECUTABLE) motoezx/scummvm/ + $(STRIP) motoezx/scummvm/$(EXECUTABLE) + $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) motoezx/scummvm/ + $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip motoezx/scummvm/ + $(CP) $(srcdir)/dists/motoezx/* motoezx/scummvm/ + tar -C motoezx -cvzf motoezx/ScummVM.pkg scummvm + +.PHONY: deb bundle osxsnap win32dist wiidist motoezx install uninstall # # ARM specific diff --git a/tools/credits.pl b/tools/credits.pl index ad006b2aee9..dbe098a6522 100755 --- a/tools/credits.pl +++ b/tools/credits.pl @@ -646,6 +646,10 @@ begin_credits("Credits"); add_person("Oystein Eftevaag", "vinterstum", ""); end_section(); + begin_section("LinuxMoto"); + add_person("Lubomyr Lisen", "", ""); + end_section(); + begin_section("Maemo"); add_person("Frantisek Dufka", "fanoush", ""); end_section();