예제 #1
0
 public McdFile GetMcdFile(Palette p, XcTileFactory _xcTileFactory)
 {
     if (_mcdTab[p] == null)
     {
         var tiles = _xcTileFactory.CreateTiles(BaseName, BasePath, GetPckFile(p));
         _mcdTab[p] = new McdFile(tiles);
     }
     return((McdFile)_mcdTab[p]);
 }
예제 #2
0
		public XCTile(int id,PckFile file, McdEntry info,McdFile mFile):base(id)
		{
			this.info = info;
			myFile = file;
			mcdFile = mFile;

			image = new PckImage[numImages];	
	
			if(!info.UFODoor && !info.HumanDoor)
				MakeAnimate();
			else
				StopAnimate();

			dead =null;
			alternate = null;
		}
예제 #3
0
        public XCMapFile GetShip()
        {
            ImageInfo images = GameInfo.ImageInfo;

            List <ITile> a = new List <ITile>();

            foreach (string s in dependencies)
            {
                McdFile mcd = images[s].GetMcdFile();
                foreach (XCTile t in mcd)
                {
                    a.Add(t);
                }
            }

            XCMapFile ship = new XCMapFile(basename, basePath, blankPath, a, dependencies);

            return(ship);
        }
예제 #4
0
        public IMap_Base Load(XCMapDesc imd)
        {
            if (imd == null)
            {
                return(null);
            }
            if (!File.Exists(imd.FilePath))
            {
                return(null);
            }
            var filePath = imd.BasePath + imd.Basename + ".MAP";

            if (!File.Exists(filePath))
            {
                return(null);
            }
            ImageInfo images = GameInfo.ImageInfo;

            var tiles = new List <TileBase>();

            foreach (string dependency in imd.Dependencies)
            {
                var image = images[dependency];
                if (image != null)
                {
                    McdFile mcd = image.GetMcdFile(imd.Palette, _xcTileFactory);
                    foreach (XCTile t in mcd)
                    {
                        tiles.Add(t);
                    }
                }
            }

            var rmp = new RmpFile(imd.Basename, imd.RmpPath);
            var map = new XCMapFile(imd.Basename, imd.BasePath, imd.BlankPath, tiles, imd.Dependencies, rmp);

            return(map);
        }
예제 #5
0
		public McdFile GetMcdFile(Palette p)
		{
			if(mcdTab[p]==null)
				mcdTab[p] = new McdFile(basename,basePath,GetPckFile(p));//GameInfo.GetMcdFile(basename,basePath,GetPckFile(p));
			return (McdFile)mcdTab[p];
		}