Exemple #1
0
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;
}
Exemple #2
0
bool XML_ModelDataParser::AttributesDone()
{
  // Verify...
  if (!CollIsPresent) {
    AttribsMissing();
    return false;
  }
  return true;
}
Exemple #3
0
bool XML_PluginParser::AttributesDone()
{
  if (Data.name == "") {
    AttribsMissing();
    return false;
  }

  return true;
}
bool XML_DynLimValueParser::AttributesDone()
{
	// Verify...
	if (!IsPresent)
	{
		AttribsMissing();
		return false;
	}
	return true;
}
Exemple #5
0
bool XML_OvhdMapBooleanParser::AttributesDone()
{
  // Verify...
  if (!IsPresent) {
    AttribsMissing();
    return false;
  }
  GotUsed = true;
  return true;
}
Exemple #6
0
bool XML_SequenceMapParser::AttributesDone()
{
  // Verify...
  if (!SeqIsPresent || !ModelSeqIsPresent) {
    AttribsMissing();
    return false;
  }

  // Add the entry
  vector<SequenceMapEntry>& SeqMap = *SeqMapPtr;
  SeqMap.push_back(Data);
  return true;
}
Exemple #7
0
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;
}
Exemple #8
0
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;
}
Exemple #9
0
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;
}
Exemple #10
0
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;
}
Exemple #11
0
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;
}