#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] ; firstIndex = true; } subTrigger[triggerCount] ; } }; struct CLegacyStateMachine { uint stateCount; NameEntry states[stateCount] ; uint triggerCount; State triggers[stateCount] ; }; #endif// _CLEGACYSTATEMACHINE