public static bool Init(Form mainWindow, Control viewport) { m_delegateMessagePumpCallback = new MessagePumpCallbackDelegate(Engine.MessagePumpCallback); string[] commandLineArgs = Environment.GetCommandLineArgs(); int startIndex = 1; if (!InitDuniaEngine(Process.GetCurrentProcess().MainModule.BaseAddress, mainWindow.Handle, viewport.Handle, string.Join(" ", commandLineArgs, startIndex, commandLineArgs.Length - startIndex) + " -editorpc -RenderProfile_Quality optimal -3dplatform d3d9", true, true, m_delegateMessagePumpCallback)) { return false; } FCE_Engine_AutoAcquireInput(true); //Editor.Init(); if (!Directory.Exists(PersonalPath)) { Directory.CreateDirectory(PersonalPath); } m_initialized = true; return true; }
private static extern bool InitDuniaEngine(IntPtr hInstance, IntPtr focusWnd, IntPtr renderWnd, [MarshalAs(UnmanagedType.LPStr)] string cmdLine, [MarshalAs(UnmanagedType.U1)] bool launchGame, [MarshalAs(UnmanagedType.U1)] bool forceGpuSynchronization, MessagePumpCallbackDelegate messagePumpCallback);