From a7552770f8d98f8993c56d592a59b9963eb6e51f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 16 Mar 2016 19:41:28 +0100 Subject: more natural speed semantic (speed++ -> animation is faster) --- src/system.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/system.cc') diff --git a/src/system.cc b/src/system.cc index e0765c2..9e36c0a 100644 --- a/src/system.cc +++ b/src/system.cc @@ -82,11 +82,11 @@ void System::loadPattern_buf(uint8_t *pattern) active_anim.length += pattern[1]; if (active_anim.type == AnimationType::TEXT) { - active_anim.speed = (pattern[2] & 0xf0) + 15; + active_anim.speed = 250 - (pattern[2] & 0xf0); active_anim.delay = (pattern[2] & 0x0f ) << 4; active_anim.direction = pattern[3] >> 4; } else if (active_anim.type == AnimationType::FRAMES) { - active_anim.speed = ((pattern[2] & 0x0f) << 4) + 15; + active_anim.speed = 250 - ((pattern[2] & 0x0f) << 4); active_anim.delay = (pattern[3] & 0x0f) << 2; active_anim.direction = 0; } -- cgit v1.2.3