[Scummvm-cvs-logs] SF.net SVN: scummvm:[39052] scummvm/trunk/engines/tinsel
knakos at users.sourceforge.net
knakos at users.sourceforge.net
Sun Mar 1 22:03:46 CET 2009
Revision: 39052
http://scummvm.svn.sourceforge.net/scummvm/?rev=39052&view=rev
Author: knakos
Date: 2009-03-01 21:03:46 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
only center vertically in DW2
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/graphics.cpp
scummvm/trunk/engines/tinsel/tinsel.cpp
scummvm/trunk/engines/tinsel/tinsel.h
Modified: scummvm/trunk/engines/tinsel/graphics.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/graphics.cpp 2009-03-01 20:37:57 UTC (rev 39051)
+++ scummvm/trunk/engines/tinsel/graphics.cpp 2009-03-01 21:03:46 UTC (rev 39052)
@@ -501,7 +501,7 @@
* Updates the screen surface within the following rectangle
*/
void UpdateScreenRect(const Common::Rect &pClip) {
- int yOffset = (g_system->getHeight() - SCREEN_HEIGHT) / 2;
+ int yOffset = TinselV2 ? (g_system->getHeight() - SCREEN_HEIGHT) / 2 : 0;
byte *pSrc = (byte *)_vm->screen().getBasePtr(pClip.left, pClip.top);
g_system->copyRectToScreen(pSrc, _vm->screen().pitch, pClip.left, pClip.top + yOffset,
pClip.width(), pClip.height());
Modified: scummvm/trunk/engines/tinsel/tinsel.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.cpp 2009-03-01 20:37:57 UTC (rev 39051)
+++ scummvm/trunk/engines/tinsel/tinsel.cpp 2009-03-01 21:03:46 UTC (rev 39052)
@@ -1099,9 +1099,9 @@
{
// This fragment takes care of Tinsel 2 when it's been compiled with
// blank areas at the top and bottom of thes creen
- int ySize = (g_system->getHeight() - _vm->screen().h) / 2;
- if ((event.mouse.y >= ySize) && (event.mouse.y < (g_system->getHeight() - ySize)))
- _mousePos = Common::Point(event.mouse.x, event.mouse.y - ySize);
+ int ySkip = TinselV2 ? (g_system->getHeight() - _vm->screen().h) / 2 : 0;
+ if ((event.mouse.y >= ySkip) && (event.mouse.y < (g_system->getHeight() - ySkip)))
+ _mousePos = Common::Point(event.mouse.x, event.mouse.y - ySkip);
}
break;
Modified: scummvm/trunk/engines/tinsel/tinsel.h
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.h 2009-03-01 20:37:57 UTC (rev 39051)
+++ scummvm/trunk/engines/tinsel/tinsel.h 2009-03-01 21:03:46 UTC (rev 39052)
@@ -124,6 +124,9 @@
#define TinselV1 (TinselVersion == TINSEL_V1)
#define TinselV2 (TinselVersion == TINSEL_V2)
+// Global reference to the TinselEngine object
+extern TinselEngine *_vm;
+
class TinselEngine : public Engine {
int _gameId;
Common::KeyState _keyPressed;
@@ -197,8 +200,8 @@
Common::Point getMousePosition() const { return _mousePos; }
void setMousePosition(const Common::Point &pt) {
- int ySize = (g_system->getHeight() - _screenSurface.h) / 2;
- g_system->warpMouse(pt.x, pt.y + ySize);
+ int yOffset = TinselV2 ? (g_system->getHeight() - _screenSurface.h) / 2 : 0;
+ g_system->warpMouse(pt.x, pt.y + yOffset);
_mousePos = pt;
}
void divertKeyInput(KEYFPTR fptr) { _keyHandler = fptr; }
@@ -206,9 +209,6 @@
uint8 getKeyDirection() const { return _dosPlayerDir; }
};
-// Global reference to the TinselEngine object
-extern TinselEngine *_vm;
-
// Externally available methods
void CuttingScene(bool bCutting);
void CDChangeForRestore(int cdNumber);
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