Moved animation-related classes to their own subfolder

This commit is contained in:
parax0 2016-10-26 18:12:08 -06:00
parent 3942c09e89
commit 595e4b931e
28 changed files with 129 additions and 40 deletions

View File

@ -113,8 +113,6 @@ HEADERS += \
Resource/Script/CScriptTemplate.h \
Resource/Script/EPropertyType.h \
Resource/Script/EVolumeShape.h \
Resource/CAnimationParameters.h \
Resource/CAnimSet.h \
Resource/CCollisionMesh.h \
Resource/CCollisionMeshGroup.h \
Resource/CFont.h \
@ -177,13 +175,10 @@ HEADERS += \
Resource/Cooker/CScriptCooker.h \
ScriptExtra/CSplinePathExtra.h \
Resource/Script/CLink.h \
Resource/CSkeleton.h \
Resource/Factory/CSkeletonLoader.h \
Scene/CCharacterNode.h \
Resource/CAnimation.h \
Resource/Factory/CAnimationLoader.h \
Render/CBoneTransformData.h \
Resource/CSkin.h \
Resource/Factory/CSkinLoader.h \
Render/EDepthGroup.h \
Scene/CScriptAttachNode.h \
@ -209,8 +204,14 @@ HEADERS += \
Resource/CAudioLookupTable.h \
Resource/CStringList.h \
CAudioManager.h \
Resource/CAnimEventData.h \
Resource/Factory/CAnimEventLoader.h
Resource/Factory/CAnimEventLoader.h \
Resource/AnimationClasses.h \
Resource/Animation/CAnimation.h \
Resource/Animation/CAnimationParameters.h \
Resource/Animation/CAnimEventData.h \
Resource/Animation/CAnimSet.h \
Resource/Animation/CSkeleton.h \
Resource/Animation/CSkin.h
# Source Files
SOURCES += \
@ -244,7 +245,6 @@ SOURCES += \
Resource/Script/CMasterTemplate.cpp \
Resource/Script/CScriptObject.cpp \
Resource/Script/CScriptTemplate.cpp \
Resource/CAnimationParameters.cpp \
Resource/CCollisionMesh.cpp \
Resource/CFont.cpp \
Resource/CLight.cpp \
@ -287,10 +287,8 @@ SOURCES += \
Resource/Cooker/CPoiToWorldCooker.cpp \
Resource/Cooker/CScriptCooker.cpp \
ScriptExtra/CSplinePathExtra.cpp \
Resource/CSkeleton.cpp \
Resource/Factory/CSkeletonLoader.cpp \
Scene/CCharacterNode.cpp \
Resource/CAnimation.cpp \
Resource/Factory/CAnimationLoader.cpp \
Resource/Factory/CSkinLoader.cpp \
Resource/Model/EVertexAttribute.cpp \
@ -309,4 +307,7 @@ SOURCES += \
GameProject/DependencyListBuilders.cpp \
Resource/Factory/CAudioGroupLoader.cpp \
CAudioManager.cpp \
Resource/Factory/CAnimEventLoader.cpp
Resource/Factory/CAnimEventLoader.cpp \
Resource/Animation/CAnimation.cpp \
Resource/Animation/CAnimationParameters.cpp \
Resource/Animation/CSkeleton.cpp

View File

@ -81,7 +81,7 @@ void CCharacterUsageMap::FindUsagesForLayer(CResourceEntry *pAreaEntry, u32 Laye
ParseDependencyNode(pTree->ChildByIndex(iInst));
}
#include "Core/Resource/CAnimSet.h"
#include "Core/Resource/Animation/CAnimSet.h"
void CCharacterUsageMap::DebugPrintContents()
{

View File

@ -1,8 +1,8 @@
#ifndef CVERTEXBUFFER_H
#define CVERTEXBUFFER_H
#include "Core/Resource/CSkin.h"
#include "Core/Resource/TResPtr.h"
#include "Core/Resource/Animation/CSkin.h"
#include "Core/Resource/Model/CVertex.h"
#include "Core/Resource/Model/EVertexAttribute.h"
#include <vector>

View File

@ -1,7 +1,7 @@
#ifndef CBONETRANSFORMDATA
#define CBONETRANSFORMDATA
#include "Core/Resource/CSkeleton.h"
#include "Core/Resource/Animation/CSkeleton.h"
#include <Common/types.h>
#include <Math/CTransform4f.h>
#include <vector>

View File

@ -1,7 +1,7 @@
#ifndef CANIMEVENTDATA
#define CANIMEVENTDATA
#include "CResource.h"
#include "Core/Resource/CResource.h"
class CAnimEventData : public CResource
{

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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)

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -3,7 +3,7 @@
#include "CSceneNode.h"
#include "Core/Render/CBoneTransformData.h"
#include "Core/Resource/CAnimSet.h"
#include "Core/Resource/Animation/CAnimSet.h"
class CCharacterNode : public CSceneNode
{

View File

@ -2,7 +2,7 @@
#define CSKELETONHIERARCHYMODEL
#include <QAbstractItemModel>
#include <Core/Resource/CSkeleton.h>
#include <Core/Resource/Animation/CSkeleton.h>
class CSkeletonHierarchyModel : public QAbstractItemModel
{