diff options
author | Gregory Montoir | 2004-01-09 15:14:15 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-01-09 15:14:15 +0000 |
commit | 657333aaf0cce4439d4a0a14d8f86029b6e23ac8 (patch) | |
tree | 02499ee351babf125b96e92f97c6c196cf621a8b /queen | |
parent | 722de1e04a85c0050fa54ef3de76b88b858d3ca9 (diff) | |
download | scummvm-rg350-657333aaf0cce4439d4a0a14d8f86029b6e23ac8.tar.gz scummvm-rg350-657333aaf0cce4439d4a0a14d8f86029b6e23ac8.tar.bz2 scummvm-rg350-657333aaf0cce4439d4a0a14d8f86029b6e23ac8.zip |
fix mouse pointer glitch occuring when exiting Debugger
svn-id: r12281
Diffstat (limited to 'queen')
-rw-r--r-- | queen/display.cpp | 12 | ||||
-rw-r--r-- | queen/display.h | 4 | ||||
-rw-r--r-- | queen/graphics.cpp | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/queen/display.cpp b/queen/display.cpp index 4941218e77..2d310c4a61 100644 --- a/queen/display.cpp +++ b/queen/display.cpp @@ -44,6 +44,8 @@ Display::Display(QueenEngine *vm, OSystem *system) memset(_panelBuf, 0, PANEL_W * PANEL_H); memset(_backdropBuf, 0, BACKDROP_W * BACKDROP_H); + memset(_mousePtr, 0, sizeof(_mousePtr)); + _fullRefresh = true; _dirtyBlocksWidth = SCREEN_W / D_BLOCK_W; _dirtyBlocksHeight = SCREEN_H / D_BLOCK_H; @@ -807,10 +809,12 @@ void Display::waitForTimer() { } -void Display::setMouseCursor(uint8 *buf, uint16 w, uint16 h, uint16 xhs, uint16 yhs) { +void Display::setMouseCursor(uint8 *buf, uint16 w, uint16 h) { + assert(w == 14 && h == 14); + uint16 size = 14 * 14; + memcpy(_mousePtr, buf, size); // change transparency color to match the one expected by the backend (0xFF) - uint16 size = w * h; - uint8 *p = buf; + uint8 *p = _mousePtr; while (size--) { if (*p == 255) { *p = 254; @@ -819,7 +823,7 @@ void Display::setMouseCursor(uint8 *buf, uint16 w, uint16 h, uint16 xhs, uint16 } ++p; } - _system->set_mouse_cursor(buf, w, h, xhs, yhs); + _system->set_mouse_cursor(_mousePtr, 14, 14, 1, 1); } diff --git a/queen/display.h b/queen/display.h index a22dd4e355..30822cb361 100644 --- a/queen/display.h +++ b/queen/display.h @@ -85,7 +85,7 @@ public: void handleTimer(); void waitForTimer(); - void setMouseCursor(uint8 *buf, uint16 w, uint16 h, uint16 xhs, uint16 yhs); + void setMouseCursor(uint8 *buf, uint16 w, uint16 h); void showMouseCursor(bool show); void initFont(); @@ -151,6 +151,8 @@ private: uint8 *_panelBuf; uint8 *_backdropBuf; + uint8 _mousePtr[14 * 14]; + bool _fullRefresh; uint8 *_dirtyBlocks; uint16 _dirtyBlocksWidth, _dirtyBlocksHeight; diff --git a/queen/graphics.cpp b/queen/graphics.cpp index 14c56a00d8..e474c6b6c9 100644 --- a/queen/graphics.cpp +++ b/queen/graphics.cpp @@ -207,7 +207,7 @@ void Graphics::unpackControlBank() { void Graphics::setupMouseCursor() { BobFrame *bf = _vm->bankMan()->fetchFrame(1); - _vm->display()->setMouseCursor(bf->data, bf->width, bf->height, bf->xhotspot, bf->yhotspot); + _vm->display()->setMouseCursor(bf->data, bf->width, bf->height); } |