mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 00:27:42 +00:00
CModelData imps
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/CAABox.hpp"
|
||||
#include "zeus/CColor.hpp"
|
||||
#include "RetroTypes.hpp"
|
||||
#include "CToken.hpp"
|
||||
|
||||
@@ -16,26 +17,47 @@ class CRandom16;
|
||||
class CFrustumPlanes;
|
||||
class CAnimData;
|
||||
class CModel;
|
||||
class CSkinnedModel;
|
||||
struct SAdvancementDeltas;
|
||||
|
||||
struct CStaticRes
|
||||
{
|
||||
ResId x0_cmdlId;
|
||||
zeus::CVector3f x4_particleScale;
|
||||
};
|
||||
|
||||
struct CAnimRes
|
||||
{
|
||||
zeus::CVector3f x8_scale;
|
||||
ResId x0_ancsId;
|
||||
u32 x4_charIdx;
|
||||
zeus::CVector3f x8_particleScale;
|
||||
bool x14_;
|
||||
int x1c_;
|
||||
};
|
||||
|
||||
class CModelData
|
||||
{
|
||||
zeus::CVector3f x0_particleScale;
|
||||
std::unique_ptr<CAnimData> xc_animData;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool x14_24_renderSorted : 1;
|
||||
bool x14_25_sortThermal : 1;
|
||||
};
|
||||
u32 _flags = 0;
|
||||
};
|
||||
zeus::CColor x18_ambientColor;
|
||||
TLockedToken<CModel> x1c_normalModel;
|
||||
TLockedToken<CModel> x2c_xrayModel;
|
||||
TLockedToken<CModel> x3c_infraModel;
|
||||
public:
|
||||
enum class EWhichModel
|
||||
{
|
||||
Normal,
|
||||
XRay,
|
||||
Thermal
|
||||
};
|
||||
|
||||
CModelData();
|
||||
@@ -43,14 +65,14 @@ public:
|
||||
CModelData(const CAnimRes& res);
|
||||
CModelData CModelDataNull() {return CModelData();}
|
||||
|
||||
zeus::CVector3f GetAdvancementDeltas(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
||||
SAdvancementDeltas GetAdvancementDeltas(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
||||
void Render(const CStateManager& stateMgr, const zeus::CTransform& xf,
|
||||
const CActorLights* lights, const CModelFlags& drawFlags) const;
|
||||
void GetRenderingModel(const CStateManager& stateMgr);
|
||||
void PickAnimatedModel(EWhichModel) const;
|
||||
void PickStaticModel(EWhichModel) const;
|
||||
void SetXRayModel(const std::pair<TResId, TResId>& modelSkin);
|
||||
void SetInfraModel(const std::pair<TResId, TResId>& modelSkin);
|
||||
EWhichModel GetRenderingModel(const CStateManager& stateMgr) const;
|
||||
const CSkinnedModel& PickAnimatedModel(EWhichModel which) const;
|
||||
const TLockedToken<CModel>& PickStaticModel(EWhichModel which) const;
|
||||
void SetXRayModel(const std::pair<ResId, ResId>& modelSkin);
|
||||
void SetInfraModel(const std::pair<ResId, ResId>& modelSkin);
|
||||
bool IsDefinitelyOpaque(EWhichModel) const;
|
||||
bool GetIsLoop() const;
|
||||
float GetAnimationDuration(int) const;
|
||||
@@ -62,13 +84,13 @@ public:
|
||||
zeus::CTransform GetScaledLocatorTransform(const std::string& name) const;
|
||||
zeus::CTransform GetLocatorTransformDynamic(const std::string& name, const CCharAnimTime* time) const;
|
||||
zeus::CTransform GetLocatorTransform(const std::string& name) const;
|
||||
void AdvanceAnimationIgnoreParticles(float dt, CRandom16&, bool);
|
||||
void AdvanceAnimation(float dt, CStateManager& stateMgr, bool);
|
||||
SAdvancementDeltas AdvanceAnimationIgnoreParticles(float dt, CRandom16&, bool);
|
||||
SAdvancementDeltas AdvanceAnimation(float dt, CStateManager& stateMgr, bool);
|
||||
bool IsAnimating() const;
|
||||
bool IsInFrustum(const zeus::CTransform& xf, const CFrustumPlanes& frustum) const;
|
||||
void RenderParticles(const CFrustumPlanes& frustum) const;
|
||||
void Touch(EWhichModel, int) const;
|
||||
void Touch(const CStateManager& stateMgr, int) const;
|
||||
void Touch(EWhichModel, int shaderIdx) const;
|
||||
void Touch(const CStateManager& stateMgr, int shaderIdx) const;
|
||||
void RenderThermal(const zeus::CTransform& xf, const zeus::CColor& a, const zeus::CColor& b) const;
|
||||
void RenderUnsortedParts(EWhichModel, const zeus::CTransform& xf,
|
||||
const CActorLights* lights, const CModelFlags& drawFlags) const;
|
||||
|
||||
Reference in New Issue
Block a user