aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorColin Snover2018-02-10 12:26:50 -0600
committerFilippos Karapetis2019-05-12 19:05:50 +0300
commit8cec2ba8f9bc9c213d45d890ff3a19532206fe24 (patch)
tree1f47effd3a6b4c18dd58e044c2888e71b082c5e3 /engines/sci/graphics
parentfde0a488b745958cc5e799c31f37974336d65b1d (diff)
downloadscummvm-rg350-8cec2ba8f9bc9c213d45d890ff3a19532206fe24.tar.gz
scummvm-rg350-8cec2ba8f9bc9c213d45d890ff3a19532206fe24.tar.bz2
scummvm-rg350-8cec2ba8f9bc9c213d45d890ff3a19532206fe24.zip
SCI: Remove unnecessary two-phase GfxCursor initialisation
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/cursor.cpp13
-rw-r--r--engines/sci/graphics/cursor.h4
2 files changed, 3 insertions, 14 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();