[↑]
SmileBASIC4 Replica Reference
SPOFS
1. Move the sprite

SPOFS SpriteNumber,[X],[Y][,Z]

・Error when used before SPSET.

Arguments

SpriteNumber

Target sprite number: 0 to 4095

X,Y

Display coordinates of sprite to be set

・Depending on the hardware specifications, setting a Real value may shift the reference image by one pixel.

Z

Display priority: -4095 to 4095

・The smaller it is, the closer it is displayed.

Example

SPOFS 23,50,80
SPOFS 23,,,1000
SPOFS 23,150,180,0
2. Get display coordinates of sprite

SPOFS SpriteNumber[,CoordinateSystemFlag] OUT X,Y[,Z]

・Error when used before SPSET.

Arguments

SpriteNumber

Target sprite number: 0 to 4095

CoordinateSystemFlag

If 1, it returns absolute sprite coordinates.

If 0, it returns the sprite's relative coordinates.

・Relative coordinates mean the coordinates set in SPOFS.
・Absolute coordinates return the display coordinates on the layer.
・Both will have different coordinates when using SPLINK.
・0, if not specified.

Return Value

X,Y

Sprite coordinates

Z

Display priority

Example

SPOFS 12 OUT X,Y,Z
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
|