#include <stdio.h>#include <cstring>#include <math.h>#include <stdarg.h>#include <ctime>#include "buildingtype.h"#include "vehicletype.h"#include "typen.h"#include "spfst.h"#include "loaders.h"#include "controls.h"#include "attack.h"#include "gameoptions.h"#include "errors.h"#include "viewcalculation.h"#include "replay.h"#include "resourcenet.h"#include "stack.h"Include dependency graph for controls.cpp:

Go to the source code of this file.
Functions | |
| bool | checkUnitsForCrash (Player &player, ASCString &text) |
| 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 | |
| pair< int, int > | calcMoveMalus (const MapCoordinate3D &start, const MapCoordinate3D &dest, const Vehicle *vehicle, WindMovement *wm, bool *inhibitAttack, bool container2container) |
Definition in file controls.cpp.
| 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.
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, VehicleType::HeightChangeMethod::moveCost, ContainerBaseType::TransportationIO::movecost, sidenum, submarineMovement, Vehicle::typ, MapField::vehicle, ContainerBase::vehicleUnloadSystem(), GameMap::weather, GameMap::Weather::windSpeed, MapCoordinate::x, and MapCoordinate::y.
Referenced by AStar3D::getMoveCost(), AStar::getMoveCost(), and MoveUnit::runAction().
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().
1.5.1