[Scummvm-cvs-logs] SF.net SVN: scummvm:[55461] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sun Jan 23 12:00:58 CET 2011
Revision: 55461
http://scummvm.svn.sourceforge.net/scummvm/?rev=55461&view=rev
Author: drmccoy
Date: 2011-01-23 11:00:57 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
GOB: Change the NOCD workaround for Urban Runner a bit
Seems like the game does close the CD1.ITK too, so we just
open all ITKs right at the start, lest it might blow up when
it wants to close the top ITK and that's actually CD4.
Modified Paths:
--------------
scummvm/trunk/engines/gob/init_v6.cpp
scummvm/trunk/engines/gob/inter.h
scummvm/trunk/engines/gob/inter_v6.cpp
Modified: scummvm/trunk/engines/gob/init_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/init_v6.cpp 2011-01-23 07:02:49 UTC (rev 55460)
+++ scummvm/trunk/engines/gob/init_v6.cpp 2011-01-23 11:00:57 UTC (rev 55461)
@@ -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 @@
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();
Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h 2011-01-23 07:02:49 UTC (rev 55460)
+++ scummvm/trunk/engines/gob/inter.h 2011-01-23 11:00:57 UTC (rev 55461)
@@ -550,7 +550,6 @@
void o6_totSub();
void o6_playVmdOrMusic();
- void o6_openItk();
bool o6_loadCursor(OpFuncParams ¶ms);
bool o6_assign(OpFuncParams ¶ms);
Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp 2011-01-23 07:02:49 UTC (rev 55460)
+++ scummvm/trunk/engines/gob/inter_v6.cpp 2011-01-23 11:00:57 UTC (rev 55461)
@@ -57,7 +57,6 @@
OPCODEDRAW(0x40, o6_totSub);
OPCODEDRAW(0x83, o6_playVmdOrMusic);
- OPCODEDRAW(0x85, o6_openItk);
}
void Inter_v6::setupOpcodesFunc() {
@@ -199,27 +198,6 @@
}
-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();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list