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

replay.cpp File Reference

Everything for recording and playing replays. More...

#include <stdarg.h>
#include "replay.h"
#include "typen.h"
#include "buildingtype.h"
#include "vehicletype.h"
#include "spfst.h"
#include "controls.h"
#include "dialog.h"
#include "gameoptions.h"
#include "viewcalculation.h"
#include "itemrepository.h"
#include "containercontrols.h"
#include "resourcenet.h"
#include "guiiconhandler.h"
#include "guifunctions.h"
#include "cannedmessages.h"
#include "unitctrl.h"
#include "replaymapdisplay.h"
#include "asc-mainscreen.h"
#include "loaders.h"
#include "turncontrol.h"
#include "widgets/textrenderer.h"
#include "actions/jumpdrive.h"
#include "actions/selfdestruct.h"
#include "reactionfire.h"
#include "gameeventsystem.h"
#include "sdl/graphicsqueue.h"
#include "video/videorecorder.h"
#include "iconrepository.h"
#include "dialogs/replayrecorder.h"

Include dependency graph for replay.cpp:

Go to the source code of this file.

Namespaces

namespace  ReplayGuiFunctions

Functions

void registerReplayGuiFunctions (GuiIconHandler &handler)
void runSpecificReplay (int player, int viewingplayer, bool performEndTurnOperations)
 runs the replay for the given player
void viewOwnReplay (Player &player)
 runs the replay of the current player. This is used primarily for debugging the replay system
void checkforreplay (void)
 checks if there is replay information and -if there is any- runs the replay
void initReplayLogging (Player &player)
 Initialized the replay logging at the beginning of a players or the ai's turn.
Resources getUnitResourceCargo (Vehicle *veh)
void logtoreplayinfo (trpl_actions _action,...)
void logAllianceChanges (GameMap *map, int player1, int player2, DiplomaticStates s)
void hookReplayToSystem ()
 initialized the replay system at program startup

Variables

trunreplay runreplay
int startreplaylate = 0
 a hack to enable the replay in a game that was started without replays
ReplayRecorderWatcherGlobal replayRecorderWatcherGlobal
ReplayRecorderreplayRecorder = NULL


Detailed Description

Everything for recording and playing replays.

Replays being the moves of other players or the AI, which can be viewed later (especially useful in email games)

Definition in file replay.cpp.


Function Documentation

void checkforreplay void   ) 
 

checks if there is replay information and -if there is any- runs the replay

Definition at line 555 of file replay.cpp.

References actmap, GameMap::actplayer, choice_dlg(), Player::human, mainScreenWidget, MainScreenWidget::LockOptions::Menu, GameMap::player, GameMap::replayinfo, runSpecificReplay(), and Player::supervisor.

Referenced by hookGuiToMap().

Resources getUnitResourceCargo Vehicle veh  ) 
 

Definition at line 639 of file replay.cpp.

References ContainerBase::getCargo(), and Vehicle::getTank().

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

void hookReplayToSystem  ) 
 

initialized the replay system at program startup

Definition at line 2709 of file replay.cpp.

References DiplomaticStateVector::anyStateChanged, and logAllianceChanges().

Referenced by loaddata().

void initReplayLogging Player player  ) 
 

Initialized the replay logging at the beginning of a players or the ai's turn.

Definition at line 601 of file replay.cpp.

References fatalError(), Player::getParentMap(), Player::getPosition(), Player::off, GameMap::replayinfo, savereplay(), startreplaylate, Player::stat, and tnstream::writing.

Referenced by deployMapPlayingHooks().

void logAllianceChanges GameMap map,
int  player1,
int  player2,
DiplomaticStates  s
 

Definition at line 2703 of file replay.cpp.

References actmap, logtoreplayinfo(), and rpl_alliancechange2.

Referenced by hookReplayToSystem().

void logtoreplayinfo trpl_actions  _action,
  ...
 

Definition at line 648 of file replay.cpp.

