#5796 closed defect (fixed)
SCI: User-translated files are ignored
Reported by: | SF/tinekefrineke | Owned by: | bluegr |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | ||
Cc: | Game: | Quest for Glory 3 |
Description
For Quest for Glory III I translated some text (message) files in Dutch using SCIamano. Previously I did this for ScummVM with QFG I which worked fine, and when running QFG III in DosBox the translations are used, but not for ScummVM with QFG III.
I downloaded the code, located the problem, fixed it for my kids for Windows. The bug is in the resource.cpp, in the code where firstly ResourceManager::readResourceMapSCI0(...) is called and then ResourceManager::readResourceMapSCI1(...). Firstly resource.000 is read, and the translated message files are accepted. But then ResourceManager::readResourceMapSCI1(...) destroys the results by overwriting them with some data? patches? or so. This happens in the location where someone added a fix for pharkas/german. I made a working ScummVM for myself by removing these lines, but obviously this is no correct fix, now the original problem re-occurs.
Maybe the problem is a shortcoming of SCIamano, which detects no resources in the resource.map to extract, but as the original SCI-engine has no problems with the translated files, I submit this as a bug.
I found the problem in ScummVM 1.2.1, but it is still present in the current archive (1.3, I believe).
Ticket imported from: #3366295. Ticket imported from: bugs/5796.
Attachments (8)
Change History (19)
by , 13 years ago
Attachment: | resource.cpp added |
---|
comment:1 by , 13 years ago
Priority: | normal → low |
---|---|
Summary: | Translated files are ignored → SCI: User-translated files are ignored |
comment:2 by , 13 years ago
Which form do your translated files take? Are they patch files? (I see your file mentions 73.msg?)
For future reference: the attached resource.cpp seems based on the v1.2.1 one.
comment:3 by , 13 years ago
I have differenced the attached resource.cpp against the engines/sci/resource.cpp from v1.2.1 release. Will attach this.
This contains a number of spurious differences, including some (including the 73.msg) which have no effect as far as I can see.
The only "active" change I can see here is to comment out the last part of the function: ResourceManager::readResourceMapSCI1(ResourceSource *map) This function contains a FIXME preceding this change which indicates that the function has issues in selection of the correct resource when multiple copies of a resource are present.
comment:4 by , 13 years ago
FYI, the translation tools referred to in the bug and one of the language patches can be found from these links: http://erolfi.wordpress.com/tradusci/ http://gkpatches.vogons.zetafleet.com/
comment:5 by , 13 years ago
Checked latest Git Master. The FIXME has been removed/corrected, but this code is still the same otherwise. Attaching patch for latest Git master which should be functionally identical to previous patch.
comment:6 by , 13 years ago
Ah, rereading the original report..
So the issue is that QFG3 if translated by SCIamano works fine in the original interpreter, but with ScummVM SCI, this reverts to original language... probably due to later loading of patch file, or a different resource loading order?
comment:7 by , 13 years ago
Indeed. From the source code I understood that several resource files and their patches are read in the order resource 1 - patch 1 - resource 2 - patch 2. I use the SCIamano tool to extract the text (.msg) files as patches, then I translate them and place them in the game directory. I have no means of detecting which resource these extracted texts come from. The scummvm engine decides that my msg-file is a patch for the first resource file, and that the second resource file should replace this, because it also contains the same text data. As far as I know, it might even be correct, I don't know anything about the Sierra data structure. I suspect that sierra first loads all the resources, and then the patches, so this is a difference in order of processing. (Sorry for the delay, holidays...)
comment:8 by , 13 years ago
Some questions: - Are these patches you made external files, or have you changed the resource.* game files? - Can you provide a patch to perform some tests with your translations?
As for the FIXME, it has been removed because it no longer applies
comment:9 by , 13 years ago
I attached four translated files, I place them in the directory with my other resources. One of them is quite near the beginning of the game, where the hero enters the market place and meets "Sanford and Son".
Sorry, I don't know what a FIXME is?
comment:10 by , 13 years ago
Fixed in rc9873da
Thanks to both tinekefrineke and tdhs for pinpointing the actual problem in the resource manager
comment:11 by , 13 years ago
Owner: | set to |
---|---|
Priority: | low → normal |
Resolution: | → fixed |
Status: | new → closed |
Fixed file