[Scummvm-git-logs] scummvm master -> 40c241bbd356b6da37562fc4efd7318624c77f7e
eriktorbjorn
noreply at scummvm.org
Thu Dec 16 19:31:55 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
741b47bdd0 SHERLOCK: Fix glitches in Rose Tattoo save box
3d78062210 SHERLOCK: Fix Rose Tattoo crash when moving past end of string
40c241bbd3 SHERLOCK: Fix height of blinking cursor in Rose Tattoo journal search
Commit: 741b47bdd00b92deb31147b85ac50c8d6c990b69
https://github.com/scummvm/scummvm/commit/741b47bdd00b92deb31147b85ac50c8d6c990b69
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-16T20:21:25+01:00
Commit Message:
SHERLOCK: Fix glitches in Rose Tattoo save box
For instance, if you entered a letter like "g" and then erased it, there
would still be traces of it on screen. I've made the assumption that
subtracting 1 from the font height is wrong everywhere.
Changed paths:
engines/sherlock/tattoo/widget_files.cpp
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp
index 5e877c53f4..fa44d08fe4 100644
--- a/engines/sherlock/tattoo/widget_files.cpp
+++ b/engines/sherlock/tattoo/widget_files.cpp
@@ -266,7 +266,7 @@ bool WidgetFiles::getFilename() {
if (isSlotEmpty(_selector)) {
index = 0;
- _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY);
+ _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
filename = "";
} else {
index = filename.size();
@@ -324,7 +324,7 @@ bool WidgetFiles::getFilename() {
filename.setChar(' ', index);
}
- _surface.fillRect(Common::Rect(pt.x, pt.y, _surface.width() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY);
+ _surface.fillRect(Common::Rect(pt.x, pt.y, _surface.width() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
_surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED);
} else if ((keyState.keycode == Common::KEYCODE_LEFT && index > 0)
@@ -374,7 +374,7 @@ bool WidgetFiles::getFilename() {
} else if (keyState.keycode == Common::KEYCODE_DELETE) {
filename.deleteChar(index);
- _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY);
+ _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
_surface.writeString(filename + index, pt, COMMAND_HIGHLIGHTED);
} else if (keyState.keycode == Common::KEYCODE_RETURN) {
@@ -394,7 +394,7 @@ bool WidgetFiles::getFilename() {
filename.setChar(keyState.ascii, index);
_surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9,
- pt.y + _surface.fontHeight() - 1), TRANSPARENCY);
+ pt.y + _surface.fontHeight()), TRANSPARENCY);
_surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED);
pt.x += _surface.charWidth(keyState.ascii);
++index;
Commit: 3d7806221029329f3b734112ca2514f3c70d17dc
https://github.com/scummvm/scummvm/commit/3d7806221029329f3b734112ca2514f3c70d17dc
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-16T20:22:04+01:00
Commit Message:
SHERLOCK: Fix Rose Tattoo crash when moving past end of string
Changed paths:
engines/sherlock/tattoo/widget_files.cpp
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp
index fa44d08fe4..b2637f32d6 100644
--- a/engines/sherlock/tattoo/widget_files.cpp
+++ b/engines/sherlock/tattoo/widget_files.cpp
@@ -328,7 +328,7 @@ bool WidgetFiles::getFilename() {
_surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED);
} else if ((keyState.keycode == Common::KEYCODE_LEFT && index > 0)
- || (keyState.keycode == Common::KEYCODE_RIGHT && index < 49 && pt.x < (_bounds.right - BUTTON_SIZE - 20))
+ || (keyState.keycode == Common::KEYCODE_RIGHT && index < (int)filename.size() && pt.x < (_bounds.right - BUTTON_SIZE - 20))
|| (keyState.keycode == Common::KEYCODE_HOME && index > 0)
|| (keyState.keycode == Common::KEYCODE_END)) {
_surface.fillRect(Common::Rect(pt.x, pt.y, pt.x + width, pt.y + _surface.fontHeight()), TRANSPARENCY);
Commit: 40c241bbd356b6da37562fc4efd7318624c77f7e
https://github.com/scummvm/scummvm/commit/40c241bbd356b6da37562fc4efd7318624c77f7e
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-16T20:30:51+01:00
Commit Message:
SHERLOCK: Fix height of blinking cursor in Rose Tattoo journal search
Changed paths:
engines/sherlock/tattoo/tattoo_journal.cpp
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp
index cdafed4e29..91f70649d1 100644
--- a/engines/sherlock/tattoo/tattoo_journal.cpp
+++ b/engines/sherlock/tattoo/tattoo_journal.cpp
@@ -852,7 +852,7 @@ int TattooJournal::getFindName(bool printError) {
blinkFlag = !blinkFlag;
if (blinkFlag) {
// Draw cursor
- screen._backBuffer1.fillRect(Common::Rect(cursorX, cursorY, cursorX + 7, cursorY + 8), COMMAND_HIGHLIGHTED);
+ screen._backBuffer1.fillRect(Common::Rect(cursorX, cursorY, cursorX + 7, cursorY + 9), COMMAND_HIGHLIGHTED);
screen.slamArea(cursorX, cursorY, 8, 9);
}
else {
More information about the Scummvm-git-logs
mailing list