bool XML_LandscapeParser::AttributesDone() { // Verify... if (!IsPresent) { AttribsMissing(); return false; } // Check to see if a frame is already accounted for vector<LandscapeOptionsEntry>& LOL = LOList[Collection]; for (vector<LandscapeOptionsEntry>::iterator LOIter = LOL.begin(); LOIter < LOL.end(); LOIter++) { if (LOIter->Frame == Frame) { // Replace the data LOIter->OptionsData = Data; return true; } } // If not, then add a new frame entry LandscapeOptionsEntry DataEntry; DataEntry.Frame = Frame; DataEntry.OptionsData = Data; LOL.push_back(DataEntry); return true; }
bool XML_ModelDataParser::AttributesDone() { // Verify... if (!CollIsPresent) { AttribsMissing(); return false; } return true; }
bool XML_PluginParser::AttributesDone() { if (Data.name == "") { AttribsMissing(); return false; } return true; }
bool XML_DynLimValueParser::AttributesDone() { // Verify... if (!IsPresent) { AttribsMissing(); return false; } return true; }
bool XML_OvhdMapBooleanParser::AttributesDone() { // Verify... if (!IsPresent) { AttribsMissing(); return false; } GotUsed = true; return true; }
bool XML_SequenceMapParser::AttributesDone() { // Verify... if (!SeqIsPresent || !ModelSeqIsPresent) { AttribsMissing(); return false; } // Add the entry vector<SequenceMapEntry>& SeqMap = *SeqMapPtr; SeqMap.push_back(Data); return true; }
bool XML_DeadAssignParser::AttributesDone() { // Verify... bool AllPresent = IsPresent[0] && IsPresent[1]; if (!AllPresent) { AttribsMissing(); return false; } OvhdMap_ConfigData.dead_monster_displays[Coll] = Type; return true; }
bool XML_LiveAssignParser::AttributesDone() { // Verify... bool AllPresent = IsPresent[0] && IsPresent[1]; if (!AllPresent) { AttribsMissing(); return false; } // Put into place OvhdMap_ConfigData.monster_displays[Monster] = Type; return true; }
bool XML_LineWidthParser::AttributesDone() { // Verify... bool AllPresent = true; for (int k=0; k<3; k++) AllPresent = AllPresent && IsPresent[k]; if (!AllPresent) { AttribsMissing(); return false; } // Put into place OvhdMap_ConfigData.line_definitions[Type].pen_sizes[Scale] = Width; return true; }
bool XML_ItemParser::AttributesDone() { // Verify... if (!IndexPresent) { AttribsMissing(); return false; } item_definition& OrigData = item_definitions[Index]; if (IsPresent[0]) OrigData.singular_name_id = Data.singular_name_id; if (IsPresent[1]) OrigData.plural_name_id = Data.plural_name_id; if (IsPresent[2]) OrigData.maximum_count_per_player = Data.maximum_count_per_player; if (IsPresent[3]) OrigData.invalid_environments = Data.invalid_environments; if (IsPresent[4]) OrigData.item_kind = Data.item_kind; Shape_SetPointer(&OrigData.base_shape); return true; }
bool XML_ColorParser::AttributesDone() { // Verify... bool AllPresent = true; if (NumColors <= 0) { IsPresent[3] = true; // Convenient fakery: no index -- always present Index = 0; } for (int k=0; k<4; k++) if (!IsPresent[k]) { AllPresent = false; } if (!AllPresent) { AttribsMissing(); return false; } // Put into place assert(ColorList); ColorList[Index] = TempColor; return true; }