private int keepSpriteOnMapY(Sprite sprite,int sy){
  sy=Math.max(sy,0);
  if (wh != 0) {
    sy=Math.min(sy,Math.max(getHeight() + svy,convertWorldYToScaledScreen(wh)) - sprite.getHeight());
  }
  return sy;
}

private int keepSpriteOnMapY ( Sprite sprite , int sy ) { sy = Math . max ( sy , 0 ) ; if ( wh != 0 ) { sy = Math . min ( sy , Math . max ( getHeight ( ) + svy , convertWorldYToScaledScreen ( wh ) ) - sprite . getHeight ( ) ) ; } return sy ; }
try to keep a sprite on the map . adjust the y coordinate .
