cnc map tib support

This commit is contained in:
Paul Chote
2010-03-04 10:17:59 +13:00
parent 6ad23a191d
commit 1914a8adbe
5 changed files with 51 additions and 12 deletions

View File

@@ -34,9 +34,7 @@ namespace OpenRA
Sprite[] shadowBits = SpriteSheetBuilder.LoadAllSprites("shadow");
Sprite[,] sprites = new Sprite[128, 128];
bool dirty = true;
// TODO: Testing
bool hasGPS = true;
bool hasGPS = false;
Player owner;
Map map;
public Rectangle? bounds;

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -35,7 +35,7 @@ namespace OpenRA.Traits
World w;
public ResourceTypeInfo[] resourceTypes;
CellContents[,] content = new CellContents[128, 128];
CellContents[,] content;
public ResourceLayer(Actor self)
{
@@ -65,6 +65,8 @@ namespace OpenRA.Traits
public void WorldLoaded(World w)
{
this.w = w;
content = new CellContents[w.Map.MapSize, w.Map.MapSize];
resourceTypes = w.WorldActor.Info.Traits.WithInterface<ResourceTypeInfo>().ToArray();
foreach (var rt in resourceTypes)
rt.Sprites = rt.SpriteNames.Select(a => SpriteSheetBuilder.LoadAllSprites(a)).ToArray();