aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2004-09-25 14:17:49 +0000
committerGregory Montoir2004-09-25 14:17:49 +0000
commitac4ca820ee556c55b99b83ca3d569a52957e31e2 (patch)
tree9aad356140599a104748a8ac967aa4d6d484b558
parent554d157c78869cf07dc6257e989f71c4d6ab6c76 (diff)
downloadscummvm-rg350-ac4ca820ee556c55b99b83ca3d569a52957e31e2.tar.gz
scummvm-rg350-ac4ca820ee556c55b99b83ca3d569a52957e31e2.tar.bz2
scummvm-rg350-ac4ca820ee556c55b99b83ca3d569a52957e31e2.zip
get rid of the dirty hack needed to display wiz cursors in HE games
svn-id: r15269
-rw-r--r--scumm/script_v72he.cpp6
-rw-r--r--scumm/script_v80he.cpp8
2 files changed, 5 insertions, 9 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 9051aca320..0106129f46 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1450,12 +1450,6 @@ uint8 *ScummEngine_v72he::drawWizImage(int restype, int resnum, int state, int x
if (flags & 0x20) {
int color = 255; // FIXME: should be (VAR_WIZ_TCOLOR != 0xFF) ? VAR(VAR_WIZ_TCOLOR) : 5;
memset(dst, color, width * height);
-
- // FIXME: dirty hack until missing bits are implemented
- Common::Rect rScreen(0, 0, width-1, height-1);
- gdi.copyWizImage(dst, wizd, width, height, 0, 0, width, height, &rScreen);
- setCursorFromBuffer(dst, width, height, width);
- // FIXME: ensure that caller frees the returned pointer
}
cw = width;
ch = height;
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 728f49700c..fccf502a0d 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -592,10 +592,12 @@ void ScummEngine_v80he::loadWizCursor(int resId, int resType, bool state) {
rc.top = MIN((int)rc.top, 32);
rc.right = MIN((int)rc.right, 32);
- // FIXME: dirty hack. Cursor is set in drawWizImage, though should be set from here
- // it is unclear how height and width are passed from drawWizImage
- drawWizImage(rtImage, resId, 0, 0, 0, 0x20);
+ uint8 *cursor = drawWizImage(rtImage, resId, 0, 0, 0, 0x20);
+ uint32 cw, ch;
+ getWizImageDim(resId, 0, cw, ch);
+ setCursorFromBuffer(cursor, cw, ch, cw);
setCursorHotspot(rc.top, rc.right);
+ free(cursor);
}
void ScummEngine_v80he::o80_setState() {