bopti: fix bouding bugs in bopti_render_noclip()

These errors ironically made the noclip version slower than its
counterpart.
This commit is contained in:
Lephe 2020-07-21 08:54:34 +02:00
parent 4cb1555708
commit 39664e9bd2
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 2 additions and 1 deletions

View File

@ -259,10 +259,11 @@ void bopti_render_noclip(int visual_x, int y, bopti_image_t const *img,
/* Left pixel of leftmost column */
int x = visual_x - (left & 31);
width += (left & 31);
left &= ~31;
/* Start column and end column (included) */
left >>= 5;
int right = (left + width - 1) >> 5;
left >>= 5;
/* Finish with the standard bopti renderer */
struct rbox rbox = { x, visual_x, y, width, left, right, top, bottom };