CommonLibSSE (powerof3)
NiControllerSequence.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/M/MemoryManager.h"
5 #include "RE/N/NiObject.h"
6 #include "RE/N/NiSmartPointer.h"
8 
9 namespace RE
10 {
11  class BSAnimNote;
12  class NiAVObject;
13  class NiBlendInterpolator;
14  class NiControllerManager;
15  class NiInterpController;
16  class NiInterpolator;
17  class NiStringPalette;
18  class NiTextKeyExtraData;
19 
21 
23  {
24  public:
25  inline static constexpr auto RTTI = RTTI_NiControllerSequence;
26  inline static constexpr auto Ni_RTTI = NiRTTI_NiControllerSequence;
27  inline static constexpr auto VTABLE = VTABLE_NiControllerSequence;
28 
29  enum class AnimState
30  {
31  kInactive,
32  kAnimating,
33  kEaseIn,
34  kEaseOut,
36  kTransDest,
38  };
39 
41  {
42  public:
43  // members
46  NiBlendInterpolator* blendInterp; // 10
47  std::uint8_t blendIdx; // 18
48  std::uint8_t pad19; // 19
49  std::uint16_t pad1A; // 1A
50  std::uint32_t pad1C; // 1C
51  };
52  static_assert(sizeof(InterpArrayItem) == 0x20);
53 
54  struct IDTag
55  {
56  public:
57  // members
63  };
64  static_assert(sizeof(IDTag) == 0x28);
65 
66  ~NiControllerSequence() override; // 00
67 
68  // override (NiObject)
69  const NiRTTI* GetRTTI() const override; // 02
70  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
71  void LoadBinary(NiStream& a_stream) override; // 18
72  void LinkObject(NiStream& a_stream) override; // 19
73  bool RegisterStreamables(NiStream& a_stream) override; // 1A
74  void SaveBinary(NiStream& a_stream) override; // 1B
75  bool IsEqual(NiObject* a_object) override; // 1C
76  void ProcessClone(NiCloningProcess& a_cloning) override; // 1D
77  void PostLinkObject(NiStream& a_stream) override; // 1E
78 
79  // add
80  virtual bool Deactivate(float a_easeOutTime, bool a_transition); // 25
81 
82  bool Activate(std::uint8_t a_interpIndex, bool a_maxOffset, float a_seqWeight, float a_easeInTime, NiControllerSequence* a_partnerSequence, bool a_transition);
83  [[nodiscard]] constexpr bool Animating() const noexcept { return state == AnimState::kAnimating; }
84  [[nodiscard]] constexpr bool Inactive() const noexcept { return state == AnimState::kInactive; }
85  void SetPhase(float a_phase, bool a_arg2);
86 
87  // members
89  std::uint32_t arraySize; // 18
90  std::uint32_t arrayGrowBy; // 1C
93  float seqWeight; // 30
94  std::uint32_t pad34; // 30
97  float frequency; // 44
98  float beginKeyTime; // 48
99  float endKeyTime; // 4C
100  float lastTime; // 50
101  float weightedLastTime; // 54
102  float lastScaledTime; // 58
103  std::uint32_t pad5C; // 5C
106  float offset; // 6C
107  float startTime; // 70
108  float endTime; // 74
109  float destFrame; // 78
110  std::uint32_t pad7C; // 7C
115  std::int16_t curAnimNIdx; // A0
116  std::uint16_t unkA2; // A2
117  std::uint32_t unkA4; // A4
119  std::uint16_t numNotes; // B0
120  bool removableObjects; // B2
121  std::uint8_t unkB3; // B3
122  std::uint32_t unkB4; // B4
123  };
124  static_assert(sizeof(NiControllerSequence) == 0xB8);
125 }
Definition: NiAVObject.h:51
Definition: NiCloningProcess.h:10
Definition: NiControllerManager.h:17
Definition: NiControllerSequence.h:23
NiObject * CreateClone(NiCloningProcess &a_cloning) override
BSFixedString name
Definition: NiControllerSequence.h:88
bool RegisterStreamables(NiStream &a_stream) override
float startTime
Definition: NiControllerSequence.h:107
void ProcessClone(NiCloningProcess &a_cloning) override
static constexpr auto VTABLE
Definition: NiControllerSequence.h:27
std::uint32_t unkB4
Definition: NiControllerSequence.h:122
void LinkObject(NiStream &a_stream) override
void SaveBinary(NiStream &a_stream) override
constexpr bool Inactive() const noexcept
Definition: NiControllerSequence.h:84
std::uint32_t pad34
Definition: NiControllerSequence.h:94
std::uint32_t pad7C
Definition: NiControllerSequence.h:110
float endTime
Definition: NiControllerSequence.h:108
REX::EnumSet< NiTimeController::CycleType, std::uint32_t > cycleType
Definition: NiControllerSequence.h:96
SimpleArray< IDTag > idTagArray
Definition: NiControllerSequence.h:92
float beginKeyTime
Definition: NiControllerSequence.h:98
std::uint16_t numNotes
Definition: NiControllerSequence.h:119
bool removableObjects
Definition: NiControllerSequence.h:120
NiPointer< NiTextKeyExtraData > textKeys
Definition: NiControllerSequence.h:95
void PostLinkObject(NiStream &a_stream) override
std::uint32_t arraySize
Definition: NiControllerSequence.h:89
AnimState
Definition: NiControllerSequence.h:30
float endKeyTime
Definition: NiControllerSequence.h:99
BSFixedString accumRootName
Definition: NiControllerSequence.h:112
REX::EnumSet< AnimState, std::uint32_t > state
Definition: NiControllerSequence.h:105
std::uint32_t arrayGrowBy
Definition: NiControllerSequence.h:90
virtual bool Deactivate(float a_easeOutTime, bool a_transition)
float seqWeight
Definition: NiControllerSequence.h:93
NiPointer< NiStringPalette > deprecatedStringPalette
Definition: NiControllerSequence.h:114
float offset
Definition: NiControllerSequence.h:106
float weightedLastTime
Definition: NiControllerSequence.h:101
float lastTime
Definition: NiControllerSequence.h:100
std::uint16_t unkA2
Definition: NiControllerSequence.h:116
bool IsEqual(NiObject *a_object) override
void LoadBinary(NiStream &a_stream) override
const NiRTTI * GetRTTI() const override
NiControllerSequence * partnerSequence
Definition: NiControllerSequence.h:111
float destFrame
Definition: NiControllerSequence.h:109
NiControllerManager * owner
Definition: NiControllerSequence.h:104
float lastScaledTime
Definition: NiControllerSequence.h:102
bool Activate(std::uint8_t a_interpIndex, bool a_maxOffset, float a_seqWeight, float a_easeInTime, NiControllerSequence *a_partnerSequence, bool a_transition)
SimpleArray< InterpArrayItem > interpArray
Definition: NiControllerSequence.h:91
std::int16_t curAnimNIdx
Definition: NiControllerSequence.h:115
~NiControllerSequence() override
std::uint8_t unkB3
Definition: NiControllerSequence.h:121
std::uint32_t unkA4
Definition: NiControllerSequence.h:117
static constexpr auto Ni_RTTI
Definition: NiControllerSequence.h:26
void SetPhase(float a_phase, bool a_arg2)
SimpleArray< NiPointer< BSAnimNote > > animNotes
Definition: NiControllerSequence.h:118
float frequency
Definition: NiControllerSequence.h:97
NiAVObject * accumRoot
Definition: NiControllerSequence.h:113
constexpr bool Animating() const noexcept
Definition: NiControllerSequence.h:83
std::uint32_t pad5C
Definition: NiControllerSequence.h:103
static constexpr auto RTTI
Definition: NiControllerSequence.h:25
Definition: NiObject.h:37
Definition: NiSmartPointer.h:9
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: MemoryManager.h:244
Definition: AbsorbEffect.h:6
NiSmartPointer(Actor)
constexpr REL::ID NiRTTI_NiControllerSequence(static_cast< std::uint64_t >(524057))
constexpr REL::ID RTTI_NiControllerSequence(static_cast< std::uint64_t >(684939))
constexpr std::array< REL::ID, 1 > VTABLE_NiControllerSequence
Definition: Offsets_VTABLE.h:12197
Definition: NiControllerSequence.h:55
BSFixedString avObjectName
Definition: NiControllerSequence.h:58
BSFixedString ctlrID
Definition: NiControllerSequence.h:61
BSFixedString interpolatorID
Definition: NiControllerSequence.h:62
BSFixedString ctlrType
Definition: NiControllerSequence.h:60
BSFixedString propertyType
Definition: NiControllerSequence.h:59
Definition: NiControllerSequence.h:41
std::uint32_t pad1C
Definition: NiControllerSequence.h:50
NiBlendInterpolator * blendInterp
Definition: NiControllerSequence.h:46
NiPointer< NiInterpolator > interpolator
Definition: NiControllerSequence.h:44
NiPointer< NiInterpController > interpCtlr
Definition: NiControllerSequence.h:45
std::uint16_t pad1A
Definition: NiControllerSequence.h:49
std::uint8_t blendIdx
Definition: NiControllerSequence.h:47
std::uint8_t pad19
Definition: NiControllerSequence.h:48