TI99 Environment

CALL_CREATEANIMATEDSPRITE


Syntax

CALL_CREATEANIMATEDSPRITE(sprite-number,AnimNum,Delay)

Description

After creating the animation sequence with CALL_CREATEANIMATION, and activating the sprite(s) with CALL_SPRITE, this function assigns the animation number AnimNum to the sprite sprite-number, sets the beginning and ending frame properties as well as the frame speed and timer, and kicks off the animation sequence in a continuous loop until the animation is paused, stopped, or deleted or the sprite is deleted. The frame animation speed is controlled by the Delay parameter, and it is expressed in milliseconds. The TI_SYNC function automatically takes care of animating any active sprites during your program loop.


  Example Code
call_magnify(3)
call_char(140,rpt$("f",16))      `Road
call_colorchar(140,5,1)          `Road color
call_char(141,"00181818181818")  `Road line
`Car-Frame 1
call_multicolorchar(128,"00000022000008AA00E12A7700112A7700112A9900001A9900002799000027990000279900001A9900E12A9900112A7700112A77000002AA000001220000010020000000A80000007A21E0007A2110009A2110009A1000009720000097200000972000009A1000009A21E0007A2110007A211000A20000002100000001000000")
`Car-Frame 2
call_multicolorchar(132,"00000022000008AA00112A7700E12A7700112A9900001A9900002799000027990000279900001A9900112A9900E12A7700112A77000002AA000001220000010020000000A80000007A2110007A21E0009A2110009A1000009720000097200000972000009A1000009A2110007A21E0007A211000A20000002100000001000000")
`Car-Frame 3
call_multicolorchar(136,"00000022000008AA00112A7700112A7700E12A9900001A9900002799000027990000279900001A9900112A9900112A7700E12A77000002AA000001220000010020000000A80000007A2110007A2110009A21E0009A1000009720000097200000972000009A1000009A2110007A2110007A21E000A20000002100000001000000")
`Bush
call_multicolorchar(144,"00000000000000C000000CC00000CCCC000CCC0C0000CCCC000CCCCC0000CC0C000CCCCC00CCCC0C0000CCCC00000CC0000000CC0000000C0000000000000000000000000C000000CCC00000C0CC0000CCCCC000C0CC0000CCCC0000CCCCC000CCCCC000CCCC0000CC0CC000CCCC0000CC000000C00000000000000000000000")
`Road sign
call_multicolorchar(148,"CCCCCCCCCFFFCFCCCCFCCFCCCCFCCFCFCCFCCFCCCCFCCFCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00EE000000EE000000EE000000EE000000EE0000CCCCCCCCCFFFCFFFCFCFCFCFCFFFCFFFCCCFCCCFCFFCCFFCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0000EE000000EE000000EE000000EE000000EE00")
CALL_CREATEANIMATION(1,128,3,4)
CALL_SPRITE(1,128,0,150,110,0,0)          `Car Sprite
call_sprite(2,141,16,1,114,50,0)          `Road Line sprite 1
call_sprite(3,141,16,128,114,50,0)        `Road Line sprite 2
call_sprite(4,144,0,32,32,25,0)           `Bush
call_sprite(5,148,0,48,200,30,0)          `Road sign
call_magnifysprite(2,1)
call_magnifysprite(3,1)
CALL_CREATEANIMATEDSPRITE(1,1,25)
call_vchar(1,12,140,168)
do:TI_SYNC():loop

Program Explanation:
The above program demonstrates a simple animation sequence using multicolor sprites, it will display a multicolor, double sized, animated car sprite consisting of three frames:
on-off conditions


Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020