static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); foreach (KeyValuePair <LibraryFile, string> pair in Libraries.LibraryList) { if (!File.Exists(@".\" + pair.Value)) { continue; } CEnvir.LibraryList[pair.Key] = new MirLibrary(@".\" + pair.Value); } ConfigReader.Load(); CEnvir.LoadDatabase(); CEnvir.Target = new TargetForm(); DXManager.Create(); DXSoundManager.Create(); DXControl.ActiveScene = new LoginScene(Config.IntroSceneSize); MessagePump.Run(CEnvir.Target, CEnvir.GameLoop); ConfigReader.Save(); CEnvir.Session?.Save(true); CEnvir.Unload(); DXManager.Unload(); DXSoundManager.Unload(); }