diff options
author | Eugene Sandulenko | 2013-08-24 22:23:31 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:19 +0300 |
commit | 3d3ebc6ae7430ae4147bdc9e07115d134dd9d312 (patch) | |
tree | c0ed550bf82464ea689e9aa0336f7b6ab3b93f35 /engines | |
parent | ee18a545549f7ab58d3da2ca67fb6824b498b6d6 (diff) | |
download | scummvm-rg350-3d3ebc6ae7430ae4147bdc9e07115d134dd9d312.tar.gz scummvm-rg350-3d3ebc6ae7430ae4147bdc9e07115d134dd9d312.tar.bz2 scummvm-rg350-3d3ebc6ae7430ae4147bdc9e07115d134dd9d312.zip |
FULLPIPE: Implement CInputController::setCursor()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/input.cpp | 13 | ||||
-rw-r--r-- | engines/fullpipe/input.h | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 7a210772f2..efc42b3bc9 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -86,8 +86,17 @@ void CInputController::drawCursor(int x, int y) { warning("STUB: CInputController::drawCursor(%d, %d)", x, y); } -void CInputController::setCursor(int id) { - warning("STUB: CInputController::setCursor(%d)", id); +void CInputController::setCursor(int cursorId) { + if (_cursorIndex == -1 || _cursorsArray[_cursorIndex]->pictureId != cursorId) { + _cursorIndex = -1; + + for (uint i = 0; i < _cursorsArray.size(); i++) { + if (_cursorsArray[i]->pictureId == cursorId) { + _cursorIndex = i; + break; + } + } + } } CursorInfo::CursorInfo() { diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h index e527770dc9..6a7ad11f67 100644 --- a/engines/fullpipe/input.h +++ b/engines/fullpipe/input.h @@ -56,7 +56,7 @@ class CInputController { int _cursorIndex; CursorsArray _cursorsArray; Common::Rect _cursorBounds; - int _cursorItemPicture; + Picture *_cursorItemPicture; public: CInputController(); |