Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused stuffs #3228

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions flixel/FlxCamera.hx
Original file line number Diff line number Diff line change
Expand Up @@ -605,14 +605,12 @@ class FlxCamera extends FlxBasic
return startTrianglesBatch(graphic, smooth, colored, blend);
#else
var itemToReturn = null;
var blendInt:Int = FlxDrawBaseItem.blendToInt(blend);

if (_currentDrawItem != null
&& _currentDrawItem.type == FlxDrawItemType.TILES
&& _headTiles.graphics == graphic
&& _headTiles.colored == colored
&& _headTiles.hasColorOffsets == hasColorOffsets
&& _headTiles.blending == blendInt
&& _headTiles.blend == blend
&& _headTiles.antialiasing == smooth
&& _headTiles.shader == shader)
Expand All @@ -631,7 +629,7 @@ class FlxCamera extends FlxBasic
{
itemToReturn = new FlxDrawItem();
}

// TODO: catch this error when the dev actually messes up, not in the draw phase
if (graphic.isDestroyed)
throw 'Attempted to queue an invalid FlxDrawItem, did you destroy a cached sprite?';
Expand All @@ -640,7 +638,6 @@ class FlxCamera extends FlxBasic
itemToReturn.antialiasing = smooth;
itemToReturn.colored = colored;
itemToReturn.hasColorOffsets = hasColorOffsets;
itemToReturn.blending = blendInt;
itemToReturn.blend = blend;
itemToReturn.shader = shader;

Expand All @@ -666,14 +663,11 @@ class FlxCamera extends FlxBasic
@:noCompletion
public function startTrianglesBatch(graphic:FlxGraphic, smoothing:Bool = false, isColored:Bool = false, ?blend:BlendMode, ?hasColorOffsets:Bool, ?shader:FlxShader):FlxDrawTrianglesItem
{
var blendInt:Int = FlxDrawBaseItem.blendToInt(blend);

if (_currentDrawItem != null
&& _currentDrawItem.type == FlxDrawItemType.TRIANGLES
&& _headTriangles.graphics == graphic
&& _headTriangles.antialiasing == smoothing
&& _headTriangles.colored == isColored
&& _headTriangles.blending == blendInt
&& _headTriangles.blend == blend
#if !flash
&& _headTriangles.hasColorOffsets == hasColorOffsets
Expand All @@ -691,7 +685,6 @@ class FlxCamera extends FlxBasic
public function getNewDrawTrianglesItem(graphic:FlxGraphic, smoothing:Bool = false, isColored:Bool = false, ?blend:BlendMode, ?hasColorOffsets:Bool, ?shader:FlxShader):FlxDrawTrianglesItem
{
var itemToReturn:FlxDrawTrianglesItem = null;
var blendInt:Int = FlxDrawBaseItem.blendToInt(blend);

if (_storageTrianglesHead != null)
{
Expand All @@ -708,7 +701,6 @@ class FlxCamera extends FlxBasic
itemToReturn.graphics = graphic;
itemToReturn.antialiasing = smoothing;
itemToReturn.colored = isColored;
itemToReturn.blending = blendInt;
itemToReturn.blend = blend;
#if !flash
itemToReturn.hasColorOffsets = hasColorOffsets;
Expand Down
6 changes: 0 additions & 6 deletions flixel/graphics/tile/FlxDrawBaseItem.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ class FlxDrawBaseItem<T>
*/
public static var drawCalls:Int = 0;

public static function blendToInt(blend:BlendMode):Int
{
return 0; // no blend mode support in drawQuads()
}

public var nextTyped:T;

public var next:FlxDrawBaseItem<T>;
Expand All @@ -29,7 +24,6 @@ class FlxDrawBaseItem<T>
public var antialiasing:Bool = false;
public var colored:Bool = false;
public var hasColorOffsets:Bool = false;
public var blending:Int = 0;
public var blend:BlendMode;

public var type:FlxDrawItemType;
Expand Down
Loading