本文整理汇总了C++中aurora::GFF3List类的典型用法代码示例。如果您正苦于以下问题:C++ GFF3List类的具体用法?C++ GFF3List怎么用?C++ GFF3List使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GFF3List类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: loadPlaceables
void Area::loadPlaceables(const Aurora::GFF3List &list) {
for (Aurora::GFF3List::const_iterator p = list.begin(); p != list.end(); ++p) {
Placeable *placeable = new Placeable(**p);
loadObject(*placeable);
}
}
开发者ID:Siltala,项目名称:xoreos,代码行数:7,代码来源:area.cpp
示例2: loadCreatures
void Area::loadCreatures(const Aurora::GFF3List &list) {
for (Aurora::GFF3List::const_iterator c = list.begin(); c != list.end(); ++c) {
Creature *creature = new Creature(**c);
loadObject(*creature);
}
}
开发者ID:Siltala,项目名称:xoreos,代码行数:7,代码来源:area.cpp
示例3: loadTriggers
void Area::loadTriggers(const Aurora::GFF3List &list) {
for (Aurora::GFF3List::const_iterator c = list.begin(); c != list.end(); ++c) {
Trigger *trigger = new Trigger(**c);
loadObject(*trigger);
}
}
开发者ID:clone2727,项目名称:xoreos,代码行数:7,代码来源:area.cpp
示例4: loadWaypoints
void Area::loadWaypoints(const Aurora::GFF3List &list) {
for (Aurora::GFF3List::const_iterator w = list.begin(); w != list.end(); ++w) {
Waypoint *waypoint = new Waypoint(**w);
loadObject(*waypoint);
}
}
开发者ID:Siltala,项目名称:xoreos,代码行数:7,代码来源:area.cpp
示例5: loadDoors
void Area::loadDoors(const Aurora::GFF3List &list) {
for (Aurora::GFF3List::const_iterator d = list.begin(); d != list.end(); ++d) {
Door *door = new Door(*_module, **d);
loadObject(*door);
}
}
开发者ID:clone2727,项目名称:xoreos,代码行数:7,代码来源:area.cpp
示例6:
void GFF3Dumper::dumpList(const Aurora::GFF3List &list) {
if (!list.empty())
_xml->breakLine();
for (Aurora::GFF3List::const_iterator e = list.begin(); e != list.end(); ++e)
dumpStruct(**e);
}
开发者ID:idkwim,项目名称:xoreos-tools,代码行数:7,代码来源:gff3dumper.cpp
示例7: loadTiles
void Area::loadTiles(const Aurora::GFF3List &tiles) {
size_t n = 0;
for (Aurora::GFF3List::const_iterator t = tiles.begin(); t != tiles.end(); ++t, ++n) {
assert(n < (_width * _height));
loadTile(**t, _tiles[n]);
}
assert(n == _tiles.size());
}
开发者ID:clone2727,项目名称:xoreos,代码行数:10,代码来源:area.cpp
示例8: readVarTable
void Object::readVarTable(const Aurora::GFF3List &varTable) {
for (Aurora::GFF3List::const_iterator v = varTable.begin(); v != varTable.end(); ++v) {
const Common::UString name = (*v)->getString ("Name");
const int32 type = (*v)->getSint ("Type");
if (name.empty())
continue;
switch (type) {
case -1:
setVariable(name, Aurora::NWScript::Variable());
break;
case 1:
setVariable(name, (int32) (*v)->getSint("Value"));
break;
case 2:
setVariable(name, (float) (*v)->getDouble("Value"));
break;
case 3:
setVariable(name, (*v)->getString("Value"));
break;
case 4:
setVariable(name, (int32)((uint32) (*v)->getUint("Value")));
break;
case 5:
warning("TODO: Object::readVarTable(), \"%s\" has location type", name.c_str());
setVariable(name, Aurora::NWScript::Variable());
break;
default:
throw Common::Exception("Unknown variable type %u (\"%s\")", type, name.c_str());
}
}
}
开发者ID:clone2727,项目名称:xoreos,代码行数:39,代码来源:object.cpp
示例9: loadObject
void Placeable::loadObject(const Aurora::GFF3Struct &gff) {
// State
_state = (State) gff.getUint("AnimationState", (uint) _state);
// Inventory
_hasInventory = gff.getBool("HasInventory", _hasInventory);
if (_hasInventory && gff.hasField("ItemList")) {
Aurora::GFF3List classList = gff.getList("ItemList");
for (Aurora::GFF3List::const_iterator iter = classList.begin(); iter != classList.end(); ++iter) {
const Aurora::GFF3Struct &item = **iter;
_inventory.addItem(item.getString("InventoryRes"));
}
}
// Hit Points
_currentHitPoints = gff.getSint("CurrentHP");
_maxHitPoints = gff.getSint("HP");
_minOneHitPoint = gff.getBool("Min1HP");
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:24,代码来源:placeable.cpp
注:本文中的aurora::GFF3List类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论