Esempio n. 1
0
        public Map(BattleField region)
        {
            this.region = region;

            FileLocation fl = FileSystem.Instance.Locate("grad.bit", GameFileLocs.Nature);

            gradMap = new BitTable(32);
            gradMap.Load(fl);

            pathFinder = new PathFinderManager(gradMap);

            fl = FileSystem.Instance.Locate("mapheight.raw", GameFileLocs.Nature);

            heightData = new ushort[HeightMapHeight][];
            ContentBinaryReader br = new ContentBinaryReader(fl);

            for (int i = 0; i < HeightMapHeight; i++)
            {
                heightData[i] = new ushort[HeightMapWidth];
                for (int j = 0; j < HeightMapWidth; j++)
                {
                    heightData[i][j] = br.ReadUInt16();
                }
            }
            br.Close();
        }
Esempio n. 2
0
 public PathFinder(PathFinderManager mgr)
 {
     this.terrain = mgr.TerrainTable;
     this.width   = mgr.Width;
     this.height  = mgr.Height;
     this.units   = mgr.NodeBuffer;
 }
Esempio n. 3
0
        public Map(BattleField region)
        {
            this.region = region;

            FileLocation fl = FileSystem.Instance.Locate("grad.bit", GameFileLocs.Nature);

            gradMap = new BitTable(32);
            gradMap.Load(fl);

            pathFinder = new PathFinderManager(gradMap);

            fl = FileSystem.Instance.Locate("mapheight.raw", GameFileLocs.Nature);

            heightData = new ushort[HeightMapHeight][];
            ContentBinaryReader br = new ContentBinaryReader(fl);
            for (int i = 0; i < HeightMapHeight; i++)
            {
                heightData[i] = new ushort[HeightMapWidth];
                for (int j = 0; j < HeightMapWidth; j++) 
                {
                    heightData[i][j] = br.ReadUInt16();
                }
            }
            br.Close();
        }
Esempio n. 4
0
 public PathFinder(PathFinderManager mgr)
 {
     this.terrain = mgr.TerrainTable;
     this.width = mgr.Width;
     this.height = mgr.Height;
     this.units = mgr.NodeBuffer;
 }