\MOVE 1 TO #1007\ON KEY F10 JUMP MASTER
\ON KEY F2 JUMP PRINT_ORDER
\READ 081119PW.FON\CLEAR PICS\ON ERROR JUMP WAYTOOSMALL\READ PINK_CAR.PIC\+
\ON ERROR JUMP START\APPEND SMLGLPLT.PIC 1,-1\APPEND BLUESPLN.PIC 1,1
\X START\CLEAR ON ERRORS
\*N KEY 2103 JUMP START2\JUMP START3\X START2\CLEAR SCREEN\X START3
\LINE 0,182,319,182,118,BF\CALL SUNSHINE
\MOVE 320 TO #2002\MOVE 1 TO #2003
\MOVE 100 TO #2004  ;WAIT TO PICK UP PASSENGE
\MOVE 4 TO #2005  ;WINDOW WIDTH-EACH BLDG IS DIFFO
\MOVE 40 TO M\CALL RANDOM_NUMBER
\DRAW C118J 0,178M+(R+R+20),-12M+(R+40),+3M+(R+20),+4
\IF R+R+R+R+80<319\DRAW M+R+19,-2M+R+50,+5M+R+14,+3\ENDIF
\IF R+R+R+R+R+R+149<319\DRAW M+R+19,-2M+R+50,-4M+R+34,+9\ENDIF
\PAINT 118,A\DOT 3,181,118
\LINE 0,96,319,96,126\PAINT 118,A\DOT 0,97,126
\LOC 0,191\WID 320 DOTS CENT\HEI 10\OVE 0
    Press <RETURN> to continue...
\ON KEY 7181 JUMP CONT1
\MOVE (R+12)/2 TO X\MOVE 183 TO Y\MOVE 237 TO #942
\MOVE 1 TO #603
\DRAW C#942J0,Y,R320\CALL BUILD_HOUSES
\X CONT1\ON KEY 7181\CLEAR SCREEN\PAINT
\LOC 10,7\HEI 199\WID 180 DOTS\OVE 0,A,216\ON KEY 2103
Computer graphics are
usually either RASTER
images or VECTOR images.
\LOC 10,48\OVE 0,A,47
Raster images are like
an electronic sheet of
paper.  Whatever you
draw can be displayed
anywhere later.
\LOC 10,112
Vector images are like
a "connect-the-dots"
drawing.  The computer
can just display the
dots or connect them
with line segments.
\ON ERROR JUMP MEDMANRUN
\READ MANRUNNG.PIC\MOVE 210 TO #3071\MOVE 4 TO #3072\JUMP BIGMANR
\X MEDMANRUN\ON ERROR JUMP SMLMANRUN\+
\READ MEDMANRN.PIC\MOVE 220 TO #3071\MOVE 19 TO #3072\BLAN 226,10,284,88\JUMP BIGMANR
\X SMLMANRUN\ON ERROR JUMP WAYTOOSMALL\READ SMLMANRN.PIC\MOVE 230 TO #3071\MOVE 24 TO #3072\BLANK 226,10,284,88
\X BIGMANR\CLEAR ON ERROR
\SHOW #3071,#3072,11
\IF #3072<19\ON ERROR JUMP MEDMANRUN\ELSE\IF #3072<24\ON ERROR JUMP SMLMANRUN\ELSE\ON ERROR JUMP WAYTOOSMALL\ENDIF
\APPEND VWINDOW2.PIC 1,2\CLEAR ON ERROR\SHOW 210,6,12
\LOC 194,105\HEI 74\WID 115 DOTS C\OVER 0,O,33
The drawing
above is a
raster image.
The lines around
it are done with
with vectors.
\WAIT RET #1141 "     Press <RETURN> to continue..."
\LOC 10,7\HEI 187\WID 180 DOTS\OVE 0,A,40
\"
To animate a raster
image, the individual
frames are each drawn
in turn.  The artistic
process is just like
the old "CEL" cartoons,
but the computer helps
by allowing you to
automatically redraw
the page or screen,
and to move, scale,
change the colors, etc.
as often as you like.
\"
\"
\LOC 168,105\HEI 77\WID 152 DOTS C\SCRO 0,X,42
Each image is put
on the screen very
quickly, with a short
pause between frames.
Everything here is
written entirely in
Assembler language!
\LOC 0,188\WID 320 DOTS C\OVE 0,A,218
    Press <RETURN> to continue...
