public static BlastUnit getBlastUnit(string _domain, long _address) { BlastUnit bu = null; switch (SelectedEngine) { case CorruptionEngine.NIGHTMARE: bu = RTC_NightmareEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.HELLGENIE: bu = RTC_HellgenieEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.DISTORTION: RTC_DistortionEngine.AddUnit(RTC_DistortionEngine.GenerateUnit(_domain, _address)); bu = RTC_DistortionEngine.GetUnit(); break; case CorruptionEngine.FREEZE: bu = RTC_FreezeEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.NONE: return(null); } return(bu); }
public static void AddUnit(BlastUnit bu) { if (!LockPipes) { if (bu != null) { AllBlastPipes.Enqueue(bu); } } }
private void lbBlastLayer_SelectedIndexChanged(object sender, EventArgs e) { gbAddressEdit.Visible = false; gbValueEdit.Visible = false; lbAddressEdit.Text = "Address Edit:"; lbValueEdit.Text = "Value Edit:"; if (lbBlastLayer.SelectedIndex == -1) { return; } BlastUnit bu = (BlastUnit)lbBlastLayer.SelectedItem; nmValueEdit.Value = 0; nmValueEdit.Maximum = Int64.MaxValue; if (lbBlastLayer.SelectedItem is BlastByte) { gbAddressEdit.Visible = true; gbValueEdit.Visible = true; nmAddressEdit.Value = (lbBlastLayer.SelectedItem as BlastByte).Address; var bb = (bu as BlastByte); nmValueEdit.Maximum = RTC_Extensions.getNumericMaxValue(bb.Value); nmValueEdit.Value = RTC_Extensions.getDecimalValue(bb.Value); } else if (lbBlastLayer.SelectedItem is BlastCheat) { gbAddressEdit.Visible = true; nmAddressEdit.Value = (lbBlastLayer.SelectedItem as BlastCheat).Address; var bc = (bu as BlastCheat); if (!bc.IsFreeze) { gbValueEdit.Visible = true; nmValueEdit.Maximum = RTC_Extensions.getNumericMaxValue(bc.Value); nmValueEdit.Value = RTC_Extensions.getDecimalValue(bc.Value); } } else if (lbBlastLayer.SelectedItem is BlastPipe) { lbAddressEdit.Text = "Address Edit:"; lbValueEdit.Text = "PipeAddress Edit:"; gbAddressEdit.Visible = true; gbValueEdit.Visible = true; nmAddressEdit.Value = (bu as BlastPipe).Address; nmValueEdit.Value = (bu as BlastPipe).PipeAddress; nmValueEdit.Maximum = nmAddressEdit.Maximum; } }
public VmdPrototype(BlastLayer bl) { VmdName = RTC_Core.GetRandomKey(); GenDomain = "Hybrid"; BlastUnit bu = bl.Layer[0]; var mi = RTC_MemoryDomains.getInterface(bu.Domain); BigEndian = mi.BigEndian; WordSize = mi.WordSize; SuppliedBlastLayer = bl; }
private void btnDuplicateSelected_Click(object sender, EventArgs e) { if (lbBlastLayer.SelectedIndex == -1) { MessageBox.Show("No unit was selected. Cannot duplicate."); return; } int pos = lbBlastLayer.SelectedIndex; BlastUnit bu = sk.BlastLayer.Layer[pos]; BlastUnit bu2 = ObjectCopier.Clone(bu); sk.BlastLayer.Layer.Insert(pos, bu2); RefreshBlastLayer(); }
private void btnCorrupt_Click(object sender, EventArgs e) { BlastLayer bl = new BlastLayer(); foreach (var item in lbBlastLayer.Items) { BlastUnit bu = (item as BlastUnit); if (bu.IsEnabled) { bl.Layer.Add(bu); } } GC.Collect(); GC.WaitForPendingFinalizers(); (bl.Clone() as BlastLayer).Apply(); }
public static BlastUnit getBlastUnit(string _domain, long _address) { //Will generate a blast unit depending on which Corruption Engine is currently set. //Some engines like Distortion may not return an Unit depending on the current state on things. BlastUnit bu = null; switch (SelectedEngine) { case CorruptionEngine.NIGHTMARE: bu = RTC_NightmareEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.HELLGENIE: bu = RTC_HellgenieEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.DISTORTION: RTC_DistortionEngine.AddUnit(RTC_DistortionEngine.GenerateUnit(_domain, _address)); bu = RTC_DistortionEngine.GetUnit(); break; case CorruptionEngine.FREEZE: bu = RTC_FreezeEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.PIPE: bu = RTC_PipeEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.VECTOR: bu = RTC_VectorEngine.GenerateUnit(_domain, _address); break; case CorruptionEngine.NONE: return(null); } return(bu); }
private void btnLoadCorrupt_Click(object sender, EventArgs e) { BlastLayer bl = new BlastLayer(); foreach (var item in lbBlastLayer.Items) { BlastUnit bu = (item as BlastUnit); if (bu.IsEnabled) { bl.Layer.Add(bu); } } StashKey newSk = (StashKey)sk.Clone(); newSk.BlastLayer = (BlastLayer)bl.Clone(); GC.Collect(); GC.WaitForPendingFinalizers(); newSk.Run(); }
public static void AddUnit(BlastUnit bu) { AllDistortionBytes.Enqueue(bu); }