CommonLibSSE NG
hkbStateMachine.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/H/hkArray.h"
4 #include "RE/H/hkRefPtr.h"
6 #include "RE/H/hkbBindable.h"
7 #include "RE/H/hkbEvent.h"
8 #include "RE/H/hkbGenerator.h"
9 
10 namespace RE
11 {
12  class hkbStateChooser;
13 
15  {
16  public:
17  inline static constexpr auto RTTI = RTTI_hkbStateMachine;
18  inline static constexpr auto VTABLE = VTABLE_hkbStateMachine;
19 
20  enum class StartStateMode
21  {
22  kDefault = 0,
23  kSync = 1,
24  kRandom = 2,
25  kChooser = 3
26  };
27 
29  {
30  kNoTransition = 0,
33  };
34 
35  class StateInfo : public hkbBindable
36  {
37  public:
38  inline static constexpr auto RTTI = RTTI_hkbStateMachine__StateInfo;
39 
40  ~StateInfo() override; // 00
41 
42  // members
43  std::uint64_t unk30; // 30
44  std::uint64_t unk38; // 38
45  std::uint64_t unk40; // 40
46  std::uint64_t unk48; // 48
47  std::uint64_t unk50; // 50
48  std::uint64_t unk58; // 58
49  std::uint64_t unk60; // 60
50  std::uint64_t unk68; // 68
51  std::uint64_t unk70; // 70
52  };
53  static_assert(sizeof(StateInfo) == 0x78);
54 
56  {
57  public:
58  inline static constexpr auto RTTI = RTTI_hkbStateMachine__TransitionInfoArray;
59 
60  ~TransitionInfoArray() override; // 00
61 
62  // members
63  std::uint64_t unk10; // 10
64  std::uint64_t unk18; // 18
65  };
66  static_assert(sizeof(TransitionInfoArray) == 0x20);
67 
68  ~hkbStateMachine() override; // 00
69 
70  // override (hkbGenerator)
71  hkClass* GetClassType() const override; // 01
72  void CalcContentStatistics(hkStatisticsCollector* a_collector, const hkClass* a_class) const override; // 02
73  void Unk_03(void) override; // 03
74  void Activate(const hkbContext& a_context) override; // 04
75  void Update(const hkbContext& a_context, float a_timestep) override; // 05
76  void Unk_06(void) override; // 06
77  void Deactivate(const hkbContext& a_context) override; // 07
78  void Unk_08(void) override; // 08
79  void Unk_09(void) override; // 09
80  void Unk_0A(void) override; // 0A
81  void Unk_0C(void) override; // 0C
82  void Unk_0D(void) override; // 0D
83  void Unk_0E(void) override; // 0E
84  void Unk_0F(void) override; // 0F
85  void Unk_10(void) override; // 10
86  void Unk_11(void) override; // 11
87  void Unk_12(void) override; // 12
88  void Unk_14(void) override; // 14
89  void Generate(const hkbContext& a_context) override; // 17
90  void Unk_18(void) override; // 18 - { return 1; }
91  void UpdateSync(const hkbContext& a_context) override; // 19
92  void Unk_1B(void) override; // 1B - { echoNextUpdate = true; }
93 
94  // members
97  std::int32_t startStateID; // 068
98  std::int32_t returnToPreviousStateEventID; // 06C
99  std::int32_t randomTransitionEventID; // 070
102  std::int32_t syncVariableIndex; // 07C
103  std::int32_t currentStateID; // 080
104  bool wrapAroundStateID; // 084
105  std::int8_t maxSimultaneousTransitions; // 085
108  bool isActive; // 088
109  std::uint8_t pad41; // 089
110  std::uint16_t pad42; // 08A
111  std::uint32_t pad44; // 08C
119  float timeInState; // 0F0
120  float lastLocalTime; // 0F4
121  std::int32_t previousStateID; // 0F8
122  std::int32_t nextStartStateIndexOverride; // 0FC
124  bool echoNextUpdate; // 101
125  std::uint16_t currentStateIndexAndEntered; // 102
126  std::uint32_t pad0BC; // 104
127  };
128  static_assert(sizeof(hkbStateMachine) == 0x108);
129 }
Definition: hkArray.h:190
Definition: hkRefVariant.h:9
Definition: hkReferencedObject.h:11
Definition: hkbBindable.h:13
Definition: hkbContext.h:13
Definition: hkbEvent.h:9
Definition: hkbGenerator.h:8
Definition: hkbStateMachine.h:36
std::uint64_t unk40
Definition: hkbStateMachine.h:45
std::uint64_t unk30
Definition: hkbStateMachine.h:43
std::uint64_t unk48
Definition: hkbStateMachine.h:46
std::uint64_t unk58
Definition: hkbStateMachine.h:48
std::uint64_t unk38
Definition: hkbStateMachine.h:44
static constexpr auto RTTI
Definition: hkbStateMachine.h:38
std::uint64_t unk60
Definition: hkbStateMachine.h:49
std::uint64_t unk50
Definition: hkbStateMachine.h:47
std::uint64_t unk68
Definition: hkbStateMachine.h:50
std::uint64_t unk70
Definition: hkbStateMachine.h:51
Definition: hkbStateMachine.h:56
std::uint64_t unk18
Definition: hkbStateMachine.h:64
std::uint64_t unk10
Definition: hkbStateMachine.h:63
static constexpr auto RTTI
Definition: hkbStateMachine.h:58
Definition: hkbStateMachine.h:15
stl::enumeration< StateMachineSelfTransitionMode, std::uint8_t > selfTransitionMode
Definition: hkbStateMachine.h:107
bool stateOrTransitionChanged
Definition: hkbStateMachine.h:123
void Unk_0E(void) override
~hkbStateMachine() override
hkbEvent eventToSendWhenStateOrTransitionChanges
Definition: hkbStateMachine.h:95
std::int32_t transitionToNextLowerStateEventID
Definition: hkbStateMachine.h:101
hkRefPtr< hkbStateChooser > startStateChooser
Definition: hkbStateMachine.h:96
void Unk_1B(void) override
void UpdateSync(const hkbContext &a_context) override
hkClass * GetClassType() const override
std::uint16_t pad42
Definition: hkbStateMachine.h:110
std::int8_t maxSimultaneousTransitions
Definition: hkbStateMachine.h:105
void Unk_06(void) override
void CalcContentStatistics(hkStatisticsCollector *a_collector, const hkClass *a_class) const override
void Generate(const hkbContext &a_context) override
std::int32_t syncVariableIndex
Definition: hkbStateMachine.h:102
static constexpr auto VTABLE
Definition: hkbStateMachine.h:18
hkRefVariant stateIDToIndexMap
Definition: hkbStateMachine.h:114
hkArray< hkRefVariant > wildcardTransitionFlags
Definition: hkbStateMachine.h:117
hkRefPtr< TransitionInfoArray > wildcardTransitions
Definition: hkbStateMachine.h:113
std::int32_t startStateID
Definition: hkbStateMachine.h:97
std::uint8_t pad41
Definition: hkbStateMachine.h:109
std::uint32_t pad0BC
Definition: hkbStateMachine.h:126
stl::enumeration< StartStateMode, std::uint8_t > startStateMode
Definition: hkbStateMachine.h:106
bool echoNextUpdate
Definition: hkbStateMachine.h:124
float timeInState
Definition: hkbStateMachine.h:119
bool isActive
Definition: hkbStateMachine.h:108
void Unk_08(void) override
void Unk_09(void) override
hkArray< hkRefVariant > activeTransitions
Definition: hkbStateMachine.h:115
StateMachineSelfTransitionMode
Definition: hkbStateMachine.h:29
void Unk_10(void) override
std::int32_t randomTransitionEventID
Definition: hkbStateMachine.h:99
void Unk_11(void) override
void Unk_03(void) override
float lastLocalTime
Definition: hkbStateMachine.h:120
hkArray< StateInfo * > states
Definition: hkbStateMachine.h:112
std::uint32_t pad44
Definition: hkbStateMachine.h:111
std::uint16_t currentStateIndexAndEntered
Definition: hkbStateMachine.h:125
void Unk_0C(void) override
hkArray< hkRefVariant > transitionFlags
Definition: hkbStateMachine.h:116
void Activate(const hkbContext &a_context) override
bool wrapAroundStateID
Definition: hkbStateMachine.h:104
std::int32_t transitionToNextHigherStateEventID
Definition: hkbStateMachine.h:100
void Unk_12(void) override
StartStateMode
Definition: hkbStateMachine.h:21
void Unk_14(void) override
void Unk_0D(void) override
void Unk_0A(void) override
hkArray< hkRefVariant > delayedTransitions
Definition: hkbStateMachine.h:118
std::int32_t nextStartStateIndexOverride
Definition: hkbStateMachine.h:122
void Deactivate(const hkbContext &a_context) override
std::int32_t currentStateID
Definition: hkbStateMachine.h:103
void Unk_18(void) override
void Update(const hkbContext &a_context, float a_timestep) override
std::int32_t returnToPreviousStateEventID
Definition: hkbStateMachine.h:98
static constexpr auto RTTI
Definition: hkbStateMachine.h:17
std::int32_t previousStateID
Definition: hkbStateMachine.h:121
void Unk_0F(void) override
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 1 > VTABLE_hkbStateMachine
Definition: Offsets_VTABLE.h:4918
constexpr REL::VariantID RTTI_hkbStateMachine(689766, 397621, 0x1f583d8)
constexpr REL::VariantID RTTI_hkbStateMachine__StateInfo(689759, 397614, 0x1f58250)
constexpr REL::VariantID RTTI_hkbStateMachine__TransitionInfoArray(689757, 397612, 0x1f581d0)