From ec7b92256800a87643c5a6ae00c9bdda68888696 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 31 Aug 2014 14:10:06 -0700 Subject: [PATCH] Data Changes --- Resources/byte/fulldex_XY | Bin 0 -> 1696 bytes SAV/SAV_Pokedex.Designer.cs | 38 ++++++++----- SAV/SAV_Pokedex.cs | 29 ++++++++-- SAV/SAV_Trainer.Designer.cs | 110 ++++++++++++++++++++---------------- SAV/SAV_Trainer.cs | 2 - 5 files changed, 109 insertions(+), 70 deletions(-) create mode 100644 Resources/byte/fulldex_XY diff --git a/Resources/byte/fulldex_XY b/Resources/byte/fulldex_XY new file mode 100644 index 0000000000000000000000000000000000000000..bf756611861d6fecd74575655182337b2f50c4dd GIT binary patch literal 1696 zcmWgV7t)uX&%p4XW`L0a1c1i(BdqxK9l-{&?*D;t|3Voc`TYO?>p|T6U=ql94&s5q zc@POT4{m-v#FRh(pZ~0{`(8H(qVyk-diMAShyyef$g=^m 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[] {