Bazaar developer reference

CvPlot::GetActiveFogOfWarMode() const

Defined in
CvPlot.cpp, line 550
Class
CvPlot
Hook name
CivHooks::CvPlot_GetActiveFogOfWarMode

Hooks

static bool BeforeCvPlot_GetActiveFogOfWarMode(const CvPlot* self, FogOfWarModeTypes& result);static void AfterCvPlot_GetActiveFogOfWarMode(const CvPlot* self, FogOfWarModeTypes& result);static FogOfWarModeTypes ReplaceCvPlot_GetActiveFogOfWarMode(FogOfWarModeTypes (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_GetActiveFogOfWarMode>(host, &BeforeCvPlot_GetActiveFogOfWarMode);CivRegisterAfter<CivHooks::CvPlot_GetActiveFogOfWarMode>(host, &AfterCvPlot_GetActiveFogOfWarMode);CivRegisterReplace<CivHooks::CvPlot_GetActiveFogOfWarMode>(host, &ReplaceCvPlot_GetActiveFogOfWarMode);

Code

550FogOfWarModeTypes CvPlot::GetActiveFogOfWarMode() const551{552	CvGame& Game = GC.getGame();553	const TeamTypes activeTeam = Game.getActiveTeam();554	CvAssert(activeTeam != NO_TEAM);555556	FogOfWarModeTypes eFOWMode = FOGOFWARMODE_UNEXPLORED;557558	bool bIsDebug = Game.isDebugMode();559	if(bIsDebug || activeTeam != NO_TEAM)560	{561		if(isRevealed(activeTeam, bIsDebug))562		{563			eFOWMode = (isVisible(activeTeam, bIsDebug))? FOGOFWARMODE_OFF : FOGOFWARMODE_NOVIS;564		}565	}566567	return eFOWMode;568}

Calls

Called by