this is the only thing I added
Code:
void map::draw()
{
blit(MapBuffer,DoubleBuffer,camerax,cameray,0,0,800,600);
}
void map::animate()
{
for (int lay=0; lay < 3; lay++)
{
for (int row=0; row < width; row++)
{
for (int col=0; col < height; col++)
{
if (tiles[col][row][lay].AniFrame < 3)
tiles[col][row][lay].AniFrame++;
else
tiles[col][row][lay].AniFrame=0;
int tile_to_blit;
switch (GetTileType(col,row,lay))
{
case 0:
tile_to_blit=TILE_GRASS;
break;
case 1:
tile_to_blit=TILE_DIRTYWALL;
break;
case 2:
tile_to_blit=TILE_FLOOR;
break;
case 3:
switch (tiles[col][row][lay].AniFrame)
{
case 0:
tile_to_blit = TILE_GRASS;
break;
case 1:
tile_to_blit = TILE_DIRTYWALL;
break;
case 2:
tile_to_blit = TILE_FLOOR;
break;
default:
tiles[col][row][lay].AniFrame = 0;
tile_to_blit = TILE_GRASS;
}
break;
default:
tile_to_blit=-1;
}
if (tile_to_blit != -1)
blit((BITMAP*)TileGraphics[tile_to_blit].dat,MapBuffer,0,0,col*40,row*40,40,40);
}
}
}
}
I already tried commenting all that out, and the same thing happens.