NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
lyt_drawInfo.h
1#ifndef NW4R_LYT_DRAW_INFO_H
2#define NW4R_LYT_DRAW_INFO_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/math.h>
6#include <nw4r/ut.h>
7
8namespace nw4r {
9namespace lyt {
10
11class DrawInfo {
12public:
13 DrawInfo();
14 virtual ~DrawInfo(); // at 0x8
15
16 bool IsYAxisUp() const {
17 return mViewRect.bottom - mViewRect.top < 0.0f;
18 }
19
20 const math::MTX34& GetViewMtx() const {
21 return mViewMtx;
22 }
23 void SetViewMtx(const math::MTX34& rViewMtx) {
24 mViewMtx = rViewMtx;
25 }
26
27 const ut::Rect& GetViewRect() const {
28 return mViewRect;
29 }
30 void SetViewRect(const ut::Rect& rViewRect) {
31 mViewRect = rViewRect;
32 }
33
34 const math::VEC2& GetLocationAdjustScale() const {
35 return mLocationAdjustScale;
36 }
37 void SetLocationAdjustScale(const math::VEC2& rScale) {
38 mLocationAdjustScale = rScale;
39 }
40
41 f32 GetGlobalAlpha() const {
42 return mGlobalAlpha;
43 }
44 void SetGlobalAlpha(f32 alpha) {
45 mGlobalAlpha = alpha;
46 }
47
48 bool IsMultipleViewMtxOnDraw() const {
49 return mFlag.mulViewDraw;
50 }
51
52 bool IsInfluencedAlpha() const {
53 return mFlag.influencedAlpha;
54 }
55 void SetInfluencedAlpha(bool influenced) {
56 mFlag.influencedAlpha = influenced;
57 }
58
59 bool IsLocationAdjust() const {
60 return mFlag.locationAdjust;
61 }
62 void SetLocationAdjust(bool adjust) {
63 mFlag.locationAdjust = adjust;
64 }
65
66 bool IsInvisiblePaneCalculateMtx() const {
67 return mFlag.invisiblePaneCalculateMtx;
68 }
69 void SetInvisiblePaneCalculateMtx(bool calc) {
70 mFlag.invisiblePaneCalculateMtx = calc;
71 }
72
73 bool IsDebugDrawMode() const {
74 return mFlag.debugDrawMode;
75 }
76
77protected:
78 math::MTX34 mViewMtx; // at 0x4
79 ut::Rect mViewRect; // at 0x34
80 math::VEC2 mLocationAdjustScale; // at 0x44
81 f32 mGlobalAlpha; // at 0x4C
82
83 struct {
84 u8 mulViewDraw : 1;
85 u8 influencedAlpha : 1;
86 u8 locationAdjust : 1;
87 u8 invisiblePaneCalculateMtx : 1;
88 u8 debugDrawMode : 1;
89 } mFlag; // at 0x50
90};
91
92} // namespace lyt
93} // namespace nw4r
94
95#endif
2D graphics drawing library.