Reduce marquee speed

This commit is contained in:
elasota
2021-02-20 15:20:39 -05:00
parent 35b8e922d7
commit e7246c1444
2 changed files with 19 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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;