CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
GFxMovieDef.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/G/GFxResource.h"
5#include "RE/G/GFxStateBag.h"
6#include "RE/G/GMemoryHeap.h"
7#include "RE/G/GRect.h"
8#include "RE/G/GStats.h"
9
10namespace RE
11{
12 class GFxExporterInfo;
13 class GFxMovieView;
14
15 // Represents loaded shared data for an SWF movie file. These objects are normally created by Loader::CreateMovie and are shared by all movie instances.
17 public GFxResource, // 00
18 public GFxStateBag // 18
19 {
20 public:
21 // SWF 8 file attributes, returned by GetFileAttributes. These attributes are configured in Publish Settings and Document Properties dialogs of the Flash studio.
22 enum FileAttrFlags : std::uint32_t
23 {
24 kUseNetwork = 1 << 0, // - Indicates that "Access Network only" was selected for an SWF file in publish settings for local playback security
25 kHasMetadata = 1 << 4 // - Indicates that the file has embedded metadata, available through the GetMetadata method
26 };
27
28 // VisitResourceMask defines a set of resource mask flag bits passed as a visitMask argument to VisitResources. If a given flag bit is included in the visitMask, the corresponding resource types are included in the enumeration, otherwise they are ignored.
29 enum VisitResourceMask : std::uint32_t
30 {
31 kNestedMovies = 1 << 15, // Indicates that resources in the imported movies should also be enumerated.
32
33 // Types of resources to visit
34 kFonts = 1 << 0, // Font resources should be enumerated.
35 kBitmaps = 1 << 1, // Image resources with GFxResource::ResourceUse::kBitmap should be enumerated (See GFxResource::ResourceUse). These resources correspond to image shape fills used in the SWF/FLA files.
36 kGradientImages = 1 << 2, // Image resources with GFxResource::ResourceUse::kGradientBitmaps should be enumerated (See GFxResource::ResourceUse). These resources are created based on GradientParams during loading.
37 kEditTextFields = 1 << 3, // Edit text field resources should be enumerated.
38 kSounds = 1 << 4, // Sound resources should be enumerated.
39 kSprite = 1 << 5, // Sprite resources should be enumerated.
40
41 // Combined flags
42 kAllLocalImages = (kBitmaps | kGradientImages), // Combines kBitmaps and kGradientImages.
43 kAllImages = (kBitmaps | kGradientImages | kNestedMovies) // Combines kBitmaps, kGradientImages and kNestedMovies.
44 };
45
47 {
48 MemoryParams(UPInt a_memoryArena = 0);
49
50 // members
53 std::uint32_t maxCollectionRoots; // 44
54 std::uint32_t framesBetweenCollections; // 48
55 std::uint32_t pad4C; // 4C
56 };
57 static_assert(sizeof(MemoryParams) == 0x50);
58
59 class MemoryContext : public GRefCountBase<MemoryContext, GStatGroups::kGStat_Default_Mem>
60 {
61 public:
62 MemoryContext() = delete;
63 ~MemoryContext() override; // 00
64 };
65 static_assert(sizeof(MemoryContext) == 0x10);
66
68 {
69 virtual ~ImportVisitor(); // 00
70
71 // add
72 virtual void Visit(GFxMovieDef* a_parentDef, GFxMovieDef* a_importDef, const char* a_importedMovieFilename) = 0; // 01
73 };
74 static_assert(sizeof(ImportVisitor) == 0x8);
75
77 {
78 virtual ~ResourceVisitor(); // 00
79
80 // add
81 virtual void Visit(GFxMovieDef* a_movieDef, GFxResource* a_resource, GFxResourceID a_id, const char* a_exportName) = 0; // 01
82 };
83 static_assert(sizeof(ResourceVisitor) == 0x8);
84
85 // add
86 [[nodiscard]] virtual std::uint32_t GetVersion() const = 0; // 04
87 [[nodiscard]] virtual std::uint32_t GetLoadingFrame() const = 0; // 05
88 [[nodiscard]] virtual float GetWidth() const = 0; // 06
89 [[nodiscard]] virtual float GetHeight() const = 0; // 07
90 [[nodiscard]] virtual std::uint32_t GetFrameCount() const = 0; // 08
91 [[nodiscard]] virtual float GetFrameRate() const = 0; // 09
92 [[nodiscard]] virtual GRectF GetFrameRect() const = 0; // 0A
93 [[nodiscard]] virtual std::uint32_t GetSWFFlags() const = 0; // 0B
94 [[nodiscard]] virtual const char* GetFileURL() const = 0; // 0C
95 virtual void WaitForLoadFinish(bool a_cancel = false) const = 0; // 0D
96 virtual void WaitForFrame(std::uint32_t a_frame) const = 0; // 0E
97 [[nodiscard]] virtual std::uint32_t GetFileAttributes() const = 0; // 0F
98 virtual std::uint32_t GetMetadata(char* a_buff, std::uint32_t a_buffSize) const = 0; // 10
99 [[nodiscard]] virtual GMemoryHeap* GetLoadDataHeap() const = 0; // 11
100 [[nodiscard]] virtual GMemoryHeap* GetBindDataHeap() const = 0; // 12
101 [[nodiscard]] virtual GMemoryHeap* GetImageHeap() const = 0; // 13
102 [[nodiscard]] virtual GFxResource* GetMovieDataResource() const = 0; // 14
103 [[nodiscard]] virtual const GFxExporterInfo* GetExporterInfo() const = 0; // 15
104 virtual MemoryContext* CreateMemoryContext(const char* a_heapName, const MemoryParams& a_memParams, bool a_debugHeap) = 0; // 16
105 virtual GFxMovieView* CreateInstance(const MemoryParams& a_memParams, bool a_initFirstFrame = true) = 0; // 17
106 virtual GFxMovieView* CreateInstance(MemoryContext* a_memContext, bool a_initFirstFrame = true) = 0; // 18
107 virtual void VisitImportedMovies(ImportVisitor* a_visitor) = 0; // 19
108 virtual void VisitResources(ResourceVisitor* a_visitor, VisitResourceMask a_visitMask = VisitResourceMask::kAllImages) = 0; // 1A
109 virtual GFxResource* GetResource(const char* a_exportName) const = 0; // 1B
110
111 GFxMovieView* CreateInstance(bool a_initFirstFrame = true, UPInt a_memoryArena = 0);
112 };
113 static_assert(sizeof(GFxMovieDef) == 0x20);
114}
Definition: GFxFileConstants.h:6
Definition: GFxMovieDef.h:60
Definition: GFxMovieDef.h:19
virtual void WaitForFrame(std::uint32_t a_frame) const =0
virtual GFxMovieView * CreateInstance(MemoryContext *a_memContext, bool a_initFirstFrame=true)=0
virtual void WaitForLoadFinish(bool a_cancel=false) const =0
virtual std::uint32_t GetLoadingFrame() const =0
virtual std::uint32_t GetMetadata(char *a_buff, std::uint32_t a_buffSize) const =0
virtual GMemoryHeap * GetImageHeap() const =0
virtual GFxResource * GetMovieDataResource() const =0
virtual float GetWidth() const =0
virtual GRectF GetFrameRect() const =0
virtual GMemoryHeap * GetLoadDataHeap() const =0
virtual const GFxExporterInfo * GetExporterInfo() const =0
virtual const char * GetFileURL() const =0
virtual void VisitImportedMovies(ImportVisitor *a_visitor)=0
virtual MemoryContext * CreateMemoryContext(const char *a_heapName, const MemoryParams &a_memParams, bool a_debugHeap)=0
virtual std::uint32_t GetVersion() const =0
virtual std::uint32_t GetFrameCount() const =0
virtual float GetHeight() const =0
virtual std::uint32_t GetSWFFlags() const =0
virtual void VisitResources(ResourceVisitor *a_visitor, VisitResourceMask a_visitMask=VisitResourceMask::kAllImages)=0
virtual GMemoryHeap * GetBindDataHeap() const =0
virtual std::uint32_t GetFileAttributes() const =0
VisitResourceMask
Definition: GFxMovieDef.h:30
@ kGradientImages
Definition: GFxMovieDef.h:36
@ kEditTextFields
Definition: GFxMovieDef.h:37
@ kBitmaps
Definition: GFxMovieDef.h:35
@ kAllLocalImages
Definition: GFxMovieDef.h:42
@ kSounds
Definition: GFxMovieDef.h:38
@ kAllImages
Definition: GFxMovieDef.h:43
@ kNestedMovies
Definition: GFxMovieDef.h:31
@ kFonts
Definition: GFxMovieDef.h:34
@ kSprite
Definition: GFxMovieDef.h:39
FileAttrFlags
Definition: GFxMovieDef.h:23
@ kHasMetadata
Definition: GFxMovieDef.h:25
@ kUseNetwork
Definition: GFxMovieDef.h:24
virtual float GetFrameRate() const =0
virtual GFxResource * GetResource(const char *a_exportName) const =0
virtual GFxMovieView * CreateInstance(const MemoryParams &a_memParams, bool a_initFirstFrame=true)=0
GFxMovieView * CreateInstance(bool a_initFirstFrame=true, UPInt a_memoryArena=0)
Definition: GFxMovieView.h:24
Definition: GFxResource.h:15
Definition: GFxResourceID.h:6
Definition: GFxStateBag.h:11
Definition: GMemoryHeap.h:16
Definition: GRefCountBase.h:12
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5
Definition: GFxMovieDef.h:68
virtual void Visit(GFxMovieDef *a_parentDef, GFxMovieDef *a_importDef, const char *a_importedMovieFilename)=0
Definition: GFxMovieDef.h:47
MemoryParams(UPInt a_memoryArena=0)
float heapLimitMultiplier
Definition: GFxMovieDef.h:52
GMemoryHeap::HeapDesc desc
Definition: GFxMovieDef.h:51
std::uint32_t pad4C
Definition: GFxMovieDef.h:55
std::uint32_t maxCollectionRoots
Definition: GFxMovieDef.h:53
std::uint32_t framesBetweenCollections
Definition: GFxMovieDef.h:54
Definition: GFxMovieDef.h:77
virtual void Visit(GFxMovieDef *a_movieDef, GFxResource *a_resource, GFxResourceID a_id, const char *a_exportName)=0
Definition: GMemoryHeap.h:60