<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


SPRITE Search:

In Graphics Words in TurboForth Kernal

Word Name: SPRITE
Type: Standard word
Data Stack Signature: sprite y x pattern color --
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

Sets sprite sprite to the y location y, the x location x assigned to pattern pattern with colour color.

Example:

HEX
: Face ( -- ) DATA 4 3C42 A581 A599 423C  101 DCHAR ;
DECIMAL
: DoSprite ( -- ) 0 50 60 1 9 SPRITE ;
: Test ( -- ) 1 GMODE  Face DoSprite ;

Comment:

There are 32 sprites available, numbered from 0 to 31. There are 256 patterns available. Sprite patterns do not share their patterns with the ASCII character set ala Extended Basic, they are independant. Sprite patterns may be defined using DCHAR. When defined using DCHAR, add 256 to the ascii code passed to DCHAR.

Sprites are only available in 32-column mode (GMODE=1).

See the colour table for the values to use for setting sprite colours.

See Also: GMODE  SPRVEC  SPRCOL  SPRLOC  SPRLOC?  SPRMOV  SPRPAT 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>