Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

tfield Class Reference

a single field of the map More...

#include <mapfield.h>

List of all members.

Public Types

typedef list< MineMineContainer
typedef vector< ::ObjectObjectContainer

Public Member Functions

 tfield (GameMap *gamemap_)
void operator= (const tfield &f)
void setMap (GameMap *gamemap_)
MinegetMine (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)
 add an object to the field
void removeobject (const ObjectType *obj, bool force=false)
 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
Objectcheckforobject (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 (void)
 recalculates the terrain properties, movemalus etc from the terraintype and the objects,
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 (void)
 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
ContainerBasegetContainer ()
 returns a pointer to the ContainerBase of the field or NULL if there is none
bool putmine (int col, int typ, int strength)
 put a mine of type typ for player col (0..7) 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 ()
int getMemoryFootprint () const
 ~tfield ()

Static Public Member Functions

static void resetView (GameMap *gamemap, int playersToReset)

Public Attributes

TerrainType::Weathertyp
 the terraintype of the field
char fuel
 mineral resources on this field (should be changed to Resources sometime...)
char material
 mineral resources on this field (should be changed to Resources sometime...)
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
int temp3
int temp4
Vehiclevehicle
Buildingbuilding
Resourceviewresourceview
 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
tfield::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

Protected Member Functions

 tfield ()

Friends

class GameMap

Classes

struct  Resourceview
struct  View
 some variables for the viewcalculation algorithm. see viewcalculation.cpp for details More...


Detailed Description

a single field of the map

Definition at line 25 of file mapfield.h.


Member Typedef Documentation

typedef list<Mine> tfield::MineContainer
 

Definition at line 78 of file mapfield.h.

typedef vector< ::Object> tfield::ObjectContainer
 

Definition at line 85 of file mapfield.h.


Constructor & Destructor Documentation

tfield::tfield  )  [protected]
 

Definition at line 40 of file mapfield.cpp.

tfield::tfield GameMap gamemap_  ) 
 

Definition at line 34 of file mapfield.cpp.

References setMap().

tfield::~tfield  ) 
 

Definition at line 528 of file mapfield.cpp.

References resourceview.


Member Function Documentation

bool tfield::addobject const ObjectType obj,
int  dir = -1,
bool  force = false
 

add an object to the field

Parameters:
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
Returns:
true on success, false if the object could not be build

Definition at line 149 of file mapfield.cpp.

References calculateobject(), checkforobject(), Object::dir, getx(), gety(), AgeableItem::lifetimer, objects, setparams(), and sortobjects().

Referenced by copyFieldStep2(), trunreplay::execnextreplaymove(), Vehicle::spawnMoveObjects(), transformMap(), and Building::unchainbuildingfromfield().

Object * tfield::checkforobject const ObjectType o  ) 
 

checks if there are objects from the given type on the field and returns them

Definition at line 503 of file mapfield.cpp.

References objects.

Referenced by addobject(), GuiFunctions::ObjectBuildingGui::checkObject(), GuiFunctions::ObjectBuildingGui::execute(), ForestCalculation::Smoothing::GetNeighbourMask(), and PipeLayer::paintSingleField().

void tfield::deleteeverything void   ) 
 

deletes everything placed on the field

Definition at line 219 of file mapfield.cpp.

References building, setparams(), and vehicle.

Referenced by copyFieldStep1().

void tfield::endRound int  turn  ) 
 

Definition at line 79 of file mapfield.cpp.

References AgeableItem::age(), mines, objects, and setparams().

int tfield::getattackbonus void   ) 
 

the attack bonus that unit get when they are attacking

Definition at line 372 of file mapfield.cpp.

References a, TerrainType::Weather::attackbonus, objects, and typ.

Referenced by DashboardPanel::eval(), tunitattacksobject::setup(), tunitattacksbuilding::setup(), tunitattacksunit::setup(), and viewterraininfo().

ContainerBase * tfield::getContainer  ) 
 

