trunreplay Class Reference

#include <replay.h>

List of all members.

Public Member Functions

 trunreplay ()
void firstinit ()
int run (int player, int viewingplayer, bool performEndTurnOperations)
 ~trunreplay ()

Public Attributes

int status

Protected Member Functions

void execnextreplaymove (void)
void wait (int t=ticker)
void wait (MapCoordinate pos, int t=ticker)
void wait (MapCoordinate pos1, MapCoordinate pos2, int t=ticker)
void error (const char *message,...)
void error (const MapCoordinate &pos, const char *message,...)
void error (const ASCString &message)
void error (const MapCoordinate &pos, const ASCString &message)
void error (const ActionResult &res)
Context createReplayContext ()
void readnextaction (void)
void displayActionCursor (int x1, int y1, int x2=-1, int y2=-1, int secondWait=0)
void removeActionCursor (void)

Protected Attributes

int movenum
GameMaporgmap
MemoryStreamstream
int actplayer
char nextaction


Detailed Description

Definition at line 33 of file replay.h.


Constructor & Destructor Documentation

trunreplay::trunreplay (  ) 

Definition at line 795 of file replay.cpp.

References movenum, and status.

trunreplay::~trunreplay (  ) 

Definition at line 802 of file replay.cpp.


Member Function Documentation

void trunreplay::execnextreplaymove ( void   )  [protected]

Definition at line 924 of file replay.cpp.

References actmap, Research::addanytechnology(), MapField::addobject(), ContainerBase::addToCargo(), RecalculateAreaView::addView(), Vehicle::addview(), Building::ammo, Vehicle::ammo, ammoProductionCost, tfight::av, DestructUnitCommand::avail(), JumpDriveCommand::available(), ObjectType::basicjamming_abs, ObjectType::basicjamming_plus, ObjectType::build_movecost, ObjectType::buildcost, MapField::building, buildingTypeRepository, ActionRegistry::BuildProductionLineCommand, tfight::calc(), ActionRegistry::CancelResearchCommand, ActionRegistry::CargoMoveCommand, computeview(), ActionRegistry::ConstructBuildingCommand, Building::convert(), Vehicle::convert(), createReplayContext(), cwminen, tfight::tavalues::damage, ContainerBase::damage, Vehicle::decreaseMovement(), ContainerBaseType::description, ActionRegistry::DestructBuildingCommand, ActionRegistry::DestructUnitCommand, Player::diplomacy, Vehicle::ReactionFire::disable(), displayActionCursor(), displayActionError(), displayLogMessage(), displaymap(), displaymessage(), displaymessage2(), tfight::dv, Vehicle::ReactionFire::enable(), Resources::energy, error(), GameAction::execute(), fieldvisiblenow(), Resources::fuel, ActionResult::getCode(), GameMap::getContainer(), MapField::getContainer(), getDefaultMapDisplay(), GameAction::getDescription(), GameMap::getField(), getfield(), getmessage(), Vehicle::getMovement(), ContainerBase::getOwner(), GameMap::getPlayer(), GameMap::getPlayerView(), ContainerBase::getProductionCost(), Vehicle::getResource(), Building::getResource(), ContainerBase::getResource(), Vehicle::getTank(), GameMap::getUnit(), getUnitResourceCargo(), GameMap::getvehicletype_byid(), Vehicle::height, CGameOptions::Instance(), ReplayRecorder::isRunning(), ActionRegistry::JumpDriveCommand, Resources::material, maxmalq, ContainerBaseType::maxplus, maxViewRange, movenum, CargoMoveCommand::moveOutwards, ActionRegistry::MoveUnitCommand, Vehicle::networkid, nextaction, objectTypeRepository, GameMap::player, ContainerBase::plus, ContainerBaseType::productionCost, Research::progress, Building::putAmmo(), Vehicle::reactionfire, tnstream::readChar(), GameAction::readFromStream(), MemoryStreamStorage::readfromstream(), tnstream::reading, tnstream::readInt(), readnextaction(), ActionRegistry::RecycleUnitCommand, Command::redo(), ObjectType::remove_movecost, removeActionCursor(), ObjectType::removecost, MapField::removeObject(), ActionRegistry::RemoveProductionLineCommand, ContainerBase::removeUnitFromCargo(), RecalculateAreaView::removeView(), ContainerBase::repairItem(), replayRecorder, Player::research, Technology::researchpoints, Resources::resource(), 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_finished, rpl_jump, rpl_move, rpl_move2, rpl_move3, rpl_move4, rpl_move5, rpl_moveUnitUp, rpl_moveUnitUpDown, rpl_netcontrol, rpl_produceAmmo, rpl_produceunit, rpl_putbuilding, rpl_putbuilding2, rpl_putmine, rpl_putmine2, 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_runCommandAction, rpl_selfdestruct, rpl_setGeneratorStatus, rpl_setResearch, rpl_setResourceProcessingAmount, rpl_techResearched, rpl_trainunit, rpl_transferTribute, Vehicle::setGeneratorStatus(), CargoMoveCommand::setMode(), MapCoordinate3D::setNumericalHeight(), tunitattacksobject::setresult(), tunitattacksbuilding::setresult(), tunitattacksunit::setresult(), DiplomaticStateVector::setState(), DestructBuildingCommand::setTargetPosition(), ReplayMapDisplay::showBattle(), status, stream, ActionResult::successful(), technologyRepository, ticker, ASCString::toString(), ActionRegistry::TrainUnitCommand, transfer_all_outstanding_tribute(), Building::typ, Vehicle::typ, updateFieldInfo, MapField::vehicle, vehicleTypeRepository, ObjectType::viewbonus_abs, ObjectType::viewbonus_plus, wait(), Vehicle::xpos, and Vehicle::ypos.

Referenced by run().

void trunreplay::wait ( int  t = ticker  )  [protected]

Definition at line 869 of file replay.cpp.

References CGameOptions::Instance(), keypress(), releasetimeslice(), and ticker.

Referenced by execnextreplaymove(), and wait().

void trunreplay::wait ( MapCoordinate  pos,
int  t = ticker 
) [protected]

Definition at line 884 of file replay.cpp.

References actmap, fieldvisiblenow(), GameMap::getField(), GameMap::getPlayerView(), and wait().

void trunreplay::wait ( MapCoordinate  pos1,
MapCoordinate  pos2,
int  t = ticker 
) [protected]

Definition at line 890 of file replay.cpp.

References actmap, fieldvisiblenow(), GameMap::getField(), GameMap::getPlayerView(), and wait().

void trunreplay::error ( const char *  message,
  ... 
) [protected]

Definition at line 833 of file replay.cpp.

References displaymessage(), and CGameOptions::Instance().

Referenced by error(), execnextreplaymove(), and run().

void trunreplay::error ( const MapCoordinate pos,
const char *  message,
  ... 
) [protected]

Definition at line 818 of file replay.cpp.

References error(), and CGameOptions::Instance().

void trunreplay::error ( const ASCString message  )  [protected]

Definition at line 855 of file replay.cpp.

References displaymessage(), and CGameOptions::Instance().

void trunreplay::error ( const MapCoordinate pos,
const ASCString message 
) [protected]

Definition at line 812 of file replay.cpp.

References error().

void trunreplay::error ( const ActionResult res  )  [protected]

Definition at line 807 of file replay.cpp.

References error(), ActionResult::getCode(), ActionResult::getMessage(), and getmessage().

Context trunreplay::createReplayContext (  )  [protected]

Definition at line 775 of file replay.cpp.

References Context::actingPlayer, Context::actionContainer, GameMap::actions, actmap, GameMap::actplayer, Context::display, Context::gamemap, getDefaultMapDisplay(), GameMap::getPlayer(), GameMap::getPlayerView(), Context::parentAction, and Context::viewingPlayer.

