I have encountered an instance of the rect() function in my code which does not work correctly. In the code, it is supposed to draw a brown rectangle based on the position of the mouse. The object it draws is not even a rectangle.
If we assume the points x1, y1, x2, and y2, it draws the two horizontal lines ({x1,y1} to {x2,y1}, and {x1,y2} to {x2,y2}) correctly. The two vertical lines (supposed to be {x1,y1} to {x1,y2}, and {x2,y1} to {x2,y2}) are instead drawn as horizontal lines the length they should be vertically, as if they were rotated counterclockwise from the uppermost point.
What I get looks something like this:
________________________________
__________ ___________
________________________________
Yeah, it's totally whacked. The weird thing is that rect() works fine in other circumstances. And I am not doing any weird alterations to the rectangle before it is drawn; it goes directly to the screen.
Specifically, I am calling from within a hookretrace function that is based on the position of the mouse. The actual line of code is:
rect(mouse.x,mouse.y-30,mouse.x+150,mouse.y,rgb(150,123,68),screen);
However, that line is contained within a fairly large-sized function, and so it is difficult to be certain that the cause is actually contained in the function call itself.
I should note that I also call a rectfill function which is almost identical to that line (it is contained within the box that should be made by the rect), and it works correctly. So to whoever may try to find what is wrong with rect(), it is something that is not wrong with rectfill().
Has anyone else been able to observe this bug?
EDIT: Oh yeah, on the subject of bugs, here's a weird one I also got today. Normally, I have several other windows open while testing things in Verge. Usually they are Maped, Textpad, and Photoshop. Normally, it's not a problem. I discovered today that if the "color picker" window is open in Photoshop (well, PS 6, at least), Verge gets weird. It'll force-minimize a full-screen Verge game, and if you try to re-maximize the game, it'll minimize it again right away. Very weird. When it does this, it also puts Photoshop and the color picker window on top.