[Scummvm-cvs-logs] SF.net SVN: scummvm:[40195] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Wed Apr 29 12:24:00 CEST 2009
Revision: 40195
http://scummvm.svn.sourceforge.net/scummvm/?rev=40195&view=rev
Author: drmccoy
Date: 2009-04-29 10:24:00 +0000 (Wed, 29 Apr 2009)
Log Message:
-----------
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)
Modified Paths:
--------------
scummvm/trunk/engines/gob/video.cpp
scummvm/trunk/engines/gob/video.h
scummvm/trunk/engines/gob/video_v6.cpp
Modified: scummvm/trunk/engines/gob/video.cpp
===================================================================
--- scummvm/trunk/engines/gob/video.cpp 2009-04-29 07:33:01 UTC (rev 40194)
+++ scummvm/trunk/engines/gob/video.cpp 2009-04-29 10:24:00 UTC (rev 40195)
@@ -110,7 +110,7 @@
_dirtyAll = false;
- _palLUT = new Graphics::PaletteLUT(6, Graphics::PaletteLUT::kPaletteYUV);
+ _palLUT = new Graphics::PaletteLUT(5, Graphics::PaletteLUT::kPaletteYUV);
}
char Video::initDriver(int16 vidMode) {
Modified: scummvm/trunk/engines/gob/video.h
===================================================================
--- scummvm/trunk/engines/gob/video.h 2009-04-29 07:33:01 UTC (rev 40194)
+++ scummvm/trunk/engines/gob/video.h 2009-04-29 10:24:00 UTC (rev 40195)
@@ -240,8 +240,6 @@
private:
static const byte _ditherPalette[768];
- bool loadPalLUT(const char *target);
- bool savePalLUT(const char *target);
void buildPalLUT();
void shadeRect(SurfaceDesc *dest,
Modified: scummvm/trunk/engines/gob/video_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/video_v6.cpp 2009-04-29 07:33:01 UTC (rev 40194)
+++ scummvm/trunk/engines/gob/video_v6.cpp 2009-04-29 10:24:00 UTC (rev 40195)
@@ -61,79 +61,19 @@
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() {
char text[30];
_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,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list