From 0837d05cfd3ad738bef8e16850f1dd32137451c6 Mon Sep 17 00:00:00 2001 From: Jake Huxell Date: Sat, 17 Sep 2016 19:22:53 +0100 Subject: [PATCH] Removed the High Speed and medium speed nonsense as there's no need. Just pack into one DefaultSpeed. --- .../Project64-core/N64System/SpeedLimiterClass.cpp | 13 ++++++------- Source/Project64-core/N64System/SpeedLimiterClass.h | 3 +-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/Project64-core/N64System/SpeedLimiterClass.cpp b/Source/Project64-core/N64System/SpeedLimiterClass.cpp index b405f714d..0446c397f 100644 --- a/Source/Project64-core/N64System/SpeedLimiterClass.cpp +++ b/Source/Project64-core/N64System/SpeedLimiterClass.cpp @@ -16,15 +16,14 @@ // --------------------------------------------------- -const uint32_t CSpeedLimiter::m_HighSpeed = 60; -const uint32_t CSpeedLimiter::m_MediumSpeed = 15; +const uint32_t CSpeedLimiter::m_DefaultSpeed = 60; // --------------------------------------------------- CSpeedLimiter::CSpeedLimiter() : m_Frames(0), -m_Speed(m_HighSpeed), -m_BaseSpeed(m_HighSpeed) +m_Speed(m_DefaultSpeed), +m_BaseSpeed(m_DefaultSpeed) { } @@ -87,11 +86,11 @@ void CSpeedLimiter::AlterSpeed( const ESpeedChange SpeedChange ) int32_t SpeedFactor = 1; if (SpeedChange == DECREASE_SPEED) { SpeedFactor = -1; } - if (m_Speed >= m_HighSpeed) + if (m_Speed >= m_DefaultSpeed) { m_Speed += 10 * SpeedFactor; } - else if (m_Speed >= m_MediumSpeed) + else if (m_Speed >= 15) { m_Speed += 5 * SpeedFactor; } @@ -102,4 +101,4 @@ void CSpeedLimiter::AlterSpeed( const ESpeedChange SpeedChange ) SpeedChanged(m_Speed); FixSpeedRatio(); -} \ No newline at end of file +} diff --git a/Source/Project64-core/N64System/SpeedLimiterClass.h b/Source/Project64-core/N64System/SpeedLimiterClass.h index 4e38b3034..4dadfe68f 100644 --- a/Source/Project64-core/N64System/SpeedLimiterClass.h +++ b/Source/Project64-core/N64System/SpeedLimiterClass.h @@ -38,6 +38,5 @@ private: uint32_t m_Speed, m_BaseSpeed, m_Frames, m_MicroSecondsPerFrame; - static const uint32_t m_HighSpeed; - static const uint32_t m_MediumSpeed; + static const uint32_t m_DefaultSpeed; };