]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/image.c
more warnings be gone
[xonotic/netradiant.git] / tools / quake3 / q3map2 / image.c
index b35963e6837538fff6d09467708cd62aaff6e65b..7ce08aaaf88e5e3d621bf3b3e757f53e7e7f3546 100644 (file)
@@ -127,7 +127,7 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in
        png_struct      *png;
        png_info        *info, *end;
        pngBuffer_t     pb;
-       int                     bitDepth, colorType, channels;
+       int                     bitDepth, colorType;
        png_uint_32     w, h, i;
        byte            **rowPointers;
        
@@ -196,9 +196,6 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in
        png_get_IHDR( png, info,
                &w, &h, &bitDepth, &colorType, NULL, NULL, NULL );
        
-       /* read number of channels */
-       channels = png_get_channels( png, info );
-       
        /* the following will probably bork on certain types of png images, but hey... */
 
        /* force indexed/gray/trans chunk to rgb */
@@ -419,12 +416,6 @@ image_t *ImageLoad( const char *filename )
                                StripExtension( name );
                                strcat( name, ".dds" );
                                size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 );
-                               if(size <= 0)
-                               {
-                                       memmove(name + 4, name, strlen(name) + 1);
-                                       memcpy(name, "dds/", 4);
-                                       size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 );
-                               }
                                if( size > 0 )
                                {
                                        LoadDDSBuffer( buffer, size, &image->pixels, &image->width, &image->height );