\ON KEY 7181 JUMP VECTORS\ROUNDS #1142/10 SPEED 62\CLEAR SHOW
\SHOW #3071,#3072,1,11
\X VECTORS\ON KEY 7181\SHOW 210,6,12,12,X
\LOC 10,18\HEI 187\WID 158 DOTS\OVE 0,A,36
\"
\"
Vector images have a
variety of uses. They
can be paths for an
animation to follow,
or they can be used
as timing controls for
a variable time base.
Timing accuracy
is better than
1/1000th of a second!
\"
\BLANK 168,105,319,180
\LOC 188,105\HEI 79\WID 132 DOTS C\OVER 0,A,48
Strings of dots
from the vector
frame around the
man are now being
shown, offering
another method
of image display!
\CLEAR SPRITES\ROUNDS #1142*7 SPEED 11
\SPRITE T=R S=1,8 I=20,20 L=205,-3 X=A\SPRINT 12
\SPRITE R=0,-1 I=40,40 S=1078,18\SPRINT 12
\SPRITE R=0,-1 I=30,30 S=349,5\SPRINT 12
\SPRITE R=90,-1 I=12,12 S=349,8\SPRINT 12
\SPRITE R=120,-1 I=12,12 S=1078,11\SPRINT 12
\SPRITE R=180,-1 I=19,19 S=1,9\SPRINT 12
\CLEAR SPRITE 0
\ON KEY 7181 JUMP THE_LANGUAGE
\SPRITES L=#3071,#3072 A=3\SPRINT 1 TO 11
\RUN
\X THE_LANGUAGE\ON KEY 7181
\ON ERROR JUMP WAYTOOSMALL\READ CATGALOP.PIC\CLEAR SPRITES\CLEAR ON ERROR
\LOC 10,0\OVE 0,A,57\WID 310 DOTS \HEI 199
     Pictures are placed on the screen
  by commands that describe where they
  should be located, how fast they should
  be displayed, and for how long.  These
  commands comprise the programming
  language.  For example, the SHOW
  command is one way to display a picture.
  To SHOW twelve frames of a cat running
  in the lower left area of the screen,
  the format would be:
\"
\OVER 0,A,47\LOC 10,120
     \SHOW LOCATION=30,155 FRAMES=1,12
\ROUNDS #1141*2 SPEE 27\BLANK 0,131,319,199\ON KEY 7181 JUMP NEXTSHOW
\CLEAR SHOW\SHOW 30,155,1,12\X NEXTSHOW\ON KEY 7181
\LOC 22,0\OVE 0,A,57\WID 300 DOTS \HEI 199
   To make the cat run across the screen
we could add the MOTION parameter.
\"
   We can make the cat visible only when
it is inside a WINDOW, using the window
parameter:
\"
\OVER 0,A,47\LOC 10,78
     \SHOW L=-20,155 F=1,12 MOTION=7,0
     WINDOW=50,155,270,181
\"
\LOC 22,104\OVE 0,A,57\WID 300 DOTS \HEI 199
\"
   There are numerous other ways to
animate images!
\ON KEY 7181 JUMP AFTERSHOW\MOVE 1 TO #1147
\X RESHOW \ROUNDS 4 SPEED 23\BLANK 0,155,130,190
\SHOW L=-20,155 F=1,12 M=7,0 W=50,155,270,181
\ADD 1 TO #1147\IF #1147<#1141\JUMP RESHOW\ENDIF
\X AFTERSHOW\ON KEY 7181
\LOC 22,0\OVE 0,A,57\WID 300 DOTS \HEI 199
   Commands for math, reading picture
   files, and for interacting with your
   users are all available and fully
   explained in the Technical Reference
   Guide that comes with each copy.
   A Beginner's Tutorial and numerous
   additional demos are also included!
   And customer support is as near as
   your telephone whenever you need it!
\"
\LOC 22,110\OVER 0,A,44
         Press Function Key 2 (F2)
          to print an order form!
