| 36 | namespace { |
| 37 | |
| 38 | void UpdateEchoTranspose(const stChanNote &Note, int &Value, unsigned int EffColumns) { |
| 39 | for (int j = EffColumns - 1; j >= 0; --j) { |
| 40 | const int Param = Note.Effects[j].param & 0x0F; |
| 41 | switch (Note.Effects[j].fx) { |
| 42 | case effect_t::SLIDE_UP: |
| 43 | Value += Param; return; |
| 44 | case effect_t::SLIDE_DOWN: |
| 45 | Value -= Param; return; |
| 46 | case effect_t::TRANSPOSE: // Sometimes there are not enough ticks for the transpose to take place |
| 47 | if (Note.Effects[j].param & 0x80) |
| 48 | Value -= Param; |
| 49 | else |
| 50 | Value += Param; |
| 51 | return; |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | } // namespace |
| 57 | |