aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource_v7he.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-02-11 03:45:10 +0000
committerEugene Sandulenko2005-02-11 03:45:10 +0000
commita9ceee26d832178f94f37b592a11e8ac24021c47 (patch)
tree18eb49a11b8e95868fe804e696a39f1a0ccfc529 /scumm/resource_v7he.cpp
parentea78766c46041f9252e6b058f736503e6458f03d (diff)
downloadscummvm-rg350-a9ceee26d832178f94f37b592a11e8ac24021c47.tar.gz
scummvm-rg350-a9ceee26d832178f94f37b592a11e8ac24021c47.tar.bz2
scummvm-rg350-a9ceee26d832178f94f37b592a11e8ac24021c47.zip
Turned HE Mac resource filename generator into generall, whole SCUMM-purpose
method. Right now it is used to eliminate those Windows HE titles which have different target base names. If you want to use it, then define another entry in substDataFileNameTable[]. If your version with different base name has other features then you need to define GF_MULTIPLE_VERSIONS for main entry and add any additional entries to multiple_versions_md5_settings based on MD5 of the entry. svn-id: r16764
Diffstat (limited to 'scumm/resource_v7he.cpp')
-rw-r--r--scumm/resource_v7he.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/scumm/resource_v7he.cpp b/scumm/resource_v7he.cpp
index c612ad4ae5..ab2b2c078c 100644
--- a/scumm/resource_v7he.cpp
+++ b/scumm/resource_v7he.cpp
@@ -146,9 +146,18 @@ int Win32ResExtractor::extractResource(const char *resType, char *resName, byte
fi.memory = NULL;
fi.file = new File;
- if (!_fileName[0]) // We are running for the first time
+ if (!_fileName[0]) { // We are running for the first time
snprintf(_fileName, 256, "%s.he3", _vm->getGameName());
+ if (_vm->_substResFileNameIndex > 0) {
+ char buf1[128];
+
+ _vm->generateSubstResFileName(_fileName, buf1, 128, 0, _vm->_substResFileNameIndex);
+ strcpy(_fileName, buf1);
+ }
+ }
+
+
/* get file size */
fi.file->open(_fileName);
if (!fi.file->isOpen()) {
@@ -1275,11 +1284,11 @@ void MacResExtractor::setCursor(int id) {
File f;
if (!_fileName[0]) // We are running for the first time
- if (_vm->_heMacFileNameIndex > 0) {
+ if (_vm->_substResFileNameIndex > 0) {
char buf1[128];
snprintf(buf1, 128, "%s.he3", _vm->getGameName());
- _vm->generateMacFileName(buf1, _fileName, 128, 0, _vm->_heMacFileNameIndex);
+ _vm->generateSubstResFileName(buf1, _fileName, 128, 0, _vm->_substResFileNameIndex);
// Some programs write it as .bin. Try that too
if (!f.exists(_fileName)) {
@@ -1524,7 +1533,7 @@ void MacResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
*w = *h = 16;
// FIXME
- // Color cursors use their own palette.
+ // Color cursors use their own palette.
// So we can't use it for now and use B/W version
return;