Bazaar developer reference

CvPlot::isAdjacent(const CvPlot *) const

Defined in
CvPlot.cpp, line 960
Class
CvPlot
Hook name
CivHooks::CvPlot_isAdjacent

Hooks

static bool BeforeCvPlot_isAdjacent(const CvPlot* self, const CvPlot* pPlot, bool& result);static void AfterCvPlot_isAdjacent(const CvPlot* self, const CvPlot* pPlot, bool& result);static bool ReplaceCvPlot_isAdjacent(bool (*original)(const CvPlot*, const CvPlot*), const CvPlot* self, const CvPlot* pPlot);CivRegisterBefore<CivHooks::CvPlot_isAdjacent>(host, &BeforeCvPlot_isAdjacent);CivRegisterAfter<CivHooks::CvPlot_isAdjacent>(host, &AfterCvPlot_isAdjacent);CivRegisterReplace<CivHooks::CvPlot_isAdjacent>(host, &ReplaceCvPlot_isAdjacent);

Code

960bool CvPlot::isAdjacent(const CvPlot* pPlot) const961{962	if(pPlot == NULL)963	{964		return false;965	}966967	CvPlot* pAdjacentPlot;968	int iI;969970	for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)971	{972		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));973974		if(pAdjacentPlot == pPlot)975		{976			return true;977		}978	}979980	return false;981}

Calls

Called by