mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-26 16:56:19 +00:00
Changed: #853 Compilation on 64-bits platforms
This commit is contained in:
parent
f79217476b
commit
169cd0426d
1 changed files with 11 additions and 10 deletions
|
@ -155,23 +155,24 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y)
|
||||||
string getBaseName (const string &fullname)
|
string getBaseName (const string &fullname)
|
||||||
{
|
{
|
||||||
string sTmp2 = "";
|
string sTmp2 = "";
|
||||||
int pos = fullname.rfind('_');
|
string::size_type pos = fullname.rfind('_');
|
||||||
for (int j = 0; j <= pos; ++j)
|
if (pos != string::npos)
|
||||||
sTmp2 += fullname[j];
|
sTmp2 = fullname.substr(0, pos+1);
|
||||||
return sTmp2;
|
return sTmp2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
uint8 getLayerNb (const string &fullname)
|
uint8 getLayerNb (const string &fullname)
|
||||||
{
|
{
|
||||||
string sTmp2;
|
|
||||||
uint8 nRet = 0;
|
uint8 nRet = 0;
|
||||||
int beg = fullname.rfind('_');
|
string::size_type beg = fullname.rfind('_');
|
||||||
int end = fullname.rfind('.');
|
string::size_type end = fullname.rfind('.');
|
||||||
for (int j = beg+1; j < end; ++j)
|
if (beg != string::npos)
|
||||||
sTmp2 += fullname[j];
|
{
|
||||||
|
string sTmp2 = fullname.substr(beg+1, end-beg-1);
|
||||||
NLMISC::fromString(sTmp2, nRet);
|
NLMISC::fromString(sTmp2, nRet);
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +479,7 @@ int main(int nNbArg, char **ppArgs)
|
||||||
std::string start = AllLightmapNames[k].substr(0, tags[l].size());
|
std::string start = AllLightmapNames[k].substr(0, tags[l].size());
|
||||||
if (NLMISC::nlstricmp(start, tags[l]) == 0)
|
if (NLMISC::nlstricmp(start, tags[l]) == 0)
|
||||||
{
|
{
|
||||||
bestLength = tags[l].size();
|
bestLength = (uint)tags[l].size();
|
||||||
// the tag matchs
|
// the tag matchs
|
||||||
AllLightmapTags[k] = l;
|
AllLightmapTags[k] = l;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue