diff options
-rw-r--r-- | scumm/cursor.cpp | 17 | ||||
-rw-r--r-- | scumm/scumm.h | 2 |
2 files changed, 19 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 diff --git a/scumm/scumm.h b/scumm/scumm.h index 3e21b8ce68..17bc973915 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -315,6 +315,7 @@ class ScummEngine : public Engine { friend class SmushPlayer; friend class Insane; friend class CharsetRenderer; + friend class Win32ResExtractor; void errorString(const char *buf_input, char *buf_output); public: @@ -925,6 +926,7 @@ protected: void setCursorHotspot(int x, int y); void grabCursor(int x, int y, int w, int h); void grabCursor(byte *ptr, int width, int height); + void grabCursorFromBuffer(byte *ptr, int width, int height); void makeCursorColorTransparent(int a); void setupCursor(); void decompressDefaultCursor(int index); |