aboutsummaryrefslogtreecommitdiffstats
path: root/code/renderer
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-08-24 00:04:08 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-08-24 00:04:08 +0000
commitf59b4fa3759152490983b6123595d5a29cb8f034 (patch)
tree2b3fc6ee912dad0867aac135486d43e9cf22e782 /code/renderer
parent78d87c0cc47dd707ff556e3926c9a32f8a77f5db (diff)
downloadioquake3-aero-f59b4fa3759152490983b6123595d5a29cb8f034.tar.gz
ioquake3-aero-f59b4fa3759152490983b6123595d5a29cb8f034.zip
* (bug 3112) Removal of QVM name obfuscation (TsT <tst2006@gmail.com>)
* Add developer warning when texture loading falls back on jpg from tga * Remove uppercase extension hack from texture loading since the Q3 pk3 file system is case insensitive anyway and you would likely want to know about the failures when loading images from the native FS git-svn-id: svn://svn.icculus.org/quake3/trunk@1133 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/renderer')
-rw-r--r--code/renderer/tr_image.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/code/renderer/tr_image.c b/code/renderer/tr_image.c
index e6990b9..609b8b2 100644
--- a/code/renderer/tr_image.c
+++ b/code/renderer/tr_image.c
@@ -4405,11 +4405,14 @@ void R_LoadImage( const char *name, byte **pic, int *width, int *height ) {
if (!*pic) {
// try jpg in place of tga
char altname[MAX_QPATH];
+
strcpy( altname, name );
len = strlen( altname );
altname[len-3] = 'j';
altname[len-2] = 'p';
altname[len-1] = 'g';
+
+ ri.Printf( PRINT_DEVELOPER, "WARNING: %s failed, trying %s\n", name, altname );
LoadJPG( altname, pic, width, height );
}
}
@@ -4477,19 +4480,8 @@ image_t *R_FindImageFile( const char *name, qboolean mipmap, qboolean allowPicmi
// load the pic from disk
//
R_LoadImage( name, &pic, &width, &height );
- if ( pic == NULL ) { // if we dont get a successful load
- char altname[MAX_QPATH]; // copy the name
- int len; //
- strcpy( altname, name ); //
- len = strlen( altname ); //
- altname[len-3] = toupper(altname[len-3]); // and try upper case extension for unix systems
- altname[len-2] = toupper(altname[len-2]); //
- altname[len-1] = toupper(altname[len-1]); //
- ri.Printf( PRINT_DEVELOPER, "trying %s...\n", altname ); //
- R_LoadImage( altname, &pic, &width, &height ); //
- if (pic == NULL) { // if that fails
- return NULL; // bail
- }
+ if ( pic == NULL ) {
+ return NULL;
}
image = R_CreateImage( ( char * ) name, pic, width, height, mipmap, allowPicmip, glWrapClampMode );