]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/image.c
fix undocumented unexpected LokiInitPaths
[xonotic/netradiant.git] / tools / quake3 / q3map2 / image.c
index 60062a1705b983c641a27cd0c70f402bb34911c2..c1c737f51b3282b74d827a80fd9fe06110ec7346 100644 (file)
@@ -430,6 +430,16 @@ image_t *ImageLoad( const char *filename ){
                                        }
                                        #endif
                                }
+                               else
+                               {
+                                       /* attempt to load ktx */
+                                       StripExtension( name );
+                                       strcat( name, ".ktx" );
+                                       size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 );
+                                       if ( size > 0 ) {
+                                               LoadKTXBufferFirstImage( buffer, size, &image->pixels, &image->width, &image->height );
+                                       }
+                               }
                        }
                }
        }