Skip to content

Commit 0b983c6

Browse files
committed
CCameraFilter 92% (GX weirdness)
1 parent 3289f26 commit 0b983c6

File tree

6 files changed

+630
-40
lines changed

6 files changed

+630
-40
lines changed

config/GM8E01_00/symbols.txt

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16995,31 +16995,9 @@ lbl_803CE5C8 = .rodata:0x803CE5C8; // type:object size:0x7 data:string
1699516995
@stringBase0 = .rodata:0x803CE5D0; // type:object size:0x1A scope:local data:string_table
1699616996
sDoorData = .rodata:0x803CE5F0; // type:object size:0x60 scope:global
1699716997
lbl_803CE650 = .rodata:0x803CE650; // type:object size:0x58
16998-
lbl_803CE6A8 = .rodata:0x803CE6A8; // type:object size:0x90
16999-
lbl_803CE738 = .rodata:0x803CE738; // type:object size:0xC data:string
17000-
lbl_803CE744 = .rodata:0x803CE744; // type:object size:0xC data:string
17001-
lbl_803CE750 = .rodata:0x803CE750; // type:object size:0xC data:string
17002-
lbl_803CE75C = .rodata:0x803CE75C; // type:object size:0xC data:string
17003-
lbl_803CE768 = .rodata:0x803CE768; // type:object size:0xC data:string
17004-
lbl_803CE774 = .rodata:0x803CE774; // type:object size:0xC data:string
17005-
lbl_803CE780 = .rodata:0x803CE780; // type:object size:0xC data:string
17006-
lbl_803CE78C = .rodata:0x803CE78C; // type:object size:0xC data:string
17007-
lbl_803CE798 = .rodata:0x803CE798; // type:object size:0xC data:string
17008-
lbl_803CE7A4 = .rodata:0x803CE7A4; // type:object size:0x21 data:string
17009-
lbl_803CE7C5 = .rodata:0x803CE7C5; // type:object size:0x21 data:string
17010-
lbl_803CE7E6 = .rodata:0x803CE7E6; // type:object size:0x21 data:string
17011-
lbl_803CE807 = .rodata:0x803CE807; // type:object size:0x21 data:string
17012-
lbl_803CE828 = .rodata:0x803CE828; // type:object size:0x21 data:string
17013-
lbl_803CE849 = .rodata:0x803CE849; // type:object size:0x21 data:string
17014-
lbl_803CE86A = .rodata:0x803CE86A; // type:object size:0x21 data:string
17015-
lbl_803CE88B = .rodata:0x803CE88B; // type:object size:0x21 data:string
17016-
lbl_803CE8AC = .rodata:0x803CE8AC; // type:object size:0x21 data:string
17017-
lbl_803CE8CD = .rodata:0x803CE8CD; // type:object size:0x9 data:string
17018-
lbl_803CE8D6 = .rodata:0x803CE8D6; // type:object size:0x9 data:string
17019-
lbl_803CE8DF = .rodata:0x803CE8DF; // type:object size:0x9 data:string
17020-
lbl_803CE8E8 = .rodata:0x803CE8E8; // type:object size:0x9 data:string
17021-
lbl_803CE8F1 = .rodata:0x803CE8F1; // type:object size:0x1
17022-
lbl_803CE8F2 = .rodata:0x803CE8F2; // type:object size:0x1E
16998+
skBlurTextureAssetNames = .rodata:0x803CE6A8; // type:object size:0x10 scope:local
16999+
lbl_803CE6B8 = .rodata:0x803CE6B8; // type:object size:0x80
17000+
@stringBase0 = .rodata:0x803CE738; // type:object size:0x1D8 scope:local data:string_table
1702317001
lbl_803CE910 = .rodata:0x803CE910; // type:object size:0xC0 data:4byte
1702417002
lbl_803CE9D0 = .rodata:0x803CE9D0; // type:object size:0x40
1702517003
lbl_803CEA10 = .rodata:0x803CEA10; // type:object size:0x80 data:4byte

