#1. How long can you stare at this*
function showGlitter()
{
<snip>
animColor(255,255,153)
PEN 2,2;
// CALL MOVETO(126,210)
// CALL LINETO(126,270)
// CALL MOVETO(96,223)
// CALL LINETO(156,257)
// CALL MOVETO(96,257)
// CALL LINETO(156,223)
// CALL PENNORMAL;
// CALL FORECOLOR(_blackColor)
// CALL SETRECT(rect,124,238,128,242)
setAnimPort(gWndPort)
for (loop = 1; loop <= 3; loop++)
{
for (count = 0; count <= 28; count++)
{
// CALL INSETRECT(rect,-1,-1)
temprgn = NEWRGN();
// CALL OPENRGN;
// CALL FRAMEOVAL(rect)
// CALL CLOSERGN(temprgn)
<snip>
}
copyAnimation(gSecondPort,gWndPort,@drawrect,_srcCopy)
}
}
trying to figure out how something can get inset 29 times in a row when it was only four pixels wide to start with...
... before the shoe drops and it's time for the "D'oh!" moment?
Answer: Longer than _secQuarter, which I would consider to be the outermost acceptable time :(
#2 Just how slow were computers in 1998? From context, it's obvious that there was supposed to be some kind of visible activity** here-- but there's no trace of a coded delay, meaning that I must have relied upon the thing taking some perceptible amount of time just to draw. And that's
with the feature that called itself QuickDraw.
Just thought I'd share. Sigh.
Now off to redo it all with something involving
Math.ceil(count*Math.cos(Math.PI/6))
which seems more sensible all around.
* If the language appears slightly schizophrenic, it's because this is what it looks like after I've run a slew of Regular Expressions to deal with the control structures and get rid of superfluities like the, I think, five types of variable.
** I have no idea how the second and third iterations were supposed to work, since there's no intervening redraw of a blank picture.