CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
GFxMovieDataDef.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/G/GAtomic.h"
7#include "RE/G/GHashSet.h"
10#include "RE/G/GStringHash.h"
11
12namespace RE
13{
14 class GFxLog;
15
17 {
18 std::uint32_t totalBytes; // 00
19 std::uint32_t version; // 04
21 float frameRate; // 18
22 std::uint32_t frameCount; // 1C
23 std::uint32_t swfFlags; // 20
24 std::uint32_t unk24; // 24
25 std::uint64_t unk28; // 28
26 std::uint64_t unk30; // 30
27 std::uint64_t unk38; // 38
28 std::uint16_t unk40; // 40
29 std::uint16_t pad42; // 42
30 std::uint32_t unk44; // 44
33 void* unk58; // 58
34 std::uint64_t unk60; // 60
35 std::uint64_t unk68; // 68
36 };
37 static_assert(sizeof(GFxMovieLoadInfo) == 0x70);
38
40 {
41 enum SourceType : std::int32_t
42 {
45 };
46
48 {
49 std::uint32_t index;
50 std::uint32_t unk04;
51 };
52
54 {
57 };
58
60 std::uint32_t pad04; // 04
62 };
63 static_assert(sizeof(GFxResourceSource) == 0x10);
64
66 {
68 {
70 std::uint32_t id; // 08
71 std::uint32_t importIndex; // 0C
72 };
73 static_assert(sizeof(ImportAssetInfo) == 0x10);
74
77 std::uint32_t frame; // 20
78 std::uint32_t movieIndex; // 24
80 };
81 static_assert(sizeof(GFxImportNode) == 0x30);
82
84 public GFxTimelineDef, // 00
85 public GFxResourceReport // 20
86 {
87 public:
89 {
90 public:
91 void* Alloc(UPInt a_size)
92 {
93 if (a_size > 0xFF8) {
94 auto newBlock = static_cast<void**>(heap->Alloc(a_size + 8, 0));
95 if (!newBlock) {
96 return nullptr;
97 }
98
99 newBlock[0] = lastBlock;
100 lastBlock = newBlock;
101
102 return &newBlock[1];
103 }
104
105 if (a_size > memAvailable) {
106 auto newBlock = static_cast<void**>(heap->Alloc(0x1FF8, 0));
107 if (!newBlock) {
108 return nullptr;
109 }
110
111 newBlock[0] = lastBlock;
112 lastBlock = newBlock;
113
114 allocPtr = &newBlock[1];
115 memAvailable = 0x1FF0;
116 }
117
118 auto memPtr = allocPtr;
119
120 memAvailable -= a_size;
121 allocPtr = static_cast<char*>(allocPtr) + a_size;
122
123 return memPtr;
124 }
125
126 template <class T>
127 T* Alloc()
128 {
129 return static_cast<T*>(Alloc(sizeof(T)));
130 }
131
132 void Free()
133 {
134 const auto globalHeap = GMemory::GetGlobalHeap();
135 void* block = lastBlock;
136 while (block) {
137 globalHeap->Free(block);
138 block = static_cast<void**>(block)[0];
139 }
140 }
141
142 // members
143 void* allocPtr; // 00
144 std::uint64_t memAvailable; // 08
145 void* lastBlock; // 10
147 };
148
149 class LoadTaskDataBase : public GRefCountBase<LoadTaskDataBase, GFxStatMovieData::kGFxStatMD_Other_Mem>
150 {
151 public:
152 // members
154 void* unk30; // 30
155 };
156 static_assert(sizeof(LoadTaskDataBase) == 0x38);
157
159 {
160 public:
162
163 ~LoadTaskData() override; // 00
164
165 // add
166 virtual void AddFrameName(GString* a_label, GFxLog* a_log); // 01
167 virtual void SetMovieTagArray(ExecuteTagList* a_data); // 02
168 virtual void SetImportTagArray(ExecuteTagList* a_data); // 03
169
170 // members
175 std::uint32_t fileAttributes; // 0C0
176 std::uint32_t padC4; // 0C4
177 void* metadata; // 0C8
178 std::uint32_t metadataSize; // 0D0
179 std::uint32_t loadStatus; // 0D4 - 1 when file loaded, 2 when loading finished, 4 if error?
180 std::int32_t frameLoading; // 0D8
181 std::uint8_t unkDC; // 0DC
182 std::uint8_t padDD; // 0DD
183 std::uint16_t padDE; // 0DE
184 std::uint32_t unkE0; // 0E0
185 std::uint32_t padE4; // 0E4
187 std::uint64_t unkF0; // 0F0
188 std::uint64_t unkF8; // 0F8
191 std::uint64_t unk110; // 110
192 std::uint64_t unk118; // 118
193 std::uint64_t unk120; // 120
194 std::uint64_t unk128; // 128
195 std::uint32_t importedResourceCount; // 130
196 std::uint32_t pad134; // 134
199 std::uint64_t unk168; // 168
200 std::uint64_t unk170; // 170
204 std::int32_t importFrameCount; // 1D0
205 std::uint32_t pad1D4; // 1D4
207 std::uint64_t unk1E0; // 1E0
208 };
209 static_assert(sizeof(LoadTaskData) == 0x1E8);
210
211 ~GFxMovieDataDef() override; // 00
212
213 // override (GFxResource)
214 GFxResourceKey GetKey() override; // 01
215 std::uint32_t GetResourceTypeCode() const override; // 02
217
218 // override (GFxCharacterDef)
219 std::uint32_t GetVersion() override; // 08
220
221 // override (GFxTimelineDef)
222 std::uint32_t GetFrameCount() override; // 0A
223 ExecuteTagList* GetMovieTagArray(ExecuteTagList& a_data, std::int32_t a_frameNumber) override; // 0B
224 ExecuteTagList* GetImportTagArray(ExecuteTagList& a_data, std::int32_t a_frameNumber) override; // 0C
225 bool GetLabeledFrame(const char* a_label, std::int32_t& a_frameNumber, bool a_arg3) override; // 0D
226
227 // add
228 virtual void Unk_0E(void); // 0E
229 virtual std::uint32_t GetSWFFlags(); // 0F
230
231 // members
233 void* unk30; // 30
234 std::uint32_t fileFormat; // 38
235 std::uint32_t pad3C; // 3C
237 };
238 static_assert(sizeof(GFxMovieDataDef) == 0x48);
239}
Definition: GArray.h:13
Definition: GArrayLH.h:13
Definition: GFxLog.h:11
Definition: GFxMovieDataDef.h:89
void Free()
Definition: GFxMovieDataDef.h:132
void * allocPtr
Definition: GFxMovieDataDef.h:143
GMemoryHeap * heap
Definition: GFxMovieDataDef.h:146
void * Alloc(UPInt a_size)
Definition: GFxMovieDataDef.h:91
std::uint64_t memAvailable
Definition: GFxMovieDataDef.h:144
void * lastBlock
Definition: GFxMovieDataDef.h:145
T * Alloc()
Definition: GFxMovieDataDef.h:127
Definition: GFxMovieDataDef.h:150
Allocator allocator
Definition: GFxMovieDataDef.h:153
void * unk30
Definition: GFxMovieDataDef.h:154
Definition: GFxMovieDataDef.h:159
std::uint32_t loadStatus
Definition: GFxMovieDataDef.h:179
std::uint64_t unk168
Definition: GFxMovieDataDef.h:199
GLock frameLock
Definition: GFxMovieDataDef.h:201
GPtr< GFxLoadUpdateSync > updateSync
Definition: GFxMovieDataDef.h:186
std::uint64_t unkF0
Definition: GFxMovieDataDef.h:187
GFxMovieLoadInfo movieInfo
Definition: GFxMovieDataDef.h:174
GStringHash< std::int32_t > frameLabels
Definition: GFxMovieDataDef.h:206
std::uint32_t pad1D4
Definition: GFxMovieDataDef.h:205
std::uint64_t unk118
Definition: GFxMovieDataDef.h:192
GString fileURL
Definition: GFxMovieDataDef.h:173
std::uint32_t unkE0
Definition: GFxMovieDataDef.h:184
std::uint32_t padE4
Definition: GFxMovieDataDef.h:185
std::uint8_t unkDC
Definition: GFxMovieDataDef.h:181
void * metadata
Definition: GFxMovieDataDef.h:177
std::uint64_t unk1E0
Definition: GFxMovieDataDef.h:207
GMemoryHeap * loadDataHeap
Definition: GFxMovieDataDef.h:171
std::uint32_t pad134
Definition: GFxMovieDataDef.h:196
GArrayLH< ExecuteTagList > movieFrames
Definition: GFxMovieDataDef.h:202
std::uint64_t unkF8
Definition: GFxMovieDataDef.h:188
std::uint32_t importedResourceCount
Definition: GFxMovieDataDef.h:195
std::uint8_t padDD
Definition: GFxMovieDataDef.h:182
std::uint64_t unk120
Definition: GFxMovieDataDef.h:193
GFxImportNode * importInfoEnd
Definition: GFxMovieDataDef.h:190
GMemoryHeap * imageHeap
Definition: GFxMovieDataDef.h:172
std::uint64_t unk110
Definition: GFxMovieDataDef.h:191
virtual void SetMovieTagArray(ExecuteTagList *a_data)
ResourceHash resources
Definition: GFxMovieDataDef.h:198
std::uint16_t padDE
Definition: GFxMovieDataDef.h:183
std::uint64_t unk128
Definition: GFxMovieDataDef.h:194
std::uint32_t padC4
Definition: GFxMovieDataDef.h:176
virtual void AddFrameName(GString *a_label, GFxLog *a_log)
virtual void SetImportTagArray(ExecuteTagList *a_data)
std::uint32_t fileAttributes
Definition: GFxMovieDataDef.h:175
GFxImportNode * importInfoBegin
Definition: GFxMovieDataDef.h:189
GLock resourceLock
Definition: GFxMovieDataDef.h:197
std::int32_t importFrameCount
Definition: GFxMovieDataDef.h:204
GArrayLH< ExecuteTagList > importFrames
Definition: GFxMovieDataDef.h:203
std::uint32_t metadataSize
Definition: GFxMovieDataDef.h:178
std::int32_t frameLoading
Definition: GFxMovieDataDef.h:180
std::uint64_t unk170
Definition: GFxMovieDataDef.h:200
Definition: GFxMovieDataDef.h:86
GPtr< LoadTaskData > loadTaskData
Definition: GFxMovieDataDef.h:236
GFxResourceReport * GetResourceReport() override
std::uint32_t GetFrameCount() override
void * unk30
Definition: GFxMovieDataDef.h:233
~GFxMovieDataDef() override
std::uint32_t fileFormat
Definition: GFxMovieDataDef.h:234
ExecuteTagList * GetMovieTagArray(ExecuteTagList &a_data, std::int32_t a_frameNumber) override
std::uint32_t GetResourceTypeCode() const override
GFxResourceKey * resourceKey
Definition: GFxMovieDataDef.h:232
ExecuteTagList * GetImportTagArray(ExecuteTagList &a_data, std::int32_t a_frameNumber) override
bool GetLabeledFrame(const char *a_label, std::int32_t &a_frameNumber, bool a_arg3) override
virtual std::uint32_t GetSWFFlags()
std::uint32_t GetVersion() override
virtual void Unk_0E(void)
std::uint32_t pad3C
Definition: GFxMovieDataDef.h:235
GFxResourceKey GetKey() override
Definition: GFxResource.h:15
Definition: GFxResourceKey.h:6
Definition: GFxResourceReport.h:11
Definition: GFxTimelineDef.h:10
Definition: GAtomic.h:6
Definition: GMemoryHeap.h:16
virtual void * Alloc(UPInt a_size)=0
static GMemoryHeap * GetGlobalHeap()
Definition: GPtr.h:7
Definition: GRefCountBase.h:12
Definition: GStringHash.h:11
Definition: GString.h:8
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5
Definition: GFxMovieDataDef.h:68
GString name
Definition: GFxMovieDataDef.h:69
std::uint32_t importIndex
Definition: GFxMovieDataDef.h:71
std::uint32_t id
Definition: GFxMovieDataDef.h:70
Definition: GFxMovieDataDef.h:66
GFxImportNode * nextInChain
Definition: GFxMovieDataDef.h:79
std::uint32_t movieIndex
Definition: GFxMovieDataDef.h:78
GString filename
Definition: GFxMovieDataDef.h:76
GArray< ImportAssetInfo > assets
Definition: GFxMovieDataDef.h:75
std::uint32_t frame
Definition: GFxMovieDataDef.h:77
Definition: GFxMovieDataDef.h:17
GRectF frameRect
Definition: GFxMovieDataDef.h:20
void * unk58
Definition: GFxMovieDataDef.h:33
std::uint64_t unk68
Definition: GFxMovieDataDef.h:35
std::uint64_t unk28
Definition: GFxMovieDataDef.h:25
std::uint32_t totalBytes
Definition: GFxMovieDataDef.h:18
std::uint32_t unk24
Definition: GFxMovieDataDef.h:24
std::uint32_t unk44
Definition: GFxMovieDataDef.h:30
std::uint64_t unk38
Definition: GFxMovieDataDef.h:27
std::uint16_t unk40
Definition: GFxMovieDataDef.h:28
std::uint32_t version
Definition: GFxMovieDataDef.h:19
std::uint64_t unk30
Definition: GFxMovieDataDef.h:26
std::uint32_t frameCount
Definition: GFxMovieDataDef.h:22
std::uint64_t unk60
Definition: GFxMovieDataDef.h:34
std::uint32_t swfFlags
Definition: GFxMovieDataDef.h:23
GString unk50
Definition: GFxMovieDataDef.h:32
float frameRate
Definition: GFxMovieDataDef.h:21
std::uint16_t pad42
Definition: GFxMovieDataDef.h:29
GString unk48
Definition: GFxMovieDataDef.h:31
Definition: GFxMovieDataDef.h:48
std::uint32_t index
Definition: GFxMovieDataDef.h:49
std::uint32_t unk04
Definition: GFxMovieDataDef.h:50
Definition: GFxMovieDataDef.h:40
SourceType
Definition: GFxMovieDataDef.h:42
@ kImported
Definition: GFxMovieDataDef.h:44
@ kNormal
Definition: GFxMovieDataDef.h:43
SourceType type
Definition: GFxMovieDataDef.h:59
ResourceUnion data
Definition: GFxMovieDataDef.h:61
std::uint32_t pad04
Definition: GFxMovieDataDef.h:60
Definition: GFxTimelineDef.h:13
Definition: GFxMovieDataDef.h:54
ImportSource importSource
Definition: GFxMovieDataDef.h:56
GFxResource * resource
Definition: GFxMovieDataDef.h:55