本文整理汇总了C++中aurora::GFF3Struct::getBool方法的典型用法代码示例。如果您正苦于以下问题:C++ GFF3Struct::getBool方法的具体用法?C++ GFF3Struct::getBool怎么用?C++ GFF3Struct::getBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aurora::GFF3Struct
的用法示例。
在下文中一共展示了GFF3Struct::getBool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadProperties
void Creature::loadProperties(const Aurora::GFF3Struct &gff) {
// Tag
_tag = gff.getString("Tag", _tag);
// Name
Aurora::LocString firstName;
gff.getLocString("FirstName", firstName);
Aurora::LocString lastName;
gff.getLocString("LastName", lastName);
if (!firstName.empty()) {
_name = firstName.getString();
if (!lastName.empty())
_name += " " + lastName.getString();
}
// Description
_description = gff.getString("Description", _description);
// Portrait
loadPortrait(gff);
// Equipment
loadEquipment(gff);
// Appearance
_appearance = gff.getUint("Appearance_Type", _appearance);
// Static
_static = gff.getBool("Static", _static);
// Usable
_usable = gff.getBool("Useable", _usable);
// PC
_isPC = gff.getBool("IsPC", _isPC);
// Gender
_gender = Gender(gff.getUint("Gender"));
// Race
_race = Race(gff.getSint("Race", _race));
_subRace = SubRace(gff.getSint("SubraceIndex", _subRace));
// Hit Points
_currentHitPoints = gff.getSint("CurrentHitPoints", _maxHitPoints);
_maxHitPoints = gff.getSint("MaxHitPoints", _currentHitPoints);
_minOneHitPoint = gff.getBool("Min1HP", _minOneHitPoint);
// Faction
_faction = Faction(gff.getUint("FactionID"));
// Scripts
readScripts(gff);
_conversation = gff.getString("Conversation", _conversation);
}
示例2: loadProperties
void Situated::loadProperties(const Aurora::GFF3Struct &gff) {
// Tag
_tag = gff.getString("Tag", _tag);
// Name
_name = gff.getString("LocName", _name);
// Description
_description = gff.getString("Description", _description);
// Appearance
_appearanceID = gff.getUint("Appearance", _appearanceID);
// Conversation
_conversation = gff.getString("Conversation", _conversation);
// Static
_static = gff.getBool("Static", _static);
// Usable
_usable = gff.getBool("Useable", _usable);
// Locked
_locked = gff.getBool("Locked", _locked);
// Tint
readTint(gff, _tint);
// Scripts and variables
readScripts(gff);
readVarTable(gff);
}
示例3: loadProperties
void Creature::loadProperties(const Aurora::GFF3Struct &gff) {
// Tag
_tag = gff.getString("Tag", _tag);
// Name
_name = gff.getString("LocName", _name);
// Description
_description = gff.getString("Description", _description);
// Portrait
loadPortrait(gff);
// Appearance
_appearance = gff.getUint("Appearance_Type", _appearance);
// Static
_static = gff.getBool("Static", _static);
// Usable
_usable = gff.getBool("Useable", _usable);
// PC
_isPC = gff.getBool("IsPC", _isPC);
// Scripts
readScripts(gff);
}
示例4: loadTile
void Area::loadTile(const Aurora::GFF3Struct &t, Tile &tile) {
// ID
tile.tileID = t.getUint("Tile_ID");
// Height transition
tile.height = t.getUint("Tile_Height", 0);
// Orientation
tile.orientation = (Orientation) t.getUint("Tile_Orientation", 0);
// Lights
tile.mainLight[0] = t.getUint("Tile_MainLight1", 0);
tile.mainLight[1] = t.getUint("Tile_MainLight2", 0);
tile.srcLight[0] = t.getUint("Tile_SrcLight1", 0);
tile.srcLight[1] = t.getUint("Tile_SrcLight2", 0);
// Tile animations
tile.animLoop[0] = t.getBool("Tile_AnimLoop1", false);
tile.animLoop[1] = t.getBool("Tile_AnimLoop2", false);
tile.animLoop[2] = t.getBool("Tile_AnimLoop3", false);
tile.tile = 0;
tile.model = 0;
}
示例5: loadProperties
void Situated::loadProperties(const Aurora::GFF3Struct &gff) {
// Tag
_tag = gff.getString("Tag", _tag);
// Name
_name = gff.getString("Name", _name);
// Description
_description = gff.getString("Description", _description);
// Portrait
loadPortrait(gff);
// Appearance
_appearanceID = gff.getUint("Appearance", _appearanceID);
// Static
_static = gff.getBool("Static", _static);
// Usable
_usable = gff.getBool("Useable", _usable);
// Locked
_locked = gff.getBool("Locked", _locked);
// Scripts
readScripts(gff);
}
示例6: loadProperties
void Waypoint::loadProperties(const Aurora::GFF3Struct &gff) {
// Tag
_tag = gff.getString("Tag", _tag);
// Map note
_hasMapNote = gff.getBool("HasMapNote" , _hasMapNote);
_enabledMapNote = gff.getBool("MapNoteEnabled", _enabledMapNote);
_mapNote = gff.getString("MapNote", _mapNote);
// Scripts
readScripts(gff);
}
示例7: load
void Waypoint::load(const Aurora::GFF3Struct &waypoint) {
// Tag
_tag = waypoint.getString("Tag", _tag);
loadPositional(waypoint);
// Map note
_hasMapNote = waypoint.getBool("MapNoteEnabled", _hasMapNote);
_displayMapNote = waypoint.getBool("MapNoteDisplay", _displayMapNote);
_mapNoteType = waypoint.getSint("MapNoteType");
if (waypoint.hasField("MapNote")) {
_mapNote = waypoint.getString("MapNote");
}
}
示例8: loadObject
void Placeable::loadObject(const Aurora::GFF3Struct &gff) {
// State
_state = (State) gff.getUint("AnimationState", (uint) _state);
_hasInventory = gff.getBool("HasInventory", _hasInventory);
}
示例9: loadInstance
void Creature::loadInstance(const Aurora::GFF3Struct &instance) {
loadPositional(instance);
// Active
_active = instance.getBool("Active");
}
示例10: load
void Waypoint::load(const Aurora::GFF3Struct &waypoint) {
// Tag
_tag = waypoint.getString("Tag");
// Group
_group = waypoint.getSint("Group", -1);
// Map Note
_hasMapNote = waypoint.getBool("HasMapNote");
_enabledMapNote = waypoint.getBool("MapNoteEnabled");
waypoint.getLocString("MapNote", _mapNote);
// Type
_type = (uint32) ((int32) waypoint.getSint("MapNoteType", -1));
// Position
const float position[3] = {
(float) waypoint.getDouble("XPosition"),
(float) waypoint.getDouble("YPosition"),
(float) waypoint.getDouble("ZPosition")
};
setPosition(position[0], position[1], position[2]);
// Orientation
const float orientation[4] = {
(float) waypoint.getDouble("XOrientation"),
(float) waypoint.getDouble("YOrientation"),
(float) waypoint.getDouble("ZOrientation"),
(float) Common::rad2deg(acos(waypoint.getDouble("WOrientation")) * 2.0)
};
setOrientation(orientation[0], orientation[1], orientation[2], orientation[3]);
const Aurora::GDAFile &gda = getMGDA(kWorksheetWaypoints);
// Icon
_icon = gda.getString(_type, "Icon");
// Variables and script
readVarTable(waypoint);
readScript(waypoint);
enableEvents(true);
}
示例11: loadProperties
void Situated::loadProperties(const Aurora::GFF3Struct &gff) {
// Unique ID and tag
_uniqueID = gff.getString("UniqueID", _uniqueID);
_tag = gff.getString("Tag", _tag);
// Name
if (gff.hasField("LocName")) {
try {
gff.getLocString("LocName", _name);
} catch (...) {
}
}
// Description
if (gff.hasField("Description")) {
try {
gff.getLocString("Description", _description);
} catch (...) {
}
}
refreshLocalized();
// Appearance
_modelName = gff.getString("ModelName", _modelName);
// Sounds
_soundAppType = gff.getUint("SoundAppType", _soundAppType);
// Conversation
_conversation = gff.getString("Conversation", _conversation);
// Static
_static = gff.getBool("Static", _static);
// Usable
_usable = gff.getBool("Useable", _usable);
// Locked
_locked = gff.getBool("Locked", _locked);
}
示例12: loadProperties
void Situated::loadProperties(const Aurora::GFF3Struct &gff) {
// Tag
_tag = gff.getString("Tag", _tag);
// Name
if (gff.hasField("LocName")) {
Aurora::LocString name;
gff.getLocString("LocName", name);
_name = name.getString();
}
// Description
if (gff.hasField("Description")) {
Aurora::LocString description;
gff.getLocString("Description", description);
_description = description.getString();
}
// Appearance
_appearanceID = gff.getUint("Appearance", _appearanceID);
// Conversation
_conversation = gff.getString("Conversation", _conversation);
// Static
_static = gff.getBool("Static", _static);
// Usable
_usable = gff.getBool("Useable", _usable);
// Locked
_locked = gff.getBool("Locked", _locked);
// Tint
readTint(gff, _tint);
}
示例13: loadMember
void Roster::loadMember(const Aurora::GFF3Struct &gff) {
Member member;
// Add a roster member to the list
if (gff.hasField("RosName")) {
member.rosterName = gff.getString("RosName", member.rosterName);
member.isAvailable = gff.getBool("RosAvailable", member.isAvailable);
member.isCampaignNPC = gff.getBool("RosCampaignNPC", member.isCampaignNPC);
member.isSelectable = gff.getBool("RosSelectable", member.isSelectable);
member.isLoadBefore = gff.getBool("RosLoadBefore", member.isLoadBefore);
auto match = std::find_if(_members.begin(), _members.end(), [&](const Member &m) {
return m.rosterName == member.rosterName;
});
if (match == _members.end()) {
_members.push_back(member);
} else {
throw Common::Exception("Attempt to load duplicate roster member name: \"%s\"", member.rosterName.c_str());
}
} else {
throw Common::Exception("Missing RosName field.");
}
}
示例14: loadProperties
void Waypoint::loadProperties(const Aurora::GFF3Struct &gff) {
// Unique ID and tag
_uniqueID = gff.getString("UniqueID", _uniqueID);
_tag = gff.getString("Tag", _tag);
// Map note
_hasMapNote = gff.getBool("HasMapNote", _hasMapNote);
if (gff.hasField("MapNote"))
gff.getLocString("MapNote", _mapNote);
refreshLocalized();
}
示例15: 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");
}