[↑]
SmileBASIC4 Replica Reference
ATTR
1. Set the attributes of characters to be displayed on the text screen

ATTR [ScreenID,]HorizontalFlip,VerticalFlip,Rotation
ATTR [ScreenID,]DisplayAttribute

・When this command is executed, the display attributes of characters displayed in PRINT, TPRINT, INPUT, etc. will change.

Arguments

ScreenID

Text screen ID to specify character display attributes: 0 to 4

・4 is the default.

HorizontalFlip

・Invert the displayed character left and right with 1.
・No inversion at 0.

VerticalFlip

・Invert the displayed characters up and down with 1.
・No inversion at 0.

Rotation

・Rotate 0, 90, 180, and 270 degrees with 0, 1, 2, and 3, respectively.

DisplayAttribute

・Set the horizontal flip, vertical flip, and rotation as a bit value.

b00 ↑ Rotation by 90 degrees (specified by 2 bits of b00 and b01)
b01
b02 Horizontal Flip (0=OFF, 1=ON)
b03 Vertical Flip (0=OFF, 1=ON)

Example

ATTR 0,0,1:PRINT "ABC" 
ATTR 2,8:TPRINT 2,"XYZ" 
2. Get display character attribute of text screen

ATTR [ScreenID] OUT HorizontalFlip,VerticalFlip,Rotation
ATTR( [ScreenID])

Argument

ScreenID

ID of the text screen that acquires the character display attribute: 0 to 4

・4 is the default.

Return Value

HorizontalFlip

・Invert the displayed character left and right with 1.
・No inversion at 0.

VerticalFlip

・Invert the displayed characters up and down with 1.
・No inversion at 0.

Rotation

・Rotate 0, 90, 180, and 270 degrees with 0, 1, 2, and 3, respectively.

DisplayAttribute

・Get the horizontal flip, vertical flip, and rotation as a bit value.

b00 ↑ Rotation by 90 degrees (specified by 2 bits of b00 and b01)
b01
b02 Horizontal Flip (0=OFF, 1=ON)
b03 Vertical Flip (0=OFF, 1=ON)

Example

ATTR OUT HREV,VREV,ROT
A2=ATTR(2)
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
|