Esempio n. 1
0
        /// <summary>
        /// Update the status
        /// </summary>
        public void Update()
        {
            Dictionary <string, dynamic> t = MtaShared.GetDictionaryFromTable(MtaClient.DxGetStatus(), "System.String", "System.Dynamic");

            TestMode                          = (TestMode)Enum.Parse(typeof(TestMode), t["TestMode"]);
            VideoCardName                     = (string)t["VideoCardName"];
            VideoCardRAM                      = (int)t["VideoCardRAM"];
            VideoCardPSVersion                = (string)t["VideoCardPSVersion"];
            VideoCardNumRenderTargets         = (int)t["VideoCardNumRenderTargets"];
            VideoCardMaxAnisotropy            = (int)t["VideoCardMaxAnisotropy"];
            VideoMemoryFreeForMTA             = (int)t["VideoMemoryFreeForMTA"];
            VideoMemoryUsedByFonts            = (int)t["VideoMemoryUsedByFonts"];
            VideoMemoryUsedByTextures         = (int)t["VideoMemoryUsedByTextures"];
            VideoMemoryUsedByRenderTargets    = (int)t["VideoMemoryUsedByRenderTargets"];
            SettingWindowed                   = (bool)t["SettingWindowed"];
            SettingFullScreenStyle            = (int)t["SettingFullScreenStyle"];
            SettingFXQuality                  = (int)t["SettingFXQuality"];
            SettingDrawDistance               = (int)t["SettingDrawDistance"];
            SettingVolumetricShadows          = (bool)t["SettingVolumetricShadows"];
            SettingStreamingVideoMemoryForGTA = (int)t["SettingStreamingVideoMemoryForGTA"];
            SettingAnisotropicFiltering       = (int)t["SettingAnisotropicFiltering"];
            SettingAntiAliasing               = (int)t["SettingAntiAliasing"];
            SettingHeatHaze                   = (bool)t["SettingHeatHaze"];
            SettingGrassEffect                = (bool)t["SettingGrassEffect"];
            Setting32BitColor                 = (bool)t["Setting32BitColor"];
            SettingHUDMatchAspectRatio        = (bool)t["SettingHUDMatchAspectRatio"];
            SettingAspectRatio                = (string)t["SettingAspectRatio"];
            SettingFOV                        = (int)t["SettingFOV"];
            SettingHighDetailVehicles         = (bool)t["SettingHighDetailVehicles"];
            AllowScreenUpload                 = (bool)t["AllowScreenUpload"];
            DepthBufferFormat                 = (string)t["DepthBufferFormat"];
            UsingDepthBuffer                  = (bool)t["UsingDepthBuffer"];
        }
Esempio n. 2
0
 protected virtual void UpdateFromGame()
 {
     if (vehicleElement != null)
     {
         BuildFromTable(MtaShared.GetDictionaryFromTable(MtaShared.GetVehicleHandling(vehicleElement), "System.String", "System.Dynamic"));
     }
 }
Esempio n. 3
0
        /// <summary>
        /// This function gets the fast fourier transform data for an audio stream which is an array of floats representing the current audio frame.
        /// </summary>
        public float[] GetFftData(int iSamples = 512, int iBands = 0)
        {
            Dictionary <int, float> raw = MtaShared.GetDictionaryFromTable(MtaClient.GetSoundFFTData(element, iSamples, iBands), "System.Int32", "System.Single");

            float[] fftData = new float[raw.Count];
            foreach (KeyValuePair <int, float> pair in raw)
            {
                fftData[pair.Key] = pair.Value;
            }
            return(fftData);
        }
Esempio n. 4
0
        protected void UpdateParams()
        {
            Dictionary <string, dynamic> d = MtaShared.GetDictionaryFromTable(MtaShared.GetVehicleSirenParams(vehicle.MTAElement), "System.String", "dynamic");

            type = (SirenType)d["SirenType"];
            Dictionary <string, bool> flags = MtaShared.GetDictionaryFromTable(d["Flags"], "System.String", "System.Boolean");

            visibleFromAllDirection = flags["360"];
            checkLOS      = flags["DoLOSCheck"];
            useRandomiser = flags["UseRandomiser"];
            silent        = flags["Silent"];
        }
Esempio n. 5
0
        /// <summary>
        /// Create a new version object
        /// </summary>
        public SystemVersion()
        {
            Dictionary <string, string> dictionary = MtaShared.GetDictionaryFromTable(MtaShared.GetVersion(), "System.String", "System.String");

            Number   = Int32.Parse(dictionary["number"]);
            Mta      = dictionary["mta"];
            Name     = dictionary["name"];
            Netcode  = dictionary["netcode"];
            Os       = dictionary["os"];
            Type     = dictionary["type"];
            Tag      = dictionary["tag"];
            Sortable = dictionary["sortable"];
        }
Esempio n. 6
0
        private void updateSoundEffects()
        {
            Dictionary <string, bool> soundEffects = MtaShared.GetDictionaryFromTable(MtaClient.GetSoundEffects(sound.MTAElement), "System.String", "System.Boolean");

            gargle      = soundEffects["gargle"];
            compressor  = soundEffects["compressor"];
            echo        = soundEffects["echo"];
            i3dl2reverb = soundEffects["i3dl2reverb"];
            distortion  = soundEffects["distortion"];
            chorus      = soundEffects["chorus"];
            parameq     = soundEffects["parameq"];
            reverb      = soundEffects["reverb"];
            flanger     = soundEffects["flanger"];
        }
Esempio n. 7
0
 protected override void UpdateFromGame()
 {
     BuildFromTable(MtaShared.GetDictionaryFromTable(MtaServer.GetModelHandling((int)model), "System.String", "System.Dynamic"));
 }