BASIC Bloxel and Pixel Functions - fvdhoef/aquarius-plus GitHub Wiki
PSET
TYPE: plusBASIC graphics statement
FORMAT: PSET ( x-coordinate , y-coordinate )
Action: Draws a bloxel or pixel at the specified position on the screen.
- x-coordinate is the horizontal position of the bloxel or pixel.
- y-coordinate is the vertical position of the bloxel or pixel.
- Position '(0,0)' is at the top-left of the screen.
- In 40 and 80 text mode, the bloxel is drawn in the foreground color of the 2x3 character cell it occupies.
- In 1bpp bitmap mode, the pixel is drawn in the foreground color of the 8x8 color cell it occupies.
- In 4bpp bitmap mode, the pixel is drawn in the default color set with the COLOR statement.
Illegal quantity error results
if x-coordinate is less than 0 or greater than- 79 in 40 column text mode
- 159 in 80 column text mode or 4bpp bitmap mode
- 319 in 1bpp bitmap mode
Illegal quantity error results
if y-coordinate is less than 0 or greater than- 71 in 40 or 80 column text mode
- 199 in 1bpp or 4bpp bitmap mode
FORMAT: PSET ( x-coordinate , y-coordinate ), color
Action: As above, with the following stipulations:
- In 4bpp bitmap mode, the pixel is drawn in the specified color.
Illegal quantity error
results if color is not in the range 0 through 15.
- In 40 or 80 column text mode,
Syntax error
results. - In 1bpp bitmap mode,
Missing operand error
results.
FORMAT: PSET ( x-coordinate , y-coordinate ), fgcolor, bgcolor
Action: As above, with the following stipulations:
- In 1bpp bitmap mode, sets the foreground and background color of the pixel's 8x8 color cell to fgcolor and bgcolor, respectively.
Illegal quantity error
results if fgcolor or bgcolor are not in the range 0 through 15, or both are 0.
- In 40 or 80 column text mode,
Syntax error
results. - In 4bpp bitmap mode,
Too many operands error
results.
PRESET
TYPE: plusBASIC graphics statement
FORMAT: PRESET ( x-coordinate , y-coordinate )
Action: As above, but erases a bloxel or pixel at the specified position on the screen.
POINT
TYPE: plusBASIC graphics function
FORMAT: POINT ( x-coordinate , y-coordinate )
Action: As above, but returns the status of the bloxel or pixel at the specified position on the screen.
- In 40 and 80 text mode, returns
1
if the bloxel is set, or0
if it is reset. - In 1bpp bitmap mode, returns
1
if the pixel is set, or0
if it is reset. - In 4bpp bitmap mode, returns the color of the pixel (
0
if it is reset).
POSX
TYPE: plusBASIC graphics function
FORMAT: POSX
POSY
TYPE: plusBASIC graphics function
FORMAT: POSY