namespace refactor & progress on texture atlas

This commit is contained in:
2018-12-04 07:45:09 -06:00
parent 698dd9d2f0
commit b4ddd73f67
28 changed files with 95 additions and 52 deletions

View File

@@ -6,15 +6,13 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Utilities.DataTypes
namespace RecrownedAthenaeum.DataTypes
{
public class NinePatch
{
public Color color;
readonly Texture2D texture;
readonly int a, b, c, d;
private Rectangle sourceRectangle;
private Rectangle drawnRectangle;
/// <summary>
/// A nine patch object.
@@ -39,6 +37,9 @@ namespace RhythmBullet.Utilities.DataTypes
public void Draw(SpriteBatch batch, Rectangle destination)
{
Rectangle sourceRectangle;
Rectangle drawnRectangle;
//1x1
drawnRectangle.X = destination.X;
drawnRectangle.Y = destination.Y;

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Utilities.DataTypes
namespace RecrownedAthenaeum.DataTypes
{
public class Resolution : IComparable<Resolution>
{

View File

@@ -0,0 +1,22 @@
using Recrowned_Athenaeum.DataTypes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;23
namespace RecrownedAthenaeum.DataTypes
{
public class TextureAtlas
{
private TextureAtlasRegion[] textureRegions;
public TextureAtlas(TextureAtlasRegion[] textureRegions)
{
this.textureRegions = textureRegions;
}
}
}

View File

@@ -0,0 +1,19 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Recrowned_Athenaeum.DataTypes
{
public struct TextureAtlasRegion
{
string name;
Rectangle bounds;
Vector2 origin;
bool ninePatch;
int a, b, c, d;
}
}