本文整理汇总了C++中common::UString::equalsIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:C++ UString::equalsIgnoreCase方法的具体用法?C++ UString::equalsIgnoreCase怎么用?C++ UString::equalsIgnoreCase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::UString
的用法示例。
在下文中一共展示了UString::equalsIgnoreCase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getIsItemPropertyValid
bool ItemProperty::getIsItemPropertyValid() const {
// Load the item properties row
const Aurora::TwoDAFile &twoDA = TwoDAReg.get2DA("itempropdef");
const size_t count = twoDA.getRowCount();
if (_type >= count)
return false;
// Check the item type
const Aurora::TwoDARow &row = twoDA.getRow(_type);
Common::UString name = row.getString("Name");
if (name.empty() || name.equalsIgnoreCase("padding"))
return false;
// Check the subtype
Common::UString subTypeResRef = row.getString("SubTypeResRef");
if (!subTypeResRef.empty()) {
const Aurora::TwoDAFile &twoDAsubType = TwoDAReg.get2DA(subTypeResRef);
const size_t subTypeCount = twoDAsubType.getRowCount();
if (_subtype >= subTypeCount)
return false;
// "Name" column seems common to these tables
const Aurora::TwoDARow &rowSubType = twoDA.getRow(_subtype);
Common::UString nameSubTyle = rowSubType.getString("Name");
if (name.empty())
return false;
}
// TODO: Check the param1 data and price tables
return true;
}
示例2: setOption
static bool setOption(Common::UString &key, const Common::UString &value) {
if (key.equalsIgnoreCase("config")) {
ConfigMan.setConfigFile(value);
if (!ConfigMan.load()) {
if (!ConfigMan.fileExists())
warning("No such config file \"%s\"", value.c_str());
return false;
}
key.clear();
return true;
}
ConfigMan.setCommandlineKey(key, value);
key.clear();
return true;
}
示例3: loadModel
void Creature::loadModel() {
if (_model)
return;
if (_appearanceID == Aurora::kFieldIDInvalid) {
warning("Creature \"%s\" has no appearance", _tag.c_str());
return;
}
const Aurora::TwoDARow &appearance = TwoDAReg.get2DA("appearance").getRow(_appearanceID);
if (_portrait.empty())
_portrait = appearance.getString("PORTRAIT");
_environmentMap = appearance.getString("ENVMAP");
if (appearance.getString("MODELTYPE") == "P") {
getArmorModels();
getPartModels();
_model = loadModelObject(_partsSuperModelName);
for (size_t i = 0; i < kBodyPartMAX; i++) {
if (_bodyParts[i].modelName.empty())
continue;
TextureMan.startRecordNewTextures();
// Try to load in the corresponding part model
Graphics::Aurora::Model *partModel = loadModelObject(_bodyParts[i].modelName, _bodyParts[i].textureName);
if (!partModel)
continue;
// Add the loaded model to the appropriate part node
Graphics::Aurora::ModelNode *partNode = _model->getNode(kBodyPartNodes[i]);
if (partNode)
partNode->addChild(partModel);
std::list<Common::UString> newTextures;
TextureMan.stopRecordNewTextures(newTextures);
for (std::list<Common::UString>::const_iterator t = newTextures.begin(); t != newTextures.end(); ++t) {
Graphics::Aurora::TextureHandle texture = TextureMan.getIfExist(*t);
if (texture.empty())
continue;
_bodyParts[i].textures.push_back(texture);
}
finishPLTs(_bodyParts[i].textures);
}
} else
_model = loadModelObject(appearance.getString("RACE"));
// Positioning
float x, y, z, angle;
getPosition(x, y, z);
setPosition(x, y, z);
getOrientation(x, y, z, angle);
setOrientation(x, y, z, angle);
// Clickable
if (_model) {
_model->setTag(_tag);
_model->setClickable(isClickable());
_ids.push_back(_model->getID());
if (!_environmentMap.empty()) {
Common::UString environmentMap = _environmentMap;
if (environmentMap.equalsIgnoreCase("default"))
environmentMap = _area ? _area->getEnvironmentMap() : "";
_model->setEnvironmentMap(environmentMap);
}
}
}