* Rewrite of R_LoadImage to make it more generic and data driven
This commit is contained in:
1 parent
6993861080
commit
034e6e8f20
6 files changed
+117
-44
No files matched your search
@@ -53,6 +53,28 @@ char *COM_SkipPath (char *pathname)
|
||||
return last;
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user