[scorched3d] The fix for using the palette through accessors needed fixing

Bruno Wolff III bruno at fedoraproject.org
Sun Nov 6 20:37:09 UTC 2011


commit 6d9903a23d35d7a94a44e257dbade8fc4ccf1516
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Nov 6 13:39:45 2011 -0600

    The fix for using the palette through accessors needed fixing

 scorched3d-libpng15.patch |   15 +++------------
 scorched3d.spec           |    5 ++++-
 2 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/scorched3d-libpng15.patch b/scorched3d-libpng15.patch
index 44f164c..99ed98f 100644
--- a/scorched3d-libpng15.patch
+++ b/scorched3d-libpng15.patch
@@ -10,13 +10,13 @@
  
  static void user_png_warning(png_structp png_ptr, png_const_charp msg) 
 --- src/client/client/LoadPNG.cpp.libpng	2010-08-15 18:26:36.000000000 -0500
-+++ src/client/client/LoadPNG.cpp	2011-11-06 10:50:25.456151862 -0600
++++ src/client/client/LoadPNG.cpp	2011-11-06 13:38:16.082076630 -0600
 @@ -24,6 +24,8 @@
  	Uint32 Bmask;
  	Uint32 Amask;
  	SDL_Palette *palette;
-+	int num_palette;
-+	png_color *png_palette;
++	png_uint_32 num_palette;
++	png_colorp png_palette;
  	png_bytep *volatile row_pointers;
  	int row, i;
  	volatile int ckey = -1;
@@ -50,15 +50,6 @@
  	if ( surface == NULL ) {
  		error = "Out of memory";
  		goto done;
-@@ -175,7 +177,7 @@
- 	lib.png_read_end(png_ptr, info_ptr);
- 	*/
- 
--	/* Load the palette, if any */
-+	/* Load the png_palette, if any */
- 	palette = surface->format->palette;
- 	if ( palette ) {
- 	    if(color_type == PNG_COLOR_TYPE_GRAY) {
 @@ -185,12 +187,15 @@
  		    palette->colors[i].g = i;
  		    palette->colors[i].b = i;
diff --git a/scorched3d.spec b/scorched3d.spec
index e126447..434c75d 100644
--- a/scorched3d.spec
+++ b/scorched3d.spec
@@ -1,6 +1,6 @@
 Name:           scorched3d
 Version:        43.2a
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Game based loosely on the classic DOS game Scorched Earth
 Group:          Amusements/Games
 License:        GPLv2+
@@ -121,6 +121,9 @@ fi
 
 
 %changelog
+* Sun Nov 06 2011 Bruno Wolff III <bruno at wolff.to> - 43.2a-4
+- Fix broken palette fix
+
 * Sun Nov 06 2011 Bruno Wolff III <bruno at wolff.to> - 43.2a-3
 - Rebuild for libpng 1.5
 - Make sure all direct png struct references are through accessors


More information about the scm-commits mailing list