public void checkXCollision()
	{
		boundingBox = new Rectangle((int) x + H_OFFSET, (int) y + V_OFFSET, BOX_WIDTH, BOX_HEIGHT);

		int xcol = (int) (boundingBox.getCenterX() / tileMap.getTileSize());
		int yrow = (int) (boundingBox.getCenterY() / tileMap.getTileSize());

		int row = 0, col = 0;
		for (int r = yrow - 1; r < yrow - 1 + 3; r++)
		{
			for (int c = xcol - 1; c < xcol - 1 + 3; c++)
			{
				if (tileMap.getTileCollision(r, c))
				{
					surroundingTiles[row][col] = new Rectangle(c * tileMap.getTileSize(), r * tileMap.getTileSize(), tileMap.getTileSize(), tileMap.getTileSize());
				}
				else
					surroundingTiles[row][col] = new Rectangle(0, 0, 0, 0); // Pretty much a null rectangle

				col++;
			}
			row++;
			col = 0;
		}

		for (int r = 0; r < 3; r++)
		{
			if (boundingBox.intersects(surroundingTiles[r][0]))
			{
				x = surroundingTiles[r][0].getX() + tileMap.getTileSize() - H_OFFSET;
				dx = 0;
			}
		}

		for (int r = 0; r < 3; r++)
		{
			if (boundingBox.intersects(surroundingTiles[r][2]))
			{
				x = surroundingTiles[r][2].x - tileMap.getTileSize() * 2 + H_OFFSET + 1;
				dx = 0;
			}
		}
	}