[↑]
SmileBASIC4 Replica Reference
TANIM
1. Set animation on the text screen (specified by array)

TANIM ScreenID,AnimationTarget,DataArray[,Loop]

Text screen animation common specifications

・Animation is to set a value and wait for a specified time.
・The animation starts from the next frame after running TANIM.
・Accept up to 32 data for each target element.
・If a negative value is specified for time, linear interpolation is performed from the previous value.

Arguments

TextScreenID

ID of text screen to set animation: 0 to 4

AnimationTarget

Numeric value or string that manages the element to be changed

0 "XY" XY Coordinates
1 "Z" Z Coordinate
2 "R" Rotation Angle
3 "S" Magnification XY
4 "C" Display Color
5 "V" Variable (value of text screen internal variable 7)

・If you add "+" to the end of the string or add 8 to the value, it will be the relative value from the animation start point.
・"I" and "UV" that can be used with SPANIM are ignored even if they are specified.

DataArray

1D numeric array that stores animation data

Loop

Loop count: 1 or more

・Specify 0 to make an infinite loop.
・1, if not specified.

DataArray

・Anime data is prepared in the following order in the numerical array (up to 32).
・Time1,Item1,[Item2,] Time2,Item1,[Item2,]...

Example

DIM PANIM[ 6 ]
PANIM[0]=-60 'frame(-60=smooth)
PANIM[1]=200 'offset X,Y
PANIM[2]=100
PANIM[3]=-30 'frame
PANIM[4]=50 'offset
PANIM[5]=20
TANIM 0,"XY",PANIM
2. Set animation on the text screen (specified with DATA command)

TANIM ScreenID,AnimationTarget,"@LabelString"[,Loop]

Arguments

ScreenID

ID of text screen to set animation: 0 to 4

AnimationTarget

Numeric value or string that manages the element to be changed

0 "XY" XY Coordinates
1 "Z" Z Coordinate
2 "R" Rotation Angle
3 "S" Magnification XY
4 "C" Display Color
5 "V" Variable (value of text screen internal variable 7)

・If you add "+" to the end of the string or add 8 to the value, it will be the relative value from the animation start point.
・"I" and "UV" that can be used with SPANIM are ignored even if they are specified.

@LabelString

・The first label of the DATA command that stores the animation data.
・@Label name is enclosed in "" and specified as a string (or character variable).

Loop

Loop count: 1 or more

・Specify 0 to make an infinite loop.
・1, if not specified.

Data

Animation data is prepared in the following order in the DATA command

DATA NumberOfKeyFrames (up to 32)
DATA Time1,Item1[,Item2]
DATA Time2,Item1[,Item2]
:

Example

@MOVDATA
DATA 2 'counter
DATA -60,200,100 'frame,offset
DATA -30,50,20 'frame,offset
TANIM 0,"XY",@MOVDATA
3. Set animation on the text screen (directly specified as an argument)

TANIM ScreenID,AnimationTarget,Time1,Item1[,Item2][,Time2,Item1[,Item2]]...[,Loop]

Argument

ScreenID

ID of text screen to set animation: 0 to 4

AnimationTarget

Numeric value or character string that manages the element to be changed

0 "XY" XY Coordinates
1 "Z" Z Coordinate
2 "R" Rotation Angle
3 "S" Magnification XY
4 "C" Display Color
5 "V" Variable (value of text screen variable 7)
6 "UV" UV Coordinates (definition source image coordinates)
7 "I" Definition Number

・If you add "+" to the end of the string or add 8 to the value, it will be the relative value from the animation start point.
・"I" and "UV" that can be used with SPANIM are ignored even if they are specified.

Time,Item

・Animation data itself (up to 32 as many as necessary).

Loop

Loop count: 1 or more

・Specify 0 to make an infinite loop.
・1, if not specified.

Example

TANIM 0,"XY",-60,200,100,-30,50,20
4. Set the animation on the text screen (specified by the animation definition number)

TANIM ScreenID,AnimationDefinitionNumber

Arguments

ScreenID

ID of text screen to set animation: 0 to 4

AnimationDefinitionNumber

Definition number already defined by ANIMDEF command: 0 to 1023

Example

ANIMDEF 0,"XY",-60,100,0
TANIM 0,0
5. Clear the animation set in the text screen

TANIM [ScreenID]

Argument

ScreenID

ID of text screen to clear animation: 0 to 4

・If not specified, clear all screen animations.

Example

TANIM 0
TANIM
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|