refactor: removed dash from project name and underscore from namespaces. Began working on pipeline project.

This commit is contained in:
2018-12-04 19:19:31 -06:00
parent 52fa550ced
commit 151480eaee
40 changed files with 316 additions and 114 deletions

View File

@@ -0,0 +1,26 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.DataTypes;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
internal class TextureAtlasImporter : ContentImporter<TextureAtlasTemplate>
{
public override TextureAtlasTemplate Import(string filename, ContentImporterContext context)
{
StreamReader stream = new StreamReader(filename);
XmlSerializer serializer = new XmlSerializer(typeof(TextureAtlasTemplate));
TextureAtlasTemplate atlas = (TextureAtlasTemplate)serializer.Deserialize(stream);
context.AddDependency(atlas.textureName);
stream.Dispose();
return atlas;
}
}
}

View File

@@ -0,0 +1,21 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.DataTypes;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
class TextureAtlasProcessor : ContentProcessor<TextureAtlasTemplate, TextureAtlasTemplate>
{
public override TextureAtlasTemplate Process(TextureAtlasTemplate input, ContentProcessorContext context)
{
return input;
}
}
}

View File

@@ -0,0 +1,22 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
public class TextureAtlasTemplate
{
public string textureName;
public TextureAtlasRegion[] regions;
public class TextureAtlasRegion
{
public string name;
public Rectangle location;
}
}
}

View File

@@ -0,0 +1,23 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
class TextureAtlasWriter : ContentTypeWriter<TextureAtlasTemplate>
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
throw new NotImplementedException();
}
protected override void Write(ContentWriter output, TextureAtlasTemplate value)
{
throw new NotImplementedException();
}
}
}