|
group2 0.1.0
CSE 125 Group 2
|
TOML loader/saver for per-weapon third-person FK hold poses. More...
#include "ecs/components/WeaponHoldPose.hpp"#include <SDL3/SDL_log.h>#include <array>#include <cstdio>#include <filesystem>#include <fstream>#include <toml++/toml.hpp>Functions | |
| bool | loadWeaponHoldPose (const std::string &path, WeaponHoldPose &out) |
| Load a hold pose from a TOML side-table (see WeaponHoldPose.cpp for the schema). | |
| bool | saveWeaponHoldPose (const std::string &path, const WeaponHoldPose &pose) |
| Save a hold pose to a TOML file (atomic temp-write + rename). | |
TOML loader/saver for per-weapon third-person FK hold poses.
Schema (all angles degrees, [pitch, yaw, roll]; a 2-element [pitch, yaw] entry is still accepted and treated as roll = 0):
| bool loadWeaponHoldPose | ( | const std::string & | path, |
| WeaponHoldPose & | out ) |
Load a hold pose from a TOML side-table (see WeaponHoldPose.cpp for the schema).
Missing sections keep their default (zeroed) values; returns false only when the file cannot be parsed at all.
| bool saveWeaponHoldPose | ( | const std::string & | path, |
| const WeaponHoldPose & | pose ) |
Save a hold pose to a TOML file (atomic temp-write + rename).
Returns false on filesystem failure.