summaryrefslogtreecommitdiff
path: root/include/egg
diff options
context:
space:
mode:
authorelijah-thomas774 <elijahthomas774@gmail.com>2025-03-23 15:29:15 -0400
committerelijah-thomas774 <elijahthomas774@gmail.com>2025-03-23 15:29:15 -0400
commit3ef9b0df8b956bdb3f371ee118ef6dc881ea61e6 (patch)
tree7e658f363e95c190d62e77e801c61469ae444457 /include/egg
parent115d0d706594bbf1f5dab1b82da0f0e4981b0571 (diff)
PostEffect Progress
Diffstat (limited to 'include/egg')
-rw-r--r--include/egg/gfx/eggPostEffectBase.h26
-rw-r--r--include/egg/gfx/eggPostEffectBlur.h8
-rw-r--r--include/egg/gfx/eggPostEffectMaskDOF.h35
3 files changed, 53 insertions, 16 deletions
diff --git a/include/egg/gfx/eggPostEffectBase.h b/include/egg/gfx/eggPostEffectBase.h
index 84a533c9..0e940200 100644
--- a/include/egg/gfx/eggPostEffectBase.h
+++ b/include/egg/gfx/eggPostEffectBase.h
@@ -2,7 +2,9 @@
#define EGG_POST_EFFECT_BASE_H
#include "common.h"
-#include "egg/egg_types.h"
+#include "egg/gfx/eggCapTexture.h"
+#include "egg/gfx/eggScreen.h"
+#include "egg/math/eggMath.h"
#include "nw4r/math/math_types.h"
#include "rvl/GX/GXTypes.h"
@@ -10,6 +12,10 @@ namespace EGG {
class PostEffectBase {
public:
+ struct CapTextureWrapper {
+ CapTexture *mpTex;
+ GXTexMapID mTexMapID;
+ };
void setField_0x00(u32 val) {
field_0x00 = val;
}
@@ -17,16 +23,14 @@ public:
static void setProjection(const EGG::Screen &screen);
protected:
- u32 field_0x00; // at 0x0
- CapTexture *mpCapTexture; // at 0x4
- GXTexMapID mTexMapId; // at 0x8
- CapTexture *mpCapTexture2; // at 0xC
- GXTexMapID mTexMapId2; // at 0x10
- f32 mOffsetX; // at 0x14
- f32 mOffsetY; // at 0x18
- f32 mScaleX; // at 0x1C
- f32 mScaleY; // at 0x20
- f32 mRotation; // at 0x24
+ u32 field_0x00; // at 0x0
+ CapTextureWrapper mTex1; // at 0x4
+ CapTextureWrapper mTex2; // at 0xC
+ f32 mOffsetX; // at 0x14
+ f32 mOffsetY; // at 0x18
+ f32 mScaleX; // at 0x1C
+ f32 mScaleY; // at 0x20
+ f32 mRotation; // at 0x24
PostEffectBase();
virtual ~PostEffectBase() {} // at 0x8
diff --git a/include/egg/gfx/eggPostEffectBlur.h b/include/egg/gfx/eggPostEffectBlur.h
index 103a55af..35db7a39 100644
--- a/include/egg/gfx/eggPostEffectBlur.h
+++ b/include/egg/gfx/eggPostEffectBlur.h
@@ -15,11 +15,11 @@ class PostEffectBlur : public PostEffectBase {
/* 0x08 */ f32 field_0x08;
/* 0x0C */ f32 field_0x0C;
- void init(GXColor clr) {
+ void init(const GXColor &clr) {
field_0x00 = 16;
field_0x01 = clr;
- field_0x08 = 1.0f;
- field_0x0C = 0.0f;
+ field_0x08 = 0.0f;
+ field_0x0C = 1.0f;
}
};
@@ -40,7 +40,7 @@ public:
void setStage0Color(GXColor clr) {
field_0x38[0].field_0x01 = clr;
}
-
+
void setStage0F(f32 f) {
field_0x38[0].field_0x0C = f;
}
diff --git a/include/egg/gfx/eggPostEffectMaskDOF.h b/include/egg/gfx/eggPostEffectMaskDOF.h
index cf6398f6..5faca35a 100644
--- a/include/egg/gfx/eggPostEffectMaskDOF.h
+++ b/include/egg/gfx/eggPostEffectMaskDOF.h
@@ -1,6 +1,39 @@
#ifndef EGG_POST_EFFECT_MASK_DOF_H
#define EGG_POST_EFFECT_MASK_DOF_H
-namespace EGG {} // namespace EGG
+#include "egg/gfx/eggCpuTexture.h"
+#include "egg/gfx/eggPostEffectBase.h"
+#include "egg/math/eggVector.h"
+#include "rvl/GX/GXTypes.h"
+namespace EGG {
+
+class PostEffectMaskDOF : public PostEffectBase {
+public:
+ PostEffectMaskDOF();
+
+ void setUpGradation();
+ virtual void draw(f32 width, f32 height) override;
+ virtual void setMaterialInternal() override;
+ virtual ~PostEffectMaskDOF() {}
+
+ const GXColor &getNearColor();
+ const GXColor &getFarColor();
+ const GXColor &getCenterColor();
+
+private:
+ /* 0x2C */ u8 field_0x2C;
+ /* 0x30 */ CpuTexture *mpCpuTexArr[3];
+ /* 0x3C */ CpuTexture *mpCpuTex;
+ /* 0x40 */ u8 _40[4];
+ /* 0x44 */ f32 field_0x44;
+ /* 0x48 */ f32 field_0x48;
+ /* 0x4C */ f32 field_0x4C;
+ /* 0x50 */ Vector2f field_0x50;
+ /* 0x58 */ u8 _58[4];
+ /* 0x5C */ int mCpuTexArrIdx;
+ /* 0x60 */ int field_0x60;
+};
+
+} // namespace EGG
#endif