diff options
author | lukaslw | 2014-08-10 16:08:45 +0200 |
---|---|---|
committer | lukaslw | 2014-08-10 16:08:45 +0200 |
commit | 70a94908d3ddab949cd0755c148d87e0c59d420b (patch) | |
tree | 251f36f8b9866ce9236c441aa3e39c313078fd96 /engines | |
parent | 01b243d996f476b2feff1a43df2ef4d6a02bcdff (diff) | |
download | scummvm-rg350-70a94908d3ddab949cd0755c148d87e0c59d420b.tar.gz scummvm-rg350-70a94908d3ddab949cd0755c148d87e0c59d420b.tar.bz2 scummvm-rg350-70a94908d3ddab949cd0755c148d87e0c59d420b.zip |
PRINCE: Throw a rock mini-game - cursor update
Diffstat (limited to 'engines')
-rw-r--r-- | engines/prince/prince.cpp | 19 | ||||
-rw-r--r-- | engines/prince/script.cpp | 1 |
2 files changed, 9 insertions, 11 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 2894831386..060c1ca233 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -516,10 +516,7 @@ void PrinceEngine::changeCursor(uint16 curId) { const Graphics::Surface *curSurface = nullptr; - uint16 hotspotX = 0; - uint16 hotspotY = 0; - - switch(curId) { + switch (curId) { case 0: CursorMan.showMouse(false); _optionsFlag = 0; @@ -533,8 +530,10 @@ void PrinceEngine::changeCursor(uint16 curId) { break; case 3: curSurface = _cursor3->getSurface(); - hotspotX = curSurface->w >> 1; - hotspotY = curSurface->h >> 1; + Common::Point mousePos = _system->getEventManager()->getMousePos(); + mousePos.x = CLIP(mousePos.x, (int16) 315, (int16) 639); + mousePos.y = CLIP(mousePos.y, (int16) 0, (int16) 170); + _system->warpMouse(mousePos.x, mousePos.y); break; } @@ -542,7 +541,7 @@ void PrinceEngine::changeCursor(uint16 curId) { CursorMan.replaceCursor( curSurface->getBasePtr(0, 0), curSurface->w, curSurface->h, - hotspotX, hotspotY, + 0, 0, 255, false, &curSurface->format ); @@ -2323,7 +2322,7 @@ void PrinceEngine::rightMouseButton() { if (_flags->getFlagValue(Flags::POWERENABLED)) { _flags->setFlagValue(Flags::MBFLAG, 2); } - if (_mouseFlag) { + if (_mouseFlag && _mouseFlag != 3) { _mainHero->freeOldMove(); _secondHero->freeOldMove(); _interpreter->storeNewPC(0); @@ -2950,9 +2949,9 @@ void PrinceEngine::mouseWeirdo() { mousePos.y -= kCelStep; break; } - mousePos.x = CLIP(mousePos.x, (int16) 0, (int16) 639); + mousePos.x = CLIP(mousePos.x, (int16) 315, (int16) 639); _flags->setFlagValue(Flags::MXFLAG, mousePos.x); - mousePos.y = CLIP(mousePos.y, (int16) 0, (int16) 479); + mousePos.y = CLIP(mousePos.y, (int16) 0, (int16) 170); _flags->setFlagValue(Flags::MYFLAG, mousePos.y); _system->warpMouse(mousePos.x, mousePos.y); } diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 872da2e82d..9dabebfb5e 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -1760,7 +1760,6 @@ void Interpreter::O_TALKHEROSTOP() { debugInterpreter("O_TALKHEROSTOP %d", heroId); } -// TODO - check this void Interpreter::O_HEROCOLOR() { int32 heroId = readScriptFlagValue(); int32 color = readScriptFlagValue(); |