removing dead crap, etc

This commit is contained in:
Chris Forbes
2009-12-28 09:24:39 +13:00
parent 8450077370
commit bf0d44851f
9 changed files with 32 additions and 55 deletions

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.GameRules;
using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits
{
// infantry prone behavior

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Drawing;
using OpenRa.Game.GameRules;
using OpenRa.Game.Graphics;
using System.Drawing;
namespace OpenRa.Game.Traits
{
@@ -10,29 +10,6 @@ namespace OpenRa.Game.Traits
// depends on the order of pips in WorldRenderer.cs!
enum PipType { Transparent, Green, Yellow, Red, Gray };
enum TagType { None, Fake, Primary };
struct Renderable
{
public readonly Sprite Sprite;
public readonly float2 Pos;
public readonly PaletteType Palette;
public readonly int ZOffset;
public Renderable(Sprite sprite, float2 pos, PaletteType palette, int zOffset)
{
Sprite = sprite;
Pos = pos;
Palette = palette;
ZOffset = zOffset;
}
public Renderable(Sprite sprite, float2 pos, PaletteType palette)
: this(sprite, pos, palette, 0) { }
public Renderable WithPalette(PaletteType newPalette) { return new Renderable(Sprite, Pos, newPalette, ZOffset); }
public Renderable WithZOffset(int newOffset) { return new Renderable(Sprite, Pos, Palette, newOffset); }
public Renderable WithPos(float2 newPos) { return new Renderable(Sprite, newPos, Palette, ZOffset); }
}
interface ITick { void Tick(Actor self); }
interface IRender { IEnumerable<Renderable> Render(Actor self); }
@@ -65,4 +42,27 @@ namespace OpenRa.Game.Traits
bool IsCrushableBy(UnitMovementType umt, Player player);
bool IsPathableCrush(UnitMovementType umt, Player player);
}
struct Renderable
{
public readonly Sprite Sprite;
public readonly float2 Pos;
public readonly PaletteType Palette;
public readonly int ZOffset;
public Renderable(Sprite sprite, float2 pos, PaletteType palette, int zOffset)
{
Sprite = sprite;
Pos = pos;
Palette = palette;
ZOffset = zOffset;
}
public Renderable(Sprite sprite, float2 pos, PaletteType palette)
: this(sprite, pos, palette, 0) { }
public Renderable WithPalette(PaletteType newPalette) { return new Renderable(Sprite, Pos, newPalette, ZOffset); }
public Renderable WithZOffset(int newOffset) { return new Renderable(Sprite, Pos, Palette, newOffset); }
public Renderable WithPos(float2 newPos) { return new Renderable(Sprite, newPos, Palette, ZOffset); }
}
}

View File

@@ -1,7 +1,7 @@
using System;
using System.Linq;
using OpenRa.Game.Graphics;
using OpenRa.Game.GameRules;
using OpenRa.Game.Graphics;
namespace OpenRa.Game.Traits
{

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing;
namespace OpenRa.Game.Traits
{