1.1 --- a/src/pvr2/tacore.c Sun Aug 06 03:50:36 2006 +0000
1.2 +++ b/src/pvr2/tacore.c Sun Aug 06 04:01:37 2006 +0000
1.5 - * $Id: tacore.c,v 1.5 2006-08-06 03:50:36 nkeynes Exp $
1.6 + * $Id: tacore.c,v 1.6 2006-08-06 04:01:37 nkeynes Exp $
1.8 * PVR2 Tile Accelerator implementation
1.10 @@ -213,11 +213,33 @@
1.13 static uint32_t parse_float_colour( float a, float r, float g, float b ) {
1.15 - (((unsigned int)((256 * CLAMP(a,0.0,1.0))-1))<<24) |
1.16 - (((unsigned int)((256 * CLAMP(r,0.0,1.0))-1))<<16) |
1.17 - (((unsigned int)((256 * CLAMP(g,0.0,1.0))-1))<<8) |
1.18 - (((unsigned int)((256 * CLAMP(b,0.0,1.0))-1)));
1.21 + if( TA_IS_INF(a) ) {
1.24 + ai = 256 * CLAMP(a,0.0,1.0) - 1;
1.25 + if( ai < 0 ) ai = 0;
1.27 + if( TA_IS_INF(r) ) {
1.30 + ri = 256 * CLAMP(r,0.0,1.0) - 1;
1.31 + if( ri < 0 ) ri = 0;
1.33 + if( TA_IS_INF(g) ) {
1.36 + gi = 256 * CLAMP(g,0.0,1.0) - 1;
1.37 + if( gi < 0 ) gi = 0;
1.39 + if( TA_IS_INF(b) ) {
1.42 + bi = 256 * CLAMP(b,0.0,1.0) - 1;
1.43 + if( bi < 0 ) bi = 0;
1.45 + return (ai << 24) | (ri << 16) | (gi << 8) | bi;
1.48 static uint32_t parse_intensity_colour( uint32_t base, float intensity )