returns a pointer to the ContainerBase of the field or NULL if there is none

Definition at line 245 of file mapfield.cpp.

References building, and vehicle.

Referenced by GuiFunctions::SelfDestructIcon::available(), GuiFunctions::RefuelUnitDialog::available(), GuiFunctions::RefuelUnit::available(), Vehicle::canMove(), GuiIconHandler::checkForKey(), trunreplay::execnextreplaymove(), GuiFunctions::SelfDestructIcon::execute(), GuiFunctions::RefuelUnit::execute(), GuiFunctions::OpenContainer::execute(), AStar3D::findPath(), GameMap::getUnit(), BaseVehicleMovement::moveunitxy(), ContainerInfoLayer::paintSingleField(), and tgiveunitawaydlg::run().

int tfield::getdefensebonus void   ) 
 

the defense bonus that unit get when they are attacked

Definition at line 388 of file mapfield.cpp.

References a, TerrainType::Weather::defensebonus, objects, and typ.

Referenced by DashboardPanel::eval(), tunitattacksobject::setup(), tunitattacksbuilding::setup(), tunitattacksunit::setup(), and viewterraininfo().

int tfield::getjamming void   ) 
 

the radar jamming that is on this field

Definition at line 419 of file mapfield.cpp.

References a, TerrainType::Weather::basicjamming, objects, and typ.

Referenced by DashboardPanel::eval(), VisibilityLayer::paintSingleField(), and viewterraininfo().

int tfield::getMemoryFootprint  )  const
 

Definition at line 521 of file mapfield.cpp.

Referenced by MemoryMeasurement::measure().

Mine & tfield::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 141 of file mapfield.cpp.

References mines.

Referenced by tmineattacksunit::setup().

int tfield::getmovemalus int  type  ) 
 

Definition at line 455 of file mapfield.cpp.

int tfield::getmovemalus const Vehicle veh  ) 
 

Definition at line 434 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().

ASCString tfield::getName  ) 
 

Definition at line 404 of file mapfield.cpp.

References a, ObjectType::AddToTerrain, TerrainType::name, objects, ObjectType::ReplaceTerrain, TerrainType::Weather::terraintype, and typ.

VisibilityStates tfield::getVisibility int  actplayer  )  [inline]
 

Definition at line 171 of file mapfield.h.

References visible.

Referenced by Player::swap(), and testDebugFunction().

int tfield::getweather void   ) 
 

the weather that is on this field

Definition at line 254 of file mapfield.cpp.

References cwettertypennum, TerrainType::Weather::terraintype, typ, and TerrainType::weather.

Referenced by ObjectType::buildable(), GuiFunctions::ObjectBuildingGui::checkObject(), checkobjectsforremoval(), Building::getPicture(), MapRenderer::paintSingleField(), setparams(), tunitattacksobject::setup(), transformMap(), and viewterraininfo().

int tfield::getx  ) 
 

Definition at line 359 of file mapfield.cpp.

References GameMap::field, and GameMap::xsize.

Referenced by addobject(), copyFieldStep2(), getmovemalus(), CopyMap::paste(), removeobject(), and setparams().

int tfield::gety  ) 
 

Definition at line 365 of file mapfield.cpp.

References GameMap::field, and GameMap::xsize.

Referenced by addobject(), copyFieldStep2(), getmovemalus(), CopyMap::paste(), removeobject(), and setparams().

int tfield::mineattacks const Vehicle veh  ) 
 

can any of the mines on this field attack this unit

Definition at line 131 of file mapfield.cpp.

References mines.

Referenced by BaseVehicleMovement::moveunitxy().

int tfield::mineowner void   ) 
 

the player who placed the mines on this field.

Definition at line 336 of file mapfield.cpp.

References mines.

Referenced by tplayerchange::anzeige(), GuiFunctions::PutAntiSubMine::available(), GuiFunctions::PutAntiShipMine::available(), GuiFunctions::PutGroundMine::available(), calcvisibilityfield(), getmovemalus(), putmine(), and tputmine::testfield().

