Beginning work on render components of framework.

This commit is contained in:
Harrison Deng 2019-12-12 14:44:51 -05:00
parent 29daabdaf6
commit 713df6d111
4 changed files with 46 additions and 20 deletions

View File

@ -0,0 +1,13 @@
namespace RecrownedAthenaeum.Render {
public class SpriteBatch {
public SpriteBatch() {
}
public void Begin() {
}
public void End() {
}
}
}

View 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
{
}
}

View File

@ -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));
}
}

View 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);
}
}
}
}