Cleaner attempt at rendering map previews on the fly

This commit is contained in:
Paul Chote
2010-07-15 20:50:18 +12:00
parent d274c10e95
commit 45061cdf37
3 changed files with 46 additions and 9 deletions

View File

@@ -45,8 +45,8 @@ namespace OpenRA.FileFormats
public int2 BottomRight;
public int Width { get { return BottomRight.X - TopLeft.X; } }
public int Height { get { return BottomRight.Y - TopLeft.Y; } }
public Lazy<Bitmap> Preview;
public Map Map { get { return new Map(Package); }}
static List<string> Fields = new List<string>() {
"Selectable", "Title", "Description", "Author", "PlayerCount", "Tileset", "TopLeft", "BottomRight"
};
@@ -64,10 +64,6 @@ namespace OpenRA.FileFormats
Waypoints.Add(wp.Key, new int2(int.Parse(loc[0]), int.Parse(loc[1])));
}
Preview = Lazy.New(
() => new Bitmap(Package.GetContent("preview.png"))
);
Uid = Package.GetContent("map.uid").ReadAllText();
}