GameMap Class Reference

The map. THE central structure of ASC, which holds everything not globally available together. More...

#include <gamemap.h>

List of all members.

Turn Management

These methods control the game advance of a player to the next player

static SigC::Signal1< void,
GameMap & > 
sigMapCreation
static SigC::Signal1< void,
GameMap & > 
sigMapDeletion
static SigC::Signal2< void,
GameMap *, Player & > 
sigPlayerTurnEndsStatic
SigC::Signal1< void, Player & > sigPlayerTurnBegins
SigC::Signal1< void, Player & > sigPlayerUserInteractionBegins
SigC::Signal1< void, Player & > sigPlayerUserInteractionEnds
SigC::Signal1< void, Player & > sigPlayerTurnEnds
SigC::Signal1< void, Player & > sigPlayerTurnHasEnded
SigC::Signal1< void, Player & > sigMapWon
SigC::Signal1< void, const
MapCoodinateVector & > 
sigCoordinateShift
 called when the map is resized and all coordinates have to be adjusted
SigC::Signal0< void > newRound
 called when a new round starts (after switching from player 7 to player 0 )
bool continueplaying
 if a player has won a singleplayer map, but wants to continue playing without any enemies, this will be set to 1
void startGame ()
 prepares a new game for being played
void beginTurn ()
 called when a player starts his turn
void endTurn ()
 called after a player ends his turn
void endRound ()
 called between endTurn() of player 7 and the next turn of player 0

Public Types

enum  State { Normal, Replay, Destruction }
typedef PointerList< Event * > Events

Public Member Functions

void setServerMapID (int id)
int getServerMapID () const
int width () const
int height () const
void setTitle (const ASCString &title)
ASCString getTitle () const
int getPlayerCount () const
PlayergetPlayer (PlayerID p)
const PlayergetPlayer (PlayerID p) const
PlayergetCurrentPlayer ()
const PlayergetCurrentPlayer () const
int getNeutralPlayerNum () const
MapCoordinategetCursor ()
MapCoordinate getCursor () const
int eventpassed (int saveas, int action, int mapid)
int eventpassed (int id, int mapid)
void allocateFields (int x, int y, TerrainType::Weather *terrain=NULL)
int getPlayerView () const
 the player which is currently viewing the map.
void setPlayerView (int player)
 GameMap (void)
VehiclegetUnit (int x, int y, int nwid)
VehiclegetUnit (int nwid, bool consistencyCheck=true)
const VehiclegetUnit (int nwid, bool consistencyCheck=true) const
ContainerBasegetContainer (int nwid)
const ContainerBasegetContainer (int nwid) const
int getgameparameter (GameParameter num) const
void setgameparameter (GameParameter num, int value)
void cleartemps (int b=-1, int value=0)
bool isResourceGlobal (int resource)
MapFieldgetField (int x, int y)
const MapFieldgetField (int x, int y) const
MapFieldgetField (const MapCoordinate &pos)
VisibilityStates getInitialMapVisibility (int player)
int resize (int top, int bottom, int left, int right)
 resizes the map. Positive numbers enlarge the map in that direction
void calculateAllObjects (void)
void read (tnstream &stream)
void write (tnstream &stream)
 ~GameMap ()
int random (int max)
 generated a pseudo-random number with the map-internal seed
void guiHooked ()
bool getGuiHooked ()
PropertiesgetProperties ()
int getMemoryFootprint () const
Access to item types
pterraintype getterraintype_byid (int id)
ObjectTypegetobjecttype_byid (int id)
const ObjectTypegetobjecttype_byid (int id) const
VehicleTypegetvehicletype_byid (int id)
const VehicleTypegetvehicletype_byid (int id) const
BuildingTypegetbuildingtype_byid (int id)
const BuildingTypegetbuildingtype_byid (int id) const
const Technologygettechnology_byid (int id)
pterraintype getterraintype_bypos (int pos)
ObjectTypegetobjecttype_bypos (int pos)
VehicleTypegetvehicletype_bypos (int pos)
BuildingTypegetbuildingtype_bypos (int pos)
const Technologygettechnology_bypos (int pos)
int getTerrainTypeNum ()
int getObjectTypeNum ()
int getVehicleTypeNum ()
int getBuildingTypeNum ()
int getTechnologyNum ()

Public Attributes

int xsize
 the size of the map
int ysize
MapFieldfield
 the array of fields
ASCString codeWord
 the codeword for accessing a map in a campaign
ASCString maptitle
 the title of the map
GameMap::Campaign campaign
signed char actplayer
 the player who is currently making his moves (may be human or AI)
GameTime time
 the time in the game, mesured in a turns and moves
GameMap::Weather weather
int _resourcemode
 how are Resources handled on this map 0= "ASC mode": complex system with mineral resources etc 1= "BI mode": simpler system like in Battle Isle
Player player [9]
int eventID
Events events
vector< GameTimeeventTimes
GameMap::IDManager idManager
char levelfinished
enum GameMap::State state
GameMap::ResourceTribute tribute
 The tribute can not only be used to demand resources from enemies but also to transfer resources to allies.
MessagePntrContainer unsentmessage
 the list of messages that were written this turn and are waiting to be processed at the end of the turn
bool __loadunsentmessage
MessageContainer messages
 these are the messages themselfs. A MessagePntrContainer only stores pointers to message body which are archived here
bool __loadmessages
int messageid
 each message has an identification number (which is incremented with each message) for referencing it in files. The id of the last message is stored here
bool ___loadJournal
 temporary variables for loading the map
bool ___loadNewJournal
bool ___loadtitle
bool ___loadLegacyNetwork
ASCString gameJournal
ASCString newJournal
Password supervisorpasswordcrc
ActionContainer actions
 Records all action that have been done for undo/redo purposes.
ActionRecorderactionRecorder
AbstractTaskContainertasks
ReplayInforeplayinfo
bool __loadreplayinfo
 a helper variable to store some information during the loading process. No usage outside.
GameTime lastjournalchange
Resources bi_resource [8]
 in BI resource mode ( see _resourcemode , isResourceGlobal ) , this is where the globally available resources are stored. Note that not all resources are globally available.
GameMap::PreferredFilenames preferredFileNames
int graphicset
 the ID of the graphic set
int gameparameter_num
int * game_parameter
ASCString nativeMessageLanguage
 the language string that describes the messages which are saved in the game events For example: en_US All translations will be maintained in seperate files
int mineralResourcesDisplayed
GameMap::ArchivalInformation archivalInformation
GameMap::UnitProduction unitProduction
 specifies which vehicle types can be constructed by construction units
OverviewMapHolder overviewMapHolder
bool loadOldEvents
 just a helper variable for loading the map; no function outside;
Properties properties
 general key/value storage, primarily for Lua scripts
GameTransferMechanismnetwork
PackageDatapackageData

Static Public Attributes

static const int maxTotalPlayers = 8

Classes

class  ArchivalInformation
struct  Campaign
class  IDManager
struct  PreferredFilenames
class  ReplayInfo
class  ResourceTribute
 The tribute can not only be used to demand resources from enemies but also to transfer resources to allies. More...
class  UnitProduction
 specifies which vehicle types can be constructed by construction units More...
struct  Weather


Detailed Description

The map. THE central structure of ASC, which holds everything not globally available together.

Definition at line 179 of file gamemap.h.


Member Typedef Documentation

typedef PointerList<Event*> GameMap::Events

Definition at line 280 of file gamemap.h.


Member Enumeration Documentation

enum GameMap::State

Enumerator:
Normal 
Replay  map is currently used to run a replay. Some ingame events are deactivated
Destruction  only to be used by units and buildings. To speed up map destruction, the view won't be recalculated. No signals will be send when units & buildings are destroyed, either

Definition at line 313 of file gamemap.h.


Constructor & Destructor Documentation

GameMap::GameMap ( void   ) 

Definition at line 224 of file gamemap.cpp.

References _resourcemode, GameTime::abstime, actplayer, cgp_objectsDestroyedByTerrain, Research::chainToMap(), Player::computer, continueplaying, eventID, field, game_parameter, gameparameter_num, graphicset, Player::human, lastjournalchange, levelfinished, messageid, mineralResourcesDisplayed, nativeMessageLanguage, Normal, player, replayinfo, Player::research, setgameparameter(), sigMapCreation, Player::stat, state, time, xsize, and ysize.

GameMap::~GameMap (  ) 

Definition at line 1493 of file gamemap.cpp.

References actionRecorder, Player::ai, cbbuildingentry, Destruction, field, game_parameter, getTerrainBitType(), network, player, replayinfo, sigMapDeletion, state, tasks, and MapField::vehicle.


Member Function Documentation

void GameMap::setServerMapID ( int  id  )  [inline]

Definition at line 185 of file gamemap.h.

int GameMap::getServerMapID (  )  const [inline]

Definition at line 186 of file gamemap.h.

int GameMap::width (  )  const [inline]

Definition at line 193 of file gamemap.h.

References xsize.

int GameMap::height (  )  const [inline]

