Groups related HIT resources, like the tsov2 series or newmain.
示例#1
0
文件: HITVM.cs 项目: Daribon/FreeSO
        public HITVM()
        {
            var content = FSO.Content.Content.Get();
            Events = new Dictionary<string, HITEventRegistration>();

            newmain = LoadHitGroup(content.GetPath("sounddata/newmain.hit"), content.GetPath("sounddata/eventlist.txt"), content.GetPath("sounddata/newmain.hsm"));
            relationships = LoadHitGroup(content.GetPath("sounddata/relationships.hit"), content.GetPath("sounddata/relationships.evt"), content.GetPath("sounddata/relationships.hsm"));
            tsoep5 = LoadHitGroup(content.GetPath("sounddata/tsoep5.hit"), content.GetPath("sounddata/tsoep5.evt"), content.GetPath("sounddata/tsoep5.hsm"));
            tsov2 = LoadHitGroup(content.GetPath("sounddata/tsov2.hit"), content.GetPath("sounddata/tsov2.evt"), null); //tsov2 has no hsm file
            tsov3 = LoadHitGroup(content.GetPath("sounddata/tsov3.hit"), content.GetPath("sounddata/tsov3.evt"), content.GetPath("sounddata/tsov3.hsm"));
            turkey = LoadHitGroup(content.GetPath("sounddata/turkey.hit"), content.GetPath("sounddata/turkey.evt"), content.GetPath("sounddata/turkey.hsm"));

            RegisterEvents(newmain);
            RegisterEvents(relationships);
            RegisterEvents(tsoep5);
            RegisterEvents(tsov2);
            RegisterEvents(tsov3);
            RegisterEvents(turkey);

            Globals = new int[36];
            Sounds = new List<HITSound>();
            ActiveEvents = new Dictionary<string, HITSound>();
            FSCPlayers = new List<FSCPlayer>();
        }
示例#2
0
文件: HITVM.cs 项目: Daribon/FreeSO
 private void RegisterEvents(HITResourceGroup group)
 {
     var events = group.evt;
     for (int i = 0; i < events.Entries.Count; i++)
     {
         var entry = events.Entries[i];
         if (!Events.ContainsKey(entry.Name))
         {
             Events.Add(entry.Name, new HITEventRegistration()
             {
                 Name = entry.Name,
                 EventType = (FSO.Files.HIT.HITEvents)entry.EventType,
                 TrackID = entry.TrackID,
                 ResGroup = group
             });
         }
     }
 }