[↑]
SPCHR
- Change sprite character definition
SPCHR SpriteNumber,DefinitionNumber
- Change sprite character definition
SPCHR SpriteNumber,[U],[V],[W],[H],[Attribute]
- Get sprite character definition attributes
SPCHR SpriteNumber OUT U,V[,W,H[,ATR]]
- Get a sprite character definition number
SPCHR(SpriteNumber)
1. Change sprite character definition
SPCHR SpriteNumber,DefinitionNumber
・Error when used before SPSET.
Arguments
SpriteNumber
Sprite number whose definition is to be changed: 0 to 4095
DefinitionNumber
Template number registered with SPDEF command: 0 to 8191
Example
SPCHR 0,500
2. Change sprite character definition
SPCHR SpriteNumber,[U],[V],[W],[H],[Attribute]
・Arguments other than the sprite number can be omitted.
・Error when used before SPSET.
Argument
SpriteNumber
Target sprite number: 0 to 4095
U,V
The coordinates on the graphic page of the referenced image
W,H
Sprite size: 0 to 2048
・If not specified, both W and H are 16.
Attributes
b00 | ↑ Rotation by 90 degrees (specified by 2 bits of b00 and b01) |
b01 | ↓ #A_ROT0, #A_ROT90, #A_ROT0180, #A_ROT270 |
b02 | Horizontal Reverse (0=OFF, 1=ON), #A_REVH |
b03 | Vertical Reverse (0=OFF, 1=ON), #A_REVV |
b04 | Additive Composite (0=OFF, 1=ON), #A_ADD |
・0, if not specified.
Example
SPCHR 5,64,64,16,16,0
SPCHR 6,,,32,32,1 'UV skip
3. Get sprite character definition attributes
SPCHR SpriteNumber OUT U,V[,W,H[,ATR]]
・Error when used before SPSET.
Argument
SpriteNumber
Target sprite number: 0 to 4095
Return Value
U,V
The coordinates on the graphic page of the referenced image
W,H
Sprite image size
ATR
Sprite attributes
Example
SPCHR 5 OUT U,V,W,H,ATR
4. Get a sprite character definition number
SPCHR(SpriteNumber)
・Error when used before SPSET.
Argument
SpriteNumber
Target sprite number: 0 to 4095
Return Value
DefinitionNumber
Character definition number of the specified sprite
Example
DEFNO=SPCHR(5)
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
|