[Scummvm-cvs-logs] SF.net SVN: scummvm: [32147] scummvm/trunk/engines/made/screen.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat May 17 11:06:54 CEST 2008
Revision: 32147
http://scummvm.svn.sourceforge.net/scummvm/?rev=32147&view=rev
Author: thebluegr
Date: 2008-05-17 02:06:54 -0700 (Sat, 17 May 2008)
Log Message:
-----------
Screen mask is now only used for V2 games
Modified Paths:
--------------
scummvm/trunk/engines/made/screen.cpp
Modified: scummvm/trunk/engines/made/screen.cpp
===================================================================
--- scummvm/trunk/engines/made/screen.cpp 2008-05-17 04:07:16 UTC (rev 32146)
+++ scummvm/trunk/engines/made/screen.cpp 2008-05-17 09:06:54 UTC (rev 32147)
@@ -45,11 +45,13 @@
_workScreenDrawCtx.destSurface = _workScreen;
_clipArea.destSurface = _workScreen;
- // FIXME: Screen mask is only needed in v2 games
- _screenMask = new Graphics::Surface();
- _screenMask->create(320, 200, 1);
- _maskDrawCtx.clipRect = Common::Rect(320, 200);
- _maskDrawCtx.destSurface = _screenMask;
+ // Screen mask is only needed in v2 games
+ if (_vm->getGameID() != GID_RTZ) {
+ _screenMask = new Graphics::Surface();
+ _screenMask->create(320, 200, 1);
+ _maskDrawCtx.clipRect = Common::Rect(320, 200);
+ _maskDrawCtx.destSurface = _screenMask;
+ }
for (int i = 0; i <= 3; i++)
_excludeClipAreaEnabled[i] = false;
@@ -90,14 +92,16 @@
Screen::~Screen() {
delete _backgroundScreen;
delete _workScreen;
- delete _screenMask;
+ if (_vm->getGameID() != GID_RTZ)
+ delete _screenMask;
delete _fx;
}
void Screen::clearScreen() {
_backgroundScreen->fillRect(Common::Rect(0, 0, 320, 200), 0);
_workScreen->fillRect(Common::Rect(0, 0, 320, 200), 0);
- _screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0);
+ if (_vm->getGameID() != GID_RTZ)
+ _screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0);
_mask = 0;
_needPalette = true;
}
@@ -167,7 +171,8 @@
source = (byte*)sourceSurface->getBasePtr(startX, startY);
dest = (byte*)clipInfo.destSurface->getBasePtr(x, y);
- maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y);
+ if (_vm->getGameID() != GID_RTZ)
+ maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y);
int32 sourcePitch, linePtrAdd;
byte *linePtr;
@@ -192,7 +197,7 @@
linePtr = source;
}
for (int16 xc = 0; xc < clipWidth; xc++) {
- if (*linePtr && (mask == 0 || maskp[xc] == 0)) {
+ if (*linePtr && (_vm->getGameID() == GID_RTZ || (mask == 0 || maskp[xc] == 0))) {
if (*linePtr)
dest[xc] = *linePtr;
}
@@ -200,7 +205,8 @@
}
source += sourcePitch;
dest += clipInfo.destSurface->pitch;
- maskp += _maskDrawCtx.destSurface->pitch;
+ if (_vm->getGameID() != GID_RTZ)
+ maskp += _maskDrawCtx.destSurface->pitch;
}
}
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