aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/graphics/cursor.cpp13
-rw-r--r--engines/sci/graphics/cursor.h4
-rw-r--r--engines/sci/sci.cpp3
3 files changed, 4 insertions, 16 deletions
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 9c26d816a1..56177db9f3 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -40,8 +40,8 @@
namespace Sci {
-GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen)
- : _resMan(resMan), _palette(palette), _screen(screen) {
+GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen, GfxCoordAdjuster16 *coordAdjuster, EventManager *eventMan)
+ : _resMan(resMan), _palette(palette), _screen(screen), _coordAdjuster(coordAdjuster), _event(eventMan) {
_upscaledHires = _screen->getUpscaledHires();
_isVisible = true;
@@ -68,10 +68,6 @@ GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *sc
_useSilverSQ4CDCursors = ConfMan.getBool("silver_cursors");
else
_useSilverSQ4CDCursors = false;
-
- // _coordAdjuster and _event will be initialized later on
- _coordAdjuster = NULL;
- _event = NULL;
}
GfxCursor::~GfxCursor() {
@@ -79,11 +75,6 @@ GfxCursor::~GfxCursor() {
kernelClearZoomZone();
}
-void GfxCursor::init(GfxCoordAdjuster16 *coordAdjuster, EventManager *event) {
- _coordAdjuster = coordAdjuster;
- _event = event;
-}
-
void GfxCursor::kernelShow() {
CursorMan.showMouse(true);
_isVisible = true;
diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h
index 8d9ce7c0ab..99ed5b49e1 100644
--- a/engines/sci/graphics/cursor.h
+++ b/engines/sci/graphics/cursor.h
@@ -54,11 +54,9 @@ struct SciCursorSetPositionWorkarounds {
class GfxCursor {
public:
- GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen);
+ GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen, GfxCoordAdjuster16 *coordAdjuster, EventManager *eventMan);
~GfxCursor();
- void init(GfxCoordAdjuster16 *coordAdjuster, EventManager *event);
-
void kernelShow();
void kernelHide();
bool isVisible();
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 717d6786b7..416d5c5cf3 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -615,10 +615,9 @@ void SciEngine::initGraphics() {
} else {
#endif
// SCI0-SCI1.1 graphic objects creation
- _gfxCursor = new GfxCursor(_resMan, _gfxPalette16, _gfxScreen);
_gfxPorts = new GfxPorts(_gamestate->_segMan, _gfxScreen);
_gfxCoordAdjuster = new GfxCoordAdjuster16(_gfxPorts);
- _gfxCursor->init(_gfxCoordAdjuster, _eventMan);
+ _gfxCursor = new GfxCursor(_resMan, _gfxPalette16, _gfxScreen, _gfxCoordAdjuster, _eventMan);
_gfxCompare = new GfxCompare(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxCoordAdjuster);
_gfxTransitions = new GfxTransitions(_gfxScreen, _gfxPalette16);
_gfxPaint16 = new GfxPaint16(_resMan, _gamestate->_segMan, _gfxCache, _gfxPorts, _gfxCoordAdjuster, _gfxScreen, _gfxPalette16, _gfxTransitions, _audio);