Esempio n. 1
0
void LanguageState::changeLanguage(const std::string &lang)
{
	std::stringstream ss;
	ss << _game->getResourcePack()->getFolder() << "Language/" << lang;
	Language *l = new Language();
	l->loadLng(ss.str());
	_game->setLanguage(l);
	_game->setState(new MainMenuState(_game));
}
Esempio n. 2
0
	/**
	 * Open Ufopaedia to test it without starting a whole game.
	 * @param game Pointer to actual game.
	 */
	void Ufopaedia::runStandalone(Game *game)
	{
		// set game language
		std::stringstream ss;
		ss << game->getResourcePack()->getFolder() << "Language/English.lng";
		Language *l = new Language();
		l->loadLng(ss.str());
		game->setLanguage(l);
		
		// init game
		game->setRuleset(new XcomRuleset());
		game->setSavedGame(game->getRuleset()->newSave(DIFF_BEGINNER));
		
		// open Ufopaedia
		open(game);
	}