merged bob's interior support

This commit is contained in:
Chris Forbes
2010-01-29 19:09:10 +13:00
12 changed files with 1029 additions and 122 deletions

View File

@@ -46,7 +46,6 @@ namespace OpenRa
Game.changePending = false;
Game.mapName = mapName;
SheetBuilder.Initialize(renderer);
SpriteSheetBuilder.Initialize();
FileSystem.UnmountTemporaryPackages();
Timer.Time( "reset: {0}" );

View File

@@ -6,13 +6,19 @@ namespace OpenRa.Graphics
{
static class SpriteSheetBuilder
{
public static void Initialize()
public static void Initialize( Map map )
{
exts = new[] {
"." + map.Theater.Substring( 0, 3 ).ToLowerInvariant(),
".shp",
".tem",
".sno",
".int" };
sprites = new Cache<string, Sprite[]>( LoadSprites );
}
static Cache<string, Sprite[]> sprites;
static readonly string[] exts = { ".tem", ".sno", ".int", ".shp" };
static string[] exts;
static Sprite[] LoadSprites(string filename)
{

View File

@@ -56,9 +56,8 @@ namespace OpenRa
Map = new Map( Rules.AllRules );
Timer.Time( "new Map: {0}" );
FileSystem.MountTemporary( new Package( Map.Theater + ".mix" ) );
Timer.Time( "mount temporary packages: {0}" );
TileSet = new TileSet( Map.TileSuffix );
SpriteSheetBuilder.Initialize( Map );
Timer.Time( "Tileset: {0}" );
BuildingInfluence = new BuildingInfluenceMap( this );