Skip to content
Merged
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
22 changes: 8 additions & 14 deletions flixel/tile/FlxTilemap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,7 @@ class FlxTypedTilemap<Tile:FlxTile> extends FlxBaseTilemap<Tile>
if (tileBitmap == null)
tileBitmap = makeDebugTile(color);
else
{
tileBitmap.fillRect(tileBitmap.rect, FlxColor.TRANSPARENT);
drawDebugTile(tileBitmap, color);
}

setDirty();
return tileBitmap;
Expand Down Expand Up @@ -1360,18 +1357,15 @@ class FlxTypedTilemap<Tile:FlxTile> extends FlxBaseTilemap<Tile>

function drawDebugTile(debugTile:BitmapData, color:FlxColor):Void
{
if (color != FlxColor.TRANSPARENT)
if (color == FlxColor.TRANSPARENT)
{
debugTile.fillRect(debugTile.rect, FlxColor.TRANSPARENT);
}
else
{
var gfx:Graphics = FlxSpriteUtil.flashGfx;
gfx.clear();
gfx.moveTo(0, 0);
gfx.lineStyle(1, color, 0.5);
gfx.lineTo(tileWidth - 1, 0);
gfx.lineTo(tileWidth - 1, tileHeight - 1);
gfx.lineTo(0, tileHeight - 1);
gfx.lineTo(0, 0);

debugTile.draw(FlxSpriteUtil.flashGfxSprite);
// 0.5 alpha
debugTile.fillRect(debugTile.rect, (0x80 << 24) | color.rgb);
debugTile.fillRect(new Rectangle(1, 1, tileWidth - 2, tileHeight - 2), 0x0);
}
}

Expand Down