public override void FixedDisplay(double time) { if (!m_output) { return; } if (double.IsNaN(m_current_pp.RealTimePP)) { m_current_pp.RealTimePP = 0; } if (double.IsNaN(m_current_pp.FullComboPP)) { m_current_pp.FullComboPP = 0; } if (double.IsNaN(m_speed.RealTimePP)) { m_speed.RealTimePP = 0; } if (double.IsNaN(m_speed.FullComboPP)) { m_speed.FullComboPP = 0; } m_current_pp = SmoothMath.SmoothDampPPTuple(m_current_pp, m_target_pp, ref m_speed, time); var formatter = GetFormattedPP(m_current_pp); string str = formatter.ToString(); if (m_win != null) { m_win.PPContext = formatter.ToString(); } }
public override void FixedDisplay(double time) { if (!_output) { return; } if (double.IsNaN(_currentPp.RealTimePP)) { _currentPp.RealTimePP = 0; } if (double.IsNaN(_currentPp.FullComboPP)) { _currentPp.FullComboPP = 0; } if (double.IsNaN(_speed.RealTimePP)) { _speed.RealTimePP = 0; } if (double.IsNaN(_speed.FullComboPP)) { _speed.FullComboPP = 0; } _currentPp = SmoothMath.SmoothDampPPTuple(_currentPp, Pp, ref _speed, time); var formatter = FormatPp(_currentPp); int len = formatter.CopyTo(0, _ppBuffer, 0); StreamWriter[] streamWriters = new StreamWriter[2]; if (_splited) { streamWriters[0] = new StreamWriter(_mmfs[0].CreateViewStream()); streamWriters[1] = new StreamWriter(_mmfs[1].CreateViewStream()); } else { streamWriters[0] = new StreamWriter(_mmfs[0].CreateViewStream()); streamWriters[1] = streamWriters[0]; } streamWriters[0].Write(_ppBuffer, 0, len); streamWriters[0].Write(!_splited ? '\n' : '\0'); streamWriters[1].Write(_hitBuffer, 0, _hitStrLen); streamWriters[1].Write('\0'); for (int i = 0; i < _mmfs.Length; i++) { if (_mmfs[i] != null) { streamWriters[i].Dispose(); } } }
public override void Clear() { m_output = false; m_speed = PPTuple.Empty; m_current_pp = PPTuple.Empty; m_target_pp = PPTuple.Empty; using (MemoryMappedViewStream stream = m_mmf.CreateViewStream()) { stream.WriteByte(0); } }
public override void Clear() { base.Clear(); _output = false; _speed = PPTuple.Empty; _currentPp = PPTuple.Empty; if (_win != null) { _win.HitCountContext = ""; _win.PpContext = ""; } }
public override void Clear() { m_output = false; m_speed = PPTuple.Empty; m_current_pp = PPTuple.Empty; m_target_pp = PPTuple.Empty; if (m_win != null) { m_win.HitCountContext = ""; m_win.PPContext = ""; } }
protected StringFormatter GetFormattedPP(PPTuple tuple) { var formatter = StringFormatter.GetPPFormatter(); foreach (var arg in formatter) { switch (arg) { case "rtpp": formatter.Fill(arg, tuple.RealTimePP); break; case "rtpp_aim": formatter.Fill(arg, tuple.RealTimeAimPP); break; case "rtpp_speed": formatter.Fill(arg, tuple.RealTimeSpeedPP); break; case "rtpp_acc": formatter.Fill(arg, tuple.RealTimeAccuracyPP); break; case "fcpp": formatter.Fill(arg, tuple.FullComboPP); break; case "fcpp_aim": formatter.Fill(arg, tuple.FullComboAimPP); break; case "fcpp_speed": formatter.Fill(arg, tuple.FullComboSpeedPP); break; case "fcpp_acc": formatter.Fill(arg, tuple.FullComboAccuracyPP); break; case "maxpp": formatter.Fill(arg, tuple.MaxPP); break; case "maxpp_aim": formatter.Fill(arg, tuple.MaxAimPP); break; case "maxpp_speed": formatter.Fill(arg, tuple.MaxSpeedPP); break; case "maxpp_acc": formatter.Fill(arg, tuple.MaxAccuracyPP); break; } } return(formatter); }
/// <summary> /// Clear Output /// </summary> public virtual void Clear() { lock (_mtx) { foreach (var ctx in s_exprCtx.Values) { foreach (var k in ctx.Variables.Keys) { ctx.Variables[k] = 0; } } } HitCount = new HitCountTuple(); Pp = new PPTuple(); }
public override void Clear() { base.Clear(); _output = false; _speed = PPTuple.Empty; _currentPp = PPTuple.Empty; foreach (var mmf in _mmfs) { if (mmf != null) { using (MemoryMappedViewStream stream = mmf.CreateViewStream()) stream.WriteByte(0); } } }
private void UpdateContextVariablesFromPpTuple(ExpressionContext ctx, PPTuple tuple) { ctx.Variables["rtpp_speed"] = tuple.RealTimeSpeedPP; ctx.Variables["rtpp_aim"] = tuple.RealTimeAimPP; ctx.Variables["rtpp_acc"] = tuple.RealTimeAccuracyPP; ctx.Variables["rtpp"] = tuple.RealTimePP; ctx.Variables["fcpp_speed"] = tuple.FullComboSpeedPP; ctx.Variables["fcpp_aim"] = tuple.FullComboAimPP; ctx.Variables["fcpp_acc"] = tuple.FullComboAccuracyPP; ctx.Variables["fcpp"] = tuple.FullComboPP; ctx.Variables["maxpp_speed"] = tuple.MaxSpeedPP; ctx.Variables["maxpp_aim"] = tuple.MaxAimPP; ctx.Variables["maxpp_acc"] = tuple.MaxAccuracyPP; ctx.Variables["maxpp"] = tuple.MaxPP; }
public override void FixedDisplay(double time) { if (!_output) { return; } _currentPp = SmoothMath.SmoothDampPPTuple(_currentPp, Pp, ref _speed, time); var formatter = FormatPp(_currentPp); if (_win != null) { _win.PpContext = formatter.ToString(); } _win.Refresh(); }
public override void FixedDisplay(double time) { if (!m_output) { return; } if (double.IsNaN(m_current_pp.RealTimePP)) { m_current_pp.RealTimePP = 0; } if (double.IsNaN(m_current_pp.FullComboPP)) { m_current_pp.FullComboPP = 0; } if (double.IsNaN(m_speed.RealTimePP)) { m_speed.RealTimePP = 0; } if (double.IsNaN(m_speed.FullComboPP)) { m_speed.FullComboPP = 0; } m_current_pp = SmoothMath.SmoothDampPPTuple(m_current_pp, m_target_pp, ref m_speed, time); var formatter = GetFormattedPP(m_current_pp); int len = formatter.CopyTo(0, m_pp_buffer, 0); using (MemoryMappedViewStream stream = m_mmf.CreateViewStream()) { using (var sw = new StreamWriter(stream)) { sw.Write(m_pp_buffer, 0, len); sw.Write('\n'); sw.Write(m_hit_buffer, 0, m_hit_str_len); sw.Write('\0'); } } }
protected StringFormatter GetFormattedPP(PPTuple tuple) { var formatter = StringFormatter.GetPPFormatter(); m_pp_expr_data["rtpp_speed"] = tuple.RealTimeSpeedPP; m_pp_expr_data["rtpp_aim"] = tuple.RealTimeAimPP; m_pp_expr_data["rtpp_acc"] = tuple.RealTimeAccuracyPP; m_pp_expr_data["rtpp"] = tuple.RealTimePP; m_pp_expr_data["fcpp_speed"] = tuple.FullComboSpeedPP; m_pp_expr_data["fcpp_aim"] = tuple.FullComboAimPP; m_pp_expr_data["fcpp_acc"] = tuple.FullComboAccuracyPP; m_pp_expr_data["fcpp"] = tuple.FullComboPP; m_pp_expr_data["maxpp_speed"] = tuple.MaxSpeedPP; m_pp_expr_data["maxpp_aim"] = tuple.MaxAimPP; m_pp_expr_data["maxpp_acc"] = tuple.MaxAccuracyPP; m_pp_expr_data["maxpp"] = tuple.MaxPP; foreach (var arg in formatter) { Expression <double> expr; if (!m_pp_expression_dict.ContainsKey(arg)) { expr = new Expression <double>(arg); expr.Data = m_pp_expr_data; m_pp_expression_dict[arg] = expr; } else { expr = m_pp_expression_dict[arg]; } formatter.Fill(arg, expr.EvalDouble()); } return(formatter); }
/// <summary> /// Update PP /// </summary> /// <param name="cur_pp">real time PP</param> /// <param name="if_fc_pp">if FC pp</param> /// <param name="max_pp">beatmap max pp</param> public abstract void OnUpdatePP(PPTuple tuple);
public override void OnUpdatePP(PPTuple tuple) { var formatter = GetFormattedPP(tuple); m_pp_str_len = formatter.CopyTo(0, m_pp_buffer, 0); }
public override void OnUpdatePP(PPTuple tuple) { m_output = true; m_target_pp = tuple; }
/// <summary> /// Clear Output /// </summary> public virtual void Clear() { HitCount = new HitCountTuple(); Pp = new PPTuple(); }