Definition at line 194 of file gamemap.h.

References ysize.

void GameMap::setTitle ( const ASCString title  )  [inline]

Definition at line 205 of file gamemap.h.

References maptitle.

ASCString GameMap::getTitle (  )  const [inline]

Definition at line 206 of file gamemap.h.

References maptitle.

int GameMap::getPlayerCount (  )  const [inline]

Definition at line 245 of file gamemap.h.

Referenced by AdminGameWindow::AdminGameWindow(), AllianceSetupWidget::AllianceSetupWidget(), AllianceSetupWidget::Apply(), NextTurnStrategy_OnlyCampaign::authenticate(), calcvisibilityfield(), cancelResearch(), checkForUniqueUnitIDs(), clearvisibility(), computeview(), countPlayers(), editPlayerData(), EmailSetupWidget::EmailSetupWidget(), endRound(), evaluateviewcalculation(), EventEditor::EventEditor(), LoseMap::execute(), tsearchreactionfireingunits::finalCheck(), findNextPlayer(), Player::getHumanPlayerNum(), getPlayerStrength(), getPlayersWithSharedViewMask(), getVisibilityStatistics(), PlayerSetupWidget::guessHeight(), tcomputebuildingview::init(), tcomputevehicleview::init(), k_loadmap(), AllianceSetupWidget::linearize(), MemoryMeasurement::measure(), MessageLineWidget::MessageLineWidget(), VisibilityLayer::paintSingleField(), PlayerColorPanel::PlayerColorPanel(), PlayerSetupWidget::PlayerSetupWidget(), WholeMapRenderer::renderVisibility(), Player::resetTribute(), MapField::resetView(), MoveUnit::runAction(), FileTransfer::send(), setDiplomacy(), setResearchGoal(), DisplayImmediateMessage::setup(), DiplomaticStateVector::swap(), Player::swap(), transformMap(), DiplomaticStateVector::turnBegins(), DestructContainer::undoAction(), viewterraininfo(), and writeMessageFile().

Player& GameMap::getPlayer ( PlayerID  p  )  [inline]

Definition at line 247 of file gamemap.h.

References PlayerID::getID(), and player.

Referenced by attackpossible(), Mine::attacksunit(), NextTurnStrategy_OnlyCampaign::authenticate(), GuiFunctions::SelfDestructIcon::available(), GuiFunctions::InternalAmmoTransferDialog::available(), calcMoveMalus(), Vehicle::ReactionFire::canPerformAttack(), ServiceChecker::check(), checkForUniqueUnitIDs(), checkforvictory(), createContext(), createFollowerContext(), trunreplay::createReplayContext(), createTestingContext(), BuildingItem::display(), VehicleItem::display(), doresearch(), editPlayerData(), endRound(), trunreplay::execnextreplaymove(), ChangePlayerState::execute(), ChangeDiplomaticStatus::execute(), LoseMap::execute(), fieldAccessible(), tsearchreactionfireingunits::finalCheck(), DirectResearchCommand::getAvailableTechnologies(), TransferControlCommand::getDescription(), DiplomacyCommand::getDescription(), Player::getHumanPlayerNum(), MessageLineWidget::getName(), ContainerBase::getOwningPlayer(), AllEnemyBuildingsDestroyed::getState(), getVisibilityStatistics(), DirectResearchCommand::go(), DiplomacyCommand::go(), CancelResearchCommand::go(), k_loadmap(), MemoryMeasurement::measure(), MessageLineWidget::MessageLineWidget(), ResourceGraphLayer::paintSingleField(), VisibilityLayer::paintSingleField(), PlayerColorPanel::PlayerColorPanel(), CancelResearchCommand::preCheck(), WholeMapRenderer::renderVisibility(), trunreplay::run(), MoveUnit::runAction(), ChangeDiplomaticState::runAction(), FileTransfer::send(), setDiplomacy(), setResearchGoal(), DisplayImmediateMessage::setup(), showAllUnitPositions(), PackageManager::storeData(), DiplomaticStateVector::swap(), transferControl(), transformMap(), DiplomaticStateVector::turnBegins(), DirectResearchCommand::undoAction(), ChangeDiplomaticState::undoAction(), CancelResearchCommand::undoAction(), ContainerBase::vehicleFit(), ContainerBase::vehicleLoadable(), viewterraininfo(), viewUnitSetinfo(), and writeMessageFile().

const Player& GameMap::getPlayer ( PlayerID  p  )  const [inline]

Definition at line 252 of file gamemap.h.

References PlayerID::getID(), and player.

Player& GameMap::getCurrentPlayer (  )  [inline]

Definition at line 258 of file gamemap.h.

References actplayer, and player.

Referenced by ActionWidget::ActionWidget(), GuiFunctions::OpenContainer::available(), ResearchWindow::available(), ResourceInfoWindow::available(), BuildingControlWindow::available(), NetControlWindow::available(), WindPowerWindow::available(), SolarPowerWindow::available(), checkType(), editAlliances(), LoseMap::execute(), NextMap::execute(), executeUserAction(), factoryProductionInstanceExists(), getInstances(), CargoDialog::getResourceValue(), loadGame(), BuildProductionLineCommand::productionLinesBuyable(), tsavegameloaders::savegame(), showCargoSummary(), VehicleCounterFactory::spawnNextItem(), UnitListFactory::spawnNextItem(), AvailableProductionItemFactory::spawnNextItem(), unitProductionAnalysis(), vehicleOwned(), and viewMiningPower().

const Player& GameMap::getCurrentPlayer (  )  const [inline]

Definition at line 263 of file gamemap.h.

References actplayer, and player.

int GameMap::getNeutralPlayerNum (  )  const [inline]

Definition at line 268 of file gamemap.h.

Referenced by GuiFunctions::OpenContainer::available().

MapCoordinate & GameMap::getCursor (  ) 

Definition at line 930 of file gamemap.cpp.

References actplayer, Player::cursorPos, player, MapCoordinate::x, and MapCoordinate::y.

Referenced by GuiIconHandler::checkForKey(), NewGuiHost::evalCursor(), ASC_MainScreenWidget::eventKeyDown(), TargetCoordinateLocator::eventMouseButtonDown(), execaction(), execaction_pg(), executeUserAction(), getactfield(), getCursorPosition(), getSelectedField(), getSelectedUnit(), SelectFromMap::listItemClicked(), loadGame(), ReinforcementSelector::mark(), SelectFromMap::mark(), DashboardPanel::painter(), BuildingItem::place(), placeCurrentItem(), MapDisplayPG::Cursor::pos(), positionCursor(), removeCurrentItem(), trunreplay::run(), tputresourcesdlg::run(), SelectFromMap::SelectFromMap(), setCursorPosition(), showAllUnitPositions(), showbdtbits(), MapSwitcher::toggle(), unitInfoDialog(), Maped_MainScreenWidget::updateStatusBar(), and viewUnitSetinfo().

MapCoordinate GameMap::getCursor (  )  const

Definition at line 945 of file gamemap.cpp.

References actplayer, Player::cursorPos, player, MapCoordinate::x, and MapCoordinate::y.

int GameMap::eventpassed ( int  saveas,
int  action,
int  mapid 
)

Definition at line 1130 of file gamemap.cpp.

int GameMap::eventpassed ( int  id,
int  mapid 
)

Definition at line 1137 of file gamemap.cpp.

void GameMap::allocateFields ( int  x,
int  y,
TerrainType::Weather terrain = NULL 
)

Definition at line 983 of file gamemap.cpp.

References OverviewMapHolder::connect(), field, overviewMapHolder, MapField::setMap(), and MapField::setparams().

Referenced by buildemptymap(), CopyMap::copy(), generatemap(), and tspfldloaders::readfields().

int GameMap::getPlayerView (  )  const

the player which is currently viewing the map.

During replays, for example, this will be different from the player that moves units -1 means: everything is visible -2 means: nothing is visible

Definition at line 1026 of file gamemap.cpp.

Referenced by tsearchreactionfireingunits::attack(), checkforvictory(), createContext(), createFollowerContext(), trunreplay::createReplayContext(), createTestingContext(), ReplayMapDisplay::displayActionCursor(), ReplayMapDisplay::displayMovingUnit(), PG_MapDisplay::displayMovingUnit(), ReplayMapDisplay::displayPosition(), MapDisplayPG::displayUnitMovement(), DashboardPanel::eval(), trunreplay::execnextreplaymove(), AI::getContext(), DashboardPanel::painter(), VisibilityLayer::paintSingleField(), ReplayMapDisplay::playPositionalSound(), WholeMapRenderer::render(), WholeMapRenderer::renderVisibility(), DashboardPanel::showUnitData(), tcomputeview::tcomputeview(), OverviewMapHolder::updateField(), MapDisplayPG::updateMap(), viewterraininfo(), viewunreadmessages(), and trunreplay::wait().

void GameMap::setPlayerView ( int  player  ) 

Definition at line 1036 of file gamemap.cpp.

Referenced by authenticateUser(), next_turn(), trunreplay::run(), and runai().

Vehicle * GameMap::getUnit ( int  x,
int  y,
int  nwid 
)

Definition at line 1234 of file gamemap.cpp.

References ContainerBase::findUnit(), MapField::getContainer(), getField(), Vehicle::networkid, and MapField::vehicle.

Referenced by SpecificUnitEntersPolygon::arm(), UnitDestroyed::arm(), UnitConquered::arm(), UnitLost::arm(), cargoUnitMove(), compareMapResources(), constructBuilding(), trunreplay::execnextreplaymove(), SpecificUnitEntersPolygon::fieldOperator(), tsearchreactionfireingunits::finalCheck(), getContainer(), TrainUnitCommand::getDescription(), RecycleUnitCommand::getDescription(), ReactionFireSwitchCommand::getDescription(), PowerGenerationSwitchCommand::getDescription(), SpecificUnitEntersPolygon::getDetailledName(), UnitTrigger::getName(), ConstructUnitCommand::getProducedUnit(), UnitDestroyed::getState(), UnitConquered::getState(), UnitLost::getState(), UnitCommand::getUnit(), UnitAction::getUnit(), SpawnUnit::getUnit(), UnitCommand::getUnitTypeID(), TrainUnitCommand::go(), RepairUnitCommand::go(), RecycleUnitCommand::go(), CargoMoveCommand::go(), AttackCommand::go(), Vehicle::newFromStream(), putMineFunc(), recycleUnit(), removeMineFunc(), renameContainer(), repairUnit(), MoveUnit::runAction(), selectunit(), trainUnit(), unitAttack(), unitDestructBuilding(), unitJump(), unitMovement(), unitPowerGenerationEnable(), unitPutObject(), and unitReactionFireEnable().

Vehicle * GameMap::getUnit ( int  nwid,
bool  consistencyCheck = true 
)

Definition at line 1198 of file gamemap.cpp.

References displaymessage(), idManager, player, Player::vehicleList, and GameMap::IDManager::vehicleLookupCache.

const Vehicle * GameMap::getUnit ( int  nwid,
bool  consistencyCheck = true 
) const

Definition at line 1216 of file gamemap.cpp.

References displaymessage(), idManager, player, Player::vehicleList, and GameMap::IDManager::vehicleLookupCache.

ContainerBase * GameMap::getContainer ( int  nwid  ) 

Definition at line 1250 of file gamemap.cpp.

References MapField::building, getField(), and getUnit().

Referenced by buildProductionLine(), compareMapResources(), constructUnit(), trunreplay::execnextreplaymove(), ContainerCommand::getContainer(), ContainerAction::getContainer(), recycleUnit(), removeProductionLine(), repairBuilding(), repairUnit(), UnitFieldRegistration::runAction(), SpawnUnit::runAction(), selfDestruct(), serviceCommand(), setResourceProcessingRate(), trainUnit(), transferControl(), UnitFieldRegistration::undoAction(), and DestructContainer::undoAction().

const ContainerBase * GameMap::getContainer ( int  nwid  )  const

Definition at line 1265 of file gamemap.cpp.

References MapField::building, getField(), and getUnit().

int GameMap::getgameparameter ( GameParameter  num  )  const

Definition at line 1066 of file gamemap.cpp.

References GameParameterSettings::defaultValue, game_parameter, gameparameter_num, gameparameternum, and gameParameterSettings.

Referenced by AdminGameWindow::AdminGameWindow(), TransferControlCommand::avail(), TrainUnitCommand::avail(), ConstructBuildingCommand::avail(), tfight::calc(), Event::check(), AttackFormula::defense_experience(), ReplayMapDisplay::displayMovingUnit(), endRound(), evaluateviewcalculation(), Event::execute(), executeUserAction(), AStar3D::findPath(), GameParameterEditorWidget::GameParameterEditorWidget(), Building::getArmor(), getInitialMapVisibility(), ConstructUnitCommand::getProduceableVehicles(), TrainUnitCommand::go(), ConstructUnitCommand::go(), isResourceGlobal(), k_loadmap(), Mine::Mine(), VehicleItem::place(), ClipBoardBase::place(), MapField::putmine(), tspfldloaders::readfields(), Building::repairableDamage(), sendGameParameterAsMail(), MapField::setparams(), startGame(), AttackFormula::strength_experience(), tcomputeview::testfield(), ContainerConstControls::unitProductionPrerequisites(), ConstructUnitCommand::unitProductionPrerequisites(), Vehicle::vehicleconstructable(), viewterraininfo(), write(), and writeGameParametersToString().

void GameMap::setgameparameter ( GameParameter  num,
int  value 
)

Definition at line 1077 of file gamemap.cpp.

References game_parameter, gameparameter_num, gameparameternum, and gameParameterSettings.

Referenced by GameParameterEditorWidget::Apply(), ChangeGameParameter::execute(), GameMap(), ImportBiMap::preparemap(), and read().

void GameMap::cleartemps ( int  b = -1,
int  value = 0 
)

Definition at line 961 of file gamemap.cpp.

References field, MapField::temp, and MapField::temp2.

Referenced by GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildVehicleCommand::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::RemoveMine::execute(), GuiFunctions::PutMineStage2::execute(), GuiFunctions::RefuelUnitDialogCommand::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::MovementBase::execute(), GuiFunctions::Cancel::execute(), GuiFunctions::AttackGui::execute(), CargoGuiFunctions::Movement::execute(), AStar3D::findAllAccessibleFields(), AStar::findAllAccessibleFields(), AStar::findPath(), resetActiveGuiAction(), AI::showFieldInformation(), SelectFromMap::showFieldMarking(), MapNetwork::start(), testDebugFunction(), AStar::~AStar(), AStar3D::~AStar3D(), and SelectFromMap::~SelectFromMap().

bool GameMap::isResourceGlobal ( int  resource  ) 

Definition at line 1043 of file gamemap.cpp.

References _resourcemode, cgp_globalfuel, and getgameparameter().

Referenced by compareMapResources(), Building::convert(), ResourceChangeNet::getresource(), StaticResourceNet::getresource(), resourceAnalysis(), transfer_all_outstanding_tribute(), and ResourceInfoWindow::update().

MapField * GameMap::getField ( int  x,
int  y 
)

Definition at line 1004 of file gamemap.cpp.

References field.

