当前位置: 首页>>代码示例>>C++>>正文


C++ UString::equalsIgnoreCase方法代码示例

本文整理汇总了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;
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:31,代码来源:itemproperty.cpp

示例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;
}
开发者ID:ImperatorPrime,项目名称:xoreos,代码行数:17,代码来源:cline.cpp

示例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);
		}
	}
}
开发者ID:clone2727,项目名称:xoreos,代码行数:81,代码来源:creature.cpp


注:本文中的common::UString::equalsIgnoreCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。