47[[nodiscard]] std::vector<std::byte>
write_inputs(std::span<const InputRecord> inputs);
55[[nodiscard]] std::optional<std::vector<InputRecord>>
R-Type game code, built on the Aegis2D engine.
Definition enemy_scripts.hpp:16
std::optional< std::vector< InputRecord > > read_inputs(std::span< const std::byte > payload)
Decodes the payload of an Input datagram.
constexpr std::size_t max_inputs_per_datagram
Inputs an Input datagram carries at most: the newest and the 3 before it, so a lost datagram's input ...
Definition input.hpp:18
std::vector< std::byte > write_inputs(std::span< const InputRecord > inputs)
Encodes the payload of an Input datagram, header excluded.
constexpr std::uint8_t valid_actions
Bits of the actions of an Input: up, down, left, right and fire; bits 5 to 7 must be clear.
Definition input.hpp:14
constexpr std::size_t input_payload_size(std::size_t count) noexcept
Size of the payload of an Input datagram carrying count inputs: the sequence of the newest,...
Definition input.hpp:24