Exemplo n.º 1
0
 void MapParser::parseMap(Model::Map& map, Utility::ProgressIndicator* indicator) {
     Model::Entity* entity = NULL;
     
     if (indicator != NULL) indicator->reset(static_cast<int>(m_size));
     try {
         while ((entity = parseEntity(map.worldBounds(), indicator)) != NULL)
             map.addEntity(*entity);
     } catch (MapParserException e) {
         m_console.error(e.what());
     }
     
     if (indicator != NULL)
         indicator->update(static_cast<int>(m_size));
     
     if (!m_staleBrushes.empty()) {
         StringStream stream;
         stream << "Found brushes with invalid or missing geometry at lines ";
         for (size_t i = 0; i < m_staleBrushes.size(); i++) {
             const Model::Brush* brush = m_staleBrushes[i];
             stream << brush->fileLine();
             if (i < m_staleBrushes.size() - 1)
                 stream << ", ";
         }
         m_console.warn(stream.str());
     }
 }
Exemplo n.º 2
0
 void MapParser::parseMap(Model::Map& map, Utility::ProgressIndicator* indicator) {
     Model::Entity* entity = NULL;
     
     if (indicator != NULL) indicator->reset(static_cast<int>(m_size));
     try {
         while ((entity = parseEntity(map.worldBounds(), indicator)) != NULL)
             map.addEntity(*entity);
     } catch (MapParserException e) {
         m_console.error(e.what());
     }
     if (indicator != NULL)
         indicator->update(static_cast<int>(m_size));
 }