diff --git a/Resources/byte/fulldex_XY b/Resources/byte/fulldex_XY new file mode 100644 index 000000000..bf7566118 Binary files /dev/null and b/Resources/byte/fulldex_XY differ diff --git a/SAV/SAV_Pokedex.Designer.cs b/SAV/SAV_Pokedex.Designer.cs index 1bd40ef0d..d098ea620 100644 --- a/SAV/SAV_Pokedex.Designer.cs +++ b/SAV/SAV_Pokedex.Designer.cs @@ -30,7 +30,6 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_Pokedex)); this.B_Cancel = new System.Windows.Forms.Button(); - this.L_Beta = new System.Windows.Forms.Label(); this.LB_Species = new System.Windows.Forms.ListBox(); this.CHK_P1 = new System.Windows.Forms.CheckBox(); this.CHK_P2 = new System.Windows.Forms.CheckBox(); @@ -58,6 +57,8 @@ private void InitializeComponent() this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.CHK_F1 = new System.Windows.Forms.CheckBox(); + this.TB_Spinda = new System.Windows.Forms.TextBox(); + this.L_Spinda = new System.Windows.Forms.Label(); this.GB_Language.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -73,16 +74,6 @@ private void InitializeComponent() this.B_Cancel.UseVisualStyleBackColor = true; this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click); // - // L_Beta - // - this.L_Beta.AutoSize = true; - this.L_Beta.ForeColor = System.Drawing.Color.Red; - this.L_Beta.Location = new System.Drawing.Point(284, 196); - this.L_Beta.Name = "L_Beta"; - this.L_Beta.Size = new System.Drawing.Size(84, 13); - this.L_Beta.TabIndex = 1; - this.L_Beta.Text = "Still researching."; - // // LB_Species // this.LB_Species.FormattingEnabled = true; @@ -390,15 +381,35 @@ private void InitializeComponent() this.CHK_F1.UseVisualStyleBackColor = true; this.CHK_F1.Click += new System.EventHandler(this.changePartitionBool); // + // TB_Spinda + // + this.TB_Spinda.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.TB_Spinda.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TB_Spinda.Location = new System.Drawing.Point(317, 196); + this.TB_Spinda.Name = "TB_Spinda"; + this.TB_Spinda.Size = new System.Drawing.Size(60, 20); + this.TB_Spinda.TabIndex = 29; + this.TB_Spinda.Text = "12345678"; + // + // L_Spinda + // + this.L_Spinda.AutoSize = true; + this.L_Spinda.Location = new System.Drawing.Point(266, 198); + this.L_Spinda.Name = "L_Spinda"; + this.L_Spinda.Size = new System.Drawing.Size(43, 13); + this.L_Spinda.TabIndex = 30; + this.L_Spinda.Text = "Spinda:"; + // // SAV_Pokedex // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(394, 272); + this.Controls.Add(this.L_Spinda); + this.Controls.Add(this.TB_Spinda); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.GB_Language); - this.Controls.Add(this.L_Beta); this.Controls.Add(this.B_FillDex); this.Controls.Add(this.B_Save); this.Controls.Add(this.B_GiveAll); @@ -427,7 +438,6 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Button B_Cancel; - private System.Windows.Forms.Label L_Beta; private System.Windows.Forms.ListBox LB_Species; private System.Windows.Forms.CheckBox CHK_P1; private System.Windows.Forms.CheckBox CHK_P2; @@ -455,5 +465,7 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.CheckBox CHK_F1; + private System.Windows.Forms.TextBox TB_Spinda; + private System.Windows.Forms.Label L_Spinda; } } \ No newline at end of file diff --git a/SAV/SAV_Pokedex.cs b/SAV/SAV_Pokedex.cs index 4888e0ef5..1c635c8e2 100644 --- a/SAV/SAV_Pokedex.cs +++ b/SAV/SAV_Pokedex.cs @@ -21,6 +21,7 @@ public SAV_Pokedex(Form1 frm1) Setup(); editing = false; LB_Species.SelectedIndex = 0; + TB_Spinda.Text = BitConverter.ToUInt32(sav, 0x1AA48).ToString("X8"); } public byte[] sav = new Byte[0x100000]; public int savshift = 0; @@ -151,9 +152,12 @@ private void loadchks() if (pk > 721) { - CHK_P1.Checked = CHK_P1.Enabled = false; - CHK_P10.Checked = CHK_P10.Enabled = false; - CHK_P6.Enabled = CHK_P7.Enabled = CHK_P8.Enabled = CHK_P9.Enabled = false; + //CHK_P1.Checked = CHK_P1.Enabled = false; + //CHK_P10.Checked = CHK_P10.Enabled = false; + //CHK_P6.Enabled = CHK_P7.Enabled = CHK_P8.Enabled = CHK_P9.Enabled = false; + + for (int i = 0; i < 10; i++) + CP[i].Enabled = true; for (int i = 0; i < 7; i++) CL[i].Checked = CL[i].Enabled = false; @@ -251,13 +255,23 @@ private void B_Save_Click(object sender, EventArgs e) foreigndata[i / 8] |= (byte)(1 << i % 8); Array.Copy(foreigndata, 0, sav, savshift + 0x1AA4C, 0x52); } + + // Store Spinda Spot + try + { + uint PID = m_parent.getHEXval(TB_Spinda); + Array.Copy(BitConverter.GetBytes(PID), 0, sav, 0x1AA48 + savshift, 4); + } + catch { }; + + // Return back to the parent savefile Array.Copy(sav, m_parent.savefile, sav.Length); this.Close(); } private void B_GiveAll_Click(object sender, EventArgs e) { - if (LB_Species.SelectedIndex > 0x2D1) return; + if (LB_Species.SelectedIndex > 0x2D0) return; if (CHK_L1.Enabled) { CHK_L1.Checked = @@ -286,6 +300,7 @@ private void B_GiveAll_Click(object sender, EventArgs e) changePartitionBool(null, null); changeLanguageBool(null, null); + LB_Species.SelectedIndex++; } private void B_FillDex_Click(object sender, EventArgs e) { @@ -334,8 +349,10 @@ private void B_FillDex_Click(object sender, EventArgs e) //} // Copy Full Dex Byte Array - byte[] fulldex = (byte)Properties.Resources.fulldex_XY; - Array.Copy(sav, savshift + 0x1A408, fulldex, 0, fulldex.Length); + byte[] fulldex = Properties.Resources.fulldex_XY; + Array.Copy(fulldex, 0, sav, savshift + 0x1A400, 0x640); + // Skip the unknown sections. + Array.Copy(fulldex, 0x64C, sav, savshift + 0x1A400 + 0x64C, 0x54); editing = true; Setup(); diff --git a/SAV/SAV_Trainer.Designer.cs b/SAV/SAV_Trainer.Designer.cs index f8aad284c..1e497dda4 100644 --- a/SAV/SAV_Trainer.Designer.cs +++ b/SAV/SAV_Trainer.Designer.cs @@ -132,6 +132,10 @@ private void InitializeComponent() this.label19 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label(); this.GB_Appear = new System.Windows.Forms.GroupBox(); + this.MT_1403F = new System.Windows.Forms.MaskedTextBox(); + this.MT_1403E = new System.Windows.Forms.MaskedTextBox(); + this.MT_1403D = new System.Windows.Forms.MaskedTextBox(); + this.MT_1403C = new System.Windows.Forms.MaskedTextBox(); this.B_GiveAccessories = new System.Windows.Forms.Button(); this.MT_1403B = new System.Windows.Forms.MaskedTextBox(); this.MT_1403A = new System.Windows.Forms.MaskedTextBox(); @@ -184,10 +188,7 @@ private void InitializeComponent() this.CB_Stats = new System.Windows.Forms.ComboBox(); this.label39 = new System.Windows.Forms.Label(); this.MT_Stat = new System.Windows.Forms.MaskedTextBox(); - this.MT_1403F = new System.Windows.Forms.MaskedTextBox(); - this.MT_1403E = new System.Windows.Forms.MaskedTextBox(); - this.MT_1403D = new System.Windows.Forms.MaskedTextBox(); - this.MT_1403C = new System.Windows.Forms.MaskedTextBox(); + this.label35 = new System.Windows.Forms.Label(); this.GB_Badges.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pb8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pb6)).BeginInit(); @@ -1266,6 +1267,7 @@ private void InitializeComponent() // // GB_Appear // + this.GB_Appear.Controls.Add(this.label35); this.GB_Appear.Controls.Add(this.MT_1403F); this.GB_Appear.Controls.Add(this.MT_1403E); this.GB_Appear.Controls.Add(this.MT_1403D); @@ -1314,6 +1316,46 @@ private void InitializeComponent() this.GB_Appear.TabStop = false; this.GB_Appear.Text = "Current Appearance (X/Y)"; // + // MT_1403F + // + this.MT_1403F.Location = new System.Drawing.Point(90, 242); + this.MT_1403F.Mask = "000"; + this.MT_1403F.Name = "MT_1403F"; + this.MT_1403F.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.MT_1403F.Size = new System.Drawing.Size(26, 20); + this.MT_1403F.TabIndex = 71; + this.MT_1403F.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // MT_1403E + // + this.MT_1403E.Location = new System.Drawing.Point(64, 242); + this.MT_1403E.Mask = "000"; + this.MT_1403E.Name = "MT_1403E"; + this.MT_1403E.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.MT_1403E.Size = new System.Drawing.Size(26, 20); + this.MT_1403E.TabIndex = 70; + this.MT_1403E.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // MT_1403D + // + this.MT_1403D.Location = new System.Drawing.Point(38, 242); + this.MT_1403D.Mask = "000"; + this.MT_1403D.Name = "MT_1403D"; + this.MT_1403D.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.MT_1403D.Size = new System.Drawing.Size(26, 20); + this.MT_1403D.TabIndex = 69; + this.MT_1403D.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // MT_1403C + // + this.MT_1403C.Location = new System.Drawing.Point(12, 242); + this.MT_1403C.Mask = "000"; + this.MT_1403C.Name = "MT_1403C"; + this.MT_1403C.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.MT_1403C.Size = new System.Drawing.Size(26, 20); + this.MT_1403C.TabIndex = 68; + this.MT_1403C.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // // B_GiveAccessories // this.B_GiveAccessories.Location = new System.Drawing.Point(12, 180); @@ -1386,7 +1428,7 @@ private void InitializeComponent() // // MT_14035 // - this.MT_14035.Location = new System.Drawing.Point(142, 205); + this.MT_14035.Location = new System.Drawing.Point(142, 204); this.MT_14035.Mask = "000"; this.MT_14035.Name = "MT_14035"; this.MT_14035.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1396,7 +1438,7 @@ private void InitializeComponent() // // MT_14034 // - this.MT_14034.Location = new System.Drawing.Point(116, 205); + this.MT_14034.Location = new System.Drawing.Point(116, 204); this.MT_14034.Mask = "000"; this.MT_14034.Name = "MT_14034"; this.MT_14034.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1406,7 +1448,7 @@ private void InitializeComponent() // // MT_14033 // - this.MT_14033.Location = new System.Drawing.Point(90, 205); + this.MT_14033.Location = new System.Drawing.Point(90, 204); this.MT_14033.Mask = "000"; this.MT_14033.Name = "MT_14033"; this.MT_14033.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1416,7 +1458,7 @@ private void InitializeComponent() // // MT_14032 // - this.MT_14032.Location = new System.Drawing.Point(64, 205); + this.MT_14032.Location = new System.Drawing.Point(64, 204); this.MT_14032.Mask = "000"; this.MT_14032.Name = "MT_14032"; this.MT_14032.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1427,7 +1469,7 @@ private void InitializeComponent() // MT_14031 // this.MT_14031.Enabled = false; - this.MT_14031.Location = new System.Drawing.Point(38, 205); + this.MT_14031.Location = new System.Drawing.Point(38, 204); this.MT_14031.Mask = "000"; this.MT_14031.Name = "MT_14031"; this.MT_14031.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1437,7 +1479,7 @@ private void InitializeComponent() // // MT_14030 // - this.MT_14030.Location = new System.Drawing.Point(12, 205); + this.MT_14030.Location = new System.Drawing.Point(12, 204); this.MT_14030.Mask = "000"; this.MT_14030.Name = "MT_14030"; this.MT_14030.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1669,7 +1711,6 @@ private void InitializeComponent() this.label23.TabIndex = 1; this.label23.Text = "Hair Color:"; this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.label23.Visible = false; // // label22 // @@ -1679,6 +1720,7 @@ private void InitializeComponent() this.label22.TabIndex = 0; this.label22.Text = "Skin Color:"; this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.label22.Visible = false; // // GB_Map // @@ -1845,45 +1887,14 @@ private void InitializeComponent() this.MT_Stat.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; this.MT_Stat.TextChanged += new System.EventHandler(this.changeStatVal); // - // MT_1403F + // label35 // - this.MT_1403F.Location = new System.Drawing.Point(90, 242); - this.MT_1403F.Mask = "000"; - this.MT_1403F.Name = "MT_1403F"; - this.MT_1403F.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.MT_1403F.Size = new System.Drawing.Size(26, 20); - this.MT_1403F.TabIndex = 71; - this.MT_1403F.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // MT_1403E - // - this.MT_1403E.Location = new System.Drawing.Point(64, 242); - this.MT_1403E.Mask = "000"; - this.MT_1403E.Name = "MT_1403E"; - this.MT_1403E.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.MT_1403E.Size = new System.Drawing.Size(26, 20); - this.MT_1403E.TabIndex = 70; - this.MT_1403E.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // MT_1403D - // - this.MT_1403D.Location = new System.Drawing.Point(38, 242); - this.MT_1403D.Mask = "000"; - this.MT_1403D.Name = "MT_1403D"; - this.MT_1403D.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.MT_1403D.Size = new System.Drawing.Size(26, 20); - this.MT_1403D.TabIndex = 69; - this.MT_1403D.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // MT_1403C - // - this.MT_1403C.Location = new System.Drawing.Point(12, 242); - this.MT_1403C.Mask = "000"; - this.MT_1403C.Name = "MT_1403C"; - this.MT_1403C.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.MT_1403C.Size = new System.Drawing.Size(26, 20); - this.MT_1403C.TabIndex = 68; - this.MT_1403C.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.label35.AutoSize = true; + this.label35.Location = new System.Drawing.Point(116, 244); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(55, 13); + this.label35.TabIndex = 72; + this.label35.Text = "Outfit Vals"; // // SAV_Trainer // @@ -2097,5 +2108,6 @@ private void InitializeComponent() private System.Windows.Forms.MaskedTextBox MT_1403E; private System.Windows.Forms.MaskedTextBox MT_1403D; private System.Windows.Forms.MaskedTextBox MT_1403C; + private System.Windows.Forms.Label label35; } } \ No newline at end of file diff --git a/SAV/SAV_Trainer.cs b/SAV/SAV_Trainer.cs index c58d349e6..519a811c1 100644 --- a/SAV/SAV_Trainer.cs +++ b/SAV/SAV_Trainer.cs @@ -636,7 +636,6 @@ private void change255(object sender, EventArgs e) if (box.Text == "") box.Text = "0"; if (int.Parse(box.Text) > 255) box.Text = "255"; } - private void changeStat(object sender, EventArgs e) { editing = true; @@ -664,7 +663,6 @@ private void changeStatVal(object sender, EventArgs e) Array.Copy(data, 0, sav, pssoff + offset, 4); } } - private void giveAllAccessories(object sender, EventArgs e) { byte[] data = new byte[] {