Add Distribution Super Training Flags

Thanks SciresM!
This commit is contained in:
Kurt 2015-01-17 09:36:48 -08:00
parent 643933d596
commit d5daa001dd
4 changed files with 134 additions and 3 deletions

View file

@ -2416,7 +2416,6 @@
this.CB_ExtraBytes.Items.AddRange(new object[] {
"0x36",
"0x37",
"0x3A",
"0x3B",
"0x3C",
"0x3D",

View file

@ -236,6 +236,13 @@
this.Hoenn1b_5 = new System.Windows.Forms.CheckBox();
this.Hoenn1b_6 = new System.Windows.Forms.CheckBox();
this.Hoenn1b_7 = new System.Windows.Forms.CheckBox();
this.CHK_D5 = new System.Windows.Forms.CheckBox();
this.CHK_D4 = new System.Windows.Forms.CheckBox();
this.L_Distro = new System.Windows.Forms.Label();
this.CHK_D3 = new System.Windows.Forms.CheckBox();
this.CHK_D0 = new System.Windows.Forms.CheckBox();
this.CHK_D1 = new System.Windows.Forms.CheckBox();
this.CHK_D2 = new System.Windows.Forms.CheckBox();
this.Tab_Medals.SuspendLayout();
this.GB_Medals1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
@ -337,6 +344,13 @@
//
// Tab_Medals
//
this.Tab_Medals.Controls.Add(this.CHK_D5);
this.Tab_Medals.Controls.Add(this.CHK_D4);
this.Tab_Medals.Controls.Add(this.L_Distro);
this.Tab_Medals.Controls.Add(this.CHK_D3);
this.Tab_Medals.Controls.Add(this.CHK_D0);
this.Tab_Medals.Controls.Add(this.CHK_D1);
this.Tab_Medals.Controls.Add(this.CHK_D2);
this.Tab_Medals.Controls.Add(this.CHK_Secret);
this.Tab_Medals.Controls.Add(this.GB_Medals1);
this.Tab_Medals.Controls.Add(this.GB_Medals2);
@ -351,7 +365,7 @@
// CHK_Secret
//
this.CHK_Secret.AutoSize = true;
this.CHK_Secret.Location = new System.Drawing.Point(295, 17);
this.CHK_Secret.Location = new System.Drawing.Point(244, 32);
this.CHK_Secret.Name = "CHK_Secret";
this.CHK_Secret.Size = new System.Drawing.Size(140, 17);
this.CHK_Secret.TabIndex = 19;
@ -2595,6 +2609,75 @@
this.Hoenn1b_7.Text = "Smart Master";
this.Hoenn1b_7.UseVisualStyleBackColor = true;
//
// CHK_D5
//
this.CHK_D5.AutoSize = true;
this.CHK_D5.Location = new System.Drawing.Point(447, 16);
this.CHK_D5.Name = "CHK_D5";
this.CHK_D5.Size = new System.Drawing.Size(32, 17);
this.CHK_D5.TabIndex = 44;
this.CHK_D5.Text = "5";
this.CHK_D5.UseVisualStyleBackColor = true;
//
// CHK_D4
//
this.CHK_D4.AutoSize = true;
this.CHK_D4.Location = new System.Drawing.Point(415, 16);
this.CHK_D4.Name = "CHK_D4";
this.CHK_D4.Size = new System.Drawing.Size(32, 17);
this.CHK_D4.TabIndex = 43;
this.CHK_D4.Text = "4";
this.CHK_D4.UseVisualStyleBackColor = true;
//
// L_Distro
//
this.L_Distro.AutoSize = true;
this.L_Distro.Location = new System.Drawing.Point(318, 3);
this.L_Distro.Name = "L_Distro";
this.L_Distro.Size = new System.Drawing.Size(62, 13);
this.L_Distro.TabIndex = 38;
this.L_Distro.Text = "Distribution:";
//
// CHK_D3
//
this.CHK_D3.AutoSize = true;
this.CHK_D3.Location = new System.Drawing.Point(382, 16);
this.CHK_D3.Name = "CHK_D3";
this.CHK_D3.Size = new System.Drawing.Size(32, 17);
this.CHK_D3.TabIndex = 42;
this.CHK_D3.Text = "3";
this.CHK_D3.UseVisualStyleBackColor = true;
//
// CHK_D0
//
this.CHK_D0.AutoSize = true;
this.CHK_D0.Location = new System.Drawing.Point(382, 2);
this.CHK_D0.Name = "CHK_D0";
this.CHK_D0.Size = new System.Drawing.Size(32, 17);
this.CHK_D0.TabIndex = 39;
this.CHK_D0.Text = "0";
this.CHK_D0.UseVisualStyleBackColor = true;
//
// CHK_D1
//
this.CHK_D1.AutoSize = true;
this.CHK_D1.Location = new System.Drawing.Point(415, 2);
this.CHK_D1.Name = "CHK_D1";
this.CHK_D1.Size = new System.Drawing.Size(32, 17);
this.CHK_D1.TabIndex = 40;
this.CHK_D1.Text = "1";
this.CHK_D1.UseVisualStyleBackColor = true;
//
// CHK_D2
//
this.CHK_D2.AutoSize = true;
this.CHK_D2.Location = new System.Drawing.Point(447, 2);
this.CHK_D2.Name = "CHK_D2";
this.CHK_D2.Size = new System.Drawing.Size(32, 17);
this.CHK_D2.TabIndex = 41;
this.CHK_D2.Text = "2";
this.CHK_D2.UseVisualStyleBackColor = true;
//
// RibbMedal
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -2889,5 +2972,12 @@
private System.Windows.Forms.CheckBox ORAS_1;
private System.Windows.Forms.CheckBox ORAS_0;
private System.Windows.Forms.CheckBox Extra1_7;
private System.Windows.Forms.CheckBox CHK_D5;
private System.Windows.Forms.CheckBox CHK_D4;
private System.Windows.Forms.Label L_Distro;
private System.Windows.Forms.CheckBox CHK_D3;
private System.Windows.Forms.CheckBox CHK_D0;
private System.Windows.Forms.CheckBox CHK_D1;
private System.Windows.Forms.CheckBox CHK_D2;
}
}

