Commodore 128 Programmer's Reference Manual page 283

Hide thumbs Also See for 128:
Table of Contents

Advertisement

H
SPRITES
273
I
i
SPRITE 2,1,7,1,1,1
SPRITE 6,1,1,0,0,1,1
Turn on sprite number 2, color it blue, make it pass behind
objects on the screen and expand it in the vertical and
horizontal directions.
Turn on SPRITE number 6, color it black. The first 0
tells the computer to display the sprites in front of objects
on the screen. The second 0 and the 1 following it tell the
C128 to expand the sprite vertically only. The last 1
specifies multi-color mode. Use the SPRCOLOR com
mand to select the sprite's multi-colors.
SPRSAV
Store sprite data from a text string variable into a sprite storage area or vice versa.
SPRSAV origin >, destination^
This command copies a sprite image from a string variable to a sprite storage area.
It also copies the data from the sprite storage area into a string variable. Either the origin
or the destination can be a sprite number or a string variable but both cannot be string
variables. If you are copying a string into a sprite, only the first 63 bytes of data are
used. The rest are ignored since a sprite can only hold 63 data bytes.
EXAMPLES:
SPRSAV 1,A$
Copies the bit pattern from sprite 1 to the string variable A$.
SPRSAV B$,2
Copies the data from string variable B$ into sprite 2.
SPRSAV 2,3
Copies the data from sprite 2 to sprite 3.
SSHAPE
Save/retrieve shapes to/from string variables
SSHAPE and GSHAPE are used to save and load rectangular areas of multi-color
or bit-mapped screens to/from BASIC string variables. The command to save an area of
the screen into a string variable is:
SSHAPE string variable, XI, Yl [,X2,Y2]
where:
string variable
String name to save data in
XI,Yl
Corner coordinate (0,0 through 319,199) (scaled)
X2,Y2
Corner coordinate opposite (X1,Y1) (default is the PC)
Also see the LOCATE command described in Chapter 3 for information on the
pixel cursor.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents