code: private void updateFov(Fovable fovable)
      {
          final int tx = fovable.getInTileX();
          final int ty = fovable.getInTileY();
          final int tw = fovable.getInTileWidth();
          final int th = fovable.getInTileHeight();
          final int ray = fovable.getInTileFov();
  
          final int sx = UtilMath.clamp(tx - ray - tw / 2, 0, map.getInTileWidth() - 1);
          final int ex = UtilMath.clamp(tx + ray + tw / 2, 0, map.getInTileWidth() - 1);
          final int sy = UtilMath.clamp(ty - ray - th / 2, 0, map.getInTileHeight() - 1);
          final int ey = UtilMath.clamp(ty + ray + th / 2, 0, map.getInTileHeight() - 1);
  
          for (int x = sx + 1; x < ex; x++)
          {
              for (int y = sy + 1; y < ey; y++)
              {
                  final Tile tile = new TileGame(Integer.valueOf(0),
                                                 NO_FOG,
                                                 x * (double) map.getTileWidth(),
                                                 y * (double) map.getTileHeight(),
                                                 map.getTileWidth(),
                                                 map.getTileHeight());
                  map.setTile(tile);
                  transition.resolve(getTile(x, y));
              }
          }
  
          for (int x = sx; x < ex + 1; x++)
          {
              for (int y = sy; y < ey + 1; y++)
              {
                  final Tile tile = map.getTile(x, y);
                  revealed.add(tile);
              }
          }
      }
docs: Update fovable field of view (fog of war).
  
  @param fovable The fovable reference.