deepstone

diff src/scantmpl.h @ 17:1e9f0b3616fa

fixed the matrix multiplication order
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 30 Nov 2011 00:04:16 +0200
parents 059bb38506b3
children 5ff8ce78059a
line diff
     1.1 --- a/src/scantmpl.h	Tue Nov 29 07:23:57 2011 +0200
     1.2 +++ b/src/scantmpl.h	Wed Nov 30 00:04:16 2011 +0200
     1.3 @@ -141,7 +141,7 @@
     1.4  	float e, de, dfde;
     1.5  #endif
     1.6  #ifdef INTERP_TEX
     1.7 -	int tx, ty;
     1.8 +	unsigned int tx, ty;
     1.9  	float u, v, du, dv, dfdu, dfdv;
    1.10  #endif
    1.11  	struct vertex *left, *right;
    1.12 @@ -253,8 +253,8 @@
    1.13  		z += dfdz;
    1.14  #endif
    1.15  #ifdef INTERP_TEX
    1.16 -		tx = (int)(u * st->tex.width) & st->tex.xmask;
    1.17 -		ty = (int)(v * st->tex.height) & st->tex.ymask;
    1.18 +		tx = (unsigned int)(u * st->tex.width) & st->tex.xmask;
    1.19 +		ty = (unsigned int)(v * st->tex.height) & st->tex.ymask;
    1.20  		c = st->tex.pixels[(ty << st->tex.xshift) + tx];
    1.21  
    1.22  		u += dfdu;