* Rewrite of R_LoadImage to make it more generic and data driven
This commit is contained in:
parent
6993861080
commit
034e6e8f20
6 changed files with 117 additions and 44 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue