Commodore 128 Programmer's Reference Manual page 62

Hide thumbs Also See for 128:
Table of Contents

Advertisement

52
COMMODORE 128
4) MOVSPR number, angle # speed
Move sprite at an angle relative to
its current coordinate, in the clock
wise direction and at the specified
speed.
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 relative to the
sprite's original coordinate.
speed is a speed (0-15) in which the sprite moves.
This statement moves a sprite to 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 Chapter 9 for a diagram of the sprite coordinate
system.
EXAMPLES:
MOVSPR 1,150,150
Position sprite 1 near the center of the screen, x,y
coordinate 150,150.
MOVSPR 1, +20,-30
Move sprite 1 to the right 20 coordinates and up 30
coordinates.
MOVSPR 4, -50, 4-100
Move sprite 4 to the left 50 coordinates and down 100
coordinates.
MOVSPR 5, 45 #15
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).
NOTE: Once you specify an angle and a speed as in the fourth example
of the MOVSPR statement, the sprite continues on its path (even if the
sprite display is disabled) after the program stops, until you set the speed
to 0 or press RUN/STOP and RESTORE. Also, keep in mind that the
SCALE command affects the MOVSPR coordinates. If you add SCALing
to your programs, you also must adjust the sprites' new coordinates so
they appear correctly on the screen.
o
u
n
u
u
NEW
Clear (erase) BASIC program and variable storage
NEW
LJ
y

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents