diff options
Diffstat (limited to 'engines/gob/inter_v6.cpp')
-rw-r--r-- | engines/gob/inter_v6.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index c6d0211c8f..b6884c6fbe 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -24,12 +24,12 @@ */ #include "common/endian.h" +#include "common/str.h" #include "common/file.h" #include "graphics/dither.h" #include "gob/gob.h" #include "gob/inter.h" -#include "gob/helper.h" #include "gob/global.h" #include "gob/dataio.h" #include "gob/game.h" @@ -104,7 +104,7 @@ void Inter_v6::o6_playVmdOrMusic() { bool close; _vm->_game->_script->evalExpr(0); - strncpy0(fileName, _vm->_game->_script->getResultStr(), 127); + Common::strlcpy(fileName, _vm->_game->_script->getResultStr(), 128); VideoPlayer::Properties props; @@ -187,20 +187,20 @@ void Inter_v6::o6_openItk() { char fileName[32]; _vm->_game->_script->evalExpr(0); - strncpy0(fileName, _vm->_game->_script->getResultStr(), 27); + Common::strlcpy(fileName, _vm->_game->_script->getResultStr(), 28); if (!strchr(fileName, '.')) strcat(fileName, ".ITK"); - _vm->_dataIO->openDataFile(fileName, true); + _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->openDataFile("CD2.ITK", true); - _vm->_dataIO->openDataFile("CD3.ITK", true); - _vm->_dataIO->openDataFile("CD4.ITK", true); + _vm->_dataIO->openArchive("CD2.ITK", false); + _vm->_dataIO->openArchive("CD3.ITK", false); + _vm->_dataIO->openArchive("CD4.ITK", false); } } @@ -439,7 +439,7 @@ void Inter_v6::probe16bitMusic(char *fileName) { fileName[len - 1] = 'V'; - if (_vm->_dataIO->existData(fileName)) + if (_vm->_dataIO->hasFile(fileName)) return; fileName[len - 1] = '8'; |