Match and link CTransitionManager

This commit is contained in:
Phillip Stephens 2023-01-11 16:34:08 -08:00
parent 2f75767d00
commit dbc36c5b23
5 changed files with 65 additions and 1 deletions

View File

@ -500,7 +500,7 @@ LIBS = [
["Kyoto/Animation/CPrimitive", True],
"Kyoto/Animation/CSequenceHelper",
["Kyoto/Animation/CTransition", True],
"Kyoto/Animation/CTransitionManager",
["Kyoto/Animation/CTransitionManager", True],
"Kyoto/Animation/CTreeUtils",
"Kyoto/Animation/IMetaAnim",
["Kyoto/Audio/CSfxHandle", True],

View File

@ -0,0 +1,24 @@
#ifndef _CANIMSYSCONTEXT
#define _CANIMSYSCONTEXT
#include "Kyoto/TToken.hpp"
#include "rstl/rc_ptr.hpp"
class CTransitionDatabaseGame;
class CRandom16;
class CSimplePool;
class CAnimSysContext {
public:
CAnimSysContext(const TToken< CTransitionDatabaseGame >& transDb,
const rstl::ncrc_ptr< CRandom16 >& random, CSimplePool& store)
: x0_transDb(transDb), x8_random(random), xc_store(store) {}
private:
TToken< CTransitionDatabaseGame > x0_transDb;
rstl::rc_ptr< CRandom16 > x8_random;
CSimplePool& xc_store;
};
#endif // _CANIMSYSCONTEXT

View File

@ -0,0 +1,16 @@
#ifndef _CTRANSITIONMANAGER
#define _CTRANSITIONMANAGER
#include "Kyoto/Animation/CAnimSysContext.hpp"
class CAnimTreeNode;
class CTransitionManager {
public:
rstl::rc_ptr< CAnimTreeNode > GetTransitionTree(const rstl::ncrc_ptr< CAnimTreeNode >& a,
const rstl::ncrc_ptr< CAnimTreeNode >& b) const;
private:
CAnimSysContext x0_context;
};
#endif // _CTRANSITIONMANAGER

View File

@ -0,0 +1,15 @@
#ifndef _CTREEUTILS
#define _CTREEUTILS
#include "rstl/rc_ptr.hpp"
class CAnimTreeNode;
class CAnimSysContext;
class CTreeUtils {
public:
static rstl::rc_ptr< CAnimTreeNode > GetTransitionTree(const rstl::ncrc_ptr< CAnimTreeNode >& a,
const rstl::ncrc_ptr< CAnimTreeNode >& b,
const CAnimSysContext& animCtx);
};
#endif // _CTREEUTILS

View File

@ -0,0 +1,9 @@
#include "Kyoto/Animation/CTransitionManager.hpp"
#include "Kyoto/Animation/CTreeUtils.hpp"
rstl::rc_ptr< CAnimTreeNode >
CTransitionManager::GetTransitionTree(const rstl::ncrc_ptr< CAnimTreeNode >& a,
const rstl::ncrc_ptr< CAnimTreeNode >& b) const {
return CTreeUtils::GetTransitionTree(a, b, x0_context);
}