[futurebasic] Scrolling GWorlds

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2001 : Group Archive : Group : All Groups

From: Ian Mann <i.mann@...>
Date: Mon, 12 Mar 2001 11:11:42 +0800
> Joe Wilkins kindly wrote :
>
> One for "The Book".  Thanks, works fine on my iMac/333.  The one used for scrolling
> credits in "The Book", based on one of Matt Beedle/Stazs routines scrolls vertically;
> whereas this one scrolls horizontally.
>

Thanks Joe,

If you look at the code in Fn Startup, you will see that this one can
also go up and down.
It can also loop, stop at the end of the PICT, or reverse direction and
'bounce' back.
The tick delay between frames is variable so that refresh speed can be
altered.
The number of pixel columns/rows (MPtr&.mvMoviePage%) by which the
copyrect is moved each time is also variable, so that the code can
produce a pseudo movie, where MPtr&.mvMoviePage% is equal to the frame
height or width of the movie.

You can achieve these effects by messing about with the parameters sent
to FN SetUpMovie in Fn Startup

For Example

insetrect (Rect0,159,159)' changed not an additional line
gMovieHandle& = fn SetUpMovie (@Rect0, 0, 8, _mvRunLeftRight, 80,
_mvLoopMovie,gMovieHandle&,8)

This is not entirely clear from my annotation
In order the parameters sent to fn SetUpMovie are

The display rectangle.
The number of the PICT resource to be displayed, or less than 128 uses
the default drawn picture.
The colour depth of the gWorlds
The direction of scrolling - left-right or top to bottom
The number of pixels to be scrolled each cycle.
What to do at the end of the PICT - start feeding in from the beginning
again (loop) - reverse direction (bounce) - or stop.
The Handle to the pseudo 'Movie' record.
The number of ticks between each frame.

Best Regards

Ian