12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

152 APPLE II COMPUTER GRAPHICS3 : 2 6 45 3F 3F38: 3F 3F 3F 3F 8 2D 2D 2D31 : 2D 2D 2D 18 3F 3F 3F 3F318 : 3F 3F 8 2D 2D 2D 2D 2D32 : 2D .18 3F 3F 3F 3F 3F 3F328: 8 2D 2D 2D 2D 2D 2D 1833 : 3F 3F 3F 3F 3F 3F 8 2D338: 2D 2D 2D 2D 2D 18 3F 3F34 : 3F 3F 3F 3F 24 24 24348 : 24 DF DB DB DB 6 36 3635 : 36 36 3DGBSAVE SQUARE ,A$3, L$53With the table still in memory, l<strong>et</strong>'s fi nd out what we actu<strong>al</strong>ly have there.Type:POKE 232,: POKE 233,3HCOLOR = 3:ROT = :SCALE = l :HGRDRAW 1 AT 5,5The fi rst line tells APPLESOFT where the table is stored ($0300) in lobyte/hi-bytefo rm (00 and 03). The second line s<strong>et</strong>s <strong>al</strong>l the param<strong>et</strong>ers, andthe third draws the fi rst shape, a rectangle, at 50,50 on the Hi-Res screen.The second shape in the table is the horizont<strong>al</strong> pre-shift (the what!??) ofthe origin<strong>al</strong> rectangle. To explain, imagine that you shift the rectangle oneplace to the right. The bulk of the figure is unchanged; there is a single lineadded to the right side, and one del<strong>et</strong>ed from the left side. Pre-shifting, likeparti<strong>al</strong> modification, is a way to process only that portion of the figurewhich changes while leaving the rest <strong>al</strong>one.Now type:DRAW 2 AT 51,6to draw the pre-shift below the rectangle. Notice that the pre-shift has asingle line to the right of the rectangle, and another that lines up with theleft side of the rectangle. To affect the mod ification, we will XDRAW thepre-shift on top of the rectangle.L<strong>et</strong> us digress for a moment. When used to superimpose one figure onanother, XDRAW has the effect of comparing corresponding dots of th<strong>et</strong>wo shapes and forming a resultant figure from them. The resultant dot ison if either one of the origin<strong>al</strong> dots were on, but not both. The chart belowsummarizes the results from the four possibilities.Dot#!#2ONONONOFFOFFONOFFOFFResultOFFONONOFF

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!