Esempio n. 1
0
Launcher::Launcher(QStringList const & args)
{
  setObjectName("Launcher");
  
  initializeArguments(args);
  
  if( QFile::exists(arguments["settings"]) )
  { // try loading the settings XML file into a C++ representation
//     try
//     {
      xmlSettings = XML::SAI::configuration(arguments["settings"].toStdString());
//     }
//     catch(const xml_schema::Exception& e)
//     {
//       Q_CHECK_PTR( e.what() );
//       std::cerr << "error in Launcher(QStringList const &)"<< std::endl;
//       std::cerr << e.what() << std::endl;
//     }
    
    initializeFrames();
    loadBoundary();
    loadObstacles();
    initializeNodes();
    
    qDebug() << objectName() << ": Enjoy the show.\n\n\n";
    
  }
  else
  { // error handling
    //NOTE: qFatal() will _abort_ on a UNIX system!
    qFatal("%s: Cannot load settings from %s. (File does not seem to exist.)"
      ,objectName().toStdString().c_str()
      ,arguments["settings"].toStdString().c_str());
  }
}
Esempio n. 2
0
CHeroHandler::CHeroHandler()
{
	VLC->heroh = this;

	for (int i = 0; i < GameConstants::SKILL_QUANTITY; ++i)
	{
		VLC->modh->identifiers.registerObject("core", "skill", NSecondarySkill::names[i], i);
	}
	loadObstacles();
	loadTerrains();
	loadBallistics();
	loadExperience();
}