diff options
-rw-r--r-- | render.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -492,10 +492,10 @@ void ren_texture( ex = rect.x + rect.w; ey = rect.y + rect.h; for (y = rect.y; y < ey; y++) { - int v = (y << fbits) / re->h; + int v = ((y - re->y) << fbits) / re->h; int x; for (x = rect.x; x < ex; x++) { - int u = (x << fbits) / re->w; + int u = ((x - re->x) << fbits) / re->w; Colour c = sample_tex(t, u, v); *d = blend(*d, c); d++; |