Article View: comp.sys.mac
Article #16823Re: Tidbit Post Again
From: leeke
Date: Mon, 15 Jun 1987 15:20
Date: Mon, 15 Jun 1987 15:20
48 lines
2437 bytes
2437 bytes
In article <164500038@uiucdcsb> liberte@uiucdcsb.cs.uiuc.edu writes:
>
>> /* Written 4:21 pm Jun 10, 1987 by dowdy@apple.UUCP in uiucdcsb:comp.sys.mac */
>> PROGRAM Marquee;
>> { An example of a MacPaint-like Marquee using 8 patterns}
>> { Note: in reality, this pattern is backwards from the}
>> { real MacPaint one, but that is simple to fix}
>> { Tom Dowdy, Apple Computer}
>
>Does this version solve the problem of the disappearing marquee?
>I have a version that uses just one pattern and shifts it each time
>through the loop. Works just fine except that depending on how large
>the marquee is, part of it might be invisible for part of the time
>resulting in an annoying flicker. The MacPaint marquee is very smooth.
>I played with trying to synchronize it with the verticle retrace
>but did not succeed.
>
>
>Dan LaLiberte
>liberte@a.cs.uiuc.edu
>uiucdcs!liberte
I had the problem of a flickering marquee and while this isn't the most
elegant fix it seems to work. First, this idea is not mine, it is from
Scott Knaster's book on Writing Macintosh Software. Scott call this "poor
man's animation", simply stated, the first change after a vertical scan
is to increment TickCount and since you don't want to draw during the
trace the best time to draw the rectangle is during the vertical return
time. Hence, just do something like the following:
ticks := TickCount;
while (ticks = TickCount) do ;
(* Vertical return NOW *)
drawMarquee;
...
MacPaint probably does it in ASM, but this gives a relatively flicker-free
rectangle in a hll.
Hope this helps in some way,
Steve Leeke
--
Steven D. Leeke, Center for Integrated Systems, Stanford University
{ucbvax,decvax}!decwrl!glacier!leeke, leeke@glacier.stanford.edu
"I suppose they don't use money in the 23rd century?"
Technical Details
Message-ID:
<17097@glacier.STANFORD.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!decwrl!labrea!glacier!leekeReferences:
<985@apple.UUCP> <164500038@uiucdcsb>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!decwrl!labrea!glacier!leeke From: leeke@glacier.UUCP Newsgroups: comp.sys.mac Subject: Re: Tidbit Post Again Message-ID: <17097@glacier.STANFORD.EDU> Date: Mon, 15-Jun-87 11:20:18 EDT Article-I.D.: glacier.17097 Posted: Mon Jun 15 11:20:18 1987 Date-Received: Sat, 20-Jun-87 01:36:13 EDT References: <985@apple.UUCP> <164500038@uiucdcsb> Reply-To: leeke@glacier.UUCP (Steven D. Leeke) Organization: Stanford University Lines: 48