Saturday, November 5, 2022

❇ POINT: Added syntax option to get current graphics X or Y coordinate.

EDIT: Also Fixed: Issue with POINT(x,y) not working in "rgba" SCREEN modes.  (Details)

This enhances the version of the function first implemented in BASIC Anywhere Machine last September.

Now:

POINT

Description:

The POINT function returns the pixel COLOR attribute at a specified graphics coordinate, OR: it returns the current graphics X coordinate or Y coordinate.

Syntax

To get the color attribute at a specified graphics coordinate:

POINT (x,y)

To get a current graphics coordinate:

POINT (coordinate_id)

xthe horizontal coordinate on the screen, which is an integer number, one of: a literal integer, an integer variable, or a numeric expression resulting in an integer
ythe horizontal coordinate on the screen, which is an integer number, one of: a literal integer, an integer variable, or a numeric expression resulting in an integer
coordinate_ida value of 0 (or 2) will cause the function to return the current graphics or X
a value 1 (or 3) will cause the function to return the current graphics or X
(values of 2 and 3 included for semi-compatibility with GW-BASIC)

To see the function in action, check out the "Snowflake" program:






No comments:

Post a Comment

🖥 Fan Dance

This is a port and mod of a SpecBAS program by ZXDunny. Run the program View the source code And, a "less is more?" version: Run t...