parameters.declare("-nocrc",&ignore_crc,true);
int main	(	int argc,	char *argv[]	){#ifdef BEOS	// get exult path	int counti;	char datapath[256];	for (counti=strlen(argv[0]) ; argv[0][counti]!='/' ; counti--);	strncpy(datapath, argv[0], counti);	chdir(datapath);#endif	bool	needhelp=false;	bool	showversion=false;	int		result;	Args    parameters;	// Declare everything from the commandline that we're interested in.	parameters.declare("-h",&needhelp,true);	parameters.declare("--help",&needhelp,true);	parameters.declare("/?",&needhelp,true);	parameters.declare("/h",&needhelp,true);	parameters.declare("-bg",&run_bg,true);	parameters.declare("-si",&run_si,true);	parameters.declare("-v",&showversion,true);	parameters.declare("--version",&showversion,true);	parameters.declare("-game",&arg_gamename,"default");	parameters.declare("-buildmap",&arg_buildmap,-1);	// Process the args	parameters.process(argc,argv);	if(needhelp)	{		cerr << "Usage: exult [--help|-h|/?|/h] [-v|--version] [-bg|-si] [-game GAMENAME] [-buildmap 0|1|2]" << endl <<			"--help\t\tShow this information" << endl <<			"-bg\t\tSkip menu and run Black Gate" << endl <<			"-si\t\tSkip menu and run Serpent Isle" << endl <<			"--version\t\tShow version info" << endl <<			"-game GAMENAME\tSet the game data name to play" << endl <<			"\t(refer to the documentation)" << endl <<			"-buildmap\tCreate a fullsize map of the game world in u7map??.pcx" << endl <<			"\t(0 = all roofs, 1 = no level 2 roofs, 2 = no roofs)" << endl <<			"\t(WARNING: requires big amounts of RAM, HD space and time!)" << endl;					exit(1);	}		if (run_bg && run_si) {		cerr << "Error: You may only specify either -bg or -si!" << endl;		exit(1);	}	if(showversion) {		getVersionInfo(cerr);		return 0;	}		try	{		result = exult_main(argv[0]);	}	catch( const quit_exception & e )    {        result = 0;    }	catch( const exult_exception & e )	{		cerr << "============================" << endl <<			"An exception occured: " << endl << 			e.what() << endl << 			"errno: " << e.get_errno() << endl;		if( e.get_errno() != 0)			perror("Error Description");		cerr << "============================" << endl;	}		return result;}