diff -Naur scummvm.orig/debian/changelog scummvm-0.9/debian/changelog --- scummvm.orig/debian/changelog 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/changelog 2007-06-18 21:17:16.000000000 +0200 @@ -0,0 +1,30 @@ +scummvm (0.9.1-1) unstable; urgency=low + + * 0.9.1 mapped right mouse button in sword1 + + -- Frantisek Dufka Mon, 18 Jun 2007 21:15:31 +0200 +scummvm (0.9.1) unstable; urgency=low + + * 0.9.1 upstream release + + -- Frantisek Dufka Wed, 1 Nov 2006 20:40:51 +0100 +scummvm (0.9.0-3) unstable; urgency=low + + * merged fixes in 0.9.0 upstream branch + + -- Frantisek Dufka Mon, 9 Oct 2006 15:40:59 +0200 +scummvm (0.9.0-2) unstable; urgency=low + + * merged fixes in 0.9.0 upstream branch + + -- Frantisek Dufka Sat, 12 Aug 2006 20:10:47 +0200 +scummvm (0.9.0-1) unstable; urgency=low + + * merged changes in 0.9.0 upstream release + + -- Frantisek Dufka Sun, 23 Jul 2006 22:29:51 +0200 +scummvm (0.9.0) unstable; urgency=low + + * 0.9.0 upstream release + + -- Frantisek Dufka Tue, 27 Jun 2006 20:30:54 +0200 diff -Naur scummvm.orig/debian/compat scummvm-0.9/debian/compat --- scummvm.orig/debian/compat 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/compat 2006-04-29 21:48:06.000000000 +0200 @@ -0,0 +1 @@ +4 diff -Naur scummvm.orig/debian/control scummvm-0.9/debian/control --- scummvm.orig/debian/control 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/control 2006-06-16 08:33:13.000000000 +0200 @@ -0,0 +1,13 @@ +Source: scummvm +Section: user/games +Priority: optional +Maintainer: Frantisek Dufka +Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev +Standards-Version: 3.6.1.1 + +Package: scummvm +Architecture: any +Section: user/games +Description: free implementation of LucasArts' S.C.U.M.M interpreter + ScummVM is a virtual machine for classic graphical adventure games. + This package does not contain any actual games. diff -Naur scummvm.orig/debian/copyright scummvm-0.9/debian/copyright --- scummvm.orig/debian/copyright 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/copyright 2006-04-29 21:48:06.000000000 +0200 @@ -0,0 +1,19 @@ +ScummVM was debianized by Bastien Nocera the 5th Apr 2002. +It was adopted by Tore Anderson the 4th Oct 2002. +Packaged for the Maemo platform by Tomas Junnoen Oct 2005 + +It was downloaded from . + +Upstream Authors: see AUTHORS file of the ScummVM source distribution. + +Copyright: + + 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, or (at your option) any + later version. + + On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL'. + +This copyright also applies to the Debian-related build scripts. diff -Naur scummvm.orig/debian/files scummvm-0.9/debian/files --- scummvm.orig/debian/files 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/files 2007-06-18 21:18:06.000000000 +0200 @@ -0,0 +1 @@ +scummvm_0.9.1-1_armel.deb user/games optional diff -Naur scummvm.orig/debian/rules scummvm-0.9/debian/rules --- scummvm.orig/debian/rules 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/rules 2006-06-21 14:04:45.000000000 +0200 @@ -0,0 +1,46 @@ +#!/usr/bin/make -f + +build: scummvm + +scummvm: + dh_testdir +# ./configure --disable-debug --disable-mt32emu --disable-hq-scalers --with-tremor-prefix=/usr --enable-tremor +# CXXFLAGS="-mcpu=arm926ej-s -fno-exceptions -fno-rtti -fomit-frame-pointer -DMAEMO_SDL -Os" ./configure --disable-debug --disable-mt32emu --disable-hq-scalers --with-tremor-prefix=/usr --enable-tremor --with-zlib-prefix=/usr --enable-zlib --with-mad-prefix=/usr --enable-mad +#--disable-scumm-7-8 +# CXXFLAGS="-mcpu=arm926ej-s -fno-exceptions -fno-rtti -fomit-frame-pointer -DMAEMO_SDL -Os -I/usr/X11R6/include" ./configure --disable-debug --disable-mt32emu --disable-hq-scalers --with-tremor-prefix=/usr --enable-tremor --with-zlib-prefix=/usr --enable-zlib --with-mad-prefix=/usr --enable-mad --with-mpeg2-prefix=/usr + $(MAKE) + +clean: + dh_testdir + dh_testroot + -$(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs + install -m0755 scummvm debian/scummvm/usr/games/scummvm.bin + install -m0755 scummvm.wrapper debian/scummvm/usr/games/scummvm + install -m0644 icons/scummvm.xpm debian/scummvm/usr/share/icons + install -m0644 scummvm.desktop debian/scummvm/usr/share/applications/hildon + +binary: binary-arch + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs NEWS + dh_link + dh_strip + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + +.PHONY: build clean binary install binary-arch binary-indep diff -Naur scummvm.orig/debian/scummvm.dirs scummvm-0.9/debian/scummvm.dirs --- scummvm.orig/debian/scummvm.dirs 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/scummvm.dirs 2006-06-16 08:04:14.000000000 +0200 @@ -0,0 +1,3 @@ +usr/games +usr/share/icons +usr/share/applications/hildon diff -Naur scummvm.orig/debian/scummvm.links scummvm-0.9/debian/scummvm.links --- scummvm.orig/debian/scummvm.links 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/scummvm.links 2006-04-29 21:48:06.000000000 +0200 @@ -0,0 +1 @@ +/var/lib/install/usr/share/applications/scummvm.desktop /etc/others-menu/extra_applications/scummvm.desktop diff -Naur scummvm.orig/debian/scummvm.substvars scummvm-0.9/debian/scummvm.substvars --- scummvm.orig/debian/scummvm.substvars 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/debian/scummvm.substvars 2007-06-18 21:18:04.000000000 +0200 @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.3.5-1), libgcc1 (>= 1:3.4.4), libsdl1.2, libstdc++6 (>= 3.4.4), libx11-6 | xlibs (>> 4.1.0), zlib1g (>= 1:1.2.1) --- scummvm.orig/scummvm.desktop 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/scummvm.desktop 2006-06-15 22:33:59.000000000 +0200 @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Name=ScummVM +Exec=/usr/games/scummvm +Icon=scummvm +X-Icon-path=/usr/share/icons +X-Window-Icon=scummvm +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable --- scummvm.orig/scummvm.wrapper 1970-01-01 01:00:00.000000000 +0100 +++ scummvm-0.9/scummvm.wrapper 2006-04-29 21:54:25.000000000 +0200 @@ -0,0 +1,6 @@ +#!/bin/sh +# wrapper for proper WM_CLASS name in SDL apps (needed for icon in taskbar) +#BASEDIR=`dirname $0` +BASENAME=`basename $0` +export SDL_VIDEO_X11_WMCLASS=${BASENAME} +exec ${0}.bin "$@" --- scummvm.orig/engines/sword1/sword1.cpp 2007-05-26 21:43:18.000000000 +0200 +++ scummvm-0.9/engines/sword1/sword1.cpp 2007-06-18 17:03:54.000000000 +0200 @@ -594,13 +594,28 @@ // Make sure backspace works right (this fixes a small issue on OS X) if (event.kbd.keycode == 8) _keyPressed = 8; +#ifdef MAEMO_SDL +// map center to right button + else if (event.kbd.keycode == 13) { + _mouseState |= BS1R_BUTTON_DOWN; + } +#endif else _keyPressed = (uint8)event.kbd.ascii; break; + +#ifdef MAEMO_SDL + case OSystem::EVENT_KEYUP: + if (event.kbd.keycode == 13) { + _mouseState |= BS1R_BUTTON_UP; + } + break; +#endif case OSystem::EVENT_MOUSEMOVE: _mouseX = event.mouse.x; _mouseY = event.mouse.y; break; +//#ifndef MAEMO_SDL case OSystem::EVENT_LBUTTONDOWN: _mouseState |= BS1L_BUTTON_DOWN; #if defined(_WIN32_WCE) || defined(PALMOS_MODE) @@ -621,6 +636,13 @@ case OSystem::EVENT_RBUTTONUP: _mouseState |= BS1R_BUTTON_UP; break; +//#else +//// maemo - we have touchscreen, mouse buttons are ignored, mouse is just moved +// case OSystem::EVENT_LBUTTONDOWN: +// _mouseX = event.mouse.x; +// _mouseY = event.mouse.y; +// break; +//#endif case OSystem::EVENT_QUIT: _systemVars.engineQuit = true; break; --- scummvm.orig/engines/scumm/input.cpp 2007-05-26 21:43:41.000000000 +0200 +++ scummvm-0.9/engines/scumm/input.cpp 2006-06-03 09:22:16.000000000 +0200 @@ -100,7 +100,35 @@ // cursor control by itself. Also it fixes derby scene _keyPressed = event.kbd.ascii; // Normal key press, pass on to the game. } - +#ifdef MAEMO_SDL +// Maemo platform keybindings +if (_keyPressed == 318) // Map F4 (menu) to F5 (access main menu) + _keyPressed = 319; +if (_keyPressed == 13) // Map Select (return) to Tab (right mouse button) + _keyPressed = 9; +if (_keyPressed == 321) // Map F7 (zoom in) to 1 (to bypass Monkey2 copy protection) + _keyPressed = 49; // 1 +if (_keyPressed == 322) // Map F8 (zoom out) to toggle fast mode + _fastMode ^= 1; +if (event.kbd.ascii == 273) // Map Up to space (pause game) + _keyPressed = 32; +if (event.kbd.ascii == 274) // Map Down to . (skip one line of dialog) + _keyPressed = 46; + +// Map Right to increase talk speed +// Map Left to decrease talk speed +if (event.kbd.ascii == 275 || event.kbd.ascii == 276) { + if (event.kbd.ascii == 275 && _defaultTalkDelay < 9) + _defaultTalkDelay++; + if (event.kbd.ascii == 276 && _defaultTalkDelay > 0) + _defaultTalkDelay--; + ValueDisplayDialog dlg("Talk speed: ", 0, 9, _defaultTalkDelay, '+', '-'); + _defaultTalkDelay = runDialog(dlg); + + if (VAR_CHARINC != 0xFF) + VAR(VAR_CHARINC) = _defaultTalkDelay; +} +#endif if (_game.heversion >= 80) { // Keyboard is controlled via variable int _keyState = 0; @@ -356,13 +384,15 @@ runDialog(dialog); return; } - +#ifdef MAEMO_SDL + // Disable restart dialog as we are using that key for zoomout/fast mode +#else if (VAR_RESTART_KEY != 0xFF && _lastKeyHit == VAR(VAR_RESTART_KEY) || (((_game.version <= 2) || (_game.platform == Common::kPlatformFMTowns && _game.version == 3)) && _lastKeyHit == 8)) { confirmRestartDialog(); return; } - +#endif if ((VAR_PAUSE_KEY != 0xFF && _lastKeyHit == VAR(VAR_PAUSE_KEY)) || (VAR_PAUSE_KEY == 0xFF && _lastKeyHit == ' ')) { pauseGame(); --- scummvm.orig/engines/scumm/dialogs.cpp 2007-05-26 21:43:41.000000000 +0200 +++ scummvm-0.9/engines/scumm/dialogs.cpp 2006-10-09 15:16:47.000000000 +0200 @@ -846,7 +846,11 @@ } void PauseDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) { +#ifdef MAEMO_SDL + if (ascii == ' ' || keycode==273 ) // Close pause dialog if space or UP key is pressed +#else if (ascii == ' ') // Close pause dialog if space key is pressed +#endif close(); else ScummDialog::handleKeyDown(ascii, keycode, modifiers); @@ -905,12 +909,19 @@ } void ValueDisplayDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) { +#ifdef MAEMO_SDL + if (ascii == _incKey || ascii == _decKey || keycode == 275 || keycode == 276) { + if ((ascii == _incKey || keycode == 275 ) && _value < _max) + _value++; + else if ((ascii == _decKey || keycode == 276) && _value > _min) + _value--; +#else if (ascii == _incKey || ascii == _decKey) { if (ascii == _incKey && _value < _max) _value++; else if (ascii == _decKey && _value > _min) _value--; - +#endif setResult(_value); _timer = getMillis() + kDisplayDelay; draw(); --- scummvm.orig/engines/sky/sky.cpp 2007-05-26 21:43:57.000000000 +0200 +++ scummvm-0.9/engines/sky/sky.cpp 2006-05-05 18:09:53.000000000 +0200 @@ -488,6 +488,17 @@ _keyPressed = event.kbd.keycode; else _keyPressed = (byte)event.kbd.ascii; +#ifdef MAEMO_SDL +// Maemo platform keybindings +if (_keyPressed == 62) // Map F4 (menu) to F5 (access main menu) + _keyPressed = 63; +if (_keyPressed == 13) // Map Select=Enter to right mouse button + _skyMouse->buttonPressed(1); +if (_keyPressed == 66) // Map F8 (zoom out) to toggle fast mode + _fastMode ^= 1; +if (_keyPressed == 18) // Map Down to . (skip one line of dialog) + _keyPressed = 46; +#endif break; case OSystem::EVENT_MOUSEMOVE: if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED)) { --- scummvm.orig/engines/gob/util.cpp 2007-05-26 21:44:15.000000000 +0200 +++ scummvm-0.9/engines/gob/util.cpp 2006-06-03 09:22:20.000000000 +0200 @@ -158,9 +158,21 @@ _mouseButtons &= ~2; break; case OSystem::EVENT_KEYDOWN: +#ifdef MAEMO_SDL + if (event.kbd.keycode==285){ // simulate right button press + _mouseButtons |= 2; + } else + addKeyToBuffer(event.kbd.keycode); +#else addKeyToBuffer(event.kbd.keycode); +#endif break; case OSystem::EVENT_KEYUP: +#ifdef MAEMO_SDL + if (event.kbd.keycode==285){ // simulate right button release + _mouseButtons &= ~2; + } +#endif break; case OSystem::EVENT_QUIT: _vm->_quitRequested = true; --- scummvm.orig/engines/queen/input.cpp 2007-05-26 21:44:27.000000000 +0200 +++ scummvm-0.9/engines/queen/input.cpp 2006-04-30 11:40:06.000000000 +0200 @@ -179,7 +179,11 @@ } break; case KEY_F1: // use Journal +#ifdef MAEMO_SDL + case KEY_F4: // menu key on N770 +#else case KEY_F5: +#endif if (_cutawayRunning) { if (_canQuit) { _keyVerb = VERB_USE_JOURNAL; --- scummvm.orig/engines/queen/input.h 2007-05-26 21:44:27.000000000 +0200 +++ scummvm-0.9/engines/queen/input.h 2006-04-30 11:40:35.000000000 +0200 @@ -110,6 +110,7 @@ KEY_F1 = 282, KEY_F11 = KEY_F1 + 10, + KEY_F4 = KEY_F1 + 3, KEY_F5 = KEY_F1 + 4, KEY_F12 }; --- scummvm.orig/backends/sdl/sdl.cpp 2007-05-26 21:44:45.000000000 +0200 +++ scummvm-0.9/backends/sdl/sdl.cpp 2006-06-21 13:43:01.000000000 +0200 @@ -102,6 +102,34 @@ } #endif +#ifdef MAEMO_SDL +#include + +void SDL_X11_SetNetWMWindowTypeNormal(){ + SDL_SysWMinfo wminfo; + SDL_VERSION(&wminfo.version); + if (SDL_GetWMInfo(&wminfo)){ + Atom atoms[1] = { None }; + Atom net_wm_window_type; + + net_wm_window_type = XInternAtom (wminfo.info.x11.display, + "_NET_WM_WINDOW_TYPE", False); + + atoms[0] = XInternAtom (wminfo.info.x11.display, + "_NET_WM_WINDOW_TYPE_NORMAL", + False); + + XChangeProperty ( wminfo.info.x11.display, + wminfo.info.x11.wmwindow, + net_wm_window_type, + XA_ATOM, 32, PropModeReplace, + (unsigned char *)atoms, 1); + + } +} + +#endif + void OSystem_SDL::initBackend() { assert(!_inited); @@ -124,7 +152,9 @@ if (SDL_Init(sdlFlags) == -1) { error("Could not initialize SDL: %s", SDL_GetError()); } - +#ifdef MAEMO_SDL + SDL_X11_SetNetWMWindowTypeNormal(); +#endif _graphicsMutex = createMutex(); SDL_ShowCursor(SDL_DISABLE); --- scummvm.orig/backends/sdl/events.cpp 2007-05-26 21:44:45.000000000 +0200 +++ scummvm-0.9/backends/sdl/events.cpp 2006-05-22 15:40:10.000000000 +0200 @@ -189,8 +189,13 @@ b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState()); // Alt-Return and Alt-Enter toggle full screen mode - if (b == KBD_ALT && (ev.key.keysym.sym == SDLK_RETURN - || ev.key.keysym.sym == SDLK_KP_ENTER)) { + if ( +#ifdef MAEMO_SDL + ev.key.keysym.sym == SDLK_F6 || +#endif + b == KBD_ALT && (ev.key.keysym.sym == SDLK_RETURN + || ev.key.keysym.sym == SDLK_KP_ENTER) + ) { setFullscreenMode(!_fullscreen); #ifdef USE_OSD if (_fullscreen) --- scummvm.orig/Makefile 2007-05-26 21:46:01.000000000 +0200 +++ scummvm-0.9/Makefile 2006-07-23 21:49:18.000000000 +0200 @@ -19,7 +19,7 @@ include config.mak CXXFLAGS:= -Wall $(CXXFLAGS) -CXXFLAGS+= -O -Wuninitialized +CXXFLAGS+= -Os -Wuninitialized CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas # Even more warnings... CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion