[Scummvm-cvs-logs] SF.net SVN: scummvm:[41960] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Jun 29 20:49:17 CEST 2009
Revision: 41960
http://scummvm.svn.sourceforge.net/scummvm/?rev=41960&view=rev
Author: lordhoto
Date: 2009-06-29 18:49:17 +0000 (Mon, 29 Jun 2009)
Log Message:
-----------
Fix kyra2/kyra3 mouse cursor related regressions, introduced with r41959.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/kyra/screen.h
scummvm/trunk/engines/kyra/screen_lok.h
scummvm/trunk/engines/kyra/screen_lol.cpp
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2009-06-29 18:00:18 UTC (rev 41959)
+++ scummvm/trunk/engines/kyra/screen.cpp 2009-06-29 18:49:17 UTC (rev 41960)
@@ -34,7 +34,8 @@
namespace Kyra {
Screen::Screen(KyraEngine_v1 *vm, OSystem *system)
- : _system(system), _vm(vm), _sjisInvisibleColor(0) {
+ : _system(system), _vm(vm), _sjisInvisibleColor(0),
+ _cursorColorKey((vm->gameFlags().gameID == GI_KYRA1) ? 0xFF : 0x00) {
_debugEnabled = false;
_maskMinY = _maskMaxY = -1;
}
@@ -2622,12 +2623,11 @@
y <<= 1;
mouseWidth <<= 1;
mouseHeight <<= 1;
- fillRect(mouseWidth, 0, mouseWidth, mouseHeight, 255, 8);
}
uint8 *cursor = new uint8[mouseHeight * mouseWidth];
- fillRect(0, 0, mouseWidth, mouseHeight, 255, 8);
+ fillRect(0, 0, mouseWidth, mouseHeight, _cursorColorKey, 8);
drawShape(8, shape, 0, 0, 0, 0);
int xOffset = 0;
@@ -2642,7 +2642,7 @@
CursorMan.showMouse(false);
copyRegionToBuffer(8, xOffset, 0, mouseWidth, mouseHeight, cursor);
- CursorMan.replaceCursor(cursor, mouseWidth, mouseHeight, x, y, 255);
+ CursorMan.replaceCursor(cursor, mouseWidth, mouseHeight, x, y, _cursorColorKey);
if (isMouseVisible())
CursorMan.showMouse(true);
delete[] cursor;
Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h 2009-06-29 18:00:18 UTC (rev 41959)
+++ scummvm/trunk/engines/kyra/screen.h 2009-06-29 18:49:17 UTC (rev 41960)
@@ -398,6 +398,7 @@
// mouse handling
int _mouseLockCount;
+ const uint8 _cursorColorKey;
virtual void postProcessCursor(uint8 *data, int w, int h, int pitch) {};
Modified: scummvm/trunk/engines/kyra/screen_lok.h
===================================================================
--- scummvm/trunk/engines/kyra/screen_lok.h 2009-06-29 18:00:18 UTC (rev 41959)
+++ scummvm/trunk/engines/kyra/screen_lok.h 2009-06-29 18:49:17 UTC (rev 41960)
@@ -91,7 +91,7 @@
void convertTo16Colors(uint8 *page, int w, int h, int pitch, int keyColor = -1);
void postProcessCursor(uint8 *data, int width, int height, int pitch) {
- convertTo16Colors(data, width, height, pitch, 255);
+ convertTo16Colors(data, width, height, pitch, _cursorColorKey);
}
void mergeOverlay(int x, int y, int w, int h);
Modified: scummvm/trunk/engines/kyra/screen_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_lol.cpp 2009-06-29 18:00:18 UTC (rev 41959)
+++ scummvm/trunk/engines/kyra/screen_lol.cpp 2009-06-29 18:49:17 UTC (rev 41960)
@@ -997,7 +997,7 @@
void Screen_LoL::postProcessCursor(uint8 *data, int w, int h, int pitch) {
while (h--) {
for (int i = 0; i < w; ++i) {
- if (*data != 255)
+ if (*data != _cursorColorKey)
*data = _paletteConvTable[*data];
++data;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list