[Scummvm-cvs-logs] scummvm master -> 0017cfa06c1dbda7175588a0a16ad13526491fcf

csnover csnover at users.noreply.github.com
Thu Jan 21 03:07:55 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0017cfa06c SCI: Fix SCI32 hires detection making PQ4 unusably slow


Commit: 0017cfa06c1dbda7175588a0a16ad13526491fcf
    https://github.com/scummvm/scummvm/commit/0017cfa06c1dbda7175588a0a16ad13526491fcf
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-01-20T20:06:45-06:00

Commit Message:
SCI: Fix SCI32 hires detection making PQ4 unusably slow

Changed paths:
    engines/sci/graphics/frameout.cpp
    engines/sci/graphics/frameout.h



diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 90bd798..cb81fe8 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -60,12 +60,19 @@ enum SciSpeciaPlanelPictureCodes {
 };
 
 GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxCache *cache, GfxScreen *screen, GfxPalette32 *palette, GfxPaint32 *paint32)
-	: _segMan(segMan), _resMan(resMan), _cache(cache), _screen(screen), _palette(palette), _paint32(paint32) {
+	: _segMan(segMan), _resMan(resMan), _cache(cache), _screen(screen), _palette(palette), _paint32(paint32), _isHiRes(false) {
 
 	_coordAdjuster = (GfxCoordAdjuster32 *)coordAdjuster;
 	_curScrollText = -1;
 	_showScrollText = false;
 	_maxScrollTexts = 0;
+
+	// TODO: Make hires detection work uniformly across all SCI engine
+	// versions (this flag is normally passed by SCI::MakeGraphicsMgr
+	// to the GraphicsMgr constructor depending upon video configuration)
+	if (getSciVersion() >= SCI_VERSION_2_1_EARLY && _resMan->detectHires()) {
+		_isHiRes = true;
+	}
 }
 
 GfxFrameout::~GfxFrameout() {
@@ -877,7 +884,7 @@ void GfxFrameout::kernelFrameout() {
 						view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left);
 						view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right);
 						g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
-					} else if (getSciVersion() >= SCI_VERSION_2_1_EARLY && _resMan->detectHires()) {
+					} else if (getSciVersion() >= SCI_VERSION_2_1_EARLY && _isHiRes) {
 						_coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left);
 						_coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
 						g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 0017fb1..d1a706e 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -153,6 +153,8 @@ public:
 	void printPlaneItemList(Console *con, reg_t planeObject);
 
 private:
+	bool _isHiRes;
+
 	void showVideo();
 	void createPlaneItemList(reg_t planeObject, FrameoutList &itemList);
 	bool isPictureOutOfView(FrameoutEntry *itemEntry, Common::Rect planeRect, int16 planeOffsetX, int16 planeOffsetY);






More information about the Scummvm-git-logs mailing list