[Scummvm-cvs-logs] SF.net SVN: scummvm:[51361] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Jul 27 13:11:48 CEST 2010
Revision: 51361
http://scummvm.svn.sourceforge.net/scummvm/?rev=51361&view=rev
Author: m_kiewitz
Date: 2010-07-27 11:11:47 +0000 (Tue, 27 Jul 2010)
Log Message:
-----------
SCI: adding scaling code in kBaseSetter
and fixing palVary timer crash when exiting engine during palVary processing
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/compare.cpp
scummvm/trunk/engines/sci/graphics/palette.cpp
Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp 2010-07-27 10:40:14 UTC (rev 51360)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp 2010-07-27 11:11:47 UTC (rev 51361)
@@ -229,22 +229,39 @@
if (viewId == 0xFFFF) // invalid view
return;
- GfxView *tmpView = _cache->getView(viewId);
+ 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;
+ }
+ }
+
Common::Rect celRect;
- if (tmpView->isSci2Hires())
- _screen->adjustToUpscaledCoordinates(y, x);
+ if (!scaleSignal) {
+ GfxView *tmpView = _cache->getView(viewId);
+ if (tmpView->isSci2Hires())
+ _screen->adjustToUpscaledCoordinates(y, x);
- tmpView->getCelRect(loopNo, celNo, x, y, z, celRect);
+ 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);
writeSelectorValue(_segMan, object, SELECTOR(brTop), celRect.top);
Modified: scummvm/trunk/engines/sci/graphics/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/palette.cpp 2010-07-27 10:40:14 UTC (rev 51360)
+++ scummvm/trunk/engines/sci/graphics/palette.cpp 2010-07-27 11:11:47 UTC (rev 51361)
@@ -72,6 +72,8 @@
}
GfxPalette::~GfxPalette() {
+ if (_palVaryResourceId != -1)
+ palVaryRemoveTimer();
}
bool GfxPalette::isMerging() {
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