[Scummvm-cvs-logs] scummvm master -> 559c278b09baae63bb37a00fff3b781ac7448796

clone2727 clone2727 at gmail.com
Tue Jul 5 19:13:34 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
559c278b09 MOHAWK: Allow setting LB cursors by name


Commit: 559c278b09baae63bb37a00fff3b781ac7448796
    https://github.com/scummvm/scummvm/commit/559c278b09baae63bb37a00fff3b781ac7448796
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-07-05T10:09:27-07:00

Commit Message:
MOHAWK: Allow setting LB cursors by name

Changed paths:
    engines/mohawk/cursors.cpp
    engines/mohawk/cursors.h



diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index 3284a32..78e099c 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 d92b6b4..7bfa491 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:






More information about the Scummvm-git-logs mailing list