Add Legacy CStateMachine

This commit is contained in:
Phillip Stephens
2023-02-16 11:17:47 -08:00
parent e63efff3dd
commit 309ef4bda9
2 changed files with 49 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#ifndef _CLEGACYSTATEMACHINE
#define _CLEGACYSTATEMACHINE
struct NameEntry {
string name;
};
struct State
{
local byte firstIndex = true;
int triggerCount;
if (triggerCount > 0)
{
struct
{
uint triggerCount;
struct
{
string actionName;
float actionTime;
if (firstIndex)
{
int stateIndex;
firstIndex = false;
}
} triggers[triggerCount] <optimize = false>;
firstIndex = true;
} subTrigger[triggerCount] <optimize = false>;
}
};
struct CLegacyStateMachine
{
uint stateCount;
NameEntry states[stateCount] <optimize = false>;
uint triggerCount;
State triggers[stateCount] <optimize = false>;
};
#endif// _CLEGACYSTATEMACHINE
+8
View File
@@ -22,6 +22,7 @@ if (!exists(isDKCTF)) {
#include "CVectorField.bt"
#include "CAABoxCollisionTree.bt"
#include "CReflectionProbeData.bt"
#include "CLegacyStateMachine.bt"
//#include "CRuleSet.bt"
#include "CScaleformFlashLibrary.bt"
@@ -46,6 +47,13 @@ typedef struct
case "LTPB":
CLightProbeData lightProbe(form.size);
break;
case "LFSM":
if (!isDKCTF)
BigEndian();
CLegacyStateMachine legacyStateMachine;
if (!isDKCTF)
LittleEndian();
break;
case "CLSN":
CAABoxCollisionTree aaboxCollisionTree(form.size);
break;