Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POINT(X,Y) uses WINDOW coordinates instead of physical screen coordinates. #555

Open
oitofelix opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@oitofelix
Copy link

Describe the bug
In QBasic the POINT function form used to retrieve color attribute always use physical screen coordinates, regardless of WINDOW. QB64, on the other hand, uses WINDOW logical coordinates.

To Reproduce
Run the following code snipet:

SCREEN 7
X = 2: Y = 2
PRINT "No window:", POINT(X, Y)
PRINT "Correct!"
WINDOW (-1, 1)-(1, -1)
PRINT "With WINDOW:", POINT(X, Y)
PRINT "Bug! Should have been:", POINT(PMAP(X, 2), PMAP(Y, 3))
PRINT "With WINDOW using PMAP:", POINT(PMAP(X, 2), PMAP(Y, 3))
PRINT "Bug! Should have been:", POINT(X, Y)

Expected behavior
WINDOW should not affect POINT's interpretation of the coordinates in its color attribute form.

Screenshots
image

Desktop (please complete the following information):

  • OS: Debian GNU/Linux
  • QB64pe 3.14.1
@oitofelix oitofelix added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant