New types for cell and pixel coordinate position/vectors.

This commit is contained in:
James Dunne
2012-06-20 23:22:27 -05:00
parent 0b98a8ce5e
commit 9c49143534
162 changed files with 1291 additions and 865 deletions

View File

@@ -62,12 +62,12 @@ namespace OpenRA
public int Value( World world ) { return value; }
}
public class LocationInit : IActorInit<int2>
public class LocationInit : IActorInit<CPos>
{
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
public LocationInit() { }
public LocationInit( int2 init ) { value = init; }
public int2 Value( World world ) { return value; }
public LocationInit( CPos init ) { value = init.ToInt2(); }
public CPos Value(World world) { return (CPos)value; }
}
public class SubCellInit : IActorInit<SubCell>
@@ -78,12 +78,12 @@ namespace OpenRA
public SubCell Value(World world) { return (SubCell)value; }
}
public class CenterLocationInit : IActorInit<int2>
public class CenterLocationInit : IActorInit<PPos>
{
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
public CenterLocationInit() { }
public CenterLocationInit( int2 init ) { value = init; }
public int2 Value( World world ) { return value; }
public CenterLocationInit(PPos init) { value = init.ToInt2(); }
public PPos Value(World world) { return (PPos)value; }
}
public class OwnerInit : IActorInit<Player>