code: 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);
              }
          }
      }
docs: Render horizontal tiles.
  
  @param g The graphic output.
  @param ty The current vertical tile location.
  @param viewY The vertical view offset.