#include <math.h>
#include "mapalgorithms.h"
#include "typen.h"
#include "vehicletype.h"
#include "errors.h"
#include "gamemap.h"
Include dependency graph for mapalgorithms.cpp:

Go to the source code of this file.
Defines | |
| #define | checkvisibility |
Functions | |
| void | circularFieldIterator (GameMap *gamemap, const MapCoordinate ¢er, int startDist, int stopDist, FieldIterationFunctor functor) |
| MapCoordinate3D | getNeighbouringFieldCoordinate (const MapCoordinate3D &pos, int direc) |
| returns the coordinate of the field that is adjecent to the given field in the direction of direc | |
| MapCoordinate | getNeighbouringFieldCoordinate (const MapCoordinate &pos, int direc) |
| void | getnextfield (int &x, int &y, int direc) |
| changes x and y to the coordinates of the neighbouring field of (x/y) in the direction direc | |
| int | getdirection (const MapCoordinate &start, const MapCoordinate &dest) |
| int | getdirection (int x1, int y1, int x2, int y2) |
| gets the direction from x1/y1 to x2/y2 | |
| int | beeline (const Vehicle *a, const Vehicle *b) |
| returns the distance between the units a and b | |
| int | beeline (const MapCoordinate &a, const MapCoordinate &b) |
| returns the distance between map positions a and b | |
| int | beeline (int x1, int y1, int x2, int y2) |
| returns the distance between (x1/y1) and (x2/y2) | |
| int | square (int i) |
| float | square (float i) |
Variables | |
| int | ccmpheighchangemovedir [6] = {0, 1, 5, 2, 4, 3 } |
Definition in file mapalgorithms.cpp.
|
|
Definition at line 130 of file mapalgorithms.cpp. |
|
||||||||||||||||||||
|
returns the distance between (x1/y1) and (x2/y2)
Definition at line 394 of file mapalgorithms.cpp. |
|
||||||||||||
|
returns the distance between map positions a and b
Definition at line 388 of file mapalgorithms.cpp. |
|
||||||||||||
|
||||||||||||||||||||||||
|
Definition at line 282 of file mapalgorithms.cpp. References SearchFields::initsearch(), and SearchFields::startsearch(). Referenced by RecalculateAreaView::addView(), placeCurrentItem(), RecalculateAreaView::removeView(), AutoHarvestObjects::run(), and ServiceTargetSearcher::startSearch(). |
|
||||||||||||||||||||
|
gets the direction from x1/y1 to x2/y2
Definition at line 351 of file mapalgorithms.cpp. |
|
||||||||||||
|
Definition at line 346 of file mapalgorithms.cpp. Referenced by calcMoveMalus(), MapDisplayPG::displayUnitMovement(), getdirection(), BaseVehicleMovement::moveunitxy(), Vehicle::spawnMoveObjects(), AttackFormula::strength_hemming(), and windbeeline(). |
|
||||||||||||
|
Definition at line 300 of file mapalgorithms.cpp. References getnextfield(), MapCoordinate::x, and MapCoordinate::y. |
|
||||||||||||
|
returns the coordinate of the field that is adjecent to the given field in the direction of direc
Definition at line 293 of file mapalgorithms.cpp. Referenced by MapDisplayPG::displayUnitMovement(), AStar3D::findPath(), GuiFunctions::VehicleBuildingGui::init(), GuiFunctions::ObjectBuildingGui::init(), MapDisplayPG::initMovementStructure(), BaseVehicleMovement::moveunitxy(), TerrainItem::place(), MapNetwork::searchAllVehiclesNextToBuildings(), GuiFunctions::BuildingConstruction::setBuilding(), transformMap(), and UnitAttacksUnit_FakeHemming::UnitAttacksUnit_FakeHemming(). |
|
||||||||||||||||
|
changes x and y to the coordinates of the neighbouring field of (x/y) in the direction direc
Definition at line 308 of file mapalgorithms.cpp. Referenced by calcMoveMalus(), ForestCalculation::calculateforest(), calculateobject(), ResourceNet::fieldavail(), AStar3D::findPath(), AStar::findPath(), getNeighbouringFieldCoordinate(), ForestCalculation::Smoothing::GetNeighbourMask(), MapNetwork::searchbuilding(), MapNetwork::searchfield(), tdrawgettempline::start(), SearchFields::startsearch(), and windbeeline(). |
|
|
Definition at line 422 of file mapalgorithms.cpp. |
|
|
Definition at line 417 of file mapalgorithms.cpp. |
|
|
Definition at line 290 of file mapalgorithms.cpp. |
1.4.2