/// <summary> /// Gets the MCD-records for a given terrain in this Descriptor. /// </summary> /// <param name="id">the position of the terrain in this tileset's terrains-list</param> /// <returns>an McdRecordCollection containing all the parts for the Terrain</returns> public McdRecordCollection GetTerrainRecords(int id) { var terrain = Terrains[id]; string terr = terrain.Item1; string path = terrain.Item2; path = GetTerrainDirectory(path); var tiles = TilepartFactory.CreateTileparts( terr, path, ResourceInfo.LoadSpriteset(terr, path, 2, Pal)); // NOTE: That loads the sprites in addition to return(new McdRecordCollection(tiles)); // getting the MCD-records. here just because it can be } // concealed inside a function called GetTerrainRecords()
/// <summary> /// Gets the spriteset for a given terrain in this Descriptor. /// </summary> /// <returns></returns> public SpriteCollection GetTerrainSpriteset(string terrain) { //LogFile.WriteLine("Descriptor.GetTerrainSpriteset"); return(ResourceInfo.LoadSpriteset(terrain, _dirTerrain, 2, Pal)); // TODO: Should the '2' be '4' for TFTD ... } // no, Ufopaedia.org "Image Formats" says TFTD terrains have 2-byte Tab-offsets.