private void renderScene(Graphics2D g,int xAdjust,int yAdjust){
  g.translate(xAdjust,yAdjust);
  int startTileX=Math.max(0,(int)getViewX());
  int startTileY=Math.max(0,(int)getViewY());
  Rectangle clip=g.getClipBounds();
  startTileX=Math.max(startTileX,clip.x / IGameScreen.SIZE_UNIT_PIXELS);
  startTileY=Math.max(startTileY,clip.y / IGameScreen.SIZE_UNIT_PIXELS);
  int layerWidth=getViewWidth();
  int layerHeight=getViewHeight();
  layerWidth=Math.min(layerWidth,clip.width / IGameScreen.SIZE_UNIT_PIXELS) + 2;
  layerHeight=Math.min(layerHeight,clip.height / IGameScreen.SIZE_UNIT_PIXELS) + 2;
  drawEndOfTheWorld(g,xAdjust,yAdjust);
  viewManager.prepareViews(clip);
  final String set=gameLayers.getAreaName();
  gameLayers.drawLayers(g,set,"floor_bundle",startTileX,startTileY,layerWidth,layerHeight,"blend_ground","0_floor","1_terrain","2_object");
  viewManager.draw(g);
  gameLayers.drawLayers(g,set,"roof_bundle",startTileX,startTileY,layerWidth,layerHeight,"blend_roof","3_roof","4_roof_add");
  gameLayers.drawWeather(g,startTileX,startTileY,layerWidth,layerHeight);
  viewManager.drawTop(g);
  Iterator<EffectLayer> it=globalEffects.iterator();
  while (it.hasNext()) {
    EffectLayer eff=it.next();
    if (!eff.isExpired()) {
      eff.draw(g,startTileX,startTileY,layerWidth,layerHeight);
    }
 else {
      it.remove();
    }
  }
}

private void renderScene ( Graphics2D g , int xAdjust , int yAdjust ) { g . translate ( xAdjust , yAdjust ) ; int startTileX = Math . max ( 0 , ( int ) getViewX ( ) ) ; int startTileY = Math . max ( 0 , ( int ) getViewY ( ) ) ; Rectangle clip = g . getClipBounds ( ) ; startTileX = Math . max ( startTileX , clip . x / IGameScreen . SIZE_UNIT_PIXELS ) ; startTileY = Math . max ( startTileY , clip . y / IGameScreen . SIZE_UNIT_PIXELS ) ; int layerWidth = getViewWidth ( ) ; int layerHeight = getViewHeight ( ) ; layerWidth = Math . min ( layerWidth , clip . width / IGameScreen . SIZE_UNIT_PIXELS ) + 2 ; layerHeight = Math . min ( layerHeight , clip . height / IGameScreen . SIZE_UNIT_PIXELS ) + 2 ; drawEndOfTheWorld ( g , xAdjust , yAdjust ) ; viewManager . prepareViews ( clip ) ; final String set = gameLayers . getAreaName ( ) ; gameLayers . drawLayers ( g , set , "floor_bundle" , startTileX , startTileY , layerWidth , layerHeight , "blend_ground" , "0_floor" , "1_terrain" , "2_object" ) ; viewManager . draw ( g ) ; gameLayers . drawLayers ( g , set , "roof_bundle" , startTileX , startTileY , layerWidth , layerHeight , "blend_roof" , "3_roof" , "4_roof_add" ) ; gameLayers . drawWeather ( g , startTileX , startTileY , layerWidth , layerHeight ) ; viewManager . drawTop ( g ) ; Iterator < EffectLayer > it = globalEffects . iterator ( ) ; while ( it . hasNext ( ) ) { EffectLayer eff = it . next ( ) ; if ( ! eff . isExpired ( ) ) { eff . draw ( g , startTileX , startTileY , layerWidth , layerHeight ) ; } else { it . remove ( ) ; } } }
render the scalable parts of the screen .
