Ejemplo n.º 1
0
/**
**  Cleanup modules.
**
**  Call each module to clean up.
*/
void CleanModules()
{
	EndReplayLog();
	CleanMessages();

	CleanIcons();
	CleanCursors();
	CleanUserInterface();
	CleanFonts();
	CleanTriggers();
	FreeAi();
	PlayerRaces.Clean();
	CleanConstructions();
	CleanDecorations();
	CleanMissiles();
	CleanUnits();
	CleanUnitTypes();
	CleanPlayers();
	CleanSelections();
	CleanGroups();
	CleanUpgrades();
	CleanDependencies();
	CleanButtons();
	CleanMissileTypes();
	Map.Clean();
	Map.CleanFogOfWar();
	CParticleManager::exit();
	CleanReplayLog();
	CleanSpells();
	FreePathfinder();

	UnitTypeVar.Init(); // internal script. should be to a better place, don't find for restart.
}
Ejemplo n.º 2
0
/**
**  Load a log file to replay a game
**
**  @param name  name of file to load.
*/
int LoadReplay(const std::string &name)
{
	CleanReplayLog();
	ReplayGameType = ReplaySinglePlayer;

	LuaLoadFile(name);

	NextLogCycle = ~0UL;
	if (!CommandLogDisabled) {
		CommandLogDisabled = true;
		DisabledLog = true;
	}
	GameObserve = true;
	InitReplay = 1;

	return 0;
}
Ejemplo n.º 3
0
/**
**  Cleanup modules.
**
**  Call each module to clean up.
*/
void CleanModules()
{
	EndReplayLog();
	CleanMessages();

	CleanIcons();
	CleanCursors();
	CleanUserInterface();
	CleanFonts();
	CTrigger::ClearTriggers();
	FreeAi();
	PlayerRaces.Clean();
	CAge::ClearAges();
	CCalendar::ClearCalendars();
	CCharacter::ClearCharacters();
	CCivilization::ClearCivilizations();
	CleanConstructions();
	CCurrency::ClearCurrencies();
	CleanDecorations();
	CDeity::ClearDeities();
	//Wyrmgus start
	CDialogue::ClearDialogues();
	CDeityDomain::ClearDeityDomains();
	CleanGrandStrategyEvents();
	//Wyrmgus end
	CHistoricalUnit::ClearHistoricalUnits();
	CMapTemplate::ClearMapTemplates();
	CleanMissiles();
	CPantheon::ClearPantheons();
	//Wyrmgus start
	CPlane::ClearPlanes();
	CleanProvinces();
	CleanQuests();
	CReligion::ClearReligions();
	CSchoolOfMagic::ClearSchoolsOfMagic();
	CSite::ClearSites();
	CleanTexts();
	CleanUniqueItems();
	//Wyrmgus end
	CTimeline::ClearTimelines();
	CleanUnits();
	CleanUnitTypes();
	CWorld::ClearWorlds();
	CleanPlayers();
	CleanSelections();
	CleanGroups();
	CleanUpgrades();
	CleanButtons();
	CButtonLevel::ClearButtonLevels();
	CleanMissileTypes();
	Map.Clean();
	Map.CleanFogOfWar();
	CTerrainType::ClearTerrainTypes();
	CTimeOfDay::ClearTimesOfDay();
	CTimeOfDaySchedule::ClearTimeOfDaySchedules();
	CSeason::ClearSeasons();
	CSeasonSchedule::ClearSeasonSchedules();
	CParticleManager::exit();
	CleanReplayLog();
	CSpell::ClearSpells();
	FreePathfinder();

	UnitTypeVar.Init(); // internal script. should be to a better place, don't find for restart.
}