mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Moved animation-related classes to their own subfolder
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef CANIMEVENTDATA
|
||||
#define CANIMEVENTDATA
|
||||
|
||||
#include "CResource.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
|
||||
class CAnimEventData : public CResource
|
||||
{
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef CANIMSET_H
|
||||
#define CANIMSET_H
|
||||
|
||||
#include "TResPtr.h"
|
||||
#include "CAnimation.h"
|
||||
#include "CAnimEventData.h"
|
||||
#include "CDependencyGroup.h"
|
||||
#include "CResource.h"
|
||||
#include "CSkeleton.h"
|
||||
#include "CSkin.h"
|
||||
#include "Core/Resource/CDependencyGroup.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
#include "Core/Resource/Model/CModel.h"
|
||||
#include <Common/types.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CANIMATION_H
|
||||
#define CANIMATION_H
|
||||
|
||||
#include "CResource.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include <Math/CQuaternion.h>
|
||||
#include <Math/CVector3f.h>
|
||||
#include <vector>
|
||||
@@ -2,7 +2,7 @@
|
||||
#define CANIMATIONPARAMETERS_H
|
||||
|
||||
#include "CAnimSet.h"
|
||||
#include "TResPtr.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
#include "Core/Resource/Model/CModel.h"
|
||||
#include <Common/EGame.h>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define CSKELETON_H
|
||||
|
||||
#include "CAnimation.h"
|
||||
#include "CResource.h"
|
||||
#include "Core/Render/FRenderOptions.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include <Common/TString.h>
|
||||
#include <Common/types.h>
|
||||
#include <Math/CRay.h>
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CSKIN_H
|
||||
#define CSKIN_H
|
||||
|
||||
#include "CResource.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include "Core/Resource/Model/CVertex.h"
|
||||
|
||||
struct SVertexWeights
|
||||
88
src/Core/Resource/Animation/IMetaAnimation.h
Normal file
88
src/Core/Resource/Animation/IMetaAnimation.h
Normal file
@@ -0,0 +1,88 @@
|
||||
#ifndef IMETAANIMATION
|
||||
#define IMETAANIMATION
|
||||
|
||||
#include "CAnimation.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
#include <Common/TString.h>
|
||||
|
||||
enum EMetaAnimationType
|
||||
{
|
||||
eMAT_Play = 0,
|
||||
eMAT_Blend = 1,
|
||||
eMAT_PhaseBlend = 2, // note: structure shared with eMAT_Blend, differences are currently unknown
|
||||
eMAT_Random = 3,
|
||||
eMAT_Sequence = 4
|
||||
};
|
||||
|
||||
// Base MetaAnimation interface
|
||||
class IMetaAnimation
|
||||
{
|
||||
protected:
|
||||
TString mName;
|
||||
EMetaAnimationType mType;
|
||||
|
||||
public:
|
||||
IMetaAnimation(EMetaAnimationType Type)
|
||||
: mType(Type) {}
|
||||
|
||||
virtual ~IMetaAnimation() {}
|
||||
|
||||
// Accessors
|
||||
inline void SetName(const TString& rkName) { mName = rkName; }
|
||||
inline TString Name() const { return mName; }
|
||||
inline EMetaAnimationType Type() const { return mType; }
|
||||
};
|
||||
|
||||
// CMetaAnimationPlay - plays an animation
|
||||
class CMetaAnimationPlay : public IMetaAnimation
|
||||
{
|
||||
protected:
|
||||
TResPtr<CAnimation> mpAnim;
|
||||
|
||||
public:
|
||||
CMetaAnimationPlay(CAnimation *pAnim)
|
||||
: IMetaAnimation(eMAT_Play), mpAnim(pAnim) {}
|
||||
|
||||
inline CAnimation* GetPlayAnimation() const { return mpAnim; }
|
||||
};
|
||||
|
||||
// CMetaAnimationBlend - blend between two animations
|
||||
class CMetaAnimationBlend : public IMetaAnimation
|
||||
{
|
||||
protected:
|
||||
IMetaAnimation *mpAnimA;
|
||||
IMetaAnimation *mpAnimB;
|
||||
|
||||
public:
|
||||
CMetaAnimationBlend(IMetaAnimation *pAnimA, IMetaAnimation *pAnimB)
|
||||
: IMetaAnimation(eMAT_Blend), mpAnimA(pAnimA), mpAnimB(pAnimB) {}
|
||||
|
||||
~CMetaAnimationBlend()
|
||||
{
|
||||
delete mpAnimA;
|
||||
delete mpAnimB;
|
||||
}
|
||||
|
||||
inline IMetaAnimation* BlendAnimationA() const { return mpAnimA; }
|
||||
inline IMetaAnimation* BlendAnimationB() const { return mpAnimB; }
|
||||
};
|
||||
|
||||
// SAnimProbabilityPair - structure used by CMetaAnimationRandom to associate an animation with a probability value
|
||||
struct SAnimProbabilityPair
|
||||
{
|
||||
IMetaAnimation *pAnim;
|
||||
u32 Probability;
|
||||
};
|
||||
|
||||
// CMetaAnimationRandom - play random animation
|
||||
class CMetaAnimationRandom : public IMetaAnimation
|
||||
{
|
||||
protected:
|
||||
std::vector<SAnimProbabilityPair> mProbabilityPairs;
|
||||
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
#endif // IMETAANIMATION
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CANIMEVENTLOADER_H
|
||||
#define CANIMEVENTLOADER_H
|
||||
|
||||
#include "Core/Resource/CAnimEventData.h"
|
||||
#include "Core/Resource/Animation/CAnimEventData.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
|
||||
class CAnimEventLoader
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CCHARACTERLOADER_H
|
||||
#define CCHARACTERLOADER_H
|
||||
|
||||
#include "Core/Resource/CAnimSet.h"
|
||||
#include "Core/Resource/Animation/CAnimSet.h"
|
||||
#include <Common/EGame.h>
|
||||
|
||||
class CAnimSetLoader
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define CANIMATIONLOADER_H
|
||||
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
#include "Core/Resource/CAnimation.h"
|
||||
#include "Core/Resource/Animation/CAnimation.h"
|
||||
#include <Common/EGame.h>
|
||||
|
||||
class CAnimationLoader
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CSKELETONLOADER_H
|
||||
#define CSKELETONLOADER_H
|
||||
|
||||
#include "Core/Resource/CSkeleton.h"
|
||||
#include "Core/Resource/Animation/CSkeleton.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
#include <Common/EGame.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CSKINLOADER_H
|
||||
#define CSKINLOADER_H
|
||||
|
||||
#include "Core/Resource/CSkin.h"
|
||||
#include "Core/Resource/Animation/CSkin.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
|
||||
class CSkinLoader
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "CBasicModel.h"
|
||||
#include "SSurface.h"
|
||||
#include "Core/Resource/CMaterialSet.h"
|
||||
#include "Core/Resource/CSkeleton.h"
|
||||
#include "Core/Resource/CSkin.h"
|
||||
#include "Core/Resource/Animation/CSkeleton.h"
|
||||
#include "Core/Resource/Animation/CSkin.h"
|
||||
#include "Core/OpenGL/CIndexBuffer.h"
|
||||
#include "Core/OpenGL/GLCommon.h"
|
||||
#include "Core/Render/FRenderOptions.h"
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#ifndef RESOURCES_H
|
||||
#define RESOURCES_H
|
||||
|
||||
#include "CAnimation.h"
|
||||
#include "CAnimSet.h"
|
||||
#include "CCollisionMeshGroup.h"
|
||||
#include "CDependencyGroup.h"
|
||||
#include "CFont.h"
|
||||
#include "CPoiToWorld.h"
|
||||
#include "CResource.h"
|
||||
#include "CScan.h"
|
||||
#include "CSkeleton.h"
|
||||
#include "CSkin.h"
|
||||
#include "CStringTable.h"
|
||||
#include "CTexture.h"
|
||||
#include "CWorld.h"
|
||||
#include "Core/Resource/Animation/CAnimation.h"
|
||||
#include "Core/Resource/Animation/CAnimSet.h"
|
||||
#include "Core/Resource/Animation/CSkeleton.h"
|
||||
#include "Core/Resource/Animation/CSkin.h"
|
||||
#include "Core/Resource/Area/CGameArea.h"
|
||||
#include "Core/Resource/Model/CModel.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "CScriptObject.h"
|
||||
#include "CScriptLayer.h"
|
||||
#include "CMasterTemplate.h"
|
||||
#include "Core/Resource/CAnimSet.h"
|
||||
#include "Core/Resource/Animation/CAnimSet.h"
|
||||
|
||||
CScriptObject::CScriptObject(u32 InstanceID, CGameArea *pArea, CScriptLayer *pLayer, CScriptTemplate *pTemplate)
|
||||
: mpTemplate(pTemplate)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "CScriptObject.h"
|
||||
#include "CMasterTemplate.h"
|
||||
#include "Core/GameProject/CResourceStore.h"
|
||||
#include "Core/Resource/CAnimSet.h"
|
||||
#include "Core/Resource/Animation/CAnimSet.h"
|
||||
#include <Common/Log.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "IPropertyValue.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
#include "Core/Resource/CAnimationParameters.h"
|
||||
#include "Core/Resource/Animation/CAnimationParameters.h"
|
||||
#include <Common/CColor.h>
|
||||
#include <Common/TString.h>
|
||||
#include <Math/CVector3f.h>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "EPropertyType.h"
|
||||
#include "IProperty.h"
|
||||
#include "IPropertyValue.h"
|
||||
#include "Core/Resource/CAnimationParameters.h"
|
||||
#include "Core/Resource/Animation/CAnimationParameters.h"
|
||||
#include <Common/CColor.h>
|
||||
#include <Common/TString.h>
|
||||
#include <Common/types.h>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "EPropertyType.h"
|
||||
#include <Common/CAssetID.h>
|
||||
#include <Common/Log.h>
|
||||
#include "Core/Resource/CAnimationParameters.h"
|
||||
#include "Core/Resource/Animation/CAnimationParameters.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user