diff --git a/GpApp/Marquee.cpp b/GpApp/Marquee.cpp index a3b384f..cd74b41 100644 --- a/GpApp/Marquee.cpp +++ b/GpApp/Marquee.cpp @@ -43,16 +43,23 @@ void DoMarquee (void) { if ((!theMarquee.active) || (theMarquee.paused)) return; - - DrawSurface *surface = mainWindow->GetDrawSurface(); - const uint8_t *pattern = theMarquee.pats[theMarquee.index]; - DrawMarquee(surface, pattern); - theMarquee.index++; - if (theMarquee.index >= kNumMarqueePats) - theMarquee.index = 0; - pattern = theMarquee.pats[theMarquee.index]; - DrawMarquee(surface, pattern); + theMarquee.step++; + + if (theMarquee.step >= theMarquee.interval) + { + DrawSurface *surface = mainWindow->GetDrawSurface(); + const uint8_t *pattern = theMarquee.pats[theMarquee.index]; + DrawMarquee(surface, pattern); + theMarquee.index++; + if (theMarquee.index >= kNumMarqueePats) + theMarquee.index = 0; + + pattern = theMarquee.pats[theMarquee.index]; + DrawMarquee(surface, pattern); + + theMarquee.step = 0; + } } //-------------------------------------------------------------- StartMarquee @@ -515,6 +522,8 @@ void InitMarquee (void) theMarquee.active = false; theMarquee.paused = false; theMarquee.handled = false; + theMarquee.step = 0; + theMarquee.interval = 2; gliderMarqueeUp = false; } diff --git a/GpApp/Marquee.h b/GpApp/Marquee.h index 7450b23..60ed84c 100644 --- a/GpApp/Marquee.h +++ b/GpApp/Marquee.h @@ -15,7 +15,7 @@ typedef struct { Pattern pats[kNumMarqueePats]; Rect bounds, handle; - short index, direction, dist; + short index, direction, dist, step, interval; Boolean active, paused, handled; } marquee;