diff --git a/PCK-Studio/Rendering/ModelRenderer.cs b/PCK-Studio/Rendering/ModelRenderer.cs index cc1e05dd..f8dcb3e3 100644 --- a/PCK-Studio/Rendering/ModelRenderer.cs +++ b/PCK-Studio/Rendering/ModelRenderer.cs @@ -132,7 +132,7 @@ namespace PckStudio.Rendering return; } - for (int i = -1; i < modelMetaData.UvOffsets.Length; i++) + foreach (JsonModelMetaLayer layer in modelMetaData.Layers) { bool tryGetPart(string name, out ModelPart modelPart) { @@ -141,13 +141,8 @@ namespace PckStudio.Rendering modelPart = default; return false; } - if (i == -1 || !modelMetaData.UvOffsets.IndexInRange(i)) - { - modelPart = originalModelPart; - return true; - } - System.Numerics.Vector2 uvoffset = modelMetaData.UvOffsets[i]; - modelPart = new ModelPart(originalModelPart.Name, originalModelPart.ParentName, originalModelPart.Translation, originalModelPart.Rotation, originalModelPart.AdditionalRotation); + System.Numerics.Vector2 uvoffset = layer.Uv; + modelPart = new ModelPart(layer.Name ?? originalModelPart.Name, originalModelPart.ParentName, originalModelPart.Translation, originalModelPart.Rotation, originalModelPart.AdditionalRotation); modelPart.AddBoxes(originalModelPart.GetBoxes().Select(box => new ModelBox(box.Position, box.Size, box.Uv + uvoffset, box.Inflate, box.Mirror))); return true; } diff --git a/PckStudio.Core/AtlasGroup.cs b/PckStudio.Core/AtlasGroup.cs index 3b2a53f0..70d81c95 100644 --- a/PckStudio.Core/AtlasGroup.cs +++ b/PckStudio.Core/AtlasGroup.cs @@ -16,20 +16,71 @@ * 3. This notice may not be removed or altered from any source distribution. **/ using System; +using System.Data.SqlTypes; using System.Drawing; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace PckStudio.Core { + public class AtlasGroupJsonConverter : JsonConverter + { + public override AtlasGroup ReadJson(JsonReader reader, Type objectType, AtlasGroup existingValue, bool hasExistingValue, JsonSerializer serializer) + { + JObject jObject = JObject.Load(reader); + + if (!TryGetValue(jObject, "name", out string name) || !TryGetValue(jObject, "row", out int row) || !TryGetValue(jObject, "column", out int column)) + return default; + + int frameTime = 1; + int frameCount = 0; + int rowSpan = 0; + int columnSpan = 0; + ImageLayoutDirection direction = default; + bool isAnimation = TryGetValue(jObject, "frameTime", out frameTime) && + TryGetValue(jObject, "frameCount", out frameCount) && + TryGetValue(jObject, "direction", out direction); + bool isLargeTile = TryGetValue(jObject, "rowSpan", out rowSpan) && TryGetValue(jObject, "columnSpan", out columnSpan); + if (isAnimation && isLargeTile) + return new AtlasGroupLargeTileAnimation(name, row, column, rowSpan, columnSpan, frameCount, direction, frameTime); + if (isAnimation) + return new AtlasGroupAnimation(name, row, column, frameCount, direction, frameTime); + if (isLargeTile) + return new AtlasGroupLargeTile(name, row, column, rowSpan, columnSpan); + return default; + } + + bool TryGetValue(JObject jObject, string propertyName, out T value) + { + if (!jObject.TryGetValue(propertyName, out JToken token)) + { + value = default; + return false; + } + value = token.ToObject() ?? default; + return value is T; + } + + public override void WriteJson(JsonWriter writer, AtlasGroup value, JsonSerializer serializer) => serializer.Serialize(writer, value); + } + public abstract class AtlasGroup { + [JsonProperty("name", Required = Required.Always)] public string Name { get; set; } + [JsonProperty("row", Required = Required.Always)] public int Row { get; } + [JsonProperty("column", Required = Required.Always)] public int Column { get; } + [JsonIgnore] public virtual int Count => 1; + [JsonIgnore] protected abstract bool isAnimation { get; } + [JsonIgnore] protected abstract bool isLargeTile { get; } + [JsonProperty("direction")] public virtual ImageLayoutDirection Direction => Column > Row ? ImageLayoutDirection.Vertical : ImageLayoutDirection.Horizontal; public AtlasGroup(string name, int row, int column) diff --git a/PckStudio.Core/AtlasGroupAnimation.cs b/PckStudio.Core/AtlasGroupAnimation.cs index aa662f2f..962cd54f 100644 --- a/PckStudio.Core/AtlasGroupAnimation.cs +++ b/PckStudio.Core/AtlasGroupAnimation.cs @@ -16,17 +16,28 @@ * 3. This notice may not be removed or altered from any source distribution. **/ using System.Drawing; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; namespace PckStudio.Core { internal sealed class AtlasGroupAnimation : AtlasGroup { - public int FrameTime { get; } - public override int Count { get; } + [JsonProperty("frameCount", Required = Required.Always)] + private int _frameCount; + + [JsonProperty("frameTime")] + public int FrameTime { get; } = Animation.MINIMUM_FRAME_TIME; + + public override int Count => _frameCount; + + [JsonProperty("direction")] public override ImageLayoutDirection Direction { get; } + [JsonIgnore] protected override bool isAnimation => true; + [JsonIgnore] protected override bool isLargeTile => false; public override Size GetSize(Size tileSize) => new Size(tileSize.Width * (Direction == ImageLayoutDirection.Horizontal ? Count : 1), tileSize.Height * (Direction == ImageLayoutDirection.Vertical ? Count : 1)); @@ -34,7 +45,7 @@ namespace PckStudio.Core public AtlasGroupAnimation(string name, int row, int column, int frameCount, ImageLayoutDirection direction, int frameTime = Animation.MINIMUM_FRAME_TIME) : base(name, row, column) { - Count = frameCount; + _frameCount = frameCount; Direction = direction; FrameTime = frameTime; } diff --git a/PckStudio.Core/AtlasGroupLargeTile.cs b/PckStudio.Core/AtlasGroupLargeTile.cs index 7475cf4f..964733d4 100644 --- a/PckStudio.Core/AtlasGroupLargeTile.cs +++ b/PckStudio.Core/AtlasGroupLargeTile.cs @@ -17,18 +17,24 @@ **/ using System; using System.Drawing; +using Newtonsoft.Json; namespace PckStudio.Core { internal sealed class AtlasGroupLargeTile : AtlasGroup { + [JsonProperty("rowSpan")] public int RowSpan { get; } + [JsonProperty("columnSpan")] public int ColumnSpan { get; } + [JsonIgnore] public override int Count => RowSpan * ColumnSpan; + [JsonIgnore] protected override bool isAnimation => false; + [JsonIgnore] protected override bool isLargeTile => true; public override Size GetSize(Size tileSize) => new Size(RowSpan * tileSize.Width, ColumnSpan * tileSize.Height); diff --git a/PckStudio.Core/AtlasGroupLargeTileAnimation.cs b/PckStudio.Core/AtlasGroupLargeTileAnimation.cs index e0537197..c92e45ab 100644 --- a/PckStudio.Core/AtlasGroupLargeTileAnimation.cs +++ b/PckStudio.Core/AtlasGroupLargeTileAnimation.cs @@ -19,24 +19,35 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; +using Newtonsoft.Json; namespace PckStudio.Core { internal sealed class AtlasGroupLargeTileAnimation : AtlasGroup { + [JsonIgnore] private AtlasGroupLargeTile[] _largeTiles; + + [JsonProperty("frameCount")] private int _frameCount; + [JsonProperty("rowSpan")] public int RowSpan { get; } + [JsonProperty("columnSpan")] public int ColumnSpan { get; } + [JsonProperty("frameTime")] public int FrameTime { get; } + [JsonIgnore] public override int Count => RowSpan * ColumnSpan * _frameCount; + [JsonProperty("direction")] public override ImageLayoutDirection Direction { get; } + [JsonIgnore] protected override bool isAnimation => true; + [JsonIgnore] protected override bool isLargeTile => true; public override Size GetSize(Size tileSize) => new Size(RowSpan * tileSize.Width * (Direction == ImageLayoutDirection.Horizontal ? _frameCount : 1), ColumnSpan * tileSize.Height * (Direction == ImageLayoutDirection.Vertical ? _frameCount : 1)); diff --git a/PckStudio.Core/PckStudio.Core.csproj b/PckStudio.Core/PckStudio.Core.csproj index b0462884..6c112473 100644 --- a/PckStudio.Core/PckStudio.Core.csproj +++ b/PckStudio.Core/PckStudio.Core.csproj @@ -218,6 +218,10 @@ + + + + diff --git a/PckStudio.Core/Properties/Resources.Designer.cs b/PckStudio.Core/Properties/Resources.Designer.cs index 5e586b08..c1c1ae3e 100644 --- a/PckStudio.Core/Properties/Resources.Designer.cs +++ b/PckStudio.Core/Properties/Resources.Designer.cs @@ -442,6 +442,24 @@ namespace PckStudio.Core.Properties { } } + /// + /// Looks up a localized string similar to [ + /// { + /// "frameCount": 3, + /// "frameTime": 6, + /// "direction": 1, + /// "name": "Bow Pulling", + /// "row": 5, + /// "column": 6 + /// } + ///]. + /// + public static string items_groups { + get { + return ResourceManager.GetString("items_groups", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -567,6 +585,45 @@ namespace PckStudio.Core.Properties { } } + /// + /// Looks up a localized string similar to [ + /// { + /// "rowSpan": 2, + /// "columnSpan": 1, + /// "name": "The Pool", + /// "row": 0, + /// "column": 2, + /// "direction": 1 + /// }, + /// { + /// "rowSpan": 2, + /// "columnSpan": 1, + /// "name": "Bonjour Monsiuer Courbet", + /// "row": 2, + /// "column": 2, + /// "direction": 0 + /// }, + /// { + /// "rowSpan": 2, + /// "columnSpan": 1, + /// "name": "Seaside", + /// "row": 4, + /// "column": 2, + /// "direction": 0 + /// }, + /// { + /// "rowSpan": 2, + /// "columnSpan": 1, + /// "name": "sunset_dense", + /// "row": 6, + /// "column": [rest of string was truncated]";. + /// + public static string painting_groups { + get { + return ResourceManager.GetString("painting_groups", resourceCulture); + } + } + /// /// Looks up a localized string similar to { /// "COMMENT_1": "JSON by MattNL", @@ -646,6 +703,46 @@ namespace PckStudio.Core.Properties { } } + /// + /// Looks up a localized string similar to [ + /// { + /// "frameCount": 8, + /// "frameTime": 2, + /// "direction": 0, + /// "name": "generic", + /// "row": 0, + /// "column": 0 + /// }, + /// { + /// "frameCount": 4, + /// "frameTime": 2, + /// "direction": 0, + /// "name": "splash", + /// "row": 3, + /// "column": 1 + /// }, + /// { + /// "frameCount": 3, + /// "frameTime": 4, + /// "direction": 0, + /// "name": "drip", + /// "row": 0, + /// "column": 7 + /// }, + /// { + /// "frameCount": 8, + /// "frameTime": 2, + /// "direction": 0, + /// "name": "effect", + /// "row": 0, + /// "column": [rest of string was truncated]";. + /// + public static string particles_groups { + get { + return ResourceManager.GetString("particles_groups", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -676,6 +773,46 @@ namespace PckStudio.Core.Properties { } } + /// + /// Looks up a localized string similar to [ + /// { + /// "rowSpan": 1, + /// "columnSpan": 2, + /// "name": "Oak Door", + /// "row": 1, + /// "column": 5, + /// "direction": 1 + /// }, + /// { + /// "rowSpan": 1, + /// "columnSpan": 2, + /// "name": "Iron Door", + /// "row": 2, + /// "column": 5, + /// "direction": 1 + /// }, + /// { + /// "rowSpan": 1, + /// "columnSpan": 2, + /// "name": "Acacia Door", + /// "row": 0, + /// "column": 23, + /// "direction": 1 + /// }, + /// { + /// "rowSpan": 1, + /// "columnSpan": 2, + /// "name": "Birch Door", + /// "row": 1, + /// "column": 23, + /// "di [rest of string was truncated]";. + /// + public static string terrain_groups { + get { + return ResourceManager.GetString("terrain_groups", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/PckStudio.Core/Properties/Resources.resx b/PckStudio.Core/Properties/Resources.resx index eeda4dd1..7f316396 100644 --- a/PckStudio.Core/Properties/Resources.resx +++ b/PckStudio.Core/Properties/Resources.resx @@ -187,9 +187,15 @@ ..\Resources\atlas\itemData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1 + + ..\Resources\atlas\groups\item_groups.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + ..\Resources\atlas\items.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\atlas\groups\painting_groups.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + ..\Resources\atlas\mapIconData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1 @@ -214,6 +220,9 @@ ..\Resources\atlas\particleData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1 + + ..\Resources\atlas\groups\particles_groups.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + ..\Resources\atlas\particles.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -223,6 +232,9 @@ ..\Resources\snow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\atlas\groups\terrain_groups.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + ..\Resources\atlas\terrain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/PckStudio.Core/ResourceLocations.cs b/PckStudio.Core/ResourceLocations.cs index c4788603..69ecdd43 100644 --- a/PckStudio.Core/ResourceLocations.cs +++ b/PckStudio.Core/ResourceLocations.cs @@ -15,7 +15,11 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ +using System.Diagnostics; using System.Drawing; +using System.IO; +using System.Linq; +using Newtonsoft.Json; using PckStudio.Core.Properties; using PckStudio.Json; @@ -23,6 +27,10 @@ namespace PckStudio.Core { public static class ResourceLocations { + static JsonSerializerSettings _serializerSettings = new JsonSerializerSettings() + { + Converters = [new AtlasGroupJsonConverter()] + }; static ResourceLocations() { _all = new ResourceLocation[] { @@ -50,77 +58,14 @@ namespace PckStudio.Core public static string GetPathFromCategory(ResourceCategory category) => ResourceLocation.GetPathFromCategory(category); - private static readonly AtlasGroup[] _particaleAtlasGroups = - { - new AtlasGroupAnimation("generic" , row: 0, column: 0, frameCount: 8, ImageLayoutDirection.Horizontal, 2), - new AtlasGroupAnimation("splash" , row: 3, column: 1, frameCount: 4, ImageLayoutDirection.Horizontal, 2), - new AtlasGroupAnimation("drip" , row: 0, column: 7, frameCount: 3, ImageLayoutDirection.Horizontal, 4), - new AtlasGroupAnimation("effect" , row: 0, column: 8, frameCount: 8, ImageLayoutDirection.Horizontal, 2), - new AtlasGroupAnimation("splash_effect" , row: 0, column: 9, frameCount: 8, ImageLayoutDirection.Horizontal, 2), - new AtlasGroupAnimation("firework_spark" , row: 0, column: 10, frameCount: 8, ImageLayoutDirection.Horizontal, 2), - new AtlasGroupAnimation("glitter" , row: 0, column: 11, frameCount: 8, ImageLayoutDirection.Horizontal, 2), - new AtlasGroupAnimation("BE_explosion" , row: 0, column: 12, frameCount: 16, ImageLayoutDirection.Horizontal), - new AtlasGroupLargeTile("flash" , row: 4, column: 2, rowSpan: 4, columnSpan: 4), - new AtlasGroupLargeTileAnimation("bubble_pop", row: 6, column: 6, rowSpan: 2, columnSpan: 2, frameCount: 5, ImageLayoutDirection.Horizontal, 2), - }; + private static readonly AtlasGroup[] _particaleAtlasGroups = JsonConvert.DeserializeObject(Resources.particles_groups, _serializerSettings); - private static readonly AtlasGroup[] _terrainAtlasGroups = - { - new AtlasGroupLargeTile("Oak Door" , row: 1, column: 5, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Iron Door" , row: 2, column: 5, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Acacia Door" , row: 0, column: 23, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Birch Door" , row: 1, column: 23, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Dark Oak Door", row: 2, column: 23, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Jungle Door" , row: 3, column: 23, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Spruce Door" , row: 4, column: 23, rowSpan: 1, columnSpan: 2), + private static readonly AtlasGroup[] _terrainAtlasGroups = JsonConvert.DeserializeObject(Resources.terrain_groups, _serializerSettings); - new AtlasGroupLargeTile("Large Fern" , row: 0, column: 20, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Double Tall Grass", row: 1, column: 20, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Poeny" , row: 2, column: 20, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Rose Bush" , row: 3, column: 20, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Lilac" , row: 4, column: 20, rowSpan: 1, columnSpan: 2), + private static readonly AtlasGroup[] _itemsAtlasGroups = JsonConvert.DeserializeObject(Resources.items_groups, _serializerSettings); - new AtlasGroupAnimation("Wheat" , row: 8, column: 5, frameCount: 8, ImageLayoutDirection.Horizontal, 5), - new AtlasGroupAnimation("Potatoes" , row: 9, column: 16, frameCount: 4, ImageLayoutDirection.Horizontal, 5), - new AtlasGroupAnimation("Carrots" , row: 8, column: 12, frameCount: 4, ImageLayoutDirection.Horizontal, 5), - new AtlasGroupAnimation("Beetroots" , row: 0, column: 25, frameCount: 4, ImageLayoutDirection.Horizontal, 5), - new AtlasGroupAnimation("Nether Wart", row: 2, column: 14, frameCount: 3, ImageLayoutDirection.Horizontal, 5), - new AtlasGroupAnimation("Destroy" , row: 0, column: 15, frameCount: 10, ImageLayoutDirection.Horizontal, 3), - }; - - private static readonly AtlasGroup[] _itemsAtlasGroups = - { - new AtlasGroupAnimation("Bow Pulling", row: 5, column: 6, frameCount: 3, ImageLayoutDirection.Vertical, 6), - }; - - private static readonly AtlasGroup[] _paintingAtlasGroups = - { - new AtlasGroupLargeTile("The Pool" , row: 0, column: 2, rowSpan: 2, columnSpan: 1), - new AtlasGroupLargeTile("Bonjour Monsiuer Courbet", row: 2, column: 2, rowSpan: 2, columnSpan: 1), - new AtlasGroupLargeTile("Seaside" , row: 4, column: 2, rowSpan: 2, columnSpan: 1), - new AtlasGroupLargeTile("sunset_dense" , row: 6, column: 2, rowSpan: 2, columnSpan: 1), - new AtlasGroupLargeTile("Creebet" , row: 8, column: 2, rowSpan: 2, columnSpan: 1), - - new AtlasGroupLargeTile("Wanderer" , row: 0, column: 4, rowSpan: 1, columnSpan: 2), - new AtlasGroupLargeTile("Graham" , row: 1, column: 4, rowSpan: 1, columnSpan: 2), - - new AtlasGroupLargeTile("Fighters" , row: 0, column: 6, rowSpan: 4, columnSpan: 2), - - new AtlasGroupLargeTile("Match" , row: 0, column: 8, rowSpan: 2, columnSpan: 2), - new AtlasGroupLargeTile("Bust" , row: 2, column: 8, rowSpan: 2, columnSpan: 2), - new AtlasGroupLargeTile("The stage is set" , row: 4, column: 8, rowSpan: 2, columnSpan: 2), - new AtlasGroupLargeTile("The Void" , row: 6, column: 8, rowSpan: 2, columnSpan: 2), - new AtlasGroupLargeTile("Skull and Roses" , row: 8, column: 8, rowSpan: 2, columnSpan: 2), - new AtlasGroupLargeTile("Wither" , row: 10, column: 8, rowSpan: 2, columnSpan: 2), - - new AtlasGroupLargeTile("Mortal Coil" , row: 12, column: 4, rowSpan: 4, columnSpan: 3), - new AtlasGroupLargeTile("Kong" , row: 12, column: 7, rowSpan: 4, columnSpan: 3), - - new AtlasGroupLargeTile("Back Texture" , row: 12, column: 0, rowSpan: 4, columnSpan: 4), - new AtlasGroupLargeTile("Pointer" , row: 0, column: 12, rowSpan: 4, columnSpan: 4), - new AtlasGroupLargeTile("Pigscene" , row: 4, column: 12, rowSpan: 4, columnSpan: 4), - new AtlasGroupLargeTile("Skull On Fire" , row: 8, column: 12, rowSpan: 4, columnSpan: 4), - }; + private static readonly AtlasGroup[] _paintingAtlasGroups = JsonConvert.DeserializeObject(Resources.painting_groups, _serializerSettings); + private static readonly ResourceLocation[] _all; } diff --git a/PckStudio.Core/Resources/atlas/groups/item_groups.json b/PckStudio.Core/Resources/atlas/groups/item_groups.json new file mode 100644 index 00000000..717ab5e7 --- /dev/null +++ b/PckStudio.Core/Resources/atlas/groups/item_groups.json @@ -0,0 +1,10 @@ +[ + { + "frameCount": 3, + "frameTime": 6, + "direction": 1, + "name": "Bow Pulling", + "row": 5, + "column": 6 + } +] \ No newline at end of file diff --git a/PckStudio.Core/Resources/atlas/groups/painting_groups.json b/PckStudio.Core/Resources/atlas/groups/painting_groups.json new file mode 100644 index 00000000..caa17c4f --- /dev/null +++ b/PckStudio.Core/Resources/atlas/groups/painting_groups.json @@ -0,0 +1,162 @@ +[ + { + "rowSpan": 2, + "columnSpan": 1, + "name": "The Pool", + "row": 0, + "column": 2, + "direction": 1 + }, + { + "rowSpan": 2, + "columnSpan": 1, + "name": "Bonjour Monsiuer Courbet", + "row": 2, + "column": 2, + "direction": 0 + }, + { + "rowSpan": 2, + "columnSpan": 1, + "name": "Seaside", + "row": 4, + "column": 2, + "direction": 0 + }, + { + "rowSpan": 2, + "columnSpan": 1, + "name": "sunset_dense", + "row": 6, + "column": 2, + "direction": 0 + }, + { + "rowSpan": 2, + "columnSpan": 1, + "name": "Creebet", + "row": 8, + "column": 2, + "direction": 0 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Wanderer", + "row": 0, + "column": 4, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Graham", + "row": 1, + "column": 4, + "direction": 1 + }, + { + "rowSpan": 4, + "columnSpan": 2, + "name": "Fighters", + "row": 0, + "column": 6, + "direction": 1 + }, + { + "rowSpan": 2, + "columnSpan": 2, + "name": "Match", + "row": 0, + "column": 8, + "direction": 1 + }, + { + "rowSpan": 2, + "columnSpan": 2, + "name": "Bust", + "row": 2, + "column": 8, + "direction": 1 + }, + { + "rowSpan": 2, + "columnSpan": 2, + "name": "The stage is set", + "row": 4, + "column": 8, + "direction": 1 + }, + { + "rowSpan": 2, + "columnSpan": 2, + "name": "The Void", + "row": 6, + "column": 8, + "direction": 1 + }, + { + "rowSpan": 2, + "columnSpan": 2, + "name": "Skull and Roses", + "row": 8, + "column": 8, + "direction": 0 + }, + { + "rowSpan": 2, + "columnSpan": 2, + "name": "Wither", + "row": 10, + "column": 8, + "direction": 0 + }, + { + "rowSpan": 4, + "columnSpan": 3, + "name": "Mortal Coil", + "row": 12, + "column": 4, + "direction": 0 + }, + { + "rowSpan": 4, + "columnSpan": 3, + "name": "Kong", + "row": 12, + "column": 7, + "direction": 0 + }, + { + "rowSpan": 4, + "columnSpan": 4, + "name": "Back Texture", + "row": 12, + "column": 0, + "direction": 0 + }, + { + "rowSpan": 4, + "columnSpan": 4, + "name": "Pointer", + "row": 0, + "column": 12, + "direction": 1 + }, + { + "rowSpan": 4, + "columnSpan": 4, + "name": "Pigscene", + "row": 4, + "column": 12, + "direction": 1 + }, + { + "rowSpan": 4, + "columnSpan": 4, + "name": "Skull On Fire", + "row": 8, + "column": 12, + "direction": 1 + } +] \ No newline at end of file diff --git a/PckStudio.Core/Resources/atlas/groups/particles_groups.json b/PckStudio.Core/Resources/atlas/groups/particles_groups.json new file mode 100644 index 00000000..15d6d28a --- /dev/null +++ b/PckStudio.Core/Resources/atlas/groups/particles_groups.json @@ -0,0 +1,84 @@ +[ + { + "frameCount": 8, + "frameTime": 2, + "direction": 0, + "name": "generic", + "row": 0, + "column": 0 + }, + { + "frameCount": 4, + "frameTime": 2, + "direction": 0, + "name": "splash", + "row": 3, + "column": 1 + }, + { + "frameCount": 3, + "frameTime": 4, + "direction": 0, + "name": "drip", + "row": 0, + "column": 7 + }, + { + "frameCount": 8, + "frameTime": 2, + "direction": 0, + "name": "effect", + "row": 0, + "column": 8 + }, + { + "frameCount": 8, + "frameTime": 2, + "direction": 0, + "name": "splash_effect", + "row": 0, + "column": 9 + }, + { + "frameCount": 8, + "frameTime": 2, + "direction": 0, + "name": "firework_spark", + "row": 0, + "column": 10 + }, + { + "frameCount": 8, + "frameTime": 2, + "direction": 0, + "name": "glitter", + "row": 0, + "column": 11 + }, + { + "frameCount": 16, + "frameTime": 1, + "direction": 0, + "name": "BE_explosion", + "row": 0, + "column": 12 + }, + { + "rowSpan": 4, + "columnSpan": 4, + "name": "flash", + "row": 4, + "column": 2, + "direction": 0 + }, + { + "frameCount": 5, + "rowSpan": 2, + "columnSpan": 2, + "frameTime": 2, + "direction": 0, + "name": "bubble_pop", + "row": 6, + "column": 6 + } +] \ No newline at end of file diff --git a/PckStudio.Core/Resources/atlas/groups/terrain_groups.json b/PckStudio.Core/Resources/atlas/groups/terrain_groups.json new file mode 100644 index 00000000..d4f50c9b --- /dev/null +++ b/PckStudio.Core/Resources/atlas/groups/terrain_groups.json @@ -0,0 +1,146 @@ +[ + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Oak Door", + "row": 1, + "column": 5, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Iron Door", + "row": 2, + "column": 5, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Acacia Door", + "row": 0, + "column": 23, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Birch Door", + "row": 1, + "column": 23, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Dark Oak Door", + "row": 2, + "column": 23, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Jungle Door", + "row": 3, + "column": 23, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Spruce Door", + "row": 4, + "column": 23, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Large Fern", + "row": 0, + "column": 20, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Double Tall Grass", + "row": 1, + "column": 20, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Poeny", + "row": 2, + "column": 20, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Rose Bush", + "row": 3, + "column": 20, + "direction": 1 + }, + { + "rowSpan": 1, + "columnSpan": 2, + "name": "Lilac", + "row": 4, + "column": 20, + "direction": 1 + }, + { + "frameCount": 8, + "frameTime": 5, + "direction": 0, + "name": "Wheat", + "row": 8, + "column": 5 + }, + { + "frameCount": 4, + "frameTime": 9, + "direction": 0, + "name": "Potatoes", + "row": 9, + "column": 16 + }, + { + "frameCount": 4, + "frameTime": 9, + "direction": 0, + "name": "Carrots", + "row": 8, + "column": 12 + }, + { + "frameCount": 4, + "frameTime": 9, + "direction": 0, + "name": "Beetroots", + "row": 0, + "column": 25 + }, + { + "frameCount": 3, + "frameTime": 10, + "direction": 0, + "name": "Nether Wart", + "row": 2, + "column": 14 + }, + { + "frameCount": 10, + "frameTime": 3, + "direction": 0, + "name": "Destroy", + "row": 0, + "column": 15 + } +] \ No newline at end of file