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
std::vector::operator[]std::vector::size
Called by
- BuildRouteCost(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- InfluenceCost(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- CvDllGameContext::GetTerrainInfo(TerrainTypes)
- TerrainArrayHelpers::Write(FDataStream &, int *, int)
- TerrainArrayHelpers::WriteYieldArray(FDataStream &, int **, int)
- CvInfosSerializationHelper::Write(FDataStream &, const TerrainTypes)
- CvInfosSerializationHelper::WriteHashed(FDataStream &, const TerrainTypes)
- CvPlot::calculateNatureYield(YieldTypes, TeamTypes, bool) const
- CvPlot::canSeePlot(const CvPlot *, TeamTypes, int, DirectionTypes, DomainTypes) const
- CvPlot::defenseModifier(TeamTypes, bool, bool) const
- CvPlot::getBuildTime(BuildTypes, PlayerTypes) const
- CvPlot::getTurnDamage(bool, bool, bool, bool) const
- CvPlot::seeFromLevel(TeamTypes) const
- CvPlot::seeThroughLevel(bool) const
- CvPlot::setPlotType(PlotTypes, bool, bool, bool)
- CvPlot::setTerrainType(TerrainTypes, bool, bool)
- CvPlot::updateImpassable()
- CvCitySiteEvaluator::CanFound(CvPlot *, const CvPlayer *, bool) const
- CvTeam::processTech(TechTypes, int)
- CvUnit::AI_promotionValue(PromotionTypes)
- CvUnitMovement::GetCostsForMove(const CvUnit *, const CvPlot *, const CvPlot *, int, int &, int &, int &)
- CvWorldBuilderMapLoader::ValidateCoast()
- CvWorldBuilderMapLoader::ValidateTerrain()
- InitTypeDesc()