From cc47a8a7d9d06a8480f90a73ce96bb5fcc27299e Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 23 Feb 2015 23:52:32 -0800 Subject: [PATCH] Battle Video scraping to current box --- PKX/f1-Main.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index ba5d4c290..e539046f3 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -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")); }