aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.cpp
diff options
context:
space:
mode:
authorColin Snover2016-07-28 14:49:13 -0500
committerColin Snover2016-08-19 13:57:40 -0500
commit9bfeb3c297a7868c53d4c37775148067d72f44c0 (patch)
tree1e8b4fcc44824122de9efd4f4b5c2c6b9204bff6 /engines/sci/graphics/frameout.cpp
parent97be9aa6dc204843f4a896f7e12f6cabc4322b44 (diff)
downloadscummvm-rg350-9bfeb3c297a7868c53d4c37775148067d72f44c0.tar.gz
scummvm-rg350-9bfeb3c297a7868c53d4c37775148067d72f44c0.tar.bz2
scummvm-rg350-9bfeb3c297a7868c53d4c37775148067d72f44c0.zip
SCI32: Remove GfxScreen from GfxFrameout
Only cursor remains to be updated to go through GfxFrameout, and then we can let GfxScreen go back to being SCI16-only.
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r--engines/sci/graphics/frameout.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 21ffb5f937..7661fe5be2 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -29,6 +29,7 @@
#include "common/system.h"
#include "common/textconsole.h"
#include "engines/engine.h"
+#include "engines/util.h"
#include "graphics/palette.h"
#include "graphics/surface.h"
@@ -55,31 +56,36 @@
namespace Sci {
-GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette32 *palette, GfxTransitions32 *transitions) :
+GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxPalette32 *palette, GfxTransitions32 *transitions) :
_isHiRes(ConfMan.getBool("enable_high_resolution_graphics")),
_palette(palette),
_resMan(resMan),
- _screen(screen),
_segMan(segMan),
_transitions(transitions),
_benchmarkingFinished(false),
_throttleFrameOut(true),
_throttleState(0),
- // TODO: Stop using _gfxScreen
- _currentBuffer(screen->getDisplayWidth(), screen->getDisplayHeight(), nullptr),
_remapOccurred(false),
_frameNowVisible(false),
- _screenRect(screen->getDisplayWidth(), screen->getDisplayHeight()),
_overdrawThreshold(0),
_palMorphIsOn(false) {
- _currentBuffer.setPixels(calloc(1, screen->getDisplayWidth() * screen->getDisplayHeight()));
-
// QFG4 is the only SCI32 game that doesn't have a high-resolution toggle
if (g_sci->getGameId() == GID_QFG4) {
_isHiRes = false;
}
+ if (g_sci->getGameId() == GID_PHANTASMAGORIA) {
+ _currentBuffer = Buffer(630, 450, nullptr);
+ } else if (_isHiRes) {
+ _currentBuffer = Buffer(640, 480, nullptr);
+ } else {
+ _currentBuffer = Buffer(320, 200, nullptr);
+ }
+ _currentBuffer.setPixels(calloc(1, _currentBuffer.screenWidth * _currentBuffer.screenHeight));
+ _screenRect = Common::Rect(_currentBuffer.screenWidth, _currentBuffer.screenHeight);
+ initGraphics(_currentBuffer.screenWidth, _currentBuffer.screenHeight, _isHiRes);
+
switch (g_sci->getGameId()) {
case GID_HOYLE5:
case GID_GK2:
@@ -559,7 +565,7 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show
int16 prevRoom = g_sci->getEngineState()->variables[VAR_GLOBAL][12].toSint16();
- Common::Rect rect(_screen->getDisplayWidth(), _screen->getDisplayHeight());
+ Common::Rect rect(_currentBuffer.screenWidth, _currentBuffer.screenHeight);
_showList.add(rect);
showBits();