| 170 | } |
| 171 | |
| 172 | void CoronaLoader::loadMapDefinition(const Ref<XML>& xml) |
| 173 | { |
| 174 | if (xml->name != "mapDefinition") |
| 175 | THROW_RUNTIME_ERROR(xml->loc.str()+": invalid map definition: "+xml->name); |
| 176 | if (xml->children.size() != 1) |
| 177 | THROW_RUNTIME_ERROR(xml->loc.str()+": invalid map definition"); |
| 178 | |
| 179 | const std::string name = xml->parm("name"); |
| 180 | std::shared_ptr<Texture> texture = loadMap(xml->children[0]); |
| 181 | if (texture) textureMap[name] = texture; |
| 182 | } |
| 183 | |
| 184 | Ref<SceneGraph::Node> CoronaLoader::loadMaterialLibrary(const FileName& fileName) |
| 185 | { |