Exemple #1
0
 /// <summary>
 /// Registers all the events in a resource group.
 /// </summary>
 /// <param name="RscGroup">The resource group to go through.</param>
 private void RegisterEvent(HitResourcegroup RscGroup)
 {
     foreach (TrackEvent TEvent in  RscGroup.Events.Events)
     {
         RegisteredEvent Event = new RegisteredEvent();
         Event.Name      = TEvent.Name;
         Event.EventType = TEvent.EventType;
         Event.TrackID   = TEvent.TrackID;
         Event.Rsc       = RscGroup;
         if (!Events.ContainsKey(TEvent.Name))
         {
             Events.Add(TEvent.Name, Event);
         }
     }
 }
Exemple #2
0
        public HitVM(string StartupDir)
        {
            GameDir = StartupDir;

            if (IsLinux)
            {
                Rsc_newmain = new HitResourcegroup(StartupDir + "sounddata/newmain.hit",
                                                   StartupDir + "sounddata/eventlist.txt", StartupDir + "sounddata/newmain.hsm");
                Rsc_relationships = new HitResourcegroup(StartupDir + "sounddata/relationships.hit",
                                                         StartupDir + "sounddata/relationships.evt", StartupDir + "sounddata/relationships.hsm");
                Rsc_tsoep5 = new HitResourcegroup(StartupDir + "sounddata/tsoep5.hit",
                                                  StartupDir + "sounddata/tsoep5.evt", StartupDir + "sounddata/tsoep5.hsm");
                Rsc_tsov2 = new HitResourcegroup(StartupDir + "sounddata/tsov2.hit",
                                                 StartupDir + "sounddata/tsov2.evt", "");
                Rsc_tsov3 = new HitResourcegroup(StartupDir + "sounddata/tsov3.hit",
                                                 StartupDir + "sounddata/tsov3.evt", StartupDir + "sounddata/tsov3.hsm");
                Rsc_turkey = new HitResourcegroup(StartupDir + "sounddata/turkey.hit",
                                                  StartupDir + "sounddata/turkey.evt", StartupDir + "sounddata/turkey.hsm");
            }
            else
            {
                Rsc_newmain = new HitResourcegroup(StartupDir + "sounddata\\newmain.hit",
                                                   StartupDir + "sounddata\\eventlist.txt", StartupDir + "sounddata\\newmain.hsm");
                Rsc_relationships = new HitResourcegroup(StartupDir + "sounddata\\relationships.hit",
                                                         StartupDir + "sounddata\\relationships.evt", StartupDir + "sounddata\\relationships.hsm");
                Rsc_tsoep5 = new HitResourcegroup(StartupDir + "sounddata\\tsoep5.hit",
                                                  StartupDir + "sounddata\\tsoep5.evt", StartupDir + "sounddata\\tsoep5.hsm");
                Rsc_tsov2 = new HitResourcegroup(StartupDir + "sounddata\\tsov2.hit",
                                                 StartupDir + "sounddata\\tsov2.evt", "");
                Rsc_tsov3 = new HitResourcegroup(StartupDir + "sounddata\\tsov3.hit",
                                                 StartupDir + "sounddata\\tsov3.evt", StartupDir + "sounddata\\tsov3.hsm");
                Rsc_turkey = new HitResourcegroup(StartupDir + "sounddata\\turkey.hit",
                                                  StartupDir + "sounddata\\turkey.evt", StartupDir + "sounddata\\turkey.hsm");
            }

            RegisterEvent(Rsc_newmain);
            RegisterEvent(Rsc_relationships);
            RegisterEvent(Rsc_tsoep5);
            RegisterEvent(Rsc_tsov2);
            RegisterEvent(Rsc_tsov3);
            RegisterEvent(Rsc_turkey);

            m_GlobalVars = new Dictionary <int, int>();
            m_GlobalVars.Add(0x64, 0); //SimSpeed
            m_GlobalVars.Add(0x65, 0); //test_g1
            m_GlobalVars.Add(0x66, 0); //test_g2
            m_GlobalVars.Add(0x67, 0); //test_g3
            m_GlobalVars.Add(0x68, 0); //test_g4
            m_GlobalVars.Add(0x69, 0); //test_g5
            m_GlobalVars.Add(0x6a, 0); //test_g6
            m_GlobalVars.Add(0x6b, 0); //test_g7
            m_GlobalVars.Add(0x6c, 0); //test_g8
            m_GlobalVars.Add(0x6d, 0); //test_g9
            m_GlobalVars.Add(0x6e, 0); //main_songnum
            m_GlobalVars.Add(0x6f, 0); //main_musichitlistid
            m_GlobalVars.Add(0x70, 0); //campfire_nexttrack
            m_GlobalVars.Add(0x71, 0); //campfire_busy
            m_GlobalVars.Add(0x7b, 0); //main_duckpri
            m_GlobalVars.Add(0x7c, 0); //main_vol
            m_GlobalVars.Add(0x7d, 0); //main_fxtype
            m_GlobalVars.Add(0x7e, 0); //main_fxlevel
            m_GlobalVars.Add(0x7f, 0); //main_pause
            m_GlobalVars.Add(0x80, 0); //CurrentFloor
            m_GlobalVars.Add(0x81, 0); //Hour
            m_GlobalVars.Add(0x82, 0); //RoomSize
            m_GlobalVars.Add(0x83, 0); //OutdoorRatio
            m_GlobalVars.Add(0x84, 0); //OptionSfxVol
            m_GlobalVars.Add(0x85, 0); //OptionVoxVol
            m_GlobalVars.Add(0x86, 0); //OptionMusicVol
            m_GlobalVars.Add(0x87, 0); //CampfireSize

            Ini Radio = new Ini(FileManager.BaseDirectory + "sys\\radio.ini");

            //Radio.ini actually has the TrackIDs wrong.
            MusicModes.Add(6, "credits");
            MusicModes.Add(11, Radio.Sections["Stations"].Entries["13"][0]); //KSEL
            MusicModes.Add(12, Radio.Sections["Stations"].Entries["14"][0]); //KCRE
            MusicModes.Add(13, Radio.Sections["Stations"].Entries["12"][0]); //KMAP

            if (IsLinux)
            {
                m_StationPaths.Add("credits", "Music/Stations/Disco"); //Not defined in radio.ini
                m_StationPaths.Add("KMAP", Radio.Sections["Stations"].Entries["12"][1].Replace("./", ""));
                m_StationPaths.Add("KSEL", Radio.Sections["Stations"].Entries["13"][1].Replace("./", ""));
                m_StationPaths.Add("KCRE", Radio.Sections["Stations"].Entries["12"][1].Replace("./", ""));
            }
            else
            {
                m_StationPaths.Add("credits", "Music\\Stations\\Disco");
                m_StationPaths.Add("KMAP", "Music\\Modes\\Map\\");
                m_StationPaths.Add("KSEL", "Music\\Modes\\Select\\");
                m_StationPaths.Add("KCRE", "Music\\Modes\\Create\\");
            }

            IsInitialized = true;
        }
