diff options
-rw-r--r-- | engines/gob/video.cpp | 2 | ||||
-rw-r--r-- | engines/gob/video.h | 2 | ||||
-rw-r--r-- | engines/gob/video_v6.cpp | 68 |
3 files changed, 5 insertions, 67 deletions
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 776839b0bb..ab39c5e7e7 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -110,7 +110,7 @@ Video::Video(GobEngine *vm) : _vm(vm) { _dirtyAll = false; - _palLUT = new Graphics::PaletteLUT(6, Graphics::PaletteLUT::kPaletteYUV); + _palLUT = new Graphics::PaletteLUT(5, Graphics::PaletteLUT::kPaletteYUV); } char Video::initDriver(int16 vidMode) { diff --git a/engines/gob/video.h b/engines/gob/video.h index 2d5cff8cd8..14bae430f1 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -240,8 +240,6 @@ public: private: static const byte _ditherPalette[768]; - bool loadPalLUT(const char *target); - bool savePalLUT(const char *target); void buildPalLUT(); void shadeRect(SurfaceDesc *dest, diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp index cf402ceb20..4d3e85364a 100644 --- a/engines/gob/video_v6.cpp +++ b/engines/gob/video_v6.cpp @@ -61,66 +61,7 @@ void Video_v6::setPrePalette() { void Video_v6::init(const char *target) { initOSD(); - if (loadPalLUT(target)) - return; - buildPalLUT(); - - savePalLUT(target); -} - -bool Video_v6::loadPalLUT(const char *target) { - if (target[0] == '\0') - return false; - - char *pltSave = new char[strlen(target) + 5]; - - strcpy(pltSave, target); - strcat(pltSave, ".plt"); - - Common::InSaveFile *saveFile; - - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - if (!(saveFile = saveMan->openForLoading(pltSave))) { - delete[] pltSave; - return false; - } - - drawOSDText("Loading palette table"); - - bool loaded = _palLUT->load(*saveFile); - - delete[] pltSave; - delete saveFile; - - return loaded; -} - -bool Video_v6::savePalLUT(const char *target) { - if (target[0] == '\0') - return false; - - char *pltSave = new char[strlen(target) + 5]; - - strcpy(pltSave, target); - strcat(pltSave, ".plt"); - - Common::OutSaveFile *saveFile; - - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - if (!(saveFile = saveMan->openForSaving(pltSave))) { - delete[] pltSave; - return false; - } - - drawOSDText("Saving palette table"); - - _palLUT->save(*saveFile); - - delete[] pltSave; - delete saveFile; - - return true; } void Video_v6::buildPalLUT() { @@ -128,12 +69,11 @@ void Video_v6::buildPalLUT() { _palLUT->setPalette(_ditherPalette, Graphics::PaletteLUT::kPaletteYUV, 8, 0); - for (int i = 0; (i < 64) && !_vm->shouldQuit(); i++) { - sprintf(text, "Building palette table: %02d/63", i); - drawOSDText(text); + sprintf(text, "Building palette table"); + drawOSDText(text); + + for (int i = 0; (i < 32) && !_vm->shouldQuit(); i++) _palLUT->buildNext(); - _vm->_util->processInput(); - } } char Video_v6::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, |