Parse 12 vs 24 bit colors eventually
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Models
|
||||
{
|
||||
public class DirectoryModel
|
||||
{
|
||||
public string Name { get; }
|
||||
|
||||
public DirectoryModel(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public List<ConfigurationModel> Configurations { get; } = new();
|
||||
}
|
||||
|
||||
public class ConfigurationModel
|
||||
{
|
||||
public string Name { get; }
|
||||
|
||||
public ConfigurationModel(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
-4
@@ -5,9 +5,6 @@ namespace fxl.codes.kisekae.Models
|
||||
public class PaletteModel
|
||||
{
|
||||
private const string Regex = "%([a-zA-Z0-9\\-]*\\.[kKcCfF]+)[\\s]*;(.*)";
|
||||
|
||||
public string FileName { get; }
|
||||
public string Comment { get; }
|
||||
|
||||
public PaletteModel(string line)
|
||||
{
|
||||
@@ -17,7 +14,7 @@ namespace fxl.codes.kisekae.Models
|
||||
foreach (var group in matcher.GetGroupNames())
|
||||
{
|
||||
if (group == "0") continue;
|
||||
|
||||
|
||||
match.Groups.TryGetValue(group, out var value);
|
||||
if (string.IsNullOrEmpty(value?.Value)) continue;
|
||||
|
||||
@@ -32,5 +29,29 @@ namespace fxl.codes.kisekae.Models
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string FileName { get; }
|
||||
public string Comment { get; }
|
||||
|
||||
public Color[] Colors { get; private set; }
|
||||
|
||||
public void ParseColors(byte[] bytes, int depth)
|
||||
{
|
||||
Colors = new Color[0];
|
||||
}
|
||||
}
|
||||
|
||||
public class Color
|
||||
{
|
||||
public Color(int red, int green, int blue)
|
||||
{
|
||||
Red = red;
|
||||
Green = green;
|
||||
Blue = blue;
|
||||
}
|
||||
|
||||
public int Red { get; }
|
||||
public int Green { get; }
|
||||
public int Blue { get; }
|
||||
}
|
||||
}
|
||||
@@ -2,20 +2,23 @@ using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Models
|
||||
{
|
||||
public class ConfigurationModel
|
||||
public class PlaysetModel
|
||||
{
|
||||
private readonly string _originalDirectory;
|
||||
|
||||
public ConfigurationModel(string originalDirectory)
|
||||
{
|
||||
_originalDirectory = originalDirectory;
|
||||
}
|
||||
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int BorderColorIndex { get; set; }
|
||||
|
||||
public List<PaletteModel> Palettes { get; } = new();
|
||||
public List<CelModel> Cels { get; } = new();
|
||||
public int[] CurrentPalettes = new int[10];
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
foreach (var cel in Cels)
|
||||
{
|
||||
cel.CurrentPositions = cel.InitialPositions;
|
||||
cel.CurrentPaletteId = cel.PaletteId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,12 @@ namespace fxl.codes.kisekae.Models
|
||||
{
|
||||
public class Point
|
||||
{
|
||||
public Point(int x, int y)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user