aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/script_c64.cpp4
-rw-r--r--engines/scumm/script_v2.cpp14
2 files changed, 7 insertions, 11 deletions
diff --git a/engines/scumm/script_c64.cpp b/engines/scumm/script_c64.cpp
index 5b2b3f3a63..72bfd94115 100644
--- a/engines/scumm/script_c64.cpp
+++ b/engines/scumm/script_c64.cpp
@@ -416,7 +416,7 @@ void ScummEngine_c64::decodeParseString() {
int textSlot = 0;
_string[textSlot].xpos = 0;
_string[textSlot].ypos = 0;
- _string[textSlot].right = 320;
+ _string[textSlot].right = _screenWidth - 1;
_string[textSlot].center = false;
_string[textSlot].overhead = false;
@@ -555,7 +555,7 @@ void ScummEngine_c64::drawSentence() {
sentenceline.top = virtscr[kVerbVirtScreen].topline;
sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 8;
sentenceline.left = 0;
- sentenceline.right = 319;
+ sentenceline.right = virtscr[kVerbVirtScreen].w - 1;
restoreBG(sentenceline);
drawString(2, (byte*)string);
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 184f491079..fc9924ffca 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -415,10 +415,7 @@ void ScummEngine_v2::decodeParseString() {
int textSlot = 0;
_string[textSlot].xpos = 0;
_string[textSlot].ypos = 0;
- if (_game.platform == Common::kPlatformNES)
- _string[textSlot].right = 256;
- else
- _string[textSlot].right = 320;
+ _string[textSlot].right = _screenWidth - 1;
_string[textSlot].center = false;
_string[textSlot].overhead = false;
@@ -1069,7 +1066,7 @@ void ScummEngine_v2::o2_drawSentence() {
int i = 0, len = 0;
// Maximum length of printable characters
- int maxChars = (_game.platform == Common::kPlatformNES) ? 60: 40;
+ int maxChars = (_game.platform == Common::kPlatformNES) ? 60 : 40;
while (*ptr) {
if (*ptr != '@')
len++;
@@ -1090,12 +1087,12 @@ void ScummEngine_v2::o2_drawSentence() {
sentenceline.top = virtscr[kVerbVirtScreen].topline;
sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 16;
sentenceline.left = 16;
- sentenceline.right = 255;
+ sentenceline.right = virtscr[kVerbVirtScreen].w - 1;
} else {
sentenceline.top = virtscr[kVerbVirtScreen].topline;
sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 8;
sentenceline.left = 0;
- sentenceline.right = 319;
+ sentenceline.right = virtscr[kVerbVirtScreen].w - 1;
}
restoreBG(sentenceline);
@@ -1585,12 +1582,11 @@ void ScummEngine_v2::setUserState(byte state) {
Common::Rect rect;
rect.top = virtscr[kVerbVirtScreen].topline;
rect.bottom = virtscr[kVerbVirtScreen].topline + 8 * 88;
+ rect.right = virtscr[kVerbVirtScreen].w - 1;
if (_game.platform == Common::kPlatformNES) {
rect.left = 16;
- rect.right = 255;
} else {
rect.left = 0;
- rect.right = 319;
}
restoreBG(rect);