[Scummvm-cvs-logs] SF.net SVN: scummvm: [30327] scummvm/branches/branch-0-11-0/engines/agi/ graphics.cpp
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Mon Jan 7 20:01:30 CET 2008
Revision: 30327
http://scummvm.svn.sourceforge.net/scummvm/?rev=30327&view=rev
Author: buddha_
Date: 2008-01-07 11:01:29 -0800 (Mon, 07 Jan 2008)
Log Message:
-----------
Backport of r30326: Reject AGIPAL-files with over 6 bits per color component. Makes at least fanmade AGI game Naturette II's colors not be messed up anymore.
Modified Paths:
--------------
scummvm/branches/branch-0-11-0/engines/agi/graphics.cpp
Modified: scummvm/branches/branch-0-11-0/engines/agi/graphics.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/agi/graphics.cpp 2008-01-07 18:58:30 UTC (rev 30326)
+++ scummvm/branches/branch-0-11-0/engines/agi/graphics.cpp 2008-01-07 19:01:29 UTC (rev 30327)
@@ -864,6 +864,18 @@
return;
}
+ // Check that all components are maximum 6 bits (VGA used 6 bits per color component).
+ // Make's at least Naturette 2's colors not be messed up anymore (Naturette 2 provides
+ // AGIPAL-files that use 8 bits per color component. Haven't seen any other game that
+ // provides such files and don't know of *any* AGI interpreter that supports such files.
+ // So I presume they have been left over to Naturette 2's release file by accident).
+ for (int i = 0; i < 16 * 3; i++) {
+ if (_agipalPalette[i] >= (1 << 6)) {
+ warning("Invalid AGIPAL palette (Over 6 bits per color component) in '%s'. Not changing palette", filename);
+ return;
+ }
+ }
+
_agipalFileNum = p0;
initPalette(_agipalPalette);
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