class CBlock {
public :
bool m_bActive;
float m_fX;
};
CBlock g_bBlock[ENUM_TOTAL_BLOCKS];
for ( int I = 0; I < ENUM_TOTAL_BLOCKS; ++I ) {
if ( g_bBlock[I].m_bActive ) {
glBegin(GL_QUADS);
glTexCoord2f(-1.0f, 0.0f);
glVertex3f(g_bBlock[I].m_fX, 4.0f, 0.0f);
glTexCoord2f(-1.0f, 1.0f);
glVertex3f(g_bBlock[I].m_fX+2.0f, 4.0f, 0.0f);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(g_bBlock[I].m_fX+2.0f, 3.5f, 0.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(g_bBlock[I].m_fX, 3.5f, 0.0f);
glEnd();
}
}You also have to initialize the blocks to make them all active and to set their starting positions.
Obviously, telling you how to do this means holding your hand and is not helping you grow on your own.
L. Spiro