controls.h File Reference

#include "typen.h"
#include "astar2.h"

Include dependency graph for controls.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

pair< int, int > calcMoveMalus (const MapCoordinate3D &start, const MapCoordinate3D &dest, const Vehicle *vehicle, WindMovement *wm=NULL, bool *inhibitAttack=NULL, bool container2container=false)
int windbeeline (const MapCoordinate &start, const MapCoordinate &dest, WindMovement *wm)
 return the distance between x1/y1 and x2/y2 using the power of the wind factors precalculated in WindMovement
bool checkUnitsForCrash (Player &player, ASCString &text)


Detailed Description

Controlling units (which is graudally moved to vehicletype.cpp and unitctrl.cpp ); Resource networks Things that are run when starting and ending someones turn

Definition in file controls.h.


Function Documentation

pair<int,int> calcMoveMalus ( const MapCoordinate3D start,
const MapCoordinate3D dest,
const Vehicle vehicle,
WindMovement wm = NULL,
bool *  inhibitAttack = NULL,
bool  container2container = false 
)

calculates the movement cost for moving vehicle from start to dest.

Returns:
: first: movement ; second: fuel consumption

Definition at line 82 of file controls.cpp.

References attackpossible28(), beeline(), MapField::building, VehicleType::HeightChangeMethod::canAttack, Player::diplomacy, VehicleType::HeightChangeMethod::dist, fatalError(), MapCoordinate3D::getBitmappedHeight(), MapField::getContainer(), getdirection(), WindMovement::getDist(), GameMap::getField(), Vehicle::getHeightChange(), ContainerBase::getMap(), MapField::getmovemalus(), getnextfield(), MapCoordinate3D::getNumericalHeight(), ContainerBase::getOwner(), GameMap::getPlayer(), DiplomaticStateVector::isHostile(), max(), maxmalq, ContainerBaseType::TransportationIO::movecost, VehicleType::HeightChangeMethod::moveCost, sidenum, submarineMovement, Vehicle::typ, MapField::vehicle, ContainerBase::vehicleUnloadSystem(), GameMap::weather, GameMap::Weather::windSpeed, MapCoordinate::x, and MapCoordinate::y.

Referenced by AStar::getMoveCost(), AStar3D::getMoveCost(), and MoveUnit::runAction().

bool checkUnitsForCrash ( Player player,
ASCString text 
)

Definition at line 49 of file controls.cpp.

References UnitHooveringLogic::getEndurance(), CGameOptions::Instance(), ASCString::toString(), and Player::vehicleList.

Referenced by GuiFunctions::EndTurn::execute().

int windbeeline ( const MapCoordinate start,
const MapCoordinate dest,
WindMovement wm 
)

return the distance between x1/y1 and x2/y2 using the power of the wind factors precalculated in WindMovement

Definition at line 67 of file controls.cpp.

References getdirection(), WindMovement::getDist(), getnextfield(), minmalq, MapCoordinate::x, and MapCoordinate::y.

Referenced by AStar3D::dist().


Generated on Mon May 21 01:33:35 2012 for Advanced Strategic Command by  doxygen 1.5.1