mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Changed: Replaced some NLMISC::strlwr by NLMISC::toLower
This commit is contained in:
parent
5ee0ee96cb
commit
380bac5728
42 changed files with 129 additions and 180 deletions
|
@ -519,17 +519,17 @@ namespace NLGUI
|
||||||
|
|
||||||
// Read Action handlers
|
// Read Action handlers
|
||||||
prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" );
|
prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" );
|
||||||
if (prop) _AHOnScroll = NLMISC::strlwr(prop.str());
|
if (prop) _AHOnScroll = NLMISC::toLower(prop.str());
|
||||||
prop = (char*) xmlGetProp( node, (xmlChar*)"params" );
|
prop = (char*) xmlGetProp( node, (xmlChar*)"params" );
|
||||||
if (prop) _AHOnScrollParams = string((const char*)prop);
|
if (prop) _AHOnScrollParams = string((const char*)prop);
|
||||||
//
|
//
|
||||||
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" );
|
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" );
|
||||||
if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop.str());
|
if (prop) _AHOnScrollEnd = NLMISC::toLower(prop.str());
|
||||||
prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" );
|
prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" );
|
||||||
if (prop) _AHOnScrollEndParams = string((const char*)prop);
|
if (prop) _AHOnScrollEndParams = string((const char*)prop);
|
||||||
//
|
//
|
||||||
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" );
|
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" );
|
||||||
if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop.str());
|
if (prop) _AHOnScrollCancel = NLMISC::toLower(prop.str());
|
||||||
prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" );
|
prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" );
|
||||||
if (prop) _AHOnScrollCancelParams = string((const char*)prop);
|
if (prop) _AHOnScrollCancelParams = string((const char*)prop);
|
||||||
|
|
||||||
|
|
|
@ -606,11 +606,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
|
||||||
if (prop)
|
if (prop) _ListMenuRight = toLower((const char *) prop);
|
||||||
{
|
|
||||||
string tmp = (const char *) prop;
|
|
||||||
_ListMenuRight = strlwr(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"max_historic" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"max_historic" );
|
||||||
if (prop) fromString((const char*)prop, _MaxHistoric);
|
if (prop) fromString((const char*)prop, _MaxHistoric);
|
||||||
|
|
|
@ -772,8 +772,7 @@ namespace NLGUI
|
||||||
cellParams.NoWrap = true; \
|
cellParams.NoWrap = true; \
|
||||||
if (present[prefix##_ALIGN] && value[prefix##_ALIGN]) \
|
if (present[prefix##_ALIGN] && value[prefix##_ALIGN]) \
|
||||||
{ \
|
{ \
|
||||||
string align = value[prefix##_ALIGN]; \
|
string align = toLower(value[prefix##_ALIGN]); \
|
||||||
align = strlwr(align); \
|
|
||||||
if (align == "left") \
|
if (align == "left") \
|
||||||
cellParams.Align = CGroupCell::Left; \
|
cellParams.Align = CGroupCell::Left; \
|
||||||
if (align == "center") \
|
if (align == "center") \
|
||||||
|
@ -783,8 +782,7 @@ namespace NLGUI
|
||||||
} \
|
} \
|
||||||
if (present[prefix##_VALIGN] && value[prefix##_VALIGN]) \
|
if (present[prefix##_VALIGN] && value[prefix##_VALIGN]) \
|
||||||
{ \
|
{ \
|
||||||
string align = value[prefix##_VALIGN]; \
|
string align = toLower(value[prefix##_VALIGN]); \
|
||||||
align = strlwr(align); \
|
|
||||||
if (align == "top") \
|
if (align == "top") \
|
||||||
cellParams.VAlign = CGroupCell::Top; \
|
cellParams.VAlign = CGroupCell::Top; \
|
||||||
if (align == "middle") \
|
if (align == "middle") \
|
||||||
|
@ -1182,7 +1180,7 @@ namespace NLGUI
|
||||||
if (it != styles.end())
|
if (it != styles.end())
|
||||||
{
|
{
|
||||||
string image = it->second;
|
string image = it->second;
|
||||||
string::size_type texExt = strlwr(image).find("url(");
|
string::size_type texExt = toLower(image).find("url(");
|
||||||
// Url image
|
// Url image
|
||||||
if (texExt != string::npos)
|
if (texExt != string::npos)
|
||||||
// Remove url()
|
// Remove url()
|
||||||
|
@ -1321,8 +1319,7 @@ namespace NLGUI
|
||||||
if (present[MY_HTML_INPUT_ALT] && value[MY_HTML_INPUT_ALT])
|
if (present[MY_HTML_INPUT_ALT] && value[MY_HTML_INPUT_ALT])
|
||||||
tooltip = value[MY_HTML_INPUT_ALT];
|
tooltip = value[MY_HTML_INPUT_ALT];
|
||||||
|
|
||||||
string type = value[MY_HTML_INPUT_TYPE];
|
string type = toLower(value[MY_HTML_INPUT_TYPE]);
|
||||||
type = strlwr (type);
|
|
||||||
if (type == "image")
|
if (type == "image")
|
||||||
{
|
{
|
||||||
// The submit button
|
// The submit button
|
||||||
|
@ -1668,7 +1665,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
nlinfo("found background-image %s", it->second.c_str());
|
nlinfo("found background-image %s", it->second.c_str());
|
||||||
string image = (*it).second;
|
string image = (*it).second;
|
||||||
string::size_type texExt = strlwr(image).find("url(");
|
string::size_type texExt = toLower(image).find("url(");
|
||||||
// Url image
|
// Url image
|
||||||
if (texExt != string::npos)
|
if (texExt != string::npos)
|
||||||
{
|
{
|
||||||
|
@ -3826,7 +3823,7 @@ namespace NLGUI
|
||||||
// folder used for images cache
|
// folder used for images cache
|
||||||
static const string cacheDir = "cache";
|
static const string cacheDir = "cache";
|
||||||
|
|
||||||
string::size_type protocolPos = strlwr(result).find("://");
|
string::size_type protocolPos = toLower(result).find("://");
|
||||||
|
|
||||||
if (protocolPos != string::npos)
|
if (protocolPos != string::npos)
|
||||||
{
|
{
|
||||||
|
@ -3840,7 +3837,7 @@ namespace NLGUI
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Url is a file ?
|
// Url is a file ?
|
||||||
if (strlwr(result).find("file:") == 0)
|
if (toLower(result).find("file:") == 0)
|
||||||
{
|
{
|
||||||
result = result.substr(5, result.size()-5);
|
result = result.substr(5, result.size()-5);
|
||||||
}
|
}
|
||||||
|
@ -3857,7 +3854,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
// Normalize the path
|
// Normalize the path
|
||||||
if (isUrl)
|
if (isUrl)
|
||||||
//result = "file:"+strlwr(CPath::standardizePath (CPath::getFullPath (CFile::getPath(result)))+CFile::getFilename(result));*/
|
//result = "file:"+toLower(CPath::standardizePath (CPath::getFullPath (CFile::getPath(result)))+CFile::getFilename(result));*/
|
||||||
result = "file:/"+tmp;
|
result = "file:/"+tmp;
|
||||||
else
|
else
|
||||||
result = tmp;
|
result = tmp;
|
||||||
|
@ -4114,7 +4111,7 @@ namespace NLGUI
|
||||||
void CGroupHTML::doBrowseLocalFile(const std::string &uri)
|
void CGroupHTML::doBrowseLocalFile(const std::string &uri)
|
||||||
{
|
{
|
||||||
std::string filename;
|
std::string filename;
|
||||||
if (strlwr(uri).find("file:/") == 0)
|
if (toLower(uri).find("file:/") == 0)
|
||||||
{
|
{
|
||||||
filename = uri.substr(6, uri.size() - 6);
|
filename = uri.substr(6, uri.size() - 6);
|
||||||
}
|
}
|
||||||
|
@ -4978,7 +4975,7 @@ namespace NLGUI
|
||||||
else
|
else
|
||||||
if (it->first == "text-decoration" || it->first == "text-decoration-line")
|
if (it->first == "text-decoration" || it->first == "text-decoration-line")
|
||||||
{
|
{
|
||||||
std::string prop(strlwr(it->second));
|
std::string prop(toLower(it->second));
|
||||||
style.Underlined = (prop.find("underline") != std::string::npos);
|
style.Underlined = (prop.find("underline") != std::string::npos);
|
||||||
style.StrikeThrough = (prop.find("line-through") != std::string::npos);
|
style.StrikeThrough = (prop.find("line-through") != std::string::npos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,7 @@ namespace NLGUI
|
||||||
if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr);
|
if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr);
|
||||||
|
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"type");
|
ptr = xmlGetProp (cur, (xmlChar*)"type");
|
||||||
string sTmp = ptr.str();
|
string sTmp = toLower(ptr.str());
|
||||||
sTmp = strlwr(sTmp);
|
|
||||||
if (sTmp == "linear")
|
if (sTmp == "linear")
|
||||||
_Type = Track_Linear;
|
_Type = Track_Linear;
|
||||||
else if (sTmp == "bezier")
|
else if (sTmp == "bezier")
|
||||||
|
|
|
@ -312,8 +312,7 @@ namespace NLGUI
|
||||||
ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" );
|
ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" );
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
string idparent = ptr.str();
|
string idparent = NLMISC::toLower(ptr.str());
|
||||||
idparent = NLMISC::strlwr(idparent);
|
|
||||||
if (idparent != "parent")
|
if (idparent != "parent")
|
||||||
{
|
{
|
||||||
if (parentGroup)
|
if (parentGroup)
|
||||||
|
|
|
@ -127,8 +127,7 @@ namespace NLGUI
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
const CInterfaceOptionValue &CInterfaceOptions::getValue(const string &sParamName) const
|
const CInterfaceOptionValue &CInterfaceOptions::getValue(const string &sParamName) const
|
||||||
{
|
{
|
||||||
string sLwrParamName = strlwr (sParamName);
|
std::map<std::string, CInterfaceOptionValue>::const_iterator it = _ParamValue.find (toLower(sParamName));
|
||||||
std::map<std::string, CInterfaceOptionValue>::const_iterator it = _ParamValue.find (sLwrParamName);
|
|
||||||
if (it != _ParamValue.end())
|
if (it != _ParamValue.end())
|
||||||
return it->second;
|
return it->second;
|
||||||
else
|
else
|
||||||
|
|
|
@ -1359,6 +1359,9 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
|
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
|
||||||
if (!ptr) return false;
|
if (!ptr) return false;
|
||||||
|
|
||||||
|
string stmp2 = toLower(string((const char*)ptr));
|
||||||
|
|
||||||
CInterfaceElement *pEltFound = NULL;
|
CInterfaceElement *pEltFound = NULL;
|
||||||
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
|
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
|
||||||
for (uint32 i = 0; i < _MasterGroups.size(); ++i)
|
for (uint32 i = 0; i < _MasterGroups.size(); ++i)
|
||||||
|
@ -1367,8 +1370,8 @@ namespace NLGUI
|
||||||
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
||||||
{
|
{
|
||||||
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
||||||
string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
||||||
string stmp2 = strlwr(string((const char*)ptr));
|
|
||||||
if (stmp == stmp2)
|
if (stmp == stmp2)
|
||||||
{
|
{
|
||||||
pEltFound = pIG;
|
pEltFound = pIG;
|
||||||
|
@ -1408,6 +1411,9 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
|
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
|
||||||
if (!ptr) return false;
|
if (!ptr) return false;
|
||||||
|
|
||||||
|
string stmp2 = toLower(string((const char*)ptr));
|
||||||
|
|
||||||
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
|
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
|
||||||
CInterfaceElement *pEltFound = NULL;
|
CInterfaceElement *pEltFound = NULL;
|
||||||
for (uint32 i = 0; i < _MasterGroups.size(); ++i)
|
for (uint32 i = 0; i < _MasterGroups.size(); ++i)
|
||||||
|
@ -1416,8 +1422,7 @@ namespace NLGUI
|
||||||
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
||||||
{
|
{
|
||||||
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
||||||
string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
||||||
string stmp2 = strlwr(string((const char*)ptr));
|
|
||||||
if (stmp == stmp2)
|
if (stmp == stmp2)
|
||||||
{
|
{
|
||||||
pEltFound = pIG;
|
pEltFound = pIG;
|
||||||
|
@ -1600,6 +1605,9 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
|
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
|
||||||
if (!ptr) return false;
|
if (!ptr) return false;
|
||||||
|
|
||||||
|
string stmp2 = toLower(string((const char*)ptr));
|
||||||
|
|
||||||
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
|
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
|
||||||
CInterfaceElement *pEltFound = NULL;
|
CInterfaceElement *pEltFound = NULL;
|
||||||
for (uint32 i = 0; i < _MasterGroups.size(); ++i)
|
for (uint32 i = 0; i < _MasterGroups.size(); ++i)
|
||||||
|
@ -1608,8 +1616,8 @@ namespace NLGUI
|
||||||
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
||||||
{
|
{
|
||||||
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
||||||
string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
||||||
string stmp2 = strlwr(string((const char*)ptr));
|
|
||||||
if (stmp == stmp2)
|
if (stmp == stmp2)
|
||||||
{
|
{
|
||||||
pEltFound = pIG;
|
pEltFound = pIG;
|
||||||
|
|
|
@ -84,56 +84,43 @@ namespace NLGUI
|
||||||
_OffsetY = getY();
|
_OffsetY = getY();
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_default");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_default");
|
||||||
if (prop) _TxDefault = (const char *) prop;
|
if (prop) _TxDefault = NLMISC::toLower ((const char *) prop);
|
||||||
_TxDefault = NLMISC::strlwr (_TxDefault);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_move_window");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_move_window");
|
||||||
if (prop) _TxMoveWindow = (const char *) prop;
|
if (prop) _TxMoveWindow = NLMISC::toLower ((const char *) prop);
|
||||||
_TxMoveWindow = NLMISC::strlwr (_TxMoveWindow);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BR_TL");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BR_TL");
|
||||||
if (prop) _TxResizeBRTL = (const char *) prop;
|
if (prop) _TxResizeBRTL = NLMISC::toLower ((const char *) prop);
|
||||||
_TxResizeBRTL = NLMISC::strlwr (_TxResizeBRTL);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BL_TR");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BL_TR");
|
||||||
if (prop) _TxResizeBLTR = (const char *) prop;
|
if (prop) _TxResizeBLTR = NLMISC::toLower ((const char *) prop);
|
||||||
_TxResizeBLTR = NLMISC::strlwr (_TxResizeBLTR);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_TB");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_TB");
|
||||||
if (prop) _TxResizeTB = (const char *) prop;
|
if (prop) _TxResizeTB = NLMISC::toLower ((const char *) prop);
|
||||||
_TxResizeTB = NLMISC::strlwr (_TxResizeTB);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_LR");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_LR");
|
||||||
if (prop) _TxResizeLR = (const char *) prop;
|
if (prop) _TxResizeLR = NLMISC::toLower ((const char *) prop);
|
||||||
_TxResizeLR = NLMISC::strlwr (_TxResizeLR);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_rotate");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_rotate");
|
||||||
if (prop) _TxRotate = (const char *) prop;
|
if (prop) _TxRotate = NLMISC::toLower ((const char *) prop);
|
||||||
_TxRotate = NLMISC::strlwr (_TxRotate);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_scale");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_scale");
|
||||||
if (prop) _TxScale = (const char *) prop;
|
if (prop) _TxScale = NLMISC::toLower ((const char *) prop);
|
||||||
_TxScale = NLMISC::strlwr (_TxScale);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_colpick");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_colpick");
|
||||||
if (prop) _TxColPick = (const char *) prop;
|
if (prop) _TxColPick = NLMISC::toLower ((const char *) prop);
|
||||||
_TxColPick = NLMISC::strlwr (_TxColPick);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan");
|
||||||
if (prop) _TxPan = (const char *) prop;
|
if (prop) _TxPan = NLMISC::toLower ((const char *) prop);
|
||||||
_TxPan = NLMISC::strlwr (_TxPan);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan");
|
||||||
if (prop) _TxCanPan = (const char *) prop;
|
if (prop) _TxCanPan = NLMISC::toLower ((const char *) prop);
|
||||||
_TxCanPan = NLMISC::strlwr (_TxCanPan);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan_r2");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan_r2");
|
||||||
if (prop) _TxPanR2 = (const char *) prop;
|
if (prop) _TxPanR2 = NLMISC::toLower ((const char *) prop);
|
||||||
_TxPanR2 = NLMISC::strlwr (_TxPanR2);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan_r2");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan_r2");
|
||||||
if (prop) _TxCanPanR2 = (const char *) prop;
|
if (prop) _TxCanPanR2 = NLMISC::toLower ((const char *) prop);
|
||||||
_TxCanPanR2 = NLMISC::strlwr (_TxCanPanR2);
|
|
||||||
|
|
||||||
prop = (char*) xmlGetProp (cur, (xmlChar*)"color");
|
prop = (char*) xmlGetProp (cur, (xmlChar*)"color");
|
||||||
if (prop) _Color = convertColor(prop);
|
if (prop) _Color = convertColor(prop);
|
||||||
|
|
|
@ -854,12 +854,11 @@ namespace NLGUI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Look if already existing
|
// Look if already existing
|
||||||
string sLwrGTName = strlwr(sGlobalTextureName);
|
string sLwrGTName = toLower(sGlobalTextureName);
|
||||||
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
|
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
|
||||||
while (ite != _GlobalTextures.end())
|
while (ite != _GlobalTextures.end())
|
||||||
{
|
{
|
||||||
std::string sText = strlwr(ite->Name);
|
if (toLower(ite->Name) == sLwrGTName)
|
||||||
if (sText == sLwrGTName)
|
|
||||||
break;
|
break;
|
||||||
ite++;
|
ite++;
|
||||||
}
|
}
|
||||||
|
@ -984,11 +983,11 @@ namespace NLGUI
|
||||||
*/
|
*/
|
||||||
NL3D::UTexture *CViewRenderer::getGlobalTexture(const std::string &name)
|
NL3D::UTexture *CViewRenderer::getGlobalTexture(const std::string &name)
|
||||||
{
|
{
|
||||||
string sLwrGTName = strlwr(name);
|
string sLwrGTName = NLMISC::toLower(name);
|
||||||
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
|
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
|
||||||
while (ite != _GlobalTextures.end())
|
while (ite != _GlobalTextures.end())
|
||||||
{
|
{
|
||||||
std::string sText = strlwr(ite->Name);
|
std::string sText = NLMISC::toLower(ite->Name);
|
||||||
if (sText == sLwrGTName)
|
if (sText == sLwrGTName)
|
||||||
break;
|
break;
|
||||||
ite++;
|
ite++;
|
||||||
|
|
|
@ -61,8 +61,7 @@ void CAnimationFX::buildTrack(NL3D::UAnimationSet *as)
|
||||||
nlassert(Sheet != NULL);
|
nlassert(Sheet != NULL);
|
||||||
if (!as) return;
|
if (!as) return;
|
||||||
if (Sheet->TrajectoryAnim.empty()) return;
|
if (Sheet->TrajectoryAnim.empty()) return;
|
||||||
std::string animName = Sheet->TrajectoryAnim;
|
std::string animName = NLMISC::toLower(Sheet->TrajectoryAnim);
|
||||||
NLMISC::strlwr(animName);
|
|
||||||
uint id = as->getAnimationIdByName(animName);
|
uint id = as->getAnimationIdByName(animName);
|
||||||
NL3D::UAnimation *anim = NULL;
|
NL3D::UAnimation *anim = NULL;
|
||||||
if (id != NL3D::UAnimationSet::NotFound)
|
if (id != NL3D::UAnimationSet::NotFound)
|
||||||
|
|
|
@ -81,7 +81,7 @@ void initAutoAnimation()
|
||||||
file.getline(line, 512);
|
file.getline(line, 512);
|
||||||
|
|
||||||
// Read the animation file
|
// Read the animation file
|
||||||
string animName = strlwr (CFile::getFilenameWithoutExtension(line));
|
string animName = toLower(CFile::getFilenameWithoutExtension(line));
|
||||||
uint id = AutoAnimSet->addAnimation (line, animName.c_str ());
|
uint id = AutoAnimSet->addAnimation (line, animName.c_str ());
|
||||||
if (id == UAnimationSet::NotFound)
|
if (id == UAnimationSet::NotFound)
|
||||||
{
|
{
|
||||||
|
|
|
@ -610,7 +610,7 @@ uint32 CCharacterCL::buildEquipment(const CCharacterSheet::CEquipment &slot, SLO
|
||||||
{
|
{
|
||||||
// IS the item a valid one ?
|
// IS the item a valid one ?
|
||||||
CSheetId itemId;
|
CSheetId itemId;
|
||||||
if(itemId.buildSheetId(NLMISC::strlwr(slot.getItem())))
|
if(itemId.buildSheetId(NLMISC::toLower(slot.getItem())))
|
||||||
{
|
{
|
||||||
// Is it stored in the database ?
|
// Is it stored in the database ?
|
||||||
CEntitySheet *entitySheet = SheetMngr.get(itemId);
|
CEntitySheet *entitySheet = SheetMngr.get(itemId);
|
||||||
|
@ -1098,7 +1098,7 @@ string CCharacterCL::automatonType() const // virtual
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CCharacterCL::computeAutomaton()
|
void CCharacterCL::computeAutomaton()
|
||||||
{
|
{
|
||||||
_CurrentAutomaton = automatonType() + "_" + NLMISC::strlwr(MBEHAV::modeToString(_Mode)) + ".automaton";
|
_CurrentAutomaton = automatonType() + "_" + NLMISC::toLower(MBEHAV::modeToString(_Mode)) + ".automaton";
|
||||||
}// computeAutomaton //
|
}// computeAutomaton //
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -520,7 +520,7 @@ int main(int argc, char **argv)
|
||||||
uint i;
|
uint i;
|
||||||
for (i=0; i<files.size(); i++)
|
for (i=0; i<files.size(); i++)
|
||||||
{
|
{
|
||||||
if (strlwr (CFile::getExtension (files[i])) == "ttf")
|
if (toLower(CFile::getExtension (files[i])) == "ttf")
|
||||||
CFile::deleteFile (files[i]);
|
CFile::deleteFile (files[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -929,7 +929,7 @@ NLMISC_COMMAND(verbose, "Enable/Disable some Debug Information", "none or magic"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string type = NLMISC::strlwr(args[0]);
|
std::string type = NLMISC::toLower(args[0]);
|
||||||
if (type == "none")
|
if (type == "none")
|
||||||
Verbose = VerboseNone;
|
Verbose = VerboseNone;
|
||||||
else if(type == "magic")
|
else if(type == "magic")
|
||||||
|
|
|
@ -522,7 +522,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
|
||||||
// Associate IGs with the ZC number or -1 if there is no ZC.
|
// Associate IGs with the ZC number or -1 if there is no ZC.
|
||||||
for(uint i = 0; i<igsWithNames.size(); ++i)
|
for(uint i = 0; i<igsWithNames.size(); ++i)
|
||||||
{
|
{
|
||||||
string igZone = strlwr(CFile::getFilenameWithoutExtension(igsWithNames[i].second));
|
string igZone = toLower(CFile::getFilenameWithoutExtension(igsWithNames[i].second));
|
||||||
|
|
||||||
// Search for the IG name in the ZC list to associate.
|
// Search for the IG name in the ZC list to associate.
|
||||||
for(uint j = 0; j<ZCList.size(); ++j)
|
for(uint j = 0; j<ZCList.size(); ++j)
|
||||||
|
@ -532,7 +532,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
|
||||||
if (outpost)
|
if (outpost)
|
||||||
{
|
{
|
||||||
// If name matching -> this zone should be a ZC.
|
// If name matching -> this zone should be a ZC.
|
||||||
string outpostZone = strlwr(CFile::getFilenameWithoutExtension(ZCList[j].Name));
|
string outpostZone = toLower(CFile::getFilenameWithoutExtension(ZCList[j].Name));
|
||||||
if(igZone == outpostZone)
|
if(igZone == outpostZone)
|
||||||
{
|
{
|
||||||
nlctassert(RZ_MAX_BUILDING_PER_OUTPOST==4);
|
nlctassert(RZ_MAX_BUILDING_PER_OUTPOST==4);
|
||||||
|
@ -788,7 +788,7 @@ void CContinent::reloadFogMap()
|
||||||
const R2::CScenarioEntryPoints::CCompleteIsland *completeIsland = R2::CScenarioEntryPoints::getInstance().getCompleteIslandFromCoords(CVector2f((float) UserEntity->pos().x, (float) UserEntity->pos().y));
|
const R2::CScenarioEntryPoints::CCompleteIsland *completeIsland = R2::CScenarioEntryPoints::getInstance().getCompleteIslandFromCoords(CVector2f((float) UserEntity->pos().x, (float) UserEntity->pos().y));
|
||||||
if (completeIsland)
|
if (completeIsland)
|
||||||
{
|
{
|
||||||
std::string islandName = strlwr(completeIsland->Island);
|
std::string islandName = toLower(completeIsland->Island);
|
||||||
std::string::size_type lastPos = islandName.find_last_of("_");
|
std::string::size_type lastPos = islandName.find_last_of("_");
|
||||||
if (lastPos != std::string::npos)
|
if (lastPos != std::string::npos)
|
||||||
{
|
{
|
||||||
|
|
|
@ -183,7 +183,7 @@ void CContinentManager::preloadSheets()
|
||||||
for (i = 0; i < ws->ContLocs.size(); ++i)
|
for (i = 0; i < ws->ContLocs.size(); ++i)
|
||||||
{
|
{
|
||||||
const SContLoc &clTmp = ws->ContLocs[i];
|
const SContLoc &clTmp = ws->ContLocs[i];
|
||||||
std::string continentSheetName = NLMISC::strlwr(clTmp.ContinentName);
|
std::string continentSheetName = NLMISC::toLower(clTmp.ContinentName);
|
||||||
if (continentSheetName.find(".continent") == std::string::npos)
|
if (continentSheetName.find(".continent") == std::string::npos)
|
||||||
{
|
{
|
||||||
continentSheetName += ".continent";
|
continentSheetName += ".continent";
|
||||||
|
|
|
@ -248,8 +248,7 @@ void CDoorManager::SDoor::checkToClose()
|
||||||
std::string CDoorManager::transformName (uint /* index */, const std::string &/* instanceName */, const std::string &shapeName)
|
std::string CDoorManager::transformName (uint /* index */, const std::string &/* instanceName */, const std::string &shapeName)
|
||||||
{
|
{
|
||||||
if (shapeName.rfind('.') == string::npos) return shapeName;
|
if (shapeName.rfind('.') == string::npos) return shapeName;
|
||||||
string sExt = shapeName.substr(shapeName.rfind('.')+1,shapeName.size());
|
string sExt = toLower(shapeName.substr(shapeName.rfind('.')+1,shapeName.size()));
|
||||||
sExt = strlwr(sExt);
|
|
||||||
if (sExt != "pacs_prim") return shapeName;
|
if (sExt != "pacs_prim") return shapeName;
|
||||||
return ""; // Do not load a pacs prim as a mesh...
|
return ""; // Do not load a pacs prim as a mesh...
|
||||||
}
|
}
|
||||||
|
@ -266,8 +265,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig)
|
||||||
string sShapeName = ig->getShapeName(k);
|
string sShapeName = ig->getShapeName(k);
|
||||||
if (sShapeName.rfind('.') == string::npos) continue;
|
if (sShapeName.rfind('.') == string::npos) continue;
|
||||||
|
|
||||||
string sExt = sShapeName.substr(sShapeName.rfind('.')+1,sShapeName.size());
|
string sExt = toLower(sShapeName.substr(sShapeName.rfind('.')+1,sShapeName.size()));
|
||||||
sExt = strlwr(sExt);
|
|
||||||
if (sExt != "pacs_prim") continue;
|
if (sExt != "pacs_prim") continue;
|
||||||
|
|
||||||
// Check if the pacs_prim is a door detection
|
// Check if the pacs_prim is a door detection
|
||||||
|
@ -349,7 +347,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig)
|
||||||
case SDoor::Matis3PartBourgeon:
|
case SDoor::Matis3PartBourgeon:
|
||||||
{
|
{
|
||||||
string sDebug = ig->getShapeName(i);
|
string sDebug = ig->getShapeName(i);
|
||||||
sDebug = strlwr(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
|
sDebug = toLower(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
|
||||||
if (sDebug == "gauche")
|
if (sDebug == "gauche")
|
||||||
pDoor->Instances[0] = i;
|
pDoor->Instances[0] = i;
|
||||||
else if (sDebug == "droite")
|
else if (sDebug == "droite")
|
||||||
|
@ -362,7 +360,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig)
|
||||||
case SDoor::Zorai2Part:
|
case SDoor::Zorai2Part:
|
||||||
{
|
{
|
||||||
string sDebug = ig->getShapeName(i);
|
string sDebug = ig->getShapeName(i);
|
||||||
sDebug = strlwr(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
|
sDebug = toLower(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
|
||||||
if (sDebug == "gauche")
|
if (sDebug == "gauche")
|
||||||
pDoor->Instances[0] = i;
|
pDoor->Instances[0] = i;
|
||||||
else if (sDebug == "droite")
|
else if (sDebug == "droite")
|
||||||
|
|
|
@ -205,7 +205,7 @@ void CEntityAnimationManager::load(NLMISC::IProgressCallback &/* progress */, bo
|
||||||
for (uint32 i = 0; i < pASLS->AnimSetList.size(); ++i)
|
for (uint32 i = 0; i < pASLS->AnimSetList.size(); ++i)
|
||||||
{
|
{
|
||||||
CAnimationSet as;
|
CAnimationSet as;
|
||||||
string sTmp = strlwr(pASLS->AnimSetList[i].Name);
|
string sTmp = toLower(pASLS->AnimSetList[i].Name);
|
||||||
sTmp = sTmp.substr(0,sTmp.rfind('.'));
|
sTmp = sTmp.substr(0,sTmp.rfind('.'));
|
||||||
pair<map<string,CAnimationSet>::iterator, bool> it;
|
pair<map<string,CAnimationSet>::iterator, bool> it;
|
||||||
it = _AnimSet.insert(pair<string,CAnimationSet>(sTmp,as));
|
it = _AnimSet.insert(pair<string,CAnimationSet>(sTmp,as));
|
||||||
|
|
|
@ -520,7 +520,7 @@ void CGroundFXManager::update(const NLMISC::CVectorD &camPos)
|
||||||
}
|
}
|
||||||
if (!fxName.empty())
|
if (!fxName.empty())
|
||||||
{
|
{
|
||||||
stdFXName = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(fxName));
|
stdFXName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fxName));
|
||||||
}
|
}
|
||||||
// is an fx already attached to the entity ?
|
// is an fx already attached to the entity ?
|
||||||
if (_SortedInstances[k]->HasFX)
|
if (_SortedInstances[k]->HasFX)
|
||||||
|
|
|
@ -197,7 +197,7 @@ void CIGCallback::CIGInstance::instanceGroupAdded()
|
||||||
uint numInstances = _IG->getNumInstance();
|
uint numInstances = _IG->getNumInstance();
|
||||||
for(uint k = 0; k < numInstances; ++k)
|
for(uint k = 0; k < numInstances; ++k)
|
||||||
{
|
{
|
||||||
TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(_IG->getShapeName(k))));
|
TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(_IG->getShapeName(k))));
|
||||||
if (pbIt != PacsPrims.end())
|
if (pbIt != PacsPrims.end())
|
||||||
{
|
{
|
||||||
// compute orientation and position
|
// compute orientation and position
|
||||||
|
|
|
@ -505,8 +505,7 @@ void checkDriverVersion()
|
||||||
uint i;
|
uint i;
|
||||||
for (i=0; i< sizeofarray(driversVersion); i++)
|
for (i=0; i< sizeofarray(driversVersion); i++)
|
||||||
{
|
{
|
||||||
string lwr = deviceName;
|
string lwr = toLower(deviceName);
|
||||||
strlwr(lwr);
|
|
||||||
if ((lwr.find (driversTest[i])!=string::npos) && (driversNTest[i]==NULL || lwr.find (driversNTest[i])==string::npos))
|
if ((lwr.find (driversTest[i])!=string::npos) && (driversNTest[i]==NULL || lwr.find (driversNTest[i])==string::npos))
|
||||||
{
|
{
|
||||||
if (driverVersion < driversVersion[i])
|
if (driverVersion < driversVersion[i])
|
||||||
|
@ -1290,7 +1289,7 @@ void initBotObjectSelection()
|
||||||
{
|
{
|
||||||
// IS the item a valid one ?
|
// IS the item a valid one ?
|
||||||
CSheetId itemId;
|
CSheetId itemId;
|
||||||
if(itemId.buildSheetId(NLMISC::strlwr(strShape)))
|
if(itemId.buildSheetId(NLMISC::toLower(strShape)))
|
||||||
{
|
{
|
||||||
// Get this item sheet ?
|
// Get this item sheet ?
|
||||||
CItemSheet *itemSheet= dynamic_cast<CItemSheet *>(SheetMngr.get(itemId));
|
CItemSheet *itemSheet= dynamic_cast<CItemSheet *>(SheetMngr.get(itemId));
|
||||||
|
|
|
@ -333,29 +333,29 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
if (NLMISC::strlwr(prop.str()) == "item")
|
if (NLMISC::toLower(prop.str()) == "item")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Item;
|
_Type = CCtrlSheetInfo::SheetType_Item;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "pact")
|
else if (NLMISC::toLower(prop.str()) == "pact")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Pact;
|
_Type = CCtrlSheetInfo::SheetType_Pact;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "skill")
|
else if (NLMISC::toLower(prop.str()) == "skill")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Skill;
|
_Type = CCtrlSheetInfo::SheetType_Skill;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "auto")
|
else if (NLMISC::toLower(prop.str()) == "auto")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Auto;
|
_Type = CCtrlSheetInfo::SheetType_Auto;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "macro")
|
else if (NLMISC::toLower(prop.str()) == "macro")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Macro;
|
_Type = CCtrlSheetInfo::SheetType_Macro;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "guild_flag")
|
else if (NLMISC::toLower(prop.str()) == "guild_flag")
|
||||||
_Type = CCtrlSheetInfo::SheetType_GuildFlag;
|
_Type = CCtrlSheetInfo::SheetType_GuildFlag;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "mission")
|
else if (NLMISC::toLower(prop.str()) == "mission")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Mission;
|
_Type = CCtrlSheetInfo::SheetType_Mission;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "sbrick")
|
else if (NLMISC::toLower(prop.str()) == "sbrick")
|
||||||
_Type = CCtrlSheetInfo::SheetType_SBrick;
|
_Type = CCtrlSheetInfo::SheetType_SBrick;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "sphraseid")
|
else if (NLMISC::toLower(prop.str()) == "sphraseid")
|
||||||
_Type = CCtrlSheetInfo::SheetType_SPhraseId;
|
_Type = CCtrlSheetInfo::SheetType_SPhraseId;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "sphrase")
|
else if (NLMISC::toLower(prop.str()) == "sphrase")
|
||||||
_Type = CCtrlSheetInfo::SheetType_SPhrase;
|
_Type = CCtrlSheetInfo::SheetType_SPhrase;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "elevator_destination")
|
else if (NLMISC::toLower(prop.str()) == "elevator_destination")
|
||||||
_Type = CCtrlSheetInfo::SheetType_ElevatorDestination;
|
_Type = CCtrlSheetInfo::SheetType_ElevatorDestination;
|
||||||
else if (NLMISC::strlwr(prop.str()) == "outpost_building")
|
else if (NLMISC::toLower(prop.str()) == "outpost_building")
|
||||||
_Type = CCtrlSheetInfo::SheetType_OutpostBuilding;
|
_Type = CCtrlSheetInfo::SheetType_OutpostBuilding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,8 +363,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
string TxName = (const char *) prop;
|
string TxName = toLower((const char *) prop);
|
||||||
TxName = strlwr (TxName);
|
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
_DispNoSheetBmpId = rVR.getTextureIdFromName (TxName);
|
_DispNoSheetBmpId = rVR.getTextureIdFromName (TxName);
|
||||||
}
|
}
|
||||||
|
@ -410,27 +409,23 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_l" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_l" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
string tmp = (const char *) prop;
|
_ListMenuLeft = toLower((const char *) prop);
|
||||||
_ListMenuLeft = strlwr(tmp);
|
|
||||||
}
|
}
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
string tmp = (const char *) prop;
|
_ListMenuRight = toLower((const char *) prop);
|
||||||
_ListMenuRight = strlwr(tmp);
|
|
||||||
}
|
}
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r_empty_slot" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r_empty_slot" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
string tmp = (const char *) prop;
|
_ListMenuRightEmptySlot = toLower((const char *) prop);
|
||||||
_ListMenuRightEmptySlot = strlwr(tmp);
|
|
||||||
}
|
}
|
||||||
// list menu on both clicks
|
// list menu on both clicks
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_b" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_b" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
string tmp = (const char *) prop;
|
setListMenuBoth(toLower((const char *) prop));
|
||||||
setListMenuBoth(strlwr(tmp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// _BrickTypeBitField
|
// _BrickTypeBitField
|
||||||
|
@ -1745,7 +1740,7 @@ void CDBCtrlSheet::resetCharBitmaps()
|
||||||
void CDBCtrlSheet::setupCharBitmaps(sint32 maxW, sint32 maxLine, sint32 maxWChar, bool topDown)
|
void CDBCtrlSheet::setupCharBitmaps(sint32 maxW, sint32 maxLine, sint32 maxWChar, bool topDown)
|
||||||
{
|
{
|
||||||
// Use the optString for the Macro name
|
// Use the optString for the Macro name
|
||||||
_OptString = strlwr(_OptString);
|
_OptString = toLower(_OptString);
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ void CCompassTarget::serial(NLMISC::IStream &f)
|
||||||
// for the name, try to save a string identifier if possible, because language may be changed between
|
// for the name, try to save a string identifier if possible, because language may be changed between
|
||||||
// save & reload
|
// save & reload
|
||||||
f.serial(Name);
|
f.serial(Name);
|
||||||
std::string language = strlwr(ClientCfg.LanguageCode);
|
std::string language = toLower(ClientCfg.LanguageCode);
|
||||||
f.serial(language);
|
f.serial(language);
|
||||||
f.serialEnum(_Type);
|
f.serialEnum(_Type);
|
||||||
if (_Type == PosTracker)
|
if (_Type == PosTracker)
|
||||||
|
@ -100,7 +100,7 @@ void CCompassTarget::serial(NLMISC::IStream &f)
|
||||||
// reset the compass to north to avoid incoherency
|
// reset the compass to north to avoid incoherency
|
||||||
if (f.isReading())
|
if (f.isReading())
|
||||||
{
|
{
|
||||||
if (strlwr(ClientCfg.LanguageCode) != language)
|
if (toLower(ClientCfg.LanguageCode) != language)
|
||||||
{
|
{
|
||||||
*this = CCompassTarget();
|
*this = CCompassTarget();
|
||||||
}
|
}
|
||||||
|
|
|
@ -729,7 +729,7 @@ bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetT
|
||||||
{
|
{
|
||||||
|
|
||||||
LIFT_ICONS::TLiftIcon li = (LIFT_ICONS::TLiftIcon)(icon & UINT64_CONSTANT(0x7FFFFFFFFFFFFFFF));
|
LIFT_ICONS::TLiftIcon li = (LIFT_ICONS::TLiftIcon)(icon & UINT64_CONSTANT(0x7FFFFFFFFFFFFFFF));
|
||||||
string str = strlwr(LIFT_ICONS::toString(li));
|
string str = toLower(LIFT_ICONS::toString(li));
|
||||||
Ctrl->setType(CCtrlSheetInfo::SheetType_Teleport_Location);
|
Ctrl->setType(CCtrlSheetInfo::SheetType_Teleport_Location);
|
||||||
Ctrl->setSlot("asc_"+str+".tga");
|
Ctrl->setSlot("asc_"+str+".tga");
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name"));
|
CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name"));
|
||||||
string animName;
|
string animName;
|
||||||
if (ptr)
|
if (ptr)
|
||||||
animName = strlwr (CFile::getFilenameWithoutExtension(ptr.str()));
|
animName = toLower(CFile::getFilenameWithoutExtension(ptr.str()));
|
||||||
|
|
||||||
if (!animName.empty())
|
if (!animName.empty())
|
||||||
{
|
{
|
||||||
|
@ -1084,11 +1084,9 @@ bool CInterface3DIG::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"rot");
|
ptr = xmlGetProp (cur, (xmlChar*)"rot");
|
||||||
if (ptr) _Rot = convertVector(ptr);
|
if (ptr) _Rot = convertVector(ptr);
|
||||||
|
|
||||||
string name;
|
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
||||||
if (ptr) name = (const char*)ptr;
|
if (ptr) _Name = toLower((const char*)ptr);
|
||||||
|
|
||||||
_Name = strlwr(name);
|
|
||||||
_IG = UInstanceGroup::createInstanceGroup(_Name);
|
_IG = UInstanceGroup::createInstanceGroup(_Name);
|
||||||
if (_IG == NULL)
|
if (_IG == NULL)
|
||||||
return true; // Create anyway
|
return true; // Create anyway
|
||||||
|
@ -1202,7 +1200,7 @@ std::string CInterface3DIG::getName() const
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void CInterface3DIG::setName (const std::string &ht)
|
void CInterface3DIG::setName (const std::string &ht)
|
||||||
{
|
{
|
||||||
string lwrname = strlwr(ht);
|
string lwrname = toLower(ht);
|
||||||
if (lwrname != _Name)
|
if (lwrname != _Name)
|
||||||
{
|
{
|
||||||
CInterface3DScene *pI3DS = dynamic_cast<CInterface3DScene*>(_Parent);
|
CInterface3DScene *pI3DS = dynamic_cast<CInterface3DScene*>(_Parent);
|
||||||
|
@ -1248,11 +1246,9 @@ bool CInterface3DShape::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"rot");
|
ptr = xmlGetProp (cur, (xmlChar*)"rot");
|
||||||
if (ptr) _Rot = convertVector(ptr);
|
if (ptr) _Rot = convertVector(ptr);
|
||||||
|
|
||||||
string name;
|
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
||||||
if (ptr) name = (const char*)ptr;
|
if (ptr) _Name = toLower((const char*)ptr);
|
||||||
|
|
||||||
_Name = strlwr(name);
|
|
||||||
_Instance = parentGroup->getScene()->createInstance(_Name);
|
_Instance = parentGroup->getScene()->createInstance(_Name);
|
||||||
if (_Instance.empty())
|
if (_Instance.empty())
|
||||||
return false;
|
return false;
|
||||||
|
@ -1529,11 +1525,8 @@ bool CInterface3DFX::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"rot");
|
ptr = xmlGetProp (cur, (xmlChar*)"rot");
|
||||||
if (ptr) _Rot = convertVector(ptr);
|
if (ptr) _Rot = convertVector(ptr);
|
||||||
|
|
||||||
string name;
|
|
||||||
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
||||||
if (ptr) name = (const char*)ptr;
|
if (ptr) _Name = toLower((const char*)ptr);
|
||||||
|
|
||||||
_Name = strlwr(name);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2280,7 +2280,7 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat
|
||||||
CRGBA color = CRGBA::White;
|
CRGBA color = CRGBA::White;
|
||||||
|
|
||||||
|
|
||||||
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(strlwr(cat));
|
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat));
|
||||||
if (it != ClientCfg.SystemInfoParams.end())
|
if (it != ClientCfg.SystemInfoParams.end())
|
||||||
{
|
{
|
||||||
mode = it->second.Mode;
|
mode = it->second.Mode;
|
||||||
|
@ -2315,7 +2315,7 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat
|
||||||
CRGBA CInterfaceManager::getSystemInfoColor(const std::string &cat)
|
CRGBA CInterfaceManager::getSystemInfoColor(const std::string &cat)
|
||||||
{
|
{
|
||||||
CRGBA col = CRGBA::White;
|
CRGBA col = CRGBA::White;
|
||||||
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(strlwr(cat));
|
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat));
|
||||||
if (it != ClientCfg.SystemInfoParams.end())
|
if (it != ClientCfg.SystemInfoParams.end())
|
||||||
col = it->second.Color;
|
col = it->second.Color;
|
||||||
return col;
|
return col;
|
||||||
|
|
|
@ -3488,7 +3488,7 @@ CItemImage &CInventoryManager::getServerItem(uint inv, uint index)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CInventoryManager::TInvType CInventoryManager::invTypeFromString(const string &str)
|
CInventoryManager::TInvType CInventoryManager::invTypeFromString(const string &str)
|
||||||
{
|
{
|
||||||
string sTmp = strlwr(str);
|
string sTmp = toLower(str);
|
||||||
if (sTmp == "inv_bag") return InvBag;
|
if (sTmp == "inv_bag") return InvBag;
|
||||||
if (sTmp == "inv_pa0") return InvPA0;
|
if (sTmp == "inv_pa0") return InvPA0;
|
||||||
if (sTmp == "inv_pa1") return InvPA1;
|
if (sTmp == "inv_pa1") return InvPA1;
|
||||||
|
|
|
@ -243,7 +243,7 @@ public:
|
||||||
while (*bufferPtr)
|
while (*bufferPtr)
|
||||||
{
|
{
|
||||||
// Concat the directory name with the filename
|
// Concat the directory name with the filename
|
||||||
if (strlwr (CFile::getExtension(bufferPtr)) == "m3u")
|
if (toLower(CFile::getExtension(bufferPtr)) == "m3u")
|
||||||
playlists.push_back (path+bufferPtr);
|
playlists.push_back (path+bufferPtr);
|
||||||
else
|
else
|
||||||
filenames.push_back (path+bufferPtr);
|
filenames.push_back (path+bufferPtr);
|
||||||
|
|
|
@ -155,10 +155,10 @@ bool CPeopleList::create(const CPeopleListDesc &desc, const CChatWindowDesc *cha
|
||||||
//==================================================================
|
//==================================================================
|
||||||
sint CPeopleList::getIndexFromName(const ucstring &name) const
|
sint CPeopleList::getIndexFromName(const ucstring &name) const
|
||||||
{
|
{
|
||||||
string sNameIn = strlwr(name.toString());
|
string sNameIn = toLower(name.toString());
|
||||||
for(uint k = 0; k < _Peoples.size(); ++k)
|
for(uint k = 0; k < _Peoples.size(); ++k)
|
||||||
{
|
{
|
||||||
string sPeopleName = strlwr(_Peoples[k].getName().toString());
|
string sPeopleName = toLower(_Peoples[k].getName().toString());
|
||||||
if (sPeopleName == sNameIn) return k;
|
if (sPeopleName == sNameIn) return k;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -404,8 +404,7 @@ void CSBrickManager::compileBrickProperties()
|
||||||
string::size_type pos = prop.Text.find(':');
|
string::size_type pos = prop.Text.find(':');
|
||||||
if (pos != string::npos)
|
if (pos != string::npos)
|
||||||
{
|
{
|
||||||
string key = prop.Text.substr(0, pos);
|
string key = toLower(prop.Text.substr(0, pos));
|
||||||
strlwr(key);
|
|
||||||
string value = prop.Text.substr(pos + 1);
|
string value = prop.Text.substr(pos + 1);
|
||||||
// get key id.
|
// get key id.
|
||||||
if (_BrickPropIdMap.find(key) == _BrickPropIdMap.end())
|
if (_BrickPropIdMap.find(key) == _BrickPropIdMap.end())
|
||||||
|
@ -506,7 +505,7 @@ void CSBrickManager::compileBrickProperties()
|
||||||
// Parse all the brick properties if match the key
|
// Parse all the brick properties if match the key
|
||||||
float value= 0.f;
|
float value= 0.f;
|
||||||
// get the wanted prop id
|
// get the wanted prop id
|
||||||
strlwr(key);
|
key = toLower(key);
|
||||||
uint propId= getBrickPropId(key);
|
uint propId= getBrickPropId(key);
|
||||||
// if propid exist
|
// if propid exist
|
||||||
if(propId)
|
if(propId)
|
||||||
|
|
|
@ -59,8 +59,7 @@ bool CViewBitmapFaberMp::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
_TextureNoItemName = (const char *) prop;
|
_TextureNoItemName = toLower((const char *) prop);
|
||||||
_TextureNoItemName = strlwr (_TextureNoItemName);
|
|
||||||
_TextureNoItemId = -2;
|
_TextureNoItemId = -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,7 @@ bool CViewRadar::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)spotTextureNames[i] );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)spotTextureNames[i] );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
txName = (const char *) prop;
|
txName = toLower((const char *) prop);
|
||||||
txName = strlwr (txName);
|
|
||||||
}
|
}
|
||||||
_SpotDescriptions[i].TextureId.setTexture(txName.c_str());
|
_SpotDescriptions[i].TextureId.setTexture(txName.c_str());
|
||||||
rVR.getTextureSizeFromId (_SpotDescriptions[i].TextureId, _SpotDescriptions[i].TxW, _SpotDescriptions[i].TxH);
|
rVR.getTextureSizeFromId (_SpotDescriptions[i].TextureId, _SpotDescriptions[i].TxW, _SpotDescriptions[i].TxH);
|
||||||
|
@ -105,8 +104,7 @@ bool CViewRadar::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)spotMiniTextureNames[i] );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)spotMiniTextureNames[i] );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
txName = (const char *) prop;
|
txName = toLower((const char *) prop);
|
||||||
txName = strlwr (txName);
|
|
||||||
}
|
}
|
||||||
_SpotDescriptions[i].MiniTextureId.setTexture(txName.c_str());
|
_SpotDescriptions[i].MiniTextureId.setTexture(txName.c_str());
|
||||||
rVR.getTextureSizeFromId (_SpotDescriptions[i].MiniTextureId, _SpotDescriptions[i].MTxW, _SpotDescriptions[i].MTxH);
|
rVR.getTextureSizeFromId (_SpotDescriptions[i].MiniTextureId, _SpotDescriptions[i].MTxW, _SpotDescriptions[i].MTxH);
|
||||||
|
|
|
@ -108,7 +108,7 @@ void CMeshCameraColManager::instanceGroupAdded(NL3D::UInstanceGroup *ig)
|
||||||
bool avoidCollisionInside= ig->dontCastShadowForInterior(i);
|
bool avoidCollisionInside= ig->dontCastShadowForInterior(i);
|
||||||
bool avoidCollisionOutside= ig->dontCastShadowForExterior(i);
|
bool avoidCollisionOutside= ig->dontCastShadowForExterior(i);
|
||||||
// very special patch for the matis serre (grrrrrrrrrrrrr)
|
// very special patch for the matis serre (grrrrrrrrrrrrr)
|
||||||
avoidCollisionOutside= avoidCollisionOutside || strlwr(shapeName)== "ma_serre_interieur.shape";
|
avoidCollisionOutside= avoidCollisionOutside || toLower(shapeName)== "ma_serre_interieur.shape";
|
||||||
|
|
||||||
// then send the result to the collision manager, and keep the mesh col id if succeed
|
// then send the result to the collision manager, and keep the mesh col id if succeed
|
||||||
uint32 meshId= CollisionManager->addMeshInstanceCollision(colMesh, mat, avoidCollisionInside, avoidCollisionOutside);
|
uint32 meshId= CollisionManager->addMeshInstanceCollision(colMesh, mat, avoidCollisionInside, avoidCollisionOutside);
|
||||||
|
|
|
@ -692,7 +692,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
|
||||||
if (!stringCategory.empty() && stringCategory != "SYS")
|
if (!stringCategory.empty() && stringCategory != "SYS")
|
||||||
{
|
{
|
||||||
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
|
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
|
||||||
it = ClientCfg.SystemInfoParams.find(strlwr(stringCategory));
|
it = ClientCfg.SystemInfoParams.find(toLower(stringCategory));
|
||||||
if (it != ClientCfg.SystemInfoParams.end())
|
if (it != ClientCfg.SystemInfoParams.end())
|
||||||
{
|
{
|
||||||
col = it->second.Color;
|
col = it->second.Color;
|
||||||
|
@ -723,7 +723,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
|
||||||
if( !stringCategory.empty() )
|
if( !stringCategory.empty() )
|
||||||
{
|
{
|
||||||
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
|
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
|
||||||
it = ClientCfg.SystemInfoParams.find( strlwr(stringCategory) );
|
it = ClientCfg.SystemInfoParams.find( toLower(stringCategory) );
|
||||||
if( it != ClientCfg.SystemInfoParams.end() )
|
if( it != ClientCfg.SystemInfoParams.end() )
|
||||||
{
|
{
|
||||||
if( !(*it).second.SysInfoFxName.empty() )
|
if( !(*it).second.SysInfoFxName.empty() )
|
||||||
|
|
|
@ -99,7 +99,7 @@ void COutpost::initOutpost ()
|
||||||
for (i=0; i<RZ_MAX_BUILDING_PER_OUTPOST; i++)
|
for (i=0; i<RZ_MAX_BUILDING_PER_OUTPOST; i++)
|
||||||
{
|
{
|
||||||
// Put the ZC pacs_prim
|
// Put the ZC pacs_prim
|
||||||
TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(ClientCfg.ZCPacsPrim)));
|
TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(ClientCfg.ZCPacsPrim)));
|
||||||
if (pbIt != PacsPrims.end())
|
if (pbIt != PacsPrims.end())
|
||||||
{
|
{
|
||||||
// Build the building matrix
|
// Build the building matrix
|
||||||
|
|
|
@ -142,7 +142,7 @@ UInstanceGroup *getCluster(const UGlobalPosition &gp)
|
||||||
if(strPos.empty())
|
if(strPos.empty())
|
||||||
return 0;
|
return 0;
|
||||||
// try to find the ig in the loaded ig map
|
// try to find the ig in the loaded ig map
|
||||||
std::map<std::string, UInstanceGroup *>::const_iterator igIt = IGLoaded.find(strlwr(strPos));
|
std::map<std::string, UInstanceGroup *>::const_iterator igIt = IGLoaded.find(toLower(strPos));
|
||||||
if (igIt != IGLoaded.end())
|
if (igIt != IGLoaded.end())
|
||||||
{
|
{
|
||||||
return igIt->second;
|
return igIt->second;
|
||||||
|
@ -188,7 +188,7 @@ void releaseLandscapeIGCallbacks()
|
||||||
|
|
||||||
void addPacsPrim(const std::string &fileName)
|
void addPacsPrim(const std::string &fileName)
|
||||||
{
|
{
|
||||||
std::string ppName = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(fileName));
|
std::string ppName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fileName));
|
||||||
if (PacsPrims.find(ppName) != PacsPrims.end())
|
if (PacsPrims.find(ppName) != PacsPrims.end())
|
||||||
{
|
{
|
||||||
nlwarning(("Pacs primitive " + ppName + " already has been inserted").c_str());
|
nlwarning(("Pacs primitive " + ppName + " already has been inserted").c_str());
|
||||||
|
|
|
@ -281,7 +281,7 @@ CBitmap *buildSharedBitmap(const std::string &filename,
|
||||||
{
|
{
|
||||||
alreadyBuilt = false;
|
alreadyBuilt = false;
|
||||||
if (filename.empty()) return NULL;
|
if (filename.empty()) return NULL;
|
||||||
std::string lcBMFilename = strlwr(CFile::getFilenameWithoutExtension(filename));
|
std::string lcBMFilename = toLower(CFile::getFilenameWithoutExtension(filename));
|
||||||
std::map<std::string, CBitmap *>::iterator it = bitmapByName.find(lcBMFilename);
|
std::map<std::string, CBitmap *>::iterator it = bitmapByName.find(lcBMFilename);
|
||||||
if (it != bitmapByName.end())
|
if (it != bitmapByName.end())
|
||||||
{
|
{
|
||||||
|
|
|
@ -291,10 +291,8 @@ bool CStreamableIG::setIG(uint ig, const std::string &name, const std::string &p
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load this IG
|
// Load this IG
|
||||||
_IGs[ig].Name = NLMISC::CFile::getFilenameWithoutExtension(name);
|
_IGs[ig].Name = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(name));
|
||||||
_IGs[ig].ParentName = NLMISC::CFile::getFilenameWithoutExtension(parentName);
|
_IGs[ig].ParentName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(parentName));
|
||||||
NLMISC::strlwr(_IGs[ig].Name);
|
|
||||||
NLMISC::strlwr(_IGs[ig].ParentName);
|
|
||||||
_IGs[ig].IG = NULL;
|
_IGs[ig].IG = NULL;
|
||||||
_IGs[ig].Loading = false;
|
_IGs[ig].Loading = false;
|
||||||
_Linked = false;
|
_Linked = false;
|
||||||
|
@ -308,10 +306,8 @@ void CStreamableIG::addIG(const std::string &name,const std::string &parentName,
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_StremableIG)
|
H_AUTO_USE(RZ_StremableIG)
|
||||||
_IGs.push_back(CIGNode ());
|
_IGs.push_back(CIGNode ());
|
||||||
_IGs.back().Name = NLMISC::CFile::getFilenameWithoutExtension(name);
|
_IGs.back().Name = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(name));
|
||||||
_IGs.back().ParentName = NLMISC::CFile::getFilenameWithoutExtension(parentName);
|
_IGs.back().ParentName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(parentName));
|
||||||
NLMISC::strlwr(_IGs.back().Name);
|
|
||||||
NLMISC::strlwr(_IGs.back().ParentName);
|
|
||||||
_IGs.back().IG = NULL;
|
_IGs.back().IG = NULL;
|
||||||
_IGs.back().Loading = false;
|
_IGs.back().Loading = false;
|
||||||
_IGs.back().Pos = pos;
|
_IGs.back().Pos = pos;
|
||||||
|
@ -376,7 +372,7 @@ void CStreamableIG::addLoadedIGToMap()
|
||||||
if (_IGs[k].IG && _IGs[k].IG != (NL3D::UInstanceGroup *)-1) // is this a successfully loaded ig ?
|
if (_IGs[k].IG && _IGs[k].IG != (NL3D::UInstanceGroup *)-1) // is this a successfully loaded ig ?
|
||||||
{
|
{
|
||||||
// insert the new ig if it hasn't before..
|
// insert the new ig if it hasn't before..
|
||||||
if( _IGMap->insert(std::make_pair(NLMISC::strlwr(_IGs[k].Name), _IGs[k].IG)).second )
|
if( _IGMap->insert(std::make_pair(NLMISC::toLower(_IGs[k].Name), _IGs[k].IG)).second )
|
||||||
// if inserted, must notify IG Added, else already notifiyed by loadAsync()
|
// if inserted, must notify IG Added, else already notifiyed by loadAsync()
|
||||||
this->notifyIGAdded(_IGs[k].IG);
|
this->notifyIGAdded(_IGs[k].IG);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1413,8 +1413,7 @@ const ucchar * CStringManagerClient::getSpecialWord(const std::string &label, bo
|
||||||
|
|
||||||
// avoid case problems
|
// avoid case problems
|
||||||
static std::string lwrLabel;
|
static std::string lwrLabel;
|
||||||
lwrLabel = label;
|
lwrLabel = toLower(label);
|
||||||
strlwr(lwrLabel);
|
|
||||||
|
|
||||||
if (_SpecItem_MemoryCompressed)
|
if (_SpecItem_MemoryCompressed)
|
||||||
{
|
{
|
||||||
|
@ -1464,8 +1463,7 @@ const ucchar * CStringManagerClient::getSpecialDesc(const std::string &label)
|
||||||
|
|
||||||
// avoid case problems
|
// avoid case problems
|
||||||
static std::string lwrLabel;
|
static std::string lwrLabel;
|
||||||
lwrLabel= label;
|
lwrLabel = toLower(label);
|
||||||
strlwr(lwrLabel);
|
|
||||||
|
|
||||||
if (_SpecItem_MemoryCompressed)
|
if (_SpecItem_MemoryCompressed)
|
||||||
{
|
{
|
||||||
|
@ -1498,8 +1496,7 @@ const ucchar * CStringManagerClient::getSpecialDesc2(const std::string &label)
|
||||||
|
|
||||||
// avoid case problems
|
// avoid case problems
|
||||||
static std::string lwrLabel;
|
static std::string lwrLabel;
|
||||||
lwrLabel= label;
|
lwrLabel = toLower(label);
|
||||||
strlwr(lwrLabel);
|
|
||||||
|
|
||||||
if (_SpecItem_MemoryCompressed)
|
if (_SpecItem_MemoryCompressed)
|
||||||
{
|
{
|
||||||
|
@ -1703,8 +1700,7 @@ void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring
|
||||||
|
|
||||||
// avoid case problems
|
// avoid case problems
|
||||||
static std::string lwrLabel;
|
static std::string lwrLabel;
|
||||||
lwrLabel= label;
|
lwrLabel = toLower(label);
|
||||||
strlwr(lwrLabel);
|
|
||||||
|
|
||||||
if (_SpecItem_MemoryCompressed)
|
if (_SpecItem_MemoryCompressed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -359,8 +359,7 @@ void CStaticFames::loadStaticFame( const string& filename )
|
||||||
// 1st, build the index table
|
// 1st, build the index table
|
||||||
for (uint i=1; i<ws.size(); ++i)
|
for (uint i=1; i<ws.size(); ++i)
|
||||||
{
|
{
|
||||||
string name = ws.getData(i, 0).toString();
|
string name = toLower(ws.getData(i, 0).toString());
|
||||||
name = strlwr(name);
|
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
break;
|
break;
|
||||||
_FactionNameIndex.insert(make_pair(CStringMapper::map(name), i-1));
|
_FactionNameIndex.insert(make_pair(CStringMapper::map(name), i-1));
|
||||||
|
@ -376,8 +375,7 @@ void CStaticFames::loadStaticFame( const string& filename )
|
||||||
// 2nd check the table structure
|
// 2nd check the table structure
|
||||||
for (uint i=2; i<ws.ColCount; ++i)
|
for (uint i=2; i<ws.ColCount; ++i)
|
||||||
{
|
{
|
||||||
string name = ws.getData(0, i).toString();
|
string name = toLower(ws.getData(0, i).toString());
|
||||||
name = strlwr(name);
|
|
||||||
|
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
{
|
{
|
||||||
|
@ -608,8 +606,7 @@ uint CStaticFames::getFactionIndex(NLMISC::TStringId factionName)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
uint CStaticFames::getFactionIndex(const std::string &factionName)
|
uint CStaticFames::getFactionIndex(const std::string &factionName)
|
||||||
{
|
{
|
||||||
string n = strlwr(factionName);
|
return getFactionIndex(CStringMapper::map(toLower(factionName)));
|
||||||
return getFactionIndex(CStringMapper::map(n));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -667,11 +664,7 @@ sint32 CStaticFames::getStaticFame(NLMISC::TStringId faction1, NLMISC::TStringId
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
sint32 CStaticFames::getStaticFame(const std::string &faction1, const std::string &faction2)
|
sint32 CStaticFames::getStaticFame(const std::string &faction1, const std::string &faction2)
|
||||||
{
|
{
|
||||||
string n1, n2;
|
return getStaticFame(CStringMapper::map(toLower(faction1)), CStringMapper::map(toLower(faction2)));
|
||||||
n1 = strlwr(faction1);
|
|
||||||
n2 = strlwr(faction2);
|
|
||||||
|
|
||||||
return getStaticFame(CStringMapper::map(n1), CStringMapper::map(n2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -35,7 +35,7 @@ void CWeatherManager::init(const std::vector<const CWeatherSetupSheetBase *> &sh
|
||||||
{
|
{
|
||||||
if (sheets[k])
|
if (sheets[k])
|
||||||
{
|
{
|
||||||
std::string id = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(sheetNames[k]));
|
std::string id = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(sheetNames[k]));
|
||||||
CWeatherSetup *ws = newWeatherSetup();
|
CWeatherSetup *ws = newWeatherSetup();
|
||||||
if (ws)
|
if (ws)
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ void CWeatherManager::release()
|
||||||
//================================================================================================
|
//================================================================================================
|
||||||
const CWeatherSetup *CWeatherManager::getSetup(const char *name) const
|
const CWeatherSetup *CWeatherManager::getSetup(const char *name) const
|
||||||
{
|
{
|
||||||
std::string id = NLMISC::strlwr(CFile::getFilenameWithoutExtension(name));
|
std::string id = NLMISC::toLower(CFile::getFilenameWithoutExtension(name));
|
||||||
TWeatherSetupMap::const_iterator it = _WeatherSetupMap.find(id);
|
TWeatherSetupMap::const_iterator it = _WeatherSetupMap.find(id);
|
||||||
if (it == _WeatherSetupMap.end()) return NULL;
|
if (it == _WeatherSetupMap.end()) return NULL;
|
||||||
return it->second;
|
return it->second;
|
||||||
|
|
|
@ -85,7 +85,7 @@ void CWeatherStateSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
GetWeatherFormValue(item, fxName, "FXName");
|
GetWeatherFormValue(item, fxName, "FXName");
|
||||||
if (!fxName.empty())
|
if (!fxName.empty())
|
||||||
{
|
{
|
||||||
fxName = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(fxName));
|
fxName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fxName));
|
||||||
if (!fxName.empty())
|
if (!fxName.empty())
|
||||||
{
|
{
|
||||||
FXInfos.resize(1);
|
FXInfos.resize(1);
|
||||||
|
@ -192,7 +192,7 @@ void CWeatherSetupSheetBase::build(const NLGEORGES::UFormElm &item)
|
||||||
CloudState.build(item);
|
CloudState.build(item);
|
||||||
std::string setupName;
|
std::string setupName;
|
||||||
GetWeatherFormValue(item, setupName, "SetupName");
|
GetWeatherFormValue(item, setupName, "SetupName");
|
||||||
SetupName = NLMISC::CStringMapper::map(NLMISC::strlwr(setupName));
|
SetupName = NLMISC::CStringMapper::map(NLMISC::toLower(setupName));
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================
|
//==================================================================================
|
||||||
|
@ -203,7 +203,7 @@ void CWeatherSetupSheetBase::serial(class NLMISC::IStream &f) throw(NLMISC::EStr
|
||||||
{
|
{
|
||||||
std::string setupName;
|
std::string setupName;
|
||||||
f.serial(setupName);
|
f.serial(setupName);
|
||||||
SetupName = NLMISC::CStringMapper::map(NLMISC::strlwr(setupName));
|
SetupName = NLMISC::CStringMapper::map(NLMISC::toLower(setupName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue