[Scummvm-cvs-logs] SF.net SVN: scummvm:[43636] scummvm/trunk

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Aug 22 14:35:49 CEST 2009


Revision: 43636
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43636&view=rev
Author:   sev
Date:     2009-08-22 12:35:49 +0000 (Sat, 22 Aug 2009)

Log Message:
-----------
Patch #2826508: "Motorola A1200/E6/A1600 (motoezx) patch"

Modified Paths:
--------------
    scummvm/trunk/AUTHORS
    scummvm/trunk/backends/platform/sdl/events.cpp
    scummvm/trunk/backends/platform/sdl/main.cpp
    scummvm/trunk/backends/platform/sdl/sdl.cpp
    scummvm/trunk/backends/platform/sdl/sdl.h
    scummvm/trunk/configure
    scummvm/trunk/gui/credits.h
    scummvm/trunk/ports.mk
    scummvm/trunk/tools/credits.pl

Added Paths:
-----------
    scummvm/trunk/backends/platform/linuxmoto/
    scummvm/trunk/backends/platform/linuxmoto/hardwarekeys.cpp
    scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp
    scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.cpp
    scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.h
    scummvm/trunk/backends/platform/linuxmoto/main.cpp
    scummvm/trunk/backends/platform/linuxmoto/module.mk
    scummvm/trunk/dists/motoezx/
    scummvm/trunk/dists/motoezx/scummvm-sm.png
    scummvm/trunk/dists/motoezx/scummvm.desktop
    scummvm/trunk/dists/motoezx/scummvm.lin
    scummvm/trunk/dists/motoezx/scummvm.png

Modified: scummvm/trunk/AUTHORS
===================================================================
--- scummvm/trunk/AUTHORS	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/AUTHORS	2009-08-22 12:35:49 UTC (rev 43636)
@@ -159,6 +159,9 @@
     iPhone:
        Oystein Eftevaag     
 
+    LinuxMoto:
+       Lubomyr Lisen        
+
     Maemo:
        Frantisek Dufka      
 

Added: scummvm/trunk/backends/platform/linuxmoto/hardwarekeys.cpp
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/hardwarekeys.cpp	                        (rev 0)
+++ scummvm/trunk/backends/platform/linuxmoto/hardwarekeys.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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();
+}


Property changes on: scummvm/trunk/backends/platform/linuxmoto/hardwarekeys.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp	                        (rev 0)
+++ scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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;
+}


Property changes on: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.cpp	                        (rev 0)
+++ scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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();
+}


Property changes on: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.h
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.h	                        (rev 0)
+++ scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.h	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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


Property changes on: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-sdl.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/backends/platform/linuxmoto/main.cpp
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/main.cpp	                        (rev 0)
+++ scummvm/trunk/backends/platform/linuxmoto/main.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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;
+}


Property changes on: scummvm/trunk/backends/platform/linuxmoto/main.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/backends/platform/linuxmoto/module.mk
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/module.mk	                        (rev 0)
+++ scummvm/trunk/backends/platform/linuxmoto/module.mk	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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)
+


Property changes on: scummvm/trunk/backends/platform/linuxmoto/module.mk
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Modified: scummvm/trunk/backends/platform/sdl/events.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/events.cpp	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/backends/platform/sdl/events.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -186,6 +186,8 @@
 	}
 
 	while (SDL_PollEvent(&ev)) {
+		preprocessEvents(&ev);
+
 		switch (ev.type) {
 		case SDL_KEYDOWN:{
 			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());

Modified: scummvm/trunk/backends/platform/sdl/main.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/main.cpp	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/backends/platform/sdl/main.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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*/) {

Modified: scummvm/trunk/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.cpp	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/backends/platform/sdl/sdl.cpp	2009-08-22 12:35:49 UTC (rev 43636)
@@ -695,7 +695,6 @@
 
 void OSystem_SDL::setupMixer() {
 	SDL_AudioSpec desired;
-	SDL_AudioSpec obtained;
 
 	// Determine the desired output sampling frequency.
 	_samplesPerSec = 0;
@@ -725,7 +724,7 @@
 	_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 @@
 		// 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

Modified: scummvm/trunk/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.h	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/backends/platform/sdl/sdl.h	2009-08-22 12:35:49 UTC (rev 43636)
@@ -216,6 +216,7 @@
 	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 @@
 
 protected:
 	bool _inited;
+	SDL_AudioSpec _obtained;
 
 #ifdef USE_OSD
 	SDL_Surface *_osdSurface;

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/configure	2009-08-22 12:35:49 UTC (rev 43636)
@@ -555,7 +555,7 @@
 
 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 @@
 	_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 @@
 			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 @@
 		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 @@
 RANLIB := $_ranlib
 STRIP := $_strip
 AR := $_ar
+AS := $_as
 WINDRES := $_windres
 WIN32PATH=$_win32path
 AOS4PATH=$_aos4path

Added: scummvm/trunk/dists/motoezx/scummvm-sm.png
===================================================================
(Binary files differ)


Property changes on: scummvm/trunk/dists/motoezx/scummvm-sm.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: scummvm/trunk/dists/motoezx/scummvm.desktop
===================================================================
--- scummvm/trunk/dists/motoezx/scummvm.desktop	                        (rev 0)
+++ scummvm/trunk/dists/motoezx/scummvm.desktop	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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


Property changes on: scummvm/trunk/dists/motoezx/scummvm.desktop
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: scummvm/trunk/dists/motoezx/scummvm.lin
===================================================================
--- scummvm/trunk/dists/motoezx/scummvm.lin	                        (rev 0)
+++ scummvm/trunk/dists/motoezx/scummvm.lin	2009-08-22 12:35:49 UTC (rev 43636)
@@ -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


Property changes on: scummvm/trunk/dists/motoezx/scummvm.lin
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: scummvm/trunk/dists/motoezx/scummvm.png
===================================================================
(Binary files differ)


Property changes on: scummvm/trunk/dists/motoezx/scummvm.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Modified: scummvm/trunk/gui/credits.h
===================================================================
--- scummvm/trunk/gui/credits.h	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/gui/credits.h	2009-08-22 12:35:49 UTC (rev 43636)
@@ -180,6 +180,9 @@
 "C1""iPhone",
 "C0""Oystein Eftevaag",
 "",
+"C1""LinuxMoto",
+"C0""Lubomyr Lisen",
+"",
 "C1""Maemo",
 "C0""Frantisek Dufka",
 "",

Modified: scummvm/trunk/ports.mk
===================================================================
--- scummvm/trunk/ports.mk	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/ports.mk	2009-08-22 12:35:49 UTC (rev 43636)
@@ -204,8 +204,22 @@
 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
 #

Modified: scummvm/trunk/tools/credits.pl
===================================================================
--- scummvm/trunk/tools/credits.pl	2009-08-22 11:03:00 UTC (rev 43635)
+++ scummvm/trunk/tools/credits.pl	2009-08-22 12:35:49 UTC (rev 43636)
@@ -646,6 +646,10 @@
 		  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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list