Bazaar developer reference

CvGame::countCivTeamsAlive() const

Defined in
CvGame.cpp, line 3841
Class
CvGame
Hook name
CivHooks::CvGame_countCivTeamsAlive

Hooks

static bool BeforeCvGame_countCivTeamsAlive(const CvGame* self, int& result);static void AfterCvGame_countCivTeamsAlive(const CvGame* self, int& result);static int ReplaceCvGame_countCivTeamsAlive(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_countCivTeamsAlive>(host, &BeforeCvGame_countCivTeamsAlive);CivRegisterAfter<CivHooks::CvGame_countCivTeamsAlive>(host, &AfterCvGame_countCivTeamsAlive);CivRegisterReplace<CivHooks::CvGame_countCivTeamsAlive>(host, &ReplaceCvGame_countCivTeamsAlive);

Code

3841int CvGame::countCivTeamsAlive() const3842{3843	int iCount;3844	int iI;38453846	iCount = 0;38473848	for(iI = 0; iI < MAX_CIV_TEAMS; iI++)3849	{3850		if(GET_TEAM((TeamTypes)iI).isAlive())3851		{3852			iCount++;3853		}3854	}38553856	return iCount;3857}

Calls

Called by