[Scummvm-cvs-logs] SF.net SVN: scummvm: [30326] scummvm/trunk/engines/agi/graphics.cpp
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Mon Jan 7 19:58:30 CET 2008
Revision: 30326
http://scummvm.svn.sourceforge.net/scummvm/?rev=30326&view=rev
Author: buddha_
Date: 2008-01-07 10:58:30 -0800 (Mon, 07 Jan 2008)
Log Message:
-----------
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/trunk/engines/agi/graphics.cpp
Modified: scummvm/trunk/engines/agi/graphics.cpp
===================================================================
--- scummvm/trunk/engines/agi/graphics.cpp 2008-01-07 18:33:19 UTC (rev 30325)
+++ scummvm/trunk/engines/agi/graphics.cpp 2008-01-07 18:58:30 UTC (rev 30326)
@@ -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