10 #include "basetypes.h" 12 #include <unordered_map> 87 void preUnitsUpdate();
88 void postUnitsUpdate();
95 return mapTileHeight_;
98 static const unsigned tilesWidth = 256;
99 static const unsigned tilesHeight = 256;
101 Tile& getTile(
int walkX,
int walkY);
102 const Tile& getTile(
int walkX,
int walkY)
const;
103 Tile* tryGetTile(
int walkX,
int walkY);
104 const Tile* tryGetTile(
int walkX,
int walkY)
const;
109 void reserveArea(
const BuildType* type,
int walkX,
int walkY);
111 void unreserveArea(
const BuildType* type,
int walkX,
int walkY);
126 unsigned mapTileWidth_ = 0;
127 unsigned mapTileHeight_ = 0;
129 std::unordered_map<const Unit*, TileOccupyingBuilding>
Game state.
Definition: state.h:42
int FrameNum
Definition: basetypes.h:22
unsigned mapTileWidth() const
Definition: tilesinfo.h:90
int pixelX
Definition: tilesinfo.h:121
FrameNum expectsCreepUpdated_
When this tile is expected to have creep.
Definition: tilesinfo.h:47
Unit * building
The building that is currently occupying this tile.
Definition: tilesinfo.h:69
Represents and holds information about buildable types (units, upgrades, techs).
Definition: buildtype.h:36
bool buildable
Definition: tilesinfo.h:36
FrameNum lastSlowUpdate
Definition: tilesinfo.h:75
int pixelY
Definition: tilesinfo.h:122
bool hasCreep
Definition: tilesinfo.h:39
bool entirelyWalkable
Every walk tile within this tile is walkable.
Definition: tilesinfo.h:72
replayer::Unit Unit
Definition: state.h:36
int height
Definition: tilesinfo.h:73
int y
Y position of tile in walk tiles.
Definition: tilesinfo.h:34
const BuildType * type
Definition: tilesinfo.h:120
Represents a unit in the game.
Definition: unitsinfo.h:35
bool resourceDepotUnbuildable
Indicates that this tile is unbuildable for resource depots (too close to resources).
Definition: tilesinfo.h:58
bool reservedForResourceDepot
Indicates that this is a resource depot tile at an expansion, and should not be occupied by regular b...
Definition: tilesinfo.h:61
Definition: tilesinfo.h:118
FrameNum expectsCreepFrame_
Definition: tilesinfo.h:48
Manages and updates per-tile data.
Definition: tilesinfo.h:81
int x
X position of tile in walk tiles.
Definition: tilesinfo.h:32
Represents a tile on the map.
Definition: tilesinfo.h:29
int constexpr kForever
Definition: basetypes.h:37
std::vector< Tile * > tiles
Definition: tilesinfo.h:123
std::vector< Tile > tiles
All the tiles.
Definition: tilesinfo.h:115
FrameNum lastSeen
Definition: tilesinfo.h:74
bool reservedAsUnbuildable
Set by builderhelpers to help with planning building placement.
Definition: tilesinfo.h:38
Unit * u
Definition: tilesinfo.h:119
bool visible
Definition: tilesinfo.h:35
Main namespace for bot-related code.
Definition: areainfo.cpp:17
FrameNum expectsCreepBy() const
If this tile is expected to contain creep within a certain number of frames.
Definition: tilesinfo.cpp:442
unsigned mapTileHeight() const
Definition: tilesinfo.h:94
FrameNum blockedUntil
Special field that can be set if a particular tile should not be used for buildings until this frame...
Definition: tilesinfo.h:66
int lazyUpdateFrame
For lazily-updated info (at time of writing, just hasCreepIn): When this tile was last updated...
Definition: tilesinfo.h:43
std::unordered_map< const Unit *, TileOccupyingBuilding > tileOccupyingBuildings_
Definition: tilesinfo.h:130
bool reservedForGathering
Indicates that this tile is in the mineral line and that buildings should not be placed here...
Definition: tilesinfo.h:55