diff options
author | Filippos Karapetis | 2012-04-22 16:05:41 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-04-22 16:06:25 +0300 |
commit | 6ecf27711c886b1422f26acc87cdfd893897eb64 (patch) | |
tree | 4e923cff17b87ffbd67c58ae5ea93e5d79884533 /engines/dreamweb/stubs.cpp | |
parent | a5745434d30f0039db0f5ca7b5ff6781b777d819 (diff) | |
download | scummvm-rg350-6ecf27711c886b1422f26acc87cdfd893897eb64.tar.gz scummvm-rg350-6ecf27711c886b1422f26acc87cdfd893897eb64.tar.bz2 scummvm-rg350-6ecf27711c886b1422f26acc87cdfd893897eb64.zip |
DREAMWEB: Move all of the mouse cursor related code into a separate file
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 5a53b82510..750dafe7b4 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -876,22 +876,6 @@ void DreamWebEngine::hangOnCurs(uint16 frameCount) { } } -void DreamWebEngine::readMouse() { - _oldButton = _mouseButton; - uint16 state = readMouseState(); - _mouseButton = state; -} - -uint16 DreamWebEngine::readMouseState() { - _oldX = _mouseX; - _oldY = _mouseY; - uint16 x, y, state; - mouseCall(&x, &y, &state); - _mouseX = x; - _mouseY = y; - return state; -} - void DreamWebEngine::dumpTextLine() { if (_newTextLine != 1) return; @@ -1513,16 +1497,6 @@ void DreamWebEngine::obName(uint8 command, uint8 commandType) { } } -void DreamWebEngine::delPointer() { - if (_oldPointerX == 0xffff) - return; - _delHereX = _oldPointerX; - _delHereY = _oldPointerY; - _delXS = _pointerXS; - _delYS = _pointerYS; - multiPut(_pointerBack, _delHereX, _delHereY, _pointerXS, _pointerYS); -} - void DreamWebEngine::showBlink() { if (_manIsOffScreen == 1) return; @@ -1554,110 +1528,6 @@ void DreamWebEngine::dumpBlink() { multiDump(44, 32, 16, 12); } -void DreamWebEngine::dumpPointer() { - dumpBlink(); - multiDump(_delHereX, _delHereY, _delXS, _delYS); - if ((_oldPointerX != _delHereX) || (_oldPointerY != _delHereY)) - multiDump(_oldPointerX, _oldPointerY, _pointerXS, _pointerYS); -} - -void DreamWebEngine::showPointer() { - showBlink(); - uint16 x = _mouseX; - _oldPointerX = _mouseX; - uint16 y = _mouseY; - _oldPointerY = _mouseY; - if (_pickUp == 1) { - const GraphicsFile *frames; - if (_objectType != kExObjectType) - frames = &_freeFrames; - else - frames = &_exFrames; - const Frame *frame = &frames->_frames[(3 * _itemFrame + 1)]; - - uint8 width = frame->width; - uint8 height = frame->height; - if (width < 12) - width = 12; - if (height < 12) - height = 12; - _pointerXS = width; - _pointerYS = height; - uint16 xMin = (x >= width / 2) ? x - width / 2 : 0; - uint16 yMin = (y >= height / 2) ? y - height / 2 : 0; - _oldPointerX = xMin; - _oldPointerY = yMin; - multiGet(_pointerBack, xMin, yMin, width, height); - showFrame(*frames, x, y, 3 * _itemFrame + 1, 128); - showFrame(_icons1, x, y, 3, 128); - } else { - const Frame *frame = &_icons1._frames[_pointerFrame + 20]; - uint8 width = frame->width; - uint8 height = frame->height; - if (width < 12) - width = 12; - if (height < 12) - height = 12; - _pointerXS = width; - _pointerYS = height; - multiGet(_pointerBack, x, y, width, height); - showFrame(_icons1, x, y, _pointerFrame + 20, 0); - } -} - -void DreamWebEngine::animPointer() { - - if (_pointerMode == 2) { - _pointerFrame = 0; - if ((_realLocation == 14) && (_commandType == 211)) - _pointerFrame = 5; - return; - } else if (_pointerMode == 3) { - if (_pointerSpeed != 0) { - --_pointerSpeed; - } else { - _pointerSpeed = 5; - ++_pointerCount; - if (_pointerCount == 16) - _pointerCount = 0; - } - _pointerFrame = (_pointerCount <= 8) ? 1 : 2; - return; - } - if (_vars._watchingTime != 0) { - _pointerFrame = 11; - return; - } - _pointerFrame = 0; - if (_inMapArea == 0) - return; - if (_pointerFirstPath == 0) - return; - uint8 flag, flagEx; - getFlagUnderP(&flag, &flagEx); - if (flag < 2) - return; - if (flag >= 128) - return; - if (flag & 4) { - _pointerFrame = 3; - return; - } - if (flag & 16) { - _pointerFrame = 4; - return; - } - if (flag & 2) { - _pointerFrame = 5; - return; - } - if (flag & 8) { - _pointerFrame = 6; - return; - } - _pointerFrame = 8; -} - void DreamWebEngine::printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) { const uint8 *string = (const uint8 *)_commandText.getString(index); printDirect(string, x, y, maxWidth, centered); @@ -3183,16 +3053,4 @@ void DreamWebEngine::purgeAnItem() { } } -void DreamWebEngine::checkCoords(const RectWithCallback *rectWithCallbacks) { - if (_newLocation != 0xff) - return; - const RectWithCallback *r; - for (r = rectWithCallbacks; r->_xMin != 0xffff; ++r) { - if (r->contains(_mouseX, _mouseY)) { - (this->*(r->_callback))(); - return; - } - } -} - } // End of namespace DreamWeb |