I am not sure how do it yet.
this is what I was thinking
int v_score;
int temp = v_score ;
DrawTile(MAPWIDTH+1,GREY,(9+temp/100000));
if(temp >= 100000)
temp-=(100000*(temp/100000));
DrawTile(MAPWIDTH+2,GREY,(9+temp/10000));
if(temp >= 10000)
temp-=(10000*(temp/10000));
DrawTile(MAPWIDTH+3,GREY,(9+temp/1000));
if(temp >= 1000)
temp-=(1000*(temp/1000));
DrawTile(MAPWIDTH+4,GREY,(9+temp/100));
if(temp >= 100)
temp-=(100*(temp/100));
DrawTile(MAPWIDTH+5,GREY,(9+temp/10));
if(temp >= 10)
temp-=(10*(temp/10));
DrawTile(MAPWIDTH+6,GREY,(9+temp));
and put the counter in here some were I just dont know were to add it.
void Move(int x, int y)
{
if(CollisionTest(x, y))
{
if(y == 1)
{
if(sPiece.y<1)
{
//you lose! new game.
NewGame();
}
else
{
bool killblock=false;
int i,j;
//new block time! add this one to the list!
for(i=0; i<4; i++)
for(j=0; j<4; j++)
if(sPiece.size[ i ][j] != TILENODRAW)
Map[sPiece.x+i][sPiece.y+j] = sPiece.size[ i ][j];
//check for cleared row!
for(j=0; j< MAPHEIGHT; j++)
{
bool filled=true;
for(i=0; i< MAPWIDTH; i++)
if(Map[ i ][j] == TILEBLACK)
filled=false;
if(filled)
{
RemoveRow(j);
killblock=true;
}
}
if(killblock)
{
for(i=0; i<4; i++)
for(j=0; j<4; j++)
sPiece.size[ i ][j]=TILENODRAW;
}
NewBlock();
}
}
}
else
{
sPiece.x+=x;
sPiece.y+=y;
}
DrawMap();
}