private void renderHorizontal ( Graphic g , int ty , double viewY ) { final int inTileWidth = ( int ) Math . ceil ( viewer . getWidth ( ) / ( double ) map . getTileWidth ( ) ) ; final int sx = ( int ) Math . floor ( ( viewer . getX ( ) + viewer . getViewX ( ) ) / map . getTileWidth ( ) ) ; final double viewX = viewer . getX ( ) ; for ( int h = 0 ; h <= inTileWidth ; h ++ ) { final int tx = h + sx ; if ( ! ( tx < 0 || tx >= map . getInTileWidth ( ) ) ) { renderTile ( g , tx , ty , viewX , viewY ) ; } } }
Render horizontal tiles .