Commodore 64 Manual de usuario Pagina 71

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 83
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 70
LINE 20:
FORS 1 = 12288
TO 12350
READ Q 1
POKES1,Q1
NEXT
We are going to use ONE SPRITE(sprite 0) in this
animation, but we are going to use THREEsets of
sprite data to define three separate shapes. To
get our animation, we will switch the POINTERS
for sprite ° to the three places in memory where
we have stored the data which defines our three
different shapes. The same sprite will be rede-
fined rapidly over and over again as 3 different
shapes to produce the dancing mouse animation.
You can define dozens of sprite shapes in DATA
STATEMENTS,and rotate those shapes through
one or more sprites. So you see, you don't have to
limit one sprite to one shape or vice-versa. One
sprite can have many different shapes, simply by
changing the POINTER SETTING FOR THAT
SPRITE to different places in memory where the
sprite data for different shapes is stored. This
line means we have put the DATA for "sprite
shape 1" at memory locations 12288 to 12350.
Reads 63 numbers in order from the DATAstate-
ments which begin at line 100. Q1 is an arbitrary
variable name. It could just as easily be A, Z1 or
another numeric variable.
Pokes the first number from the DATA statements
(the first "Q1" is 30) into the first memory location
(the first memory location is 12288). This is the
same as POKE12288,30.
This tells the computer to look BETWEENthe FOR
and NEXT parts of the loop and perform those
in-between commands (READQ1 and POKES1,Q1
using the NEXTnumbers in order). In other words,
the NEXTstatement makes the computer READthe
NEXTQ1 from the DATASTATEMENTS,which is 0,
and also increments S1 by 1 to the next value,
which is 12289. The result is POKE12289,0. . .
the NEXT command makes the loop keep going
back until the last values in the series, which are
POKE 12350,0.
PROGRAMMINGGRAPHICS 169
Vista de pagina 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 82 83

Comentarios a estos manuales

Sin comentarios