aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-07-05 13:09:27 -0400
committerMatthew Hoops2011-07-05 13:09:27 -0400
commit559c278b09baae63bb37a00fff3b781ac7448796 (patch)
tree8a9d9e18f701f7aa44da808ecc59524678c4f840 /engines
parent47e9a6ccdc6a162309ddaba2e6f6f83d5a047990 (diff)
downloadscummvm-rg350-559c278b09baae63bb37a00fff3b781ac7448796.tar.gz
scummvm-rg350-559c278b09baae63bb37a00fff3b781ac7448796.tar.bz2
scummvm-rg350-559c278b09baae63bb37a00fff3b781ac7448796.zip
MOHAWK: Allow setting LB cursors by name
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/cursors.cpp11
-rw-r--r--engines/mohawk/cursors.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index 3284a3228f..78e099ccfe 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -252,6 +252,17 @@ void LivingBooksCursorManager_v2::setCursor(uint16 id) {
}
}
+void LivingBooksCursorManager_v2::setCursor(const Common::String &name) {
+ if (!_sysArchive)
+ return;
+
+ uint16 id = _sysArchive->findResourceID(ID_TCUR, name);
+ if (id == 0xffff)
+ error("Could not find cursor '%s'", name.c_str());
+ else
+ setCursor(id);
+}
+
PECursorManager::PECursorManager(const Common::String &appName) {
_exe = new Common::PEResources();
diff --git a/engines/mohawk/cursors.h b/engines/mohawk/cursors.h
index d92b6b4285..7bfa491904 100644
--- a/engines/mohawk/cursors.h
+++ b/engines/mohawk/cursors.h
@@ -56,6 +56,7 @@ public:
virtual void showCursor();
virtual void hideCursor();
virtual void setCursor(uint16 id);
+ virtual void setCursor(const Common::String &name) {}
virtual void setDefaultCursor();
virtual bool hasSource() const { return false; }
@@ -157,6 +158,7 @@ public:
~LivingBooksCursorManager_v2();
void setCursor(uint16 id);
+ void setCursor(const Common::String &name);
bool hasSource() const { return _sysArchive != 0; }
private: