[Scummvm-git-logs] scummvm master -> 0df747842e4b61f744cd550a7d52e793cc0e69da
sdelamarre
noreply at scummvm.org
Sat Dec 24 17:02:49 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0df747842e GOB: fix some cursor glitches in Adibou2
Commit: 0df747842e4b61f744cd550a7d52e793cc0e69da
https://github.com/scummvm/scummvm/commit/0df747842e4b61f744cd550a7d52e793cc0e69da
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2022-12-24T18:02:25+01:00
Commit Message:
GOB: fix some cursor glitches in Adibou2
When cursors are drawn by scripts (_isCursorFromExe == false), do not reset cursorSprite when a cursor change is detected in animateCursor() (it may already contain the wanted cursor) and ensure palette is set to non-external for all cursor indexes.
Changed paths:
engines/gob/draw.cpp
engines/gob/draw_v7.cpp
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index c5f537712c5..ecf18f925b6 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -404,8 +404,8 @@ void Draw::resizeCursors(int16 width, int16 height, int16 count, bool transparen
debugC(5, kDebugGraphics, "Resizing cursors: size %dx%d -> %dx%d, cursor count %d -> %d)",
_vm->_draw->_cursorWidth,
- width,
_vm->_draw->_cursorHeight,
+ width,
height,
_vm->_draw->_cursorCount,
count);
diff --git a/engines/gob/draw_v7.cpp b/engines/gob/draw_v7.cpp
index 0fa7acad7ec..c4f51bbf851 100644
--- a/engines/gob/draw_v7.cpp
+++ b/engines/gob/draw_v7.cpp
@@ -184,7 +184,6 @@ void Draw_v7::animateCursor(int16 cursor) {
(_cursorAnimLow[_cursorIndex] > _cursorAnim))
_cursorAnim = _cursorAnimLow[_cursorIndex];
- //debugC(1, kDebugGraphics, "Draw_v7::animateCursor() - cursor index %d replaced by cursor anim '%d'", cursorIndex, _cursorAnim);
cursorIndex = _cursorAnim;
}
// '------
@@ -194,11 +193,6 @@ void Draw_v7::animateCursor(int16 cursor) {
if (((!_cursorNames[cursorIndex].empty() || _isCursorFromExe)) && cursorChanged) {
_cursorName = _cursorNames[cursorIndex];
- // Clear the cursor sprite at that index
- _vm->_draw->_cursorSprites->fillRect(cursorIndex * _vm->_draw->_cursorWidth, 0,
- cursorIndex * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1,
- _vm->_draw->_cursorHeight - 1, 0);
-
// If the cursor name is empty, that cursor will be drawn by the scripts
if (_cursorNames[cursorIndex].empty() || _cursorNames[cursorIndex] == "VIDE") { // "VIDE" is "empty" in french
for (int i = 0; i < 40; i++) {
@@ -209,13 +203,20 @@ void Draw_v7::animateCursor(int16 cursor) {
// Make sure the cursors sprite is big enough and set to non-extern palette
resizeCursors(-1, -1, cursorIndex + 1, true);
- _vm->_draw->_doCursorPalettes[cursorIndex] = false;
+ for (int i = 0; i < _vm->_draw->_cursorCount; i++) {
+ _vm->_draw->_doCursorPalettes[i] = false;
+ }
_cursorX = _vm->_global->_inter_mouseX;
_cursorY = _vm->_global->_inter_mouseY;
_showCursor &= ~1;
return;
} else {
+ // Clear the cursor sprite at that index
+ _vm->_draw->_cursorSprites->fillRect(cursorIndex * _vm->_draw->_cursorWidth, 0,
+ cursorIndex * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1,
+ _vm->_draw->_cursorHeight - 1, 0);
+
if (!loadCursorFromFile(cursorIndex)) {
_cursorX = _vm->_global->_inter_mouseX;
_cursorY = _vm->_global->_inter_mouseY;
More information about the Scummvm-git-logs
mailing list