2016-04-13 23:07:18 +00:00
|
|
|
#ifndef __URDE_CLAYOUTDESCRIPTION_HPP__
|
|
|
|
#define __URDE_CLAYOUTDESCRIPTION_HPP__
|
|
|
|
|
|
|
|
#include "optional.hpp"
|
|
|
|
#include "CToken.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CCharLayoutInfo;
|
|
|
|
|
|
|
|
class CLayoutDescription
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
class CScaledLayoutDescription
|
|
|
|
{
|
|
|
|
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
|
|
|
float xc_scale;
|
|
|
|
std::experimental::optional<zeus::CVector3f> x10_scaleVec;
|
|
|
|
public:
|
2017-01-08 03:36:24 +00:00
|
|
|
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const {return x0_layoutToken;}
|
|
|
|
float GlobalScale() const {return xc_scale;}
|
2016-04-13 23:07:18 +00:00
|
|
|
const std::experimental::optional<zeus::CVector3f>& GetScaleVec() const {return x10_scaleVec;}
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
|
|
|
std::experimental::optional<CScaledLayoutDescription> xc_scaled;
|
|
|
|
public:
|
|
|
|
CLayoutDescription(const TLockedToken<CCharLayoutInfo>& token)
|
|
|
|
: x0_layoutToken(token) {}
|
|
|
|
|
|
|
|
const std::experimental::optional<CScaledLayoutDescription>&
|
|
|
|
GetScaledLayoutDescription() const {return xc_scaled;}
|
|
|
|
|
|
|
|
const TLockedToken<CCharLayoutInfo>& GetCharLayoutInfo() const {return x0_layoutToken;}
|
2017-01-08 03:36:24 +00:00
|
|
|
bool UsesScale() const { return bool(xc_scaled); }
|
|
|
|
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const
|
|
|
|
{
|
|
|
|
if (UsesScale())
|
|
|
|
return xc_scaled->ScaledLayout();
|
|
|
|
return x0_layoutToken;
|
|
|
|
}
|
2016-04-13 23:07:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CLAYOUTDESCRIPTION_HPP__
|