X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fimage.c;h=93f1b6ed76f19f792d708e7538d68bee351e8833;hb=refs%2Fmerge-requests%2F172%2Fhead;hp=36658b86dead1f5578a8202a636e60325c6e16bb;hpb=6998d7a4b8491415a8d01569c58a0e04e5f86dfa;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index 36658b86..93f1b6ed 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -461,6 +461,16 @@ image_t *ImageLoad( const char *filename ){ StripExtension( name ); strcat( name, ".dds" ); size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 ); + + /* also look for .dds image in dds/ prefix like Doom3 or DarkPlaces */ + if ( size <= 0 ) { + strcpy( name, "dds/" ); + strcat( name, image->name ); + StripExtension( name ); + strcat( name, ".dds" ); + size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 ); + } + if ( size > 0 ) { LoadDDSBuffer( buffer, size, &image->pixels, &image->width, &image->height ); goto image_load_success; @@ -497,6 +507,9 @@ image_t *ImageLoad( const char *filename ){ image_load_success: + /* tell user which image file is found for the given texture path */ + Sys_FPrintf( SYS_VRB, "Loaded image: \"%s\"\n", name ); + /* free file buffer */ free( buffer );