diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 56c714be..90cb6779 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -4904,7 +4904,7 @@ egg/gfx/eggCapTexture.cpp: .text start:0x8049D7C0 end:0x8049DA28 align:16 .rodata start:0x804FBA30 end:0x804FBA48 .data start:0x8056ED70 end:0x8056ED80 - .sdata2 start:0x8057F410 end:0x8057F418 + .sdata2 start:0x8057F408 end:0x8057F418 .sbss2 start:0x8057FFC0 end:0x8057FFC8 egg/gfx/eggCpuTexture.cpp: diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 1cf49233..b824b3f8 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -29200,7 +29200,7 @@ gRMO_Ntsc_640x456Prog_4x3__22@unnamed@eggVideo_cpp@ = .rodata:0x804FB980; // typ gRMO_Ntsc_640x456IntDf_4x3__22@unnamed@eggVideo_cpp@ = .rodata:0x804FB9BC; // type:object size:0x3C scope:local gStandardRenderModeObjSet__22@unnamed@eggVideo_cpp@ = .rodata:0x804FB9F8; // type:object size:0x28 scope:local @4804 = .rodata:0x804FBA20; // type:object size:0x10 scope:local data:4byte -copyArg2__3EGG = .rodata:0x804FBA30; // type:object size:0x18 scope:local +SAMPLE_PATTERN_OFF__27@unnamed@eggCapTexture_cpp@ = .rodata:0x804FBA30; // type:object size:0x18 scope:local sVtxTypes__3EGG = .rodata:0x804FBA60; // type:object size:0x10 @LOCAL@SetVtxState__Q23EGG6DrawGXFQ33EGG6DrawGX7VtxType@sVtxDataType0 = .rodata:0x804FBA80; // type:object size:0x30 align:32 @LOCAL@SetVtxState__Q23EGG6DrawGXFQ33EGG6DrawGX7VtxType@sNrmDataType0@0 = .rodata:0x804FBAC0; // type:object size:0x24 align:32 @@ -50364,10 +50364,8 @@ FLT_EPSILON = .sdata2:0x8057F3A4; // type:object size:0x4 align:4 data:float @2742 = .sdata2:0x8057F3F0; // type:object size:0x8 scope:local align:8 data:double sArr1__3EGG = .sdata2:0x8057F3F8; // type:object size:0x4 scope:local sArr2__3EGG = .sdata2:0x8057F3FC; // type:object size:0x6 scope:local -lbl_8057F408 = .sdata2:0x8057F408; // type:object size:0x4 data:4byte -lbl_8057F40C = .sdata2:0x8057F40C; // type:object size:0x2 data:2byte -lbl_8057F40E = .sdata2:0x8057F40E; // type:object size:0x1 data:byte -defaultFilter__3EGG = .sdata2:0x8057F410; // type:object size:0x7 scope:local data:byte +VFILTER_BLUR__Q23EGG10CapTexture = .sdata2:0x8057F408; // type:object size:0x7 scope:global data:byte +VFILTER_OFF__Q23EGG10CapTexture = .sdata2:0x8057F410; // type:object size:0x7 scope:global data:byte lbl_8057F418 = .sdata2:0x8057F418; // type:object size:0x4 align:4 data:float lbl_8057F41C = .sdata2:0x8057F41C; // type:object size:0x4 align:4 data:float lbl_8057F420 = .sdata2:0x8057F420; // type:object size:0x8 align:8 data:double @@ -50522,8 +50520,8 @@ lbl_8057F7BC = .sdata2:0x8057F7BC; // type:object size:0x4 align:4 data:float lbl_8057F7C0 = .sdata2:0x8057F7C0; // type:object size:0x4 align:4 data:float @5225 = .sdata2:0x8057F7C8; // type:object size:0x4 scope:local align:4 data:float @5226 = .sdata2:0x8057F7CC; // type:object size:0x4 scope:local align:4 data:float -sColorNear__3EGG = .sdata2:0x8057F7D0; // type:object size:0x4 -sColorFar__3EGG = .sdata2:0x8057F7D4; // type:object size:0x4 +NEAR__34@unnamed@eggPostEffectMaskDOF_cpp@ = .sdata2:0x8057F7D0; // type:object size:0x4 +FAR__34@unnamed@eggPostEffectMaskDOF_cpp@ = .sdata2:0x8057F7D4; // type:object size:0x4 lbl_8057F7D8 = .sdata2:0x8057F7D8; // type:object size:0x4 align:4 data:float lbl_8057F7DC = .sdata2:0x8057F7DC; // type:object size:0x4 align:4 data:float lbl_8057F7E0 = .sdata2:0x8057F7E0; // type:object size:0x4 align:4 data:float @@ -50800,8 +50798,8 @@ lbl_8057FFA0 = .sbss2:0x8057FFA0; // type:object size:0x8 data:4byte bta_dm_pm_cfg = .sbss2:0x8057FFA8; // type:object size:0x8 bd_addr_null = .sbss2:0x8057FFB0; // type:object size:0x8 DefaultBlackColor = .sbss2:0x8057FFB8; // type:object size:0x8 scope:local data:2byte -sBlack__3EGG = .sbss2:0x8057FFC0; // type:object size:0x4 scope:local data:byte -lbl_8057FFC8 = .sbss2:0x8057FFC8; // type:object size:0x4 +DEFUALT_CLEAR_COLOR__27@unnamed@eggCapTexture_cpp@ = .sbss2:0x8057FFC0; // type:object size:0x4 scope:local data:byte +CENTER__34@unnamed@eggPostEffectMaskDOF_cpp@ = .sbss2:0x8057FFC8; // type:object size:0x4 sSavedErrorHandlers = .bss:0x80580000; // type:object size:0x14 scope:local data:4byte @5782 = .bss:0x80580014; // type:object size:0xC scope:local @LOCAL@exceptionCreate__FPQ23EGG4Heap@mapFile = .bss:0x80580020; // type:object size:0x14 scope:local data:4byte diff --git a/include/egg/gfx/eggCapTexture.h b/include/egg/gfx/eggCapTexture.h index a3887e5b..820b0961 100644 --- a/include/egg/gfx/eggCapTexture.h +++ b/include/egg/gfx/eggCapTexture.h @@ -43,6 +43,9 @@ public: mCopyFilterArg = filt; } + static const CopyFilter VFILTER_BLUR; + static const CopyFilter VFILTER_OFF; + private: /* 0x18 */ u8 mCapFlags; /* 0x19 */ GXColor mClearColor; diff --git a/src/egg/gfx/eggCapTexture.cpp b/src/egg/gfx/eggCapTexture.cpp index 0847d808..d1194d85 100644 --- a/src/egg/gfx/eggCapTexture.cpp +++ b/src/egg/gfx/eggCapTexture.cpp @@ -6,21 +6,27 @@ #include "rvl/GX/GXPixel.h" #include "rvl/GX/GXTypes.h" +namespace { +static const GXColor DEFUALT_CLEAR_COLOR = {0, 0, 0, 0}; +static const u8 SAMPLE_PATTERN_OFF[12][2] = {}; + +} // namespace namespace EGG { -static const GXColor sBlack = {0, 0, 0, 0}; -static const CopyFilter defaultFilter = { - {0, 0, 1, 0x3F, 0, 0, 0} +const CopyFilter CapTexture::VFILTER_BLUR = { + {0x15, 0, 0, 0x16, 0, 0x15, 0} }; -static const u8 copyArg2[12][2] = {}; +const CopyFilter CapTexture::VFILTER_OFF = { + {0, 0, 1, 0x3F, 0, 0, 0} +}; void CapTexture::configure() { CpuTexture::configure(); mCapFlags = 0; - mClearColor = sBlack; + mClearColor = DEFUALT_CLEAR_COLOR; field_0x20 = 0xFFFFFF; - mCopyFilterArg = defaultFilter; + mCopyFilterArg = VFILTER_OFF; } void CapTexture::capture(u16 x, u16 y, bool upscale, int format) { @@ -32,7 +38,8 @@ void CapTexture::capture(u16 x, u16 y, bool upscale, int format) { GXSetTexCopyDst(mWidth, mHeight, fmt, upscale); GXSetCopyFilter( - 0, copyArg2, (mCapFlags & 8) ? true : false, (mCapFlags & 8) ? mCopyFilterArg.values : defaultFilter.values + 0, SAMPLE_PATTERN_OFF, (mCapFlags & 8) ? true : false, + (mCapFlags & 8) ? mCopyFilterArg.values : VFILTER_OFF.values ); StateGX::ScopedColor colorUpdate((mCapFlags & 1) != 0); @@ -41,7 +48,7 @@ void CapTexture::capture(u16 x, u16 y, bool upscale, int format) { GXSetCopyClear(mClearColor, field_0x20); GXSetCopyClamp(3); StateGX::GXCopyTex_(dataPtr, true); - GXSetCopyFilter(0, copyArg2, 0, defaultFilter.values); + GXSetCopyFilter(0, SAMPLE_PATTERN_OFF, 0, VFILTER_OFF.values); if ((mCapFlags & 0x10) != 0) { GXPixModeSync(); diff --git a/src/egg/gfx/eggPostEffectMaskDOF.cpp b/src/egg/gfx/eggPostEffectMaskDOF.cpp index 06ac1da6..b340038b 100644 --- a/src/egg/gfx/eggPostEffectMaskDOF.cpp +++ b/src/egg/gfx/eggPostEffectMaskDOF.cpp @@ -8,11 +8,15 @@ #include "rvl/GX/GXTypes.h" #include "rvl/MTX/mtx.h" -namespace EGG { +namespace { -static const GXColor sColorNear = (GXColor){0x00, 0xFF, 0x00, 0xFF}; -static const GXColor sColorFar = (GXColor){0xFF, 0x00, 0x00, 0x00}; -static const GXColor sColorCenter = (GXColor){0x00, 0x00, 0x00, 0x00}; +static const GXColor NEAR = (GXColor){0x00, 0xFF, 0x00, 0xFF}; +static const GXColor FAR = (GXColor){0xFF, 0x00, 0x00, 0x00}; +static const GXColor CENTER = (GXColor){0x00, 0x00, 0x00, 0x00}; + +} // namespace + +namespace EGG { PostEffectMaskDOF::PostEffectMaskDOF() : field_0x2C(8), @@ -234,13 +238,13 @@ void PostEffectMaskDOF::setMaterialInternal() { } const GXColor &PostEffectMaskDOF::getNearColor() { - return sColorNear; + return NEAR; } const GXColor &PostEffectMaskDOF::getFarColor() { - return sColorFar; + return FAR; } const GXColor &PostEffectMaskDOF::getCenterColor() { - return sColorCenter; + return CENTER; } } // namespace EGG