Bazaar developer reference

CvPlot::isRiverCrossingFlowClockwise(DirectionTypes) const

Defined in
CvPlot.cpp, line 1262
Class
CvPlot
Hook name
CivHooks::CvPlot_isRiverCrossingFlowClockwise

Hooks

static bool BeforeCvPlot_isRiverCrossingFlowClockwise(const CvPlot* self, DirectionTypes eDirection, bool& result);static void AfterCvPlot_isRiverCrossingFlowClockwise(const CvPlot* self, DirectionTypes eDirection, bool& result);static bool ReplaceCvPlot_isRiverCrossingFlowClockwise(bool (*original)(const CvPlot*, DirectionTypes), const CvPlot* self, DirectionTypes eDirection);CivRegisterBefore<CivHooks::CvPlot_isRiverCrossingFlowClockwise>(host, &BeforeCvPlot_isRiverCrossingFlowClockwise);CivRegisterAfter<CivHooks::CvPlot_isRiverCrossingFlowClockwise>(host, &AfterCvPlot_isRiverCrossingFlowClockwise);CivRegisterReplace<CivHooks::CvPlot_isRiverCrossingFlowClockwise>(host, &ReplaceCvPlot_isRiverCrossingFlowClockwise);

Code

1262bool CvPlot::isRiverCrossingFlowClockwise(DirectionTypes eDirection) const1263{1264	CvPlot* pPlot;1265	switch(eDirection)1266	{1267	case DIRECTION_NORTHEAST:1268		pPlot = plotDirection(getX(), getY(), DIRECTION_NORTHEAST);1269		if(pPlot != NULL)1270		{1271			return (pPlot->getRiverSWFlowDirection() == FLOWDIRECTION_SOUTHEAST);1272		}1273		break;1274	case DIRECTION_EAST:1275		return (getRiverEFlowDirection() == FLOWDIRECTION_SOUTH);1276		break;1277	case DIRECTION_SOUTHEAST:1278		return (getRiverSEFlowDirection() == FLOWDIRECTION_SOUTHWEST);1279		break;1280	case DIRECTION_SOUTHWEST:1281		return (getRiverSWFlowDirection() == FLOWDIRECTION_NORTHWEST);1282		break;1283	case DIRECTION_WEST:1284		pPlot = plotDirection(getX(), getY(), DIRECTION_WEST);1285		if(pPlot != NULL)1286		{1287			return (pPlot->getRiverEFlowDirection() == FLOWDIRECTION_NORTH);1288		}1289		break;1290	case DIRECTION_NORTHWEST:1291		pPlot = plotDirection(getX(), getY(), DIRECTION_NORTHWEST);1292		if(pPlot != NULL)1293		{1294			return (pPlot->getRiverSEFlowDirection() == FLOWDIRECTION_NORTHEAST);1295		}1296		break;1297	default:1298		CvAssert(false);1299		break;1300	}13011302	return false;1303}

Calls

Called by