aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBLooperZ2019-12-31 22:19:02 +0200
committerEugene Sandulenko2020-01-01 00:31:21 +0100
commitcbcb36ac6129c42b9e719dba1505fdac07881cc2 (patch)
tree0b467c09810d001fc816b7b557fd9373b2aff7d3
parentc10ed91c3e4c96ca26fda15137f2d65655ecc742 (diff)
downloadscummvm-rg350-cbcb36ac6129c42b9e719dba1505fdac07881cc2.tar.gz
scummvm-rg350-cbcb36ac6129c42b9e719dba1505fdac07881cc2.tar.bz2
scummvm-rg350-cbcb36ac6129c42b9e719dba1505fdac07881cc2.zip
SCUMM: add more comments
-rw-r--r--engines/scumm/string.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index c2a07fa54b..1c23223605 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -503,7 +503,9 @@ void ScummEngine::fakeBidiString(char *ltext, bool ignoreVerb) {
int sthead = 0;
char last = '\0';
for (int j = 0; j < ipos; j++) {
+ // Reverse string on current line (between start and ipos).
char *curr = text + start + ipos - j - 1;
+ // Special cases to preserve original ordering (numbers).
if (Common::isDigit(*curr) ||
(*curr == ',' && j + 1 < ipos && Common::isDigit(*(curr - 1)) && Common::isDigit(last)) ||
(*curr == '-' && (j + 1 == ipos || Common::isSpace(*(curr - 1))) && Common::isDigit(last))) {