computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 97bcfba70285a63c165513863ab3546a9d6f3327
parent 3cf006b126e11facb44c67e9e74c1feea0e72319
Author: Adam M <aemalone@gmail.com>
Date:   Tue,  2 Feb 2021 12:15:04 -0600

animation speed negative does not imply backwards

Diffstat:
Msrc/ComputerscareBlank.cpp | 28+++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/ComputerscareBlank.cpp b/src/ComputerscareBlank.cpp @@ -516,28 +516,22 @@ struct ComputerscareBlank : ComputerscareMenuParamModule { void tickAnimation() { if (numFrames > 1) { int animationMode = params[ANIMATION_MODE].getValue(); - if (params[ANIMATION_SPEED].getValue() >= 0 ) { - if (animationMode == 0 || animationMode == 3) { + if (animationMode == 0 || animationMode == 3) { + nextFrame(); + } else if (animationMode == 1) { + prevFrame(); + } + else if (animationMode == 2) { + if (pingPongDirection == 1) { nextFrame(); - } else if (animationMode == 1) { + } else { prevFrame(); } - else if (animationMode == 2) { - if (pingPongDirection == 1) { - nextFrame(); - } else { - prevFrame(); - } - } - else if (animationMode == 4 ) { - goToRandomFrame(); - } - tick = !tick; - } - else { - prevFrame(); + else if (animationMode == 4 ) { + goToRandomFrame(); } + tick = !tick; if (animationMode == 2) { //DEBUG("PRE ping current:%i,direction:%i", currentFrame, pingPongDirection); if (pingPongDirection == 1) {