aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/string.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index ca627ecc74..f574635dbd 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -1162,13 +1162,24 @@ void Scumm::translateText(char * text, char * trans_buff) {
sprintf(num_s, "%ld", num);
char * buf = _languageBuffer;
+ pos = 0;
// determine is file encoded
if (*buf == 'e') {
enc = 0x13;
- pos = 1;
+ pos += 3;
} else {
enc = 0;
- pos = 0;
+ }
+
+ // skip translation if flag 'h' exist
+ if (*(buf + pos) == 'h') {
+ pos += 3;
+ char *pointer = strchr((char*)text + 1, '/');
+ if (pointer != NULL)
+ strcpy(trans_buff, pointer + 1);
+ else
+ strcpy(trans_buff, "");
+ return;
}
for(;;) {