Commit 91c64efb authored by Leeor Dicker's avatar Leeor Dicker

Addresses issue #6.

- Map now tests for the presence of a referenced tileset and throws when if the tileset doesn't exist.
parent 0badde97
......@@ -604,6 +604,10 @@ void Map::parseTilesets(TiXmlNode* node)
if(xmlNode->ValueStr() == "tileset")
{
string tsetpath = parser.stringAttribute(xmlNode, "path");
if (!Utility<Filesystem>::get().exists(tsetpath))
throw Exception(0, "Missing TileSet", "Referened TileSet missing: " + tsetpath);
mTileset = Tileset(tsetpath, CELL_DIMENSIONS.w(), CELL_DIMENSIONS.h());
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment