aboutsummaryrefslogtreecommitdiff
path: root/engines/cryomni3d/cryomni3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cryomni3d/cryomni3d.cpp')
-rw-r--r--engines/cryomni3d/cryomni3d.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/cryomni3d/cryomni3d.cpp b/engines/cryomni3d/cryomni3d.cpp
index ae05778681..473fc7cce6 100644
--- a/engines/cryomni3d/cryomni3d.cpp
+++ b/engines/cryomni3d/cryomni3d.cpp
@@ -118,7 +118,11 @@ void CryOmni3DEngine::playHNM(const Common::String &filename, Audio::Mixer::Soun
const char *const extensions[] = { "hns", "hnm", nullptr };
Common::String fname(prepareFileName(filename, extensions));
- Video::VideoDecoder *videoDecoder = new Video::HNMDecoder();
+ byte *currentPalette = new byte[256 * 3];
+ g_system->getPaletteManager()->grabPalette(currentPalette, 0, 256);
+
+ // Pass the ownership of currentPalette to HNMDecoder
+ Video::VideoDecoder *videoDecoder = new Video::HNMDecoder(false, currentPalette);
videoDecoder->setSoundType(soundType);
if (!videoDecoder->loadFile(fname)) {