Permalink
Browse files

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
  • Loading branch information...
1 parent 8dced54 commit a74fcf7ceebf9f5f5233858861a23d3d88cdc2a5 @sev- sev- committed Apr 9, 2006
Showing with 8 additions and 3 deletions.
  1. +2 −3 engines/scumm/he/resource_he.cpp
  2. +6 −0 engines/scumm/he/wiz_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
}
@@ -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);
}

0 comments on commit a74fcf7

Please sign in to comment.