[Scummvm-git-logs] scummvm master -> 20813133ab40effb3a71121364feb8c9af7dc8cd
orgads
noreply at scummvm.org
Sun Aug 14 19:16:18 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:
20813133ab SCUMM: MONKEY2: fix BiDi in multi-line dialogue interpolation
Commit: 20813133ab40effb3a71121364feb8c9af7dc8cd
https://github.com/scummvm/scummvm/commit/20813133ab40effb3a71121364feb8c9af7dc8cd
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2022-08-14T22:16:15+03:00
Commit Message:
SCUMM: MONKEY2: fix BiDi in multi-line dialogue interpolation
Changed paths:
engines/scumm/string.cpp
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 2ca12e141de..36b7dfca47e 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -573,6 +573,13 @@ void ScummEngine::fakeBidiString(byte *ltext, bool ignoreVerb) const {
while (ltext[ll] == 0xFF) {
ll += 4;
}
+
+ if (_game.id == GID_MONKEY2 && ltext[0] == 0x07) {
+ for (int i = 1; i < ll; i++)
+ ltext[i - 1] = ltext[i];
+ ltext[--ll] = 0x07;
+ }
+
int32 ipos = 0;
int32 start = 0;
byte *text = ltext + ll;
@@ -652,9 +659,9 @@ void ScummEngine::fakeBidiString(byte *ltext, bool ignoreVerb) const {
if (_game.id == GID_INDY4 && ltext[0] == 0x7F) {
ltext[start + ipos + ll] = 0x80;
ltext[start + ipos + ll + 1] = 0;
- } else if (_game.id == GID_MONKEY2 && ltext[0] == 0x07) {
- ltext[0] = ' ';
- ltext[start + ipos + ll] = 0x07;
+ } else if (_game.id == GID_MONKEY2) {
+ // add non-printable character to end to avoid space trimming
+ ltext[start + ipos + ll] = '@';
ltext[start + ipos + ll + 1] = 0;
}
}
More information about the Scummvm-git-logs
mailing list