-
-
Notifications
You must be signed in to change notification settings - Fork 509
Filippo edited this page Feb 6, 2017
·
30 revisions
##spr id x y [colorkey [scale [flip:0..3 [rotate:0..3] ] ] ]
##Parameters:
- id : index of the sprite
- x : x coordinate where the sprite will be draw, starting from top left corner.
- y : y coordinate where the sprite will be draw, starting from top left corner.
- colorkey : index of the color in the sprite that will be used as transparent color. Use -1 if you want a opaque sprite.
- scale : scale factor applied to sprite.
- flip : flip the sprite vertically or horizontally or both.
- rotate : rotate the sprite by 0, 90, 180 or 270 degrees.
##Description:
It will put the sprite number index in the x and y coordinate.
You can specify a colorkey in the palette that will be used as transparent color.
The sprite can be scaled up by a desired factor or flipped and rotated
##Example
-- spr demo
TIC-80 tiny computer https://tic80.com | Twitter | Telegram | Terms
Built-in Editors
Console
Platform
RAM & VRAM | Display | Palette | Bits per Pixel (BPP) |
.tic
Format | Supported Languages
Other
Tutorials | Code Snippets | Libraries | External Tools | FFT
API
- BDR (0.90)
- BOOT (1.0)
- MENU
- OVR (deprecated)
- SCN (deprecated)
- TIC
- btn & btnp
- circ & circb
- clip
- cls
- elli & ellib (0.90)
- exit
- fget & fset (0.80)
- font
- key & keyp
- line
- map
- memcpy & memset
- mget & mset
- mouse
- music
- peek, peek4
- peek1, peek2 (1.0)
- pix
- pmem
- poke, poke4
- poke1, poke2 (1.0)
- rect & rectb
- reset
- sfx
- spr
- sync
- ttri (1.0)
- time
- trace
- tri & trib (0.90)
- tstamp (0.80)
- vbank (1.0)