public void LoadFrom(string filename) { this.filename = filename; PrismMap map = PrismFile.LoadMapFrom(filename); textureSetList.Clear(); rootLayer.Nodes.Clear(); Dictionary <PrismTexture.Tile, TextureSet.Tile> tileList = new Dictionary <PrismTexture.Tile, TextureSet.Tile>(); foreach (PrismTexture t in map.Textures) { TextureSet set = new TextureSet(t.Name, t.Bitmap); foreach (PrismTexture.Tile tile in t.Tiles) { TextureSet.Tile newTile = new TextureSet.Tile(tile.Name, set, tile.UV); tileList.Add(tile, newTile); set.AddTile(newTile); } CreateTextureSet(set); } rootLayer = new LayerNode(map.RootLayerNode, tileList, this); }