[Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.35,1.36 d_draw.h,1.28,1.29
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Wed May 5 00:23:05 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword2 console.cpp,1.44,1.45 console.h,1.20,1.21 debug.cpp,1.39,1.40 logic.h,1.34,1.35 speech.cpp,1.62,1.63 sword2.cpp,1.110,1.111
- Next message: [Scummvm-cvs-logs] CVS: scummvm/awe - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2075/driver
Modified Files:
_mouse.cpp d_draw.h
Log Message:
Take advantage of the changes in the backend's mouse cursor handling. It
didn't do the change I was hoping for: the coyote stone is still partially
see-through, but perhaps it was in the original as well.
At least we no longer need to keep the buffer the mouse cursor is decoded
to, since that's now handled by the backend.
Index: _mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/_mouse.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- _mouse.cpp 23 Apr 2004 07:02:08 -0000 1.35
+++ _mouse.cpp 5 May 2004 07:22:35 -0000 1.36
@@ -64,10 +64,6 @@
return NULL;
}
-// FIXME: The original code used 0 for transparency, while our backend uses
-// 0xFF. That means that parts of the mouse cursor that weren't meant to be
-// transparent may be now.
-
void Graphics::decompressMouse(byte *decomp, byte *comp, int width, int height, int pitch, int xOff, int yOff) {
int32 size = width * height;
int32 i = 0;
@@ -94,6 +90,8 @@
}
void Graphics::drawMouse(void) {
+ byte mouseData[MAX_MOUSE_W * MAX_MOUSE_H];
+
if (!_mouseAnim && !_luggageAnim)
return;
@@ -147,21 +145,21 @@
mouse_width += deltaX;
mouse_height += deltaY;
- if ((uint32) (mouse_width * mouse_height) > sizeof(_mouseData)) {
+ if ((uint32) (mouse_width * mouse_height) > sizeof(mouseData)) {
warning("Mouse cursor too large");
return;
}
- memset(_mouseData, 0xFF, mouse_width * mouse_height);
+ memset(mouseData, 0, mouse_width * mouse_height);
if (_luggageAnim)
- decompressMouse(_mouseData, (byte *) _luggageAnim + READ_LE_UINT32(_luggageOffset), _luggageAnim->mousew,
+ decompressMouse(mouseData, (byte *) _luggageAnim + READ_LE_UINT32(_luggageOffset), _luggageAnim->mousew,
_luggageAnim->mouseh, mouse_width, deltaX, deltaY);
if (_mouseAnim)
- decompressMouse(_mouseData, _mouseSprite, _mouseAnim->mousew, _mouseAnim->mouseh, mouse_width);
+ decompressMouse(mouseData, _mouseSprite, _mouseAnim->mousew, _mouseAnim->mouseh, mouse_width);
- _vm->_system->setMouseCursor(_mouseData, mouse_width, mouse_height, hotspot_x, hotspot_y);
+ _vm->_system->setMouseCursor(mouseData, mouse_width, mouse_height, hotspot_x, hotspot_y, 0);
}
/**
Index: d_draw.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_draw.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- d_draw.h 23 Apr 2004 07:02:10 -0000 1.28
+++ d_draw.h 5 May 2004 07:22:35 -0000 1.29
@@ -99,8 +99,6 @@
int32 _fadeStartTime;
int32 _fadeTotalTime;
- byte _mouseData[MAX_MOUSE_W * MAX_MOUSE_H];
-
uint8 _mouseFrame;
byte *_mouseSprite;
struct MouseAnim *_mouseAnim;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword2 console.cpp,1.44,1.45 console.h,1.20,1.21 debug.cpp,1.39,1.40 logic.h,1.34,1.35 speech.cpp,1.62,1.63 sword2.cpp,1.110,1.111
- Next message: [Scummvm-cvs-logs] CVS: scummvm/awe - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list