aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.cpp
diff options
context:
space:
mode:
authorColin Snover2016-07-31 13:41:05 -0500
committerColin Snover2016-08-19 13:57:40 -0500
commit80d9182554bcc6b24b493510cf599baf7577dacc (patch)
tree5312e7e6996e5ccf66932dde2fb8706cb6ba1535 /engines/sci/graphics/frameout.cpp
parent9bfeb3c297a7868c53d4c37775148067d72f44c0 (diff)
downloadscummvm-rg350-80d9182554bcc6b24b493510cf599baf7577dacc.tar.gz
scummvm-rg350-80d9182554bcc6b24b493510cf599baf7577dacc.tar.bz2
scummvm-rg350-80d9182554bcc6b24b493510cf599baf7577dacc.zip
SCI32: Implement SCI32 cursor support
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r--engines/sci/graphics/frameout.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 7661fe5be2..aad321521e 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -42,6 +42,7 @@
#include "sci/graphics/cache.h"
#include "sci/graphics/coordadjuster.h"
#include "sci/graphics/compare.h"
+#include "sci/graphics/cursor32.h"
#include "sci/graphics/font.h"
#include "sci/graphics/screen.h"
#include "sci/graphics/paint32.h"
@@ -56,9 +57,10 @@
namespace Sci {
-GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxPalette32 *palette, GfxTransitions32 *transitions) :
+GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor) :
_isHiRes(ConfMan.getBool("enable_high_resolution_graphics")),
_palette(palette),
+ _cursor(cursor),
_resMan(resMan),
_segMan(segMan),
_transitions(transitions),
@@ -1120,6 +1122,10 @@ void GfxFrameout::mergeToShowList(const Common::Rect &drawRect, RectList &showLi
}
void GfxFrameout::showBits() {
+ if (!_showList.size()) {
+ return;
+ }
+
for (RectList::const_iterator rect = _showList.begin(); rect != _showList.end(); ++rect) {
Common::Rect rounded(**rect);
// NOTE: SCI engine used BR-inclusive rects so used slightly
@@ -1127,13 +1133,10 @@ void GfxFrameout::showBits() {
// was always even.
rounded.left &= ~1;
rounded.right = (rounded.right + 1) & ~1;
-
- // TODO:
- // _cursor->GonnaPaint(rounded);
+ _cursor->gonnaPaint(rounded);
}
- // TODO:
- // _cursor->PaintStarting();
+ _cursor->paintStarting();
for (RectList::const_iterator rect = _showList.begin(); rect != _showList.end(); ++rect) {
Common::Rect rounded(**rect);
@@ -1155,8 +1158,7 @@ void GfxFrameout::showBits() {
g_system->copyRectToScreen(sourceBuffer, _currentBuffer.screenWidth, rounded.left, rounded.top, rounded.width(), rounded.height());
}
- // TODO:
- // _cursor->DonePainting();
+ _cursor->donePainting();
_showList.clear();
}