Mail Archives: djgpp/1997/04/23/12:20:47
> > You could attempt this by using some form of external counter that
> > you can refer to each time you flip pages.
>
> Yes, I sort of tried this last night- I tried to measure the number
> of milliseconds that it took to draw one frame.
This is *NOT* the right way to do this. The right way uses a single
timer interrupt going at whatever your target rate is. Just update your
position values during the interrupt. You will need to be careful to
make sure that the position values don't get modified while you're using
them. Use some type of double buffering...I leave this as an exercise
for the reader. If your interrupt rate is high enough (perhaps 2x the
refresh rate of the display mode), this should look OK.
--
He asks a girl if they can both sit in a chair,
but he doesn't get nervous: she's not really there!
http://www.cs.pdx.edu/~idr is the home of the Dancing Fool
- Raw text -