Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::save Namespace Reference

Namespaces

namespace  anonymous_namespace{replay_file.cpp}
namespace  anonymous_namespace{replay_session.cpp}

Classes

struct  ReplayTickHash
struct  ReplayFile
class  ReplayRecorder
class  ReplayPlayer

Enumerations

enum class  ReplayWorld : uint8_t { Probe = 1 }

Functions

std::expected< std::vector< std::byte >, std::string > SerializeReplay (const ReplayFile &replay)
std::expected< void, std::string > WriteReplayFile (const fs::path &path, const ReplayFile &replay)
std::expected< ReplayFile, std::string > ParseReplay (std::span< const std::byte > bytes)
std::expected< ReplayFile, std::string > ReadReplayFile (const fs::path &path)

Variables

constexpr uint32_t REPLAY_FORMAT_VERSION = 1

Enumeration Type Documentation

◆ ReplayWorld

enum class bicameral::save::ReplayWorld : uint8_t
strong
Enumerator
Probe 

Definition at line 33 of file replay_file.h.

Function Documentation

◆ ParseReplay()

std::expected< ReplayFile, std::string > bicameral::save::ParseReplay ( std::span< const std::byte > bytes)
nodiscard

Definition at line 151 of file replay_file.cpp.

References bicameral::sim::COMMAND_BYTES, bicameral::save::ReplayFile::commands, bicameral::save::ReplayFile::initialDelta, Probe, REPLAY_FORMAT_VERSION, and bicameral::save::ReplayFile::tickHashes.

Referenced by ReadReplayFile().

Here is the caller graph for this function:

◆ ReadReplayFile()

std::expected< ReplayFile, std::string > bicameral::save::ReadReplayFile ( const fs::path & path)
nodiscard

Definition at line 200 of file replay_file.cpp.

References ParseReplay().

Referenced by bicameral::save::ReplayPlayer::Load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializeReplay()

std::expected< std::vector< std::byte >, std::string > bicameral::save::SerializeReplay ( const ReplayFile & replay)
nodiscard

◆ WriteReplayFile()

std::expected< void, std::string > bicameral::save::WriteReplayFile ( const fs::path & path,
const ReplayFile & replay )
nodiscard

Definition at line 136 of file replay_file.cpp.

References SerializeReplay().

Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::FinishReplay(), and bicameral::save::ReplayRecorder::Write().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ REPLAY_FORMAT_VERSION

uint32_t bicameral::save::REPLAY_FORMAT_VERSION = 1
inlineconstexpr

Definition at line 30 of file replay_file.h.

Referenced by ParseReplay().