MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / GetValue

Method GetValue

Source/SequenceParser.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94char CSeqConversionDefault::GetValue()
95{
96 // do not use float division
97 int Val = std::clamp(m_iCurrentValue, m_iMinValue, m_iMaxValue);
98 if (++m_iRepeatCounter >= m_iRepeat) {
99 m_iValueMod += m_iValueInc;
100 m_iCurrentValue += m_iValueMod / m_iValueDiv;
101 m_iValueMod %= m_iValueDiv;
102 m_iRepeatCounter = 0;
103 if (++m_iCounter >= m_iValueDiv)
104 m_bReady = false;
105 }
106 return Val;
107}
108
109void CSeqConversionDefault::OnStart()
110{

Callers 1

ParseSequenceMethod · 0.45

Calls 1

clampFunction · 0.85

Tested by

no test coverage detected