refactors and added forgotten semicolon :/

This commit is contained in:
Harrison Deng 2019-01-20 01:07:52 -06:00
parent 9392124317
commit 6fdcdcf923
11 changed files with 42 additions and 18 deletions

View File

@ -1,6 +1,6 @@
using Microsoft.Xna.Framework.Content.Pipeline; using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.NinePatch namespace RecrownedAthenaeum.Pipeline.NinePatch
{ {

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Content.Pipeline; using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.NinePatch namespace RecrownedAthenaeum.Pipeline.NinePatch
{ {

View File

@ -1,6 +1,6 @@
using Microsoft.Xna.Framework.Content.Pipeline; using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{ {

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Content.Pipeline; using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{ {

View File

@ -1,5 +1,5 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
using RecrownedAthenaeum.Tools.CommandProcessor; using RecrownedAthenaeum.Tools.CommandProcessor;
using System; using System;
using System.IO; using System.IO;

View File

@ -1,5 +1,5 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing; using SixLabors.ImageSharp.Processing;

View File

@ -1,4 +1,4 @@
namespace RecrownedAthenaeum.Serializable namespace RecrownedAthenaeum.Data
{ {
/// <summary> /// <summary>
/// Represents a data structure for 9patches. /// Represents a data structure for 9patches.

View File

@ -1,11 +1,16 @@
using RecrownedAthenaeum.UI.Skin.Definitions; using RecrownedAthenaeum.UI.Skin.Definitions;
namespace RecrownedAthenaeum.Serializable namespace RecrownedAthenaeum.Data
{ {
/// <summary> /// <summary>
/// Data transfer object for game skins. /// Data transfer object for game skins.
/// </summary> /// </summary>
public class SkinData public class SkinData
{
/// <summary>
/// Holds metadata.
/// </summary>
public class Metadata
{ {
/// <summary> /// <summary>
/// Author name. /// Author name.
@ -17,10 +22,27 @@ namespace RecrownedAthenaeum.Serializable
/// </summary> /// </summary>
public string description; public string description;
/// <summary>
/// Name of skin.
/// </summary>
public string skinName;
}
/// <summary>
/// The metadata for the skin file.
/// </summary>
public Metadata metadata;
/// <summary> /// <summary>
/// The name of the atlas with extension. /// The name of the atlas with extension.
/// </summary> /// </summary>
public string nameOfTextureAtlas; public string nameOfTextureAtlas;
/// <summary>
/// Name of the region or file designating the cursor. If there is an extension, will check for file first then texture atlas. Otherwise, will just check region.
/// </summary>
public string cursorTextureName;
/// <summary> /// <summary>
/// The color data containing the name of the color, and red, green, and blue values for the color. /// The color data containing the name of the color, and red, green, and blue values for the color.
/// </summary> /// </summary>

View File

@ -1,6 +1,6 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
namespace RecrownedAthenaeum.Serializable namespace RecrownedAthenaeum.Data
{ {
/// <summary> /// <summary>
/// Data transfer object for a texture atlas. /// Data transfer object for a texture atlas.

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Newtonsoft.Json; using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable; using RecrownedAthenaeum.Data;
using RecrownedAthenaeum.SpecialTypes; using RecrownedAthenaeum.SpecialTypes;
namespace RecrownedAthenaeum.Pipeline namespace RecrownedAthenaeum.Pipeline
@ -12,7 +12,7 @@ namespace RecrownedAthenaeum.Pipeline
{ {
string serialized = input.ReadString(); string serialized = input.ReadString();
TextureAtlasData atlasData = JsonConvert.DeserializeObject<TextureAtlasData>(serialized); TextureAtlasData atlasData = JsonConvert.DeserializeObject<TextureAtlasData>(serialized);
Texture2D atlasTexture = input.ContentManager.Load<Texture2D>(atlasData.textureName) Texture2D atlasTexture = input.ContentManager.Load<Texture2D>(atlasData.textureName);
TextureAtlas atlas = new TextureAtlas(atlasTexture, GenerateAtlasRegionsFromData(atlasData, atlasTexture)); TextureAtlas atlas = new TextureAtlas(atlasTexture, GenerateAtlasRegionsFromData(atlasData, atlasTexture));
return atlas; return atlas;

View File

@ -67,9 +67,9 @@
<Compile Include="Input\InputUtilities.cs" /> <Compile Include="Input\InputUtilities.cs" />
<Compile Include="ParticleSystem\Particle.cs" /> <Compile Include="ParticleSystem\Particle.cs" />
<Compile Include="Persistence\PreferencesManager.cs" /> <Compile Include="Persistence\PreferencesManager.cs" />
<Compile Include="Serializable\NinePatchData.cs" /> <Compile Include="Data\NinePatchData.cs" />
<Compile Include="Pipeline\NinePatchDataReader.cs" /> <Compile Include="Pipeline\NinePatchDataReader.cs" />
<Compile Include="Serializable\TextureAtlasData.cs" /> <Compile Include="Data\TextureAtlasData.cs" />
<Compile Include="Pipeline\TextureAtlasDataReader.cs" /> <Compile Include="Pipeline\TextureAtlasDataReader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Render\RectangleRenderer.cs" /> <Compile Include="Render\RectangleRenderer.cs" />
@ -90,9 +90,11 @@
<Compile Include="UI\Skin\Definitions\ISkinDefinition.cs" /> <Compile Include="UI\Skin\Definitions\ISkinDefinition.cs" />
<Compile Include="UI\Skin\Definitions\TextButtonSkinDefinition.cs" /> <Compile Include="UI\Skin\Definitions\TextButtonSkinDefinition.cs" />
<Compile Include="UI\Skin\Definitions\TextSkinDefinition.cs" /> <Compile Include="UI\Skin\Definitions\TextSkinDefinition.cs" />
<Compile Include="UI\Skin\ISkin.cs" />
<Compile Include="UI\Skin\Skin.cs" /> <Compile Include="UI\Skin\Skin.cs" />
<Compile Include="Serializable\SkinData.cs" /> <Compile Include="Data\SkinData.cs" />
<Compile Include="UI\Skin\SkinManager.cs" /> <Compile Include="UI\Skin\SkinManager.cs" />
<Compile Include="UI\Skin\SkinStack.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />