From 8850310690375a24654e7f0ff9b76ea55ddd1470 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 23 Feb 2011 13:24:47 +0100 Subject: [PATCH] also load DDS files the way DarkPlaces stores them (does DDS loading even work?) --- tools/quake3/q3map2/image.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index 929b15d9..b35963e6 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -419,6 +419,12 @@ 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 ); -- 2.39.2