CvGame::uninit()
- Defined in
- CvGame.cpp, line 942
- Class
- CvGame
- Hook name
CivHooks::CvGame_uninit
Hooks
static bool BeforeCvGame_uninit(CvGame* self);static void AfterCvGame_uninit(CvGame* self);static void ReplaceCvGame_uninit(void (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_uninit>(host, &BeforeCvGame_uninit);CivRegisterAfter<CivHooks::CvGame_uninit>(host, &AfterCvGame_uninit);CivRegisterReplace<CivHooks::CvGame_uninit>(host, &ReplaceCvGame_uninit);
Code
942void CvGame::uninit()943{944 CvGoodyHuts::Uninit();945 CvBarbarians::Uninit();946947 SAFE_DELETE_ARRAY(m_paiUnitCreatedCount);948 SAFE_DELETE_ARRAY(m_paiUnitClassCreatedCount);949 SAFE_DELETE_ARRAY(m_paiBuildingClassCreatedCount);950 SAFE_DELETE_ARRAY(m_paiProjectCreatedCount);951 SAFE_DELETE_ARRAY(m_paiVoteOutcome);952 SAFE_DELETE_ARRAY(m_aiSecretaryGeneralTimer);953 SAFE_DELETE_ARRAY(m_aiVoteTimer);954 SAFE_DELETE_ARRAY(m_aiDiploVote);955 SAFE_DELETE_ARRAY(m_aiVotesCast);956 SAFE_DELETE_ARRAY(m_aiPreviousVotesCast);957 SAFE_DELETE_ARRAY(m_aiNumVotesForTeam);958 SAFE_DELETE_ARRAY(m_aiTeamCompetitionWinnersScratchPad);959960 SAFE_DELETE_ARRAY(m_pabSpecialUnitValid);961962 if(m_ppaaiTeamVictoryRank != NULL)963 {964 for(int iI = 0; iI < GC.getNumVictoryInfos(); iI++)965 {966 SAFE_DELETE_ARRAY(m_ppaaiTeamVictoryRank[iI]);967 }968 SAFE_DELETE_ARRAY(m_ppaaiTeamVictoryRank);969 }970971 m_aszDestroyedCities.clear();972 m_aszGreatPeopleBorn.clear();973974 m_voteSelections.Uninit();975 m_votesTriggered.Uninit();976977 m_mapRand.uninit();978 m_jonRand.uninit();979980 clearReplayMessageMap();981982 m_aPlotExtraYields.clear();983 m_aPlotExtraCosts.clear();984985 SAFE_DELETE(m_pDiploResponseQuery);986987 SAFE_DELETE(m_pSettlerSiteEvaluator);988 SAFE_DELETE(m_pStartSiteEvaluator);989 SAFE_DELETE(m_pStartPositioner);990 SAFE_DELETE(m_pGameReligions);991 SAFE_DELETE(m_pGameCulture);992 SAFE_DELETE(m_pGameLeagues);993 SAFE_DELETE(m_pGameTrade);994 SAFE_DELETE(m_pTacticalMap);995996 SAFE_DELETE(m_pAdvisorCounsel);997 SAFE_DELETE(m_pAdvisorRecommender);998999 m_bForceEndingTurn = false;10001001 m_lastTurnAICivsProcessed = -1;1002 m_iEndTurnMessagesSent = 0;1003 m_iElapsedGameTurns = 0;1004 m_iStartTurn = 0;1005 m_iWinningTurn = 0;1006 m_iStartYear = 0;1007 m_iEstimateEndTurn = 0;1008 m_iDefaultEstimateEndTurn = 0;1009 m_iTurnSlice = 0;1010 m_iCutoffSlice = 0;1011 m_iNumCities = 0;1012 m_iTotalPopulation = 0;1013 m_iNoNukesCount = 0;1014 m_iNukesExploded = 0;1015 m_iMaxPopulation = 0;1016 m_iUnused1 = 0;1017 m_iUnused2 = 0;1018 m_iUnused3 = 0;1019 m_iInitPopulation = 0;1020 m_iInitLand = 0;1021 m_iInitTech = 0;1022 m_iInitWonders = 0;1023 m_iAIAutoPlay = 0;1024 m_iTotalReligionTechCost = 0;1025 m_iCachedWorldReligionTechProgress = 0;1026 m_iUnitedNationsCountdown = 0;1027 m_iNumVictoryVotesTallied = 0;1028 m_iNumVictoryVotesExpected = 0;1029 m_iVotesNeededForDiploVictory = 0;1030 m_iMapScoreMod = 0;10311032 m_uiInitialTime = 0;10331034 m_bScoreDirty = false;1035 m_bCircumnavigated = false;1036 m_bDebugMode = false;1037 m_bDebugModeCache = false;1038 m_bFOW = true;1039 m_bFinalInitialized = false;1040 m_eWaitDiploPlayer = NO_PLAYER;1041 m_bPbemTurnSent = false;1042 m_bHotPbemBetweenTurns = false;1043 m_bPlayerOptionsSent = false;1044 m_bNukesValid = false;1045 m_bEndGameTechResearched = false;1046 m_bTunerEverConnected = false;1047 m_bTutorialEverAttacked = false;1048 m_bStaticTutorialActive = false;1049 m_bEverRightClickMoved = false;1050 m_bCombatWarned = false;1051 m_bArchaeologyTriggered = false;10521053 m_eHandicap = NO_HANDICAP;1054 m_ePausePlayer = NO_PLAYER;1055 m_eAIAutoPlayReturnPlayer = NO_PLAYER;1056 m_eBestLandUnit = NO_UNIT;1057 m_eWinner = NO_TEAM;1058 m_eVictory = NO_VICTORY;1059 m_eGameState = GAMESTATE_ON;1060 m_eBestWondersPlayer = NO_PLAYER;1061 m_eBestPoliciesPlayer = NO_PLAYER;1062 m_eBestGreatPeoplePlayer = NO_PLAYER;1063 m_eReligionTech = NO_TECH;1064 m_eIndustrialRoute = NO_ROUTE;10651066 m_strScriptData = "";1067 m_iEarliestBarbarianReleaseTurn = 0;10681069 for(int iI = 0; iI < MAX_PLAYERS; iI++)1070 {1071 m_aiEndTurnMessagesReceived[iI] = 0;1072 m_aiRankPlayer[iI] = 0;1073 m_aiPlayerRank[iI] = 0;1074 m_aiPlayerScore[iI] = 0;1075 }10761077 for(int iI = 0; iI < MAX_TEAMS; iI++)1078 {1079 m_aiRankTeam[iI] = 0;1080 m_aiTeamRank[iI] = 0;1081 m_aiTeamScore[iI] = 0;1082 }10831084 m_iLastMouseoverUnitID = 0;10851086 CvCityManager::Shutdown();1087}
Calls
- CvBarbarians::Uninit()
- CvCityManager::Shutdown()
- CvGame::clearReplayMessageMap()
- CvGlobals::getNumVictoryInfos()
- CvGoodyHuts::Uninit()
- CvRandom::uninit()
CvString::operator=FFreeListTrashArray::UninitFFreeListTrashArray::UninitSAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETE_ARRAYSAFE_DELETE_ARRAYSAFE_DELETE_ARRAYSAFE_DELETE_ARRAYstd::vector::clearstd::vector::clearstd::vector::clear