CommonLibSSE NG
Loading...
Searching...
No Matches
GFxMovieView.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/G/GFxMovie.h"
4#include "RE/G/GFxMovieDef.h"
5#include "RE/G/GFxStateBag.h"
6#include "RE/G/GPoint.h"
7#include "RE/G/GRect.h"
8#include "RE/G/GViewport.h"
9
10namespace RE
11{
12 class GColor;
13 class GFxEvent;
14 class GFxValue;
15 class GMatrix3D;
16 class GMemoryHeap;
17 class GPoint3F;
18 class GStatBag;
19 class GViewport;
20
22 public GFxMovie, // 00
23 public GFxStateBag // 10
24 {
25 friend class GFxCharacter;
26
27 public:
28 // ScaleModeType represents the scaling type used for the SWF file stage, corresponds to Stage.scaleMode property in ActionScript.
29 enum class ScaleModeType
30 {
31 kNoScale, // The size of SWF content is fixed
32 kShowAll, // Makes the entire SWF content visible in the viewport without distortion while maintaining the original aspect ratio
33 kExactFit, // Makes the entire SWF content visible in the viewport without trying to preserve the original aspect ratio
34 kNoBorder // Scales the SWF content to fill whole viewport area, without distortion but possibly with some cropping while maintaining original aspect ratio
35 };
36
37 // Alignment type used for the SWF file stage, corresponds to Stage.align property in ActionScript.
38 enum class AlignType
39 {
40 kCenter,
49 };
50
51 enum class HEResult
52 {
53 kNotHandled = 0,
54 kHandled = 1,
57 };
58
59 enum class HitTestType
60 {
61 kBounds = 0,
62 kShapes = 1,
63 kButtonEvents = 2,
65 };
66
67 ~GFxMovieView() override;
68
69 // add
70 virtual void SetViewport(const GViewport& a_viewDesc); // 19 - pure - Sets the render-target surface viewport to which the movie is scaled.
71 virtual void GetViewport(GViewport* a_viewDesc) const; // 1A - pure - Obtains the render-target surface viewport to which the movie is scaled.
72 virtual void SetViewScaleMode(ScaleModeType a_type); // 1B - pure - Sets the current scale mode for the movie.
73 [[nodiscard]] virtual ScaleModeType GetViewScaleMode() const; // 1C - pure - Obtains the current scale mode for the movie.
74 virtual void SetViewAlignment(AlignType a_type); // 1D - pure - Sets the current alignment mode for the movie.
75 [[nodiscard]] virtual AlignType GetViewAlignment() const; // 1E - pure - Gets the current alignment mode for the movie.
76 [[nodiscard]] virtual GRectF GetVisibleFrameRect() const; // 1F - pure - Obtains the currently visible rectangle.
77 virtual void SetPerspective3D(const GMatrix3D& a_projMatIn); // 20 - pure
78 virtual void SetView3D(const GMatrix3D& a_viewMatIn); // 21 - pure
79 [[nodiscard]] virtual GRectF GetSafeRect() const; // 22 - pure
80 virtual void SetSafeRect(const GRectF& a_rect); // 23 - pure
81 virtual void Restart(); // 24 - pure
82 virtual float Advance(float a_deltaT, std::uint32_t a_frameCatchUpCount = 2); // 25 - pure
83 virtual void Display(); // 26 - pure
84 virtual void DisplayPrePass(); // 27 - pure
85 virtual void SetPause(bool a_pause); // 28 - pure
86 [[nodiscard]] virtual bool IsPaused() const; // 29 - pure
87 virtual void SetBackgroundColor(const GColor a_bgColor); // 2A - pure
88 virtual void SetBackgroundAlpha(float a_alpha); // 2B - pure
89 [[nodiscard]] virtual float GetBackgroundAlpha() const; // 2C - pure
90 virtual HEResult HandleEvent(const GFxEvent& a_event); // 2D - pure
91 virtual void GetMouseState(std::uint32_t a_mouseIndex, float* a_x, float* a_y, std::uint32_t* a_buttons); // 2E - pure
92 virtual void NotifyMouseState(float a_x, float a_y, std::uint32_t a_buttons, std::uint32_t a_mouseIndex = 0); // 2F - pure
93 virtual bool HitTest(float a_x, float a_y, HitTestType a_testCond = HitTestType::kShapes, std::uint32_t a_controllerIdx = 0); // 30 - pure
94 virtual bool HitTest3D(GPoint3F* a_ptOut, float a_x, float a_y, std::uint32_t a_controllerIdx = 0); // 31 - pure
95 virtual void SetExternalInterfaceRetVal(const GFxValue& a_val); // 32 - pure
96 [[nodiscard]] virtual void* GetUserData() const; // 33 - pure
97 virtual void SetUserData(void* a_data); // 34 - pure
98 virtual bool AttachDisplayCallback(const char* a_pathToObject, void (*a_callback)(void* a_user), void* a_user); // 35 - pure
99 [[nodiscard]] virtual bool IsMovieFocused() const; // 36 - pure
100 virtual bool GetDirtyFlag(bool a_doReset = true); // 37 - pure
101 virtual void SetMouseCursorCount(std::uint32_t a_count); // 38 - pure
102 [[nodiscard]] virtual std::uint32_t GetMouseCursorCount() const; // 39 - pure
103 virtual void SetControllerCount(std::uint32_t a_count); // 3A - pure
104 [[nodiscard]] virtual std::uint32_t GetControllerCount() const; // 3B - pure
105 virtual void GetStats(GStatBag* a_bag, bool a_reset = true); // 3C - pure
106 [[nodiscard]] virtual GMemoryHeap* GetHeap() const; // 3D - pure
107 virtual void ForceCollectGarbage(); // 3E - pure
108 virtual GPointF TranslateToScreen(const GPointF& a_p, void* a_userMatrix); // 3F - pure
109 virtual GRectF TranslateToScreen(const GRectF& a_p, void* a_userMatrix); // 40 - pure
110 virtual bool TranslateLocalToScreen(const char* a_pathToCharacter, const GPointF& a_pt, GPointF* a_presPt, void* a_userMatrix); // 41 - pure
111 virtual bool SetControllerFocusGroup(std::uint32_t a_controllerIdx, std::uint32_t a_focusGroupIndex); // 42 - pure
112 [[nodiscard]] virtual std::uint32_t GetControllerFocusGroup(std::uint32_t a_controllerIdx) const; // 43 - pure
113 [[nodiscard]] virtual GFxMovieDef::MemoryContext* GetMemoryContext() const; // 44 - pure
114 virtual void Release(); // 45 - pure
115
116 void SetViewport(std::int32_t a_bufW, std::int32_t a_bufH, std::int32_t a_left, std::int32_t a_top, std::int32_t a_width, std::int32_t a_height, GViewport::Flag a_flags = GViewport::Flag::kNone);
117 void InvokeNoReturn(const char* a_methodName, const GFxValue* a_args, std::uint32_t a_numArgs);
118 };
119 static_assert(sizeof(GFxMovieView) == 0x18);
120}
Definition GColor.h:6
Definition GFxCharacter.h:18
Definition GFxEvent.h:11
Definition GFxMovieDef.h:62
Definition GFxMovie.h:13
Definition GFxMovieView.h:24
virtual void GetMouseState(std::uint32_t a_mouseIndex, float *a_x, float *a_y, std::uint32_t *a_buttons)
virtual bool AttachDisplayCallback(const char *a_pathToObject, void(*a_callback)(void *a_user), void *a_user)
virtual GRectF TranslateToScreen(const GRectF &a_p, void *a_userMatrix)
virtual void Release()
virtual void SetViewScaleMode(ScaleModeType a_type)
virtual bool IsMovieFocused() const
virtual AlignType GetViewAlignment() const
virtual void SetUserData(void *a_data)
virtual bool GetDirtyFlag(bool a_doReset=true)
virtual GRectF GetVisibleFrameRect() const
virtual bool SetControllerFocusGroup(std::uint32_t a_controllerIdx, std::uint32_t a_focusGroupIndex)
virtual void GetStats(GStatBag *a_bag, bool a_reset=true)
virtual void SetPause(bool a_pause)
virtual GMemoryHeap * GetHeap() const
virtual void SetViewAlignment(AlignType a_type)
virtual bool HitTest(float a_x, float a_y, HitTestType a_testCond=HitTestType::kShapes, std::uint32_t a_controllerIdx=0)
virtual void SetSafeRect(const GRectF &a_rect)
virtual GRectF GetSafeRect() const
AlignType
Definition GFxMovieView.h:39
virtual void SetBackgroundAlpha(float a_alpha)
virtual std::uint32_t GetControllerFocusGroup(std::uint32_t a_controllerIdx) const
virtual bool IsPaused() const
virtual void DisplayPrePass()
virtual void GetViewport(GViewport *a_viewDesc) const
~GFxMovieView() override
virtual void NotifyMouseState(float a_x, float a_y, std::uint32_t a_buttons, std::uint32_t a_mouseIndex=0)
virtual float GetBackgroundAlpha() const
virtual bool TranslateLocalToScreen(const char *a_pathToCharacter, const GPointF &a_pt, GPointF *a_presPt, void *a_userMatrix)
virtual void Restart()
virtual bool HitTest3D(GPoint3F *a_ptOut, float a_x, float a_y, std::uint32_t a_controllerIdx=0)
virtual void SetExternalInterfaceRetVal(const GFxValue &a_val)
virtual void SetViewport(const GViewport &a_viewDesc)
HitTestType
Definition GFxMovieView.h:60
void InvokeNoReturn(const char *a_methodName, const GFxValue *a_args, std::uint32_t a_numArgs)
virtual ScaleModeType GetViewScaleMode() const
virtual void * GetUserData() const
virtual float Advance(float a_deltaT, std::uint32_t a_frameCatchUpCount=2)
virtual std::uint32_t GetMouseCursorCount() const
HEResult
Definition GFxMovieView.h:52
void SetViewport(std::int32_t a_bufW, std::int32_t a_bufH, std::int32_t a_left, std::int32_t a_top, std::int32_t a_width, std::int32_t a_height, GViewport::Flag a_flags=GViewport::Flag::kNone)
virtual std::uint32_t GetControllerCount() const
virtual void SetControllerCount(std::uint32_t a_count)
virtual void SetPerspective3D(const GMatrix3D &a_projMatIn)
virtual void SetBackgroundColor(const GColor a_bgColor)
virtual void SetView3D(const GMatrix3D &a_viewMatIn)
virtual void SetMouseCursorCount(std::uint32_t a_count)
virtual HEResult HandleEvent(const GFxEvent &a_event)
ScaleModeType
Definition GFxMovieView.h:30
virtual void ForceCollectGarbage()
virtual GPointF TranslateToScreen(const GPointF &a_p, void *a_userMatrix)
virtual GFxMovieDef::MemoryContext * GetMemoryContext() const
virtual void Display()
Definition GFxStateBag.h:11
Definition GFxValue.h:92
Definition GMatrix3D.h:6
Definition GMemoryHeap.h:16
Definition GViewport.h:6
Flag
Definition GViewport.h:9
@ kNone
Definition GViewport.h:10
Definition AbsorbEffect.h:6