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();
                }
            }
        }
예제 #3
0
        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');
                }
            }
        }
예제 #5
0
 public override void FixedDisplay(double time) => _tuple = SmoothMath.SmoothDampPPTuple(_tuple, Pp, ref _refTuple, 0.033);