Changeset - r9151:8f9b91035e52
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2008-05-08 13:51:15
rubidium@openttd.org
(svn r13013) -Fix: GCC 4.3 warning about a clobbering mask due to longjmp. This can't be solved by using exceptions because the longjmp is needed for PNG (C-code) handling.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/spriteloader/png.cpp
Show inline comments
 
@@ -35,25 +35,25 @@ static bool OpenPNGFile(const char *file
 
	char png_file[MAX_PATH];
 

	
 
	snprintf(png_file, sizeof(png_file), "sprites" PATHSEP "%s" PATHSEP "%d%s.png", filename, id, mask ? "m" : "");
 
	if (FioCheckFileExists(png_file)) {
 
		FioOpenFile(PNG_SLOT, png_file);
 
		return true;
 
	}
 

	
 
	/* TODO -- Add TAR support */
 
	return false;
 
}
 

	
 
static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 id, bool mask)
 
static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 id, volatile bool mask)
 
{
 
	png_byte header[8];
 
	png_structp png_ptr;
 
	png_infop info_ptr, end_info;
 
	uint bit_depth, color_type;
 
	uint i, pixelsize;
 
	png_bytep row_pointer;
 
	SpriteLoader::CommonPixel *dst;
 

	
 
	if (!OpenPNGFile(filename, id, mask)) return mask; // If mask is true, and file not found, continue true anyway, as it isn't a show-stopper
 

	
 
	/* Check the header */
0 comments (0 inline, 0 general)