<commit_before>package addons;

import nme.Assets;
import nme.display.Bitmap;
import nme.display.BitmapData;
import nme.geom.Point;
import nme.geom.Rectangle;
import org.flixel.FlxG;
import org.flixel.FlxObject;

/**
 * Used for showing infinitely scrolling backgrounds.
 * @author <NAME>
 */
class FlxBackdrop extends FlxObject
{
	private var _data:BitmapData;
	private var _ppoint:Point;
	private var _scrollW:Int;
	private var _scrollH:Int;
	private var _repeatX:Bool;
	private var _repeatY:Bool;
	
	/**
	 * Creates an instance of the FlxBackdrop class, used to create infinitely scrolling backgrounds.
	 * @param   bitmap The image you want to use for the backdrop.
	 * @param   scrollX Scrollrate on the X axis.
	 * @param   scrollY Scrollrate on the Y axis.
	 * @param   repeatX If the backdrop should repeat on the X axis.
	 * @param   repeatY If the backdrop should repeat on the Y axis.
	 */
	public function new(graphic:String, scrollX:Float = 0, scrollY:Float = 0, repeatX:Bool = true, repeatY:Bool = true) 
	{
		super();
		var data:BitmapData = Assets.getBitmapData(graphic);
		var w:Int = data.width;
		var h:Int = data.height;
		if (repeatX) w += FlxG.width;
		if (repeatY) h += FlxG.height;

		_data = new BitmapData(w, h);
		_ppoint = new Point();

		_scrollW = data.width;
		_scrollH = data.height;
		_repeatX = repeatX;
		_repeatY = repeatY;

		while (_ppoint.y < _data.height + data.height)
		{
			while (_ppoint.x < _data.width + data.width)
			{
				_data.copyPixels(data, data.rect, _ppoint);
				_ppoint.x += data.width;
			}
			_ppoint.x = 0;<commit_msg>changed default scroll values<commit_after>package addons;

import nme.Assets;
import nme.display.Bitmap;
import nme.display.BitmapData;
import nme.geom.Point;
import nme.geom.Rectangle;
import org.flixel.FlxG;
import org.flixel.FlxObject;

/**
 * Used for showing infinitely scrolling backgrounds.
 * @author <NAME>
 */
class FlxBackdrop extends FlxObject
{
	private var _data:BitmapData;
	private var _ppoint:Point;
	private var _scrollW:Int;
	private var _scrollH:Int;
	private var _repeatX:Bool;
	private var _repeatY:Bool;
	
	/**
	 * Creates an instance of the FlxBackdrop class, used to create infinitely scrolling backgrounds.
	 * @param   bitmap The image you want to use for the backdrop.
	 * @param   scrollX Scrollrate on the X axis.
	 * @param   scrollY Scrollrate on the Y axis.
	 * @param   repeatX If the backdrop should repeat on the X axis.
	 * @param   repeatY If the backdrop should repeat on the Y axis.
	 */
	public function new(graphic:String, scrollX:Float = 1, scrollY:Float = 1, repeatX:Bool = true, repeatY:Bool = true) 
	{
		super();
		var data:BitmapData = Assets.getBitmapData(graphic);
		var w:Int = data.width;
		var h:Int = data.height;
		if (repeatX) w += FlxG.width;
		if (repeatY) h += FlxG.height;

		_data = new BitmapData(w, h);
		_ppoint = new Point();

		_scrollW = data.width;
		_scrollH = data.height;
		_repeatX = repeatX;
		_repeatY = repeatY;

		while (_ppoint.y < _data.height + data.height)
		{
			while (_ppoint.x < _data.width + data.width)
			{
				_data.copyPixels(data, data.rect, _ppoint);
				_ppoint.x += data.width;
			}
			_ppoint.x = 0;
{'fraction_non_alphanumeric': 0.10529634300126103, 'fraction_numerical': 0.0018915510718789407, 'mean_word_length': 3.6937869822485205, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7216778', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1086, 'n_words': 332}