mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 02:27:43 +00:00
New code style refactor
This commit is contained in:
@@ -4,42 +4,38 @@
|
||||
#include "CToken.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
namespace urde {
|
||||
class CCharLayoutInfo;
|
||||
|
||||
class CLayoutDescription
|
||||
{
|
||||
class CLayoutDescription {
|
||||
public:
|
||||
class CScaledLayoutDescription
|
||||
{
|
||||
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
||||
float xc_scale;
|
||||
std::experimental::optional<zeus::CVector3f> x10_scaleVec;
|
||||
public:
|
||||
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const {return x0_layoutToken;}
|
||||
float GlobalScale() const {return xc_scale;}
|
||||
const std::experimental::optional<zeus::CVector3f>& GetScaleVec() const {return x10_scaleVec;}
|
||||
};
|
||||
private:
|
||||
class CScaledLayoutDescription {
|
||||
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
||||
std::experimental::optional<CScaledLayoutDescription> xc_scaled;
|
||||
float xc_scale;
|
||||
std::experimental::optional<zeus::CVector3f> x10_scaleVec;
|
||||
|
||||
public:
|
||||
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const { return x0_layoutToken; }
|
||||
float GlobalScale() const { return xc_scale; }
|
||||
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) {}
|
||||
CLayoutDescription(const TLockedToken<CCharLayoutInfo>& token) : x0_layoutToken(token) {}
|
||||
|
||||
const std::experimental::optional<CScaledLayoutDescription>&
|
||||
GetScaledLayoutDescription() const {return xc_scaled;}
|
||||
const std::experimental::optional<CScaledLayoutDescription>& GetScaledLayoutDescription() const { return xc_scaled; }
|
||||
|
||||
const TLockedToken<CCharLayoutInfo>& GetCharLayoutInfo() const {return x0_layoutToken;}
|
||||
bool UsesScale() const { return bool(xc_scaled); }
|
||||
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const
|
||||
{
|
||||
if (UsesScale())
|
||||
return xc_scaled->ScaledLayout();
|
||||
return x0_layoutToken;
|
||||
}
|
||||
const TLockedToken<CCharLayoutInfo>& GetCharLayoutInfo() const { return x0_layoutToken; }
|
||||
bool UsesScale() const { return bool(xc_scaled); }
|
||||
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const {
|
||||
if (UsesScale())
|
||||
return xc_scaled->ScaledLayout();
|
||||
return x0_layoutToken;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user