EasyManua.ls Logo

Commodore 128D - Page 123

Commodore 128D
427 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
string,
A$,
stores
a
string
of
zeroes
and
ones
in
the
computer's
mem
ory
that
make
up
the
picture
on
the
screen.
As
in
all
computer
graph
ics,
the
computer
has
a
way
it
can
represent
visual
graphics
with
bits
in
its
memory.
Each
dot
on
the
screen,
called
a
pixel,
has
a
bit
in
the
computer's
memory
that
controls
it.
In
standard
bit-map
mode,
if
the
bit
in
memory
is
equal
to
a
1
(on),
then
the
pixel
on
the
screen
is
turned
on.
if
the
controlling
bit
in
memory
is
equal
to
a
0
(off),
then
the
pixel
is
turned
off.
Saving
the
Picture
Data
in
a
Sprite
Your
picture
is
now
stored
in
a
string.
The
next
step
is
to
transfer
the
picture
data
from
the
data
string
(A$)
into
the
sprite
data
area
so
you
can
turn
it
on
and
animate
it.
The
statement
that
does
this
is
SPRSAV.
Here
are the
statements:
SO
SPRSAV
A$,1:REM
STORE
DATA
STRING
IN
SPRITE
1
55
SPRSAV
A$,2:REM
STORE
DATA
STRING
IN
SPRITE
2
Your
picture
data
is
transferred
into
sprite
1
and
2.
Both
sprites
have
the
same
data,
so
they
look
exactly
the
same.
You
can't
see
the
sprites
yet,
because
you
have
to
turn
them
on.
Turning
on
Sprites
The
SPRITE
statement
turns
on
a
specific
sprite
(numbered
1
through
8),
colors
it,
specifies
its
screen
priority,
expands
the
sprite's
size
and
determines
the
type
of
sprite
display.
The
screen
priority
refers
to
whether
the
sprite
passes
in
front
of
or
behind
the
objects
on
the
screen.
Sprites
can
be
expanded
to
twice
their
original
size
in
either
the
horizontal
or
vertical
directions.
The
type
of
sprite
display
determines
whether
the
sprite
is
a
standard
bit
map
sprite*
or
a
mul
ticolor
bit
mapped
sprite.
Here
are
the
two
statements
that
turn
on
sprites
1
and
2.
60
SPRITE
1,1,7,0,0,0,0:REM
TURN
QN
SPR
1
65
SPRITE
2,1,3,0,0,0,0:REM
TURN
ON
SPR
2
Here's
what
each
of
the
numbers
in
the
SPRITE
statements
mean;
SPRITE
#,O,C,P,X,Y,M
#
—Sprite
number
(1
through
8)
O—Turn
On
(0=1)
or
Off
(O
=
0)
C
—Color
(1
through
16)
P
Priority—
If
P
=
0,
sprite
is
in
front
of
objects
on
the
screen
If
P
=
1,
sprite
is
in
back
of
objects
on
the
screen
115
USING
C128
MODE—Color,
Animation
and
Sprite
Graphics
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals