diff --git a/BW_tool/BW_tool.csproj b/BW_tool/BW_tool.csproj index 68bb93a..6a117e6 100644 --- a/BW_tool/BW_tool.csproj +++ b/BW_tool/BW_tool.csproj @@ -54,6 +54,10 @@ DLC.cs + + + DreamRadar.cs + Entralink_DreamWorld.cs @@ -116,6 +120,9 @@ DLC.cs + + DreamRadar.cs + Dumper.cs diff --git a/BW_tool/Editors/DreamRadar.Designer.cs b/BW_tool/Editors/DreamRadar.Designer.cs new file mode 100644 index 0000000..88090e9 --- /dev/null +++ b/BW_tool/Editors/DreamRadar.Designer.cs @@ -0,0 +1,1203 @@ +/* + * Created by SharpDevelop. + * User: sergi + * Date: 23/03/2017 + * Time: 13:29 + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ +namespace BW_tool +{ + partial class DreamRadar + { + /// + /// Designer variable used to keep track of non-visual components. + /// + private System.ComponentModel.IContainer components = null; + private System.Windows.Forms.Button saveexit_but; + private System.Windows.Forms.Button exit_but; + private System.Windows.Forms.Button clean_but; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.ComboBox legend8; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox legend7; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.ComboBox legend6; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.ComboBox legend5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox legend4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox legend3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox legend2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox legend1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.ComboBox pkmgnd6; + private System.Windows.Forms.ComboBox pkmgnd5; + private System.Windows.Forms.ComboBox pkmgnd4; + private System.Windows.Forms.ComboBox pkmgnd3; + private System.Windows.Forms.ComboBox pkmgnd2; + private System.Windows.Forms.ComboBox pkmgnd1; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox pkm1; + private System.Windows.Forms.ComboBox pkm6; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.ComboBox pkm2; + private System.Windows.Forms.ComboBox pkm5; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.ComboBox pkm3; + private System.Windows.Forms.ComboBox pkm4; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.ComboBox item6; + private System.Windows.Forms.ComboBox item1; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.ComboBox item2; + private System.Windows.Forms.ComboBox item5; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.ComboBox item3; + private System.Windows.Forms.ComboBox item4; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.NumericUpDown itemcnt1; + private System.Windows.Forms.NumericUpDown itemcnt6; + private System.Windows.Forms.NumericUpDown itemcnt5; + private System.Windows.Forms.NumericUpDown itemcnt4; + private System.Windows.Forms.NumericUpDown itemcnt3; + private System.Windows.Forms.NumericUpDown itemcnt2; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.RadioButton allmode; + private System.Windows.Forms.RadioButton legitmode; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.CheckBox flag7; + private System.Windows.Forms.CheckBox flag3; + private System.Windows.Forms.CheckBox flag6; + private System.Windows.Forms.CheckBox flag2; + private System.Windows.Forms.CheckBox flag5; + private System.Windows.Forms.CheckBox flag1; + private System.Windows.Forms.CheckBox flag4; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.CheckBox flag0; + + /// + /// Disposes resources used by the form. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing) { + if (components != null) { + components.Dispose(); + } + } + base.Dispose(disposing); + } + /// + /// This method is required for Windows Forms designer support. + /// Do not change the method contents inside the source code editor. The Forms designer might + /// not be able to load this method if it was changed manually. + /// + private void InitializeComponent() + { + this.saveexit_but = new System.Windows.Forms.Button(); + this.exit_but = new System.Windows.Forms.Button(); + this.clean_but = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label5 = new System.Windows.Forms.Label(); + this.legend8 = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); + this.legend7 = new System.Windows.Forms.ComboBox(); + this.label7 = new System.Windows.Forms.Label(); + this.legend6 = new System.Windows.Forms.ComboBox(); + this.label8 = new System.Windows.Forms.Label(); + this.legend5 = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.legend4 = new System.Windows.Forms.ComboBox(); + this.label3 = new System.Windows.Forms.Label(); + this.legend3 = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.legend2 = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.legend1 = new System.Windows.Forms.ComboBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label24 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.pkmgnd6 = new System.Windows.Forms.ComboBox(); + this.pkmgnd5 = new System.Windows.Forms.ComboBox(); + this.pkmgnd4 = new System.Windows.Forms.ComboBox(); + this.pkmgnd3 = new System.Windows.Forms.ComboBox(); + this.pkmgnd2 = new System.Windows.Forms.ComboBox(); + this.pkmgnd1 = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); + this.pkm1 = new System.Windows.Forms.ComboBox(); + this.pkm6 = new System.Windows.Forms.ComboBox(); + this.label14 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.pkm2 = new System.Windows.Forms.ComboBox(); + this.pkm5 = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.pkm3 = new System.Windows.Forms.ComboBox(); + this.pkm4 = new System.Windows.Forms.ComboBox(); + this.label12 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.itemcnt6 = new System.Windows.Forms.NumericUpDown(); + this.itemcnt5 = new System.Windows.Forms.NumericUpDown(); + this.itemcnt4 = new System.Windows.Forms.NumericUpDown(); + this.itemcnt3 = new System.Windows.Forms.NumericUpDown(); + this.itemcnt2 = new System.Windows.Forms.NumericUpDown(); + this.itemcnt1 = new System.Windows.Forms.NumericUpDown(); + this.label15 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.item6 = new System.Windows.Forms.ComboBox(); + this.item1 = new System.Windows.Forms.ComboBox(); + this.label16 = new System.Windows.Forms.Label(); + this.item2 = new System.Windows.Forms.ComboBox(); + this.item5 = new System.Windows.Forms.ComboBox(); + this.label19 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.item3 = new System.Windows.Forms.ComboBox(); + this.item4 = new System.Windows.Forms.ComboBox(); + this.label18 = new System.Windows.Forms.Label(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.allmode = new System.Windows.Forms.RadioButton(); + this.legitmode = new System.Windows.Forms.RadioButton(); + this.label21 = new System.Windows.Forms.Label(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.flag7 = new System.Windows.Forms.CheckBox(); + this.flag3 = new System.Windows.Forms.CheckBox(); + this.flag6 = new System.Windows.Forms.CheckBox(); + this.flag2 = new System.Windows.Forms.CheckBox(); + this.flag5 = new System.Windows.Forms.CheckBox(); + this.flag1 = new System.Windows.Forms.CheckBox(); + this.flag4 = new System.Windows.Forms.CheckBox(); + this.flag0 = new System.Windows.Forms.CheckBox(); + this.label25 = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt1)).BeginInit(); + this.groupBox4.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.SuspendLayout(); + // + // saveexit_but + // + this.saveexit_but.Location = new System.Drawing.Point(782, 245); + this.saveexit_but.Name = "saveexit_but"; + this.saveexit_but.Size = new System.Drawing.Size(99, 29); + this.saveexit_but.TabIndex = 11; + this.saveexit_but.Text = "Save and Exit"; + this.saveexit_but.UseVisualStyleBackColor = true; + this.saveexit_but.Click += new System.EventHandler(this.Saveexit_butClick); + // + // exit_but + // + this.exit_but.Location = new System.Drawing.Point(909, 247); + this.exit_but.Name = "exit_but"; + this.exit_but.Size = new System.Drawing.Size(97, 27); + this.exit_but.TabIndex = 10; + this.exit_but.Text = "Exit"; + this.exit_but.UseVisualStyleBackColor = true; + this.exit_but.Click += new System.EventHandler(this.Exit_butClick); + // + // clean_but + // + this.clean_but.Location = new System.Drawing.Point(776, 15); + this.clean_but.Name = "clean_but"; + this.clean_but.Size = new System.Drawing.Size(230, 49); + this.clean_but.TabIndex = 12; + this.clean_but.Text = "RESET ALL DATA\n(allows to receive legendary Pokémon again)"; + this.clean_but.UseVisualStyleBackColor = true; + this.clean_but.Click += new System.EventHandler(this.Clean_butClick); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.legend8); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.legend7); + this.groupBox1.Controls.Add(this.label7); + this.groupBox1.Controls.Add(this.legend6); + this.groupBox1.Controls.Add(this.label8); + this.groupBox1.Controls.Add(this.legend5); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.legend4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.legend3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.legend2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.legend1); + this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(185, 243); + this.groupBox1.TabIndex = 13; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Legendary Slots"; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(6, 205); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(43, 23); + this.label5.TabIndex = 15; + this.label5.Text = "Slot 8"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend8 + // + this.legend8.FormattingEnabled = true; + this.legend8.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend8.Location = new System.Drawing.Point(55, 207); + this.legend8.Name = "legend8"; + this.legend8.Size = new System.Drawing.Size(104, 21); + this.legend8.TabIndex = 14; + // + // label6 + // + this.label6.Location = new System.Drawing.Point(6, 178); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(43, 23); + this.label6.TabIndex = 13; + this.label6.Text = "Slot 7"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend7 + // + this.legend7.FormattingEnabled = true; + this.legend7.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend7.Location = new System.Drawing.Point(55, 180); + this.legend7.Name = "legend7"; + this.legend7.Size = new System.Drawing.Size(104, 21); + this.legend7.TabIndex = 12; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(6, 151); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(43, 23); + this.label7.TabIndex = 11; + this.label7.Text = "Slot 6"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend6 + // + this.legend6.FormattingEnabled = true; + this.legend6.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend6.Location = new System.Drawing.Point(55, 153); + this.legend6.Name = "legend6"; + this.legend6.Size = new System.Drawing.Size(104, 21); + this.legend6.TabIndex = 10; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(6, 124); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(43, 23); + this.label8.TabIndex = 9; + this.label8.Text = "Slot 5"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend5 + // + this.legend5.FormattingEnabled = true; + this.legend5.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend5.Location = new System.Drawing.Point(55, 126); + this.legend5.Name = "legend5"; + this.legend5.Size = new System.Drawing.Size(104, 21); + this.legend5.TabIndex = 8; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(6, 97); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(43, 23); + this.label4.TabIndex = 7; + this.label4.Text = "Slot 4"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend4 + // + this.legend4.FormattingEnabled = true; + this.legend4.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend4.Location = new System.Drawing.Point(55, 99); + this.legend4.Name = "legend4"; + this.legend4.Size = new System.Drawing.Size(104, 21); + this.legend4.TabIndex = 6; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(6, 70); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(43, 23); + this.label3.TabIndex = 5; + this.label3.Text = "Slot 3"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend3 + // + this.legend3.FormattingEnabled = true; + this.legend3.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend3.Location = new System.Drawing.Point(55, 72); + this.legend3.Name = "legend3"; + this.legend3.Size = new System.Drawing.Size(104, 21); + this.legend3.TabIndex = 4; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(6, 43); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(43, 23); + this.label2.TabIndex = 3; + this.label2.Text = "Slot 2"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend2 + // + this.legend2.FormattingEnabled = true; + this.legend2.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend2.Location = new System.Drawing.Point(55, 45); + this.legend2.Name = "legend2"; + this.legend2.Size = new System.Drawing.Size(104, 21); + this.legend2.TabIndex = 2; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(6, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(43, 23); + this.label1.TabIndex = 1; + this.label1.Text = "Slot 1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // legend1 + // + this.legend1.FormattingEnabled = true; + this.legend1.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.legend1.Location = new System.Drawing.Point(55, 18); + this.legend1.Name = "legend1"; + this.legend1.Size = new System.Drawing.Size(104, 21); + this.legend1.TabIndex = 0; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label24); + this.groupBox2.Controls.Add(this.label23); + this.groupBox2.Controls.Add(this.label22); + this.groupBox2.Controls.Add(this.pkmgnd6); + this.groupBox2.Controls.Add(this.pkmgnd5); + this.groupBox2.Controls.Add(this.pkmgnd4); + this.groupBox2.Controls.Add(this.pkmgnd3); + this.groupBox2.Controls.Add(this.pkmgnd2); + this.groupBox2.Controls.Add(this.pkmgnd1); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.pkm1); + this.groupBox2.Controls.Add(this.pkm6); + this.groupBox2.Controls.Add(this.label14); + this.groupBox2.Controls.Add(this.label10); + this.groupBox2.Controls.Add(this.pkm2); + this.groupBox2.Controls.Add(this.pkm5); + this.groupBox2.Controls.Add(this.label13); + this.groupBox2.Controls.Add(this.label11); + this.groupBox2.Controls.Add(this.pkm3); + this.groupBox2.Controls.Add(this.pkm4); + this.groupBox2.Controls.Add(this.label12); + this.groupBox2.Location = new System.Drawing.Point(203, 12); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(239, 243); + this.groupBox2.TabIndex = 14; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Pokémon Slots"; + // + // label24 + // + this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label24.Location = new System.Drawing.Point(165, 20); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(52, 23); + this.label24.TabIndex = 36; + this.label24.Text = "Gender"; + this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label23 + // + this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label23.Location = new System.Drawing.Point(55, 20); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(104, 23); + this.label23.TabIndex = 35; + this.label23.Text = "Species"; + this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label22 + // + this.label22.Location = new System.Drawing.Point(16, 209); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(214, 31); + this.label22.TabIndex = 34; + this.label22.Text = "Note: fixed gender and genderless species will be auto-corrected when saving."; + // + // pkmgnd6 + // + this.pkmgnd6.FormattingEnabled = true; + this.pkmgnd6.Items.AddRange(new object[] { + "♂", + "♀", + "Genderless"}); + this.pkmgnd6.Location = new System.Drawing.Point(165, 180); + this.pkmgnd6.Name = "pkmgnd6"; + this.pkmgnd6.Size = new System.Drawing.Size(52, 21); + this.pkmgnd6.TabIndex = 33; + // + // pkmgnd5 + // + this.pkmgnd5.FormattingEnabled = true; + this.pkmgnd5.Items.AddRange(new object[] { + "♂", + "♀", + "Genderless"}); + this.pkmgnd5.Location = new System.Drawing.Point(165, 153); + this.pkmgnd5.Name = "pkmgnd5"; + this.pkmgnd5.Size = new System.Drawing.Size(52, 21); + this.pkmgnd5.TabIndex = 32; + // + // pkmgnd4 + // + this.pkmgnd4.FormattingEnabled = true; + this.pkmgnd4.Items.AddRange(new object[] { + "♂", + "♀", + "Genderless"}); + this.pkmgnd4.Location = new System.Drawing.Point(165, 126); + this.pkmgnd4.Name = "pkmgnd4"; + this.pkmgnd4.Size = new System.Drawing.Size(52, 21); + this.pkmgnd4.TabIndex = 31; + // + // pkmgnd3 + // + this.pkmgnd3.FormattingEnabled = true; + this.pkmgnd3.Items.AddRange(new object[] { + "♂", + "♀", + "Genderless"}); + this.pkmgnd3.Location = new System.Drawing.Point(165, 99); + this.pkmgnd3.Name = "pkmgnd3"; + this.pkmgnd3.Size = new System.Drawing.Size(52, 21); + this.pkmgnd3.TabIndex = 30; + // + // pkmgnd2 + // + this.pkmgnd2.FormattingEnabled = true; + this.pkmgnd2.Items.AddRange(new object[] { + "♂", + "♀", + "Genderless"}); + this.pkmgnd2.Location = new System.Drawing.Point(165, 72); + this.pkmgnd2.Name = "pkmgnd2"; + this.pkmgnd2.Size = new System.Drawing.Size(52, 21); + this.pkmgnd2.TabIndex = 29; + // + // pkmgnd1 + // + this.pkmgnd1.FormattingEnabled = true; + this.pkmgnd1.Items.AddRange(new object[] { + "♂", + "♀", + "Genderless"}); + this.pkmgnd1.Location = new System.Drawing.Point(165, 45); + this.pkmgnd1.Name = "pkmgnd1"; + this.pkmgnd1.Size = new System.Drawing.Size(52, 21); + this.pkmgnd1.TabIndex = 28; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(6, 178); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(43, 23); + this.label9.TabIndex = 27; + this.label9.Text = "Slot 6"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // pkm1 + // + this.pkm1.FormattingEnabled = true; + this.pkm1.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.pkm1.Location = new System.Drawing.Point(55, 45); + this.pkm1.Name = "pkm1"; + this.pkm1.Size = new System.Drawing.Size(104, 21); + this.pkm1.TabIndex = 16; + // + // pkm6 + // + this.pkm6.FormattingEnabled = true; + this.pkm6.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.pkm6.Location = new System.Drawing.Point(55, 180); + this.pkm6.Name = "pkm6"; + this.pkm6.Size = new System.Drawing.Size(104, 21); + this.pkm6.TabIndex = 26; + // + // label14 + // + this.label14.Location = new System.Drawing.Point(6, 43); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(43, 23); + this.label14.TabIndex = 17; + this.label14.Text = "Slot 1"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label10 + // + this.label10.Location = new System.Drawing.Point(6, 151); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(43, 23); + this.label10.TabIndex = 25; + this.label10.Text = "Slot 5"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // pkm2 + // + this.pkm2.FormattingEnabled = true; + this.pkm2.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.pkm2.Location = new System.Drawing.Point(55, 72); + this.pkm2.Name = "pkm2"; + this.pkm2.Size = new System.Drawing.Size(104, 21); + this.pkm2.TabIndex = 18; + // + // pkm5 + // + this.pkm5.FormattingEnabled = true; + this.pkm5.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.pkm5.Location = new System.Drawing.Point(55, 153); + this.pkm5.Name = "pkm5"; + this.pkm5.Size = new System.Drawing.Size(104, 21); + this.pkm5.TabIndex = 24; + // + // label13 + // + this.label13.Location = new System.Drawing.Point(6, 70); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(43, 23); + this.label13.TabIndex = 19; + this.label13.Text = "Slot 2"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label11 + // + this.label11.Location = new System.Drawing.Point(6, 124); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(43, 23); + this.label11.TabIndex = 23; + this.label11.Text = "Slot 4"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // pkm3 + // + this.pkm3.FormattingEnabled = true; + this.pkm3.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.pkm3.Location = new System.Drawing.Point(55, 99); + this.pkm3.Name = "pkm3"; + this.pkm3.Size = new System.Drawing.Size(104, 21); + this.pkm3.TabIndex = 20; + // + // pkm4 + // + this.pkm4.FormattingEnabled = true; + this.pkm4.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.pkm4.Location = new System.Drawing.Point(55, 126); + this.pkm4.Name = "pkm4"; + this.pkm4.Size = new System.Drawing.Size(104, 21); + this.pkm4.TabIndex = 22; + // + // label12 + // + this.label12.Location = new System.Drawing.Point(6, 97); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(43, 23); + this.label12.TabIndex = 21; + this.label12.Text = "Slot 3"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.itemcnt6); + this.groupBox3.Controls.Add(this.itemcnt5); + this.groupBox3.Controls.Add(this.itemcnt4); + this.groupBox3.Controls.Add(this.itemcnt3); + this.groupBox3.Controls.Add(this.itemcnt2); + this.groupBox3.Controls.Add(this.itemcnt1); + this.groupBox3.Controls.Add(this.label15); + this.groupBox3.Controls.Add(this.label20); + this.groupBox3.Controls.Add(this.item6); + this.groupBox3.Controls.Add(this.item1); + this.groupBox3.Controls.Add(this.label16); + this.groupBox3.Controls.Add(this.item2); + this.groupBox3.Controls.Add(this.item5); + this.groupBox3.Controls.Add(this.label19); + this.groupBox3.Controls.Add(this.label17); + this.groupBox3.Controls.Add(this.item3); + this.groupBox3.Controls.Add(this.item4); + this.groupBox3.Controls.Add(this.label18); + this.groupBox3.Location = new System.Drawing.Point(491, 12); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(279, 243); + this.groupBox3.TabIndex = 15; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Item Slots"; + // + // itemcnt6 + // + this.itemcnt6.Location = new System.Drawing.Point(165, 181); + this.itemcnt6.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.itemcnt6.Name = "itemcnt6"; + this.itemcnt6.Size = new System.Drawing.Size(50, 20); + this.itemcnt6.TabIndex = 45; + // + // itemcnt5 + // + this.itemcnt5.Location = new System.Drawing.Point(165, 154); + this.itemcnt5.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.itemcnt5.Name = "itemcnt5"; + this.itemcnt5.Size = new System.Drawing.Size(50, 20); + this.itemcnt5.TabIndex = 44; + // + // itemcnt4 + // + this.itemcnt4.Location = new System.Drawing.Point(165, 127); + this.itemcnt4.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.itemcnt4.Name = "itemcnt4"; + this.itemcnt4.Size = new System.Drawing.Size(50, 20); + this.itemcnt4.TabIndex = 43; + // + // itemcnt3 + // + this.itemcnt3.Location = new System.Drawing.Point(165, 100); + this.itemcnt3.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.itemcnt3.Name = "itemcnt3"; + this.itemcnt3.Size = new System.Drawing.Size(50, 20); + this.itemcnt3.TabIndex = 42; + // + // itemcnt2 + // + this.itemcnt2.Location = new System.Drawing.Point(165, 73); + this.itemcnt2.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.itemcnt2.Name = "itemcnt2"; + this.itemcnt2.Size = new System.Drawing.Size(50, 20); + this.itemcnt2.TabIndex = 41; + // + // itemcnt1 + // + this.itemcnt1.Location = new System.Drawing.Point(165, 46); + this.itemcnt1.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.itemcnt1.Name = "itemcnt1"; + this.itemcnt1.Size = new System.Drawing.Size(50, 20); + this.itemcnt1.TabIndex = 40; + // + // label15 + // + this.label15.Location = new System.Drawing.Point(6, 178); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(43, 23); + this.label15.TabIndex = 39; + this.label15.Text = "Slot 6"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label20 + // + this.label20.Location = new System.Drawing.Point(6, 43); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(43, 23); + this.label20.TabIndex = 29; + this.label20.Text = "Slot 1"; + this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // item6 + // + this.item6.FormattingEnabled = true; + this.item6.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.item6.Location = new System.Drawing.Point(55, 180); + this.item6.Name = "item6"; + this.item6.Size = new System.Drawing.Size(104, 21); + this.item6.TabIndex = 38; + // + // item1 + // + this.item1.FormattingEnabled = true; + this.item1.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.item1.Location = new System.Drawing.Point(55, 45); + this.item1.Name = "item1"; + this.item1.Size = new System.Drawing.Size(104, 21); + this.item1.TabIndex = 28; + // + // label16 + // + this.label16.Location = new System.Drawing.Point(6, 151); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(43, 23); + this.label16.TabIndex = 37; + this.label16.Text = "Slot 5"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // item2 + // + this.item2.FormattingEnabled = true; + this.item2.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.item2.Location = new System.Drawing.Point(55, 72); + this.item2.Name = "item2"; + this.item2.Size = new System.Drawing.Size(104, 21); + this.item2.TabIndex = 30; + // + // item5 + // + this.item5.FormattingEnabled = true; + this.item5.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.item5.Location = new System.Drawing.Point(55, 153); + this.item5.Name = "item5"; + this.item5.Size = new System.Drawing.Size(104, 21); + this.item5.TabIndex = 36; + // + // label19 + // + this.label19.Location = new System.Drawing.Point(6, 70); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(43, 23); + this.label19.TabIndex = 31; + this.label19.Text = "Slot 2"; + this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label17 + // + this.label17.Location = new System.Drawing.Point(6, 124); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(43, 23); + this.label17.TabIndex = 35; + this.label17.Text = "Slot 4"; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // item3 + // + this.item3.FormattingEnabled = true; + this.item3.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.item3.Location = new System.Drawing.Point(55, 99); + this.item3.Name = "item3"; + this.item3.Size = new System.Drawing.Size(104, 21); + this.item3.TabIndex = 32; + // + // item4 + // + this.item4.FormattingEnabled = true; + this.item4.Items.AddRange(new object[] { + "NONE", + "Tornadus", + "Thundurus", + "Landorus", + "Dialga", + "Palkia", + "Giratina", + "Ho-Oh", + "Lugia"}); + this.item4.Location = new System.Drawing.Point(55, 126); + this.item4.Name = "item4"; + this.item4.Size = new System.Drawing.Size(104, 21); + this.item4.TabIndex = 34; + // + // label18 + // + this.label18.Location = new System.Drawing.Point(6, 97); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(43, 23); + this.label18.TabIndex = 33; + this.label18.Text = "Slot 3"; + this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label25); + this.groupBox4.Controls.Add(this.allmode); + this.groupBox4.Controls.Add(this.legitmode); + this.groupBox4.Location = new System.Drawing.Point(776, 185); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(230, 56); + this.groupBox4.TabIndex = 16; + this.groupBox4.TabStop = false; + // + // allmode + // + this.allmode.Location = new System.Drawing.Point(129, 9); + this.allmode.Name = "allmode"; + this.allmode.Size = new System.Drawing.Size(83, 24); + this.allmode.TabIndex = 1; + this.allmode.TabStop = true; + this.allmode.Text = "All Mode"; + this.allmode.UseVisualStyleBackColor = true; + this.allmode.CheckedChanged += new System.EventHandler(this.AllmodeCheckedChanged); + // + // legitmode + // + this.legitmode.Location = new System.Drawing.Point(40, 9); + this.legitmode.Name = "legitmode"; + this.legitmode.Size = new System.Drawing.Size(83, 24); + this.legitmode.TabIndex = 0; + this.legitmode.TabStop = true; + this.legitmode.Text = "Legit Mode"; + this.legitmode.UseVisualStyleBackColor = true; + this.legitmode.CheckedChanged += new System.EventHandler(this.LegitmodeCheckedChanged); + // + // label21 + // + this.label21.Location = new System.Drawing.Point(12, 258); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(758, 23); + this.label21.TabIndex = 17; + this.label21.Text = "Note: Dream Radar only allows to transfer a total of 6 Pokémon (including normal " + + "+ legendaries) even though you can transfer 14 at once using this editor."; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.flag7); + this.groupBox5.Controls.Add(this.flag3); + this.groupBox5.Controls.Add(this.flag6); + this.groupBox5.Controls.Add(this.flag2); + this.groupBox5.Controls.Add(this.flag5); + this.groupBox5.Controls.Add(this.flag1); + this.groupBox5.Controls.Add(this.flag4); + this.groupBox5.Controls.Add(this.flag0); + this.groupBox5.Location = new System.Drawing.Point(776, 70); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(230, 112); + this.groupBox5.TabIndex = 18; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Legendary Flags"; + // + // flag7 + // + this.flag7.AutoCheck = false; + this.flag7.Location = new System.Drawing.Point(108, 85); + this.flag7.Name = "flag7"; + this.flag7.Size = new System.Drawing.Size(104, 24); + this.flag7.TabIndex = 7; + this.flag7.Text = "Lugia"; + this.flag7.UseVisualStyleBackColor = true; + // + // flag3 + // + this.flag3.AutoCheck = false; + this.flag3.Location = new System.Drawing.Point(6, 85); + this.flag3.Name = "flag3"; + this.flag3.Size = new System.Drawing.Size(104, 24); + this.flag3.TabIndex = 6; + this.flag3.Text = "Dialga"; + this.flag3.UseVisualStyleBackColor = true; + // + // flag6 + // + this.flag6.AutoCheck = false; + this.flag6.Location = new System.Drawing.Point(108, 62); + this.flag6.Name = "flag6"; + this.flag6.Size = new System.Drawing.Size(104, 24); + this.flag6.TabIndex = 5; + this.flag6.Text = "Ho-Oh"; + this.flag6.UseVisualStyleBackColor = true; + // + // flag2 + // + this.flag2.AutoCheck = false; + this.flag2.Location = new System.Drawing.Point(6, 62); + this.flag2.Name = "flag2"; + this.flag2.Size = new System.Drawing.Size(104, 24); + this.flag2.TabIndex = 4; + this.flag2.Text = "Landorus"; + this.flag2.UseVisualStyleBackColor = true; + // + // flag5 + // + this.flag5.AutoCheck = false; + this.flag5.Location = new System.Drawing.Point(108, 39); + this.flag5.Name = "flag5"; + this.flag5.Size = new System.Drawing.Size(104, 24); + this.flag5.TabIndex = 3; + this.flag5.Text = "Giratina"; + this.flag5.UseVisualStyleBackColor = true; + // + // flag1 + // + this.flag1.AutoCheck = false; + this.flag1.Location = new System.Drawing.Point(6, 39); + this.flag1.Name = "flag1"; + this.flag1.Size = new System.Drawing.Size(104, 24); + this.flag1.TabIndex = 2; + this.flag1.Text = "Thundurus"; + this.flag1.UseVisualStyleBackColor = true; + // + // flag4 + // + this.flag4.AutoCheck = false; + this.flag4.Location = new System.Drawing.Point(108, 16); + this.flag4.Name = "flag4"; + this.flag4.Size = new System.Drawing.Size(104, 24); + this.flag4.TabIndex = 1; + this.flag4.Text = "Palkia"; + this.flag4.UseVisualStyleBackColor = true; + // + // flag0 + // + this.flag0.AutoCheck = false; + this.flag0.Location = new System.Drawing.Point(6, 16); + this.flag0.Name = "flag0"; + this.flag0.Size = new System.Drawing.Size(104, 24); + this.flag0.TabIndex = 0; + this.flag0.Text = "Tornadus"; + this.flag0.UseVisualStyleBackColor = true; + // + // label25 + // + this.label25.Location = new System.Drawing.Point(14, 34); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(209, 19); + this.label25.TabIndex = 2; + this.label25.Text = "Note: Changing mode will reload all data"; + // + // DreamRadar + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1018, 286); + this.Controls.Add(this.groupBox5); + this.Controls.Add(this.label21); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.clean_but); + this.Controls.Add(this.saveexit_but); + this.Controls.Add(this.exit_but); + this.Name = "DreamRadar"; + this.Text = "DreamRadar"; + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.itemcnt1)).EndInit(); + this.groupBox4.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.ResumeLayout(false); + + } + } +} diff --git a/BW_tool/Editors/DreamRadar.cs b/BW_tool/Editors/DreamRadar.cs new file mode 100644 index 0000000..41864cf --- /dev/null +++ b/BW_tool/Editors/DreamRadar.cs @@ -0,0 +1,853 @@ +/* + * Created by SharpDevelop. + * User: sergi + * Date: 23/03/2017 + * Time: 13:29 + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace BW_tool +{ + /// + /// Description of DreamRadar. + /// + public partial class DreamRadar : Form + { + DRKEY drkey; + int drkeyblock = 72; + DRA dra; + DRB drb; + + public DreamRadar() + { + // + // The InitializeComponent() call is required for Windows Forms designer support. + // + InitializeComponent(); + + drkey = new DRKEY(MainForm.save.getBlock(drkeyblock)); + dra = new DRA(MainForm.save.dslinkA_get()); + drb = new DRB(PKX5.cryptoXor32Array(MainForm.save.dslinkB_get(), 0, 0x5C, 0x5C)); //Get 3DS link data decrypted + + if (dra.received == false) + MessageBox.Show("Warning! There's unreceived data in the savegame!"); + + if (drb.illegal == true) + { + allmode.Checked = true; + set_all_list(); + + } + else + { + legitmode.Checked = true; + set_legal_list(); + } + + load_data(); + + // + // TODO: Add constructor code after the InitializeComponent() call. + // + } + void Exit_butClick(object sender, EventArgs e) + { + this.Close(); + } + void Saveexit_butClick(object sender, EventArgs e) + { + set_data(); + MainForm.save.setBlock(drkey.Data, 72); + MainForm.save.dslinkA_set(dra.Data); + MainForm.save.dslinkB_set(PKX5.cryptoXor32Array(drb.Data, 0, 0x5C, 0x5C)); + this.Close(); + } + void Clean_butClick(object sender, EventArgs e) + { + drkey.reinit(); + dra.reinit(); + drb.reinit(); + + MainForm.save.setBlock(drkey.Data, 72); + MainForm.save.dslinkA_set(dra.Data); + MainForm.save.dslinkB_set(PKX5.cryptoXor32Array(drb.Data, 0, 0x5C, 0x5C)); + this.Close(); + } + + void set_legal_list() + { + pkm1.Items.Clear(); + pkm2.Items.Clear(); + pkm3.Items.Clear(); + pkm4.Items.Clear(); + pkm5.Items.Clear(); + pkm6.Items.Clear(); + pkm1.Items.AddRange(TEXT.drpklist); + pkm2.Items.AddRange(TEXT.drpklist); + pkm3.Items.AddRange(TEXT.drpklist); + pkm4.Items.AddRange(TEXT.drpklist); + pkm5.Items.AddRange(TEXT.drpklist); + pkm6.Items.AddRange(TEXT.drpklist); + item1.Items.Clear(); + item2.Items.Clear(); + item3.Items.Clear(); + item4.Items.Clear(); + item5.Items.Clear(); + item6.Items.Clear(); + item1.Items.AddRange(TEXT.dritemlist); + item2.Items.AddRange(TEXT.dritemlist); + item3.Items.AddRange(TEXT.dritemlist); + item4.Items.AddRange(TEXT.dritemlist); + item5.Items.AddRange(TEXT.dritemlist); + item6.Items.AddRange(TEXT.dritemlist); + } + + void set_all_list() + { + pkm1.Items.Clear(); + pkm2.Items.Clear(); + pkm3.Items.Clear(); + pkm4.Items.Clear(); + pkm5.Items.Clear(); + pkm6.Items.Clear(); + pkm1.Items.AddRange(TEXT.pkmlist); + pkm2.Items.AddRange(TEXT.pkmlist); + pkm3.Items.AddRange(TEXT.pkmlist); + pkm4.Items.AddRange(TEXT.pkmlist); + pkm5.Items.AddRange(TEXT.pkmlist); + pkm6.Items.AddRange(TEXT.pkmlist); + item1.Items.Clear(); + item2.Items.Clear(); + item3.Items.Clear(); + item4.Items.Clear(); + item5.Items.Clear(); + item6.Items.Clear(); + item1.Items.AddRange(TEXT.itemlist); + item2.Items.AddRange(TEXT.itemlist); + item3.Items.AddRange(TEXT.itemlist); + item4.Items.AddRange(TEXT.itemlist); + item5.Items.AddRange(TEXT.itemlist); + item6.Items.AddRange(TEXT.itemlist); + } + int poke2legit(int species) + { + if (legitmode.Checked == true) + { + int i = 0; + for (i = 0; i<19; i++) + { + if (species == drb.legit_pk_index[i]) + return i; + } + } + return species; + } + int item2legit(int item) + { + if (legitmode.Checked == true) + { + int i = 0; + for (i = 0; i<24; i++) + { + if (item == drb.legit_item_index[i]) + return i; + } + } + return item; + } + void load_data() + { + pkm1.SelectedIndex = poke2legit(drb.get_poke_species(0)); + pkm2.SelectedIndex = poke2legit(drb.get_poke_species(1)); + pkm3.SelectedIndex = poke2legit(drb.get_poke_species(2)); + pkm4.SelectedIndex = poke2legit(drb.get_poke_species(3)); + pkm5.SelectedIndex = poke2legit(drb.get_poke_species(4)); + pkm6.SelectedIndex = poke2legit(drb.get_poke_species(5)); + + item1.SelectedIndex = item2legit(drb.get_item_id(0)); + item2.SelectedIndex = item2legit(drb.get_item_id(1)); + item3.SelectedIndex = item2legit(drb.get_item_id(2)); + item4.SelectedIndex = item2legit(drb.get_item_id(3)); + item5.SelectedIndex = item2legit(drb.get_item_id(4)); + item6.SelectedIndex = item2legit(drb.get_item_id(5)); + + pkmgnd1.SelectedIndex = drb.get_poke_gender(0); + pkmgnd2.SelectedIndex = drb.get_poke_gender(1); + pkmgnd3.SelectedIndex = drb.get_poke_gender(2); + pkmgnd4.SelectedIndex = drb.get_poke_gender(3); + pkmgnd5.SelectedIndex = drb.get_poke_gender(4); + pkmgnd6.SelectedIndex = drb.get_poke_gender(5); + + itemcnt1.Value = drb.get_item_amount(0); + itemcnt2.Value = drb.get_item_amount(1); + itemcnt3.Value = drb.get_item_amount(2); + itemcnt4.Value = drb.get_item_amount(3); + itemcnt5.Value = drb.get_item_amount(4); + itemcnt6.Value = drb.get_item_amount(5); + + legend1.SelectedIndex = drb.get_legend(0); + legend2.SelectedIndex = drb.get_legend(1); + legend3.SelectedIndex = drb.get_legend(2); + legend4.SelectedIndex = drb.get_legend(3); + legend5.SelectedIndex = drb.get_legend(4); + legend6.SelectedIndex = drb.get_legend(5); + legend7.SelectedIndex = drb.get_legend(6); + legend8.SelectedIndex = drb.get_legend(7); + + flag0.Checked = drkey.Tornadus; + flag1.Checked = drkey.Thundurus; + flag2.Checked = drkey.Landorus; + flag3.Checked = drkey.Dialga; + flag4.Checked = drkey.Palkia; + flag5.Checked = drkey.Giratina; + flag6.Checked = drkey.HoOh; + flag7.Checked = drkey.Lugia; + } + + void set_data() + { + //Legendary slots + switch (legend1.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 0); + break; + case 2: + drb.set_legend(DRB.Thundurus, 0); + break; + case 3: + drb.set_legend(DRB.Landorus, 0); + break; + case 4: + drb.set_legend(DRB.Dialga, 0); + break; + case 5: + drb.set_legend(DRB.Palkia, 0); + break; + case 6: + drb.set_legend(DRB.Giratina, 0); + break; + case 7: + drb.set_legend(DRB.HoOh, 0); + break; + case 8: + drb.set_legend(DRB.Lugia, 0); + break; + default: + drb.set_legend(0, 0); + break; + }; + switch (legend2.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 1); + break; + case 2: + drb.set_legend(DRB.Thundurus, 1); + break; + case 3: + drb.set_legend(DRB.Landorus, 1); + break; + case 4: + drb.set_legend(DRB.Dialga, 1); + break; + case 5: + drb.set_legend(DRB.Palkia, 1); + break; + case 6: + drb.set_legend(DRB.Giratina, 1); + break; + case 7: + drb.set_legend(DRB.HoOh, 1); + break; + case 8: + drb.set_legend(DRB.Lugia, 1); + break; + default: + drb.set_legend(0, 1); + break; + }; + switch (legend3.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 2); + break; + case 2: + drb.set_legend(DRB.Thundurus, 2); + break; + case 3: + drb.set_legend(DRB.Landorus, 2); + break; + case 4: + drb.set_legend(DRB.Dialga, 2); + break; + case 5: + drb.set_legend(DRB.Palkia, 2); + break; + case 6: + drb.set_legend(DRB.Giratina, 2); + break; + case 7: + drb.set_legend(DRB.HoOh, 2); + break; + case 8: + drb.set_legend(DRB.Lugia, 2); + break; + default: + drb.set_legend(0, 2); + break; + }; + switch (legend4.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 3); + break; + case 2: + drb.set_legend(DRB.Thundurus, 3); + break; + case 3: + drb.set_legend(DRB.Landorus, 3); + break; + case 4: + drb.set_legend(DRB.Dialga, 3); + break; + case 5: + drb.set_legend(DRB.Palkia, 3); + break; + case 6: + drb.set_legend(DRB.Giratina, 3); + break; + case 7: + drb.set_legend(DRB.HoOh, 3); + break; + case 8: + drb.set_legend(DRB.Lugia, 3); + break; + default: + drb.set_legend(0, 3); + break; + }; + switch (legend5.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 4); + break; + case 2: + drb.set_legend(DRB.Thundurus, 4); + break; + case 3: + drb.set_legend(DRB.Landorus, 4); + break; + case 4: + drb.set_legend(DRB.Dialga, 4); + break; + case 5: + drb.set_legend(DRB.Palkia, 4); + break; + case 6: + drb.set_legend(DRB.Giratina, 4); + break; + case 7: + drb.set_legend(DRB.HoOh, 4); + break; + case 8: + drb.set_legend(DRB.Lugia, 4); + break; + default: + drb.set_legend(0, 4); + break; + }; + switch (legend6.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 5); + break; + case 2: + drb.set_legend(DRB.Thundurus, 5); + break; + case 3: + drb.set_legend(DRB.Landorus, 5); + break; + case 4: + drb.set_legend(DRB.Dialga, 5); + break; + case 5: + drb.set_legend(DRB.Palkia, 5); + break; + case 6: + drb.set_legend(DRB.Giratina, 5); + break; + case 7: + drb.set_legend(DRB.HoOh, 5); + break; + case 8: + drb.set_legend(DRB.Lugia, 5); + break; + default: + drb.set_legend(0, 5); + break; + }; + switch (legend7.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 6); + break; + case 2: + drb.set_legend(DRB.Thundurus, 6); + break; + case 3: + drb.set_legend(DRB.Landorus, 6); + break; + case 4: + drb.set_legend(DRB.Dialga, 6); + break; + case 5: + drb.set_legend(DRB.Palkia, 6); + break; + case 6: + drb.set_legend(DRB.Giratina, 6); + break; + case 7: + drb.set_legend(DRB.HoOh, 6); + break; + case 8: + drb.set_legend(DRB.Lugia, 6); + break; + default: + drb.set_legend(0, 6); + break; + }; + switch (legend8.SelectedIndex) + { + case 1: + drb.set_legend(DRB.Tornadus, 7); + break; + case 2: + drb.set_legend(DRB.Thundurus, 7); + break; + case 3: + drb.set_legend(DRB.Landorus, 7); + break; + case 4: + drb.set_legend(DRB.Dialga, 7); + break; + case 5: + drb.set_legend(DRB.Palkia, 7); + break; + case 6: + drb.set_legend(DRB.Giratina, 7); + break; + case 7: + drb.set_legend(DRB.HoOh, 7); + break; + case 8: + drb.set_legend(DRB.Lugia, 7); + break; + default: + drb.set_legend(0, 7); + break; + }; + if (legitmode.Checked == true) + { + drb.set_poke(drb.legit_pk_index[pkm1.SelectedIndex], pkmgnd1.SelectedIndex, 0); + drb.set_poke(drb.legit_pk_index[pkm2.SelectedIndex], pkmgnd2.SelectedIndex, 1); + drb.set_poke(drb.legit_pk_index[pkm3.SelectedIndex], pkmgnd3.SelectedIndex, 2); + drb.set_poke(drb.legit_pk_index[pkm4.SelectedIndex], pkmgnd4.SelectedIndex, 3); + drb.set_poke(drb.legit_pk_index[pkm5.SelectedIndex], pkmgnd5.SelectedIndex, 4); + drb.set_poke(drb.legit_pk_index[pkm6.SelectedIndex], pkmgnd6.SelectedIndex, 5); + + drb.set_item((int)itemcnt1.Value, drb.legit_item_index[item1.SelectedIndex], 0); + drb.set_item((int)itemcnt2.Value, drb.legit_item_index[item2.SelectedIndex], 1); + drb.set_item((int)itemcnt3.Value, drb.legit_item_index[item3.SelectedIndex], 2); + drb.set_item((int)itemcnt4.Value, drb.legit_item_index[item4.SelectedIndex], 3); + drb.set_item((int)itemcnt5.Value, drb.legit_item_index[item5.SelectedIndex], 4); + drb.set_item((int)itemcnt6.Value, drb.legit_item_index[item6.SelectedIndex], 5); + } + else + { + drb.set_poke(pkm1.SelectedIndex, pkmgnd1.SelectedIndex, 0); + drb.set_poke(pkm2.SelectedIndex, pkmgnd2.SelectedIndex, 1); + drb.set_poke(pkm3.SelectedIndex, pkmgnd3.SelectedIndex, 2); + drb.set_poke(pkm4.SelectedIndex, pkmgnd4.SelectedIndex, 3); + drb.set_poke(pkm5.SelectedIndex, pkmgnd5.SelectedIndex, 4); + drb.set_poke(pkm6.SelectedIndex, pkmgnd6.SelectedIndex, 5); + + drb.set_item((int)itemcnt1.Value, item1.SelectedIndex, 0); + drb.set_item((int)itemcnt2.Value, item2.SelectedIndex, 1); + drb.set_item((int)itemcnt3.Value, item3.SelectedIndex, 2); + drb.set_item((int)itemcnt4.Value, item4.SelectedIndex, 3); + drb.set_item((int)itemcnt5.Value, item5.SelectedIndex, 4); + drb.set_item((int)itemcnt6.Value, item6.SelectedIndex, 5); + } + + int i = 0; + for(i=0;i Also seems to hold the lengedary flags! + { + get { return BitConverter.ToUInt32(Data, 0x0C); } + set { BitConverter.GetBytes((UInt32)value).CopyTo(Data, 0x0C); } + } + + public void reinit() //Call this to clean all data so legendaries can be received again. Must be used with the other classes reinit() for it to work + { + received = true; + unknown1 = 0; + Ident = ident; + key = 0; + } + + } + public class DRB + { + public int Size = 0x60; + + public byte[] Data; + public DRB(byte[] data = null) + { + Data = data ?? new byte[Size]; + + //Read the legendary values + int i = 0; + for (i=0; i<8;i++) + { + legendaries[i] = BitConverter.ToUInt32(Data, 0x00 + i*4); + } + + //Read pokemon + for (i=0; i<6;i++) + { + pokes[i] = BitConverter.ToUInt32(Data, 0x20 + i*4); + } + + //Read items + for (i=0; i<6;i++) + { + items[i] = BitConverter.ToUInt32(Data, 0x38 + i*4); + } + + //Check legality of data + illegal = false; + int j = 0; + for (i=0; i<6;i++) + { + for (j=0;j<19;j++) + { + if (get_poke_species(i) == legit_pk_index[j]) + { + break; //Found valid index, continue next pokémon + } + else if ( (get_poke_species(i) != legit_pk_index[j]) && j == 18) //Couldn't find valid species index + { + illegal = true; + } + } + if (illegal == true) // No need to continue + break; + } + + if (illegal == false) + { + for (i=0; i<6;i++) + { + j = 0; + for (j=0;j<24;j++) + { + if (get_item_id(i) == legit_item_index[j]) + { + break; //Found valid index, continue next item + } + else if ( (get_item_id(i) != legit_item_index[j]) && j == 23) //Couldn't find valid item index + { + illegal = true; + } + } + if (illegal == true) // No need to continue + break; + } + } + + } + + public const UInt32 Tornadus = 0x80808080; + public const UInt32 Thundurus = 0x92567284; + public const UInt32 Landorus = 0x87643567; + public const UInt32 Dialga = 0x96436763; + public const UInt32 Palkia = 0x43867368; + public const UInt32 Giratina = 0x17693572; + public const UInt32 HoOh = 0x44798367; + public const UInt32 Lugia = 0x96636983; + + private UInt32[] legendaries = new UInt32[8]; + + public int[] legit_pk_index = new int[]{0, 79, 120, 137, 163, 174, 175, 213, 238, 280, 333, 374, 425, 436, 442, 447, 479, 517, 531}; + public int[] legit_item_index = new int[]{0, 72, 73, 74, 75, 51, 154, 28, 29, 80, 109, 81, 82, 83, 84, 85, 91, 93, 270, 275, 538, 44, 50, 221}; + + public bool illegal; + + public int get_legend(int index) //Simple wrapper for the legendary values + { + int legend = 0; + switch (legendaries[index]) + { + case Tornadus: + legend = 1; + break; + case Thundurus: + legend = 2; + break; + case Landorus: + legend = 3; + break; + case Dialga: + legend = 4; + break; + case Palkia: + legend = 5; + break; + case Giratina: + legend = 6; + break; + case HoOh: + legend = 7; + break; + case Lugia: + legend = 8; + break; + default: + legend = 0; + break; + } + return legend; + } + + public void set_legend(UInt32 legend, int index) + { + BitConverter.GetBytes(legend).CopyTo(Data, 0x00 + index*4); + } + UInt32[] pokes = new UInt32[6]; + UInt32[] items = new UInt32[6]; + + public int get_poke_species(int index) + { + return (int)pokes[index] >> 16; + } + public int get_poke_gender(int index) + { + return (int)pokes[index] & 0x0000000F; + } + + public void set_poke(int species, int gender, int index) + { + //TODO add genderless and single gender species filter + pokes[index] = (UInt32)(gender | (species << 16)); + BitConverter.GetBytes(pokes[index]).CopyTo(Data, 0x20 + index*4); + } + + public int get_item_id(int index) + { + return (int)items[index] & 0x0000FFFF; + } + public int get_item_amount(int index) + { + return (int)items[index] >> 16; + } + + public void set_item(int amount, int id, int index) + { + if (amount == 0 && id > 0) //Put 1 of an item if it's 0 + { + items[index] = (UInt32)((1 << 16) | id); + } + else if (id == 0) + { + items[index] = 0; + } + else + { + items[index] = (UInt32)((amount << 16) | id); + } + BitConverter.GetBytes(items[index]).CopyTo(Data, 0x20 + index*4); + } + + public UInt32 EncKey + { + get { return BitConverter.ToUInt32(Data, 0x5C); } + set { BitConverter.GetBytes((UInt32)value).CopyTo(Data, 0x5C); } + } + + public void reinit() //Call this to clean all data so legendaries can be received again. Must be used with the other classes reinit() for it to work + { + int i = 0; + for (i=0; i Also seems to hold the lengedary flags! +0x10 - 0x11 CRC-16-CCITT over 0x00 - 0x0F +0x12 - 0x13 0x0000 +0x14 - 0x33 legendary Pokemon (see values below) (8 x 4 Bytes) +0x34 - 0x4B normal Pokemon (6 x 4 Bytes) +0x4C - 0x63 Items (6 x 4 Bytes) +0x63 - 0x8F probably unused (all zero) +0x90 - 0x93 Decryption Key +0x94 - 0x95 CRC-16-CCITT over 0x14 - 0x93 +0x96 - 0x97 0x0000 + +Legendary Pokemon Values +0x80808080 Tornadus +0x92567284 Thundurus +0x87643567 Landorus +0x96436763 Dialga +0x43867368 Palkia +0x17693572 Giratina +0x44798367 Ho-Oh +0x96636983 Lugia + +Pokemon Structure +0x00 Gender (0 - Male, 1 - Female, 2 - Genderless) +0x01 unknown/unused +0x02 - 0x03 Species ID + +Item Structure +0x00 - 0x01 Quantity +0x02 - 0x03 Item ID + +*/ \ No newline at end of file diff --git a/BW_tool/Editors/DreamRadar.resx b/BW_tool/Editors/DreamRadar.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/BW_tool/Editors/DreamRadar.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BW_tool/Editors/Dumper.Designer.cs b/BW_tool/Editors/Dumper.Designer.cs index 8294dca..1834e45 100644 --- a/BW_tool/Editors/Dumper.Designer.cs +++ b/BW_tool/Editors/Dumper.Designer.cs @@ -172,7 +172,7 @@ namespace BW_tool "69 - Key-related data", "70 - Unknown (70d)", "71 - Unknown", - "72 - Unknown", + "72 - 3DS Link related data", "73 - Checksum Block (73d)"}); this.selectedblock.Location = new System.Drawing.Point(12, 12); this.selectedblock.MaxDropDownItems = 10; diff --git a/BW_tool/Editors/Medals.Designer.cs b/BW_tool/Editors/Medals.Designer.cs index 488324d..7d403ba 100644 --- a/BW_tool/Editors/Medals.Designer.cs +++ b/BW_tool/Editors/Medals.Designer.cs @@ -62,8 +62,6 @@ namespace BW_tool this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); - this.exit_but = new System.Windows.Forms.Button(); - this.saveexit_but = new System.Windows.Forms.Button(); this.flag1box = new System.Windows.Forms.CheckBox(); this.flag2box = new System.Windows.Forms.CheckBox(); this.flag3box = new System.Windows.Forms.CheckBox(); @@ -76,6 +74,8 @@ namespace BW_tool this.flag_hex = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.exit_but = new System.Windows.Forms.Button(); + this.saveexit_but = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.day)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.month)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.year)).BeginInit(); @@ -415,26 +415,6 @@ namespace BW_tool this.label3.TabIndex = 7; this.label3.Text = "Year"; // - // exit_but - // - this.exit_but.Location = new System.Drawing.Point(178, 184); - this.exit_but.Name = "exit_but"; - this.exit_but.Size = new System.Drawing.Size(97, 27); - this.exit_but.TabIndex = 8; - this.exit_but.Text = "Exit"; - this.exit_but.UseVisualStyleBackColor = true; - this.exit_but.Click += new System.EventHandler(this.Exit_butClick); - // - // saveexit_but - // - this.saveexit_but.Location = new System.Drawing.Point(178, 217); - this.saveexit_but.Name = "saveexit_but"; - this.saveexit_but.Size = new System.Drawing.Size(99, 29); - this.saveexit_but.TabIndex = 9; - this.saveexit_but.Text = "Save and Exit"; - this.saveexit_but.UseVisualStyleBackColor = true; - this.saveexit_but.Click += new System.EventHandler(this.Saveexit_butClick); - // // flag1box // this.flag1box.Location = new System.Drawing.Point(12, 67); @@ -543,6 +523,26 @@ namespace BW_tool this.label5.Text = "Flag hex:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // exit_but + // + this.exit_but.Location = new System.Drawing.Point(178, 184); + this.exit_but.Name = "exit_but"; + this.exit_but.Size = new System.Drawing.Size(97, 27); + this.exit_but.TabIndex = 8; + this.exit_but.Text = "Exit"; + this.exit_but.UseVisualStyleBackColor = true; + this.exit_but.Click += new System.EventHandler(this.Exit_butClick); + // + // saveexit_but + // + this.saveexit_but.Location = new System.Drawing.Point(178, 217); + this.saveexit_but.Name = "saveexit_but"; + this.saveexit_but.Size = new System.Drawing.Size(99, 29); + this.saveexit_but.TabIndex = 9; + this.saveexit_but.Text = "Save and Exit"; + this.saveexit_but.UseVisualStyleBackColor = true; + this.saveexit_but.Click += new System.EventHandler(this.Saveexit_butClick); + // // Medals // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/BW_tool/Editors/Text.cs b/BW_tool/Editors/Text.cs index 241ae84..0039892 100644 --- a/BW_tool/Editors/Text.cs +++ b/BW_tool/Editors/Text.cs @@ -1230,8 +1230,747 @@ namespace BW_tool "Fusion Flare", "Fusion Bolt" }; + public static object[] itemlist = new object[] { + "None", + "Master Ball", + "Ultra Ball", + "Great Ball", + "Poké Ball", + "Safari Ball", + "Net Ball", + "Dive Ball", + "Nest Ball", + "Repeat Ball", + "Timer Ball", + "Luxury Ball", + "Premier Ball", + "Dusk Ball", + "Heal Ball", + "Quick Ball", + "Cherish Ball", + "Potion", + "Antidote", + "Burn Heal", + "Ice Heal", + "Awakening", + "Parlyz Heal", + "Full Restore", + "Max Potion", + "Hyper Potion", + "Super Potion", + "Full Heal", + "Revive", + "Max Revive", + "Fresh Water", + "Soda Pop", + "Lemonade", + "Moomoo Milk", + "EnergyPowder", + "Energy Root", + "Heal Powder", + "Revival Herb", + "Ether", + "Max Ether", + "Elixir", + "Max Elixir", + "Lava Cookie", + "Berry Juice", + "Sacred Ash", + "HP Up", + "Protein", + "Iron", + "Carbos", + "Calcium", + "Rare Candy", + "PP Up", + "Zinc", + "PP Max", + "Old Gateau", + "Guard Spec.", + "Dire Hit", + "X Attack", + "X Defend", + "X Speed", + "X Accuracy", + "X Special", + "X Sp. Def", + "Poké Doll", + "Fluffy Tail", + "Blue Flute", + "Yellow Flute", + "Red Flute", + "Black Flute", + "White Flute", + "Shoal Salt", + "Shoal Shell", + "Red Shard", + "Blue Shard", + "Yellow Shard", + "Green Shard", + "Super Repel", + "Max Repel", + "Escape Rope", + "Repel", + "Sun Stone", + "Moon Stone", + "Fire Stone", + "Thunder Stone", + "Water Stone", + "Leaf Stone", + "TinyMushroom", + "Big Mushroom", + "Pearl", + "Big Pearl", + "Stardust", + "Star Piece", + "Nugget", + "Heart Scale", + "Honey", + "Growth Mulch", + "Damp Mulch", + "Stable Mulch", + "Gooey Mulch", + "Root Fossil", + "Claw Fossil", + "Helix Fossil", + "Dome Fossil", + "Old Amber", + "Armor Fossil", + "Skull Fossil", + "Rare Bone", + "Shiny Stone", + "Dusk Stone", + "Dawn Stone", + "Oval Stone", + "Odd Keystone", + "Griseous Orb", + "unknown", + "unknown", + "unknown", + "Douse Drive", + "Shock Drive", + "Burn Drive", + "Chill Drive", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "Sweet Heart", + "Adamant Orb", + "Lustrous Orb", + "Greet Mail", + "Favored Mail", + "RSVP Mail", + "Thanks Mail", + "Inquiry Mail", + "Like Mail", + "Reply Mail", + "BridgeMail S", + "BridgeMail D", + "BridgeMail T", + "BridgeMail V", + "BridgeMail M", + "Cheri Berry", + "Chesto Berry", + "Pecha Berry", + "Rawst Berry", + "Aspear Berry", + "Leppa Berry", + "Oran Berry", + "Persim Berry", + "Lum Berry", + "Sitrus Berry", + "Figy Berry", + "Wiki Berry", + "Mago Berry", + "Aguav Berry", + "Iapapa Berry", + "Razz Berry", + "Bluk Berry", + "Nanab Berry", + "Wepear Berry", + "Pinap Berry", + "Pomeg Berry", + "Kelpsy Berry", + "Qualot Berry", + "Hondew Berry", + "Grepa Berry", + "Tamato Berry", + "Cornn Berry", + "Magost Berry", + "Rabuta Berry", + "Nomel Berry", + "Spelon Berry", + "Pamtre Berry", + "Watmel Berry", + "Durin Berry", + "Belue Berry", + "Occa Berry", + "Passho Berry", + "Wacan Berry", + "Rindo Berry", + "Yache Berry", + "Chople Berry", + "Kebia Berry", + "Shuca Berry", + "Coba Berry", + "Payapa Berry", + "Tanga Berry", + "Charti Berry", + "Kasib Berry", + "Haban Berry", + "Colbur Berry", + "Babiri Berry", + "Chilan Berry", + "Liechi Berry", + "Ganlon Berry", + "Salac Berry", + "Petaya Berry", + "Apicot Berry", + "Lansat Berry", + "Starf Berry", + "Enigma Berry", + "Micle Berry", + "Custap Berry", + "Jaboca Berry", + "Rowap Berry", + "BrightPowder", + "White Herb", + "Macho Brace", + "Exp. Share", + "Quick Claw", + "Soothe Bell", + "Mental Herb", + "Choice Band", + "King's Rock", + "SilverPowder", + "Amulet Coin", + "Cleanse Tag", + "Soul Dew", + "DeepSeaTooth", + "DeepSeaScale", + "Smoke Ball", + "Everstone", + "Focus Band", + "Lucky Egg", + "Scope Lens", + "Metal Coat", + "Leftovers", + "Dragon Scale", + "Light Ball", + "Soft Sand", + "Hard Stone", + "Miracle Seed", + "BlackGlasses", + "Black Belt", + "Magnet", + "Mystic Water", + "Sharp Beak", + "Poison Barb", + "NeverMeltIce", + "Spell Tag", + "TwistedSpoon", + "Charcoal", + "Dragon Fang", + "Silk Scarf", + "Up-Grade", + "Shell Bell", + "Sea Incense", + "Lax Incense", + "Lucky Punch", + "Metal Powder", + "Thick Club", + "Stick", + "Red Scarf", + "Blue Scarf", + "Pink Scarf", + "Green Scarf", + "Yellow Scarf", + "Wide Lens", + "Muscle Band", + "Wise Glasses", + "Expert Belt", + "Light Clay", + "Life Orb", + "Power Herb", + "Toxic Orb", + "Flame Orb", + "Quick Powder", + "Focus Sash", + "Zoom Lens", + "Metronome", + "Iron Ball", + "Lagging Tail", + "Destiny Knot", + "Black Sludge", + "Icy Rock", + "Smooth Rock", + "Heat Rock", + "Damp Rock", + "Grip Claw", + "Choice Scarf", + "Sticky Barb", + "Power Bracer", + "Power Belt", + "Power Lens", + "Power Band", + "Power Anklet", + "Power Weight", + "Shed Shell", + "Big Root", + "Choice Specs", + "Flame Plate", + "Splash Plate", + "Zap Plate", + "Meadow Plate", + "Icicle Plate", + "Fist Plate", + "Toxic Plate", + "Earth Plate", + "Sky Plate", + "Mind Plate", + "Insect Plate", + "Stone Plate", + "Spooky Plate", + "Draco Plate", + "Dread Plate", + "Iron Plate", + "Odd Incense", + "Rock Incense", + "Full Incense", + "Wave Incense", + "Rose Incense", + "Luck Incense", + "Pure Incense", + "Protector", + "Electirizer", + "Magmarizer", + "Dubious Disc", + "Reaper Cloth", + "Razor Claw", + "Razor Fang", + "TM01", + "TM02", + "TM03", + "TM04", + "TM05", + "TM06", + "TM07", + "TM08", + "TM09", + "TM10", + "TM11", + "TM12", + "TM13", + "TM14", + "TM15", + "TM16", + "TM17", + "TM18", + "TM19", + "TM20", + "TM21", + "TM22", + "TM23", + "TM24", + "TM25", + "TM26", + "TM27", + "TM28", + "TM29", + "TM30", + "TM31", + "TM32", + "TM33", + "TM34", + "TM35", + "TM36", + "TM37", + "TM38", + "TM39", + "TM40", + "TM41", + "TM42", + "TM43", + "TM44", + "TM45", + "TM46", + "TM47", + "TM48", + "TM49", + "TM50", + "TM51", + "TM52", + "TM53", + "TM54", + "TM55", + "TM56", + "TM57", + "TM58", + "TM59", + "TM60", + "TM61", + "TM62", + "TM63", + "TM64", + "TM65", + "TM66", + "TM67", + "TM68", + "TM69", + "TM70", + "TM71", + "TM72", + "TM73", + "TM74", + "TM75", + "TM76", + "TM77", + "TM78", + "TM79", + "TM80", + "TM81", + "TM82", + "TM83", + "TM84", + "TM85", + "TM86", + "TM87", + "TM88", + "TM89", + "TM90", + "TM91", + "TM92", + "HM01", + "HM02", + "HM03", + "HM04", + "HM05", + "HM06", + "unknown", + "unknown", + "Explorer Kit", + "Loot Sack", + "Rule Book", + "Poké Radar", + "Point Card", + "Journal", + "Seal Case", + "Fashion Case", + "Seal Bag", + "Pal Pad", + "Works Key", + "Old Charm", + "Galactic Key", + "Red Chain", + "Town Map", + "Vs. Seeker", + "Coin Case", + "Old Rod", + "Good Rod", + "Super Rod", + "Sprayduck", + "Poffin Case", + "Bicycle", + "Suite Key", + "Oak's Letter", + "Lunar Wing", + "Member Card", + "Azure Flute", + "S.S. Ticket", + "Contest Pass", + "Magma Stone", + "Parcel", + "Coupon 1", + "Coupon 2", + "Coupon 3", + "Storage Key", + "SecretPotion", + "Vs. Recorder", + "Gracidea", + "Secret Key", + "Apricorn Box", + "Unown Report", + "Berry Pots", + "Dowsing MCHN", + "Blue Card", + "SlowpokeTail", + "Clear Bell", + "Card Key", + "Basement Key", + "SquirtBottle", + "Red Scale", + "Lost Item", + "Pass", + "Machine Part", + "Silver Wing", + "Rainbow Wing", + "Mystery Egg", + "Red Apricorn", + "Ylw Apricorn", + "Blu Apricorn", + "Grn Apricorn", + "Pnk Apricorn", + "Wht Apricorn", + "Blk Apricorn", + "Fast Ball", + "Level Ball", + "Lure Ball", + "Heavy Ball", + "Love Ball", + "Friend Ball", + "Moon Ball", + "Sport Ball", + "Park Ball", + "Photo Album", + "GB Sounds", + "Tidal Bell", + "RageCandyBar", + "Data Card 01", + "Data Card 02", + "Data Card 03", + "Data Card 04", + "Data Card 05", + "Data Card 06", + "Data Card 07", + "Data Card 08", + "Data Card 09", + "Data Card 10", + "Data Card 11", + "Data Card 12", + "Data Card 13", + "Data Card 14", + "Data Card 15", + "Data Card 16", + "Data Card 17", + "Data Card 18", + "Data Card 19", + "Data Card 20", + "Data Card 21", + "Data Card 22", + "Data Card 23", + "Data Card 24", + "Data Card 25", + "Data Card 26", + "Data Card 27", + "Jade Orb", + "Lock Capsule", + "Red Orb", + "Blue Orb", + "Enigma Stone", + "Prism Scale", + "Eviolite", + "Float Stone", + "Rocky Helmet", + "Air Balloon", + "Red Card", + "Ring Target", + "Binding Band", + "Absorb Bulb", + "Cell Battery", + "Eject Button", + "Fire Gem", + "Water Gem", + "Electric Gem", + "Grass Gem", + "Ice Gem", + "Fighting Gem", + "Poison Gem", + "Ground Gem", + "Flying Gem", + "Psychic Gem", + "Bug Gem", + "Rock Gem", + "Ghost Gem", + "Dragon Gem", + "Dark Gem", + "Steel Gem", + "Normal Gem", + "Health Wing", + "Muscle Wing", + "Resist Wing", + "Genius Wing", + "Clever Wing", + "Swift Wing", + "Pretty Wing", + "Cover Fossil", + "Plume Fossil", + "Liberty Pass", + "Pass Orb", + "Dream Ball", + "Poké Toy", + "Prop Case", + "Dragon Skull", + "BalmMushroom", + "Big Nugget", + "Pearl String", + "Comet Shard", + "Relic Copper", + "Relic Silver", + "Relic Gold", + "Relic Vase", + "Relic Band", + "Relic Statue", + "Relic Crown", + "Casteliacone", + "Dire Hit 2", + "X Speed 2", + "X Special 2", + "X Sp. Def 2", + "X Defend 2", + "X Attack 2", + "X Accuracy 2", + "X Speed 3", + "X Special 3", + "X Sp. Def 3", + "X Defend 3", + "X Attack 3", + "X Accuracy 3", + "X Speed 6", + "X Special 6", + "X Sp. Def 6", + "X Defend 6", + "X Attack 6", + "X Accuracy 6", + "Ability Urge", + "Item Drop", + "Item Urge", + "Reset Urge", + "Dire Hit 3", + "Light Stone", + "Dark Stone", + "TM93", + "TM94", + "TM95", + "Xtransceiver (BW2 exclusive)", + "God Stone", + "Gram 1", + "Gram 2", + "Gram 3", + "Xtransceiver (BW2 exclusive)", + "Medal Box (BW2 exclusive)", + "DNA Splicers (BW2 exclusive)", + "DNA Splicers (BW2 exclusive)", + "Permit (BW2 exclusive)", + "Oval Charm (BW2 exclusive)", + "Shiny Charm (BW2 exclusive)", + "Plasma Card (BW2 exclusive)", + "Grubby Hanky (BW2 exclusive)", + "Colress MCHN (BW2 exclusive)", + "Dropped Item (BW2 exclusive)", + "Dropped Item (BW2 exclusive)", + "Reveal Glass (BW2 exclusive)" + }; + public static object[] drpklist = new object[] { + "NONE", + "079 - Slowpoke", + "120 - Staryu", + "137 - Porygon", + "163 - Hoothoot", + "174 - Igglybuff", + "175 - Togepi", + "213 - Shuckle", + "238 - Smoochum", + "280 - Ralts", + "333 - Swablu", + "374 - Beldum", + "425 - Drifloon", + "436 - Bronzor", + "442 - Spiritomb", + "447 - Riolu", + "479 - Rotom", + "517 - Munna", + "561 - Sigilyph" + }; + public static object[] dritemlist = new object[] { + "NONE", + "Red Shard", + "Blue Shard", + "Yellow Shard", + "Green Shard", + "PP Up", + "Leppa Berry", + "Revive", + "Max Revive", + "Sun Stone", + "Dawn Stone", + "Moon Stone", + "Fire Stone", + "Water Stone", + "Thunderstone", + "Leaf Stone", + "Star Piece", + "Heart Scale", + "Life Orb", + "Focus Sash", + "Eviolite", + "Sacred Ash", + "Rare Candy", + "King's Rock" + }; public void Text() { } } } + +/* + +079 - Slowpoke +120 - Staryu +137 - Porygon +163 - Hoothoot +174 - Igglybuff +175 - Togepi +213 - Shuckle +238 - Smoochum +280 - Ralts +333 - Swablu +374 - Beldum +425 - Drifloon +436 - Bronzor +442 - Spiritomb +447 - Riolu +479 - Rotom +517 - Munna +561 - Sigilyph + +{0, 79, 120, 137, 163, 174, 175, 213, 238, 280, 333, 374, 425, 436, 442, 447, 479, 517, 531} + + +Red Shard +Blue Shard +Yellow Shard +Green Shard +PP Up +Leppa Berry +Revive +Max Revive +Sun Stone +Dawn Stone +Moon Stone +Fire Stone +Thunderstone +Water Stone +Leaf Stone +Star Piece +Heart Scale +Life Orb +Focus Sash +Eviolite +Sacred Ash +Rare Candy +King's Rock + +{0, 72, 73, 74, 75, 51, 154, 28, 29, 80, 109, 81, 82, 83, 84, 85, 91, 93, 270, 275, 538, 44, 50, 221} +*/ diff --git a/BW_tool/MainForm.Designer.cs b/BW_tool/MainForm.Designer.cs index 7e12bd9..481ce64 100644 --- a/BW_tool/MainForm.Designer.cs +++ b/BW_tool/MainForm.Designer.cs @@ -31,6 +31,7 @@ namespace BW_tool private System.Windows.Forms.Button about; private System.Windows.Forms.Button memory_but; private System.Windows.Forms.Button dlc_but; + private System.Windows.Forms.Button dr_but; /// /// Disposes resources used by the form. @@ -70,6 +71,7 @@ namespace BW_tool this.about = new System.Windows.Forms.Button(); this.memory_but = new System.Windows.Forms.Button(); this.dlc_but = new System.Windows.Forms.Button(); + this.dr_but = new System.Windows.Forms.Button(); this.SuspendLayout(); // // loadsave_but @@ -250,12 +252,24 @@ namespace BW_tool this.dlc_but.UseVisualStyleBackColor = true; this.dlc_but.Click += new System.EventHandler(this.Dlc_butClick); // + // dr_but + // + this.dr_but.Enabled = false; + this.dr_but.Location = new System.Drawing.Point(12, 194); + this.dr_but.Name = "dr_but"; + this.dr_but.Size = new System.Drawing.Size(140, 23); + this.dr_but.TabIndex = 17; + this.dr_but.Text = "Dream Radar (3DS Link)"; + this.dr_but.UseVisualStyleBackColor = true; + this.dr_but.Click += new System.EventHandler(this.Dr_butClick); + // // MainForm // this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(503, 239); + this.Controls.Add(this.dr_but); this.Controls.Add(this.dlc_but); this.Controls.Add(this.memory_but); this.Controls.Add(this.about); diff --git a/BW_tool/MainForm.cs b/BW_tool/MainForm.cs index d38ea82..74955fb 100644 --- a/BW_tool/MainForm.cs +++ b/BW_tool/MainForm.cs @@ -91,6 +91,7 @@ namespace BW_tool trainer_but.Enabled = true; memory_but.Enabled = true; dlc_but.Enabled = true; + dr_but.Enabled = true; } else if (save.BW) { @@ -109,6 +110,7 @@ namespace BW_tool trainer_but.Enabled = true; memory_but.Enabled = false; dlc_but.Enabled = true; + dr_but.Enabled = false; } else versiontext.Text = "Invalid file"; @@ -129,6 +131,7 @@ namespace BW_tool trainer_but.Enabled = false; memory_but.Enabled = false; dlc_but.Enabled = false; + dr_but.Enabled = false; } } void Save_butClick(object sender, EventArgs e) @@ -203,5 +206,10 @@ namespace BW_tool Form dlc = new DLC(); dlc.ShowDialog(); } + void Dr_butClick(object sender, EventArgs e) + { + Form dr = new DreamRadar(); + dr.ShowDialog(); + } } } diff --git a/BW_tool/SAV/PKX5.cs b/BW_tool/SAV/PKX5.cs index f2a5b53..180cca1 100644 --- a/BW_tool/SAV/PKX5.cs +++ b/BW_tool/SAV/PKX5.cs @@ -73,6 +73,22 @@ namespace BW_tool return buffer_dec; } + internal static byte[] cryptoXor32Array(byte[] encarray, int start_offset, int length, int key_offset) + // -------------------------------------------------- + { + byte[] buffer_dec = (byte[])encarray.Clone(); + + UInt32 encKey = BitConverter.ToUInt32(encarray, key_offset); + + int i = 0; + for (i= 0; i< length; i+=4) + { + BitConverter.GetBytes(BitConverter.ToUInt32(encarray, start_offset + i) ^ encKey).CopyTo(buffer_dec, i); + } + + return buffer_dec; + } + // SAV Manipulation /// Calculates the CRC16-CCITT checksum over an input byte array. /// Input byte array diff --git a/BW_tool/SAV/SAV5.cs b/BW_tool/SAV/SAV5.cs index 37c27ce..d793598 100644 --- a/BW_tool/SAV/SAV5.cs +++ b/BW_tool/SAV/SAV5.cs @@ -615,5 +615,48 @@ namespace BW_tool ; } } + + public byte[] dslinkA_get() + { + if (B2W2 == true){ + return getData(0x7F000, 0x12); + }else{ + ; + } + return null; + } + public void dslinkA_set(byte[] dslinkA) + { + if (B2W2 == true) + { + setData(dslinkA, 0x7F000); + //Fix checksum + ushort crc = ccitt16(dslinkA); + setData(BitConverter.GetBytes(crc), 0x7F010); + //Just to be sure this is set 0xFFFF (seems basically unused though) + Data[0x7F012] = 0xFF; + Data[0x7F013] = 0xFF; + } + } + public byte[] dslinkB_get() + { + if (B2W2 == true){ + return getData(0x7F014, 0x80); + }else{ + ; + } + return null; + + } + public void dslinkB_set(byte[] dslinkB) + { + if (B2W2 == true) + { + setData(dslinkB, 0x7F014); + //Fix checksum + ushort crc = ccitt16(dslinkB); + setData(BitConverter.GetBytes(crc), 0x7F094); + } + } } } \ No newline at end of file