mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Replace strlwr by toLower
This commit is contained in:
parent
8875d144bc
commit
c1c836a9b3
11 changed files with 35 additions and 39 deletions
|
@ -280,11 +280,11 @@ NLMISC_COMMAND(gotoNote, "go to a note", "<id>|<text>")
|
|||
if(i != 0) tok += " ";
|
||||
tok += args[i];
|
||||
}
|
||||
tok = strlwr(tok);
|
||||
tok = toLower(tok);
|
||||
list<C3DNotes::CNote>::iterator it;
|
||||
for(it = Notes.Notes.begin(); it != Notes.Notes.end(); it++)
|
||||
{
|
||||
string note = strlwr((*it).Note);
|
||||
string note = toLower((*it).Note);
|
||||
if(note.find(tok) != string::npos)
|
||||
{
|
||||
pos = (*it).Position;
|
||||
|
|
|
@ -64,8 +64,7 @@ void CAnimationFX::buildTrack(NL3D::UAnimationSet *as)
|
|||
nlassert(Sheet != NULL);
|
||||
if (!as) return;
|
||||
if (Sheet->TrajectoryAnim.empty()) return;
|
||||
std::string animName = Sheet->TrajectoryAnim;
|
||||
NLMISC::strlwr(animName);
|
||||
std::string animName = NLMISC::toLower(Sheet->TrajectoryAnim);
|
||||
uint id = as->getAnimationIdByName(animName);
|
||||
NL3D::UAnimation *anim = NULL;
|
||||
if (id != NL3D::UAnimationSet::NotFound)
|
||||
|
|
|
@ -204,7 +204,7 @@ void CAutomatonStateSheet::build(const NLGEORGES::UFormElm &item, const string &
|
|||
for(uint mode = 0; mode<MBEHAV::NUMBER_OF_MODES; ++mode)
|
||||
{
|
||||
string animset;
|
||||
animset = NLMISC::strlwr(MBEHAV::modeToString((MBEHAV::EMode)mode));
|
||||
animset = NLMISC::toLower(MBEHAV::modeToString((MBEHAV::EMode)mode));
|
||||
if(animset != "unknown_mode")
|
||||
{
|
||||
string resultTransition;
|
||||
|
@ -495,9 +495,9 @@ void CAutomatonListSheet::build(const NLGEORGES::UFormElm &rootList)
|
|||
for(uint mode = 0; mode<MBEHAV::NUMBER_OF_MODES; ++mode)
|
||||
{
|
||||
// Get the Mode Name
|
||||
string modeName = NLMISC::strlwr(MBEHAV::modeToString((MBEHAV::EMode)mode));
|
||||
string modeName = NLMISC::toLower(MBEHAV::modeToString((MBEHAV::EMode)mode));
|
||||
// Compute the automaton name
|
||||
string filename = NLMISC::strlwr(automatonType) + "_" + modeName + ".automaton";
|
||||
string filename = NLMISC::toLower(automatonType) + "_" + modeName + ".automaton";
|
||||
// Push some information
|
||||
nlinfo("loading automaton '%s'.", filename.c_str());
|
||||
// Load the automaton's form.
|
||||
|
|
|
@ -126,7 +126,7 @@ void CCharacterSheet::readEquipment(const NLGEORGES::UFormElm &form, const strin
|
|||
string itemName;
|
||||
if(!form.getValueByName(itemName, string(key + ".Item").c_str() ))
|
||||
debug(NLMISC::toString("Key '%s.Item' not found.", key.c_str()));
|
||||
slot.IdItem = ClientSheetsStrings.add(NLMISC::strlwr(itemName));
|
||||
slot.IdItem = ClientSheetsStrings.add(NLMISC::toLower(itemName));
|
||||
|
||||
// Get the texture.
|
||||
if(!form.getValueByName(slot.Texture, string(key + ".Texture").c_str() ))
|
||||
|
@ -221,7 +221,7 @@ void CCharacterSheet::build(const NLGEORGES::UFormElm &item)
|
|||
if(AnimSetBaseName.empty())
|
||||
debug("AnimSetBaseName is Empty.");
|
||||
else
|
||||
NLMISC::strlwr(AnimSetBaseName); // Force the CASE in UPPER to not be CASE SENSITIVE.
|
||||
AnimSetBaseName = NLMISC::toLower(AnimSetBaseName); // Force the CASE in UPPER to not be CASE SENSITIVE.
|
||||
}
|
||||
else
|
||||
debug("Key '3d data.AnimSetBaseName' not found.");
|
||||
|
@ -235,7 +235,7 @@ void CCharacterSheet::build(const NLGEORGES::UFormElm &item)
|
|||
debug("Automaton is Empty.");
|
||||
// Lower Case
|
||||
else
|
||||
NLMISC::strlwr(Automaton);
|
||||
Automaton = NLMISC::toLower(Automaton);
|
||||
}
|
||||
// Key not Found
|
||||
else
|
||||
|
|
|
@ -177,28 +177,28 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
|
|||
string IconMain;
|
||||
if(!item.getValueByName (IconMain, "3d.icon"))
|
||||
debug("key '3d.icon' not found.");
|
||||
IconMain = strlwr (IconMain);
|
||||
IconMain = toLower(IconMain);
|
||||
IdIconMain = ClientSheetsStrings.add(IconMain);
|
||||
|
||||
// Get the icon associated.
|
||||
string IconBack;
|
||||
if(!item.getValueByName (IconBack, "3d.icon background"))
|
||||
debug("key '3d.icon background' not found.");
|
||||
IconBack = strlwr (IconBack);
|
||||
IconBack = toLower(IconBack);
|
||||
IdIconBack = ClientSheetsStrings.add(IconBack);
|
||||
|
||||
// Get the icon associated.
|
||||
string IconOver;
|
||||
if(!item.getValueByName (IconOver, "3d.icon overlay"))
|
||||
debug("key '3d.icon overlay' not found.");
|
||||
IconOver = strlwr (IconOver);
|
||||
IconOver = toLower(IconOver);
|
||||
IdIconOver = ClientSheetsStrings.add(IconOver);
|
||||
|
||||
// Get the icon associated.
|
||||
string IconOver2;
|
||||
if(!item.getValueByName (IconOver2, "3d.icon overlay2"))
|
||||
debug("key '3d.icon overlay2' not found.");
|
||||
IconOver2 = strlwr (IconOver2);
|
||||
IconOver2 = toLower(IconOver2);
|
||||
IdIconOver2 = ClientSheetsStrings.add(IconOver2);
|
||||
|
||||
// Get Special modulate colors
|
||||
|
@ -211,7 +211,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
|
|||
string IconText;
|
||||
if(!item.getValueByName (IconText, "3d.text overlay"))
|
||||
debug("key '3d.text overlay' not found.");
|
||||
IconText = strlwr (IconText);
|
||||
IconText = toLower(IconText);
|
||||
IdIconText = ClientSheetsStrings.add(IconText);
|
||||
|
||||
// See if this item can be hiden when equipped
|
||||
|
@ -303,7 +303,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
|
|||
debug("key '3d.anim_set' not found.");
|
||||
// Force the CASE in UPPER to not be CASE SENSITIVE.
|
||||
else
|
||||
NLMISC::strlwr(AnimSet);
|
||||
AnimSet = NLMISC::toLower(AnimSet);
|
||||
IdAnimSet = ClientSheetsStrings.add(AnimSet);
|
||||
|
||||
// Get the Trail Shape
|
||||
|
@ -318,28 +318,28 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
|
|||
string Effect1;
|
||||
if(!item.getValueByName(Effect1, "Effects.Effect1"))
|
||||
debug("key 'Effects.Effect1' not found.");
|
||||
Effect1 = strlwr(Effect1);
|
||||
Effect1 = toLower(Effect1);
|
||||
IdEffect1 = ClientSheetsStrings.add(Effect1);
|
||||
|
||||
// Get special Effect2
|
||||
string Effect2;
|
||||
if(!item.getValueByName(Effect2, "Effects.Effect2"))
|
||||
debug("key 'Effects.Effect2' not found.");
|
||||
Effect2 = strlwr(Effect2);
|
||||
Effect2 = toLower(Effect2);
|
||||
IdEffect2 = ClientSheetsStrings.add(Effect2);
|
||||
|
||||
// Get special Effect3
|
||||
string Effect3;
|
||||
if(!item.getValueByName(Effect3, "Effects.Effect3"))
|
||||
debug("key 'Effects.Effect3' not found.");
|
||||
Effect3 = strlwr(Effect3);
|
||||
Effect3 = toLower(Effect3);
|
||||
IdEffect3 = ClientSheetsStrings.add(Effect3);
|
||||
|
||||
// Get special Effect4
|
||||
string Effect4;
|
||||
if(!item.getValueByName(Effect4, "Effects.Effect4"))
|
||||
debug("key 'Effects.Effect4' not found.");
|
||||
Effect4 = strlwr(Effect4);
|
||||
Effect4 = toLower(Effect4);
|
||||
IdEffect4 = ClientSheetsStrings.add(Effect4);
|
||||
|
||||
// Get its bulk
|
||||
|
|
|
@ -110,28 +110,28 @@ void COutpostBuildingSheet::build(const NLGEORGES::UFormElm &root)
|
|||
string IconMain;
|
||||
if(!root.getValueByName (IconMain, "icon"))
|
||||
debug("key 'icon' not found.");
|
||||
IconMain = strlwr (IconMain);
|
||||
IconMain = toLower(IconMain);
|
||||
IdIconMain = ClientSheetsStrings.add(IconMain);
|
||||
|
||||
// Get the icon associated.
|
||||
string IconBack;
|
||||
if(!root.getValueByName (IconBack, "icon background"))
|
||||
debug("key 'icon background' not found.");
|
||||
IconBack = strlwr (IconBack);
|
||||
IconBack = toLower(IconBack);
|
||||
IdIconBack = ClientSheetsStrings.add(IconBack);
|
||||
|
||||
// Get the icon associated.
|
||||
string IconOver;
|
||||
if(!root.getValueByName (IconOver, "icon overlay"))
|
||||
debug("key 'icon overlay' not found.");
|
||||
IconOver = strlwr (IconOver);
|
||||
IconOver = toLower(IconOver);
|
||||
IdIconOver = ClientSheetsStrings.add(IconOver);
|
||||
|
||||
// Get the icon text associated.
|
||||
string IconText;
|
||||
if(!root.getValueByName (IconText, "text overlay"))
|
||||
debug("key 'text overlay' not found.");
|
||||
IconText = strlwr (IconText);
|
||||
IconText = toLower(IconText);
|
||||
IdIconText = ClientSheetsStrings.add(IconText);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ void CPlayerSheet::build(const NLGEORGES::UFormElm &item)
|
|||
debug("Key 'AnimSetBaseName' not found.");
|
||||
// Force the CASE in UPPER to not be CASE SENSITIVE.
|
||||
else
|
||||
NLMISC::strlwr(AnimSetBaseName);
|
||||
AnimSetBaseName = NLMISC::toLower(AnimSetBaseName);
|
||||
|
||||
// Load Lod character name
|
||||
if(!item.getValueByName(LodCharacterName, "LodCharacterName"))
|
||||
|
@ -240,7 +240,7 @@ void CPlayerSheet::CEquipment::build(const std::string &key,const NLGEORGES::UFo
|
|||
if(!item.getValueByName(itemName, string(key + ".Item").c_str() ))
|
||||
debug(NLMISC::toString("Key '%s.Item' not found.", key.c_str()));
|
||||
else
|
||||
Item = NLMISC::strlwr(itemName);
|
||||
Item = NLMISC::toLower(itemName);
|
||||
|
||||
// Get the color.
|
||||
if(!item.getValueByName(Color, string(key + ".Color").c_str() ))
|
||||
|
|
|
@ -113,22 +113,22 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
|
|||
// read icons
|
||||
string Icon;
|
||||
root.getValueByName (Icon, "Client.Icon" );
|
||||
Icon = strlwr(Icon);
|
||||
Icon = toLower(Icon);
|
||||
IdIcon = ClientSheetsStrings.add(Icon);
|
||||
|
||||
string IconBack;
|
||||
root.getValueByName (IconBack, "Client.IconBack" );
|
||||
IconBack = strlwr(IconBack);
|
||||
IconBack = toLower(IconBack);
|
||||
IdIconBack = ClientSheetsStrings.add(IconBack);
|
||||
|
||||
string IconOver;
|
||||
root.getValueByName (IconOver, "Client.IconOver" );
|
||||
IconOver = strlwr(IconOver);
|
||||
IconOver = toLower(IconOver);
|
||||
IdIconOver = ClientSheetsStrings.add(IconOver);
|
||||
|
||||
string IconOver2;
|
||||
root.getValueByName (IconOver2, "Client.IconOver2" );
|
||||
IconOver2 = strlwr(IconOver2);
|
||||
IconOver2 = toLower(IconOver2);
|
||||
IdIconOver2 = ClientSheetsStrings.add(IconOver2);
|
||||
|
||||
root.getValueByName (IconColor, "Client.IconColor" );
|
||||
|
@ -381,8 +381,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
|
|||
for(i=0;i<listBrick.size();i++)
|
||||
{
|
||||
CSheetId sheetId;
|
||||
string str= listBrick[i];
|
||||
strlwr(str);
|
||||
string str= toLower(listBrick[i]);
|
||||
if(str.find(".sbrick")==string::npos)
|
||||
str+= ".sbrick";
|
||||
sheetId.buildSheetId(str);
|
||||
|
|
|
@ -1326,7 +1326,7 @@ NLMISC_COMMAND(ah, "Launch an action handler", "<ActionHandler> <AHparam>")
|
|||
if (args.size() == 0)
|
||||
return false;
|
||||
|
||||
if (!ClientCfg.AllowDebugLua && strlwr(args[0]) == "lua")
|
||||
if (!ClientCfg.AllowDebugLua && toLower(args[0]) == "lua")
|
||||
{
|
||||
return false; // not allowed!!
|
||||
}
|
||||
|
@ -1883,7 +1883,7 @@ NLMISC_COMMAND(pos, "Change the position of the user (in local only)", "<x, y, (
|
|||
if(args.size() == 1)
|
||||
{
|
||||
string dest = args[0];
|
||||
newPos = CTeleport::getPos(NLMISC::strlwr(dest));
|
||||
newPos = CTeleport::getPos(NLMISC::toLower(dest));
|
||||
if(newPos == CTeleport::Unknown)
|
||||
{
|
||||
//here we try to teleport to a bot destination
|
||||
|
|
|
@ -3834,7 +3834,7 @@ void CSPhraseManager::computePhraseProgression()
|
|||
pse.Text= STRING_MANAGER::CStringManagerClient::getSPhraseLocalizedName(CSheetId(pse.ProgressInfo.SheetId));
|
||||
// avoid mutliple sapce problem
|
||||
strFindReplace(pse.Text, " ", "");
|
||||
// replace each number with 001 format. strlwr
|
||||
// replace each number with 001 format. toLower
|
||||
for(uint k=0;k<pse.Text.size();k++)
|
||||
{
|
||||
if(pse.Text[k] < 256 && isalpha(pse.Text[k]))
|
||||
|
|
|
@ -97,16 +97,14 @@ void CTeleport::load(const std::string &/* filename */)
|
|||
string destName;
|
||||
if(tpElmt->getValueByName(destName, "name"))
|
||||
{
|
||||
// All in UPPER CASE to not be CASE SENSITIVE.
|
||||
NLMISC::strlwr(destName);
|
||||
|
||||
// Get the position
|
||||
CVector pos;
|
||||
if(tpElmt->getValueByName(pos.x, "position.X")
|
||||
&& tpElmt->getValueByName(pos.y, "position.Y")
|
||||
&& tpElmt->getValueByName(pos.z, "position.Z"))
|
||||
{
|
||||
_Destinations.insert(make_pair(destName, pos));
|
||||
// All in UPPER CASE to not be CASE SENSITIVE.
|
||||
_Destinations.insert(make_pair(NLMISC::toLower(destName), pos));
|
||||
}
|
||||
else
|
||||
nlwarning("CTeleport::load: Cannot find the one of the key 'position.X or Y or Z' for the element %d.", i);
|
||||
|
|
Loading…
Reference in a new issue