aboutsummaryrefslogtreecommitdiff
path: root/scumm/cursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/cursor.cpp')
-rw-r--r--scumm/cursor.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp
index 0a0fbe47e3..10227fb73f 100644
--- a/scumm/cursor.cpp
+++ b/scumm/cursor.cpp
@@ -306,4 +306,21 @@ void ScummEngine::makeCursorColorTransparent(int a) {
updateCursor();
}
+void ScummEngine::grabCursorFromBuffer(byte *ptr, int width, int height) {
+ uint size;
+ byte *dst;
+
+ size = width * height;
+ if (size > sizeof(_grabbedCursor))
+ error("grabCursor: grabbed cursor too big");
+
+ _cursor.width = width;
+ _cursor.height = height;
+ _cursor.animate = 0;
+
+ memcpy(_grabbedCursor, ptr, width * height);
+
+ updateCursor();
+}
+
} // End of namespace Scumm