}  cout << "Exult V" << VERSION << "." << endl;   config = new Configuration; config->read_config_file(USER_CONFIGURATION_FILE);   config->value("config/disk/data_path",data_path,EXULT_DATADIR); cout << "Data path = " << data_path << endl; add_system_path("<DATA>", data_path.c_str()); if (!U7exists("<DATA>/exult.flx")) { add_system_path("<DATA>", EXULT_DATADIR); if (!U7exists("<DATA>/exult.flx")) { add_system_path("<DATA>", "data"); if(!U7exists("<DATA>/exult.flx")) {  cerr << "Could not find 'exult.flx' anywhere." << endl; exit(-1); } } } add_system_path("<STATIC>", "static"); add_system_path("<GAMEDAT>", "gamedat"); add_system_path("<SAVEGAME>", "savegame");   vector<string> vs=config->listkeys("config/disk/game",false); if(vs.size()==0) {  string data_directory; 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);
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;	// Read in configuration file        config = new Configuration;	config->read_config_file(USER_CONFIGURATION_FILE);	// Setup virtual directories	config->value("config/disk/data_path",data_path,EXULT_DATADIR);	cout << "Data path = " << data_path << endl;	add_system_path("<DATA>", data_path.c_str());	if (!U7exists("<DATA>/exult.flx"))		{		add_system_path("<DATA>", EXULT_DATADIR);		if (!U7exists("<DATA>/exult.flx"))			{			add_system_path("<DATA>", "data");			if(!U7exists("<DATA>/exult.flx"))				{				// We've tried them all...				cerr << "Could not find 'exult.flx' anywhere." << endl;					exit(-1);				}			}		}	add_system_path("<STATIC>", "static");	add_system_path("<GAMEDAT>", "gamedat");	add_system_path("<SAVEGAME>", "savegame");	// Convert from old format if needed	vector<string> vs=config->listkeys("config/disk/game",false);	if(vs.size()==0) {		// Convert from the older format		string data_directory;		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);	}	string	tracing;	config->value("config/debug/trace/intrinsics",tracing,"no");	if(tracing=="yes")		intrinsic_trace=true;	// Enable tracing of intrinsics	string uctrace;	config->value("config/debug/trace/usecode", uctrace,"no");	if (uctrace=="yes")		usecode_trace=true;	// Enable tracing of UC-instructions		#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	cheat.init();		Init();				// Create main window.	cheat.finish_init();	mouse = new Mouse(gwin);	mouse->set_shape(Mouse::hand);		int result = Play();		// start game//	delete config;			// free configuration object	return result;	}