#include "global.h"
#include "viewcalculation.h"
#include "mapalgorithms.h"
#include "vehicletype.h"
#include "buildingtype.h"
#include "errors.h"
#include "gameeventsystem.h"
Include dependency graph for viewcalculation.cpp:

Go to the source code of this file.
Functions | |
| void | clearvisibility (GameMap *gamemap, int reset) |
| VisibilityStates | calcvisibilityfield (GameMap *gamemap, tfield *fld, int player, int add, int initial, int additionalEnemyJamming) |
| calculates the view on a given field. | |
| int | evaluatevisibilityfield (GameMap *gamemap, tfield *fld, int player, int add, int initial) |
| evaluates the view on a given field and saves it for that field. | |
| int | evaluateviewcalculation (GameMap *gamemap, int player_fieldcount_mask, bool disableShareView) |
| evaluates the view on the whole map. | |
| int | evaluateviewcalculation (GameMap *gamemap, const MapCoordinate &pos, int distance, int player_fieldcount_mask, bool disableShareView) |
| evaluates the view on a part of the map. | |
| int | computeview (GameMap *gamemap, int player_fieldcount_mask, bool disableShareView) |
| completely computes the view | |
| int | getPlayersWithSharedViewMask (int player, GameMap *gamemap) |
Variables | |
| SigC::Signal0< void > | buildingSeen |
Definition in file viewcalculation.cpp.
|
||||||||||||||||||||||||||||
|
calculates the view on a given field. Radar and jamming values must have already been applied to the field!
Definition at line 244 of file viewcalculation.cpp. References tfield::building, BuildingType::buildingheight, chsatellit, chschwimmend, tfield::View::direct, ContainerBase::getOwner(), getPlayersWithSharedViewMask(), Vehicle::height, tfield::View::jamming, tfield::View::mine, tfield::mineowner(), tfield::mines, GameMap::player, tfield::View::satellite, tfield::View::sonar, Player::stat, Player::supervisor, Building::typ, tfield::vehicle, tfield::view, tfield::View::view, tfield::visible, visible_ago, visible_all, visible_not, and visible_now. Referenced by ReplayMapDisplay::displayMovingUnit(), and evaluatevisibilityfield(). |
|
||||||||||||
|
Definition at line 222 of file viewcalculation.cpp. References tfield::view. Referenced by computeview(). |
|
||||||||||||||||
|
completely computes the view
Definition at line 387 of file viewcalculation.cpp. References Vehicle::addview(), clearvisibility(), evaluateviewcalculation(), and Vehicle::getPosition(). Referenced by benchgame(), continuenetworkgame(), destructbuildinglevel2(), diplomaticChange(), execaction_pg(), trunreplay::execnextreplaymove(), execuseraction(), execuseraction2(), GuiFunctions::BuildingConstruction::execute(), SetViewSharing::execute(), getVisibilityStatistics(), loadGame(), loadmap(), loadStartupMap(), putMine(), trunreplay::run(), tgiveunitawaydlg::run(), runai(), StartMultiplayerGame::start(), startnextcampaignmap(), and viewcomp(). |
|
||||||||||||||||||||||||
|
evaluates the view on a part of the map. Radar and jamming values must have already been applied to the field!
Definition at line 344 of file viewcalculation.cpp. References cgp_initialMapVisibility, Player::diplomacy, evaluatevisibilityfield(), Player::exist(), GameMap::getField(), GameMap::getgameparameter(), maxmalq, GameMap::player, DiplomaticStateVector::sharesView(), MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize. |
|
||||||||||||||||
|
evaluates the view on the whole map. Radar and jamming values must have already been applied to the field!
Definition at line 323 of file viewcalculation.cpp. Referenced by RecalculateAreaView::addView(), computeview(), SelfDestruct::destruct(), VehicleAttack::execute(), GuiFunctions::VehicleBuildingGui::execute(), Reinforcements::execute(), ChangeBuildingOwner::execute(), JumpDrive::jump(), and BaseVehicleMovement::moveunitxy(). |
|
||||||||||||||||||||||||
|
evaluates the view on a given field and saves it for that field. Calls calcvisibilityfield for the calculation Radar and jamming values must have already been applied to the field!
Definition at line 299 of file viewcalculation.cpp. References tfield::building, buildingSeen, calcvisibilityfield(), cconnection_seen, Building::connection, tfield::setVisibility(), tfield::visible, visible_ago, visible_all, and visible_now. Referenced by tsearchreactionfireingunits::checkfield(), evaluateviewcalculation(), and BaseVehicleMovement::moveunitxy(). |
|
||||||||||||
|
Definition at line 412 of file viewcalculation.cpp. References Player::diplomacy, Player::exist(), GameMap::player, and DiplomaticStateVector::sharesView(). Referenced by calcvisibilityfield(), and evaluateviewcalculation(). |
|
|
Definition at line 31 of file viewcalculation.cpp. Referenced by BuildingSeen::arm(), and evaluatevisibilityfield(). |
1.4.2