private static int getTilesNumber ( int tileWidth , int tileHeight , Collection < Media > levelRips ) { int tiles = 0 ; for ( final Media levelRip : levelRips ) { final ImageHeader info = ImageInfo . get ( levelRip ) ; final int horizontalTiles = info . getWidth ( ) / tileWidth ; final int verticalTiles = info . getHeight ( ) / tileHeight ; tiles += horizontalTiles * verticalTiles ; } return tiles ; }
Get the total number of tiles .