Getting rid of mhash references, and adhering to newer libpng standards.

This is work done to Rambetter-libs-updates-work branch.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-libs-updates-work@439 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
rambetter 2011-01-26 04:53:51 +00:00
parent 4022e66e5e
commit d98cdcafc4
3 changed files with 5 additions and 9 deletions

View file

@ -35,7 +35,6 @@ dependencies:
- libxml2 >= 2.0.0
- zlib >= 1.2.0 (for archivezip module)
- libpng >= 1.2.0 (for imagepng module)
- libmhash = 0.9.0 (for q3map2)
build:
Execute 'scons' in the directory containing SConscript

View file

@ -137,7 +137,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
// http://www.libpng.org/pub/png/libpng-manual.html
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
(PNG_LIBPNG_VER_STRING, NULL,
user_error_fn, user_warning_fn);
if (!png_ptr)
{
@ -148,7 +148,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
png_infop info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_read_struct(&png_ptr,
png_infopp_NULL, png_infopp_NULL);
NULL, NULL);
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_info_struct (info_ptr)\n");
return;
}
@ -156,7 +156,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
png_infop end_info = png_create_info_struct(png_ptr);
if (!end_info) {
png_destroy_read_struct(&png_ptr, &info_ptr,
png_infopp_NULL);
NULL);
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_info_struct (end_info)\n");
return;
}
@ -188,7 +188,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
png_set_palette_to_rgb(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
png_set_gray_1_2_4_to_8(png_ptr);
png_set_expand_gray_1_2_4_to_8(png_ptr);
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
png_set_tRNS_to_alpha(png_ptr);
@ -234,7 +234,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
png_read_end(png_ptr, info_ptr);
/* free up the memory structure */
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
free(row_pointers);
g_FileSystemTable.m_pfnFreeFile (fbuffer);

View file

@ -81,9 +81,6 @@ dependencies
#include "vfs.h"
#include "png.h"
/* mhash library must be installed locally or system wide - http://mhash.sourceforge.net/ */
//#include "mhash.h"
#include <stdlib.h>