public Game() : base(640, 480, new GraphicsMode(32, 16, 8, 0)) { try { Title = "SnowFlake Engine"; VSync = VSyncMode.Off; DebugWindow.Log("VSync: " + VSync); _sEngine = new Engine(this); var splashthread = new Thread(SplashScreen.ShowSplashScreen) { IsBackground = true }; splashthread.Start(); SplashScreen.UpdatePercentage(10); SplashScreen.UdpateStatusTextWithStatus("Loading BSP map: level.bsp", TypeOfMessage.Success); DebugWindow.Log("Loading level outpost.bsp"); SplashScreen.UpdatePercentage(20); _sEngine.LoadMap(Engine.Quake3FilesPath + Utility.AdaptRelativePathToPlatform("maps/"), "outpost.bsp"); DebugWindow.Log("Loaded map outpost.bsp"); SplashScreen.UpdatePercentage(60); SplashScreen.UpdatePercentage(90); SplashScreen.CloseSplashScreen(); } catch (Exception ex) { if (ex.InnerException != null) { MessageBox.Show(ex.InnerException.Message, ex.Message); } } }
public static void Main(string[] args) { #if DEBUG AllocConsole(); Console.Title = (@"SNOWFLAKE ENGINE DEBUG CONSOLE"); #endif DebugWindow.Log("Starting"); Engine.Quake3FilesPath = Utility.AdaptRelativePathToPlatform("../../../../media/Quake3/"); DebugWindow.Log("Starting new game!"); using (var g = new Game()) { g.Run(); } }