Add Volcanic Ash

This commit is contained in:
Kurt
2014-11-26 23:06:25 -08:00
parent 66caee41b9
commit 54c9d5c24d
2 changed files with 30 additions and 0 deletions

View File

@@ -110,6 +110,8 @@ private void InitializeComponent()
this.flag_0289 = new System.Windows.Forms.CheckBox();
this.flag_0285 = new System.Windows.Forms.CheckBox();
this.flag_0284 = new System.Windows.Forms.CheckBox();
this.MT_Ash = new System.Windows.Forms.MaskedTextBox();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nud)).BeginInit();
this.groupBox2.SuspendLayout();
@@ -1138,11 +1140,31 @@ private void InitializeComponent()
this.flag_0284.UseVisualStyleBackColor = true;
this.flag_0284.Click += new System.EventHandler(this.toggleFlag);
//
// MT_Ash
//
this.MT_Ash.Location = new System.Drawing.Point(459, 454);
this.MT_Ash.Mask = "00000";
this.MT_Ash.Name = "MT_Ash";
this.MT_Ash.Size = new System.Drawing.Size(42, 20);
this.MT_Ash.TabIndex = 18;
this.MT_Ash.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(429, 438);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 13);
this.label2.TabIndex = 19;
this.label2.Text = "Volcanic Ash:";
//
// SAV_EventFlagsORAS
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 512);
this.Controls.Add(this.label2);
this.Controls.Add(this.MT_Ash);
this.Controls.Add(this.GB_Misc);
this.Controls.Add(this.GB_Rebattle);
this.Controls.Add(this.groupBox2);
@@ -1166,6 +1188,7 @@ private void InitializeComponent()
this.GB_Misc.ResumeLayout(false);
this.GB_Misc.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -1252,5 +1275,7 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox flag_0260;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.MaskedTextBox MT_Ash;
private System.Windows.Forms.Label label2;
}
}

View File

@@ -22,6 +22,7 @@ public SAV_EventFlagsORAS(Form1 frm1)
Setup();
nud.Text = "0"; // Prompts an update for flag 0.
MT_Ash.Text = BitConverter.ToUInt16(m_parent.savefile, savshift + 0x14A78 + 0x5400).ToString();
}
Form1 m_parent;
public int savshift;
@@ -45,6 +46,10 @@ private void B_Save_Click(object sender, EventArgs e)
data[i/8] |= (byte)(1 << i%8);
Array.Copy(data, 0, m_parent.savefile, 0x1A0FC + savshift, 0x180);
// Copy back Volcanic Ash counter
Array.Copy(BitConverter.GetBytes(Util.ToUInt32(MT_Ash)), 0, m_parent.savefile, 0x14A78 + 0x5400 + savshift, 2);
this.Close();
}
private void Setup()