void TerrainGeneratorLoader::loadLayerItem (Iff& iff, TerrainGenerator* terrainGenerator, TerrainGenerator::Layer* layer) { TerrainGenerator::Boundary* boundary = createBoundary (iff); if (boundary) layer->addBoundary (boundary); else { TerrainGenerator::Filter* filter = createFilter (iff, terrainGenerator); if (filter) layer->addFilter (filter); else { TerrainGenerator::Affector* affector = createAffector (iff, terrainGenerator); if (affector) layer->addAffector (affector); else { DEBUG_FATAL (iff.getCurrentName () != TAG_LAYR, ("not at layer in terrain file")); TerrainGenerator::Layer* sublayer = new TerrainGenerator::Layer (); sublayer->load (iff, terrainGenerator); layer->addLayer (sublayer); } //lint !e429 //-- sublayer has not been freed or returned } } }
foreach (Affector*, it, affectors) { properties = _affectorProperties[*it]; affector = createAffector(properties["type"], properties["name"]); foreach_m (hstr, it, properties) { if (it->first != "type") { affector->setProperty(it->first, it->second); } } this->registerAffector(affector); this->_affectorProperties[affector] = properties; }