aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-08-26 21:27:46 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-08-26 21:27:46 +0000
commite030ec0ba762165d6ff1c24eca0f692f863daa6e (patch)
treeb016c277887b352e1c90da840cfa98ed0c3369ab /code/qcommon
parent8fff917396ba80a670c301e7fd9053cdd3574091 (diff)
downloadioquake3-aero-e030ec0ba762165d6ff1c24eca0f692f863daa6e.tar.gz
ioquake3-aero-e030ec0ba762165d6ff1c24eca0f692f863daa6e.zip
* Rewrite of R_LoadImage to make it more generic and data driven
git-svn-id: svn://svn.icculus.org/quake3/trunk@1137 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/files.c1
-rw-r--r--code/qcommon/q_shared.c22
-rw-r--r--code/qcommon/q_shared.h1
3 files changed, 23 insertions, 1 deletions
diff --git a/code/qcommon/files.c b/code/qcommon/files.c
index 8a056d5..4a909e3 100644
--- a/code/qcommon/files.c
+++ b/code/qcommon/files.c
@@ -1207,7 +1207,6 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
}
}
- Com_DPrintf ("Can't find %s\n", filename);
#ifdef FS_MISSING
if (missingFiles) {
fprintf(missingFiles, "%s\n", filename);
diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c
index b30688a..a68b283 100644
--- a/code/qcommon/q_shared.c
+++ b/code/qcommon/q_shared.c
@@ -55,6 +55,28 @@ char *COM_SkipPath (char *pathname)
/*
============
+COM_GetExtension
+============
+*/
+const char *COM_GetExtension( const char *name ) {
+ int length, i;
+
+ length = strlen(name)-1;
+ i = length;
+
+ while (name[i] != '.')
+ {
+ i--;
+ if (name[i] == '/' || i == 0)
+ return ""; // no extension
+ }
+
+ return &name[i+1];
+}
+
+
+/*
+============
COM_StripExtension
============
*/
diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h
index e3a062a..fcd48e0 100644
--- a/code/qcommon/q_shared.h
+++ b/code/qcommon/q_shared.h
@@ -599,6 +599,7 @@ int Q_isnan( float x );
float Com_Clamp( float min, float max, float value );
char *COM_SkipPath( char *pathname );
+const char *COM_GetExtension( const char *name );
void COM_StripExtension(const char *in, char *out, int destsize);
void COM_DefaultExtension( char *path, int maxSize, const char *extension );