[↑]
SmileBASIC4 Replica Reference
TCOORD
Convert display coordinates to text screen coordinates

TCOORD ScreenID, ConvertSourceCoordinatesX,Y [,Mode] OUT ConvertResultCoordinatesX,Y

Argument

ScreenID

ID of scrolling text screen: 0 to 4

CoordinateX,Y

Coordinate to check character code

・The meaning of coordinates changes depending on the value of the next mode.

Mode

Specify the coordinate conversion method: 0 to 2

0 Convert text screen coordinates (in dots) to display coordinates
1 Convert display coordinates to character coordinates on the text screen
2 Convert display coordinates to dot coordinates on the text screen

・0, if not specified.
・When using display coordinates, the effect of LMATRIX is not considered.

Return Value

ConvertResultCoordinatesX,Y

Coordinate value of conversion result

・The meaning of the coordinates returned depends on the mode value.

Example

TCOORD 1,10,10,0 OUT DX,DY
GPSET DX,DY,#C_WHITE

TCOORD 1,100,50,1 OUT CX,CY
LOCATE CX,CY:?"A" 

TCOORD 1,100,50,2 OUT SX,SY
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
|