Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::sim::anonymous_namespace{lab_box.cpp} Namespace Reference

Functions

void SetPayload (Command &command, uint32_t word, uint32_t value)
Command MakeLabCommand (uint64_t targetTick, uint32_t sequence, uint32_t type, LabCellPosition cell, uint32_t temperatureMilliKelvin)
template<typename T>
bool SameBytes (const std::vector< T > &a, const std::vector< T > &b)
template<typename T>
void Append (std::vector< std::byte > &bytes, const T &value)
template<typename T>
bool Take (std::span< const std::byte > &bytes, T &value)

Variables

constexpr uint64_t AIR_OXYGEN_MICROMOLES = 1063800
constexpr uint64_t AIR_NITROGEN_MICROMOLES = 4014200
constexpr uint64_t AIR_TOTAL_MICROMOLES = AIR_OXYGEN_MICROMOLES + AIR_NITROGEN_MICROMOLES
constexpr uint64_t WOOD_CELLULOSE_MICROMOLES = 38600000
constexpr uint64_t PORE_OXYGEN_MICROMOLES = 983000
constexpr uint64_t PORE_NITROGEN_MICROMOLES = 3697000
constexpr uint64_t CHARCOAL_CARBON_MICROMOLES = 312000000
constexpr uint32_t COMMAND_WORDS_PER_ENTRY = 3
constexpr std::array< char, 4 > RECORDING_MAGIC = {'B', 'L', 'A', 'B'}
constexpr uint32_t RECORDING_VERSION = 1

Function Documentation

◆ Append()

template<typename T>
void bicameral::sim::anonymous_namespace{lab_box.cpp}::Append ( std::vector< std::byte > & bytes,
const T & value )

Definition at line 63 of file lab_box.cpp.

References Append().

Referenced by Append().

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

◆ MakeLabCommand()

Command bicameral::sim::anonymous_namespace{lab_box.cpp}::MakeLabCommand ( uint64_t targetTick,
uint32_t sequence,
uint32_t type,
LabCellPosition cell,
uint32_t temperatureMilliKelvin )

Definition at line 40 of file lab_box.cpp.

References bicameral::sim::LabCellPosition::Index(), bicameral::sim::LAB_BOX_EDGE, MakeLabCommand(), bicameral::sim::Command::sequence, SetPayload(), bicameral::sim::Command::size, bicameral::sim::Command::targetTick, bicameral::sim::Command::type, bicameral::sim::LabCellPosition::x, bicameral::sim::LabCellPosition::y, and bicameral::sim::LabCellPosition::z.

Referenced by MakeLabCommand().

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

◆ SameBytes()

template<typename T>
bool bicameral::sim::anonymous_namespace{lab_box.cpp}::SameBytes ( const std::vector< T > & a,
const std::vector< T > & b )

Definition at line 56 of file lab_box.cpp.

References SameBytes().

Referenced by SameBytes().

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

◆ SetPayload()

void bicameral::sim::anonymous_namespace{lab_box.cpp}::SetPayload ( Command & command,
uint32_t word,
uint32_t value )

Definition at line 36 of file lab_box.cpp.

References bicameral::sim::Command::payload, and SetPayload().

Referenced by MakeLabCommand(), and SetPayload().

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

◆ Take()

template<typename T>
bool bicameral::sim::anonymous_namespace{lab_box.cpp}::Take ( std::span< const std::byte > & bytes,
T & value )

Definition at line 70 of file lab_box.cpp.

References Take().

Referenced by Take().

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

Variable Documentation

◆ AIR_NITROGEN_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::AIR_NITROGEN_MICROMOLES = 4014200
constexpr

Definition at line 21 of file lab_box.cpp.

◆ AIR_OXYGEN_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::AIR_OXYGEN_MICROMOLES = 1063800
constexpr

Definition at line 20 of file lab_box.cpp.

◆ AIR_TOTAL_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::AIR_TOTAL_MICROMOLES = AIR_OXYGEN_MICROMOLES + AIR_NITROGEN_MICROMOLES
constexpr

Definition at line 22 of file lab_box.cpp.

◆ CHARCOAL_CARBON_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::CHARCOAL_CARBON_MICROMOLES = 312000000
constexpr

Definition at line 28 of file lab_box.cpp.

◆ COMMAND_WORDS_PER_ENTRY

uint32_t bicameral::sim::anonymous_namespace{lab_box.cpp}::COMMAND_WORDS_PER_ENTRY = 3
constexpr

Definition at line 30 of file lab_box.cpp.

◆ PORE_NITROGEN_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::PORE_NITROGEN_MICROMOLES = 3697000
constexpr

Definition at line 26 of file lab_box.cpp.

◆ PORE_OXYGEN_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::PORE_OXYGEN_MICROMOLES = 983000
constexpr

Definition at line 25 of file lab_box.cpp.

◆ RECORDING_MAGIC

std::array<char, 4> bicameral::sim::anonymous_namespace{lab_box.cpp}::RECORDING_MAGIC = {'B', 'L', 'A', 'B'}
constexpr

Definition at line 33 of file lab_box.cpp.

◆ RECORDING_VERSION

uint32_t bicameral::sim::anonymous_namespace{lab_box.cpp}::RECORDING_VERSION = 1
constexpr

Definition at line 34 of file lab_box.cpp.

◆ WOOD_CELLULOSE_MICROMOLES

uint64_t bicameral::sim::anonymous_namespace{lab_box.cpp}::WOOD_CELLULOSE_MICROMOLES = 38600000
constexpr

Definition at line 24 of file lab_box.cpp.