include/Kyoto/Graphics/CGraphics.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ class CGraphics {
339339
static void VideoPostCallback(u32 retraceCount);
340340

341341
static const CViewport& GetViewport() { return mViewport; }
342+
static void GetViewport(int& left, int& bottom, int& width, int& height) {
343+
left = mViewport.mLeft;
344+
bottom = mViewport.mTop;
345+
width = mViewport.mWidth;
346+
height = mViewport.mHeight;
347+
}
342348
static const CVector3f& GetViewPoint() { return mViewPoint; }
343349
static const CTransform4f& GetViewMatrix() { return mViewMatrix; }
344350
static const CTransform4f& GetModelMatrix() { return mModelMatrix; }

include/Kyoto/Graphics/CTevCombiners.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,4 @@ class CTevCombiners {
185185
static uint sNumEnabledPasses;
186186
};
187187

188-
extern CTevCombiners::CTevPass CTevPass_805a5ebc;
189-
190188
#endif // _CTEVCOMBINERS

include/MetroidPrime/Cameras/CCameraBlurPass.hpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#include "MetroidPrime/TGameTypes.hpp"
77

8+
#include "dolphin/gx/GXEnum.h"
9+
810
#include "Kyoto/Graphics/CColor.hpp"
911
#include "Kyoto/TToken.hpp"
1012

@@ -23,15 +25,20 @@ class CCameraBlurPass {
2325
};
2426
CCameraBlurPass();
2527

28+
void Update(float dt);
2629
void SetBlur(EBlurType type, float amount, float duration, bool usePersistentFb);
2730
void DisableBlur(float duration);
2831
void Draw() const;
2932

3033
static void DrawWideScreen(const CColor& color, const CTexture* tex, float v);
31-
34+
3235
EBlurType GetCurrType() const { return x10_curType; }
3336
bool GetNoPersistentCopy() const { return x2d_noPersistentCopy; }
3437

38+
void GetFbCopy(_GXTexFmt fmt, uchar* buf) const;
39+
void FreePersistentFbTexture();
40+
void AllocatePersistentFbTexture();
41+
3542
private:
3643
rstl::optional_object< TCachedToken< CTexture > > x0_paletteTex;
3744
EBlurType x10_curType;
@@ -42,8 +49,8 @@ class CCameraBlurPass {
4249
float x24_totalTime;
4350
float x28_remainingTime;
4451
bool x2c_usePersistent;
45-
bool x2d_noPersistentCopy;
46-
uint x30_persistentBuf;
52+
mutable bool x2d_noPersistentCopy;
53+
void* x30_persistentBuf;
4754
};
4855
CHECK_SIZEOF(CCameraBlurPass, 0x34)
4956

include/MetroidPrime/Cameras/CCameraFilterPass.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ class CCameraFilterPass {
4646
void Update(float dt);
4747
void Draw() const;
4848

49+
float GetT(bool invert) const;
50+
4951
static void DrawWideScreen(const CColor& color, const CTexture* tex, float v);
5052
static void DrawFilter(EFilterType type, EFilterShape shape, const CColor& color,
5153
const CTexture* tex, float lod);
54+
static void DrawFilterShape(EFilterShape shape, const CColor& color, const CTexture* tex,
55+
float lod);
5256
static void DrawFullScreenColoredQuad(const CColor& color);
5357
static void DrawFullScreenTexturedQuad(const CColor& color, const CTexture* tex, float lod);
5458
static void DrawFullScreenTexturedQuadQuarters(const CColor& color, const CTexture* tex,
5559
float lod);
60+
static void DrawScanLines(const CColor& color, bool even);
61+
static void DrawRandomStatic(const CColor& color, float alpha, bool cookieCutter);
5662

5763
private:
5864
EFilterType x0_curType;

0 commit comments

Comments
 (0)