mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-29 03:40:55 +00:00
Fixed: Ignore extension when looking for textures
This commit is contained in:
parent
18e35134a0
commit
413e5422f2
1 changed files with 12 additions and 2 deletions
|
@ -531,18 +531,28 @@ int main(int argc, char **argv)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sTGAname = toLower(string(tgaName));
|
||||||
|
|
||||||
|
// search position of extension
|
||||||
|
std::string tgaExt = CFile::getExtension(sTGAname);
|
||||||
|
|
||||||
|
// remove extension
|
||||||
|
sTGAname = CFile::getFilenameWithoutExtension(sTGAname);
|
||||||
|
|
||||||
sint i;
|
sint i;
|
||||||
|
|
||||||
sTGAname = toLower(string(tgaName));
|
|
||||||
string findTGAName;
|
string findTGAName;
|
||||||
for (i = 0; i < mapSize; ++i)
|
for (i = 0; i < mapSize; ++i)
|
||||||
{
|
{
|
||||||
// get the string whitout path
|
// get the string whitout path
|
||||||
findTGAName = toLower(CFile::getFilename(AllMapNames[i]));
|
findTGAName = toLower(CFile::getFilenameWithoutExtension(AllMapNames[i]));
|
||||||
if( findTGAName == sTGAname )
|
if( findTGAName == sTGAname )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// append extension
|
||||||
|
sTGAname += "." + tgaExt;
|
||||||
|
|
||||||
if( i == mapSize )
|
if( i == mapSize )
|
||||||
{
|
{
|
||||||
// not present in subset: offset existing uv's to (0,0), preserving size
|
// not present in subset: offset existing uv's to (0,0), preserving size
|
||||||
|
|
Loading…
Reference in a new issue