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

@@ -8,7 +8,6 @@ using OpenRa.Game.GameRules;
using OpenRa.Game.Graphics;
using OpenRa.Game.Support;
using OpenRa.Game.Traits;
using System.Windows.Forms;
namespace OpenRa.Game
{

View File

@@ -26,18 +26,11 @@ namespace OpenRa.Game.Graphics
}
}
public float2 Center { get { return 0.25f * new float2(CurrentSequence.GetSprite(0).bounds.Size); } }
public void Play( string sequenceName )
{
PlayThen(sequenceName, () => { });
}
public void PlayBackwards(string sequenceName)
{
PlayBackwardsThen(sequenceName, () => { });
}
public void PlayRepeating( string sequenceName )
{
PlayThen( sequenceName, () => PlayRepeating( CurrentSequence.Name ) );

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic;
using OpenRa.FileFormats;
using System.Linq;
using System.Linq;
using IjwFramework.Collections;
using OpenRa.FileFormats;
namespace OpenRa.Game.Graphics
{

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic;
using OpenRa.FileFormats;
using IjwFramework.Collections;
using System.Linq;
using IjwFramework.Collections;
using OpenRa.FileFormats;
namespace OpenRa.Game.Graphics
{

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
{
@@ -11,29 +11,6 @@ namespace OpenRa.Game.Traits
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); }
interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
@@ -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
{