aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2009-04-29 10:24:00 +0000
committerSven Hesse2009-04-29 10:24:00 +0000
commiteaf22dc66c86aaa020569a510439cbf2e49e61d4 (patch)
tree2f427f3b77da4cfe561ba1d275561a501b907832 /engines/gob
parenta8cccd0ced0275ff4bdd1ad868cdb5491e86a581 (diff)
downloadscummvm-rg350-eaf22dc66c86aaa020569a510439cbf2e49e61d4.tar.gz
scummvm-rg350-eaf22dc66c86aaa020569a510439cbf2e49e61d4.tar.bz2
scummvm-rg350-eaf22dc66c86aaa020569a510439cbf2e49e61d4.zip
Decreased the dithering LUT's depth to 5 bit per color component.
The results still good and generating it is fast enough to do at each start (so we don't need to save it anymore) svn-id: r40195
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/video.cpp2
-rw-r--r--engines/gob/video.h2
-rw-r--r--engines/gob/video_v6.cpp68
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,