QB64-Phoenix-Edition / QB64pe

The QB64 Phoenix Edition Repository
https://qb64phoenix.com
Other
131 stars 26 forks source link

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

Open oitofelix opened 1 month ago

oitofelix commented 1 month ago

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):