sw_engine texmap: remove unnecessary conditions.

remove exceptional handling for the performance.
This commit is contained in:
Hermet Park 2021-11-26 20:05:48 +09:00 committed by Hermet Park
parent 4485db4f15
commit 46bdc8f1dc

View file

@ -72,14 +72,6 @@
while (x++ < x2) {
uu = (int) u;
vv = (int) v;
/* FIXME: sometimes u and v are < 0 - don'tc crash */
if (uu < 0) uu = 0;
if (vv < 0) vv = 0;
/* Range exception handling */
/* OPTIMIZE ME, handle in advance? */
if (uu >= sw) uu = sw - 1;
if (vv >= sh) vv = sh - 1;
ar = (int)(255 * (1 - modff(u, &iptr)));
ab = (int)(255 * (1 - modff(v, &iptr)));