Fixed random_matrix effect.
This commit is contained in:
@ -47,7 +47,7 @@ void MatrixEffectColumn::advance(uint16_t ms) {
|
||||
switch(_direction) {
|
||||
case DIR_NORTH:
|
||||
y-=speed * ms;
|
||||
if ((y>>8) > window->height && (y>>8) + length > window->height) running=false;
|
||||
if ((y>>8) + length < 0) running=false;
|
||||
break;
|
||||
case DIR_EAST:
|
||||
x+=speed * ms;
|
||||
@ -59,7 +59,7 @@ void MatrixEffectColumn::advance(uint16_t ms) {
|
||||
break;
|
||||
case DIR_WEST:
|
||||
x-=speed * ms;
|
||||
if ((x>>8) > window->width && (y>>8) + length > window->width) running=false;
|
||||
if ((x>>8) + length < 0) running=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user