void tfield::operator= const tfield f  ) 
 

Definition at line 105 of file mapfield.cpp.

References bdt, building, connection, fuel, material, mines, objects, resourceview, temp3, temp4, tempw, typ, vehicle, view, and visible.

bool tfield::putmine int  col,
int  typ,
int  strength
 

put a mine of type typ for player col (0..7) 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 322 of file mapfield.cpp.

References cgp_maxminesonfield, GameMap::getgameparameter(), mineowner(), and mines.

Referenced by copyFieldStep2().

void tfield::removemine int  num  ) 
 

removes a mine

Parameters:
num The position of the mine; if num is -1, the last mine is removed)

Definition at line 345 of file mapfield.cpp.

References mines.

Referenced by execaction(), putMine(), and tmineattacksunit::setresult().

void tfield::removeobject const ObjectType obj,
bool  force = false
 

removes all objects of the given type from the field

Definition at line 190 of file mapfield.cpp.

References GameMap::actplayer, building, calculateobject(), getx(), gety(), objects, setparams(), and vehicle.

Referenced by checkobjectsforremoval(), copyFieldStep1(), execaction(), trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), and transformMap().

void tfield::resetView GameMap gamemap,
int  playersToReset
[static]
 

Definition at line 294 of file mapfield.cpp.

References GameMap::field, and visible.

Referenced by GameMap::endRound().

void tfield::setMap GameMap gamemap_  )  [inline]
 

Definition at line 35 of file mapfield.h.

Referenced by GameMap::allocateFields(), generatemap(), GameMap::resize(), and tfield().

void tfield::setparams void   ) 
 

recalculates the terrain properties, movemalus etc from the terraintype and the objects,

Definition at line 460 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, TerrainType::Weather::terraintype, Building::typ, typ, and viewbonus.

Referenced by addobject(), GameMap::allocateFields(), calculateallobjects(), ForestCalculation::calculateforest(), calculateobject(), tspfldloaders::chainitems(), deleteeverything(), endRound(), generatemap(), TerrainItem::place(), removeobject(), WeatherField::reset(), GameMap::resize(), tmapgenerator::setmap(), setweather(), transformMap(), and WeatherField::update().

void tfield::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

Parameters:
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 285 of file mapfield.cpp.

References visible.

Referenced by evaluatevisibilityfield(), Player::resetView(), and Player::swap().

void tfield::setweather int  weather  ) 
 

Definition at line 264 of file mapfield.cpp.

References setparams(), TerrainType::Weather::terraintype, typ, and TerrainType::weather.

Referenced by copyFieldStep1(), TerrainItem::place(), WeatherField::reset(), and WeatherField::update().

void tfield::sortobjects void   ) 
 

sorts the objects. Since objects can be on different levels of height, the lower one must be displayed first

Definition at line 317 of file mapfield.cpp.

References compareObjectHeight(), and objects.

Referenced by addobject(), tspfldloaders::readfields(), and transformMap().

bool tfield::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 235 of file mapfield.cpp.

References Vehicle::networkid, and vehicle.

Referenced by Vehicle::canMove(), ChangeVehicleHeight::execute(), VehicleMovement::execute(), and BaseVehicleMovement::PathFinder::getMovementFields().


Friends And Related Function Documentation

friend class GameMap [friend]
 

Definition at line 30 of file mapfield.h.


Member Data Documentation

struct { ... } tfield::a
 

