Skip to content

Commit

Permalink
SCI32: Fix GfxFrameout::_isHiRes flag to be accurate for all games
Browse files Browse the repository at this point in the history
  • Loading branch information
csnover committed Aug 12, 2016
1 parent 74e94ac commit c28a573
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 4 additions & 8 deletions engines/sci/graphics/frameout.cpp
Expand Up @@ -56,7 +56,7 @@
namespace Sci {

GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette32 *palette, GfxTransitions32 *transitions) :
_isHiRes(false),
_isHiRes(ConfMan.getBool("enable_high_resolution_graphics")),
_palette(palette),
_resMan(resMan),
_screen(screen),
Expand All @@ -75,13 +75,9 @@ GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAd

_currentBuffer.setPixels(calloc(1, screen->getDisplayWidth() * screen->getDisplayHeight()));

// 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,
// so should be handled upstream based on game configuration instead
// of here)
if (getSciVersion() >= SCI_VERSION_2_1_EARLY && _resMan->detectHires()) {
_isHiRes = true;
// QFG4 is the only SCI32 game that doesn't have a high-resolution toggle
if (g_sci->getGameId() == GID_QFG4) {
_isHiRes = false;
}

switch (g_sci->getGameId()) {
Expand Down
3 changes: 2 additions & 1 deletion engines/sci/graphics/frameout.h
Expand Up @@ -41,7 +41,6 @@ struct PlaneShowStyle;
*/
class GfxFrameout {
private:
bool _isHiRes;
GfxCoordAdjuster32 *_coordAdjuster;
GfxPalette32 *_palette;
ResourceManager *_resMan;
Expand Down Expand Up @@ -309,6 +308,8 @@ class GfxFrameout {
}

public:
bool _isHiRes;

/**
* Whether palMorphFrameOut should be used instead of
* frameOut for rendering. Used by kMorphOn to
Expand Down

0 comments on commit c28a573

Please sign in to comment.