コード例 #1
0
 public TS1BCFProvider(Content contentManager, TS1Provider provider)
 {
     ContentManager = contentManager;
     BaseProvider   = provider;
     BCFProvider    = new TS1SubProvider <BCF>(provider, ".bcf");
     CFPProvider    = new TS1SubProvider <CFP>(provider, ".cfp");
 }
コード例 #2
0
 public TS1BCFProvider(GameContent contentManager, TS1Provider provider)
 {
     ContentManager = contentManager;
     BaseProvider   = provider;
     BCFProvider    = new TS1SubProvider <BCF>(provider, new string[] { ".bcf", ".cmx" });
     CFPProvider    = new TS1SubProvider <CFP>(provider, ".cfp");
 }
コード例 #3
0
 public TS1Audio(GameContent contentManager)
 {
     this.ContentManager = contentManager;
     WAVSounds           = new TS1SubProvider <DecodedSFX>(ContentManager.TS1Global, ".wav");
     MP3Sounds           = new TS1SubProvider <DecodedSFX>(ContentManager.TS1Global, ".mp3");
     XASounds            = new TS1SubProvider <DecodedSFX>(ContentManager.TS1Global, ".xa");
     UTKSounds           = new TS1SubProvider <DecodedSFX>(ContentManager.TS1Global, ".utk");
 }
コード例 #4
0
        public void InitTS1()
        {
            var floorGlobalsPath = Path.Combine(ContentManager.TS1BasePath, "GameData/floors.iff");
            var floorGlobals     = new IffFile(floorGlobalsPath);

            FloorGlobals = floorGlobals;

            var buildGlobalsPath = Path.Combine(ContentManager.TS1BasePath, "GameData/Build.iff");

            BuildGlobals = new IffFile(buildGlobalsPath); //todo: centralize?

            InitGlobals();

            //load *.flr iffs from both the TS1 provider and folder

            ushort floorID = 256;
            var    files   = new FileProvider <IffFile>(ContentManager, new IffCodec(), new Regex(".*/Floors.*\\.flr"));

            files.UseTS1 = true;
            var ts1 = new TS1SubProvider <IffFile>(ContentManager.TS1Global, ".flr");

            files.Init();
            ts1.Init();
            var compo = new CompositeProvider <IffFile>(new List <IContentProvider <IffFile> >()
            {
                ts1,
                files
            });

            Floors = compo;
            var all = compo.ListGeneric();

            foreach (var entry in all)
            {
                var iff = (IffFile)entry.GetThrowawayGeneric();
                DynamicFloorFromID[Path.GetFileNameWithoutExtension(entry.ToString().Replace('\\', '/')).ToLowerInvariant()] = floorID;
                var catStrings = iff.Get <STR>(0);

                Entries.Add(floorID, new FloorReference(this)
                {
                    ID       = floorID,
                    FileName = Path.GetFileName(entry.ToString().Replace('\\', '/')).ToLowerInvariant(),

                    Name        = catStrings.GetString(0),
                    Price       = int.Parse(catStrings.GetString(1)),
                    Description = catStrings.GetString(2)
                });

                floorID++;
            }
            NumFloors = floorID;
        }
コード例 #5
0
 public TS1ObjectProvider(Content contentManager, TS1Provider provider) : base(contentManager)
 {
     GameObjects = new TS1SubProvider <IffFile>(provider, ".iff");
 }