diff options
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/animate.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/cursor.cpp | 16 | ||||
-rw-r--r-- | engines/sci/graphics/cursor.h | 8 | ||||
-rw-r--r-- | engines/sci/graphics/gui.cpp | 24 | ||||
-rw-r--r-- | engines/sci/graphics/gui.h | 6 | ||||
-rw-r--r-- | engines/sci/graphics/gui32.cpp | 24 | ||||
-rw-r--r-- | engines/sci/graphics/gui32.h | 6 | ||||
-rw-r--r-- | engines/sci/graphics/menu.cpp | 4 |
8 files changed, 16 insertions, 76 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 5cd6346100..fb790159ca 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -591,12 +591,12 @@ void GfxAnimate::animateShowPic() { bool previousCursorState = _cursor->isVisible(); if (previousCursorState) - _cursor->hide(); + _cursor->kernelHide(); // Adjust picRect to become relative to screen picRect.translate(picPort->left, picPort->top); _transitions->doit(picRect); if (previousCursorState) - _cursor->show(); + _cursor->kernelShow(); // We set SCI1.1 priority band information here _ports->priorityBandsRecall(); diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp index ff681922ad..5de0166c98 100644 --- a/engines/sci/graphics/cursor.cpp +++ b/engines/sci/graphics/cursor.cpp @@ -51,12 +51,12 @@ GfxCursor::~GfxCursor() { purgeCache(); } -void GfxCursor::show() { +void GfxCursor::kernelShow() { CursorMan.showMouse(true); _isVisible = true; } -void GfxCursor::hide() { +void GfxCursor::kernelHide() { CursorMan.showMouse(false); _isVisible = false; } @@ -74,7 +74,7 @@ void GfxCursor::purgeCache() { _cachedCursors.clear(); } -void GfxCursor::setShape(GuiResourceId resourceId) { +void GfxCursor::kernelSetShape(GuiResourceId resourceId) { Resource *resource; byte *resourceData; Common::Point hotspot = Common::Point(0, 0); @@ -87,7 +87,7 @@ void GfxCursor::setShape(GuiResourceId resourceId) { if (resourceId == -1) { // no resourceId given, so we actually hide the cursor - hide(); + kernelHide(); delete[] rawBitmap; return; } @@ -128,12 +128,12 @@ void GfxCursor::setShape(GuiResourceId resourceId) { } CursorMan.replaceCursor(rawBitmap, SCI_CURSOR_SCI0_HEIGHTWIDTH, SCI_CURSOR_SCI0_HEIGHTWIDTH, hotspot.x, hotspot.y, SCI_CURSOR_SCI0_TRANSPARENCYCOLOR); - show(); + kernelShow(); delete[] rawBitmap; } -void GfxCursor::setView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot) { +void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot) { if (_cachedCursors.size() >= MAX_CACHED_CURSORS) purgeCache(); @@ -153,7 +153,7 @@ void GfxCursor::setView(GuiResourceId viewNum, int loopNum, int celNum, Common:: // Eco Quest 1 uses a 1x1 transparent cursor to hide the cursor from the user. Some scalers don't seem to support this if (width < 2 || height < 2) { - hide(); + kernelHide(); delete cursorHotspot; return; } @@ -175,7 +175,7 @@ void GfxCursor::setView(GuiResourceId viewNum, int loopNum, int celNum, Common:: if (_upscaledHires) delete[] cursorBitmap; - show(); + kernelShow(); delete cursorHotspot; } diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h index 311a0ef876..3de6621ead 100644 --- a/engines/sci/graphics/cursor.h +++ b/engines/sci/graphics/cursor.h @@ -45,11 +45,11 @@ public: GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen); ~GfxCursor(); - void show(); - void hide(); + void kernelShow(); + void kernelHide(); bool isVisible(); - void setShape(GuiResourceId resourceId); - void setView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot); + void kernelSetShape(GuiResourceId resourceId); + void kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot); void setPosition(Common::Point pos); Common::Point getPosition(); void refreshPosition(); diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index 2c22619b6b..741b5d7e82 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -391,36 +391,12 @@ void SciGui::baseSetter(reg_t object) { } } -void SciGui::hideCursor() { - _cursor->hide(); -} - -void SciGui::showCursor() { - _cursor->show(); -} - -bool SciGui::isCursorVisible() { - return _cursor->isVisible(); -} - -void SciGui::setCursorShape(GuiResourceId cursorId) { - _cursor->setShape(cursorId); -} - -void SciGui::setCursorView(GuiResourceId viewNum, int loopNum, int cellNum, Common::Point *hotspot) { - _cursor->setView(viewNum, loopNum, cellNum, hotspot); -} - void SciGui::setCursorPos(Common::Point pos) { pos.y += _ports->getPort()->top; pos.x += _ports->getPort()->left; moveCursor(pos); } -Common::Point SciGui::getCursorPos() { - return _cursor->getPosition(); -} - void SciGui::moveCursor(Common::Point pos) { pos.y += _ports->_picWind->rect.top; pos.x += _ports->_picWind->rect.left; diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h index f2904d5ff2..569cc323e3 100644 --- a/engines/sci/graphics/gui.h +++ b/engines/sci/graphics/gui.h @@ -87,13 +87,7 @@ public: virtual bool isItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Point position); virtual void baseSetter(reg_t object); - void hideCursor(); - void showCursor(); - bool isCursorVisible(); - void setCursorShape(GuiResourceId cursorId); - void setCursorView(GuiResourceId viewNum, int loopNum, int cellNum, Common::Point *hotspot); virtual void setCursorPos(Common::Point pos); - Common::Point getCursorPos(); virtual void moveCursor(Common::Point pos); void setCursorZone(Common::Rect zone); diff --git a/engines/sci/graphics/gui32.cpp b/engines/sci/graphics/gui32.cpp index 170acd07d5..0191504b55 100644 --- a/engines/sci/graphics/gui32.cpp +++ b/engines/sci/graphics/gui32.cpp @@ -176,36 +176,12 @@ void SciGui32::baseSetter(reg_t object) { } } -void SciGui32::hideCursor() { - _cursor->hide(); -} - -void SciGui32::showCursor() { - _cursor->show(); -} - -bool SciGui32::isCursorVisible() { - return _cursor->isVisible(); -} - -void SciGui32::setCursorShape(GuiResourceId cursorId) { - _cursor->setShape(cursorId); -} - -void SciGui32::setCursorView(GuiResourceId viewNum, int loopNum, int cellNum, Common::Point *hotspot) { - _cursor->setView(viewNum, loopNum, cellNum, hotspot); -} - void SciGui32::setCursorPos(Common::Point pos) { //pos.y += _gfx->GetPort()->top; //pos.x += _gfx->GetPort()->left; moveCursor(pos); } -Common::Point SciGui32::getCursorPos() { - return _cursor->getPosition(); -} - void SciGui32::moveCursor(Common::Point pos) { // pos.y += _windowMgr->_picWind->rect.top; // pos.x += _windowMgr->_picWind->rect.left; diff --git a/engines/sci/graphics/gui32.h b/engines/sci/graphics/gui32.h index e8d909292c..28e15fecba 100644 --- a/engines/sci/graphics/gui32.h +++ b/engines/sci/graphics/gui32.h @@ -55,13 +55,7 @@ public: bool isItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Point position); void baseSetter(reg_t object); - void hideCursor(); - void showCursor(); - bool isCursorVisible(); - void setCursorShape(GuiResourceId cursorId); - void setCursorView(GuiResourceId viewNum, int loopNum, int cellNum, Common::Point *hotspot); void setCursorPos(Common::Point pos); - Common::Point getCursorPos(); void moveCursor(Common::Point pos); void setCursorZone(Common::Rect zone); diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index d2545c5e47..78f5899b32 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -591,12 +591,12 @@ void GfxMenu::invertMenuSelection(uint16 itemId) { void GfxMenu::interactiveShowMouse() { _mouseOldState = _cursor->isVisible(); - _cursor->show(); + _cursor->kernelShow(); } void GfxMenu::interactiveRestoreMouse() { if (!_mouseOldState) - _cursor->hide(); + _cursor->kernelHide(); } uint16 GfxMenu::mouseFindMenuSelection(Common::Point mousePosition) { |