[Scummvm-cvs-logs] SF.net SVN: scummvm: [25148] scummvm/trunk/backends/platform/PalmOS/Src/ base_mouse.cpp

chrilith at users.sourceforge.net chrilith at users.sourceforge.net
Sun Jan 21 15:18:25 CET 2007


Revision: 25148
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25148&view=rev
Author:   chrilith
Date:     2007-01-21 06:18:24 -0800 (Sun, 21 Jan 2007)

Log Message:
-----------
Speed up mouse emulation with hires games

Modified Paths:
--------------
    scummvm/trunk/backends/platform/PalmOS/Src/base_mouse.cpp

Modified: scummvm/trunk/backends/platform/PalmOS/Src/base_mouse.cpp
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/base_mouse.cpp	2007-01-21 14:15:35 UTC (rev 25147)
+++ scummvm/trunk/backends/platform/PalmOS/Src/base_mouse.cpp	2007-01-21 14:18:24 UTC (rev 25148)
@@ -45,17 +45,19 @@
 void OSystem_PalmBase::simulate_mouse(Event &event, Int8 iHoriz, Int8 iVert, Coord *xr, Coord *yr) {
 	Int16 x = _mouseCurState.x;
 	Int16 y = _mouseCurState.y;
-	Int16 slow;
+	Int16 slow, fact;
 
 	_lastKeyRepeat++;
+	fact = _screenWidth / 320;
+	fact = (fact) ? fact : 1;
 
-	if (_lastKeyRepeat > 32)
-		_lastKeyRepeat = 32;
+	if (_lastKeyRepeat > 32 * fact)
+		_lastKeyRepeat = 32 * fact;
 
 	slow = (iHoriz && iVert) ? 2 : 1;
 
-	x += iHoriz * (_lastKeyRepeat >> 2) / slow;
-	y += iVert * (_lastKeyRepeat >> 2) / slow;
+	x += iHoriz * (_lastKeyRepeat >> 2) / slow * fact;
+	y += iVert * (_lastKeyRepeat >> 2) / slow * fact;
 
 	x = (x < 0				) ? 0					: x;
 	x = (x >= _screenWidth	) ? _screenWidth - 1	: x;


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