SPRITE COMMANDS

Only one graphicbox or graphics window in a program may use
sprites.

ADDSPRITE
print #w.g, "addsprite SpriteName BmpName";
This adds a sprite with name SpriteName from loaded bitmap
called BmpName. print #w.g, "addsprite SpriteName bmp1 bmp2 bmp3
... bmpLast"; This adds a sprite with name SpriteName from
loaded bitmaps - may include any number of bitmaps.

BACKGROUND
print #w.g, "background BmpName";
This sets the background for sprites to be the loaded bitmap
called BmpName.

CYCLESPRITE
print #w.g, "cyclesprite SpriteName 1"
print #w.g, "cyclesprite SpriteName -1"
print #w.g, "cyclesprite SpriteName 1 once"
This causes a sprite to cycle through its image list
automatically.  Using "1" will cause the list to cycle forward.
Using "-1" will cause the list to cycle backwards.  Using the
optional "once" parameter will cause the sprite to cycle through
its image list only one time, other wise it cycles continuously.

DRAWSPRITES
print #w.g, "drawsprites";
This causes all visible sprites to be drawn on the background
and it updates the display.

REMOVESPRITE
print #w.g, "removesprite SpriteName";
This causes the named sprite to be removed from the collection
of sprites.

SPRITECOLLIDES
print #w.g, "spritecollides SpriteName";
input #w.g, list$
OR
print #w.g, "spritecollides SpriteName list$";
This causes a list of all sprites that collided with the sprite
named SpriteName to be contained in the variable called "list$".

SPRITEIMAGE
print #w.g, "spriteimage SpriteName BmpNameX";
This causes the sprite called SpriteName to be shown as the
image from its image list called BmpNameX.

SPRITEMOVEXY
print #w.g, "spritemovexy SpriteName 5 5";
OR
x=5:y=5
print #w.g, "spritemovxy SpriteName ";x;" ";y
This causes a sprite called SpriteName to move x pixels in the x
direction, and y pixels in the y direction each time a
DRAWSPRITES command is issued to update the display.

SPRITEORIENT
print #w.g, "spriteorient SpriteName normal";
print #w.g, "spriteorient SpriteName flip";
print #w.g, "spriteorient SpriteName mirror";
print #w.g, "spriteorient SpriteName rotate180"; 
This causes the sprite called SpriteName to be oriented in one
of the four directions:  normal, flip, mirror, rotate180.

SPRITESCALE
print #w.g, "spritescale SpriteName 150";
OR
percent=150
print #w.g, "spritescale SpriteName ";percent
This causes the sprite called SpriteName to be scaled by the
percentage designated in both width and height.

SPRITEVISIBLE
print #w.g, "spritevisible SpriteName on";
print #w.g, "spritevisible SpriteName off";
This causes the sprite called SpriteName to be visible if "on"
is used, or to be invisible if "off" is designated.

SPRITEXY
print #w.g, "spritexy SpriteName 100 137";
OR
x=100:y=137
print #w.g, "spritexy SpriteName ";x;" ";y
This causes the sprite called SpriteName to be drawn at position
x, y the next time the display is updated with the DRAWSPRITES
command.

SPRITEXY?
print #w.g, "spritexy? SpriteName"
input #w.g, x, y
OR
print #2.g "spritexy? SpriteName x y"
This obtains the coordinates of the sprite called SpriteName and
places them into the variables x and y.