diff options
author | Eugene Sandulenko | 2004-06-24 20:09:36 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-06-24 20:09:36 +0000 |
commit | 088676cdb2ae3fc463812771de12745162c1e7a0 (patch) | |
tree | 055a05926c79f1c2354fd4840bf9dda61b0de12b /scumm/cursor.cpp | |
parent | 08cebae47298a15895fc35e8755dd5bfa85ff6eb (diff) | |
download | scummvm-rg350-088676cdb2ae3fc463812771de12745162c1e7a0.tar.gz scummvm-rg350-088676cdb2ae3fc463812771de12745162c1e7a0.tar.bz2 scummvm-rg350-088676cdb2ae3fc463812771de12745162c1e7a0.zip |
Add grabCursorFromBuffer() function.
svn-id: r14033
Diffstat (limited to 'scumm/cursor.cpp')
-rw-r--r-- | scumm/cursor.cpp | 17 |
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 |