diff options
Diffstat (limited to 'engines/cryomni3d/cryomni3d.cpp')
-rw-r--r-- | engines/cryomni3d/cryomni3d.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/cryomni3d/cryomni3d.cpp b/engines/cryomni3d/cryomni3d.cpp index 334bcd3d4d..35a4cceb09 100644 --- a/engines/cryomni3d/cryomni3d.cpp +++ b/engines/cryomni3d/cryomni3d.cpp @@ -34,6 +34,7 @@ #include "graphics/palette.h" #include "cryomni3d/cryomni3d.h" +#include "cryomni3d/datstream.h" #include "cryomni3d/image/hlz.h" #include "cryomni3d/video/hnm_decoder.h" @@ -79,6 +80,26 @@ void CryOmni3DEngine::pauseEngineIntern(bool pause) { */ } +DATSeekableStream *CryOmni3DEngine::getStaticData(uint32 gameId, uint16 version) const { + Common::File *datFile = new Common::File(); + + if (!datFile->open("cryomni3d.dat")) { + delete datFile; + error("Failed to open cryomni3d.dat file"); + return nullptr; + } + + DATSeekableStream *gameStream = DATSeekableStream::getGame(datFile, gameId, version, getLanguage(), + getPlatform()); + if (!gameStream) { + delete datFile; + error("Failed to find game in cryomni3d.dat file"); + return nullptr; + } + + return gameStream; +} + Common::String CryOmni3DEngine::prepareFileName(const Common::String &baseName, const char *const *extensions) const { Common::String fname(baseName); |