removing dead crap, etc
This commit is contained in:
@@ -8,7 +8,6 @@ using OpenRa.Game.GameRules;
|
|||||||
using OpenRa.Game.Graphics;
|
using OpenRa.Game.Graphics;
|
||||||
using OpenRa.Game.Support;
|
using OpenRa.Game.Support;
|
||||||
using OpenRa.Game.Traits;
|
using OpenRa.Game.Traits;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace OpenRa.Game
|
namespace OpenRa.Game
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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 )
|
public void Play( string sequenceName )
|
||||||
{
|
{
|
||||||
PlayThen(sequenceName, () => { });
|
PlayThen(sequenceName, () => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlayBackwards(string sequenceName)
|
|
||||||
{
|
|
||||||
PlayBackwardsThen(sequenceName, () => { });
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PlayRepeating( string sequenceName )
|
public void PlayRepeating( string sequenceName )
|
||||||
{
|
{
|
||||||
PlayThen( sequenceName, () => PlayRepeating( CurrentSequence.Name ) );
|
PlayThen( sequenceName, () => PlayRepeating( CurrentSequence.Name ) );
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
using OpenRa.FileFormats;
|
|
||||||
using System.Linq;
|
|
||||||
using IjwFramework.Collections;
|
using IjwFramework.Collections;
|
||||||
|
using OpenRa.FileFormats;
|
||||||
|
|
||||||
namespace OpenRa.Game.Graphics
|
namespace OpenRa.Game.Graphics
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using OpenRa.FileFormats;
|
|
||||||
using IjwFramework.Collections;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using IjwFramework.Collections;
|
||||||
|
using OpenRa.FileFormats;
|
||||||
|
|
||||||
namespace OpenRa.Game.Graphics
|
namespace OpenRa.Game.Graphics
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using OpenRa.Game.GameRules;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using OpenRa.Game.GameRules;
|
|
||||||
|
|
||||||
namespace OpenRa.Game.Traits
|
namespace OpenRa.Game.Traits
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using OpenRa.Game.GameRules;
|
|
||||||
|
|
||||||
namespace OpenRa.Game.Traits
|
namespace OpenRa.Game.Traits
|
||||||
{
|
{
|
||||||
// infantry prone behavior
|
// infantry prone behavior
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using OpenRa.Game.GameRules;
|
using OpenRa.Game.GameRules;
|
||||||
using OpenRa.Game.Graphics;
|
using OpenRa.Game.Graphics;
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
namespace OpenRa.Game.Traits
|
namespace OpenRa.Game.Traits
|
||||||
{
|
{
|
||||||
@@ -10,29 +10,6 @@ namespace OpenRa.Game.Traits
|
|||||||
// depends on the order of pips in WorldRenderer.cs!
|
// depends on the order of pips in WorldRenderer.cs!
|
||||||
enum PipType { Transparent, Green, Yellow, Red, Gray };
|
enum PipType { Transparent, Green, Yellow, Red, Gray };
|
||||||
enum TagType { None, Fake, Primary };
|
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 ITick { void Tick(Actor self); }
|
||||||
interface IRender { IEnumerable<Renderable> Render(Actor self); }
|
interface IRender { IEnumerable<Renderable> Render(Actor self); }
|
||||||
@@ -65,4 +42,27 @@ namespace OpenRa.Game.Traits
|
|||||||
bool IsCrushableBy(UnitMovementType umt, Player player);
|
bool IsCrushableBy(UnitMovementType umt, Player player);
|
||||||
bool IsPathableCrush(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); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRa.Game.Graphics;
|
|
||||||
using OpenRa.Game.GameRules;
|
using OpenRa.Game.GameRules;
|
||||||
|
using OpenRa.Game.Graphics;
|
||||||
|
|
||||||
namespace OpenRa.Game.Traits
|
namespace OpenRa.Game.Traits
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Drawing;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
namespace OpenRa.Game.Traits
|
namespace OpenRa.Game.Traits
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user