Referenced by GuiFunctions::ConstructBuilding::available(), GuiFunctions::RemoveMine::available(), GuiFunctions::PutAntiSubMine::available(), GuiFunctions::PutAntiShipMine::available(), GuiFunctions::PutGroundMine::available(), GuiFunctions::RefuelUnitDialog::available(), GuiFunctions::DestructBuilding::available(), GameMap::cleartemps(), destructbuildinglevel2(), GuiFunctions::RefuelUnit::execute(), GuiFunctions::RepairUnit::execute(), getattackbonus(), getdefensebonus(), getjamming(), getName(), NewGuiHost::mapIconProcessing(), MapRenderer::paintSingleField(), putMine(), GuiFunctions::BuildingConstruction::search(), GuiFunctions::VehicleBuildingGui::search(), GuiFunctions::ObjectBuildingGui::search(), MapNetwork::searchAllVehiclesNextToBuildings(), MapNetwork::searchbuilding(), MapNetwork::searchfield(), ShowPolygonUsingTemps::setpointabs(), testDebugFunction(), tputmine::testfield(), and tsearchdestructbuildingfields::testfield().

TerrainBits tfield::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)

Definition at line 107 of file mapfield.h.

Referenced by GuiFunctions::PutAntiShipMine::available(), GuiFunctions::PutGroundMine::available(), ObjectType::buildable(), Building::chainbuildingtofield(), GuiFunctions::ObjectBuildingGui::checkObject(), checkobjectsforremoval(), checkunitsforremoval(), copyFieldStep1(), DashboardPanel::eval(), JumpDrive::fieldReachable(), AStar3D::findPath(), getmaxwindspeedforunit(), operator=(), PipeLayer::paintSingleField(), ContainerInfoLayer::paintSingleField(), VehicleItem::place(), tspfldloaders::readfields(), UnitTypeTransformation::run(), GuiFunctions::BuildingConstruction::search(), setparams(), showbdtbits(), stu_height(), terrainaccessible2(), transformMap(), Building::unchainbuildingfromfield(), viewterraininfo(), and tspfldloaders::writefields().

Building* tfield::building
 

Definition at line 64 of file mapfield.h.

Referenced by attackpossible(), ObjectType::buildable(), calcMoveMalus(), calcvisibilityfield(), Building::chainbuildingtofield(), deleteeverything(), destructbuildinglevel2(), DashboardPanel::eval(), evaluatevisibilityfield(), execaction(), trunreplay::execnextreplaymove(), Reinforcements::execute(), AddResources::execute(), AddProductionCapability::execute(), ChangeBuildingOwner::execute(), ChangeBuildingDamage::execute(), AnyUnitEntersPolygon::fieldOperator(), JumpDrive::fieldReachable(), AStar3D::findPath(), Vehicle::freeWeight(), getContainer(), GameMap::getContainer(), BuildingDestroyed::getState(), BuildingConquered::getState(), giveunitaway(), tgiveunitawaydlg::init(), NewGuiHost::mapIconProcessing(), ReinforcementSelector::mark(), movebuilding(), BaseVehicleMovement::moveunitxy(), operator=(), MapRenderer::paintSingleField(), PipeLayer::paintSingleField(), ContainerInfoLayer::paintSingleField(), SelectionHolder::pickup(), VehicleItem::place(), ClipBoardBase::place(), putbuilding(), tspfldloaders::readfields(), removeobject(), tgiveunitawaydlg::run(), UnitTypeTransformation::run(), GuiFunctions::BuildingConstruction::search(), GuiFunctions::VehicleBuildingGui::search(), GuiFunctions::ObjectBuildingGui::search(), MapNetwork::searchbuilding(), MapNetwork::searchfield(), setparams(), tsearchforminablefields::testfield(), VehicleService::FieldSearch::testfield(), tputmine::testfield(), tsearchdestructbuildingfields::testfield(), transformMap(), Building::unchainbuildingfromfield(), viewterraininfo(), tspfldloaders::writefields(), and GameMap::~GameMap().

int tfield::connection
 

are any events connected to this field

Definition at line 110 of file mapfield.h.

Referenced by AnyUnitEntersPolygon::fieldOperator(), SpecificUnitEntersPolygon::fieldOperator(), BaseVehicleMovement::moveunitxy(), operator=(), tspfldloaders::readfields(), and tspfldloaders::writefields().