References actmap, Resources::energy, Resources::fuel, GameMap::getUnit(), getUnitResourceCargo(), Resources::material, GameMap::replayinfo, rpl_alliancechange2, rpl_attack, rpl_bldrefuel, rpl_buildobj, rpl_buildobj2, rpl_buildProdLine, rpl_buildtnk, rpl_buildtnk2, rpl_buildtnk3, rpl_buildtnk4, rpl_cancelResearch, rpl_changeheight, rpl_changeheight2, rpl_convert, rpl_convert2, rpl_cutFromGame, rpl_jump, rpl_move, rpl_move2, rpl_move3, rpl_move4, rpl_move5, rpl_moveUnitUp, rpl_moveUnitUpDown, rpl_netcontrol, rpl_produceAmmo, rpl_produceunit, rpl_productionResourceUsage, rpl_putbuilding, rpl_putbuilding2, rpl_putmine, rpl_putmine2, rpl_reactionfire, rpl_reactionFireOff, rpl_reactionFireOn, rpl_recycleUnit, rpl_refuel, rpl_refuel2, rpl_refuel3, rpl_remobj, rpl_remobj2, rpl_removebuilding, rpl_removebuilding2, rpl_removebuilding3, rpl_removemine, rpl_removeProdLine, rpl_removeunit, rpl_repairBuilding, rpl_repairUnit, rpl_repairUnit2, rpl_repairUnit3, rpl_selfdestruct, rpl_setGeneratorStatus, rpl_setResearch, rpl_setResourceProcessingAmount, rpl_techResearched, rpl_trainunit, rpl_transferTribute, tnstream::writeChar(), and tnstream::writeInt().

Referenced by ContainerControls::buildProductionLine(), SelfDestruct::destruct(), destructbuildinglevel2(), ContainerControls::destructUnit(), execuseraction(), VehicleService::execute(), VehicleAttack::execute(), BaseVehicleMovement::execute(), GuiFunctions::BuildingConstruction::execute(), GuiFunctions::VehicleBuildingGui::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::DisableReactionfire::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::PowerOff::execute(), GuiFunctions::PowerOn::execute(), CargoGuiFunctions::TransferUnitControl::execute(), CargoGuiFunctions::RepairUnit::execute(), NewVehicleService::executeContainer(), ContainerControls::fillAmmo(), ContainerControls::fillResource(), JumpDrive::jump(), logAllianceChanges(), ContainerControls::moveUnitDown(), ContainerControls::moveUnitUp(), InternalAmmoTransferHandler::performTransfer(), ContainerControls::produceAmmo(), ContainerControls::produceUnit(), putMine(), ContainerControls::removeProductionLine(), BuildingControlWindow::repair(), researchCheck(), tgiveunitawaydlg::run(), ContainerControls::trainUnit(), and tributeTransfer().

void registerReplayGuiFunctions GuiIconHandler handler  ) 
 

Definition at line 473 of file replay.cpp.

References GuiIconHandler::registerUserFunction().

Referenced by ReplayGuiIconHandleHandler::ReplayGuiIconHandleHandler().

void runSpecificReplay int  player,
int  viewingplayer,
bool  performEndTurnOperations
 

runs the replay for the given player

Definition at line 521 of file replay.cpp.

References actmap, errorMessage(), GameMap::replayinfo, and trunreplay::run().

Referenced by checkforreplay(), and viewOwnReplay().

void viewOwnReplay Player player  ) 
 

runs the replay of the current player. This is used primarily for debugging the replay system

Definition at line 544 of file replay.cpp.

References choice_dlg(), Player::getParentMap(), Player::getPosition(), Player::human, CGameOptions::Instance(), runSpecificReplay(), Player::stat, and Player::supervisor.

Referenced by hookGuiToMap().


Variable Documentation

ReplayRecorder* replayRecorder = NULL
 

Definition at line 160 of file replay.cpp.

class ReplayRecorderWatcherGlobal replayRecorderWatcherGlobal
 

Referenced by ReplayRecorder::ReplayRecorder().

trunreplay runreplay
 

Definition at line 56 of file replay.cpp.

Referenced by treactionfirereplay::init().

int startreplaylate = 0
 

a hack to enable the replay in a game that was started without replays

Definition at line 58 of file replay.cpp.

Referenced by initReplayLogging().


Generated on Tue Jun 24 02:06:28 2008 for Advanced Strategic Command by  doxygen 1.4.2