Aftermath support, and spinners (on MGG, MRJ, TTNK) work (again?).

This commit is contained in:
Bob
2009-11-25 22:55:40 +13:00
parent 7c1c0835e1
commit ea096361bb
14 changed files with 732 additions and 55 deletions

View File

@@ -10,6 +10,27 @@ namespace OpenRa.FileFormats
{
static List<IFolder> mountedFolders = new List<IFolder>();
public static void MountDefault( bool useAftermath )
{
FileSystem.Mount( new Folder( "./" ) );
if( File.Exists( "main.mix" ) )
FileSystem.Mount( new Package( "main.mix" ) );
FileSystem.Mount( new Package( "redalert.mix" ) );
FileSystem.Mount( new Package( "conquer.mix" ) );
FileSystem.Mount( new Package( "hires.mix" ) );
FileSystem.Mount( new Package( "general.mix" ) );
FileSystem.Mount( new Package( "local.mix" ) );
FileSystem.Mount( new Package( "sounds.mix" ) );
FileSystem.Mount( new Package( "speech.mix" ) );
FileSystem.Mount( new Package( "allies.mix" ) );
FileSystem.Mount( new Package( "russian.mix" ) );
if( useAftermath )
{
FileSystem.Mount( new Package( "expand2.mix" ) );
FileSystem.Mount( new Package( "hires1.mix" ) );
}
}
public static void Mount(IFolder folder)
{
mountedFolders.Add(folder);
@@ -24,7 +45,7 @@ namespace OpenRa.FileFormats
return s;
}
throw new FileNotFoundException("File not found", filename);
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
}
public static Stream OpenWithExts( string filename, params string[] exts )
@@ -39,7 +60,7 @@ namespace OpenRa.FileFormats
}
}
throw new FileNotFoundException( "File not found", filename );
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
}
}
}