diff options
Diffstat (limited to 'engines/cryomni3d/versailles')
-rw-r--r-- | engines/cryomni3d/versailles/engine.cpp | 20 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/engine.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp index a227a2676d..608da9c1b5 100644 --- a/engines/cryomni3d/versailles/engine.cpp +++ b/engines/cryomni3d/versailles/engine.cpp @@ -1537,5 +1537,25 @@ void CryOmni3DEngine_Versailles::playInGameVideo(const Common::String &filename, g_system->showMouse(true); } +void CryOmni3DEngine_Versailles::loadBMPs(const char *pattern, Graphics::Surface *bmps, + unsigned int count) { + Image::BitmapDecoder bmpDecoder; + Common::File file; + + for (unsigned int i = 0; i < count; i++) { + Common::String bmp = Common::String::format(pattern, i); + + if (!file.open(bmp)) { + error("Failed to open BMP file: %s", bmp.c_str()); + } + if (!bmpDecoder.loadStream(file)) { + error("Failed to load BMP file: %s", bmp.c_str()); + } + bmps[i].copyFrom(*bmpDecoder.getSurface()); + bmpDecoder.destroy(); + file.close(); + } +} + } // End of namespace Versailles } // End of namespace CryOmni3D diff --git a/engines/cryomni3d/versailles/engine.h b/engines/cryomni3d/versailles/engine.h index 9d0b7acbd3..438ae16395 100644 --- a/engines/cryomni3d/versailles/engine.h +++ b/engines/cryomni3d/versailles/engine.h @@ -327,6 +327,8 @@ private: void playInGameVideo(const Common::String &filename, bool restoreCursorPalette = true); + void loadBMPs(const char *pattern, Graphics::Surface *bmps, unsigned int count); + unsigned int getMusicId(unsigned int level, unsigned int placeId) const; bool musicWouldChange(unsigned int level, unsigned int placeId) const; void musicUpdate(); |