
323Chapter Review
{
for(int col=0; col<MAP_SIZE; col++)
{
mapTile.setCurrentFrame(tileMap0[row][col]);
mapTile.setX((float)( SCREEN_X - (row*TEXTURE_SIZE/2) +
(col*TEXTURE_SIZE/2) ));
mapTile.setY((float)( SCREEN_Y + (row*TEXTURE_SIZE/4) +
(col*TEXTURE_SIZE/4) - HEIGHT_CHANGE*0));
mapTile.draw();
}
}
// Layer1
for(int row=0; row<MAP_SIZE; row++)
{
for(int col=0; col<MAP_SIZE; col++)
{
mapTile.setCurrentFrame(tileMap1[row][col]);
mapTile.setX((float)( SCREEN_X - (row*TEXTURE_SIZE/2) +
(col*TEXTURE_SIZE/2) ));
mapTile.setY((float)( SCREEN_Y + (row*TEXTURE_SIZE/4) +
(col*TEXTURE_SIZE/4) - HEIGHT_CHANGE*1));
mapTile.draw();
}
}
... continued for remaining ...