namespace refactor & progress on texture atlas
This commit is contained in:
parent
698dd9d2f0
commit
b4ddd73f67
@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.Camera
|
namespace RecrownedAthenaeum.Camera
|
||||||
{
|
{
|
||||||
public class Camera2D
|
public class Camera2D
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ContentSystem
|
namespace RecrownedAthenaeum.ContentSystem
|
||||||
{
|
{
|
||||||
struct LoadableContent
|
struct LoadableContent
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ using System.Text;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ContentSystem
|
namespace RecrownedAthenaeum.ContentSystem
|
||||||
{
|
{
|
||||||
public class ContentManagerController
|
public class ContentManagerController
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ContentSystem
|
namespace RecrownedAthenaeum.ContentSystem
|
||||||
{
|
{
|
||||||
public interface IContentPathModifier
|
public interface IContentPathModifier
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ContentSystem
|
namespace RecrownedAthenaeum.ContentSystem
|
||||||
{
|
{
|
||||||
class NormalContentResolver : IContentPathModifier
|
class NormalContentResolver : IContentPathModifier
|
||||||
{
|
{
|
||||||
|
@ -6,15 +6,13 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.DataTypes
|
namespace RecrownedAthenaeum.DataTypes
|
||||||
{
|
{
|
||||||
public class NinePatch
|
public class NinePatch
|
||||||
{
|
{
|
||||||
public Color color;
|
public Color color;
|
||||||
readonly Texture2D texture;
|
readonly Texture2D texture;
|
||||||
readonly int a, b, c, d;
|
readonly int a, b, c, d;
|
||||||
private Rectangle sourceRectangle;
|
|
||||||
private Rectangle drawnRectangle;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A nine patch object.
|
/// A nine patch object.
|
||||||
@ -39,6 +37,9 @@ namespace RhythmBullet.Utilities.DataTypes
|
|||||||
|
|
||||||
public void Draw(SpriteBatch batch, Rectangle destination)
|
public void Draw(SpriteBatch batch, Rectangle destination)
|
||||||
{
|
{
|
||||||
|
Rectangle sourceRectangle;
|
||||||
|
Rectangle drawnRectangle;
|
||||||
|
|
||||||
//1x1
|
//1x1
|
||||||
drawnRectangle.X = destination.X;
|
drawnRectangle.X = destination.X;
|
||||||
drawnRectangle.Y = destination.Y;
|
drawnRectangle.Y = destination.Y;
|
||||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.DataTypes
|
namespace RecrownedAthenaeum.DataTypes
|
||||||
{
|
{
|
||||||
public class Resolution : IComparable<Resolution>
|
public class Resolution : IComparable<Resolution>
|
||||||
{
|
{
|
||||||
|
22
Recrowned-Athenaeum/DataTypes/TextureAtlas.cs
Normal file
22
Recrowned-Athenaeum/DataTypes/TextureAtlas.cs
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
19
Recrowned-Athenaeum/DataTypes/TextureAtlasRegion.cs
Normal file
19
Recrowned-Athenaeum/DataTypes/TextureAtlasRegion.cs
Normal 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.Input
|
namespace RecrownedAthenaeum.Input
|
||||||
{
|
{
|
||||||
public interface IInputListener
|
public interface IInputListener
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Xna.Framework.Input;
|
using Microsoft.Xna.Framework.Input;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.Input
|
namespace RecrownedAthenaeum.Input
|
||||||
{
|
{
|
||||||
class InputListener : IInputListener
|
class InputListener : IInputListener
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Input;
|
using Microsoft.Xna.Framework.Input;
|
||||||
using RhythmBullet.Utilities.Input;
|
using RecrownedAthenaeum.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.Input
|
namespace RecrownedAthenaeum.Input
|
||||||
{
|
{
|
||||||
public static class InputUtilities
|
public static class InputUtilities
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ParticleSystem
|
namespace RecrownedAthenaeum.ParticleSystem
|
||||||
{
|
{
|
||||||
class Particle
|
class Particle
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.Persistence
|
namespace RecrownedAthenaeum.Persistence
|
||||||
{
|
{
|
||||||
public class Preferences
|
public class Preferences
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
using RhythmBullet.Preferences;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.Persistence
|
namespace RecrownedAthenaeum.Persistence
|
||||||
{
|
{
|
||||||
public class PreferencesManager
|
public class PreferencesManager
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,8 @@
|
|||||||
<Compile Include="ContentSystem\NormalContentResolver.cs" />
|
<Compile Include="ContentSystem\NormalContentResolver.cs" />
|
||||||
<Compile Include="DataTypes\NinePatch.cs" />
|
<Compile Include="DataTypes\NinePatch.cs" />
|
||||||
<Compile Include="DataTypes\Resolution.cs" />
|
<Compile Include="DataTypes\Resolution.cs" />
|
||||||
|
<Compile Include="DataTypes\TextureAtlas.cs" />
|
||||||
|
<Compile Include="DataTypes\TextureAtlasRegion.cs" />
|
||||||
<Compile Include="Input\IInputListener.cs" />
|
<Compile Include="Input\IInputListener.cs" />
|
||||||
<Compile Include="Input\InputListener.cs" />
|
<Compile Include="Input\InputListener.cs" />
|
||||||
<Compile Include="Input\InputUtilities.cs" />
|
<Compile Include="Input\InputUtilities.cs" />
|
||||||
|
@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ScreenSystem
|
namespace RecrownedAthenaeum.ScreenSystem
|
||||||
{
|
{
|
||||||
public interface ITransition
|
public interface ITransition
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Graphics;
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ScreenSystem
|
namespace RecrownedAthenaeum.ScreenSystem
|
||||||
{
|
{
|
||||||
public class LoadingScreen : Screen, ITransition
|
public class LoadingScreen : Screen, ITransition
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ScreenSystem
|
namespace RecrownedAthenaeum.ScreenSystem
|
||||||
{
|
{
|
||||||
public enum ScreenState { EnterTransition, ExitTransition, Normal }
|
public enum ScreenState { EnterTransition, ExitTransition, Normal }
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@ -8,7 +8,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.ScreenSystem
|
namespace RecrownedAthenaeum.ScreenSystem
|
||||||
{
|
{
|
||||||
public delegate void FirstScreenChange(Screen screen);
|
public delegate void FirstScreenChange(Screen screen);
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.UI.Book
|
namespace RecrownedAthenaeum.UI.Book
|
||||||
{
|
{
|
||||||
class Book
|
public class Book
|
||||||
{
|
{
|
||||||
Camera2D camera;
|
Camera2D camera;
|
||||||
Page targetPage;
|
Page targetPage;
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.UI.Modular;
|
using RecrownedAthenaeum.UI.Modular;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.UI.Book
|
namespace RecrownedAthenaeum.UI.Book
|
||||||
{
|
{
|
||||||
class Page : UIModuleGroup
|
public class Page : UIModuleGroup
|
||||||
{
|
{
|
||||||
private readonly int pageX, pageY;
|
private readonly int pageX, pageY;
|
||||||
public bool NeedsSizeUpdate;
|
public bool NeedsSizeUpdate;
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.UI.Modular;
|
using RecrownedAthenaeum.UI.Modular;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.UI.Modular.Modules
|
namespace RecrownedAthenaeum.UI.Modular.Modules
|
||||||
{
|
{
|
||||||
class Image : UIModule
|
public class Image : UIModule
|
||||||
{
|
{
|
||||||
public float rotation = 0f;
|
public float rotation = 0f;
|
||||||
public Texture2D Texture { get; set; }
|
public Texture2D Texture { get; set; }
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Microsoft.Xna.Framework.Input;
|
using Microsoft.Xna.Framework.Input;
|
||||||
using RhythmBullet.UI.Modular;
|
using RecrownedAthenaeum.UI.Modular;
|
||||||
using RhythmBullet.Utilities.DataTypes;
|
using RecrownedAthenaeum.DataTypes;
|
||||||
using RhythmBullet.Utilities.Input;
|
using RecrownedAthenaeum.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.UI.Modular.Modules.Interactive
|
namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||||
{
|
{
|
||||||
public delegate bool Clicked();
|
public delegate bool Clicked();
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.UI.Modular.Modules;
|
using RecrownedAthenaeum.UI.Modular.Modules;
|
||||||
using RhythmBullet.Utilities.DataTypes;
|
using RecrownedAthenaeum.DataTypes;
|
||||||
using RhythmBullet.Utilities.UI.Modular.Modules.Interactive;
|
using RecrownedAthenaeum.UI.Modular.Modules.Interactive;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.Utilities.UI.Modular.Modules.Interactive
|
namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||||
{
|
{
|
||||||
internal class TextButton : Button
|
public class TextButton : Button
|
||||||
{
|
{
|
||||||
private TextLabel label;
|
private TextLabel label;
|
||||||
|
|
||||||
internal TextButton(string text, SpriteFont font, NinePatch background) : base(background)
|
public TextButton(string text, SpriteFont font, NinePatch background) : base(background)
|
||||||
{
|
{
|
||||||
label = new TextLabel(font, text);
|
label = new TextLabel(font, text);
|
||||||
label.autoScale = true;
|
label.autoScale = true;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.UI.Modular.Modules
|
namespace RecrownedAthenaeum.UI.Modular.Modules
|
||||||
{
|
{
|
||||||
public class TextLabel : UIModule
|
public class TextLabel : UIModule
|
||||||
{
|
{
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Microsoft.Xna.Framework.Input;
|
using Microsoft.Xna.Framework.Input;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using RhythmBullet.Utilities.Input;
|
using RecrownedAthenaeum.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RhythmBullet.UI.Modular
|
namespace RecrownedAthenaeum.UI.Modular
|
||||||
{
|
{
|
||||||
public class UIModule : IInputListener
|
public class UIModule : IInputListener
|
||||||
{
|
{
|
||||||
|
@ -6,10 +6,10 @@ using System.Threading.Tasks;
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Microsoft.Xna.Framework.Input;
|
using Microsoft.Xna.Framework.Input;
|
||||||
using RhythmBullet.Utilities.Camera;
|
using RecrownedAthenaeum.Camera;
|
||||||
using RhythmBullet.Utilities.Input;
|
using RecrownedAthenaeum.Input;
|
||||||
|
|
||||||
namespace RhythmBullet.UI.Modular
|
namespace RecrownedAthenaeum.UI.Modular
|
||||||
{
|
{
|
||||||
public class UIModuleGroup : UIModule
|
public class UIModuleGroup : UIModule
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user