]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image_png.c
new cvar: r_glsl_offsetmapping_reliefmapping_refinesteps (default 5)
[xonotic/darkplaces.git] / image_png.c
index f1ac5458a8f5b657f2b6056987245cb8faa38391..4267331be738462ceaacfd07541f5bedab60861a 100644 (file)
@@ -126,13 +126,14 @@ qboolean PNG_OpenLibrary (void)
        const char* dllnames [] =
        {
 #if WIN32
+               "libpng14-14.dll",
                "libpng14.dll",
                "libpng12.dll",
 #elif defined(MACOSX)
-               "libpng14.0.dylib",
+               "libpng14.14.dylib",
                "libpng12.0.dylib",
 #else
-               "libpng14.so.0",
+               "libpng14.so.14", // WTF libtool guidelines anyone?
                "libpng12.so.0",
                "libpng.so", // FreeBSD
 #endif
@@ -169,7 +170,7 @@ void PNG_CloseLibrary (void)
 */
 
 #define PNG_LIBPNG_VER_STRING_12 "1.2.4"
-#define PNG_LIBPNG_VER_STRING_14 "1.4.1"
+#define PNG_LIBPNG_VER_STRING_14 "1.4.0"
 
 #define PNG_COLOR_MASK_PALETTE    1
 #define PNG_COLOR_MASK_COLOR      2
@@ -255,7 +256,7 @@ void PNG_warning_fn(void *png, const char *message)
 extern int     image_width;
 extern int     image_height;
 
-unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize)
+unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int *miplevel)
 {
        unsigned int c;
        unsigned int    y;
@@ -285,7 +286,9 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize)
        // NOTE: this relies on jmp_buf being the first thing in the png structure
        // created by libpng! (this is correct for libpng 1.2.x)
 #ifdef __cplusplus
-#if defined(MACOSX) || defined(WIN32)
+#ifdef WIN64
+       if (setjmp((_JBTYPE *)png))
+#elif defined(MACOSX) || defined(WIN32)
        if (setjmp((int *)png))
 #else
        if (setjmp((__jmp_buf_tag *)png))
@@ -478,7 +481,9 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height,
        // NOTE: this relies on jmp_buf being the first thing in the png structure
        // created by libpng! (this is correct for libpng 1.2.x)
 #ifdef __cplusplus
-#if defined(MACOSX) || defined(WIN32)
+#ifdef WIN64
+       if (setjmp((_JBTYPE *)png))
+#elif defined(MACOSX) || defined(WIN32)
        if (setjmp((int *)png))
 #else
        if (setjmp((__jmp_buf_tag *)png))