mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-12-25 19:46:50 -05:00
Forgot to commit the rest of the files..
This commit is contained in:
parent
dbb1a2316a
commit
3b543131a5
13
OpenDiablo2.Common/Interfaces/ITexture.cs
Normal file
13
OpenDiablo2.Common/Interfaces/ITexture.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenDiablo2.Common.Interfaces
|
||||
{
|
||||
// This allows external systems to store their texture data in other services for later use
|
||||
public interface ITexture
|
||||
{
|
||||
}
|
||||
}
|
22
OpenDiablo2.Common/Models/MapCellInfo.cs
Normal file
22
OpenDiablo2.Common/Models/MapCellInfo.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OpenDiablo2.Common.Interfaces;
|
||||
|
||||
namespace OpenDiablo2.Common.Models
|
||||
{
|
||||
// Represents a single cell on a map
|
||||
public sealed class MapCellInfo
|
||||
{
|
||||
public Guid TileId;
|
||||
public int OffX;
|
||||
public int OffY;
|
||||
public int FrameWidth;
|
||||
public int FrameHeight;
|
||||
public Rectangle Rect;
|
||||
public ITexture Texture;
|
||||
}
|
||||
}
|
11
OpenDiablo2.SDL2/SDL2Extensions.cs
Normal file
11
OpenDiablo2.SDL2/SDL2Extensions.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Drawing;
|
||||
using SDL2;
|
||||
|
||||
namespace OpenDiablo2.SDL2_
|
||||
{
|
||||
public static class SDL2Extensions
|
||||
{
|
||||
public static SDL.SDL_Rect ToSDL2Rect(this Rectangle src) => new SDL.SDL_Rect { x = src.X, y = src.Y, w = src.Width, h = src.Height };
|
||||
public static Rectangle ToRectangle(this SDL.SDL_Rect src) => new Rectangle { X = src.x, Y = src.y, Width = src.w, Height = src.h };
|
||||
}
|
||||
}
|
10
OpenDiablo2.SDL2/SDL2Texture.cs
Normal file
10
OpenDiablo2.SDL2/SDL2Texture.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using OpenDiablo2.Common.Interfaces;
|
||||
|
||||
namespace OpenDiablo2.SDL2_
|
||||
{
|
||||
public sealed class SDL2Texture : ITexture
|
||||
{
|
||||
public IntPtr Pointer { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user