| 92 | } |
| 93 | |
| 94 | char 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 | |
| 109 | void CSeqConversionDefault::OnStart() |
| 110 | { |