diff options
-rw-r--r-- | AUTHORS | 3 | ||||
-rw-r--r-- | backends/platform/linuxmoto/hardwarekeys.cpp | 100 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-events.cpp | 190 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-sdl.cpp | 69 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-sdl.h | 46 | ||||
-rw-r--r-- | backends/platform/linuxmoto/main.cpp | 45 | ||||
-rw-r--r-- | backends/platform/linuxmoto/module.mk | 29 | ||||
-rw-r--r-- | backends/platform/sdl/events.cpp | 2 | ||||
-rw-r--r-- | backends/platform/sdl/main.cpp | 2 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 5 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 | ||||
-rwxr-xr-x | configure | 53 | ||||
-rw-r--r-- | dists/motoezx/scummvm-sm.png | bin | 0 -> 1435 bytes | |||
-rw-r--r-- | dists/motoezx/scummvm.desktop | 9 | ||||
-rw-r--r-- | dists/motoezx/scummvm.lin | 10 | ||||
-rw-r--r-- | dists/motoezx/scummvm.png | bin | 0 -> 1681 bytes | |||
-rw-r--r-- | gui/credits.h | 3 | ||||
-rw-r--r-- | ports.mk | 16 | ||||
-rwxr-xr-x | tools/credits.pl | 4 |
19 files changed, 582 insertions, 6 deletions
@@ -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 0000000000..2f64e7dbae --- /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 0000000000..2a40d734b0 --- /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 0000000000..bc163c807c --- /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 0000000000..27c423b071 --- /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 <SDL.h> + +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 0000000000..1e37fe617a --- /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 <common/scummsys.h> +#include <common/system.h> + +#include <SDL/SDL.h> +#include <SDL/SDL_syswm.h> + +#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 0000000000..4d816eb227 --- /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 feb2c9a9c5..e6c8d716e3 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 021bda155c..fa8f6ededb 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 7c1107582b..a4f4114d10 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 3da9a433b7..e5c41e6611 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; @@ -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 Binary files differnew file mode 100644 index 0000000000..e6341243c4 --- /dev/null +++ b/dists/motoezx/scummvm-sm.png diff --git a/dists/motoezx/scummvm.desktop b/dists/motoezx/scummvm.desktop new file mode 100644 index 0000000000..ddd8ad7f57 --- /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 0000000000..a3c6f3831b --- /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 Binary files differnew file mode 100644 index 0000000000..4a0c65b544 --- /dev/null +++ b/dists/motoezx/scummvm.png diff --git a/gui/credits.h b/gui/credits.h index 21f69d4465..9a9bd4deb5 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", "", @@ -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 ad006b2aee..dbe098a652 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(); |