Advanced Strategic Command
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
trunreplay Class Reference

#include <replay.h>

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
 
int 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

Context trunreplay::createReplayContext ( )
protected
void trunreplay::displayActionCursor ( int  x1,
int  y1,
int  x2 = -1,
int  y2 = -1,
int  secondWait = 0 
)
protected
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().

void trunreplay::execnextreplaymove ( void  )
protected

Definition at line 924 of file replay.cpp.

References actmap, GameMap::actplayer, Research::addanytechnology(), MapField::addobject(), ContainerBase::addToCargo(), RecalculateAreaView::addView(), Vehicle::addview(), Building::ammo, Vehicle::ammo, ammoProductionCost, tfight::av, DestructUnitCommand::avail(), JumpDriveCommand::available(), TechAdapterDependency::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(), MapField::getContainer(), GameMap::getContainer(), getDefaultMapDisplay(), GameAction::getDescription(), getfield(), GameMap::getField(), ContainerBase::getMap(), getmessage(), Vehicle::getMovement(), ContainerBase::getOwner(), GameMap::getPlayer(), GameMap::getPlayerView(), Vehicle::getPosition(), ContainerBase::getProductionCost(), Building::getResource(), Vehicle::getResource(), ContainerBase::getResource(), Vehicle::getTank(), GameMap::getUnit(), getUnitResourceCargo(), GameMap::getvehicletype_byid(), Vehicle::height, CGameOptions::Instance(), ReplayRecorder::isRunning(), Vehicle::isViewing(), ActionRegistry::JumpDriveCommand, Resources::material, maxmalq, ContainerBaseType::maxplus, maxViewRange, movenum, CargoMoveCommand::moveOutwards, ActionRegistry::MoveUnitCommand, Vehicle::networkid, nextaction, MapField::objects, objectTypeRepository, GameMap::player, ContainerBase::plus, Vehicle::prepareForCleanRemove(), ContainerBaseType::productionCost, Research::progress, Building::putAmmo(), Vehicle::reactionfire, GameAction::readFromStream(), MemoryStreamStorage::readfromstream(), tnstream::reading, tnstream::readInt(), readnextaction(), tnstream::readUint8(), ActionRegistry::RecycleUnitCommand, Command::redo(), ObjectType::remove_movecost, removeActionCursor(), ObjectType::removecost, MapField::removeObject(), ActionRegistry::RemoveProductionLineCommand, ContainerBase::removeUnitFromCargo(), RecalculateAreaView::removeView(), Vehicle::removeview(), ContainerBase::repairItem(), Player::research, Technology::researchpoints, ContainerBase::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(), Vehicle::setnewposition(), MapCoordinate3D::setNumericalHeight(), tunitattacksunit::setresult(), tunitattacksbuilding::setresult(), tunitattacksobject::setresult(), DiplomaticStateVector::setState(), DestructBuildingCommand::setTargetPosition(), ReplayMapDisplay::showBattle(), status, stream, ActionResult::successful(), ContainerBaseType::techDependency, technologyRepository, ticker, ASCString::toString(), MapCoordinate::toString(), ActionRegistry::TrainUnitCommand, transfer_all_outstanding_tribute(), Building::typ, Vehicle::typ, updateFieldInfo, MapField::vehicle, vehicleTypeRepository, ObjectType::viewbonus_abs, ObjectType::viewbonus_plus, wait(), MapCoordinate::x, Vehicle::xpos, and Vehicle::ypos.

Referenced by run().

void trunreplay::firstinit ( void  )

Definition at line 2279 of file replay.cpp.

References status.

Referenced by run().

void trunreplay::readnextaction ( void  )
protected

Definition at line 2127 of file replay.cpp.

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

Referenced by execnextreplaymove().

void trunreplay::removeActionCursor ( void  )
protected

Definition at line 917 of file replay.cpp.

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

Referenced by execnextreplaymove().

int trunreplay::run ( int  player,
int  viewingplayer,
bool  performEndTurnOperations 
)
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
void trunreplay::wait ( MapCoordinate  pos1,
MapCoordinate  pos2,
int  t = ticker 
)
protected

Member Data Documentation

int trunreplay::actplayer
protected

Definition at line 44 of file replay.h.

Referenced by run().

int trunreplay::movenum
protected

Definition at line 37 of file replay.h.

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

int trunreplay::nextaction
protected

Definition at line 52 of file replay.h.

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

GameMap* trunreplay::orgmap
protected

Definition at line 39 of file replay.h.

Referenced by run().

int trunreplay::status
MemoryStream* trunreplay::stream
protected

Definition at line 40 of file replay.h.

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


The documentation for this class was generated from the following files: