From a74fcf7ceebf9f5f5233858861a23d3d88cdc2a5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Apr 2006 03:16:05 +0000 Subject: 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 --- engines/scumm/he/resource_he.cpp | 5 ++--- engines/scumm/he/wiz_he.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'engines/scumm/he') 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); } -- cgit v1.2.3