public Settings() { ScenesListFile = @"data/scenes/scenes.list"; LastPlayedId = 0; MaxPlayedId = 1; MinimapWidth = 300; MinimapHeight = 100; FullScreen = false; ScreenMode = new TV_MODEFORMAT() { Width = 800, Height = 600, Format = 32 }; #if DEBUG //FullScreen = false; //ScreenMode = new TV_MODEFORMAT() { Width = 800, Height = 600, Format = 32 }; Antialiasing = 2; #else //FullScreen = true; //ScreenMode = new TV_MODEFORMAT() { // Width = Screen.PrimaryScreen.Bounds.Width, // Height = Screen.PrimaryScreen.Bounds.Height, // Format = 32 //}; Antialiasing = 4; #endif MusicVolume = 70; FXVolume = 80; }
/// <summary> /// Gets the available video modes. /// </summary> /// <returns></returns> public static List <TV_MODEFORMAT> GetAvailableVideoModes() { var modes = new List <TV_MODEFORMAT>(); var deviceInfo = new TVDeviceInfo(); for (int i = 0; i < deviceInfo.GetDisplayModeCount(); i++) { TV_MODEFORMAT mode = deviceInfo.GetDisplayMode(i); if (mode.Format == 32 && !modes.Any(m => m.Width == mode.Width && m.Height == mode.Height)) { modes.Add(mode); } } modes.Sort((a, b) => ((b.Width - a.Width) << 16) + b.Height - a.Height); return(modes); }
/// <summary> /// Internal copy constructor. /// </summary> /// <param name="source"></param> internal EngineSettings(EngineSettings source) { MultiThreading = source.MultiThreading; DebugFile = source.DebugFile; RenderForm = source.RenderForm; ScreenMode = source.ScreenMode; Fullscreen = source.Fullscreen; VSync = source.VSync; MultisampleType = source.MultisampleType; StartupScene = string.Empty; PreviewMode = false; UpdateFrequency = source.UpdateFrequency; UseGlowEffect = source.UseGlowEffect; }