engine/XML/custom_maps/features/source/XMLMapFeatureReaders.cpp
// Parse an individual feature placement, and place it on the map.
Parse an individual feature placement, and place it on the map.
Parse an individual feature placement and place it on the map .
void XMLMapFeaturesReader::parse_feature_placement(const XMLNode& feature_placement_node, MapPtr map)
{
  if (!feature_placement_node.is_null())
  {
    XMLNode coord_node = XMLUtils::get_next_element_by_local_name(feature_placement_node, "Coord");
    XMLMapCoordinateReader coord_reader;
    Coordinate c = coord_reader.parse_fixed_coordinate(coord_node);
    FeaturePtr feature = XMLMapFeatureFactory::create_feature(feature_placement_node);
    TilePtr tile = map->at(c);
    if (tile && feature)
    {
      tile->set_feature(feature);
    }
  }
}
void XMLMapFeaturesReader :: parse_feature_placement ( const XMLNode & feature_placement_node , MapPtr map ) { if ( ! feature_placement_node . is_null ( ) ) { XMLNode coord_node = XMLUtils :: get_next_element_by_local_name ( feature_placement_node , " " ) ; XMLMapCoordinateReader coord_reader ; Coordinate c = coord_reader . parse_fixed_coordinate ( coord_node ) ; FeaturePtr feature = XMLMapFeatureFactory :: create_feature ( feature_placement_node ) ; TilePtr tile = map -> at ( c ) ; if ( tile && feature ) { tile -> set_feature ( feature ) ; } } }
Parse an individual feature placement, and place it on the map.
Parse an individual feature placement and place it on the map .