View file

@ -15,6 +15,7 @@ namespace PKHeX
public partial class RibbMedal : Form
{
Form1 m_parent;
CheckBox[] distro;
public RibbMedal(Form1 frm1)
{
InitializeComponent();
@ -28,7 +29,7 @@ namespace PKHeX
comboBox1.Items.Add(Form1.trainingbags[i]);
comboBox1.SelectedIndex = m_parent.buff[0x17];
numericUpDown1.Value = m_parent.buff[0x16];
distro = new CheckBox[] { CHK_D0, CHK_D1, CHK_D2, CHK_D3, CHK_D4, CHK_D5 };
getRibbons();
}
private void getRibbons()
@ -173,6 +174,15 @@ namespace PKHeX
TB_PastContest.Text = m_parent.buff[0x38].ToString();
TB_PastBattle.Text = m_parent.buff[0x39].ToString();
rv = m_parent.buff[0x3A];
updateRibbon(CHK_D0, rv, 0);
updateRibbon(CHK_D1, rv, 1);
updateRibbon(CHK_D2, rv, 2);
updateRibbon(CHK_D3, rv, 3);
updateRibbon(CHK_D4, rv, 4);
updateRibbon(CHK_D5, rv, 5);
CHK_Secret.Checked = Convert.ToBoolean(m_parent.buff[0x72]);
} // Populate Ribbons prompted
private void setRibbons()
@ -278,6 +288,16 @@ namespace PKHeX
m_parent.buff[0x38] = (byte)Util.ToUInt32(TB_PastContest.Text);
m_parent.buff[0x39] = (byte)Util.ToUInt32(TB_PastBattle.Text);
int dis = 0;
dis |= addRibbon(CHK_D0);
dis |= addRibbon(CHK_D1);
dis |= addRibbon(CHK_D2);
dis |= addRibbon(CHK_D3);
dis |= addRibbon(CHK_D4);
dis |= addRibbon(CHK_D5);
m_parent.buff[0x3A] = (byte)dis;
m_parent.buff[0x72] = (byte)Convert.ToByte(CHK_Secret.Checked);
} // Saving Ribbons prompted
private void updateRibbon(CheckBox chk, int rv, int sh)
@ -349,6 +369,7 @@ namespace PKHeX
CHK_Secret
};
checkboxFlag(ck, b);
foreach (CheckBox chk in distro) chk.Checked = b;
}
} // Checkbox Flipping Logic (dependent on Tab)

View file

@ -120,6 +120,27 @@
<metadata name="BTN_All.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_D5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_D4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Distro.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_D3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_D0.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_D1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_D2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_Secret.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>