New zlib/libpng libraries
This was SVN commit r942.
This commit is contained in:
parent
7545ad13b8
commit
abfe9faadc
@ -46,9 +46,13 @@
|
||||
# define _WINDOWS_ // prevent libpng from including windows.h
|
||||
# define WINAPI __stdcall // .. and define what it needs
|
||||
# define WINAPIV __cdecl
|
||||
# include <libpng10/png.h>
|
||||
# include <libpng13/png.h>
|
||||
# ifdef _MSC_VER
|
||||
# pragma comment(lib, "libpng10.lib")
|
||||
# ifdef NDEBUG
|
||||
# pragma comment(lib, "libpng13.lib")
|
||||
# else
|
||||
# pragma comment(lib, "libpng13d.lib")
|
||||
# endif
|
||||
# endif
|
||||
# else // _WIN32
|
||||
# include <png.h>
|
||||
@ -796,7 +800,7 @@ fail:
|
||||
// make sure format is acceptable
|
||||
if(bit_depth != 8)
|
||||
msg = "channel precision != 8 bits";
|
||||
if(color_type & 1)
|
||||
if(color_type & PNG_COLOR_MASK_PALETTE)
|
||||
msg = "color type is invalid (must be direct color)";
|
||||
if(msg)
|
||||
goto fail;
|
||||
@ -831,9 +835,9 @@ fail:
|
||||
|
||||
// shared cleanup
|
||||
ret:
|
||||
// free(rows);
|
||||
free(rows);
|
||||
|
||||
// png_destroy_read_struct(&png_ptr, &info_ptr, 0);
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, 0);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -29,10 +29,15 @@
|
||||
//#define NO_ZLIB
|
||||
|
||||
#ifndef NO_ZLIB
|
||||
#include <zlib.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "zdll.lib")
|
||||
#endif
|
||||
# define ZLIB_WINAPI
|
||||
# include <zlib.h>
|
||||
# ifdef _MSC_VER
|
||||
# ifdef NDEBUG
|
||||
# pragma comment(lib, "zlib1.lib")
|
||||
# else
|
||||
# pragma comment(lib, "zlib1d.lib")
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
|
@ -41,6 +41,7 @@
|
||||
# define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#endif
|
||||
|
||||
#define ZLIB_WINAPI
|
||||
#include "zlib.h" // for crc32
|
||||
|
||||
#include "res/h_mgr.h"
|
||||
|
@ -25,8 +25,8 @@ Instructions:
|
||||
download http://www.wildfiregames.com/~code/libraries/zlib121.zip.
|
||||
... extract contents of include/ into $include, and .lib files into $lib.
|
||||
|
||||
- libpng (v1.0.15): [PNG texture loading]
|
||||
download http://www.wildfiregames.com/~code/libraries/libpng10.zip.
|
||||
- libpng (v1.2.6rc2): [PNG texture loading]
|
||||
download http://www.wildfiregames.com/~code/libraries/libpng13.zip.
|
||||
... extract contents of include/ into $include, and .lib files into $lib.
|
||||
|
||||
- Xerces: [XML parsing for GUI and entity]
|
||||
|
Loading…
Reference in New Issue
Block a user