I've got a weird problem with setting opacity. I've got an AtlasSprite that I set the color of, and afterwards I run a FadeOut transition. In the simulator it works as expected, but on my iPod touch g2, the color will be reset to its original form. So if I've got a white atlassprite, set its color to red, and then fade it out, it'll be white and fade out. In the simulator, it'll be red and fade out.
I debugged this alittle bit and noticed that the simulator does not enter the if block, while my iPod does.
// AtlasSprite
-(void) setOpacity:(GLubyte) anOpacity
{
opacity_ = anOpacity;
// special opacity for premultiplied textures
if( opacityModifyRGB_ )
color_.r = color_.g = color_.b = opacity_;
ccColor4B color4 = {color_.r, color_.g, color_.b, opacity_ };
quad_.bl.colors = color4;
quad_.br.colors = color4;
quad_.tl.colors = color4;
quad_.tr.colors = color4;
[self updateColor];
}
// Code end
Commenting out the if-statement does not solve the issue however. On the contrary - if I do, the sprite won't even fade at all!
Anyone know why it's behaving this way?