31 ctx.read32<std::endian::little>(
reinterpret_cast<std::byte*
>(&phene.creeping_speed), 1);
32 ctx.read32<std::endian::little>(
reinterpret_cast<std::byte*
>(&phene.walking_speed), 1);
33 ctx.read32<std::endian::little>(
reinterpret_cast<std::byte*
>(&phene.running_speed), 1);
34 ctx.read32<std::endian::little>(
reinterpret_cast<std::byte*
>(&phene.stride_length), 1);
35 ctx.read32<std::endian::little>(
reinterpret_cast<std::byte*
>(&phene.max_angular_frequency), 1);
36 ctx.read32<std::endian::little>(
reinterpret_cast<std::byte*
>(&phene.grip), 1);
38 std::uint8_t model_filename_length{0};
39 ctx.read8(
reinterpret_cast<std::byte*
>(&model_filename_length), 1);
40 std::string model_filename(model_filename_length,
'\0');
41 ctx.read8(
reinterpret_cast<std::byte*
>(model_filename.data()), model_filename_length);
51 std::unique_ptr<ant_legs_gene> gene = std::make_unique<ant_legs_gene>();
void load_ant_gene(ant_gene< T > &gene, resource_manager &resource_manager, deserialize_context &ctx, void(*load_phene)(T &, ::resource_manager &, deserialize_context &))
Loads an ant gene.
static std::unique_ptr< T > load(::resource_manager &resource_manager, deserialize_context &ctx)
Loads a resource.
Manages the loading, caching, and saving of resources.
std::shared_ptr< T > load(const std::filesystem::path &path)
Loads and caches a resource.
float standing_height
Distance from the mesosoma to the ground when standing, in mesosomal lengths.
Provides access to a deserialization state.
std::size_t read32(std::byte *data, std::size_t count) noexcept(false)
Reads 32-bit (double word) data.