aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorMatthew Hoops2011-03-07 17:07:59 -0500
committerMatthew Hoops2011-03-07 17:07:59 -0500
commite8151026594c16a84d390059faa5aaaeafa621da (patch)
treef45770831cea801f72c706107108f8a6f46b6b55 /engines/sci/graphics
parent212b58ad429718bcb0366541a413fc52db25f615 (diff)
parent4e7b66b1bc948f9fc22ba3ce67f76f8dfe2f5f99 (diff)
downloadscummvm-rg350-e8151026594c16a84d390059faa5aaaeafa621da.tar.gz
scummvm-rg350-e8151026594c16a84d390059faa5aaaeafa621da.tar.bz2
scummvm-rg350-e8151026594c16a84d390059faa5aaaeafa621da.zip
Merge branch 'pe_exe' of https://github.com/clone2727/scummvm into clone2727-pe_exe
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/cursor.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 09f08e4b15..9d1c3dabd6 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/events.h"
#include "common/macresman.h"
+#include "common/memstream.h"
#include "common/system.h"
#include "common/util.h"
#include "graphics/cursorman.h"
@@ -491,8 +492,8 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
cursorBitmap[i * 8 + b] = 0; // Doesn't matter, just is transparent
}
- uint16 hotspotX = READ_BE_UINT16(data);
- uint16 hotspotY = READ_BE_UINT16(data + 2);
+ uint16 hotspotY = READ_BE_UINT16(data);
+ uint16 hotspotX = READ_BE_UINT16(data + 2);
static const byte cursorPalette[] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0xff };
@@ -504,11 +505,12 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
// Mac crsr cursor
byte *cursorBitmap, *palette;
int width, height, hotspotX, hotspotY, palSize, keycolor;
- Common::MacResManager::convertCrsrCursor(resource->data, resource->size, &cursorBitmap, &width, &height, &hotspotX, &hotspotY, &keycolor, true, &palette, &palSize);
+ Common::MemoryReadStream resStream(resource->data, resource->size);
+ Common::MacResManager::convertCrsrCursor(&resStream, &cursorBitmap, width, height, hotspotX, hotspotY, keycolor, true, &palette, palSize);
CursorMan.replaceCursor(cursorBitmap, width, height, hotspotX, hotspotY, keycolor);
CursorMan.replaceCursorPalette(palette, 0, palSize);
- free(cursorBitmap);
- free(palette);
+ delete[] cursorBitmap;
+ delete[] palette;
}
kernelShow();