'Future.Library Pageing, GET, PUT and Mouse Support
'
DECLARE SUB DrawStuff ()

REM $INCLUDE: 'future.bi'

DIM Red%(0 TO 255)

Set640x480 8'set 640x480 svga screen

Future.FILLCIRCLE 7, 7, 7, 4
Future.CIRCLE 7, 7, 7, 12
Future.GET 0, 0, 14, 14, Red%()

SetMaskColor 0

Future.CLS 0

Future.MouseOn 'turn on svga mouse

DO
Speed! = Speed! + .15

P% = P% XOR 1

SetPage P%       'Set page for drawing

REM WAIT &H3DA, 8         'Rem out if Mouse is on
REM WAIT &H3DA, 8, 8      '


Future.FILLBOX 0, 120, 639, 344, 20'Erase screen


        FOR i% = 0 TO 31           'Draw red balls
         Y% = SIN(i% + Speed!) * 20
         X% = COS(i% + Speed!) * 20
         Future.PUT X% + (i% * 20), 200 + Y%, Red%()
         Future.PUT -X% + (i% * 20), 250 + Y%, Red%()
        NEXT

ViewPage P%                 'After drawing is completed, display it.

LOOP UNTIL INKEY$ = CHR$(27)

Future.MouseOff 'turn off svga mouse

ReSetScreen   'set the screen back in text mode

