-Added the SNES formats to the Import dialog.

-Figured out how to get files from the .LSMV archive. Will write the input parser shortly.
This commit is contained in:
brandman211 2012-09-12 04:11:35 +00:00
parent 9e1ecd02d2
commit 8a24de458f
2 changed files with 24 additions and 6 deletions

View File

@ -3092,16 +3092,19 @@ namespace BizHawk.MultiClient
ofd.InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId);
ofd.Multiselect = true;
ofd.Filter = FormatFilter(
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.fcm;*.fmv;*.vmv;*.nmv;*.gmv;*.vbm;",
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.gmv;*.vbm;*.lsmv;*.fcm;*.fmv;*.vmv;*.nmv;*.smv;*.zmv;",
"FCEUX", "*.fm2",
"PCEjin/Mednafen", "*.mc2;*.mcm",
"Dega", "*.mmv",
"Gens", "*.gmv",
"Visual Boy Advance", "*.vbm",
"LSNES", "*.lsmv",
"FCEU", "*.fcm",
"Famtasia", "*.fmv",
"VirtuaNES", "*.vmv",
"Nintendulator", "*.nmv",
"Gens", "*.gmv",
"Visual Boy Advance", "*.vbm",
"Snes9x", "*.smv",
"ZSNES", "*.zmv",
"All Files", "*.*");
ofd.RestoreDirectory = false;

View File

@ -82,8 +82,8 @@ namespace BizHawk.MultiClient
// Return whether or not the type of file provided can currently be imported.
public static bool IsValidMovieExtension(string extension)
{
string[] extensions = new string[11] {
"FCM", "FM2", "FMV", "GMV", "MCM", "MC2", "MMV", "NMV", "SMV", "VBM", "VMV"
string[] extensions = new string[13] {
"FCM", "FM2", "FMV", "GMV", "MCM", "MC2", "MMV", "NMV", "LSMV", "SMV", "VBM", "VMV", "ZMV"
};
foreach (string ext in extensions)
if (extension.ToUpper() == "." + ext)
@ -849,7 +849,22 @@ namespace BizHawk.MultiClient
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
// TODO: Import.
HawkFile hf = new HawkFile(path);
// .LSMV movies are .zip files containing data files.
if (!hf.IsArchive)
{
errorMsg = "This is not an archive.";
return null;
}
foreach (var item in hf.ArchiveItems)
{
if (item.name == "input")
{
hf.BindArchiveMember(item.index);
var stream = hf.GetStream();
string input = Encoding.UTF8.GetString(Util.ReadAllBytes(stream));
}
}
return m;
}