Browse Source

Fix preset option packing

master
Starbeamrainbowlabs 1 year ago
parent
commit
92328ae39c
Signed by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com> GPG Key ID: 1BE5172E637709C2
1 changed files with 4 additions and 7 deletions
  1. 4
    7
      SpritePacker/SpritePacker.cs

+ 4
- 7
SpritePacker/SpritePacker.cs View File

@@ -7,6 +7,7 @@ using System.Configuration;
using System.Drawing.Text;
using System.Drawing.Imaging;
using System.Text;
using System.Linq;

namespace SpritePacker
{
@@ -80,14 +81,10 @@ namespace SpritePacker
{
sortBySize();

List<Sprite> arrangedSprites = new List<Sprite>();
foreach(Sprite cspr in sprites)
List<Sprite> arrangedSprites = sprites.Where((Sprite spr) => spr.Placed).ToList();
List<Sprite> spritesToPack = sprites.Where((Sprite spr) => !spr.Placed).ToList();
foreach(Sprite cspr in spritesToPack)
{
if (cspr.Placed) {
if(Verbose) Console.WriteLine($"Skipping placement of {cspr} as it has been preset");
continue;
}

if(Verbose) Console.WriteLine("Attempting to place {0}.", cspr);
Point scanLines = Point.Empty;
Point nextScanLines = new Point(int.MaxValue, int.MaxValue);

Loading…
Cancel
Save