![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
![]() |
Search the Wiki: |
ActionsPagesRecent Changes SearchCreate a new page: ![]() |
AE Modding Wiki : Functions : GetContinentSizeNew SLIC function: GetContinentSize(location_t): Gets the size (number of tiles) of the landmass / ocean (!) the location belongs to. //---------------------------------------------------------------------------- // // Authored : Martin Ghmann // // Name : Slic_GetContinentSize // // Description: Get the size of position's continent. // // Parameters : SlicArg 0: location // // Globals : g_theWorld // // Returns : SFN_ERROR : execution result // //---------------------------------------------------------------------------- SFN_ERROR Slic_GetContinentSize::Call(SlicArgList *args) { if(args->Count() != 1) return SFN_ERROR_NUM_ARGS; MapPoint pos; if(!args->GetPos(0, pos)) return SFN_ERROR_TYPE_ARGS; if(g_theWorld->IsWater(pos)){ m_result.m_int = g_theWorld->GetWaterContinentSize(g_theWorld->GetContinent(pos)); } else{ m_result.m_int = g_theWorld->GetLandContinentSize(g_theWorld->GetContinent(pos)); } return SFN_ERROR_OK; } Page last modified on June 11, 2009, at 02:22 PM |
![]() |
AE Modding Wiki built with PmWiki Design: BureauBert |