[Scummvm-cvs-logs] SF.net SVN: scummvm:[43461] scummvm/trunk/engines/gob
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Mon Aug 17 11:50:35 CEST 2009
Revision: 43461
http://scummvm.svn.sourceforge.net/scummvm/?rev=43461&view=rev
Author: strangerke
Date: 2009-08-17 09:50:35 +0000 (Mon, 17 Aug 2009)
Log Message:
-----------
Added OPCODEDRAW 0x85, with a specific workaround for Bambou hardcoded paths in scripts
Modified Paths:
--------------
scummvm/trunk/engines/gob/inter.h
scummvm/trunk/engines/gob/inter_playtoons.cpp
Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h 2009-08-17 09:19:53 UTC (rev 43460)
+++ scummvm/trunk/engines/gob/inter.h 2009-08-17 09:50:35 UTC (rev 43461)
@@ -560,6 +560,7 @@
bool oPlaytoons_checkData(OpFuncParams ¶ms);
void oPlaytoons_CD_20_23();
void oPlaytoons_CD_25();
+ void oPlaytoons_openItk();
};
} // End of namespace Gob
Modified: scummvm/trunk/engines/gob/inter_playtoons.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_playtoons.cpp 2009-08-17 09:19:53 UTC (rev 43460)
+++ scummvm/trunk/engines/gob/inter_playtoons.cpp 2009-08-17 09:50:35 UTC (rev 43461)
@@ -27,6 +27,7 @@
#include "gob/gob.h"
#include "gob/inter.h"
+#include "gob/helper.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/dataio.h"
@@ -70,6 +71,7 @@
OPCODEDRAW(0x20, oPlaytoons_CD_20_23);
OPCODEDRAW(0x23, oPlaytoons_CD_20_23);
OPCODEDRAW(0x25, oPlaytoons_CD_25);
+ OPCODEDRAW(0x85, oPlaytoons_openItk);
}
void Inter_Playtoons::setupOpcodesFunc() {
@@ -137,5 +139,26 @@
_vm->_game->_script->readVarIndex();
}
+void Inter_Playtoons::oPlaytoons_openItk() {
+
+ char fileName[128];
+ char *backSlash;
+
+ _vm->_game->_script->evalExpr(0);
+ strncpy0(fileName, _vm->_game->_script->getResultStr(), 124);
+
+ if (!strchr(fileName, '.'))
+ strcat(fileName, ".ITK");
+
+ // Workaround for Bambou : In the script, the path is hardcoded (!!)
+ if (backSlash=strrchr(fileName, '\\')) {
+ debugC(2, kDebugFileIO, "Opening ITK file \"%s\" instead of \"%s\"", backSlash + 1, fileName);
+ _vm->_dataIO->openDataFile(backSlash + 1, true);
+ } else
+ _vm->_dataIO->openDataFile(fileName, true);
+ // All the other checks are meant to verify (if not found at the first try)
+ // if the file is present on the CD or not. As everything is supposed to
+ // be copied, those checks are skipped
+}
} // End of namespace Gob
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