X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fimage.c;h=c1c737f51b3282b74d827a80fd9fe06110ec7346;hb=25e4f9e8cf6aa80de16ba5f25cfc9b3da7c2c368;hp=60062a1705b983c641a27cd0c70f402bb34911c2;hpb=32201f62a3b9d50fff9b18dfe3aa262b68e5381b;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index 60062a17..c1c737f5 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -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 ); + } + } } } }