[Scummvm-cvs-logs] SF.net SVN: scummvm:[42533] scummvm/trunk/engines/sci/gfx
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Jul 16 14:43:43 CEST 2009
Revision: 42533
http://scummvm.svn.sourceforge.net/scummvm/?rev=42533&view=rev
Author: thebluegr
Date: 2009-07-16 12:43:42 +0000 (Thu, 16 Jul 2009)
Log Message:
-----------
Added a proper fix for Pepper (the previous one caused regressions in KQ6)
Modified Paths:
--------------
scummvm/trunk/engines/sci/gfx/operations.cpp
scummvm/trunk/engines/sci/gfx/res_pal.cpp
Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp 2009-07-16 12:07:41 UTC (rev 42532)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp 2009-07-16 12:43:42 UTC (rev 42533)
@@ -1712,8 +1712,7 @@
// FIXME: The _gfxop_install_pixmap call below updates the OSystem palette.
// This is too soon, since it causes brief palette corruption until the
// screen is updated too. (Possibly related: EngineState::pic_not_valid .)
- // SCI1.1 games don't use per-picture palettes
- if (state->gfxResMan->getVersion() < SCI_VERSION_1_1) {
+ if (state->pic->visual_map->palette && state->driver->getMode()->palette) {
state->pic->visual_map->palette->forceInto(state->driver->getMode()->palette);
_gfxop_install_pixmap(state->driver, state->pic->visual_map);
}
Modified: scummvm/trunk/engines/sci/gfx/res_pal.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pal.cpp 2009-07-16 12:07:41 UTC (rev 42532)
+++ scummvm/trunk/engines/sci/gfx/res_pal.cpp 2009-07-16 12:43:42 UTC (rev 42533)
@@ -44,6 +44,11 @@
int entry_size = (format == SCI_PAL_FORMAT_VARIABLE_FLAGS) ? 4 : 3;
byte *pal_data = resource + 37;
int _colors_nr = READ_LE_UINT16(resource + 29);
+
+ // Happens at the beginning of Pepper
+ if (_colors_nr > 256)
+ return NULL;
+
Palette *retval = new Palette(_colors_nr + start_color);
int i;
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