Bazaar developer reference

CvLandmass::GetCentroidY()

Defined in
CvMap.cpp, line 149
Class
CvLandmass
Hook name
CivHooks::CvLandmass_GetCentroidY

Hooks

static bool BeforeCvLandmass_GetCentroidY(CvLandmass* self, int& result);static void AfterCvLandmass_GetCentroidY(CvLandmass* self, int& result);static int ReplaceCvLandmass_GetCentroidY(int (*original)(CvLandmass*), CvLandmass* self);CivRegisterBefore<CivHooks::CvLandmass_GetCentroidY>(host, &BeforeCvLandmass_GetCentroidY);CivRegisterAfter<CivHooks::CvLandmass_GetCentroidY>(host, &AfterCvLandmass_GetCentroidY);CivRegisterReplace<CivHooks::CvLandmass_GetCentroidY>(host, &ReplaceCvLandmass_GetCentroidY);

Code

149int CvLandmass::GetCentroidY()150{151	if(m_iNumTiles > 0)152	{153		return m_iCentroidY / m_iNumTiles;154155	}156	return -1;157}

Called by