Groups related HIT resources, like the tsov2 series or newmain.
Exemplo n.º 1
0
        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>();
        }
Exemplo n.º 2
0
 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
             });
         }
     }
 }