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

@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc
Players = w.Players.ToDictionary(p => p.InternalName);
Actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
var b = w.Map.Bounds;
Game.MoveViewport(new int2(b.Left + b.Width/2, b.Top + b.Height/2));
Game.MoveViewport(new CPos(b.Left + b.Width/2, b.Top + b.Height/2).ToFloat2());
Scripting.Media.PlayFMVFullscreen(w, "gdi1.vqa",
() => Scripting.Media.PlayFMVFullscreen(w, "landing.vqa", () =>
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Cnc
ReinforceFromSea(self.World,
Actors["lstStart"].Location,
Actors["lstEnd"].Location,
new int2(53,53),
new CPos(53, 53),
new string[] {"e1","e1","e1"},
Players["GoodGuy"]);
}
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Cnc
ReinforceFromSea(self.World,
Actors["lstStart"].Location,
Actors["lstEnd"].Location,
new int2(53,53),
new CPos(53, 53),
new string[] {"e1","e1","e1"},
Players["GoodGuy"]);
}
@@ -150,7 +150,7 @@ namespace OpenRA.Mods.Cnc
ReinforceFromSea(self.World,
Actors["lstStart"].Location,
Actors["lstEnd"].Location,
new int2(53,53),
new CPos(53, 53),
new string[] {"jeep"},
Players["GoodGuy"]);
}
@@ -160,7 +160,7 @@ namespace OpenRA.Mods.Cnc
ReinforceFromSea(self.World,
Actors["lstStart"].Location,
Actors["lstEnd"].Location,
new int2(53,53),
new CPos(53, 53),
new string[] {"jeep"},
Players["GoodGuy"]);
}
@@ -177,7 +177,7 @@ namespace OpenRA.Mods.Cnc
self.QueueActivity(new CallFunc(() => SetGunboatPath()));
}
void ReinforceFromSea(World world, int2 startPos, int2 endPos, int2 unload, string[] items, Player player)
void ReinforceFromSea(World world, CPos startPos, CPos endPos, CPos unload, string[] items, Player player)
{
world.AddFrameEndTask(w =>
{