aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-01-20 20:06:45 -0600
committerColin Snover2016-01-20 20:06:45 -0600
commit0017cfa06c1dbda7175588a0a16ad13526491fcf (patch)
tree6e4f9a72be369c5ef53d5b274fe8790a58014ac7
parent5b6b20f421c3f88b6cbd28e735a7496705c2ef7e (diff)
downloadscummvm-rg350-0017cfa06c1dbda7175588a0a16ad13526491fcf.tar.gz
scummvm-rg350-0017cfa06c1dbda7175588a0a16ad13526491fcf.tar.bz2
scummvm-rg350-0017cfa06c1dbda7175588a0a16ad13526491fcf.zip
SCI: Fix SCI32 hires detection making PQ4 unusably slow
-rw-r--r--engines/sci/graphics/frameout.cpp11
-rw-r--r--engines/sci/graphics/frameout.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 90bd798a1b..cb81fe8d61 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 0017fb19e8..d1a706e8de 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);