EasyManua.ls Logo

Commodore 128D - Page 288

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...
MOVSPR
—Position
or
move
sprite
on
the
screen
1)
MOVSPR
number,x,y
Place
the
specified
sprite
at
absolute
coordinate
x,y.
2)
MOVSPR
number,
+/-x,
+/-y
Move
sprite
relative
to
the
position
of
the
pixel
cursor.
3)
MOVSPR
number,x;y
Move
sprite
distance
x
at
angle
y
relative
to
the
pixel
cursor.
4)
MOVSPR
number,
angle
#
speed
Move
sprite
at
an
angle
(x)
relative
to
its
original
coordinates,
in
the
clockwise
direction
and
at
the
specified
speed
(y).
where:
number
is
sprite.'s
number
(1
through
8)
<,x,y>
is
coordinate
of
the
sprite
location.
ANGLE
is
the
angle
(0-360)
of
motion
in
the
clockwise
direction
rela
tive
to
the
sprites
original
coordinate.
SPEED
is
a
speed
(0-15)
in
which
the
sprite
moves.
This
statement
locates
a
sprite
at
a
specific
location
on
the
screen-
according
to
the
SPRITE
coordinate
plane
(not
the
bit
map
plane)
or
initiates
sprite
motion
at
a
specified
rate.
See
MOVSPR
in
Section
6
for
a
diagram
of
the
sprite
coordinate
system.
A
sprite that
is
OFF
(see
SPRITE
command)
will
not
move
until
it
is
turned
ON.
The
BASIC
program
continues
execution
after
the
MOVSPR
command;
any
motion
will
continue
automatically
until
you
stop
it
or
alter
its
course.
EXAMPLES:
MOVSPR
1,150,150
MOVSPR
1,
+20,-30
MOVSPR
4,
-50,
+100
MOVSPR
5,
45
#15
MOVSPR
1,0
#0
Position
sprite
1
near
the
center
of
the
screen,
x,y
coordinate
150,150.
Move
sprite
1
to
the
right
20
coordinates
and
up
30
coordinates.
Move
sprite
4
to
the
left
50
coordinates
and
down
100
coordinates.
Move
sprite
5
at
a
45
degree
angle
in
the
clockwise
direction,
relative
to
its
original
x
and
y
coordinates.
The
sprite
moves
at
the
fastest
rate
(15).
Stops
sprite
1.
u
D
Q
280
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals