#include <gamemap.h>
Turn Management | |
| These methods control the game advance of a player to the next player | |
| 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 | |
| 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::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 | |
| static SigC::Signal1< void, GameMap & > | sigMapDeletion |
Public Types | |
| typedef map< int, Vehicle * > | VehicleLookupCache |
| typedef PointerList< Event * > | Events |
| enum | State { Normal, Replay, Destruction } |
Public Member Functions | |
| int | getPlayerCount () const |
| Player & | getPlayer (PlayerID p) |
| const Player & | getPlayer (PlayerID p) const |
| Player & | getCurrentPlayer () |
| int | getNeutralPlayerNum () const |
| MapCoordinate & | getCursor () |
| int | eventpassed (int saveas, int action, int mapid) |
| int | eventpassed (int id, int mapid) |
| int | getNewNetworkID () |
| 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) | |
| Vehicle * | getUnit (int x, int y, int nwid) |
| Vehicle * | getUnit (int nwid) |
| ContainerBase * | getContainer (int nwid) |
| int | getgameparameter (GameParameter num) const |
| void | setgameparameter (GameParameter num, int value) |
| void | cleartemps (int b=-1, int value=0) |
| bool | isResourceGlobal (int resource) |
| tfield * | getField (int x, int y) |
| tfield * | getField (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 () |
| int | getMemoryFootprint () const |
Access to item types | |
| pterraintype | getterraintype_byid (int id) |
| ObjectType * | getobjecttype_byid (int id) |
| Vehicletype * | getvehicletype_byid (int id) |
| BuildingType * | getbuildingtype_byid (int id) |
| const Technology * | gettechnology_byid (int id) |
| pterraintype | getterraintype_bypos (int pos) |
| ObjectType * | getobjecttype_bypos (int pos) |
| Vehicletype * | getvehicletype_bypos (int pos) |
| BuildingType * | getbuildingtype_bypos (int pos) |
| const Technology * | gettechnology_bypos (int pos) |
| int | getTerrainTypeNum () |
| int | getObjectTypeNum () |
| int | getVehicleTypeNum () |
| int | getBuildingTypeNum () |
| int | getTechnologyNum () |
Public Attributes | |
| int | xsize |
| the size of the map | |
| int | ysize |
| the size of the map | |
| tfield * | field |
| 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] |
| VehicleLookupCache | vehicleLookupCache |
| int | eventID |
| Events | events |
| vector< GameTime > | eventTimes |
| 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 |
| temporary variables for loading the map | |
| bool | ___loadtitle |
| temporary variables for loading the map | |
| bool | ___loadLegacyNetwork |
| temporary variables for loading the map | |
| ASCString | gameJournal |
| ASCString | newJournal |
| Password | supervisorpasswordcrc |
| ReplayInfo * | replayinfo |
| 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 |
| 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; | |
| GameTransferMechanism * | network |
Classes | |
| class | ArchivalInformation |
| struct | Campaign |
| 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 |
Definition at line 166 of file gamemap.h.
|
|
|
|
|
|
|
|
|
|
|
Definition at line 220 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, Normal, player, replayinfo, Player::research, setgameparameter(), Player::setParentMap(), Player::stat, state, time, xsize, and ysize. |
|
|
Definition at line 1327 of file gamemap.cpp. References actmap, Player::ai, tfield::building, cbbuildingentry, Destruction, field, game_parameter, getTerrainBitType(), network, player, replayinfo, sigMapDeletion, state, tfield::vehicle, xsize, and ysize. |
|
||||||||||||||||
|
Definition at line 898 of file gamemap.cpp. References OverviewMapHolder::connect(), field, overviewMapHolder, tfield::setMap(), tfield::setparams(), tfield::typ, xsize, and ysize. Referenced by buildemptymap(), generatemap(), and tspfldloaders::readfields(). |
|
|
called when a player starts his turn
Definition at line 1129 of file gamemap.cpp. References actplayer, exist(), Player::off, player, replayinfo, and sigPlayerTurnBegins. Referenced by continuenetworkgame(), and skipTurn(). |
|
|
Definition at line 914 of file gamemap.cpp. References calculateallobjects(). Referenced by Building::chainbuildingtofield(). |
|
||||||||||||
|
|
called between endTurn() of player 7 and the next turn of player 0
Definition at line 1215 of file gamemap.cpp. References actplayer, Player::buildingList, cgp_objectGrowthMultiplier, doresearch(), exist(), getField(), getgameparameter(), getPlayer(), getPlayerCount(), Player::off, player, tfield::resetView(), GameTime::set(), time, GameTime::turn(), Player::vehicleList, xsize, and ysize. |
|
|
called after a player ends his turn
Definition at line 1148 of file gamemap.cpp. References actplayer, Player::ASCversion, Player::buildingList, UnitHooveringLogic::calcFuelUsage(), checkunitsforremoval(), chhochfliegend, chtieffliegend, Player::PlayTime::date, Resources::Fuel, getfield(), getmaxwindspeedforunit(), getNumericVersion(), getUnitReference(), Vehicle::height, maxwindspeed, player, Player::playTime, replayinfo, sigPlayerTurnEnds, sigPlayerTurnHasEnded, time, GameTime::turn(), Player::PlayTime::turn, Player::vehicleList, weather, GameMap::Weather::windSpeed, Vehicle::xpos, and Vehicle::ypos. Referenced by next_turn(), and skipTurn(). |
|
||||||||||||
|
Definition at line 1043 of file gamemap.cpp. |
|
||||||||||||||||
|
Definition at line 1036 of file gamemap.cpp. |
|
|
Definition at line 1608 of file gamemap.cpp. References buildingTypeRepository. Referenced by execaction_pg(), and Building::newFromStream(). |
|
|
Definition at line 1634 of file gamemap.cpp. References buildingTypeRepository. |
|
|
Definition at line 1659 of file gamemap.cpp. References buildingTypeRepository. |
|
|
Definition at line 1112 of file gamemap.cpp. References tfield::building, getfield(), and getUnit(). Referenced by compareMapResources(), trunreplay::execnextreplaymove(), and getCursor(). |
|
|
Definition at line 235 of file gamemap.h. References actplayer, and player. Referenced by checkType(), ASC_MainScreenWidget::eventKeyDown(), execuseraction2(), getInstances(), tshownewtanks::init(), loadGame(), showCargoSummary(), VehicleCounterFactory::spawnNextItem(), AvailableProductionItemFactory::spawnNextItem(), vehicleOwned(), and viewMiningPower(). |
|
|
|
Definition at line 927 of file gamemap.cpp. References getField(). |
|
||||||||||||
|
|
|
Definition at line 483 of file gamemap.h. Referenced by hookGuiToMap(). |
|
|
Definition at line 1748 of file gamemap.cpp. References cgp_initialMapVisibility, getgameparameter(), and visible_ago. Referenced by fieldVisibility(), and fieldvisiblenow(). |
|
|
Definition at line 1769 of file gamemap.cpp. References tmemorystreambuf::getMemoryFootprint(), GameMap::ReplayInfo::guidata, GameMap::ReplayInfo::map, and replayinfo. |
|
|
Definition at line 240 of file gamemap.h. Referenced by GuiFunctions::OpenContainer::available(). |
|
|
Definition at line 1049 of file gamemap.cpp. Referenced by checkForUniqueUnitIDs(), Vehicle::newFromStream(), and Vehicle::Vehicle(). |
|
|
Definition at line 1598 of file gamemap.cpp. References objectTypeRepository. Referenced by calculateobject(), execaction_pg(), GuiFunctions::ObjectBuildingGui::search(), and Building::unchainbuildingfromfield(). |
|
|
Definition at line 1624 of file gamemap.cpp. References objectTypeRepository. |
|
|
Definition at line 1649 of file gamemap.cpp. References objectTypeRepository. |
|
|
Definition at line 229 of file gamemap.h. References PlayerID::getID(), and player. |
|
|
|
Definition at line 222 of file gamemap.h. Referenced by endRound(), findNextPlayer(), AllianceSetupWidget::linearize(), and transformMap(). |
|
|
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 932 of file gamemap.cpp. Referenced by tsearchreactionfireingunits::attack(), ReplayMapDisplay::displayActionCursor(), ReplayMapDisplay::displayMovingUnit(), PG_MapDisplay::displayMovingUnit(), ReplayMapDisplay::displayPosition(), MapDisplayPG::displayUnitMovement(), DashboardPanel::eval(), trunreplay::execnextreplaymove(), VehicleAttack::execute(), BaseVehicleMovement::moveunitxy(), DashboardPanel::painter(), VisibilityLayer::paintSingleField(), ReplayMapDisplay::playPositionalSound(), WholeMapRenderer::render(), WholeMapRenderer::renderVisibility(), tcomputeview::tcomputeview(), MapDisplayPG::updateMap(), and trunreplay::wait(). |
|
|
Definition at line 1613 of file gamemap.cpp. References technologyRepository. |
|
|
Definition at line 1639 of file gamemap.cpp. References technologyRepository. |
|
|
Definition at line 1664 of file gamemap.cpp. References technologyRepository. |
|
|
Definition at line 1593 of file gamemap.cpp. References terrainTypeRepository. Referenced by resize(). |
|
|
Definition at line 1619 of file gamemap.cpp. References terrainTypeRepository. |
|
|
Definition at line 1644 of file gamemap.cpp. References terrainTypeRepository. |
|
|
Definition at line 1077 of file gamemap.cpp. References displaymessage(), player, Player::vehicleList, and vehicleLookupCache. |
|
||||||||||||||||
|
|
Definition at line 1603 of file gamemap.cpp. References vehicleTypeRepository. Referenced by execaction_pg(), trunreplay::execnextreplaymove(), AddProductionCapability::execute(), Vehicle::newFromStream(), tchoosetechnology::run(), and GuiFunctions::VehicleBuildingGui::search(). |
|
|
Definition at line 1629 of file gamemap.cpp. References vehicleTypeRepository. Referenced by ContainerBase::ContainerBase(), and ContainerControls::productionLinesBuyable(). |
|
|
Definition at line 1654 of file gamemap.cpp. References vehicleTypeRepository. |
|
|
Definition at line 283 of file gamemap.cpp. References OverviewMapHolder::connect(), and overviewMapHolder. Referenced by hookGuiToMap(). |
|
|
Definition at line 949 of file gamemap.cpp. References _resourcemode, cgp_globalfuel, and getgameparameter(). Referenced by Building::convert(), Building::execnetcontrol(), ResourceChangeNet::getresource(), StaticResourceNet::getresource(), resourceAnalysis(), transfer_all_outstanding_tribute(), and ResourceInfoWindow::update(). |
|
|
generated a pseudo-random number with the map-internal seed
Definition at line 1276 of file |