Exemple #3
0
        public HitVM(string StartupDir)
        {
            GameDir = StartupDir;

            if (IsLinux)
            {
                Rsc_newmain = new HitResourcegroup(StartupDir + "sounddata/newmain.hit",
                                                   StartupDir + "sounddata/eventlist.txt", StartupDir + "sounddata/newmain.hsm");
                Rsc_relationships = new HitResourcegroup(StartupDir + "sounddata/relationships.hit",
                                                         StartupDir + "sounddata/relationships.evt", StartupDir + "sounddata/relationships.hsm");
                Rsc_tsoep5 = new HitResourcegroup(StartupDir + "sounddata/tsoep5.hit",
                                                  StartupDir + "sounddata/tsoep5.evt", StartupDir + "sounddata/tsoep5.hsm");
                Rsc_tsov2 = new HitResourcegroup(StartupDir + "sounddata/tsov2.hit",
                                                 StartupDir + "sounddata/tsov2.evt", "");
                Rsc_tsov3 = new HitResourcegroup(StartupDir + "sounddata/tsov3.hit",
                                                 StartupDir + "sounddata/tsov3.evt", StartupDir + "sounddata/tsov3.hsm");
                Rsc_turkey = new HitResourcegroup(StartupDir + "sounddata/turkey.hit",
                                                  StartupDir + "sounddata/turkey.evt", StartupDir + "sounddata/turkey.hsm");
            }
            else
            {
                Rsc_newmain = new HitResourcegroup(StartupDir + "sounddata\\newmain.hit",
                                                   StartupDir + "sounddata\\eventlist.txt", StartupDir + "sounddata\\newmain.hsm");
                Rsc_relationships = new HitResourcegroup(StartupDir + "sounddata\\relationships.hit",
                                                         StartupDir + "sounddata\\relationships.evt", StartupDir + "sounddata\\relationships.hsm");
                Rsc_tsoep5 = new HitResourcegroup(StartupDir + "sounddata\\tsoep5.hit",
                                                  StartupDir + "sounddata\\tsoep5.evt", StartupDir + "sounddata\\tsoep5.hsm");
                Rsc_tsov2 = new HitResourcegroup(StartupDir + "sounddata\\tsov2.hit",
                                                 StartupDir + "sounddata\\tsov2.evt", "");
                Rsc_tsov3 = new HitResourcegroup(StartupDir + "sounddata\\tsov3.hit",
                                                 StartupDir + "sounddata\\tsov3.evt", StartupDir + "sounddata\\tsov3.hsm");
                Rsc_turkey = new HitResourcegroup(StartupDir + "sounddata\\turkey.hit",
                                                  StartupDir + "sounddata\\turkey.evt", StartupDir + "sounddata\\turkey.hsm");
            }

            RegisterEvent(Rsc_newmain);
            RegisterEvent(Rsc_relationships);
            RegisterEvent(Rsc_tsoep5);
            RegisterEvent(Rsc_tsov2);
            RegisterEvent(Rsc_tsov3);
            RegisterEvent(Rsc_turkey);

            m_GlobalVars = new Dictionary <int, int>();
            m_GlobalVars.Add(0x64, 0); //SimSpeed
            m_GlobalVars.Add(0x65, 0); //test_g1
            m_GlobalVars.Add(0x66, 0); //test_g2
            m_GlobalVars.Add(0x67, 0); //test_g3
            m_GlobalVars.Add(0x68, 0); //test_g4
            m_GlobalVars.Add(0x69, 0); //test_g5
            m_GlobalVars.Add(0x6a, 0); //test_g6
            m_GlobalVars.Add(0x6b, 0); //test_g7
            m_GlobalVars.Add(0x6c, 0); //test_g8
            m_GlobalVars.Add(0x6d, 0); //test_g9
            m_GlobalVars.Add(0x6e, 0); //main_songnum
            m_GlobalVars.Add(0x6f, 0); //main_musichitlistid
            m_GlobalVars.Add(0x70, 0); //campfire_nexttrack
            m_GlobalVars.Add(0x71, 0); //campfire_busy
            m_GlobalVars.Add(0x7b, 0); //main_duckpri
            m_GlobalVars.Add(0x7c, 0); //main_vol
            m_GlobalVars.Add(0x7d, 0); //main_fxtype
            m_GlobalVars.Add(0x7e, 0); //main_fxlevel
            m_GlobalVars.Add(0x7f, 0); //main_pause
            m_GlobalVars.Add(0x80, 0); //CurrentFloor
            m_GlobalVars.Add(0x81, 0); //Hour
            m_GlobalVars.Add(0x82, 0); //RoomSize
            m_GlobalVars.Add(0x83, 0); //OutdoorRatio
            m_GlobalVars.Add(0x84, 0); //OptionSfxVol
            m_GlobalVars.Add(0x85, 0); //OptionVoxVol
            m_GlobalVars.Add(0x86, 0); //OptionMusicVol
            m_GlobalVars.Add(0x87, 0); //CampfireSize

            IsInitialized = true;
        }