|
Bicameral Engine
GPU-resident engine for a magic-research open-world game
|
#include <replay_session.h>
Public Member Functions | |
| ReplayPlayer (ReplayFile replay) | |
| std::vector< sim::Command > | TakeCommands (uint64_t applyTick, uint32_t limit) |
| void | CheckHash (uint64_t tick, uint64_t hash) |
| void | Rewind (uint64_t tick) |
| bool | Finished () const |
| bool | Passed () const |
| uint64_t | Matches () const |
| uint64_t | Mismatches () const |
| uint64_t | LateCommands () const |
| size_t | HashCount () const |
| size_t | CommandCount () const |
| uint64_t | LastTick () const |
Static Public Member Functions | |
| static std::expected< ReplayPlayer, std::string > | Load (const fs::path &path) |
Static Public Attributes | |
| static constexpr uint64_t | LOOKAHEAD_TICKS = 8 |
Private Attributes | |
| ReplayFile | m_replay |
| size_t | m_nextCommand = 0 |
| size_t | m_nextHash = 0 |
| uint64_t | m_matches = 0 |
| uint64_t | m_mismatches = 0 |
| uint64_t | m_lateCommands = 0 |
Definition at line 37 of file replay_session.h.
|
explicit |
Definition at line 45 of file replay_session.cpp.
References m_replay.
Referenced by Load().
| void bicameral::save::ReplayPlayer::CheckHash | ( | uint64_t | tick, |
| uint64_t | hash ) |
Definition at line 92 of file replay_session.cpp.
References bicameral::Error, bicameral::Log(), m_matches, m_mismatches, m_nextHash, m_replay, and bicameral::Sim.
|
inlinenodiscard |
Definition at line 67 of file replay_session.h.
References m_replay.
|
inlinenodiscard |
Definition at line 58 of file replay_session.h.
References m_nextHash, and m_replay.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay(), and Passed().
|
inlinenodiscard |
Definition at line 66 of file replay_session.h.
References m_replay.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay().
|
inlinenodiscard |
Definition at line 68 of file replay_session.h.
References m_replay.
|
inlinenodiscard |
Definition at line 63 of file replay_session.h.
References m_lateCommands.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay().
|
staticnodiscard |
Definition at line 47 of file replay_session.cpp.
References bicameral::save::Probe, bicameral::save::ReadReplayFile(), and ReplayPlayer().
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::CreateParts().
|
inlinenodiscard |
Definition at line 61 of file replay_session.h.
References m_matches.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay().
|
inlinenodiscard |
Definition at line 62 of file replay_session.h.
References m_mismatches.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay().
|
inlinenodiscard |
Definition at line 59 of file replay_session.h.
References Finished(), m_lateCommands, and m_mismatches.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay().
| void bicameral::save::ReplayPlayer::Rewind | ( | uint64_t | tick | ) |
Definition at line 82 of file replay_session.cpp.
References m_nextCommand, m_nextHash, m_replay, bicameral::sim::Command::targetTick, and bicameral::save::ReplayTickHash::tick.
|
nodiscard |
Definition at line 58 of file replay_session.cpp.
References bicameral::Error, bicameral::Log(), LOOKAHEAD_TICKS, m_lateCommands, m_nextCommand, m_replay, bicameral::sim::Command::sequence, bicameral::Sim, and bicameral::sim::Command::targetTick.
|
staticconstexpr |
Definition at line 39 of file replay_session.h.
Referenced by TakeCommands().
|
private |
Definition at line 82 of file replay_session.h.
Referenced by LateCommands(), Passed(), and TakeCommands().
|
private |
Definition at line 80 of file replay_session.h.
Referenced by CheckHash(), and Matches().
|
private |
Definition at line 81 of file replay_session.h.
Referenced by CheckHash(), Mismatches(), and Passed().
|
private |
Definition at line 76 of file replay_session.h.
Referenced by Rewind(), and TakeCommands().
|
private |
Definition at line 77 of file replay_session.h.
Referenced by CheckHash(), Finished(), and Rewind().
|
private |
Definition at line 73 of file replay_session.h.
Referenced by CheckHash(), CommandCount(), Finished(), HashCount(), LastTick(), ReplayPlayer(), Rewind(), and TakeCommands().