\"
\BL 0,153,320,199\ON KEY 7181 JUMP MASTER
\LOC 0,188\WID 320 DOTS C\OVE 0,A,229
All this, and it's SHAREWARE!
\ROUNDS 1 SPEE 0\MARQ 60,187,257,199,55,62
\SPRITE M=7,0 T=R E=270,0,350,199 A=1 L=-40,155 W=50,0,270,199
\ROUNDS #1141*55 SPEE 27\SPRINT 1 TO 12\RUN
\X MASTER\PAINT\CLEAR ON KEYS\CLEAR SHOW\READ #97:MENU.TXT
\X BUILD_HOUSES
\MOVE 80 TO M\CALL RANDOM_NUMBER
\IF X>274\CALL BUILD_BACKGROUND\MOVE 0 TO G\SAVE SCREEN\CALL DRIVE_CAR
\JUMP BLINK_LIGHTS\ENDIF
\IF X+R>310\JUMP BUILD_HOUSES\ENDIF
\DRAW J X,Y,U R\MOVE R TO Q
\MOVE 40 TO M\CALL RANDOM_NUMBER
\IF X+R>315\MOVE 316 TO R\SUB X FROM R\ENDIF\DRAW R R+1,D Q,R5
\MOVE Q TO S\MOVE R TO T
\MOVE R TO W\DIVIDE W BY (3+#2005) REM Z
\MOVE Z/2 TO Z\MOVE Z TO W
\CALL WINDOWS
\DRAW J X+1,Y-1,C#942,P 6,A,E1\ADD R+6 TO X
\JUMP BUILD_HOUSES\RETURN
\X RANDOM_NUMBER
\MOVE TIME&DATE[19,2] TO #602\CONVERT #602\MOVE #602 TO R
\MOVE TIME&DATE[16,2] TO #602\CONVERT #602\ADD #602 TO R
\X CHECKR
\IF R>M\SUBTRACT 50 FROM R\JUMP CHECKR\ENDIF
\IF R<20\ADD 20 TO R\JUMP CHECKR\ENDIF
\RETURN
\X WINDOWS\IF X+W+2<317\+
\DRAW C6J X+W+((#2005-1)/2),Y-S+3,R#2005D3L#2005U3\+
\MOVE TIME&DATE[20,1] TO #602\CONVERT #602\MOVE #602 TO A\+
\MOVE TIME&DATE[17,1] TO #602\CONVERT #602\ADD A TO #602\+
\ADD 1 TO #603\IF #602<8 AND #603>6\MOVE 0 TO #603\+
\DRAW C,M+1,+1,P 6,A,C31F1C6\ELSE\+
\DRAW C,M+1,+1,P 6,A,C19F1C6\ENDIF\+
\SUBTRACT 8 FROM S\IF S>8\JUMP WINDOWS\ENDIF\+
\MOVE Q TO S\ADD 3+#2005 TO W\+
\IF W<R-(Z+#2005)\JUMP WINDOWS\ENDIF\+
\MOVE R TO #2006\MOVE 30 TO M\CALL RANDOM_NUMBER\MOVE (R-18)/2+2 TO #2005\+
\MOVE #2006 TO R\+
\X WINDOUT\RETURN
\X BLINK_LIGHTS\ADD 1 TO G\IF G>#1142\JUMP CONT1\ENDIF
\MOVE 80 TO M\CALL RANDOM_NUMBER\MOVE R TO Q\WAIT NOW #1142/10
\CALL RANDOM_NUMBER\MOVE 1 TO T
\X NEXTDOT\DOT R*3,Q+110,?\IF A=19
\DRAW C,J R*3,Q+110,P 6,A\DOT R*3,Q+110,31\ELSE\IF A=31
\DRAW C,J R*3,Q+110,P 6,A\DOT R*3,Q+110,19
\ELSE\IF T<20\ADD 1 TO T \ADD 11 TO R\JUMP NEXTDOT
\ENDIF\JUMP BLINK_LIGHTS
\X BUILD_BACKGROUND
\LINE 0,183,319,183,24\LINE 0,184,319,184,23\+
\LINE 0,185,319,185,22\LINE 0,186,319,186,21
\LINE 0,187,319,188,20,BF\+
\RETURN
\X DRIVE_CAR\ROUNDS 1780 SPEED 1\CLEAR SPRITES
\SPRITE F=Y L=320,176 A=1 M=-1,0\SPRINT 1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6
\SPRITE L=1025,1025 A=NO\SPRINT 1
\SPRITE L=386,175 ANIMATE=8 M=-2,0\SPRINT 7 TO 17
\SPRITE L=1025,1025 A=NO\SPRINT 1
\FRAME ?\IF A>31\SPRITE L=380,167 ANIMATE=7 M=-5,0\SPRINT 18 TO 32\IF A>32\+
\SPRITE L=-1*(650+(R+Q)*5),95+R/2 ANIMATE=NO M=1,0\SPRINT 33\+
\SPRITE L=-1*(10+(R+Q)*3),95+R/3+4 ANIMATE=NO M=1,0\SPRINT 33\ENDIF
\RUN
\RETURN
\X SUNSHINE\MOVE 80 TO M\CALL RANDOM_NUMBER
\X SETM2\IF R<20\ADD 10 TO R\JUMP SETM2\ENDIF
\X SETM2\IF R>50\SUB 10 FROM R\JUMP SETM2\ENDIF
\CIRCLE R=R/6+6,R/8+5 L=R*4,R/4+111 C=126
\PAINT 43,A\DOT R*4,R/4+111,126
\CIRCLE R=R/6+4,R/8+3 L=R*4,R/4+111 C=28
\PAINT 28,A\DOT R*4,R/4+111,28
\RETURN
\X WAYTOOSMALL\CLEAR ON KEYS\CALLM WAY2SMALL\END
\X PRINT_ORDER\CLEAR ON KEYS\CALLM PRINT_ORDER\READ MENU.TXT