Referenced by SelectUnitFromMap::accept(), SelectBuildingFromMap::accept(), SelectFromMap::accept(), BuildingSeen::arm(), BuildingLost::arm(), BuildingConquered::arm(), tsearchreactionfireingunits::attack(), attackpossible(), ReactionFireSwitchCommand::avail(), DestructUnitCommand::avail(), ContextMenu::DeleteAllObjects::available(), ContextMenu::DeleteTopObject::available(), ContextMenu::ChangeMineStrength::available(), ContextMenu::DeleteMine::available(), ContextMenu::ContainerProduction::available(), ContextMenu::DeleteBuilding::available(), ContextMenu::DeleteVehicle::available(), ContextMenu::ContainerCargo::available(), ContextMenu::ContainerProperties::available(), GuiFunctions::SelfDestructIcon::available(), GuiFunctions::ConstructBuilding::available(), GuiFunctions::BuildVehicleCommand::available(), GuiFunctions::BuildObject::available(), GuiFunctions::PutMine::available(), GuiFunctions::RefuelUnitDialogCommand::available(), GuiFunctions::RefuelUnitCommand::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::DisableReactionfire::available(), GuiFunctions::EnableReactionfire::available(), GuiFunctions::OpenContainer::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::UnitInfo::available(), GuiFunctions::PowerSwitch::available(), GuiFunctions::Attack::available(), GuiFunctions::Descend::available(), GuiFunctions::Ascend::available(), GuiFunctions::MovementBase::available(), ConstructBuildingCommand::buildingFits(), calcMoveMalus(), MoveUnitCommand::calcPath(), calculateallobjects(), ForestCalculation::calculateforest(), calculateobject(), Vehicle::canMove(), tsearchreactionfireingunits::checkfield(), GuiIconHandler::checkForKey(), checkunitsforremoval(), clearField(), computeview(), MapDisplayPG::displayMovementStep(), ReplayMapDisplay::displayMovingUnit(), PG_MapDisplay::displayMovingUnit(), Vehicle::endOwnTurn(), endRound(), endTurn(), DashboardPanel::eval(), NewGuiHost::evalCursor(), evaluateviewcalculation(), execaction_pg(), trunreplay::execnextreplaymove(), GuiFunctions::SelfDestructIcon::execute(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::PutMine::execute(), GuiFunctions::RefuelUnitDialogCommand::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DisableReactionfire::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::OpenContainer::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::PowerSwitch::execute(), GuiFunctions::Attack::execute(), GuiFunctions::MovementBase::execute(), Reinforcements::execute(), AddResources::execute(), AddProductionCapability::execute(), ChangeBuildingOwner::execute(), ChangeBuildingDamage::execute(), CargoGuiFunctions::Movement::execute(), executeUserAction(), ConstructUnitCommand::externalConstructionAvail(), ServiceTargetSearcher::externallyAvailable(), ResourceNet::fieldavail(), RemoveAllObjects::fieldOperator(), AddObject::fieldOperator(), MapChange::fieldOperator(), WeatherChange::fieldOperator(), AnyUnitEntersPolygon::fieldOperator(), SpecificUnitEntersPolygon::fieldOperator(), CopyMap::fieldOperator(), JumpDriveCommand::fieldReachable(), tsearchreactionfireingunits::finalCheck(), AStar3D::findAllAccessibleFields(), AStar::findAllAccessibleFields(), AStar3D::findPath(), AStar::findPath(), Vehicle::freeWeight(), getactfield(), SpawnBuilding::getBuilding(), getContainer(), AStar::getDistance(), ForestCalculation::Smoothing::getfield(), getField(), Building::getField(), DestructBuildingCommand::getFields(), getmaxwindspeedforunit(), AStar3D::getMoveCost(), AStar::getMoveCost(), HiddenAStar3D::getMoveCost(), HiddenAStar::getMoveCost(), AntiMineAStar3D::getMoveCost(), StratAStar3D::getMoveCost(), StratAStar::getMoveCost(), GuiFunctions::RepairUnit::getName(), GuiFunctions::AttackGui::getName(), BuildingPositionTrigger::getName(), SolarPowerplant::getPlus(), Vehicle::getPosition3D(), getSelectedField(), getSelectedUnit(), BuildingSeen::getState(), BuildingDestroyed::getState(), BuildingConquered::getState(), ContextMenu::ContainerCargo::getText(), ContextMenu::ContainerProperties::getText(), getUnit(), getVisibilityStatistics(), PutMineCommand::go(), DestructBuildingCommand::go(), AttackCommand::go(), tcomputebuildingview::init(), tcomputevehicleview::init(), MoveUnitCommand::longDistAvailable(), NewGuiHost::mapIconProcessing(), MemoryMeasurement::measure(), MirrorMap::mirrorX(), MirrorMap::mirrorY(), UnitInfoPanel::onClick(), UnitWeaponRangeLayer::operateField(), UnitMovementRangeLayer::operateField(), DashboardPanel::painter(), ShowPolygonUsingTemps::paintPolygon(), MapRenderer::paintTerrain(), CopyMap::paste(), MineItem::place(), TerrainItem::place(), ObjectItem::place(), BuildingItem::place(), VehicleItem::place(), ClipBoardBase::place(), placeBuilding(), placeObject(), placeTerrain(), placeUnit(), ReplayMapDisplay::playPositionalSound(), putbuilding(), tdrawgettempline::putpix8(), ObjectItem::remove(), WholeMapRenderer::renderVisibility(), Player::resetView(), resize(), resourceComparison(), VehicleAttackAction::runAction(), UnitFieldRegistration::runAction(), SpawnUnit::runAction(), SpawnObject::runAction(), SpawnMine::runAction(), SpawnBuilding::runAction(), RemoveObject::runAction(), RemoveMine::runAction(), MoveUnit::runAction(), DestructContainer::runAction(), ChangeView::runAction(), MapNetwork::searchAllVehiclesNextToBuildings(), MapNetwork::searchbuilding(), MapNetwork::searchfield(), MapNetwork::searchvehicle(), selectunit(), PutMineCommand::setCreationTarget(), MoveUnitCommand::setDestination(), setLocalizedContainerName(), PutMineCommand::setRemovalTarget(), PutObjectCommand::setTarget(), AttackCommand::setTarget(), DestructBuildingCommand::setTargetPosition(), ConstructUnitCommand::setTargetPosition(), ConstructBuildingCommand::setTargetPosition(), tunitattacksobject::setup(), tmineattacksunit::setup(), tunitattacksbuilding::setup(), setweatherall(), showbdtbits(), AI::showFieldInformation(), SelectFromMap::showFieldMarking(), Vehicle::spawnMoveObjects(), MapNetwork::start(), ServiceTargetSearcher::startSearch(), PackageManager::storeData(), testDebugFunction(), tcomputeview::testfield(), WeaponRange::testfield(), FindUnitPlacementPos::testfield(), tputresources::testfield(), MiningStation::testfield(), GetMiningInfo::testfield(), SearchReconquerBuilding::testfield(), transformMap(), UnitFieldRegistration::undoAction(), SpawnUnit::undoAction(), SpawnObject::undoAction(), SpawnMine::undoAction(), SpawnBuilding::undoAction(), RemoveObject::undoAction(), RemoveMine::undoAction(), DiscoverResources::undoAction(), DestructContainer::undoAction(), ChangeView::undoAction(), UnitAttacksUnit_FakeHemming::UnitAttacksUnit_FakeHemming(), unitInfoDialog(), WeatherField::update(), OverviewMapHolder::updateField(), CargoDialog::updateVariables(), Vehicle::vehicleconstructable(), VehicleCounterFactory::VehicleCounterFactory(), viewterraininfo(), viewUnitSetinfo(), trunreplay::wait(), and WeatherField::WeatherField().

const MapField * GameMap::getField ( int  x,
int  y 
) const

Definition at line 1012 of file gamemap.cpp.

References field.

MapField * GameMap::getField ( const MapCoordinate pos  ) 

Definition at line 1021 of file gamemap.cpp.

References getField(), MapCoordinate::x, and MapCoordinate::y.

void GameMap::startGame (  ) 

prepares a new game for being played

Definition at line 1899 of file gamemap.cpp.

References bi_resource, cgp_researchOutputMultiplier, Resources::fuel, getgameparameter(), levelfinished, Resources::material, newRound, player, Player::research, GameTime::set(), Research::setMultiplier(), and time.

void GameMap::beginTurn (  ) 

called when a player starts his turn

Definition at line 1282 of file gamemap.cpp.

References actplayer, exist(), Player::off, player, replayinfo, sigPlayerTurnBegins, and Player::vehicleList.

Referenced by iterateToNextPlayer(), next_turn(), and skipTurn().

void GameMap::endTurn (  ) 

called after a player ends his turn

Definition at line 1300 of file gamemap.cpp.

References actions, actplayer, Player::ASCversion, ActionContainer::breakUndo(), Player::buildingList, UnitHooveringLogic::calcFuelUsage(), checkunitsforremoval(), chhochfliegend, chtieffliegend, GameMap::ReplayInfo::closeLogging(), Player::PlayTime::date, Resources::Fuel, getField(), getmaxwindspeedforunit(), getNumericVersion(), getUnitReference(), maxwindspeed, player, Player::playTime, replayinfo, sigPlayerTurnEnds, sigPlayerTurnEndsStatic, sigPlayerTurnHasEnded, time, GameTime::turn(), Player::PlayTime::turn, MapField::vehicle, Player::vehicleList, weather, and GameMap::Weather::windSpeed.

Referenced by iterateToNextPlayer(), next_turn(), trunreplay::run(), and skipTurn().

void GameMap::endRound (  ) 

called between endTurn() of player 7 and the next turn of player 0

Definition at line 1369 of file gamemap.cpp.

References actplayer, Player::buildingList, cgp_objectGrowthMultiplier, doresearch(), exist(), getField(), getgameparameter(), getPlayer(), getPlayerCount(), logMessage(), Player::off, player, MapField::resetView(), GameTime::set(), time, GameTime::turn(), and Player::vehicleList.

Referenced by iterateToNextPlayer(), and trunreplay::run().

VisibilityStates GameMap::getInitialMapVisibility ( int  player  ) 

Definition at line 1938 of file gamemap.cpp.

References cgp_initialMapVisibility, getgameparameter(), and visible_ago.

Referenced by fieldVisibility(), and fieldvisiblenow().

int GameMap::resize ( int  top,
int  bottom,
int  left,
int  right 
)

resizes the map. Positive numbers enlarge the map in that direction

Definition at line 1632 of file gamemap.cpp.

References Player::buildingList, calculateallobjects(), field, getField(), getterraintype_byid(), overviewMapHolder, player, OverviewMapHolder::resetSize(), MapField::setMap(), sigCoordinateShift, MapField::typ, Player::vehicleList, and TerrainType::weather.

Referenced by MirrorMap::mirrorX(), CopyMap::paste(), InsertBiMap::preparemap(), and ResizeMap::run().

void GameMap::calculateAllObjects ( void   ) 

Definition at line 999 of file gamemap.cpp.

References calculateallobjects().

Referenced by Building::chainbuildingtofield(), and Reinforcements::execute().

void GameMap::read ( tnstream stream  ) 

Definition at line 294 of file gamemap.cpp.

References ___loadJournal, ___loadLegacyNetwork, ___loadNewJournal, ___loadtitle, Player::__dissectionsToLoad, __loadmessages, Player::__loadoldmessage, __loadreplayinfo, Player::__loadsentmessage, Player::__loadunreadmessage, __loadunsentmessage, _resourcemode, GameTime::abstime, actionRecorder, actions, actplayer, Player::ai, archivalInformation, Player::ASCversion, GameMap::ArchivalInformation::author, GameMap::Campaign::avail, bi_resource, campaign, PackageManager::checkGame(), codeWord, continueplaying, Player::cursorPos, GameMap::ArchivalInformation::description, Player::diplomacy, GameMap::Campaign::directaccess, Player::email, eventID, events, field, gameparameter_num, graphicset, GameMap::Campaign::id, idManager, GameMap::UnitProduction::idsAllowed, lastjournalchange, levelfinished, loadOldEvents, GameMap::PreferredFilenames::mapname, maptitle, messageid, mineralResourcesDisplayed, GameMap::ArchivalInformation::modifytime, nativeMessageLanguage, network, packageData, Player::passwordcrc, PEACE, PEACE_SV, player, Player::playTime, preferredFileNames, properties, AbstractTaskContainer::read(), Properties::read(), ActionContainer::read(), GameTransferMechanism::read(), GameMap::ResourceTribute::read(), Player::read(), DiplomaticStateVector::read(), MapCoordinate::read(), Password::read(), Research::read(), PackageData::read(), Research::read_struct(), tnstream::readChar(), ActionRecorder::readData(), GameMap::IDManager::readData(), tnstream::readdata(), tnstream::readInt(), tnstream::readString(), tnstream::readWord(), GameMap::ArchivalInformation::requirements, Player::research, GameMap::PreferredFilenames::savegame, savegame(), setgameparameter(), Player::setName(), DiplomaticStateVector::setState(), Player::stat, supervisorpasswordcrc, GameMap::ArchivalInformation::tags, tasks, time, tribute, unitProduction, WAR, weather, GameMap::Weather::windDirection, GameMap::Weather::windSpeed, xsize, and ysize.

Referenced by tspfldloaders::readmap().

void GameMap::write ( tnstream stream  ) 

Definition at line 708 of file gamemap.cpp.

References _resourcemode, GameTime::abstime, actionRecorder, actions, actplayer, archivalInformation, GameMap::ArchivalInformation::author, GameMap::Campaign::avail, bi_resource, campaign, codeWord, continueplaying, Player::cursorPos, GameMap::ArchivalInformation::description, Player::diplomacy, GameMap::Campaign::directaccess, GameMap::ResourceTribute::empty(), eventID, events, Player::existanceAtBeginOfTurn, game_parameter, gameparameter_num, getgameparameter(), Player::getName(), graphicset, GameMap::Campaign::id, idManager, GameMap::UnitProduction::idsAllowed, lastjournalchange, levelfinished, GameMap::PreferredFilenames::mapname, maptitle, messageid, messages, mineralResourcesDisplayed, GameMap::ArchivalInformation::modifytime, nativeMessageLanguage, network, packageData, Player::passwordcrc, player, Player::playTime, preferredFileNames, properties, Player::queuedEvents, replayinfo, GameMap::ArchivalInformation::requirements, Player::research, GameMap::PreferredFilenames::savegame, supervisorpasswordcrc, GameMap::ArchivalInformation::tags, tasks, time, tribute, unitProduction, weather, GameMap::Weather::windDirection, GameMap::Weather::windSpeed, AbstractTaskContainer::write(), Properties::write(), ActionContainer::write(), GameTransferMechanism::write(), GameMap::ResourceTribute::write(), Player::write(), DiplomaticStateVector::write(), MapCoordinate::write(), Password::write(), Research::write(), PackageData::write(), tnstream::writeChar(), ActionRecorder::writeData(), GameMap::IDManager::writeData(), tnstream::writeInt(), tnstream::writeString(), tnstream::writeWord(), xsize, and ysize.

Referenced by tmaploaders::savemap(), and tspfldloaders::writemap().

pterraintype GameMap::getterraintype_byid ( int  id  ) 

Definition at line 1766 of file gamemap.cpp.

References terrainTypeRepository.

Referenced by resize().

ObjectType * GameMap::getobjecttype_byid ( int  id  ) 

Definition at line 1771 of file gamemap.cpp.

References objectTypeRepository.

Referenced by calculateobject(), execaction_pg(), SpawnObject::getDescription(), PutObjectCommand::getDescription(), PutObjectCommand::go(), SpawnObject::runAction(), RemoveObject::runAction(), DestructContainer::runAction(), PutObjectCommand::setTarget(), SpawnObject::undoAction(), and RemoveObject::undoAction().

const ObjectType * GameMap::getobjecttype_byid ( int  id  )  const

Definition at line 1776 of file gamemap.cpp.

References objectTypeRepository.

VehicleType * GameMap::getvehicletype_byid ( int  id  ) 

Definition at line 1782 of file gamemap.cpp.

References vehicleTypeRepository.

Referenced by execaction_pg(), trunreplay::execnextreplaymove(), AddProductionCapability::execute(), SpawnUnit::getDescription(), ConstructUnitCommand::getDescription(), ConstructUnitCommand::getProduceableVehicles(), Vehicle::newFromStream(), SpawnUnit::runAction(), ConstructUnitCommand::setVehicleType(), and SpawnUnit::undoAction().

const VehicleType * GameMap::getvehicletype_byid ( int  id  )  const

Definition at line 1787 of file gamemap.cpp.

References vehicleTypeRepository.

BuildingType * GameMap::getbuildingtype_byid ( int  id  ) 

Definition at line 1793 of file gamemap.cpp.

References buildingTypeRepository.

Referenced by execaction_pg(), SpawnBuilding::getDescription(), ConstructBuildingCommand::getDescription(), Building::newFromStream(), SpawnBuilding::runAction(), and SpawnBuilding::undoAction().

const BuildingType * GameMap::getbuildingtype_byid ( int  id  )  const

Definition at line 1798 of file gamemap.cpp.

References buildingTypeRepository.

const Technology * GameMap::gettechnology_byid ( int  id  ) 

Definition at line 1803 of file gamemap.cpp.

References technologyRepository.

pterraintype GameMap::getterraintype_bypos ( int  pos  ) 

Definition at line 1809 of file gamemap.cpp.

References terrainTypeRepository.

ObjectType * GameMap::getobjecttype_bypos ( int  pos  ) 

Definition at line 1814 of file gamemap.cpp.

References objectTypeRepository.

VehicleType * GameMap::getvehicletype_bypos ( int  pos  ) 

Definition at line 1819 of file gamemap.cpp.

References vehicleTypeRepository.

Referenced by ContainerBase::ContainerBase(), and BuildProductionLineCommand::productionLinesBuyable().

BuildingType * GameMap::getbuildingtype_bypos ( int  pos  ) 

Definition at line 1824 of file gamemap.cpp.

References buildingTypeRepository.

const Technology * GameMap::gettechnology_bypos ( int  pos  ) 

Definition at line 1829 of file gamemap.cpp.

References technologyRepository.

int GameMap::getTerrainTypeNum (  ) 

Definition at line 1834 of file gamemap.cpp.

References terrainTypeRepository.

int GameMap::getObjectTypeNum (  ) 

Definition at line 1839 of file gamemap.cpp.

References objectTypeRepository.

int GameMap::getVehicleTypeNum (  ) 

Definition at line 1844 of file gamemap.cpp.

References vehicleTypeRepository.

Referenced by ContainerBase::ContainerBase().

int GameMap::getBuildingTypeNum (  ) 

Definition at line 1849 of file gamemap.cpp.

References buildingTypeRepository.

int GameMap::getTechnologyNum (  ) 

Definition at line 1854 of file gamemap.cpp.

References technologyRepository.

int GameMap::random ( int  max  ) 

generated a pseudo-random number with the map-internal seed

Definition at line 1437 of file gamemap.cpp.

void GameMap::guiHooked (  ) 

Definition at line 286 of file gamemap.cpp.

References OverviewMapHolder::connect(), and overviewMapHolder.

Referenced by hookGuiToMap().

bool GameMap::getGuiHooked (  )  [inline]

Definition at line 558 of file gamemap.h.

Referenced by hookGuiToMap().

Properties& GameMap::getProperties (  )  [inline]

Definition at line 562 of file gamemap.h.

int GameMap::getMemoryFootprint (  )  const

Definition at line 1959 of file gamemap.cpp.

References MemoryStreamStorage::getMemoryFootprint(), GameMap::ReplayInfo::guidata, GameMap::ReplayInfo::map, and replayinfo.

Referenced by MemoryMeasurement::measure().


Member Data Documentation

const int GameMap::maxTotalPlayers = 8 [static]

Definition at line 188 of file gamemap.h.

Referenced by AbstractTaskContainer::AbstractTaskContainer(), AbstractTaskContainer::readStorage(), AbstractTaskContainer::writeStorage(), and AbstractTaskContainer::~AbstractTaskContainer().

int GameMap::xsize

the size of the map

Definition at line 191 of file gamemap.h.

Referenced by tmapgenerator::addcoast(), tplayerchange::anzeige(), AStar3D::AStar3D(), attackpossible(), tplayerchange::buttonpressed(), calculateallobjects(), ForestCalculation::calculateforest(), MapDisplayPG::centerOnField(), tspfldloaders::chainitems(), checkobjectsforremoval(), checkunitsforremoval(), ResizeMap::checkvalue(), MapDisplayPG::checkViewPosition(), clearvisibility(), computeview(), OverviewMapHolder::drawNextField(), NewGuiHost::evalCursor(), evaluateviewcalculation(), MapDisplayPG::eventMouseButtonDown(), MapDisplayPG::eventMouseMotion(), execaction(), execaction_pg(), AStar3D::findAllAccessibleFields(), AStar::findAllAccessibleFields(), AStar3D::findPath(), AStar::findPath(), GameMap(), gamethread(), JumpDriveCommand::getDestinations(), getfield(), AStar3D::getFieldAccess(), AStar3D::getPosDir(), AStar3D::getPosHHop(), getVisibilityStatistics(), MapField::getx(), MapField::gety(), OverviewMapHolder::init(), tmapgenerator::init(), ResizeMap::init(), WeatherField::isOnMap(), MemoryMeasurement::measure(), MirrorMap::mirrorX(), MirrorMap::mirrorY(), Weathercast::mouseClick(), OverviewMapPanel::mouseClick(), FieldAddressing::operate(), CopyMap::paste(), InsertBiMap::preparemap(), process_ASC_map(), process_BI_map(), read(), tspfldloaders::readfields(), WholeMapRenderer::render(), WholeMapRenderer::renderVisibility(), Player::resetView(), MapField::resetView(), resourceComparison(), ResourcePlacement::ResourcePlacement(), UnitTypeTransformation::run(), setCursorPosition(), tmapgenerator::setmap(), setweatherall(), ForestCalculation::Smoothing::SmoothIt(), SearchFields::startsearch(), PackageManager::storeData(), Player::swap(), testDebugFunction(), transformMap(), VehicleCounterFactory::VehicleCounterFactory(), WholeMapRenderer::WholeMapRenderer(), width(), write(), tspfldloaders::writefields(), WholeMapRenderer::writePCX(), and WholeMapRenderer::writePNG().

int GameMap::ysize

Definition at line 191 of file gamemap.h.

Referenced by tmapgenerator::addcoast(), tplayerchange::anzeige(), AStar3D::AStar3D(), attackpossible(), tplayerchange::buttonpressed(), calculateallobjects(), ForestCalculation::calculateforest(), MapDisplayPG::centerOnField(), tspfldloaders::chainitems(), checkobjectsforremoval(), checkunitsforremoval(), ResizeMap::checkvalue(), MapDisplayPG::checkViewPosition(), clearvisibility(), computeview(), OverviewMapHolder::drawNextField(), NewGuiHost::evalCursor(), evaluateviewcalculation(), MapDisplayPG::eventMouseButtonDown(), MapDisplayPG::eventMouseMotion(), execaction(), execaction_pg(), AStar3D::findAllAccessibleFields(), AStar::findAllAccessibleFields(), AStar3D::findPath(), AStar::findPath(), GameMap(), gamethread(), JumpDriveCommand::getDestinations(), getfield(), getVisibilityStatistics(), height(), OverviewMapHolder::init(), tmapgenerator::init(), ResizeMap::init(), WeatherField::isOnMap(), MemoryMeasurement::measure(), MirrorMap::mirrorX(), MirrorMap::mirrorY(), Weathercast::mouseClick(), OverviewMapPanel::mouseClick(), FieldAddressing::operate(), CopyMap::paste(), InsertBiMap::preparemap(), process_ASC_map(), process_BI_map(), read(), tspfldloaders::readfields(), WholeMapRenderer::render(), WholeMapRenderer::renderVisibility(), Player::resetView(), MapField::resetView(), resourceComparison(), ResourcePlacement::ResourcePlacement(), UnitTypeTransformation::run(), setCursorPosition(), tmapgenerator::setmap(), setweatherall(), ForestCalculation::Smoothing::SmoothIt(), SearchFields::startsearch(), PackageManager::storeData(), Player::swap(), testDebugFunction(), transformMap(), VehicleCounterFactory::VehicleCounterFactory(), WholeMapRenderer::WholeMapRenderer(), write(), tspfldloaders::writefields(), WholeMapRenderer::writePCX(), and WholeMapRenderer::writePNG().

MapField* GameMap::field

the array of fields

Definition at line 194 of file gamemap.h.

Referenced by allocateFields(), tplayerchange::anzeige(), tplayerchange::buttonpressed(), tspfldloaders::chainitems(), cleartemps(), clearvisibility(), AStar::findPath(), GameMap(), generatemap(), getfield(), getField(), MapField::getx(), MapField::gety(), read(), tspfldloaders::readfields(), MapField::resetView(), resize(), tmapgenerator::setmap(), Player::swap(), tspfldloaders::writefields(), and ~GameMap().

ASCString GameMap::codeWord

the codeword for accessing a map in a campaign

Definition at line 200 of file gamemap.h.

Referenced by findNextCampaignMap(), NewMap::NewMap(), read(), and write().

ASCString GameMap::maptitle

the title of the map

Definition at line 203 of file gamemap.h.

Referenced by EditArchivalInformation::buttonpressed(), EditArchivalInformation::EditArchivalInformation(), findNextCampaignMap(), generatemap(), getTitle(), NewMap::NewMap(), pbpplayerstatistics(), process_ASC_map(), process_BI_map(), read(), tsavegameloaders::savegame(), setTitle(), and write().

struct GameMap::Campaign GameMap::campaign

Referenced by StartMultiplayerGame::Apply(), checkforvictory(), findNextCampaignMap(), gamethread(), loadmap(), maintainencecheck(), NewMap::NewMap(), read(), and write().

signed char GameMap::actplayer

the player who is currently making his moves (may be human or AI)

Definition at line 222 of file gamemap.h.

Referenced by AllianceSetupWidget::AllianceSetupWidget(), AllianceSetupWidget::Apply(), authenticateUser(), PutObjectCommand::avail(), PutMineCommand::avail(), PowerGenerationSwitchCommand::avail(), DestructBuildingCommand::avail(), ConstructBuildingCommand::avail(), GuiFunctions::SelfDestructIcon::available(), GuiFunctions::InternalAmmoTransferDialog::available(), GuiFunctions::ConstructBuilding::available(), GuiFunctions::BuildVehicleCommand::available(), GuiFunctions::RefuelUnitCommand::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::DisableReactionfire::available(), GuiFunctions::EnableReactionfire::available(), GuiFunctions::OpenContainer::available(), GuiFunctions::Attack::available(), GuiFunctions::Descend::available(), GuiFunctions::Ascend::available(), GuiFunctions::MovementBase::available(), CargoGuiFunctions::RecycleUnitCommandButton::available(), CargoGuiFunctions::OpenContainer::available(), CargoGuiFunctions::TransferUnitControl::available(), CargoGuiFunctions::UnitTraining::available(), CargoGuiFunctions::UnitProduction::available(), CargoGuiFunctions::Movement::available(), beginTurn(), VehicleCounterFactory::calcCargoSummary(), Event::check(), checkevents(), checkforreplay(), checkforvictory(), checkJournal(), checkModificationConstraints(), checkUsedASCVersions(), DashboardPanel::containerRenamed(), continueAndStartMultiplayerGame(), createContext(), createFollowerContext(), trunreplay::createReplayContext(), createTestingContext(), PG_MapDisplay::displayMovingUnit(), editjournal(), editPlayerData(), EmailSetupWidget::EmailSetupWidget(), endRound(), endTurn(), DashboardPanel::eval(), ASC_MainScreenWidget::eventKeyDown(), GuiFunctions::EndTurn::execute(), Event::execute(), DisplayImmediateMessage::execute(), DisplayMessage::execute(), executeUserAction(), ConstructUnitCommand::externalConstructionAvail(), fieldVisibility(), fieldvisiblenow(), findNextPlayer(), GameMap(), gamethread(), getCurrentPlayer(), getCursor(), Vehicle::getResource(), CargoDialog::getResourceValue(), getSelectedUnit(), getTransferLimitation(), giveunitaway(), ConstructUnitCommand::go(), tresearchinfo::init(), ttributepayments::init(), tdialogbox::init(), tchoice_dlg::init(), ConstructUnitCommand::internalConstructionAvail(), iterateToNextPlayer(), loadGameFromFile(), FileTransfer::loadPBEMFile(), mainloopidle(), Message::Message(), NewMessage::NewMessage(), next_turn(), UnitInfoPanel::onClick(), Vehicle::paint(), DashboardPanel::painter(), PlayerSetupWidget::PlayerSetupWidget(), Vehicle::putResource(), read(), tdialogbox::redraw(), MapField::removeObject(), researchinfo(), resourceAnalysis(), trunreplay::run(), runai(), saveGame(), AttackCommand::searchTargets(), FileTransfer::send(), tmessagedlg::setup(), showAllUnitPositions(), showPlayerTime(), skipTurn(), startMap(), ContainerConstControls::unitProductionAvailable(), VehicleCounterFactory::VehicleCounterFactory(), viewterraininfo(), and write().

GameTime GameMap::time

the time in the game, mesured in a turns and moves

Definition at line 225 of file gamemap.h.

Referenced by authenticateUser(), AutoProgressBar::AutoProgressBar(), checkJournal(), checktimedevents(), FileTransfer::constructFileName(), editjournal(), endRound(), endTurn(), execaction(), Event::execute(), executeUserAction(), GameMap(), TurnPassed::getState(), WeatherSystem::getWindDataOfTurn(), log(), Message::Message(), next_turn(), Weathercast::painter(), read(), tspfldloaders::readfields(), tsavegameloaders::savegame(), startGame(), WeatherSystem::update(), WeatherPanel::WeatherPanel(), and write().

struct GameMap::Weather GameMap::weather

Referenced by AStar3D::AStar3D(), UnitHooveringLogic::calcFuelUsage(), calcMoveMalus(), checkunitsforremoval(), displaywindspeed(), endTurn(), DashboardPanel::eval(), WindChange::execute(), WindPowerplant::getPlus(), NewMap::NewMap(), DashboardPanel::painter(), read(), CargoDialog::updateVariables(), WindMovement::WindMovement(), and write().

int GameMap::_resourcemode

how are Resources handled on this map 0= "ASC mode": complex system with mineral resources etc 1= "BI mode": simpler system like in Battle Isle

Definition at line 240 of file gamemap.h.

Referenced by execaction(), GameMap(), generatemap(), VehicleProduction_SelectionItemFactory::getCost(), ContainerBase::getStorageCapacity(), isResourceGlobal(), process_ASC_map(), read(), resourceComparison(), and write().

Player GameMap::player[9]

Definition at line 243 of file gamemap.h.

Referenced by Research::addanytechnology(), AdminGameWindow::AdminGameWindow(), AllianceSetupWidget::AllianceSetupWidget(), tplayerchange::anzeige(), PlayerSetupWidget::Apply(), EmailSetupWidget::Apply(), AllianceSetupWidget::Apply(), attackpossible2n(), attackpossible2u(), authenticateUser(), GuiFunctions::OpenContainer::available(), CargoGuiFunctions::RecycleUnitCommandButton::available(), CargoGuiFunctions::OpenContainer::available(), CargoGuiFunctions::UnitTraining::available(), beginTurn(), Building::Building(), tplayerchange::buttonpressed(), calcvisibilityfield(), checkevents(), checkforreplay(), checkforvictory(), checkunitsforremoval(), checkUsedASCVersions(), clearvisibility(), compareMapResources(), computeview(), continueAndStartMultiplayerGame(), Building::convert(), ReplayMapDisplay::displayMovingUnit(), PG_MapDisplay::displayMovingUnit(), doresearch(), editResearch(), editResearchPoints(), editTechAdapter(), EmailSetupWidget::EmailSetupWidget(), endRound(), endTurn(), DashboardPanel::eval(), evaluateviewcalculation(), EventEditor::EventEditor(), Maped_MainScreenWidget::eventKeyDown(), ASC_MainScreenWidget::eventKeyDown(), eventReady(), trunreplay::execnextreplaymove(), GuiFunctions::EndTurn::execute(), SetViewSharing::execute(), DisplayImmediateMessage::execute(), executeUserAction(), findNextPlayer(), GameMap(), gamethread(), generatemap(), getCurrentPlayer(), getCursor(), AnyUnitEntersPolygon::getDetailledName(), Message::getFromText(), HiddenAStar3D::getMoveCost(), HiddenAStar::getMoveCost(), getPlayer(), AI::getPlayer(), getPlayerStrength(), getPlayersWithSharedViewMask(), DiplomaticStateVector::getProposal(), Research::getResearchPerTurn(), AllEnemyBuildingsDestroyed::getState(), AllEnemyUnitsDestroyed::getState(), AllUnitsLost::getState(), AllBuildingsLost::getState(), getTransferLimitation(), getUnit(), getVisibilityStatistics(), DiplomacyCommand::go(), ConstructUnitCommand::go(), PlayerSetupWidget::guessHeight(), tresearchinfo::init(), ttributepayments::init(), iterateToNextPlayer(), tsavegameloaders::loadgame(), tnetworkloaders::loadnwgame(), mainloopidle(), maintainencecheck(), Message::Message(), next_turn(), UnitInfoPanel::onClick(), DashboardPanel::painter(), ContainerBase::paintField(), PlayerSetupWidget::PlayerSetupWidget(), process_ASC_map(), process_BI_map(), read(), tgameloaders::readAI(), tspfldloaders::readdissections(), tspfldloaders::readmessages(), ResearchGraph::recalc(), Vehicle::registerForNewOwner(), Building::registerForNewOwner(), researchinfo(), resize(), resourceAnalysis(), resourceComparison(), tchoosetechlevel::run(), runai(), MapNetwork::searchAllVehiclesNextToBuildings(), selectPlayer(), FileTransfer::send(), seteventtriggers(), ResearchGraph::setResearch(), tmessagedlg::setup(), showAttackAnimation(), showPlayerTime(), PutTribute::start(), MapNetwork::start(), startGame(), transfer_all_outstanding_tribute(), tshowhistoryinit(), DiplomaticStateVector::turnBegins(), ResearchWindow::update(), OverviewMapHolder::updateField(), Vehicle::Vehicle(), Vehicle::vehicleconstructable(), write(), tgameloaders::writeAI(), tspfldloaders::writedissections(), tspfldloaders::writemessages(), Building::~Building(), and ~GameMap().

int GameMap::eventID

Definition at line 278 of file gamemap.h.

Referenced by Event::Event(), GameMap(), read(), and write().

Events GameMap::events

Definition at line 281 of file gamemap.h.

Referenced by checkevents(), EventTriggered::getState(), read(), readOldEventLists(), seteventtriggers(), setLocalizedEventMessage(), EventTriggered::setup(), write(), and writeMessageFile().

vector<GameTime> GameMap::eventTimes

Definition at line 283 of file gamemap.h.

Referenced by Event::arm(), TurnPassed::arm(), checktimedevents(), and Event::execute().

class GameMap::IDManager GameMap::idManager

Referenced by checkForUniqueUnitIDs(), Reinforcements::execute(), getUnit(), Mine::Mine(), Vehicle::newFromStream(), read(), tspfldloaders::readfields(), SpawnUnit::runAction(), SpawnMine::runAction(), SpawnUnit::undoAction(), SpawnMine::undoAction(), Vehicle::Vehicle(), and write().

char GameMap::levelfinished

Definition at line 311 of file gamemap.h.

Referenced by GuiFunctions::EndTurn::available(), GameMap(), loadGameFromFile(), tnetworkloaders::loadnwgame(), read(), startGame(), startMap(), and write().

enum GameMap::State GameMap::state

Referenced by DisplayImmediateMessage::execute(), LoseMap::execute(), NextMap::execute(), DisplayMessage::execute(), GameMap(), processEvents(), trunreplay::run(), DestructContainer::runAction(), ContainerBase::~ContainerBase(), ~GameMap(), and Vehicle::~Vehicle().

class GameMap::ResourceTribute GameMap::tribute

The tribute can not only be used to demand resources from enemies but also to transfer resources to allies.

tribute.avail[S][D].energy is the ammount of energy that player D may (still) extract from the net of player S tribute.paid[D][S].energy is the amount of energy that player D has already extracted from player S's net S is source player, D is destination player

Referenced by PutTribute::checkbuilding(), GetResource::checkbuilding(), ResourceTribute::getState(), ttributepayments::init(), read(), Player::resetTribute(), ttributepayments::run(), PutTribute::start(), Player::swap(), transfer_all_outstanding_tribute(), and write().

MessagePntrContainer GameMap::unsentmessage

the list of messages that were written this turn and are waiting to be processed at the end of the turn

Definition at line 340 of file gamemap.h.

Referenced by executeUserAction(), tspfldloaders::readmessages(), and tspfldloaders::writemessages().

bool GameMap::__loadunsentmessage

Definition at line 341 of file gamemap.h.

Referenced by read(), and tspfldloaders::readmessages().

MessageContainer GameMap::messages

these are the messages themselfs. A MessagePntrContainer only stores pointers to message body which are archived here

Definition at line 344 of file gamemap.h.

Referenced by Message::Message(), tspfldloaders::readmessagelist(), write(), and tspfldloaders::writemessages().

bool GameMap::__loadmessages

Definition at line 345 of file gamemap.h.

Referenced by read(), and tspfldloaders::readmessages().

int GameMap::messageid

each message has an identification number (which is incremented with each message) for referencing it in files. The id of the last message is stored here

Definition at line 348 of file gamemap.h.

Referenced by GameMap(), Message::Message(), read(), and write().

bool GameMap::___loadJournal

temporary variables for loading the map

Definition at line 351 of file gamemap.h.

Referenced by read(), and tspfldloaders::readmessages().

bool GameMap::___loadNewJournal

Definition at line 351 of file gamemap.h.

Referenced by read(), and tspfldloaders::readmessages().

bool GameMap::___loadtitle

Definition at line 351 of file gamemap.h.

Referenced by read().

bool GameMap::___loadLegacyNetwork

Definition at line 351 of file gamemap.h.

Referenced by read(), and tspfldloaders::readLegacyNetwork().

ASCString GameMap::gameJournal

Definition at line 355 of file gamemap.h.

Referenced by tspfldloaders::readmessages(), viewjournal(), and tspfldloaders::writemessages().

ASCString GameMap::newJournal

Definition at line 356 of file gamemap.h.

Referenced by editjournal(), tspfldloaders::readmessages(), and tspfldloaders::writemessages().

Password GameMap::supervisorpasswordcrc

Definition at line 358 of file gamemap.h.

Referenced by k_loadmap(), read(), StartMultiplayerGame::start(), and write().

ActionContainer GameMap::actions

Records all action that have been done for undo/redo purposes.

Definition at line 380 of file gamemap.h.

Referenced by CampaignActionLogger::CampaignActionLogger(), createContext(), createFollowerContext(), trunreplay::createReplayContext(), createTestingContext(), endTurn(), Event::execute(), AI::getContext(), read(), write(), and writeLuaCommands().

ActionRecorder* GameMap::actionRecorder

Definition at line 381 of file gamemap.h.

Referenced by read(), write(), and ~GameMap().

AbstractTaskContainer* GameMap::tasks

Definition at line 384 of file gamemap.h.

Referenced by moveUnitTest(), read(), runOpenTasks(), runPendingTasks(), runTasks(), TaskFactory::TaskFactory(), taskManager(), write(), and ~GameMap().

ReplayInfo* GameMap::replayinfo

Definition at line 386 of file gamemap.h.

Referenced by beginTurn(), checkforreplay(), checkforvictory(), endTurn(), GameMap(), gamethread(), getMemoryFootprint(), initReplayLogging(), tsavegameloaders::loadgame(), loadGameFromFile(), tnetworkloaders::loadnwgame(), next_turn(), trunreplay::run(), runSpecificReplay(), LogActionIntoReplayInfo::saveCommand(), tsavegameloaders::savegame(), tnetworkloaders::savenwgame(), savereplay(), StartMultiplayerGame::start(), startMap(), viewOwnReplay(), write(), and ~GameMap().

bool GameMap::__loadreplayinfo

a helper variable to store some information during the loading process. No usage outside.

Definition at line 389 of file gamemap.h.

Referenced by tnetworkloaders::loadnwgame(), and read().

GameTime GameMap::lastjournalchange

Definition at line 403 of file gamemap.h.

Referenced by checkJournal(), editjournal(), GameMap(), read(), and write().

Resources GameMap::bi_resource[8]

in BI resource mode ( see _resourcemode , isResourceGlobal ) , this is where the globally available resources are stored. Note that not all resources are globally available.

Definition at line 406 of file gamemap.h.

Referenced by compareMapResources(), Building::convert(), read(), resourceAnalysis(), PutTribute::start(), PutResource::start(), GetResource::start(), startGame(), transfer_all_outstanding_tribute(), and write().

struct GameMap::PreferredFilenames GameMap::preferredFileNames

Referenced by NextMap::execute(), MapSwitcher::getName(), k_loadmap(), k_savemap(), mapeditorMainThread(), read(), readtextmessage(), saveGame(), and write().

int GameMap::graphicset

the ID of the graphic set

Definition at line 414 of file gamemap.h.

Referenced by GameMap(), MapRenderer::paintTerrain(), process_ASC_map(), read(), selectgraphicset(), and write().

int GameMap::gameparameter_num

Definition at line 415 of file gamemap.h.

Referenced by GameMap(), getgameparameter(), read(), setgameparameter(), and write().

int* GameMap::game_parameter

Definition at line 416 of file gamemap.h.

Referenced by GameMap(), getgameparameter(), tgameloaders::initmap(), setgameparameter(), write(), and ~GameMap().

ASCString GameMap::nativeMessageLanguage

the language string that describes the messages which are saved in the game events For example: en_US All translations will be maintained in seperate files

Definition at line 422 of file gamemap.h.

Referenced by GameMap(), NewMap::NewMap(), read(), savemap(), and write().

int GameMap::mineralResourcesDisplayed

Definition at line 424 of file gamemap.h.

Referenced by GameMap(), read(), and write().

class GameMap::ArchivalInformation GameMap::archivalInformation

Referenced by EditArchivalInformation::buttonpressed(), EditArchivalInformation::EditArchivalInformation(), process_ASC_map(), read(), and write().

class GameMap::UnitProduction GameMap::unitProduction

specifies which vehicle types can be constructed by construction units

Referenced by ConstructUnitCommand::getProduceableVehicles(), read(), and write().

SigC::Signal1<void,Player&> GameMap::sigPlayerTurnBegins

Definition at line 479 of file gamemap.h.

Referenced by beginTurn(), deployMapPlayingHooks(), trunreplay::run(), Player::setParentMap(), and TaskContainer::TaskContainer().

SigC::Signal1<void,Player&> GameMap::sigPlayerUserInteractionBegins

Definition at line 480 of file gamemap.h.

Referenced by continueAndStartMultiplayerGame(), gamethread(), hookGuiToMap(), next_turn(), and Player::setParentMap().

SigC::Signal1<void,Player&> GameMap::sigPlayerUserInteractionEnds

Definition at line 481 of file gamemap.h.

Referenced by CampaignActionLogger::CampaignActionLogger(), GuiFunctions::EndTurn::execute(), and hookGuiToMap().

SigC::Signal1<void,Player&> GameMap::sigPlayerTurnEnds

Definition at line 482 of file gamemap.h.

Referenced by endTurn(), and Player::setParentMap().

SigC::Signal1<void,Player&> GameMap::sigPlayerTurnHasEnded

Definition at line 483 of file gamemap.h.

Referenced by endTurn(), hookGuiToMap(), and TaskContainer::TaskContainer().

SigC::Signal1<void,Player&> GameMap::sigMapWon

Definition at line 484 of file gamemap.h.

Referenced by CampaignActionLogger::CampaignActionLogger(), and NextMap::execute().

SigC::Signal1< void, GameMap & > GameMap::sigMapCreation [static]

Definition at line 486 of file gamemap.h.

Referenced by GameMap(), TaskHibernatingContainer::registerHooks(), and TaskContainer::registerHooks().

SigC::Signal1< void, GameMap & > GameMap::sigMapDeletion [static]

Definition at line 487 of file gamemap.h.

Referenced by GuiFunctions::AttackGui::AttackGui(), DashboardPanel::DashboardPanel(), gamethread(), MapDisplayPG::MapDisplayPG(), NewGuiHost::NewGuiHost(), GuiFunctions::ObjectBuildingGui::ObjectBuildingGui(), and ~GameMap().

SigC::Signal2< void, GameMap *, Player & > GameMap::sigPlayerTurnEndsStatic [static]

Definition at line 488 of file gamemap.h.

Referenced by endTurn(), gamethread(), and runTester().

SigC::Signal1<void,const MapCoodinateVector&> GameMap::sigCoordinateShift

called when the map is resized and all coordinates have to be adjusted

Definition at line 491 of file gamemap.h.

Referenced by MoveUnitCommand::MoveUnitCommand(), and resize().

SigC::Signal0<void> GameMap::newRound

called when a new round starts (after switching from player 7 to player 0 )

Definition at line 494 of file gamemap.h.

Referenced by startGame(), and WeatherSystem::WeatherSystem().

bool GameMap::continueplaying

if a player has won a singleplayer map, but wants to continue playing without any enemies, this will be set to 1

Definition at line 498 of file gamemap.h.

Referenced by checkforvictory(), LoseMap::execute(), GameMap(), gamethread(), next_turn(), read(), and write().

OverviewMapHolder GameMap::overviewMapHolder

Definition at line 518 of file gamemap.h.

Referenced by allocateFields(), authenticateUser(), OverviewMapHolder::clearmap(), guiHooked(), next_turn(), Weathercast::painter(), OverviewMapPanel::painter(), tspfldloaders::readfields(), resize(), trunreplay::run(), and Weathercast::Weathercast().

bool GameMap::loadOldEvents

just a helper variable for loading the map; no function outside;

Definition at line 552 of file gamemap.h.

Referenced by read(), and tspfldloaders::readoldevents().

Properties GameMap::properties

general key/value storage, primarily for Lua scripts

Definition at line 558 of file gamemap.h.

Referenced by read(), and write().

GameTransferMechanism* GameMap::network

Definition at line 562 of file gamemap.h.

Referenced by AdminGameWindow::AdminGameWindow(), iterateToNextPlayer(), maintainencecheck(), read(), write(), and ~GameMap().

PackageData* GameMap::packageData [mutable]

Definition at line 568 of file gamemap.h.

Referenced by PackageManager::checkGame(), read(), showUsedPackages(), PackageManager::storeData(), and write().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 01:47:41 2012 for Advanced Strategic Command by  doxygen 1.5.1