aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-09-09 16:17:41 -0500
committerColin Snover2016-09-29 19:39:16 -0500
commit658fb7f8e4c9a43f3f5e21f6b572b2ff2c1cc974 (patch)
treefd710c93eca12376c9da6d70cd167ccfed024a80
parent22e1f1f015e38e7ceb0d3b29c61d362d2d906634 (diff)
downloadscummvm-rg350-658fb7f8e4c9a43f3f5e21f6b572b2ff2c1cc974.tar.gz
scummvm-rg350-658fb7f8e4c9a43f3f5e21f6b572b2ff2c1cc974.tar.bz2
scummvm-rg350-658fb7f8e4c9a43f3f5e21f6b572b2ff2c1cc974.zip
SCI32: Improved game resolution detection
-rw-r--r--engines/sci/graphics/frameout.cpp27
-rw-r--r--engines/sci/graphics/frameout.h6
2 files changed, 27 insertions, 6 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index e886193ccc..7d38d01f02 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -58,7 +58,7 @@
namespace Sci {
GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor) :
- _isHiRes(ConfMan.getBool("enable_high_resolution_graphics")),
+ _isHiRes(gameIsHiRes()),
_palette(palette),
_cursor(cursor),
_segMan(segMan),
@@ -71,11 +71,6 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
_overdrawThreshold(0),
_palMorphIsOn(false) {
- // QFG4 is the only SCI32 game that doesn't have a high-resolution version
- if (g_sci->getGameId() == GID_QFG4) {
- _isHiRes = false;
- }
-
if (g_sci->getGameId() == GID_PHANTASMAGORIA) {
_currentBuffer = Buffer(630, 450, nullptr);
} else if (_isHiRes) {
@@ -213,6 +208,26 @@ void GfxFrameout::syncWithScripts(bool addElements) {
}
}
+bool GfxFrameout::gameIsHiRes() const {
+ // QFG4 is always low resolution
+ if (g_sci->getGameId() == GID_QFG4) {
+ return false;
+ }
+
+ // GK1 DOS floppy is low resolution only, but GK1 Mac floppy is high
+ // resolution only
+ if (g_sci->getGameId() == GID_GK1 &&
+ !g_sci->isCD() &&
+ g_sci->getPlatform() != Common::kPlatformMacintosh) {
+
+ return false;
+ }
+
+ // All other games are either high resolution by default, or have a
+ // user-defined toggle
+ return ConfMan.getBool("enable_high_resolution_graphics");
+}
+
#pragma mark -
#pragma mark Benchmarking
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index e4caffd9e5..9481b0ef5a 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -44,6 +44,12 @@ private:
GfxPalette32 *_palette;
SegManager *_segMan;
+ /**
+ * Determines whether the current game should be rendered in
+ * high resolution.
+ */
+ bool gameIsHiRes() const;
+
public:
GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor);
~GfxFrameout();