Added support for multiple doors, calculate x and y from tile coordinates.