diff options
author | Eugene Sandulenko | 2006-04-09 03:16:05 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-04-09 03:16:05 +0000 |
commit | a74fcf7ceebf9f5f5233858861a23d3d88cdc2a5 (patch) | |
tree | 737506837cc6939f29beb940a4a96c5ea8d843bd /engines/scumm/he | |
parent | 8dced5411194f31c7a3eb20e97407bf686a1b05d (diff) | |
download | scummvm-rg350-a74fcf7ceebf9f5f5233858861a23d3d88cdc2a5.tar.gz scummvm-rg350-a74fcf7ceebf9f5f5233858861a23d3d88cdc2a5.tar.bz2 scummvm-rg350-a74fcf7ceebf9f5f5233858861a23d3d88cdc2a5.zip |
Fix regression introduced by removing of GF_HE_CURSORLESS feature flag.
There are 3 cases of HE cursors:
o Default one. We set up cursor palette for it.
o Loaded from .HE3 (windows resource file). We use default cursor palette.
o Loaded from WizImage. We disable default cursor palette.
svn-id: r21711
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/resource_he.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/he/wiz_he.cpp | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 931c946965..74cc95f8fb 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -1062,10 +1062,9 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int uint32 color = simple_vec(image_data, x + imod, bitmap.bit_count); - // FIXME?: This works only with b/w cursors and white index may be - // different. But now it's enough. + // We set up cursor palette for default cursor, so use it if (color) { - cursor[0][width * d + x] = 15; // white in SCUMM + cursor[0][width * d + x] = 254; // white } else { cursor[0][width * d + x] = 255; // transparent } diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index ba5c66e453..55de8831ce 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -23,6 +23,7 @@ #include "common/stdafx.h" +#include "common/system.h" #include "scumm/he/intern_he.h" #include "scumm/resource.h" #include "scumm/scumm.h" @@ -1523,6 +1524,11 @@ void Wiz::loadWizCursor(int resId) { getWizImageDim(resId, 0, cw, ch); _vm->setCursorFromBuffer(cursor, cw, ch, cw); _vm->setCursorHotspot(x, y); + + // Since we set up cursor palette for default cursor, disable it now + if (_vm->_system->hasFeature(OSystem::kFeatureCursorHasPalette)) + _vm->_system->disableCursorPalette(true); + free(cursor); } |