char tfield::fuel
 

mineral resources on this field (should be changed to Resources sometime...)

Definition at line 41 of file mapfield.h.

Referenced by tres::buttonpressed(), copyFieldStep1(), tres::init(), operator=(), ResourceGraphLayer::paintSingleField(), tspfldloaders::readfields(), tmapgenerator::setfuel(), tsearchforminablefields::testfield(), tputresources::testfield(), MiningStation::testfield(), GetMiningInfo::testfield(), and tspfldloaders::writefields().

char tfield::material
 

mineral resources on this field (should be changed to Resources sometime...)

Definition at line 41 of file mapfield.h.

Referenced by tres::buttonpressed(), copyFieldStep1(), tres::init(), operator=(), ResourceGraphLayer::paintSingleField(), tspfldloaders::readfields(), tmapgenerator::setmaterial(), tsearchforminablefields::testfield(), tputresources::testfield(), MiningStation::testfield(), GetMiningInfo::testfield(), and tspfldloaders::writefields().

MineContainer tfield::mines
 

Definition at line 79 of file mapfield.h.

Referenced by GuiFunctions::RemoveMine::available(), GuiFunctions::PutAntiSubMine::available(), GuiFunctions::PutAntiShipMine::available(), GuiFunctions::PutGroundMine::available(), tminestrength::buttonpressed(), tplayerchange::buttonpressed(), calcvisibilityfield(), endRound(), execaction(), tmineattacksunit::getFirstMine(), getMine(), getmovemalus(), tminestrength::init(), mineattacks(), mineowner(), operator=(), MapRenderer::paintSingleField(), putmine(), tspfldloaders::readfields(), removemine(), tmineattacksunit::setresult(), tmineattacksunit::setup(), Player::swap(), tputmine::testfield(), viewterraininfo(), and tspfldloaders::writefields().

ObjectContainer tfield::objects
 

Definition at line 86 of file mapfield.h.

Referenced by addobject(), attackpossible(), calculateallobjects(), ForestCalculation::calculateforest(), Building::chainbuildingtofield(), checkforobject(), checkobject(), checkobjectsforremoval(), copyFieldStep1(), endRound(), execaction(), getattackbonus(), getdefensebonus(), getjamming(), getName(), MemoryMeasurement::measure(), operator=(), MapRenderer::paintSingleField(), PipeLayer::paintSingleField(), SelectionHolder::pickup(), tspfldloaders::readfields(), removeobject(), setparams(), tunitattacksobject::setup(), DashboardPanel::showUnitData(), sortobjects(), transformMap(), viewterraininfo(), and tspfldloaders::writefields().

Resourceview* tfield::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.

Definition at line 76 of file mapfield.h.

Referenced by operator=(), ResourceGraphLayer::paintSingleField(), tspfldloaders::readfields(), Player::resetView(), Player::swap(), tsearchforminablefields::testfield(), MiningStation::testfield(), tspfldloaders::writefields(), and ~tfield().

char tfield::temp
 

Definition at line 54 of file mapfield.h.

char tfield::temp2
 

Definition at line 55 of file mapfield.h.

int tfield::temp3
 

Definition at line 59 of file mapfield.h.

Referenced by GameMap::cleartemps(), AStar::findPath(), and operator=().

int tfield::temp4
 

Definition at line 60 of file mapfield.h.

Referenced by GameMap::cleartemps(), and operator=().

Uint16 tfield::tempw
 

Definition at line 57 of file mapfield.h.

Referenced by operator=(), and tspfldloaders::readfields().

TerrainType::Weather* tfield::typ
 

the terraintype of the field

Definition at line 35 of file mapfield.h.

