From 20036d3cb4705404710519653cb0f5da56d90da7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 Oct 2009 18:03:47 +0000 Subject: Fixed the palette in the SEQ decoder again svn-id: r45088 --- engines/sci/gfx/seq_decoder.cpp | 6 ++++-- engines/sci/gfx/seq_decoder.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/sci/gfx') diff --git a/engines/sci/gfx/seq_decoder.cpp b/engines/sci/gfx/seq_decoder.cpp index 047ec4294a..dc119551d0 100644 --- a/engines/sci/gfx/seq_decoder.cpp +++ b/engines/sci/gfx/seq_decoder.cpp @@ -35,7 +35,7 @@ SeqDecoder::~SeqDecoder() { closeFile(); } -bool SeqDecoder::loadFile(Common::String fileName, ResourceManager *resMan, SciGuiScreen *screen) { +bool SeqDecoder::loadFile(Common::String fileName, ResourceManager *resMan) { closeFile(); _fileStream = SearchMan.createReadStreamForMember(fileName); @@ -48,11 +48,13 @@ bool SeqDecoder::loadFile(Common::String fileName, ResourceManager *resMan, SciG byte *paletteData = new byte[paletteSize]; _fileStream->read(paletteData, paletteSize); GuiPalette seqPalette; - SciGuiPalette *pal = new SciGuiPalette(resMan, screen); + SciGuiScreen *videoScreen = new SciGuiScreen(320, 200, 1); + SciGuiPalette *pal = new SciGuiPalette(resMan, videoScreen, false); pal->createFromData(paletteData, &seqPalette); pal->set(&seqPalette, 2); delete pal; delete[] paletteData; + delete videoScreen; _currentFrame = 0; diff --git a/engines/sci/gfx/seq_decoder.h b/engines/sci/gfx/seq_decoder.h index af90ef1eb8..c4a9dc6d4a 100644 --- a/engines/sci/gfx/seq_decoder.h +++ b/engines/sci/gfx/seq_decoder.h @@ -44,7 +44,7 @@ class SeqDecoder { public: SeqDecoder() : _fileStream(0) { } ~SeqDecoder(); - bool loadFile(Common::String fileName, ResourceManager *resMan, SciGuiScreen *screen); + bool loadFile(Common::String fileName, ResourceManager *resMan); void closeFile(); SeqFrame *getFrame(bool &hasNext); -- cgit v1.2.3