Bazaar developer reference

CvPlot::IsAdjacentToFeature(FeatureTypes) const

Defined in
CvPlot.cpp, line 11936
Class
CvPlot
Hook name
CivHooks::CvPlot_IsAdjacentToFeature

Hooks

static bool BeforeCvPlot_IsAdjacentToFeature(const CvPlot* self, FeatureTypes iFeatureType, bool& result);static void AfterCvPlot_IsAdjacentToFeature(const CvPlot* self, FeatureTypes iFeatureType, bool& result);static bool ReplaceCvPlot_IsAdjacentToFeature(bool (*original)(const CvPlot*, FeatureTypes), const CvPlot* self, FeatureTypes iFeatureType);CivRegisterBefore<CivHooks::CvPlot_IsAdjacentToFeature>(host, &BeforeCvPlot_IsAdjacentToFeature);CivRegisterAfter<CivHooks::CvPlot_IsAdjacentToFeature>(host, &AfterCvPlot_IsAdjacentToFeature);CivRegisterReplace<CivHooks::CvPlot_IsAdjacentToFeature>(host, &ReplaceCvPlot_IsAdjacentToFeature);

Code

11936bool CvPlot::IsAdjacentToFeature(FeatureTypes iFeatureType) const11937{11938	int iX = getX(); int iY = getY();1193911940	for (int iDirection = 0; iDirection < NUM_DIRECTION_TYPES; iDirection++) {11941		CvPlot* pLoopPlot = plotDirection(iX, iY, (DirectionTypes) iDirection);1194211943		if (pLoopPlot != NULL && pLoopPlot->HasFeature(iFeatureType)) {11944			return true;11945		}11946	}1194711948	return false;11949}

Calls

Called by