Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#3753 closed defect (fixed)

SWORD1: Subtitles missing (German version)

Reported by: lordhoto Owned by: eriktorbjorn
Priority: high Component: Engine: Sword1
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)

SAVEGAME.INF (204 bytes ) - added by lordhoto 12 years ago.
SAVEGAME.021 (973 bytes ) - added by lordhoto 12 years ago.

Download all attachments as: .zip

Change History (10)

by lordhoto, 12 years ago

Attachment: SAVEGAME.INF added

by lordhoto, 12 years ago

Attachment: SAVEGAME.021 added

comment:1 by lordhoto, 12 years ago

File Added: SAVEGAME.021

comment:2 by fingolfin, 12 years ago

Summary: Broken Sword1 (German): Subtitles missingSWORD1: Subtitles missing (German version)

comment:3 by sev-, 12 years ago

Raising priority. This bug is nice to get fixed before the release.

comment:4 by sev-, 12 years ago

Priority: normalhigh

comment:5 by criezy, 11 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 criezy, 11 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 eriktorbjorn, 11 years ago

I've committed a slightly updated version of the patch that provides hard-coded subtitles for the missing one.

comment:8 by eriktorbjorn, 11 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.