cout << "Exult V" << VERSION << "." << endl << "Copyright (C) 2000 J. S. Freedman, Dancer Vesperman, " << endl << "                   Willem Jan Palenstijn, Tristan Tarrant, " << endl << "                   Max Horn, Luke Dunstan, Ryan Nunn" << endl; cout << "Low level graphics use the 'SDL' library."<< endl; cout << "2xSaI scaling filter contributed by Derek Liauw Kie Fa." << endl;
cout << "Exult V" << VERSION << "." << endl;
int main	(	int argc,	char *argv[]	)	{	bool	needhelp=false;	string	gamename("default");        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("-game",&gamename,"default");	// Process the args        parameters.process(argc,argv);	if(needhelp)		{		cerr << "Usage: exult [--help|-h|/?|/h] [-game GAMENAME] " << endl <<			"--help\t\tShow this information" << endl <<			"-game GAMENAME\tSet the game data name to play" << endl <<			"\t(refer to the documentation)" << endl;		exit(1);		}	cout << "Exult V" << VERSION << "." << endl <<	    "Copyright (C) 2000 J. S. Freedman, Dancer Vesperman, " << endl <<	    "                   Willem Jan Palenstijn, Tristan Tarrant, " << endl <<	    "                   Max Horn, Luke Dunstan, Ryan Nunn" << endl;	cout << "Low level graphics use the 'SDL' library."<< endl;	cout << "2xSaI scaling filter contributed by Derek Liauw Kie Fa."								<< endl;        config = new Configuration;	// Create configuration object	config->read_config_file(USER_CONFIGURATION_FILE);	audio = new Audio;	{	// Select the data directory	string	data_directory;	vector<string> vs=config->listkeys("config/disk/game",false);	if(vs.size()==0)		{#if DEBUG		cerr << "No game keys. Converting..." << endl;#endif		// Convert from the older format		config->value("config/disk/u7path",data_directory,".");		config->set("config/disk/game/blackgate/path",data_directory,true);		string	s("blackgate");		config->set("config/disk/game/blackgate/title",s,true);		vs.push_back(s);		}	if(gamename=="default")		{		// If the user didn't specify, start up the first game we can find.		gamename=vs[0];#if DEBUG		cerr << "Setting default game to " << gamename << endl;#endif		}	string d("config/disk/game/"),gametitle;	d+=gamename;	d+="/path";	config->value(d.c_str(),data_directory,".");	if(data_directory==".")		config->set("config/disk/game/blackgate/path",data_directory,true);	cout << "chdir to " << data_directory << endl;	chdir(data_directory.c_str());	d="config/disk/game/";	d+=gamename;	d+="/title";	config->value(d.c_str(),data_directory,"(unnamed)");	cout << "Loading game: " << data_directory << endl;	}	string	tracing;	config->value("config/debug/trace/intrinsics",tracing,"no");	if(tracing=="yes")		usecode_trace=true;	// Enable tracing of intrinsics	string  cheating;	config->value("config/gameplay/cheat",cheating,"yes");	if(cheating=="no")		cheat = false;#if USECODE_DEBUGGER	string	u_debugging;	config->value("config/debug/debugger/enable",u_debugging,"no");	if(u_debugging=="yes")		usecode_debugging=true;	// Enable usecode debugger	initialise_usecode_debugger();#endif	Init();				// Create main window.		mouse = new Mouse(gwin);	mouse->set_shape(Mouse::hand);		int result = Play();		// start game//	delete config;			// free configuration object	return result;	}