Bazaar developer reference

CvGame::countMajorCivsEverAlive() const

Defined in
CvGame.cpp, line 4011
Class
CvGame
Hook name
CivHooks::CvGame_countMajorCivsEverAlive

Hooks

static bool BeforeCvGame_countMajorCivsEverAlive(const CvGame* self, int& result);static void AfterCvGame_countMajorCivsEverAlive(const CvGame* self, int& result);static int ReplaceCvGame_countMajorCivsEverAlive(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_countMajorCivsEverAlive>(host, &BeforeCvGame_countMajorCivsEverAlive);CivRegisterAfter<CivHooks::CvGame_countMajorCivsEverAlive>(host, &AfterCvGame_countMajorCivsEverAlive);CivRegisterReplace<CivHooks::CvGame_countMajorCivsEverAlive>(host, &ReplaceCvGame_countMajorCivsEverAlive);

Code

4011int CvGame::countMajorCivsEverAlive() const4012{4013	int iCount;4014	int iI;40154016	iCount = 0;40174018	for(iI = 0; iI < MAX_CIV_PLAYERS; iI++)4019	{4020		if(GET_PLAYER((PlayerTypes)iI).isEverAlive())4021		{4022			if(!GET_PLAYER((PlayerTypes)iI).isMinorCiv())4023			{4024				iCount++;4025			}4026		}4027	}40284029	return iCount;4030}

Calls

Called by