<commit_before>package flixel.graphics.tile;
import flixel.FlxCamera;
import flixel.graphics.frames.FlxFrame;
import flixel.math.FlxMatrix;
import openfl.display.BlendMode;
import openfl.display.Tilesheet;

/**
 * ...
 * @author Zaphod
 */
class FlxDrawBaseItem<T>
{
	public static function blendToInt(blend:BlendMode):Int
	{
		var blendInt:Int = 0;
		
		if (blend != null)
		{
			switch (blend)
			{
				case BlendMode.ADD:
					blendInt = Tilesheet.TILE_BLEND_ADD;
				#if !flash
				case BlendMode.MULTIPLY:
					blendInt = Tilesheet.TILE_BLEND_MULTIPLY;
				case BlendMode.SCREEN:
					blendInt = Tilesheet.TILE_BLEND_SCREEN;
				#end
				default:
					blendInt = Tilesheet.TILE_BLEND_NORMAL;
			}
		}
		
		return blendInt;
	}
	
	public var nextTyped:T;
	
	public var next:FlxDrawBaseItem<T>;<commit_msg>added BlendMode.SUBTRACT support to Tilesheets<commit_after>package flixel.graphics.tile;
import flixel.FlxCamera;
import flixel.graphics.frames.FlxFrame;
import flixel.math.FlxMatrix;
import openfl.display.BlendMode;
import openfl.display.Tilesheet;

/**
 * ...
 * @author Zaphod
 */
class FlxDrawBaseItem<T>
{
	public static function blendToInt(blend:BlendMode):Int
	{
		var blendInt:Int = 0;
		
		if (blend != null)
		{
			switch (blend)
			{
				case BlendMode.ADD:
					blendInt = Tilesheet.TILE_BLEND_ADD;
				#if !flash
				case BlendMode.MULTIPLY:
					blendInt = Tilesheet.TILE_BLEND_MULTIPLY;
				case BlendMode.SCREEN:
					blendInt = Tilesheet.TILE_BLEND_SCREEN;
				case BlendMode.SUBTRACT:
					blendInt = Tilesheet.TILE_BLEND_SUBTRACT;
				#end
				default:
					blendInt = Tilesheet.TILE_BLEND_NORMAL;
			}
		}
		
		return blendInt;
	}
	
	public var nextTyped:T;
	
	public var next:FlxDrawBaseItem<T>;
{'fraction_non_alphanumeric': 0.09971014492753623, 'fraction_numerical': 0.0011594202898550724, 'mean_word_length': 3.5904255319148937, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2124751', 'n_tokens_mistral': 784, 'n_tokens_neox': 665, 'n_words': 115}