diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/init_v6.cpp | 20 | ||||
-rw-r--r-- | engines/gob/inter.h | 1 | ||||
-rw-r--r-- | engines/gob/inter_v6.cpp | 22 |
3 files changed, 17 insertions, 26 deletions
diff --git a/engines/gob/init_v6.cpp b/engines/gob/init_v6.cpp index 40b4769e78..76f006533f 100644 --- a/engines/gob/init_v6.cpp +++ b/engines/gob/init_v6.cpp @@ -28,6 +28,7 @@ #include "gob/gob.h" #include "gob/init.h" #include "gob/global.h" +#include "gob/dataio.h" namespace Gob { @@ -40,9 +41,22 @@ Init_v6::~Init_v6() { void Init_v6::initGame() { _vm->_global->_noCd = false; - if (Common::File::exists("cd1.itk") && Common::File::exists("cd2.itk") && - Common::File::exists("cd3.itk") && Common::File::exists("cd4.itk")) { - _vm->_global->_noCd = true; + if (_vm->getGameType() == kGameTypeUrban) { + if (Common::File::exists("cd1.itk") && Common::File::exists("cd2.itk") && + Common::File::exists("cd3.itk") && Common::File::exists("cd4.itk")) { + + _vm->_global->_noCd = true; + + // WORKAROUND: The CD number detection in Urban Runner is quite daft + // (it checks CD1.ITK - CD4.ITK and the first that's found determines + // the CD number), while its NO_CD modus wants everything in CD1.ITK. + // So we just open the other ITKs, too. + _vm->_dataIO->openArchive("CD1.ITK", false); + _vm->_dataIO->openArchive("CD2.ITK", false); + _vm->_dataIO->openArchive("CD3.ITK", false); + _vm->_dataIO->openArchive("CD4.ITK", false); + } + } Init::initGame(); diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 9254768055..38bf7dba2b 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -550,7 +550,6 @@ protected: void o6_totSub(); void o6_playVmdOrMusic(); - void o6_openItk(); bool o6_loadCursor(OpFuncParams ¶ms); bool o6_assign(OpFuncParams ¶ms); diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index a9262d7c37..3390ed6e9c 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -57,7 +57,6 @@ void Inter_v6::setupOpcodesDraw() { OPCODEDRAW(0x40, o6_totSub); OPCODEDRAW(0x83, o6_playVmdOrMusic); - OPCODEDRAW(0x85, o6_openItk); } void Inter_v6::setupOpcodesFunc() { @@ -199,27 +198,6 @@ void Inter_v6::o6_playVmdOrMusic() { } -void Inter_v6::o6_openItk() { - char fileName[32]; - - _vm->_game->_script->evalExpr(0); - Common::strlcpy(fileName, _vm->_game->_script->getResultStr(), 28); - if (!strchr(fileName, '.')) - strcat(fileName, ".ITK"); - - _vm->_dataIO->openArchive(fileName, false); - - // WORKAROUND: The CD number detection in Urban Runner is quite daft - // (it checks CD1.ITK - CD4.ITK and the first that's found determines - // the CD number), while its NO_CD modus wants everything in CD1.ITK. - // So we just open the other ITKs, too. - if (_vm->_global->_noCd && !scumm_stricmp(fileName, "CD1.ITK")) { - _vm->_dataIO->openArchive("CD2.ITK", false); - _vm->_dataIO->openArchive("CD3.ITK", false); - _vm->_dataIO->openArchive("CD4.ITK", false); - } -} - bool Inter_v6::o6_loadCursor(OpFuncParams ¶ms) { int16 id = _vm->_game->_script->readInt16(); |