Beginning work on render components of framework.
This commit is contained in:
parent
29daabdaf6
commit
713df6d111
13
RecrownedAthenaeum/Render/SpriteBatch.cs
Normal file
13
RecrownedAthenaeum/Render/SpriteBatch.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace RecrownedAthenaeum.Render {
|
||||
public class SpriteBatch {
|
||||
public SpriteBatch() {
|
||||
}
|
||||
public void Begin() {
|
||||
|
||||
}
|
||||
|
||||
public void End() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
12
RecrownedAthenaeum/Types/IDrawable.cs
Normal file
12
RecrownedAthenaeum/Types/IDrawable.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using RecrownedAthenaeum.Render;
|
||||
|
||||
namespace RecrownedAthenaeum.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// A wrapper that makes sure anything implementing can be drawn with options.
|
||||
/// </summary>
|
||||
public interface IDrawable
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
using RecrownedAthenaeum.Render;
|
||||
|
||||
namespace RecrownedAthenaeum.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// A wrapper that makes sure anything implementing can be drawn with options.
|
||||
/// </summary>
|
||||
public interface ISpecialDrawable
|
||||
{
|
||||
/// <summary>
|
||||
/// Should draw whatever implements this.
|
||||
/// </summary>
|
||||
/// <param name="spriteBatch">The batch to be used.</param>
|
||||
/// <param name="destination">The location and dimensions to draw to.</param>
|
||||
/// <param name="color">The color tint to draw with.</param>
|
||||
/// <param name="rotation">The rotation to be used.</param>
|
||||
/// <param name="origin">The origin for the rotation.</param>
|
||||
void Draw(ConsistentSpriteBatch spriteBatch, Rectangle destination, Color color, float rotation = 0f, Vector2 origin = default(Vector2));
|
||||
}
|
||||
}
|
21
RecrownedAthenaeum/Types/Texture.cs
Normal file
21
RecrownedAthenaeum/Types/Texture.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.IO;
|
||||
namespace RecrownedAthenaeum.Types {
|
||||
public class Texture {
|
||||
byte[] textureData;
|
||||
public Texture() {
|
||||
Image img = Image.FromFile()
|
||||
}
|
||||
|
||||
public Texture(byte[] textureData) {
|
||||
this.textureData = textureData;
|
||||
}
|
||||
|
||||
public void LoadFromPNG(string path) {
|
||||
using (FileStream file = new FileStream(path, FileMode.Open)) {
|
||||
Image img = new Image();
|
||||
img.LoadFromPNG(file);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user