Bazaar developer reference

CvLandmass::GetCentroidX()

Defined in
CvMap.cpp, line 138
Class
CvLandmass
Hook name
CivHooks::CvLandmass_GetCentroidX

Hooks

static bool BeforeCvLandmass_GetCentroidX(CvLandmass* self, int& result);static void AfterCvLandmass_GetCentroidX(CvLandmass* self, int& result);static int ReplaceCvLandmass_GetCentroidX(int (*original)(CvLandmass*), CvLandmass* self);CivRegisterBefore<CivHooks::CvLandmass_GetCentroidX>(host, &BeforeCvLandmass_GetCentroidX);CivRegisterAfter<CivHooks::CvLandmass_GetCentroidX>(host, &AfterCvLandmass_GetCentroidX);CivRegisterReplace<CivHooks::CvLandmass_GetCentroidX>(host, &ReplaceCvLandmass_GetCentroidX);

Code

138int CvLandmass::GetCentroidX()139{140	if(m_iNumTiles > 0)141	{142		return m_iCentroidX / m_iNumTiles;143144	}145	return -1;146}

Called by