#161427 - zodiacdagreat - Sun Aug 03, 2008 9:39 am
Can anyone tell me why I'm getting this msg?
"my.c:11: error: expected ')' before '*' token"
Here's the routine:
//! Adjust intensity by \a intensity
/*!
\param dst Destination color array
\param src Source color array.
\param nclrs Number of colors.
\param intensity Intensity (in .8f)
\note Might be faster if preformed via lut.
*/
typedef unsigned short u16;
void clr_adj_intensity(COLOR *dst, const COLOR *src, uint nclrs, FIXED intensity)
{
u32 ii, clr;
int rr, gg, bb;
FIXED ia= intensity+FIX_ONE;
for(ii=0; ii<nclrs; ii++)
{
clr= *src++;
rr= ia*((clr )&31);
gg= ia*((clr>>5 )&31);
bb= ia*((clr>>10)&31);
// Shift here, because it'd be unsigned-shift otherwise
*dst++= RGB15(bf_clamp(rr>>8,5), bf_clamp(gg>>8,5), bf_clamp(bb>>8,5));
}
}
"my.c:11: error: expected ')' before '*' token"
Here's the routine:
//! Adjust intensity by \a intensity
/*!
\param dst Destination color array
\param src Source color array.
\param nclrs Number of colors.
\param intensity Intensity (in .8f)
\note Might be faster if preformed via lut.
*/
typedef unsigned short u16;
void clr_adj_intensity(COLOR *dst, const COLOR *src, uint nclrs, FIXED intensity)
{
u32 ii, clr;
int rr, gg, bb;
FIXED ia= intensity+FIX_ONE;
for(ii=0; ii<nclrs; ii++)
{
clr= *src++;
rr= ia*((clr )&31);
gg= ia*((clr>>5 )&31);
bb= ia*((clr>>10)&31);
// Shift here, because it'd be unsigned-shift otherwise
*dst++= RGB15(bf_clamp(rr>>8,5), bf_clamp(gg>>8,5), bf_clamp(bb>>8,5));
}
}