Battle Video scraping to current box

This commit is contained in:
Kurt
2015-02-23 23:52:32 -08:00
parent 9209f0623b
commit cc47a8a7d9

View File

@@ -582,6 +582,16 @@ private void openFile(byte[] input, string path, string ext)
ramsav = (byte[])input.Clone();
}
#endregion
#region Battle Video
else if (input.Length == 0x2E60 && BitConverter.ToUInt64(input, 0xE18) != 0)
{
if (Util.Prompt(MessageBoxButtons.YesNo, "Load Batte Video Pokémon data to " + C_BoxSelect.Text + "?", "The first 24 slots will be overwritten.") != DialogResult.Yes) return;
byte[] ekx = new byte[260];
for (int i = 0; i < 24; i++)
Array.Copy(input, 0xE18 + 260 * i + (i / 6) * 8, savefile, SaveGame.Box + i * 0xE8 + C_BoxSelect.SelectedIndex * 30 * 0xE8, 0xE8);
setPKXBoxes();
}
#endregion
else
Util.Error("Attempted to load an unsupported file type/size.", "File Loaded:" + Environment.NewLine + path, "File Size:" + Environment.NewLine + new FileInfo(path).Length.ToString("X8"));
}