#3753 closed defect (fixed)
SWORD1: Subtitles missing (German version)
Reported by: | lordhoto | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | high | Component: | Engine: Sword1 |
Version: | Keywords: | ||
Cc: | Game: | Broken Sword 1 |
Description
ScummVM 0.12.0svn (May 28 2008 20:45:16) Features compiled in: Vorbis FLAC MP3 ALSA zLib MPEG2 Platform: Linux Compiler: g++ (GCC) 4.2.4 (Debian 4.2.4-1) Game: Broken Sword 1 German
After giving the 'faked' statue to Pearl in Marib, instead of "Oh" George says "Error: Text not found" also in the terminal the following warning is shown: "WARNING: ObjectMan::lockText(2950145): text number has no text lines!".
How to reproduce it: Load the game "Bug report" (slot 22) I attached and give the statue to Pearl. The second line Geroge says should be showing the described error above.
Ticket imported from: #1977094. Ticket imported from: bugs/3753.
Attachments (2)
Change History (10)
by , 16 years ago
Attachment: | SAVEGAME.INF added |
---|
by , 16 years ago
Attachment: | SAVEGAME.021 added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Summary: | Broken Sword1 (German): Subtitles missing → SWORD1: Subtitles missing (German version) |
---|
comment:4 by , 16 years ago
Priority: | normal → high |
---|
comment:5 by , 16 years ago
I decided to have a look at this issue. German is not the only language with that issue. I can also reproduce it with french and spanish.
Looking at the text cluster file (text.clm in my case as I have the mac version, but I suppose the problem is the same with text.clu) I can see that that sentence is indeed missing in those translations. The number 2950145 is the text ID and is the same in all the language for a given sentence. From this id we can get the offset for the start of the text in the resource and in that particular case the offset is zero. I am not sure how the original interpreter handled that. Presumably it didn't display the subtitle for that sentence. ScummVM display the "Error: text not found" string instead.
I can submit a patch to fix the bug, but I am not sure what the fix should be. I can see at least three different options: 1) Do not display subtitle when encountering an offset equal to zero. 2) Hard-code translation for that particular sentence and if the text ID is equal to 2950145 return that hard coded string. However we will still have the problem if other sentences are also missing in some of the translations. 3) Display the english text if a translation is missing in another language.
I would favour solution 1. I don't like solution 3 because having a sentence in english when the rest is in another language is strange (and also because the english text does not correspond exactly to what Georges says - at least in the french version).
I will wait a bit to give you time to ponder and comment.
If you also prefer solution 1, I am not sure it is worth submitting a patch as there is a simple way to fix it by modifying only one line: change the static _errorStr string, which currently is equal to "Error: Text not found.", to be equal to " " instead (scummvm crashes if we try to use a null or an empty string) on line 164 of objectman.cpp. It is only used in one place (on line 112 of the same file, in the case described above when a sentence is missing in the text cluster file).
comment:6 by , 16 years ago
It seems I cannot add files directly there, therefore I have posted two patches in the patch tracker (ID #2602772).
Both patches solve this issue. As I had no reply to my questions I decided to implement solution 1 and 2 from my previous message as two different patches.
comment:7 by , 16 years ago
I've committed a slightly updated version of the patch that provides hard-coded subtitles for the missing one.
comment:8 by , 16 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
File Added: SAVEGAME.021