aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-10-14 13:00:21 +1100
committerPaul Gilbert2012-10-14 13:00:21 +1100
commite23f91472e6694087e3aee13139b84d227f7f7f1 (patch)
tree8379474c0d6e3254019dcffe223b990f98964fe2 /engines
parentaf8023c3b71246c33a61aa4308cddb67bd8b0760 (diff)
downloadscummvm-rg350-e23f91472e6694087e3aee13139b84d227f7f7f1.tar.gz
scummvm-rg350-e23f91472e6694087e3aee13139b84d227f7f7f1.tar.bz2
scummvm-rg350-e23f91472e6694087e3aee13139b84d227f7f7f1.zip
HOPKINS: Bugfix for loading game text indexes
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/font.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index 6f0f22bcd4..5f930063fe 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -219,11 +219,12 @@ void FontManager::BOITE(int idx, int fileIndex, const Common::String &filename,
_vm->_fileManager.CONSTRUIT_FICHIER(_vm->_globals.HOPLINK, filename);
file = _vm->_globals.NFICHIER;
- if (strncmp(file.c_str(), oldname.c_str(), strlen(file.c_str()))) {
+ if (strncmp(file.c_str(), oldname.c_str(), strlen(file.c_str())) != 0) {
+ // Starting to access a new file, so read in the index file for the file
oldname = file;
- nom_index = file;
+ nom_index = Common::String(file.c_str(), file.size() - 3);
+ nom_index += "IND";
- //*(int *)((char *)&dword_80AE4DC + strlen(nom_index) + 1) = dword_807C98D;
if (!f.open(nom_index))
error("Error opening file - %s", nom_index.c_str());
filesize = f.size();