#include <mapfield.h>
Public Types | |
| typedef list< Mine > | MineContainer |
| typedef vector< ::Object > | ObjectContainer |
Public Member Functions | |
| MapField (GameMap *gamemap_) | |
| void | operator= (const MapField &f) |
| void | setMap (GameMap *gamemap_) |
| GameMap * | getMap () const |
| const TerrainType * | getTerrainType () const |
| returns the terrain of the field | |
| void | changeTerrainType (const TerrainType *terrain) |
| changes the terrain type to a new one; weather is not changed | |
| int | getMineralMaterial () const |
| int | getMineralFuel () const |
| void | setMineralMaterial (int material) |
| void | setMineralFuel (int fuel) |
| Vehicle * | getVehicle () const |
| Mine & | getMine (int n) |
| returns the nth mine. This function should only be used by legacy code; new code should store an iterator instead of an index | |
| bool | addobject (const ObjectType *obj, int dir=-1, bool force=false, ObjectRemovalStrategy *objectRemovalStrategy=NULL) |
| add an object to the field | |
| bool | removeObject (const ObjectType *obj, bool force=false, ObjectRemovalStrategy *objectRemovalStrategy=NULL) |
| removes all objects of the given type from the field | |
| void | sortobjects (void) |
| sorts the objects. Since objects can be on different levels of height, the lower one must be displayed first | |
| Object * | checkForObject (const ObjectType *o) |
| checks if there are objects from the given type on the field and returns them | |
| void | deleteeverything (void) |
| deletes everything placed on the field | |
| void | setparams (ObjectRemovalStrategy *objectRemovalStrategy) |
| recalculates the terrain properties, movemalus etc from the terraintype and the objects, | |
| void | setparams () |
| uses the SimpleObjectRemoval strategy | |
| int | getdefensebonus (void) |
| the defense bonus that unit get when they are attacked | |
| int | getattackbonus (void) |
| the attack bonus that unit get when they are attacking | |
| int | getWeather () |
| the weather that is on this field | |
| void | setWeather (int weather) |
| ASCString | getName () |
| int | getjamming (void) |
| the radar jamming that is on this field | |
| int | getmovemalus (const Vehicle *veh) |
| int | getmovemalus (int type) |
| int | mineattacks (const Vehicle *veh) |
| can any of the mines on this field attack this unit | |
| int | mineowner (void) |
| the player who placed the mines on this field. | |
| bool | unitHere (const Vehicle *veh) |
| checks if the unit is standing on this field. Since units are being cloned for some checks, this method should be used instead of comparing the pointers to the unit | |
| ContainerBase * | getContainer () |
| returns a pointer to the ContainerBase of the field or NULL if there is none | |
| const ContainerBase * | getContainer () const |
| Building * | getBuildingEntrance () |
| returns the building if there is one with its entrance on this field | |
| void | removeBuilding () |
| if there is a building on the field, the building is deleted (may affect othere fields too, depending on building size) | |
| void | removeUnit () |
| if there is a unit on the field, the unit will be deleted | |
| bool | putmine (int owner, MineTypes typ, int strength) |
| put a mine of type typ for player owner and a punch of strength on the field. Strength is an absolute value (unlike the basestrength of a mine or the punch of the mine-weapon, which are just factors) | |
| void | removemine (int num) |
| removes a mine | |
| void | endRound (int turn) |
| void | setVisibility (VisibilityStates valtoset, int actplayer) |
| The visibility status for all players is stored in a bitmapped variable. | |
| VisibilityStates | getVisibility (int actplayer) |
| int | getx () |
| int | gety () |
| MapCoordinate | getPosition () |
| int | getMemoryFootprint () const |
| ~MapField () | |
Static Public Member Functions | |
| static void | resetView (GameMap *gamemap, int playersToReset) |
Public Attributes | |
| TerrainType::Weather * | typ |
| the terraintype of the field | |
| char | fuel |
| mineral resources on this field. | |
| char | material |
| Uint16 | visible |
| can this field be seen be the player. Variable is bitmapped; two bits for each player. These two bits can have the states defined in VisibilityStates | |
| int | viewbonus |
| units standing on this object will get a bonus to their view | |
| Vehicle * | vehicle |
| Vehicle * | secondvehicle |
| two units and the same field are only allowed temporary during movement | |
| Building * | building |
| Resourceview * | resourceview |
| the mineral resources that were seen by a player on this field; since the actual amount may have decreased since the player looked, this value is not identical to the fuel and material fields. | |
| MineContainer | mines |
| ObjectContainer | objects |
| TerrainBits | bdt |
| the terraintype properties. They determine which units can move over the field. This variable is recalculated from the terraintype and objects each time something on the field changes (setparams) | |
| int | connection |
| are any events connected to this field | |
| MapField::View | view [8] |
| some variables for the viewcalculation algorithm. see viewcalculation.cpp for details | |
| char | temp |
| char | temp2 |
| struct { | |
| char temp | |
| char temp2 | |
| } | a |
| Uint16 | tempw |
| union { | |
| struct { | |
| char temp | |
| char temp2 | |
| } a | |
| Uint16 tempw | |
| }; | |
| Various algorithms need to store some information in the fields they process. These variables are used for this. | |
| int | temp3 |
| int | temp4 |
Protected Member Functions | |
| MapField () | |
Friends | |
| class | GameMap |
Classes | |
| class | ObjectRemovalStrategy |
| Interface for removing objects from a field when it turns out that they can no longer exist. More... | |
| struct | Resourceview |
| struct | View |
| some variables for the viewcalculation algorithm. see viewcalculation.cpp for details More... | |
Definition at line 26 of file mapfield.h.
| typedef list<Mine> MapField::MineContainer |
Definition at line 108 of file mapfield.h.
| typedef vector< ::Object> MapField::ObjectContainer |
Definition at line 115 of file mapfield.h.
| MapField::MapField | ( | ) | [protected] |
Definition at line 40 of file mapfield.cpp.
| MapField::MapField | ( | GameMap * | gamemap_ | ) |
| MapField::~MapField | ( | ) |
| void MapField::operator= | ( | const MapField & | f | ) |
| void MapField::setMap | ( | GameMap * | gamemap_ | ) | [inline] |
Definition at line 36 of file mapfield.h.
Referenced by GameMap::allocateFields(), generatemap(), MapField(), and GameMap::resize().
| GameMap* MapField::getMap | ( | void | ) | const [inline] |
Definition at line 37 of file mapfield.h.
Referenced by fieldVisibility(), fieldvisiblenow(), and ActionObjectRemovalStrategy::removeObject().
| const TerrainType * MapField::getTerrainType | ( | ) | const |
returns the terrain of the field
Definition at line 161 of file mapfield.cpp.
References TerrainType::Weather::terraintype, and typ.
| void MapField::changeTerrainType | ( | const TerrainType * | terrain | ) |
changes the terrain type to a new one; weather is not changed
Definition at line 166 of file mapfield.cpp.
References getWeather(), setparams(), typ, and TerrainType::weather.
| int MapField::getMineralMaterial | ( | ) | const |
| int MapField::getMineralFuel | ( | ) | const |
| void MapField::setMineralMaterial | ( | int | material | ) |
Definition at line 76 of file mapfield.cpp.
| void MapField::setMineralFuel | ( | int | fuel | ) |
Definition at line 86 of file mapfield.cpp.
| Vehicle* MapField::getVehicle | ( | ) | const [inline] |
Definition at line 86 of file mapfield.h.
References secondvehicle, and vehicle.
Referenced by attackpossible(), calcvisibilityfield(), AnyUnitEntersPolygon::fieldOperator(), and SpecificUnitEntersPolygon::fieldOperator().
| Mine & MapField::getMine | ( | int | n | ) |
returns the nth mine. This function should only be used by legacy code; new code should store an iterator instead of an index
Definition at line 188 of file mapfield.cpp.
References mines.
Referenced by copyFieldStep2(), and tmineattacksunit::setup().
| bool MapField::addobject | ( | const ObjectType * | obj, | |
| int | dir = -1, |
|||
| bool | force = false, |
|||
| ObjectRemovalStrategy * | objectRemovalStrategy = NULL | |||
| ) |
add an object to the field
| obj | The object type | |
| dir | The direction of the object type; -1 to use default direction | |
| force | Put the object there even if it cannot normally be placed on this terrain |
Definition at line 196 of file mapfield.cpp.
References ObjectType::buildable(), calculateobject(), checkForObject(), Object::dir, getx(), gety(), ObjectType::lifetime, AgeableItem::lifetimer, objects, setparams(), and sortobjects().
Referenced by copyFieldStep2(), trunreplay::execnextreplaymove(), AddObject::fieldOperator(), ObjectItem::place(), placeObject(), SpawnObject::runAction(), and RemoveObject::undoAction().
| bool MapField::removeObject | ( | const ObjectType * | obj, | |
| bool | force = false, |
|||
| ObjectRemovalStrategy * | objectRemovalStrategy = NULL | |||
| ) |
removes all objects of the given type from the field
| obj | the object type to remove | |
| force | remove the object even if there are obstacles on the field (like a building standing on the object) |
Definition at line 240 of file mapfield.cpp.
References GameMap::actplayer, building, calculateobject(), getx(), gety(), objects, setparams(), and vehicle.
Referenced by checkobjectsforremoval(), clearField(), copyFieldStep1(), execaction(), trunreplay::execnextreplaymove(), ObjectItem::remove(), RemoveObject::runAction(), and SpawnObject::undoAction().
| void MapField::sortobjects | ( | void | ) |
sorts the objects. Since objects can be on different levels of height, the lower one must be displayed first
Definition at line 413 of file mapfield.cpp.
References compareObjectHeight(), and objects.
Referenced by addobject(), and tspfldloaders::readfields().
| Object * MapField::checkForObject | ( | const ObjectType * | o | ) |
checks if there are objects from the given type on the field and returns them
Definition at line 625 of file mapfield.cpp.
References objects.
Referenced by addobject(), ForestCalculation::calculateforest(), calculateobject(), ForestCalculation::Smoothing::GetNeighbourMask(), PipeLayer::paintSingleField(), placeObject(), ObjectItem::remove(), SpawnObject::runAction(), RemoveObject::runAction(), PutObjectCommand::setTarget(), Vehicle::spawnMoveObjects(), testAttack2(), testObjectConstruction1(), testObjectRemoval(), SpawnObject::undoAction(), and RemoveObject::undoAction().
| void MapField::deleteeverything | ( | void | ) |
deletes everything placed on the field
Definition at line 279 of file mapfield.cpp.
References building, setparams(), and vehicle.
Referenced by copyFieldStep1().
| void MapField::setparams | ( | ObjectRemovalStrategy * | objectRemovalStrategy | ) |
recalculates the terrain properties, movemalus etc from the terraintype and the objects,
Definition at line 582 of file mapfield.cpp.
References TerrainType::Weather::art, bdt, building, cbbuildingentry, cgp_objectsDestroyedByTerrain, cmovemalitypenum, BuildingType::entry, fatalError(), Building::getField(), GameMap::getgameparameter(), getTerrainBitType(), getWeather(), getx(), gety(), TerrainType::id, minmalq, TerrainType::Weather::move_malus, objects, MapField::ObjectRemovalStrategy::removeObject(), setparams(), TerrainType::Weather::terraintype, Building::typ, typ, and viewbonus.
Referenced by GameMap::allocateFields(), tspfldloaders::chainitems(), RemoveAllObjects::fieldOperator(), AddObject::fieldOperator(), MapChange::fieldOperator(), generatemap(), TerrainItem::place(), placeTerrain(), WeatherField::reset(), tmapgenerator::setmap(), and WeatherField::update().
| void MapField::setparams | ( | ) |
uses the SimpleObjectRemoval strategy
Definition at line 576 of file mapfield.cpp.
Referenced by addobject(), changeTerrainType(), deleteeverything(), endRound(), removeObject(), setparams(), and setWeather().
| int MapField::getdefensebonus | ( | void | ) |
the defense bonus that unit get when they are attacked
Definition at line 483 of file mapfield.cpp.
References a, TerrainType::Weather::defensebonus, objects, and typ.
Referenced by DashboardPanel::eval(), and viewterraininfo().
| int MapField::getattackbonus | ( | void | ) |
the attack bonus that unit get when they are attacking
Definition at line 467 of file mapfield.cpp.
References a, TerrainType::Weather::attackbonus, objects, and typ.
Referenced by DashboardPanel::eval(), and viewterraininfo().
| int MapField::getWeather | ( | ) |
the weather that is on this field
Definition at line 347 of file mapfield.cpp.
References cwettertypennum, TerrainType::Weather::terraintype, typ, and TerrainType::weather.
Referenced by ObjectType::buildable(), changeTerrainType(), copyFieldStep1(), MapChange::fieldOperator(), Building::getPicture(), DashboardPanel::painter(), MapRenderer::paintSingleField(), setparams(), OverviewMapHolder::updateField(), and viewterraininfo().
| void MapField::setWeather | ( | int | weather | ) |
Definition at line 357 of file mapfield.cpp.
References cwettertypennum, setparams(), TerrainType::Weather::terraintype, typ, and TerrainType::weather.
Referenced by copyFieldStep1(), WeatherChange::fieldOperator(), TerrainItem::place(), placeTerrain(), and setweatherall().
| ASCString MapField::getName | ( | ) |
Definition at line 499 of file mapfield.cpp.
References a, ObjectType::AddToTerrain, TerrainType::name, objects, ObjectType::ReplaceTerrain, TerrainType::Weather::terraintype, and typ.
| int MapField::getjamming | ( | void | ) |
the radar jamming that is on this field
Definition at line 514 of file mapfield.cpp.
References a, TerrainType::Weather::basicjamming, objects, and typ.
Referenced by DashboardPanel::eval(), VisibilityLayer::paintSingleField(), tdrawgettempline::putpix8(), and viewterraininfo().
| int MapField::getmovemalus | ( | const Vehicle * | veh | ) |
Definition at line 529 of file mapfield.cpp.
References ContainerBase::color, fatalError(), getx(), gety(), TerrainType::id, mine_movemalus_increase, mineowner(), mines, minmalq, VehicleType::movemalustyp, TerrainType::Weather::terraintype, typ, and Vehicle::typ.
Referenced by calcMoveMalus(), AStar::getDistance(), and viewterraininfo().
| int MapField::getmovemalus | ( | int | type | ) |
Definition at line 550 of file mapfield.cpp.
| int MapField::mineattacks | ( | const Vehicle * | veh | ) |
can any of the mines on this field attack this unit
Definition at line 178 of file mapfield.cpp.
References mines.
Referenced by AntiMineAStar3D::getMoveCost(), and MoveUnit::runAction().
| int MapField::mineowner | ( | void | ) |
the player who placed the mines on this field.
Definition at line 431 of file mapfield.cpp.
References mines.
Referenced by tplayerchange::anzeige(), calcvisibilityfield(), getmovemalus(), putmine(), and MoveUnit::runAction().
| bool MapField::unitHere | ( | const Vehicle * | veh | ) |
checks if the unit is standing on this field. Since units are being cloned for some checks, this method should be used instead of comparing the pointers to the unit
Definition at line 295 of file mapfield.cpp.
References Vehicle::networkid, and vehicle.
Referenced by Vehicle::canMove(), Vehicle::endOwnTurn(), AStar3D::findPath(), AStar::findPath(), and Vehicle::getPosition3D().
| ContainerBase * MapField::getContainer | ( | ) |
returns a pointer to the ContainerBase of the field or NULL if there is none
Definition at line 315 of file mapfield.cpp.
References building, and vehicle.
Referenced by ContextMenu::ContainerProduction::available(), ContextMenu::ContainerCargo::available(), ContextMenu::ContainerProperties::available(), GuiFunctions::SelfDestructIcon::available(), GuiFunctions::RefuelUnitCommand::available(), GuiFunctions::OpenContainer::available(), calcMoveMalus(), Vehicle::canMove(), NewGuiHost::evalCursor(), trunreplay::execnextreplaymove(), GuiFunctions::SelfDestructIcon::execute(), GuiFunctions::RefuelUnitDialogCommand::execute(), GuiFunctions::OpenContainer::execute(), AStar3D::findPath(), GameMap::getUnit(), giveunitaway(), tgiveunitawaydlg::init(), ContainerInfoLayer::paintSingleField(), tgiveunitawaydlg::run(), UnitFieldRegistration::runAction(), MoveUnit::runAction(), MoveUnitCommand::setDestination(), setLocalizedContainerName(), and UnitFieldRegistration::undoAction().
| const ContainerBase * MapField::getContainer | ( | ) | const |
| Building * MapField::getBuildingEntrance | ( | ) |
returns the building if there is one with its entrance on this field
Definition at line 305 of file mapfield.cpp.
References bdt, building, cbbuildingentry, and getTerrainBitType().
| void MapField::removeBuilding | ( | ) |
if there is a building on the field, the building is deleted (may affect othere fields too, depending on building size)
Definition at line 332 of file mapfield.cpp.
References building.
| void MapField::removeUnit | ( | ) |
if there is a unit on the field, the unit will be deleted
Definition at line 338 of file mapfield.cpp.
References vehicle.
| bool MapField::putmine | ( | int | owner, | |
| MineTypes | typ, | |||
| int | strength | |||
| ) |
put a mine of type typ for player owner and a punch of strength on the field. Strength is an absolute value (unlike the basestrength of a mine or the punch of the mine-weapon, which are just factors)
Definition at line 418 of file mapfield.cpp.
References cgp_maxminesonfield, GameMap::getgameparameter(), mineowner(), and mines.
Referenced by copyFieldStep2(), MineItem::place(), and SpawnMine::runAction().
| void MapField::removemine | ( | int | num | ) |
removes a mine
| num | The position of the mine; if num is -1, the last mine is removed) |
Definition at line 440 of file mapfield.cpp.
References mines.
Referenced by execaction().
| void MapField::endRound | ( | int | turn | ) |
Definition at line 110 of file mapfield.cpp.
References AgeableItem::age(), mines, objects, and setparams().
| void MapField::setVisibility | ( | VisibilityStates | valtoset, | |
| int | actplayer | |||
| ) |
The visibility status for all players is stored in a bitmapped variable.
This functions changes the status in this variable for a single player
| valtoset | the value that is going to be written into the visibility variable | |
| actplayer | the player for which the view is changed |
Definition at line 381 of file mapfield.cpp.
References visible.
Referenced by evaluatevisibilityfield(), and Player::resetView().
| VisibilityStates MapField::getVisibility | ( | int | actplayer | ) | [inline] |
| void MapField::resetView | ( | GameMap * | gamemap, | |
| int | playersToReset | |||
| ) | [static] |
Definition at line 390 of file mapfield.cpp.
References GameMap::field, GameMap::getPlayerCount(), visible, GameMap::xsize, and GameMap::ysize.
Referenced by GameMap::endRound().
| int MapField::getx | ( | ) |
Definition at line 454 of file mapfield.cpp.
References GameMap::field, and GameMap::xsize.
Referenced by addobject(), copyFieldStep2(), getmovemalus(), getPosition(), CopyMap::paste(), removeObject(), and setparams().
| int MapField::gety | ( | ) |
Definition at line 460 of file mapfield.cpp.
References GameMap::field, and GameMap::xsize.
Referenced by addobject(), copyFieldStep2(), getmovemalus(), getPosition(), CopyMap::paste(), removeObject(), and setparams().
| MapCoordinate MapField::getPosition | ( | ) |
Definition at line 555 of file mapfield.cpp.
References getx(), and gety().
Referenced by ActionObjectRemovalStrategy::removeObject().
| int MapField::getMemoryFootprint | ( | ) | const |
friend class GameMap [friend] |
Definition at line 31 of file mapfield.h.
the terraintype of the field
Definition at line 37 of file mapfield.h.
Referenced by tmapgenerator::addcoast(), calculateobject(), changeTerrainType(), copyFieldStep1(), DashboardPanel::eval(), execaction_pg(), MapChange::fieldOperator(), generatemap(), getattackbonus(), getdefensebonus(), getjamming(), getmovemalus(), getName(), ForestCalculation::Smoothing::GetNeighbourMask(), getTerrainType(), getWeather(), operator=(), MapRenderer::paintSingleField(), SelectionHolder::pickup(), TerrainItem::place(), placeTerrain(), tspfldloaders::readfields(), GameMap::resize(), setparams(), tmapgenerator::setpfield(), setWeather(), ForestCalculation::Smoothing::SmoothIt(), OverviewMapHolder::updateField(), viewterraininfo(), and tspfldloaders::writefields().
| char MapField::fuel |
mineral resources on this field.
Definition at line 53 of file mapfield.h.
Referenced by tres::buttonpressed(), copyFieldStep1(), execaction_pg(), getMineralFuel(), tres::init(), operator=(), ResourceGraphLayer::paintSingleField(), tspfldloaders::readfields(), resourceComparison(), tmapgenerator::setfuel(), MiningStation::testfield(), GetMiningInfo::testfield(), and tspfldloaders::writefields().
| char MapField::material |
Definition at line 53 of file mapfield.h.
Referenced by tres::buttonpressed(), copyFieldStep1(), execaction_pg(), getMineralMaterial(), tres::init(), operator=(), ResourceGraphLayer::paintSingleField(), tspfldloaders::readfields(), resourceComparison(), tmapgenerator::setmaterial(), tputresources::testfield(), MiningStation::testfield(), GetMiningInfo::testfield(), and tspfldloaders::writefields().
| Uint16 MapField::visible |
can this field be seen be the player. Variable is bitmapped; two bits for each player. These two bits can have the states defined in VisibilityStates
Definition at line 62 of file mapfield.h.
Referenced by calcvisibilityfield(), evaluateviewcalculation(), evaluatevisibilityfield(), fieldVisibility(), fieldvisiblenow(), HiddenAStar3D::getMoveCost(), HiddenAStar::getMoveCost(), getVisibility(), operator=(), tspfldloaders::readfields(), resetView(), MoveUnit::runAction(), setVisibility(), and tspfldloaders::writefields().
units standing on this object will get a bonus to their view
Definition at line 65 of file mapfield.h.
Referenced by setparams().
| char MapField::temp |
Definition at line 72 of file mapfield.h.
Referenced by GameMap::cleartemps(), and GuiFunctions::RepairUnit::execute().
| char MapField::temp2 |
| struct { ... } MapField::a |
Referenced by GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::PutMine::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::Attack::execute(), GuiFunctions::MovementBase::execute(), CargoGuiFunctions::Movement::execute(), AStar3D::findAllAccessibleFields(), AStar::findAllAccessibleFields(), getattackbonus(), getdefensebonus(), getjamming(), getName(), NewGuiHost::mapIconProcessing(), ShowPolygonUsingTemps::paintPolygon(), MapRenderer::paintSingleField(), MapNetwork::searchAllVehiclesNextToBuildings(), MapNetwork::searchbuilding(), MapNetwork::searchfield(), MapNetwork::searchvehicle(), ShowPolygonUsingTemps::setpointabs(), AI::showFieldInformation(), SelectFromMap::showFieldMarking(), and testDebugFunction().
| Uint16 MapField::tempw |
Definition at line 75 of file mapfield.h.
Referenced by operator=(), tspfldloaders::readfields(), and WeaponRange::testfield().
| union { ... } |
Various algorithms need to store some information in the fields they process. These variables are used for this.
| int MapField::temp3 |
Definition at line 77 of file mapfield.h.
Referenced by evaluateviewcalculation(), AStar::findPath(), and operator=().
| int MapField::temp4 |
Definition at line 81 of file mapfield.h.
Referenced by SelectUnitFromMap::accept(), attackpossible(), ContextMenu::DeleteVehicle::available(), GuiFunctions::ConstructBuilding::available(), GuiFunctions::BuildVehicleCommand::available(), GuiFunctions::BuildObject::available(), GuiFunctions::PutMine::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::DisableReactionfire::available(), GuiFunctions::EnableReactionfire::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::UnitInfo::available(), GuiFunctions::PowerSwitch::available(), GuiFunctions::Attack::available(), GuiFunctions::Descend::available(), GuiFunctions::Ascend::available(), GuiFunctions::MovementBase::available(), calcMoveMalus(), checkunitsforremoval(), clearField(), copyFieldStep2(), deleteeverything(), GameMap::endTurn(), DashboardPanel::eval(), execaction(), trunreplay::execnextreplaymove(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::PutMine::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DisableReactionfire::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::PowerSwitch::execute(), GuiFunctions::Attack::execute(), GuiFunctions::MovementBase::execute(), executeUserAction(), ConstructUnitCommand::externalConstructionAvail(), fieldAccessible(), JumpDriveCommand::fieldReachable(), fieldvisiblenow(), AStar3D::findPath(), Vehicle::freeWeight(), getContainer(), getmaxwindspeedforunit(), StratAStar3D::getMoveCost(), StratAStar::getMoveCost(), GuiFunctions::RepairUnit::getName(), GuiFunctions::AttackGui::getName(), getSelectedUnit(), ContextMenu::ContainerCargo::getText(), ContextMenu::ContainerProperties::getText(), GameMap::getUnit(), getVehicle(), tgiveunitawaydlg::init(), UnitPropertyEditor::init(), NewGuiHost::mapIconProcessing(), movebuilding(), UnitInfoPanel::onClick(), UnitWeaponRangeLayer::operateField(), UnitMovementRangeLayer::operateField(), operator=(), MapRenderer::paintSingleField(), UnitTrainingLayer::paintSingleField(), UnitInfoLayer::paintSingleField(), ReactionFireLayer::paintSingleField(), ContainerInfoLayer::paintSingleField(), SelectionHolder::pickup(), VehicleItem::place(), placeUnit(), tspfldloaders::readfields(), removeObject(), removeUnit(), VehicleAttackAction::runAction(), UnitFieldRegistration::runAction(), MoveUnit::runAction(), DestructContainer::runAction(), MapNetwork::searchvehicle(), selectunit(), tmapgenerator::setmap(), AttackCommand::setTarget(), showCargoSummary(), AI::showFieldInformation(), showUnitAiProperties(), MapNetwork::start(), FindUnitPlacementPos::testfield(), SearchReconquerBuilding::testfield(), UnitFieldRegistration::undoAction(), unitHere(), unitInfoDialog(), OverviewMapHolder::updateField(), viewterraininfo(), tspfldloaders::writefields(), and GameMap::~GameMap().
two units and the same field are only allowed temporary during movement
Definition at line 84 of file mapfield.h.
Referenced by calcvisibilityfield(), getVehicle(), MoveUnit::runAction(), and DestructContainer::runAction().
Definition at line 94 of file mapfield.h.
Referenced by SelectBuildingFromMap::accept(), BuildingSeen::arm(), BuildingLost::arm(), BuildingConquered::arm(), attackpossible(), ContextMenu::DeleteBuilding::available(), ObjectType::buildable(), ConstructBuildingCommand::buildingFits(), calcMoveMalus(), calculateobject(), calcvisibilityfield(), clearField(), copyFieldStep2(), deleteeverything(), DashboardPanel::eval(), evaluatevisibilityfield(), execaction(), trunreplay::execnextreplaymove(), AddResources::execute(), AddProductionCapability::execute(), ChangeBuildingOwner::execute(), ChangeBuildingDamage::execute(), fieldAccessible(), ResourceNet::fieldavail(), AnyUnitEntersPolygon::fieldOperator(), JumpDriveCommand::fieldReachable(), fieldvisiblenow(), AStar3D::findPath(), Vehicle::freeWeight(), SpawnBuilding::getBuilding(), getBuildingEntrance(), getContainer(), GameMap::getContainer(), DestructBuildingCommand::getFields(), BuildingPositionTrigger::getName(), BuildingSeen::getState(), BuildingDestroyed::getState(), BuildingConquered::getState(), DestructBuildingCommand::go(), AttackCommand::go(), tgiveunitawaydlg::init(), NewGuiHost::mapIconProcessing(), movebuilding(), operator=(), MapRenderer::paintSingleField(), PipeLayer::paintSingleField(), ContainerInfoLayer::paintSingleField(), SelectionHolder::pickup(), VehicleItem::place(), placeBuilding(), tspfldloaders::readfields(), removeBuilding(), removeObject(), VehicleAttackAction::runAction(), SpawnBuilding::runAction(), MoveUnit::runAction(), MapNetwork::searchAllVehiclesNextToBuildings(), MapNetwork::searchbuilding(), MapNetwork::searchfield(), setparams(), MapNetwork::start(), Building::unchainbuildingfromfield(), SpawnBuilding::undoAction(), OverviewMapHolder::updateField(), and tspfldloaders::writefields().
the mineral resources that were seen by a player on this field; since the actual amount may have decreased since the player looked, this value is not identical to the fuel and material fields.
Definition at line 106 of file mapfield.h.
Referenced by DiscoverResources::ResourceViewState::initFromField(), operator=(), ResourceGraphLayer::paintSingleField(), tspfldloaders::readfields(), MiningStation::testfield(), tspfldloaders::writefields(), DiscoverResources::ResourceViewState::writeToField(), and ~MapField().
Definition at line 109 of file mapfield.h.
Referenced by ContextMenu::ChangeMineStrength::available(), ContextMenu::DeleteMine::available(), tminestrength::buttonpressed(), calcvisibilityfield(), copyFieldStep2(), endRound(), execaction(), tmineattacksunit::getFirstMine(), getMine(), getmovemalus(), tminestrength::init(), mineattacks(), mineowner(), operator=(), MapRenderer::paintSingleField(), putmine(), tspfldloaders::readfields(), removemine(), SpawnMine::runAction(), RemoveMine::runAction(), tmineattacksunit::setresult(), tmineattacksunit::setup(), SpawnMine::undoAction(), RemoveMine::undoAction(), viewterraininfo(), and tspfldloaders::writefields().
Definition at line 116 of file mapfield.h.
Referenced by addobject(), attackpossible(), ContextMenu::DeleteAllObjects::available(), ContextMenu::DeleteTopObject::available(), Building::chainbuildingtofield(), checkForObject(), checkobject(), clearField(), copyFieldStep1(), copyFieldStep2(), endRound(), execaction(), RemoveAllObjects::fieldOperator(), getattackbonus(), getdefensebonus(), getjamming(), getName(), operator=(), MapRenderer::paintSingleField(), PipeLayer::paintSingleField(), SelectionHolder::pickup(), TerrainItem::place(), placeTerrain(), tspfldloaders::readfields(), ActionObjectRemovalStrategy::removeObject(), ObjectRemovalStrategy2::removeObject(), SimpleObjectRemoval::removeObject(), removeObject(), SpawnBuilding::runAction(), setparams(), tunitattacksobject::setup(), DashboardPanel::showUnitData(), sortobjects(), OverviewMapHolder::updateField(), and tspfldloaders::writefields().
the terraintype properties. They determine which units can move over the field. This variable is recalculated from the terraintype and objects each time something on the field changes (setparams)
Definition at line 149 of file mapfield.h.
Referenced by ObjectType::buildable(), ConstructBuildingCommand::buildingFits(), calculateobject(), Building::chainbuildingtofield(), checkunitsforremoval(), copyFieldStep1(), DashboardPanel::eval(), fieldAccessible(), ResourceNet::fieldavail(), JumpDriveCommand::fieldReachable(), getBuildingEntrance(), getmaxwindspeedforunit(), operator=(), PipeLayer::paintSingleField(), ContainerInfoLayer::paintSingleField(), BuildingItem::place(), VehicleItem::place(), tspfldloaders::readfields(), setparams(), showbdtbits(), stu_height(), terrainaccessible2(), viewterraininfo(), and tspfldloaders::writefields().
are any events connected to this field
Definition at line 152 of file mapfield.h.
Referenced by AnyUnitEntersPolygon::fieldOperator(), SpecificUnitEntersPolygon::fieldOperator(), operator=(), tspfldloaders::readfields(), MoveUnit::runAction(), and tspfldloaders::writefields().
| struct MapField::View MapField::view[8] |
some variables for the viewcalculation algorithm. see viewcalculation.cpp for details
Referenced by calcvisibilityfield(), tcomputebuildingview::init(), operator=(), VisibilityLayer::paintSingleField(), tspfldloaders::readfields(), WholeMapRenderer::renderVisibility(), tcomputeview::testfield(), and viewterraininfo().
1.5.1