Referenced by tmapgenerator::addcoast(), GameMap::allocateFields(), GuiFunctions::PutAntiSubMine::available(), copyFieldStep1(), DashboardPanel::eval(), generatemap(), getattackbonus(), getdefensebonus(), getjamming(), getmovemalus(), getName(), ForestCalculation::Smoothing::GetNeighbourMask(), SolarPowerplant::getPlus(), getweather(), operator=(), MapRenderer::paintSingleField(), SelectionHolder::pickup(), TerrainItem::place(), tspfldloaders::readfields(), GameMap::resize(), setparams(), tmapgenerator::setpfield(), setweather(), ForestCalculation::Smoothing::SmoothIt(), transformMap(), viewterraininfo(), and tspfldloaders::writefields().

Vehicle* tfield::vehicle
 

Definition at line 63 of file mapfield.h.

Referenced by attackpossible(), GuiFunctions::ConstructBuilding::available(), GuiFunctions::BuildVehicle::available(), GuiFunctions::BuildObject::available(), GuiFunctions::PutMine::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::UnitInfo::available(), GuiFunctions::PowerOff::available(), GuiFunctions::PowerOn::available(), calcMoveMalus(), calcvisibilityfield(), Building::chainbuildingtofield(), tsearchreactionfireingunits::checkfield(), treactionfirereplay::checkfield(), checkunitsforremoval(), copyFieldStep2(), deleteeverything(), DashboardPanel::eval(), ASC_MainScreenWidget::eventKeyDown(), execaction(), trunreplay::execnextreplaymove(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildVehicle::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::RepairUnit::execute(), Reinforcements::execute(), AnyUnitEntersPolygon::fieldOperator(), SpecificUnitEntersPolygon::fieldOperator(), JumpDrive::fieldReachable(), AStar3D::findPath(), Vehicle::freeWeight(), getContainer(), getmaxwindspeedforunit(), GuiFunctions::RepairUnit::getName(), GameMap::getUnit(), giveunitaway(), tgiveunitawaydlg::init(), tunit::init(), JumpDrive::jump(), NewGuiHost::mapIconProcessing(), ReinforcementSelector::mark(), movebuilding(), BaseVehicleMovement::moveunitxy(), UnitInfoPanel::onClick(), operator=(), MapRenderer::paintSingleField(), ContainerInfoLayer::paintSingleField(), SelectionHolder::pickup(), VehicleItem::place(), ClipBoardBase::place(), putbuilding(), putbuilding2(), tspfldloaders::readfields(), removeobject(), tgiveunitawaydlg::run(), UnitTypeTransformation::run(), GuiFunctions::VehicleBuildingGui::search(), GuiFunctions::ObjectBuildingGui::search(), selectunit(), tmapgenerator::setmap(), showCargoSummary(), AI::showFieldInformation(), tsearchforminablefields::testfield(), VehicleService::FieldSearch::testfield(), FindUnitPlacementPos::testfield(), tputmine::testfield(), unitHere(), unitInfoDialog(), viewterraininfo(), tspfldloaders::writefields(), GameMap::~GameMap(), and Vehicle::~Vehicle().

struct tfield::View tfield::view[8]
 

some variables for the viewcalculation algorithm. see viewcalculation.cpp for details

Referenced by calcvisibilityfield(), clearvisibility(), tcomputebuildingview::init(), operator=(), VisibilityLayer::paintSingleField(), tspfldloaders::readfields(), tcomputeview::testfield(), and viewterraininfo().

int tfield::viewbonus
 

units standing on this object will get a bonus to their view

Definition at line 47 of file mapfield.h.

Referenced by tcomputebuildingview::init(), tcomputevehicleview::init(), and setparams().

Uint16 tfield::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 44 of file mapfield.h.

Referenced by calcvisibilityfield(), evaluatevisibilityfield(), fieldVisibility(), getVisibility(), operator=(), tspfldloaders::readfields(), resetView(), setVisibility(), and tspfldloaders::writefields().


The documentation for this class was generated from the following files:
Generated on Thu May 15 01:57:40 2008 for Advanced Strategic Command by  doxygen 1.4.2