diff options
author | Torbjörn Andersson | 2003-11-15 09:38:00 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-11-15 09:38:00 +0000 |
commit | aaa5631a9963b02a96d5f82187465433c6b2dd13 (patch) | |
tree | 142986a381197d5d007060e4cd929f2061f887a7 /sword2/resman.cpp | |
parent | 2312111a3a5519c2c4d36733c204e85b4f4b5557 (diff) | |
download | scummvm-rg350-aaa5631a9963b02a96d5f82187465433c6b2dd13.tar.gz scummvm-rg350-aaa5631a9963b02a96d5f82187465433c6b2dd13.tar.bz2 scummvm-rg350-aaa5631a9963b02a96d5f82187465433c6b2dd13.zip |
Mostly cleanup. Also prevented what would probably have been an infinite
loop if ScummVM failed to find a file in the demo. (Now it should error out
instead, which is marginally preferable.)
svn-id: r11298
Diffstat (limited to 'sword2/resman.cpp')
-rw-r--r-- | sword2/resman.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp index 0ecfcc1e78..0bc3c2b5dc 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -458,10 +458,11 @@ uint8 *ResourceManager::openResource(uint32 res) { // for the CD until we do. while (!file.open(_resourceFiles[parent_res_file])) { - // Is the file supposed to be on the hard disk? Then - // we're in trouble if we can't find it! + // If the file is supposed to be on hard disk, or we're + // playing a demo, then we're in trouble if the file + // can't be found! - if (_cdTab[parent_res_file] & LOCAL_PERM) + if ((_vm->_features & GF_DEMO) || (_cdTab[parent_res_file] & LOCAL_PERM)) error("Could not find '%s'", _resourceFiles[parent_res_file]); getCd(_cdTab[parent_res_file] & 3); @@ -948,21 +949,11 @@ void ResourceManager::killAllObjects(bool wantInfo) { void ResourceManager::getCd(int cd) { uint8 *textRes; - // don't ask for CD's in the playable demo downloaded from our - // web-site! - if (_vm->_features & GF_DEMO) - return; - -#ifdef _PCGUIDE - // don't ask for CD in the patch for the demo on "PC Guide" magazine - return; -#endif - // stop any music from playing - so the system no longer needs the // current CD - otherwise when we take out the CD, Windows will // complain! - g_logic->fnStopMusic(NULL); + _vm->_logic->fnStopMusic(NULL); textRes = openResource(2283); _vm->displayMsg(_vm->fetchTextLine(textRes, 5 + cd) + 2, 0); |