-
Notifications
You must be signed in to change notification settings - Fork 8
BASIC GET TILEMAP Statement
Mike Hogsett edited this page Aug 5, 2024
·
3 revisions
TYPE: plusBASIC graphics statement
FORMAT: GET TILEMAP ( startcol , startrow ) - ( endcol , endrow ) , *arrayname
Action: Copies a rectangle section of cells from the tilemap to a numeric array.
- startcol and startrow specifies the upper-left corner of the rectangle.
- endcol and endrow specifies the lower-right corner of the rectangle.
-
arrayname is the name of the array to copy the tilemap data into.
- The array must already be DIMensioned to a size large enough to hold the data.
- To calculate the size of an array needed to store the elements in a rectangle:
- Multiply the width of the rectangle in columns by the height in lines.
- Round up to an even number
- Divide by two
- Illegal Quantity results from any of the following conditions:
- startcol or endcol are not in the range 0 through 63.
- startrow or endrow are not in the range 0 through 31.
- endcol is less than startcol or endrow is less than startrow.
Examples:
10 DIM A(13)
20 GET TILEMAP (2,3)-(7,8),*A
Copies tilemap contents from column 2, line 3 to column 7, line 8 into array A().
FORMAT: GET TILEMAP ( startcol , startrow ) - ( endcol , endrow ) , ^stringvar
Action: As above but copies the tilemap cells to string variable.
-
stringvar is the name of the array to copy the tilemap data into.
- The total number of cells in the rectangle must be less than 127.
-
String too long error
results if the rectangle contains more than 126 cells.
Examples:
10 DIM A(13)
20 GET TILEMAP (2,3)-(7,8),^A$(1)
Copies text tilemap contents from column 2, line 3 to column 7, line 8 into string variable A$(1).
To Search for pages in the wiki, press Pages above and type a search term in the "Find a page..." box. Results will update beneath automatically.
- Aquarius+ User Guide
- Quick Start
- Hardware
- Software
-
Other Development Resources