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]); }
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; }
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); }
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); }
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]; }