mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
fixed mouse cursor/transparency
svn-id: r8336
This commit is contained in:
parent
4a934a5519
commit
717bdd9223
@ -168,6 +168,18 @@ void SkyMouse::drawNewMouse() {
|
|||||||
//drawMouse();
|
//drawMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//original sky uses different colors for transparency than our backends do,
|
||||||
|
//so we simply swap our "transparent"-white with another one.
|
||||||
|
void SkyMouse::fixMouseTransparency(byte *mouseData) {
|
||||||
|
for (int i = 0; i < (_mouseWidth * _mouseHeight); i++) {
|
||||||
|
if (mouseData[i] == 255)
|
||||||
|
mouseData[i] = 242;
|
||||||
|
else
|
||||||
|
if (mouseData[i] == 0)
|
||||||
|
mouseData[i] = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SkyMouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) {
|
void SkyMouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) {
|
||||||
SkyState::_systemVars.mouseFlag |= MF_IN_INT;
|
SkyState::_systemVars.mouseFlag |= MF_IN_INT;
|
||||||
_mouseType2 = frameNum;
|
_mouseType2 = frameNum;
|
||||||
@ -182,6 +194,7 @@ void SkyMouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) {
|
|||||||
|
|
||||||
//_system->set_mouse_cursor(_mouseData2, _mouseWidth, _mouseHeight, mouseX, mouseY);
|
//_system->set_mouse_cursor(_mouseData2, _mouseWidth, _mouseHeight, mouseX, mouseY);
|
||||||
// there's something wrong about the mouse's hotspot. using 0/0 works fine.
|
// there's something wrong about the mouse's hotspot. using 0/0 works fine.
|
||||||
|
fixMouseTransparency(_mouseData2);
|
||||||
_system->set_mouse_cursor(_mouseData2, _mouseWidth, _mouseHeight, 0, 0);
|
_system->set_mouse_cursor(_mouseData2, _mouseWidth, _mouseHeight, 0, 0);
|
||||||
if (frameNum == MOUSE_BLANK) _system->show_mouse(false);
|
if (frameNum == MOUSE_BLANK) _system->show_mouse(false);
|
||||||
else _system->show_mouse(true);
|
else _system->show_mouse(true);
|
||||||
|
@ -54,7 +54,8 @@ protected:
|
|||||||
|
|
||||||
void pointerEngine(void);
|
void pointerEngine(void);
|
||||||
void buttonEngine1(void);
|
void buttonEngine1(void);
|
||||||
|
void fixMouseTransparency(byte *mouseData);
|
||||||
|
|
||||||
uint16 _eMouseB;
|
uint16 _eMouseB;
|
||||||
uint16 _bMouseB;
|
uint16 _bMouseB;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user