void Memory_importClick(object sender, EventArgs e) { byte[] new_memory = new byte[MEMORIES.Size]; string path = null; int filesize = FileIO.load_file(ref new_memory, ref path, "Memory Link Data|*.mld|All Files (*.*)|*.*"); if (filesize == MEMORIES.Size) { ml = new MEMORIES(new_memory); //Reload all data load_data(); } else { MessageBox.Show("Invalid file"); } }
public MemoryLink() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); rand = new Random(Guid.NewGuid().GetHashCode()); ml = new MEMORIES(MainForm.save.getData(MEMORIES.Offset, MEMORIES.Size)); if (ml.block2.name == "") { MessageBox.Show("The savegame does not contain memory link Data.\n\nA default memory link data will be loaded, it unlocks the following:" + "\n\t- All 8 flashbacks" + "\n\t- NPC Battles with Cheren and Bianca" + "\n\t- NPC will use BW1 trainer name instead of just Trainer" + "\n\t- Certificates for completed Pokedex and trophies from Battle Subway\n\t (they are placed in the players room)" + "\n\t- My personal hall of fame from my BW1 playthrough\n\t (no known use in-game)" + "\n\nNote: No data related to Loblolly's Studio (would unlock Dream World furniture from BW on BW2) is present, but Dream World has closed anyways."); ml = new MEMORIES(default_memories); ml.block2.name = "PPorg"; ml.block2.TID = 25560; ml.block2.SID = 13453; UInt32 newseed = (UInt32)(rand.Next(0xFFFF + 1) << 16); ml.block1.crypt_seed = newseed; ml.block1_mirror.crypt_seed = newseed; //Needed so export memory doesn't export my own data (default_memories) load_data(); set_data(); } load_data(); // // TODO: Add constructor code after the InitializeComponent() call. // }