Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
replay_file.cpp File Reference
#include "save/replay_file.h"
#include <array>
#include <bit>
#include <cstring>
#include <format>
#include <fstream>
#include "core/aliases.h"
#include "core/unicode.h"
Include dependency graph for replay_file.cpp:

Go to the source code of this file.

Classes

struct  bicameral::save::anonymous_namespace{replay_file.cpp}::Header

Namespaces

namespace  bicameral
namespace  bicameral::save
namespace  bicameral::save::anonymous_namespace{replay_file.cpp}

Functions

constexpr uint64_t bicameral::save::anonymous_namespace{replay_file.cpp}::AlignUp (uint64_t value)
std::expected< uint64_t, std::string > bicameral::save::anonymous_namespace{replay_file.cpp}::ExpectedBytes (const Header &header)
std::expected< void, std::string > bicameral::save::anonymous_namespace{replay_file.cpp}::CheckOrder (const ReplayFile &replay)
std::string bicameral::save::anonymous_namespace{replay_file.cpp}::PathText (const fs::path &path)
void bicameral::save::anonymous_namespace{replay_file.cpp}::Append (std::vector< std::byte > &bytes, std::span< const std::byte > source)
template<typename T>
void bicameral::save::anonymous_namespace{replay_file.cpp}::CopyOut (std::span< const std::byte > bytes, uint64_t offset, std::span< T > values)
std::expected< std::vector< std::byte >, std::string > bicameral::save::SerializeReplay (const ReplayFile &replay)
std::expected< void, std::string > bicameral::save::WriteReplayFile (const fs::path &path, const ReplayFile &replay)
std::expected< ReplayFile, std::string > bicameral::save::ParseReplay (std::span< const std::byte > bytes)
std::expected< ReplayFile, std::string > bicameral::save::ReadReplayFile (const fs::path &path)

Variables

constexpr std::array< char, 4 > bicameral::save::anonymous_namespace{replay_file.cpp}::MAGIC = {'B', 'C', 'R', 'P'}
constexpr uint64_t bicameral::save::anonymous_namespace{replay_file.cpp}::HEADER_BYTES = 64
constexpr uint64_t bicameral::save::anonymous_namespace{replay_file.cpp}::HASH_BYTES = 16
constexpr uint64_t bicameral::save::anonymous_namespace{replay_file.cpp}::ALIGNMENT = 8
constexpr uint64_t bicameral::save::anonymous_namespace{replay_file.cpp}::MAX_FILE_BYTES = uint64_t{1} << 30