-
Notifications
You must be signed in to change notification settings - Fork 7
BASIC SETSPRITE Statement
Curtis F Kaylor edited this page Oct 23, 2023
·
6 revisions
TYPE: plusBASIC graphics statement
FORMAT: SETSPRITE spritedef commandlist [ ; commandlist ...]
Action: Sets the properties of a sprite.
- spritedef is a string containing the sprite definition.
-
commandlist is a series of the following commands that set various properties of the sprite.
-
ATTR attrlist
- attrlist is a string of attributes to created with the DEF ATTRLIST statement.
-
PALETTE palletelist
- palletelist is a string of palette numbers created with the DEF PALETELIST statement.
-
TILE tilelist
- tilelist is a string of tiles indexes created with the DEF TILELIST statement.
-
ON
- Enables the sprite, making it visible on the screen.
-
OFF
- Disables the sprite, making it no longer visible.
-
POS x , y
- Moves the sprite to screen pixel coordinate x , y.
-
ATTR attrlist
Examples:
SET SPRITE S$ TILE T$ ATTR$ A$ POS X,Y ON
Sets tile and attributes for the individual spritles, positions the sprite at coordinates X,Y and enables the sprite.
SET SPRITE S1$ POS X1,Y1; S2$ X2,Y2; S3$ X3,Y3
Moves sprites S1$, S2$, and S3$ to coordinates (X1,Y1), (X2,Y2), and (X3,Y3), respectively.
FORMAT: SETSPRITE * command
Action: Sets properties of all spritles.
-
command can be either of the following.
-
CLEAR
- Clears all spritles, setting all of their properties to 0.
-
OFF
- Disables all spritles, making them no longer visible.
-
CLEAR
Examples:
SET * OFF
Disables all spritles.
SET * CLEAR
Clears all spritles.