* Rewrite of R_LoadImage to make it more generic and data driven

This commit is contained in:
Tim Angus 2007-08-26 21:27:46 +00:00
parent 6993861080
commit 034e6e8f20
6 changed files with 117 additions and 44 deletions

View file

@ -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