dwatteau / scummtr

Fan translation tools for SCUMM engine games
MIT License
23 stars 4 forks source link

[Bug] When \255\001 is used inside a talkie sentence, the next two characters are misdecoded #36

Open dwatteau opened 2 years ago

dwatteau commented 2 years ago

Happens with the original scummtr.exe as well.

For example with a talkie Monkey Island 2, such as Twang's French translation (scummtr -g monkey2 -w -of output.txt):

-\255\010\202\213\255\010\239\003\255\010\010\000\255\010\000\000\007J'aurais bien besoin\255\001de\016cette cr\138me revitalisante.\255\009\023\000
+\255\010\202\213\255\010\239\003\255\010\010\000\255\010\000\000\007J'aurais bien besoin\255\001\100\101\016cette cr\138me revitalisante.\255\009\023\000

Here, the de immediately after \255\001 inside the sentence is output as \100\101. That's still correct, but not very convenient.

(You can manually fix it and import it back without any problem, but it will get lost at the next output. Should be correctly output by default.)

Fixing this is potentially similar to what has been done in commit 3f040c64c34366de856ff59e55d24bd03e7fd4f3.