Referenced by execnextreplaymove().

void trunreplay::readnextaction ( void   )  [protected]

Definition at line 2131 of file replay.cpp.

References MemoryStream::dataavail(), nextaction, tnstream::readChar(), rpl_finished, and stream.

Referenced by execnextreplaymove().

void trunreplay::displayActionCursor ( int  x1,
int  y1,
int  x2 = -1,
int  y2 = -1,
int  secondWait = 0 
) [protected]

Definition at line 910 of file replay.cpp.

References ReplayMapDisplay::displayActionCursor(), getDefaultMapDisplay(), CGameOptions::Instance(), and ReplayMapDisplay::setCursorDelay().

Referenced by execnextreplaymove().

void trunreplay::removeActionCursor ( void   )  [protected]

Definition at line 917 of file replay.cpp.

References getDefaultMapDisplay(), and ReplayMapDisplay::removeActionCursor().

Referenced by execnextreplaymove().

void trunreplay::firstinit (  ) 

Definition at line 2283 of file replay.cpp.

References status.

Referenced by run().

int trunreplay::run ( int  player,
int  viewingplayer,
bool  performEndTurnOperations 
)

Definition at line 2141 of file replay.cpp.

References actmap, GameMap::actplayer, actplayer, checktimedevents(), compareMapResources(), computeview(), MemoryStream::dataavail(), displaymap(), displaymessage(), displaymessage2(), GameMap::endRound(), GameMap::endTurn(), error(), execnextreplaymove(), findNextPlayer(), firstinit(), GameMap::getCursor(), getDefaultMapDisplay(), OverviewMapHolder::getOverviewMap(), getPGApplication(), GameMap::getPlayer(), CGameOptions::Instance(), ReplayRecorder::isRunning(), loadreplay(), mainScreenWidget, MainScreenWidget::LockOptions::Menu, movenum, nextaction, orgmap, GameMap::overviewMapHolder, tnstream::readChar(), tnstream::reading, releasetimeslice(), GameMap::Replay, GameMap::replayinfo, replayRecorder, rpl_finished, ASC_PG_Dialog::RunModal(), GameMap::setPlayerView(), GameMap::sigPlayerTurnBegins, GameMap::state, status, stream, and updateFieldInfo.

Referenced by runSpecificReplay().


Member Data Documentation

int trunreplay::movenum [protected]

Definition at line 37 of file replay.h.

Referenced by execnextreplaymove(), run(), and trunreplay().

GameMap* trunreplay::orgmap [protected]

Definition at line 39 of file replay.h.

Referenced by run().

MemoryStream* trunreplay::stream [protected]

Definition at line 40 of file replay.h.

Referenced by execnextreplaymove(), readnextaction(), and run().

int trunreplay::actplayer [protected]

Definition at line 44 of file replay.h.

Referenced by run().

char trunreplay::nextaction [protected]

Definition at line 52 of file replay.h.

Referenced by execnextreplaymove(), readnextaction(), and run().

int trunreplay::status

Definition at line 62 of file replay.h.

Referenced by ReplayGuiFunctions::ReplayRecordExit::available(), ReplayGuiFunctions::ReplayRecord::available(), ReplayGuiFunctions::ReplayExit::available(), ReplayGuiFunctions::ReplayRewind::available(), ReplayGuiFunctions::ReplaySlower::available(), ReplayGuiFunctions::ReplayFaster::available(), ReplayGuiFunctions::ReplayPause::available(), ReplayGuiFunctions::ReplayPlay::available(), execnextreplaymove(), ReplayGuiFunctions::ReplayRecordExit::execute(), ReplayGuiFunctions::ReplayRecord::execute(), ReplayGuiFunctions::ReplayExit::execute(), ReplayGuiFunctions::ReplayRewind::execute(), ReplayGuiFunctions::ReplayPause::execute(), ReplayGuiFunctions::ReplayPlay::execute(), firstinit(), run(), and trunreplay().


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