diff options
author | Paul Gilbert | 2011-10-31 15:11:27 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-10-31 15:12:27 +1100 |
commit | c15a67879ca65daa21c58c794c2f66e12edad0c8 (patch) | |
tree | 86a0255f99417d21c0e97fbc67082455abb6fa50 | |
parent | f56dc4151dfd2f82df3c1459cf218cc4b3a30ec0 (diff) | |
download | scummvm-rg350-c15a67879ca65daa21c58c794c2f66e12edad0c8.tar.gz scummvm-rg350-c15a67879ca65daa21c58c794c2f66e12edad0c8.tar.bz2 scummvm-rg350-c15a67879ca65daa21c58c794c2f66e12edad0c8.zip |
TSAGE: Added inventory item cursor support for R2RW
-rw-r--r-- | engines/tsage/core.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/events.cpp | 19 |
2 files changed, 19 insertions, 4 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 84ab98d4e0..0ada457224 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -77,8 +77,8 @@ InvObject::InvObject(int strip, int frame) { } void InvObject::setCursor() { - if (g_vm->getGameID() == GType_BlueForce) { - // Blue Force cursor handling + if (g_vm->getGameID() != GType_Ringworld) { + // All other games _cursorId = (CursorType)BF_GLOBALS._inventory->indexOf(this); g_globals->_events.setCursor(_cursorId); } else { diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp index 8958482404..2c4efe5640 100644 --- a/engines/tsage/events.cpp +++ b/engines/tsage/events.cpp @@ -221,7 +221,8 @@ void EventsClass::setCursor(CursorType cursorType) { case CURSOR_WALK: default: - if (g_vm->getGameID() == GType_BlueForce) { + switch (g_vm->getGameID()) { + case GType_BlueForce: if (cursorType == CURSOR_WALK) { cursor = g_resourceManager->getSubResource(1, 5, 1, &size); } else { @@ -231,11 +232,25 @@ void EventsClass::setCursor(CursorType cursorType) { questionEnabled = true; } _currentCursor = cursorType; - } else { + break; + case GType_Ringworld2: + if (cursorType == CURSOR_WALK) { + cursor = CURSOR_WALK_DATA; + delFlag = false; + } else { + // Inventory icon + InvObject *invObject = g_globals->_inventory->getItem((int)cursorType); + cursor = g_resourceManager->getSubResource(6, invObject->_strip, invObject->_frame, &size); + questionEnabled = true; + } + _currentCursor = cursorType; + break; + default: // For Ringworld, always treat as the walk cursor cursor = CURSOR_WALK_DATA; _currentCursor = CURSOR_WALK; delFlag = false; + break; } break; } |