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

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
void constructvehicle (Vehicletype *tnk)
 An old procedure for building vehicle (like turrets) with a unit.
void build_vehicles_reset (void)
 A helper function for constructvehicle.
void putMine (const MapCoordinate &pos, int typ, int delta)
 An old procedure for putting and removing mines.
void destructbuildinglevel2 (int xp, int yp)
 An old procedure for removing a building with a vehicle.
void destructbuildinglevel1 (int xp, int yp)
 An old procedure for removing a building with a vehicle.
void dissectvehicle (Vehicle *eht)
 dissects a vehicle; if you haven't researched this vehicle type you will get some research points for it.
Resources getDestructionCost (Building *bld, Vehicle *veh)
void researchCheck (Player &player)
 checks if a new technology must be chosen by the current player. Runs the appropriate dialogs

Variables

tmoveparams moveparams
 see tmoveparams


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

void build_vehicles_reset void   ) 
 

A helper function for constructvehicle.

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 420 of file controls.cpp.

References actmap, attackpossible28(), beeline(), tfield::building, Vehicletype::HeightChangeMethod::canAttack, Vehicletype::HeightChangeMethod::dist, fatalError(), MapCoordinate3D::getBitmappedHeight(), getdirection(), WindMovement::getDist(), Vehicle::getHeightChange(), ContainerBase::getMap(), tfield::getmovemalus(), getnextfield(), MapCoordinate3D::getNumericalHeight(), ContainerBase::getOwner(), max(), maxmalq, Vehicletype::HeightChangeMethod::moveCost, sidenum, submarineMovement, Vehicle::typ, tfield::vehicle, GameMap::weather, GameMap::Weather::windSpeed, MapCoordinate::x, and MapCoordinate::y.

Referenced by AStar::getMoveCost(), AStar3D::getMoveCost(), and BaseVehicleMovement::moveunitxy().

void constructvehicle Vehicletype tnk  ) 
 

An old procedure for building vehicle (like turrets) with a unit.

void destructbuildinglevel1 int  xp,
int  yp
 

An old procedure for removing a building with a vehicle.

Definition at line 173 of file controls.cpp.

References actmap, and tsearchdestructbuildingfields::initdestructbuilding().

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

void destructbuildinglevel2 int  xp,
int  yp
 

An old procedure for removing a building with a vehicle.

Definition at line 187 of file controls.cpp.

References tfield::a, actmap, Building::actstorage, Vehicle::attacked, tfield::building, GameMap::cleartemps(), cnet_stopenergyinput, computeview(), displaymap(), Resources::energy, Resources::fuel, Building::getCompletion(), getDestructionCost(), getfield(), Vehicle::getResource(), logtoreplayinfo(), Resources::material, tmoveparams::movestatus, Building::netcontrol, Vehicle::networkid, Building::putResource(), rpl_removebuilding3, Building::setCompletion(), Vehicle::setMovement(), and tmoveparams::vehicletomove.

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

void dissectvehicle Vehicle eht  ) 
 

dissects a vehicle; if you haven't researched this vehicle type you will get some research points for it.

Resources getDestructionCost Building bld,
Vehicle veh
 

Definition at line 179 of file controls.cpp.

References destruct_building_fuel_usage, destruct_building_material_get, Resources::fuel, Vehicletype::fuelConsumption, Resources::material, and Vehicle::typ.

Referenced by destructbuildinglevel2(), and trunreplay::execnextreplaymove().

void putMine const MapCoordinate pos,
int  typ,
int  delta
 

An old procedure for putting and removing mines.

Definition at line 299 of file controls.cpp.

References tfield::a, actmap, GameMap::actplayer, Vehicle::ammo, GameMap::cleartemps(), ContainerBase::color, computeview(), cwminen, Vehicle::decreaseMovement(), displaymap(), dispmessage2(), GameMap::getField(), Vehicle::getMovement(), SingleWeapon::getScalarWeaponType(), tputmine::initpm(), logtoreplayinfo(), MineBasePunch, mineputmovedecrease, mineremovemovedecrease, tmoveparams::movestatus, Vehicle::networkid, tfield::removemine(), rpl_putmine2, rpl_removemine, tputmine::run(), Vehicle::setMovement(), SingleWeapon::shootable(), Vehicle::typ, tmoveparams::vehicletomove, UnitWeapon::weapon, Vehicletype::weapons, Vehicle::weapstrength, MapCoordinate::x, and MapCoordinate::y.

Referenced by GuiFunctions::PutMine::execute(), GuiFunctions::PutAntiTankMine::execute(), GuiFunctions::PutAntiPersonalMine::execute(), GuiFunctions::PutAntiShipMine::execute(), GuiFunctions::PutAntiSubMine::execute(), and GuiFunctions::RemoveMine::execute().

void researchCheck Player player  ) 
 

checks if a new technology must be chosen by the current player. Runs the appropriate dialogs

Definition at line 655 of file controls.cpp.

References Research::activetechnology, Research::addtechnology(), anyTechAvailable(), Research::developedTechnologies, NewVehicleTypeDetection::evalbuffer(), Technology::id, logtoreplayinfo(), Research::progress, Technology::researchpoints, rpl_techResearched, setupNextTech(), and showtechnology().

Referenced by hookGuiToMap().

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 394 of file controls.cpp.

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

Referenced by AStar3D::dist().


Variable Documentation

tmoveparams moveparams
 

see tmoveparams

Definition at line 62 of file controls.cpp.

Referenced by authenticateUser(), GuiFunctions::Cancel::available(), GuiFunctions::Movement::available(), GuiFunctions::Ascend::available(), GuiFunctions::Descend::available(), GuiFunctions::EndTurn::available(), GuiFunctions::Attack::available(), GuiFunctions::PowerOn::available(), GuiFunctions::PowerOff::available(), GuiFunctions::UnitInfo::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::OpenContainer::available(), GuiFunctions::EnableReactionfire::available(), GuiFunctions::DisableReactionfire::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::RefuelUnit::available(), GuiFunctions::PutMine::available(), GuiFunctions::PutGroundMine::available(), GuiFunctions::PutAntiShipMine::available(), GuiFunctions::PutAntiSubMine::available(), GuiFunctions::RemoveMine::available(), GuiFunctions::BuildObject::available(), GuiFunctions::BuildVehicle::available(), GuiFunctions::BuildingConstruction::available(), GuiFunctions::ConstructBuilding::available(), GuiFunctions::InternalAmmoTransferDialog::available(), GuiFunctions::BuildingConstruction::eval(), GuiFunctions::Cancel::execute(), GuiFunctions::Movement::execute(), GuiFunctions::Ascend::execute(), GuiFunctions::Descend::execute(), GuiFunctions::Attack::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::VehicleBuildingGui::execute(), GuiFunctions::BuildVehicle::execute(), GuiFunctions::BuildingConstruction::execute(), GuiFunctions::ConstructBuilding::execute(), gamethread(), GuiFunctions::BuildingConstruction::init(), loadGame(), resetActions(), GuiFunctions::BuildingConstruction::setBuilding(), GuiFunctions::BuildingConstruction::setup(), and StartMultiplayerGame::start().


Generated on Tue Jun 24 01:39:14 2008 for Advanced Strategic Command by  doxygen 1.4.2