#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 |
| GameMap * | orgmap |
| MemoryStream * | stream |
| int | actplayer |
| char | nextaction |
Definition at line 33 of file replay.h.
| trunreplay::trunreplay | ( | ) |
| trunreplay::~trunreplay | ( | ) |
Definition at line 802 of file replay.cpp.
| 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] |
| 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] |
| 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 | ( | ) |
| 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().
int trunreplay::movenum [protected] |
Definition at line 37 of file replay.h.
Referenced by execnextreplaymove(), run(), and trunreplay().
GameMap* trunreplay::orgmap [protected] |
MemoryStream* trunreplay::stream [protected] |
Definition at line 40 of file replay.h.
Referenced by execnextreplaymove(), readnextaction(), and run().
int trunreplay::actplayer [protected] |
char trunreplay::nextaction [protected] |
Definition at line 52 of file replay.h.
Referenced by execnextreplaymove(), readnextaction(), and run().
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().
1.5.1