
LINE90:
N EXTX
LINE 95
END
LINES100-109
DATA
After the sprite has become one of the 3 different
shapes defined by the DATA, only then is it
allowed to move across the screen. It will jump 3
X positions at a time (instead of scrolling smoothly
one position at a time, which is also possible).
STEPping 3 positions at a time makes the mouse
"dance" faster across the screen. NEXTX matches
the FOR. . . X position loop. in line 50.
ENDs the program, which occurs when the sprite
moves off the screen.
The sprite shapes are read from the data num-
bers, in order. First the 63 numbers which com-
prise sprite shape 1 are read, then the 63 num-
bers for sprite shape 2, and then sprite shape 3.
This data is permanently read into the.3 memory
locations and after it is read into these locations,
all the program has to do is point sprite 0 at the
3 memory locations and the sprite automatically
takes the shape of the data in those locations.
We are pointing the sprite at 3 locations one at a
time which produces the "animation" effect. If
you want to see how these numbers affect each
sprite, try changing the first 3 numbers in liNE
100 to 255, 255, 255. See the section on defining
sprite shapes for more information.
174 PROGRAMMING GRAPHICS
Comentarios a estos manuales