[↑]
SmileBASIC4 Replica Reference
ANIMDEF
1. Animation definition

ANIMDEF DefinitionNumber,AnimationTarget,DataArray [,Loop]

・The defined animation can be used with SPANIM and TANIM commands.

Arguments

DefinitionNumber

Animation definition number: 0 to 1023

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 sprite 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.
・If you add "." to the end of the string or add 16 to the value, the sprite will be deleted when the animation ends.

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

・Animation 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
ANIMDEF 0,"XY",PANIM
2. Animation definition (specified with DATA command)

ANIMDEF DefinitionNumber,AnimationTarget,@Label[,Loop]
ANIMDEF DefinitionNumber,AnimationTarget,LabelString[,Loop]

・The defined animation can be used with SPANIM and TANIM commands.

Arguments

DefinitionNumber

Animation definition number: 0 to 1023

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 sprite 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.
・If you add "." to the end of the string or add 16 to the value, the sprite will be deleted when the animation ends.

@Label

The first label of the DATA command that stores the animation data

LabelString

A string containing the label name can be specified instead of the label.

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 instruction

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
ANIMDEF 0,"XY",@MOVDATA
3. Animation definition (specify as direct arguments)

ANIMDEF DefinitionNumber,AnimationTarget,Time1,Item1[,Item2][,Time2,Item1[,Item2]]...[,Loop]

・The defined animation can be used with SPANIM and TANIM commands.

Arguments

DefinitionNumber

Animation definition number: 0 to 1023

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 sprite 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.
・If you add "." to the end of the string or add 16 to the value, the sprite will be deleted when the animation ends.

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

ANIMDEF 0,"XY",-60,200,100,-30,50,20
4. Clear the animation of the specified definition number

ANIMDEF DefinitionNumber

Argument

DefinitionNumber

Animation definition number to clear: 0 to 1023

Example

ANIMDEF 0
5. Clear all animation definitions

ANIMDEF

Example

ANIMDEF
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
|