#pragma once #include #include "Runtime/CToken.hpp" #include namespace metaforce { class CCharLayoutInfo; class CLayoutDescription { public: class CScaledLayoutDescription { TLockedToken x0_layoutToken; float xc_scale = 0.0f; std::optional x10_scaleVec; public: const TLockedToken& ScaledLayout() const { return x0_layoutToken; } float GlobalScale() const { return xc_scale; } const std::optional& GetScaleVec() const { return x10_scaleVec; } }; private: TLockedToken x0_layoutToken; std::optional xc_scaled; public: explicit CLayoutDescription(const TLockedToken& token) : x0_layoutToken(token) {} const std::optional& GetScaledLayoutDescription() const { return xc_scaled; } const TLockedToken& GetCharLayoutInfo() const { return x0_layoutToken; } bool UsesScale() const { return bool(xc_scaled); } const TLockedToken& ScaledLayout() const { if (UsesScale()) return xc_scaled->ScaledLayout(); return x0_layoutToken; } }; } // namespace metaforce