public bool doSplit(string segment, Process game, OoSSettings settings) { data.UpdateAll(game); //check for file select screen before splitting byte _fs = Convert.ToByte(data["FileSelect1"].Current); if (_fs == 0x23 || _fs == 0x17) return false; //check for splits foreach (var _split in splits) { int count = 0; foreach (var _trigger in _split.Triggers) { int _value = Convert.ToInt32(data[_trigger.Key].Current); if (_value == _trigger.Value) count++; } if (count == _split.Triggers.Count) { splits.Remove(_split); return true; } } return false; }
public void setSplits(OoSSettings settings) { splits = new InfoList(); splits.AddRange(DefaultInfo.BaseSplits); foreach (var _setting in settings.CheckedSplits) { if (!_setting.isEnabled) splits.Remove(splits[_setting.Name]); } }
public OoSComponent(LiveSplitState state) { settings = new OoSSettings(); model = new TimerModel() { CurrentState = state }; model.CurrentState.OnStart += timer_OnStart; processTimer = new Timer() { Interval = 2000, Enabled = true }; processTimer.Tick += processTimer_OnTick; memory = new OoSMemory(); }