Replace System.Drawing primitives with our own.

This commit is contained in:
Paul Chote
2019-02-03 21:29:18 +00:00
parent ef9f74411b
commit ab4a7e3558
304 changed files with 795 additions and 335 deletions

View File

@@ -10,8 +10,8 @@
#endregion
using System;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Support;
namespace OpenRA.Graphics

View File

@@ -10,7 +10,7 @@
#endregion
using System;
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -9,8 +9,8 @@
*/
#endregion
using System.Drawing;
using System.Globalization;
using OpenRA.Primitives;
using OpenRA.Scripting;
namespace OpenRA.Graphics

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,7 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,8 +10,8 @@
#endregion
using System;
using System.Drawing;
using OpenRA.FileSystem;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,8 +10,8 @@
#endregion
using System;
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Primitives;
namespace OpenRA
{

View File

@@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;

View File

@@ -9,7 +9,7 @@
*/
#endregion
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using OpenRA.FileSystem;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,9 +10,9 @@
#endregion
using System;
using System.Drawing;
using System.IO;
using OpenRA.FileFormats;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using OpenRA.FileFormats;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{
@@ -40,7 +40,7 @@ namespace OpenRA.Graphics
Sheet current;
TextureChannel channel;
int rowHeight = 0;
Point p;
int2 p;
public static Sheet AllocateSheet(SheetType type, int sheetSize)
{
@@ -107,7 +107,7 @@ namespace OpenRA.Graphics
{
if (imageSize.Width + p.X > current.Size.Width)
{
p = new Point(0, p.Y + rowHeight);
p = new int2(0, p.Y + rowHeight);
rowHeight = imageSize.Height;
}
@@ -128,11 +128,11 @@ namespace OpenRA.Graphics
channel = next.Value;
rowHeight = imageSize.Height;
p = new Point(0, 0);
p = int2.Zero;
}
var rect = new Sprite(current, new Rectangle(p, imageSize), zRamp, spriteOffset, channel, BlendMode.Alpha);
p.X += imageSize.Width;
var rect = new Sprite(current, new Rectangle(p.X, p.Y, imageSize.Width, imageSize.Height), zRamp, spriteOffset, channel, BlendMode.Alpha);
p += new int2(imageSize.Width, 0);
return rect;
}

View File

@@ -10,7 +10,7 @@
#endregion
using System;
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,7 +10,6 @@
#endregion
using System;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Support;

View File

@@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;

View File

@@ -10,7 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,7 +10,7 @@
#endregion
using System;
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,8 +10,8 @@
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Support;
namespace OpenRA.Graphics

View File

@@ -9,7 +9,7 @@
*/
#endregion
using System.Drawing;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -10,8 +10,8 @@
#endregion
using System;
using System.Drawing;
using OpenRA.FileFormats;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{

View File

@@ -11,9 +11,9 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Effects;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Graphics