git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1203 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
chrisf
2007-07-13 15:14:07 +00:00
parent 8cc0e26b3e
commit c5bfcacc69
5 changed files with 52 additions and 11 deletions

View File

@@ -3,15 +3,21 @@ using System.Collections.Generic;
using System.Text;
using OpenRa.FileFormats;
using System.Drawing;
using BluntDirectX.Direct3D;
namespace OpenRa.Game
{
class Mcv : Actor
{
static Range<int>? mcvRange = null;
public Mcv( PointF location, int palette )
{
this.location = location;
this.palette = palette;
if (mcvRange == null)
mcvRange = UnitSheetBuilder.AddUnit("mcv");
}
int GetFacing()
@@ -27,8 +33,7 @@ namespace OpenRa.Game
{
return new SheetRectangle<Sheet>[]
{
UnitSheetBuilder.McvSheet[GetFacing()],
UnitSheetBuilder.McvSheet[63 - GetFacing()]
UnitSheetBuilder.sprites[GetFacing() + mcvRange.Value.Start]
};
}
}