예제 #1
0
/*
   the main program
*/
int main( int argc, char *argv[])
{
   Credits( stdout);
   argv++;
   argc--;
   /* read command line options */
   ParseCommandLineOptions( argc, argv);

   /* load the Wad files */
   OpenMainWad( MainWad);
   if (PatchWads)
      while (PatchWads[ 0])
      {
	 OpenPatchWad( PatchWads[ 0]);
	 PatchWads++;
      }
   /* sanity check */
   CloseUnusedWadFiles();

   /* all systems go! */
   MainLoop();
   /* that's all, folks! */
   CloseWadFiles();
   exit( 0);
}
예제 #2
0
//////////////////////////////////////////////////////////
// WinDEUApp
// ---------
// Application instance intialisation. Read the INI file
// for default application options.
void WinDEUApp::InitInstance ()
{
	// Initialize and create MainWindow
	TApplication::InitInstance();

	// Retrieve module directory to construct help file full path
	if ( GetModuleFileName (HelpFileName, MAX_PATH) )
	{
		int i;
		for (i = strlen(HelpFileName) - 1;
			 (i >= 0) && (HelpFileName[i] != '\\');
			 i--)
			;

		HelpFileName[i+1] = '\0';

		strcat (HelpFileName, HelpName);
	}

	// Keyboard hook for F1 help
	hKeyboardHook = SetWindowsHookEx(WH_KEYBOARD,
									 KeyboardProc,
									 *this,
									 0);
	// Parse command line and INI file.
	InitWindeu(argc, argv, init_level);

// removed annoyances ARK
#if 0
	// Create and display credits for WinDEU
	CmHelpAbout();

	//RP moved from InitWinDEU
	if (Quieter == TRUE)
		Quiet = TRUE;
	if (Reminder == TRUE)
		FunnyMessage();
#endif

	/* load the wad files */
	// Don't load Doom WAD   ARK
#if 0
	OpenMainWad(MainWad);
	if (PatchWads)
		while (PatchWads[ 0])
		{
			OpenPatchWad( strupr( PatchWads[ 0]));
			PatchWads++;
		}
#endif

	/* sanity check */
	CloseUnusedWadFiles();

	// Load initial level if specified on command line
	if (init_level[0] != 0)
	{
		// Sets a new client window (the editor) and destroy
		// the old one (the main client)
		TMainFrame *MainFrame =
			TYPESAFE_DOWNCAST(MainWindow->GetApplication()->GetMainWindow(), TMainFrame);
		MainFrame->EditLevel (init_level, FALSE) ;
	}
}