aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/_mouse.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-20 11:28:22 +0000
committerTorbjörn Andersson2003-08-20 11:28:22 +0000
commit264b2d87675d2495ae5e169f8bdbfc23fd5603c6 (patch)
treecbad12111e1bc7d1c3294424654b131cf19e642c /sword2/driver/_mouse.cpp
parent77f13830ed1f526279fc000d6b8800234f3c890c (diff)
downloadscummvm-rg350-264b2d87675d2495ae5e169f8bdbfc23fd5603c6.tar.gz
scummvm-rg350-264b2d87675d2495ae5e169f8bdbfc23fd5603c6.tar.bz2
scummvm-rg350-264b2d87675d2495ae5e169f8bdbfc23fd5603c6.zip
Removed some memset()s that I added earlier out of paranoia. Added a FIXME
comment, noting that DrawMouse() used to handle the "luggage animations" as well. I don't know if I broke anything when I moved that part of the code. svn-id: r9792
Diffstat (limited to 'sword2/driver/_mouse.cpp')
-rw-r--r--sword2/driver/_mouse.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sword2/driver/_mouse.cpp b/sword2/driver/_mouse.cpp
index 107922ecf9..c214fac44c 100644
--- a/sword2/driver/_mouse.cpp
+++ b/sword2/driver/_mouse.cpp
@@ -234,8 +234,11 @@ int32 DecompressMouse(uint8 *decomp, uint8 *comp, int32 size) {
int32 DrawMouse(void) {
+ // FIXME: In the original code, luggage animations were decoded here
+ // as well. Luggage animations and mouse animations were not mutually
+ // exclusive. Was that a necessary feature?
+
if (mouseAnim) {
- memset(_mouseData, 0, sizeof(_mouseData));
DecompressMouse(_mouseData, mouseSprite, mouseAnim->mousew * mouseAnim->mouseh);
g_sword2->_system->set_mouse_cursor(_mouseData, mouseAnim->mousew, mouseAnim->mouseh, mouseAnim->xHotSpot, mouseAnim->yHotSpot - MENUDEEP);
}
@@ -330,8 +333,6 @@ int32 SetLuggageAnim(uint8 *ma, int32 size) {
// The luggage animation is only one frame.
- memset(_mouseData, 0, sizeof(_mouseData));
-
DecompressMouse(_mouseData, (uint8 *) luggageAnim + *mouseOffsets, luggageAnim->mousew * luggageAnim->mouseh);
DecompressMouse(_mouseData, (uint8 *) luggageAnim + *luggageOffset, luggageAnim->mousew * luggageAnim->mouseh);