[Scummvm-cvs-logs] SF.net SVN: scummvm:[51835] scummvm/trunk/engines/sci/graphics/compare.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sat Aug 7 17:02:08 CEST 2010
Revision: 51835
http://scummvm.svn.sourceforge.net/scummvm/?rev=51835&view=rev
Author: m_kiewitz
Date: 2010-08-07 15:02:08 +0000 (Sat, 07 Aug 2010)
Log Message:
-----------
SCI: changing kBaseSetter behaviour when scaled
fixes lb2 docks issue (bug #3036306)
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/compare.cpp
Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp 2010-08-07 14:38:07 UTC (rev 51834)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp 2010-08-07 15:02:08 UTC (rev 51835)
@@ -229,39 +229,32 @@
if (viewId == 0xFFFF) // invalid view
return;
- // must be something wrong with this TODO check - currently it breaks qfg3 right after the intro
- //uint16 scaleSignal = 0;
- //if (getSciVersion() >= SCI_VERSION_1_1) {
- // scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal)) & kScaleSignalDoScaling;
- // if (scaleSignal) {
- // int16 scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY));
- // if (scaleY < 64)
- // scaleSignal = 0;
- // }
- //}
+ uint16 scaleSignal = 0;
+ if (getSciVersion() >= SCI_VERSION_1_1) {
+ scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal));
+ }
Common::Rect celRect;
- //if (!scaleSignal) {
- GfxView *tmpView = _cache->getView(viewId);
- if (tmpView->isSci2Hires())
- _screen->adjustToUpscaledCoordinates(y, x);
+ GfxView *tmpView = _cache->getView(viewId);
+ if (tmpView->isSci2Hires())
+ _screen->adjustToUpscaledCoordinates(y, x);
+ if (scaleSignal & kScaleSignalDoScaling) {
+ int16 scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX));
+ int16 scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY));
+ tmpView->getCelScaledRect(loopNo, celNo, x, y, z, scaleX, scaleY, celRect);
+ } else {
tmpView->getCelRect(loopNo, celNo, x, y, z, celRect);
+ }
- if (tmpView->isSci2Hires()) {
- _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
- _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
- }
+ if (tmpView->isSci2Hires()) {
+ _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
+ _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
+ }
- celRect.bottom = y + 1;
- celRect.top = celRect.bottom - yStep;
- //} else {
- // celRect.left = readSelectorValue(_segMan, object, SELECTOR(nsLeft));
- // celRect.right = readSelectorValue(_segMan, object, SELECTOR(nsRight));
- // celRect.top = readSelectorValue(_segMan, object, SELECTOR(nsTop));
- // celRect.bottom = readSelectorValue(_segMan, object, SELECTOR(nsBottom));
- //}
+ celRect.bottom = y + 1;
+ celRect.top = celRect.bottom - yStep;
writeSelectorValue(_segMan, object, SELECTOR(brLeft), celRect.left);
writeSelectorValue(_segMan, object, SELECTOR(brRight), celRect.right);
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