CyMap
- INT calculatePathDistance (CyPlot pSource, CyPlot pDest)
finds the shortest passable path between two CyPlots and returns its length, or returns -1 if no such path exists. Note: the path must be all-land or all-water
- VOID erasePlots ()
() - erases the plots
- CyArea findBiggestArea (BOOL bWater)
CyArea* ()
- CyCity findCity (INT iX, INT iY, PlayerType eOwner, TeamType eTeam, BOOL bSameArea, BOOL bCoastalOnly, TeamType eTeamAtWarWith, DirectionType eDirection, CyCity pSkipCity)
CyCity* (int iX, int iY, int (PlayerTypes) eOwner = NO_PLAYER, int (TeamTypes) eTeam = NO_TEAM, bool bSameArea = true, bool bCoastalOnly = false, int (TeamTypes) eTeamAtWarWith = NO_TEAM, int (DirectionTypes) eDirection = NO_DIRECTION, CvCity* pSkipCity = NULL) - finds city
- CySelectionGroup findSelectionGroup (INT iX, INT iY, PlayerType eOwner, BOOL bReadyToSelect, BOOL bWorkers)
CvSelectionGroup* (int iX, int iY, int /*PlayerTypes*/ eOwner, bool bReadyToSelect, bool bWorkers)
- BOOL findWater (CyPlot pPlot, INT iRange, BOOL bFreshWater)
bool (CyPlot* pPlot, int iRange, bool bFreshWater)
- CyArea getArea (INT iID)
CyArea (iID) - get CyArea at iID
- INT getBottomLatitude ()
int () - bottom latitude (usually -90)
- ClimateType getClimate ()
ClimateTypes () - climate of the world
- CustomMapOptionType getCustomMapOption (INT iOption)
CustomMapOptionTypes () - user defined map setting at this option id
- INT getGridHeight ()
int () - the height of the map, in plots
- INT getGridWidth ()
int () - the width of the map, in plots
- INT getIndexAfterLastArea ()
int () - index for handling NULL areas
- INT getLandPlots ()
int () - total land plots
- INT getMapFractalFlags ()
int ()
- STRING getMapScriptName ()
wstring () - name of the map script
- INT getNextRiverID ()
int ()
- INT getNumAreas ()
int () - total areas
- INT getNumBonuses (BonusType eIndex)
int () - total bonuses
- INT getNumBonusesOnLand (BonusType eIndex)
int () - total bonuses on land plots
- INT getNumCustomMapOptions ()
int () - number of custom map settings
- INT getNumLandAreas ()
int () - total land areas
- INT getOwnedPlots ()
int () - total owned plots
- SeaLevelType getSeaLevel ()
SeaLevelTypes () - sealevel of the world
- INT getTopLatitude ()
int () - top latitude (usually 90)
- WorldSizeType getWorldSize ()
WorldSizeTypes () - size of the world
- VOID incrementNextRiverID ()
void ()
- BOOL isNone ()
bool () - valid CyMap() interface
- BOOL isPlot (INT iX, INT iY)
bool (iX,iY) - is (iX, iY) a valid plot?
- BOOL isWrapX ()
bool () - whether the map wraps in the X axis
- BOOL isWrapY ()
bool () - whether the map wraps in the Y axis
- INT numPlots ()
int () - total plots in the map
- CyPlot plot (INT iX, INT iY)
CyPlot (iX,iY) - get CyPlot at (iX,iY)
- CyPlot plotByIndex (INT iIndex)
CyPlot (iIndex) - get a plot by its Index
- INT plotNum (INT iX, INT iY)
int (iX,iY) - the index for a given plot
- INT plotX (INT iIndex)
int (iIndex) - given the index of a plot, returns its X coordinate
- INT plotY (INT iIndex)
int (iIndex) - given the index of a plot, returns its Y coordinate
- CyPlot pointToPlot (FLOAT fX, FLOAT fY)
- VOID rebuild (INT iGridW, INT iGridH, INT iTopLatitude, INT iBottomLatitude, BOOL bWrapX, BOOL bWrapY, WorldSizeType eWorldSize, ClimateType eClimate, SeaLevelType eSeaLevel, INT iNumCustomMapOptions, CustomMapOptionType aeCustomMapOptions)
used to initialize the map during WorldBuilder load
- VOID recalculateAreas ()
void () - Recalculates the areaID for each plot. Should be preceded by CyMap.setPlotTypes(...)
- VOID regenerateGameElements ()
used to regenerate everything but the terrain and height maps
- VOID resetPathDistance ()
void ()
- CyPlot sPlot (INT iX, INT iY)
CyPlot (iX,iY) - static - get CyPlot at (iX,iY)
- CyPlot sPlotByIndex (INT iIndex)
CyPlot (iIndex) - static - get plot by iIndex
- VOID setAllPlotTypes (PlotType ePlotType)
void (int /*PlotTypes*/ ePlotType) - sets all plots to ePlotType
- VOID setRevealedPlots (TeamType eTeam, BOOL bNewValue, BOOL bTerrainOnly)
void (int /*TeamTypes*/ eTeam, bool bNewValue, bool bTerrainOnly) - reveals the plots to eTeam
- CyPlot syncRandPlot (INT iFlags, INT iArea, INT iMinUnitDistance, INT iTimeout)
CyPlot* (iFlags,iArea,iMinUnitDistance,iTimeout) - random plot based on conditions
- VOID updateFog ()
void ()
- VOID updateMinOriginalStartDist (CyArea pArea)
void (CyArea* pArea)
- VOID updateMinimapColor ()
void ()
- VOID updateVisibility ()
() - updates the plots visibility