Closed chitatofish closed 1 year ago
Just to be extra clear, fontBlit()
DOES account for the camera when drawing, as it calls pset()
(which does account for the camera). To test this, you can move the camera slightly down and to the right (say, setCamera(50, 50)
), and try something like print("Test", cameraX, cameraY)
, the text will be exactly on the top left. The problem is that although it does account for the camera when drawing, it still performs a check that does not account for it.
thanks!
The fontBlit() proc checks for the clipping area without applying the camera offset. This causes a bug where although it seems like
fontBlit()
accounts for the camera when drawing (since it callspset()
to draw), it will not work as expected when the position of the text is outside clipping bounds, even if that position is technically in bounds when accounting for the camera offset.Additionally, this check is unnecessary, since
pset()
(which is called byfontBlit()
) applies the camera offset, and then callspsetRaw()
, which already checks for the clipping area, therefore, we can simply remove this check infontBlit()
, as per my commit.