Bazaar developer reference

CvGlobals::getTerrainInfo(TerrainTypes)

Defined in
CvGlobals.cpp, line 2775
Class
CvGlobals
Hook name
CivHooks::CvGlobals_getTerrainInfo_with_TerrainTypes

Hooks

static bool BeforeCvGlobals_getTerrainInfo_with_TerrainTypes(CvGlobals* self, TerrainTypes eTerrainNum, CvTerrainInfo*& result);static void AfterCvGlobals_getTerrainInfo_with_TerrainTypes(CvGlobals* self, TerrainTypes eTerrainNum, CvTerrainInfo*& result);static CvTerrainInfo* ReplaceCvGlobals_getTerrainInfo_with_TerrainTypes(CvTerrainInfo* (*original)(CvGlobals*, TerrainTypes), CvGlobals* self, TerrainTypes eTerrainNum);CivRegisterBefore<CivHooks::CvGlobals_getTerrainInfo_with_TerrainTypes>(host, &BeforeCvGlobals_getTerrainInfo_with_TerrainTypes);CivRegisterAfter<CivHooks::CvGlobals_getTerrainInfo_with_TerrainTypes>(host, &AfterCvGlobals_getTerrainInfo_with_TerrainTypes);CivRegisterReplace<CivHooks::CvGlobals_getTerrainInfo_with_TerrainTypes>(host, &ReplaceCvGlobals_getTerrainInfo_with_TerrainTypes);

Code

2775CvTerrainInfo* CvGlobals::getTerrainInfo(TerrainTypes eTerrainNum)2776{2777	CvAssert(eTerrainNum > -1);2778	CvAssert(eTerrainNum < GC.getNumTerrainInfos());2779	if(eTerrainNum > -1 && eTerrainNum < (int)m_paTerrainInfo.size())2780		return m_paTerrainInfo[eTerrainNum];2781	else2782		return NULL;2783}

Calls

Called by