[Scummvm-cvs-logs] SF.net SVN: scummvm:[52225] scummvm/trunk/engines/sci/graphics/ports.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Aug 20 17:17:20 CEST 2010
Revision: 52225
http://scummvm.svn.sourceforge.net/scummvm/?rev=52225&view=rev
Author: thebluegr
Date: 2010-08-20 15:17:19 +0000 (Fri, 20 Aug 2010)
Log Message:
-----------
Reverting r52224, as it was incorrect - fanmade games use the same interpreter as normal ones, so this doesn't make sense. Added a FIXME with a description about the graphics glitch in fanmade games
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/ports.cpp
Modified: scummvm/trunk/engines/sci/graphics/ports.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/ports.cpp 2010-08-20 12:24:48 UTC (rev 52224)
+++ scummvm/trunk/engines/sci/graphics/ports.cpp 2010-08-20 15:17:19 UTC (rev 52225)
@@ -376,6 +376,20 @@
if (draw)
drawWindow(pwnd);
setPort((Port *)pwnd);
+
+ // FIXME: changing setOrigin to not clear the rightmost bit fixes the display of windows
+ // in some fanmade games (e.g. New Year's Mystery (Updated)). Since the fanmade games
+ // use an unmodified SCI interpreter, this leads me to believe that there either is some
+ // off-by-one error in the window drawing code, or there is another place where the
+ // rightmost bit should be cleeared. New Year's Mystery is a good test case for this, as
+ // it draws dialogs and then draws cels on top of them, for fancier dialog corners (like,
+ // for example, KQ5). KQ5 has a custom window style, however, whereas New Year's mystery
+ // has a "classic" style with only SCI_WINDOWMGR_STYLE_NOFRAME set. If
+ // SCI_WINDOWMGR_STYLE_NOFRAME is removed, the window is cleared correctly, because it
+ // grows slightly, covering the view pixels on the left. In any case, the views and the
+ // window have a difference of one pixel when they're drawn via kNewWindow and kDrawCel,
+ // which causes the glitch to appear when the window is closed.
+
// All SCI0 games till kq4 .502 (not including) did not adjust against _wmgrPort, we set _wmgrPort->top to 0 in that case
setOrigin(pwnd->rect.left, pwnd->rect.top + _wmgrPort->top);
pwnd->rect.moveTo(0, 0);
@@ -510,8 +524,7 @@
// This looks fishy, but it's exactly what sierra did. They removed last bit of left in their interpreter
// It seems sierra did it for EGA byte alignment (EGA uses 1 byte for 2 pixels) and left it in their interpreter even
// when going VGA.
- // Fan made games do not compensate for this - fixes bug #3041153.
- _curPort->left = (g_sci->getGameId() != GID_FANMADE) ? left & 0x7FFE : left;
+ _curPort->left = left & 0x7FFE;
_curPort->top = top;
}
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