Filling a 256 colour (1bpp) surface with a solid polygon renders dx + 1 pixels (dx = w = x2 - x1), however, on other surfaces, and using the textured method, it doesn't cover the extra pixel.
In fairness, the 256 colour one I believe is accurate. Take x1 = 3, and x2 = 5. Where dx = 5 - 3 = 2. But if you're drawing from 3 to 5, you do need to be drawing 3 pixels ( x2 - x1 + 1 ).
Could you adjust the width calculation to be w = x2 - x1 + 1 in hlineColor, _HLineTextured, and any other similar functions? (and remove the additional pixel in the 256col surface memset call)
Log in to post a comment.