question about m_pSquareColors

question about m_pSquareColors
0.0 0


I am reading the extention code. I have some doubt about m_pSquareColors. In CCLayerColor, m_pSquareColors [4] is a array of length 4.

so,I cant understand these codes for( unsigned int i=0; i < 4; i*+ )
m_pSquareColors[i \* 4].r = m_tColor.r;
m_pSquareColors[i \* 4* 1].g = m_tColor.g;
m_pSquareColors[i \* 4 + 2].b = m_tColor.b;
m_pSquareColors[i \* 4 + 3].a = m_cOpacity;
when i reached 3, why m_pSquareColors [15] have not oversteps the boundary.



OK, It’s a problem.
The extension sources are right because CCLayerColor::m_pSquareColors in v0.8.5 is still

GLubyte m_pSquareColor[4*4]

But it was changed to

ccColor4B m_pSquareColors [4];

in this commit, issue #558
So the NdControls extension can not compatible with the last version now.


ok,but Could you explain the function of m_pSquareColors? m_tColor and m_cOpacity has the same information.


I got it ,these colors are four direction colors ,these will change from one to another gradually