File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,21 @@ void SetMSAALevel(PPCRegister& val)
66 val.u32 = 0 ;
77}
88
9+ std::string g_blockName;
10+
11+ void BeginBlock (PPCRegister& name)
12+ {
13+ auto pName = xpointer (reinterpret_cast <char *>(name.u32 ));
14+ g_blockName = std::string (pName.get ());
15+ }
16+
17+ // Blocks can be nested, so this is actually
18+ // incorrect, but we only care about one that isn't
19+ void EndBlock ()
20+ {
21+ g_blockName.clear ();
22+ }
23+
924float ReflectionScaleFactor (EReflectionResolution ref) {
1025 switch (ref) {
1126 case EReflectionResolution::Eighth:
@@ -35,6 +50,13 @@ PPC_FUNC(sub_82619D00)
3550 ReflectionScaleFactor (Config::ReflectionResolution));
3651 }
3752
53+ // RenderMefiress
54+ if (*pName == " user0" )
55+ {
56+ ctx.r5 .u32 = (int32_t )Config::ShadowResolution.Value ;
57+ ctx.r6 .u32 = (int32_t )Config::ShadowResolution.Value ;
58+ }
59+
3860 __imp__sub_82619D00 (ctx, base);
3961}
4062
@@ -56,6 +78,13 @@ PPC_FUNC(sub_82619B88)
5678 ctx.r5 .u32 ++;
5779 }
5880
81+ // RenderMefiress
82+ if (*pName == " depthstencil_256" && g_blockName == " user0" )
83+ {
84+ ctx.r5 .u32 = (int32_t )Config::ShadowResolution.Value ;
85+ ctx.r6 .u32 = (int32_t )Config::ShadowResolution.Value ;
86+ }
87+
5988 __imp__sub_82619B88 (ctx, base);
6089}
6190
Original file line number Diff line number Diff line change @@ -263,3 +263,12 @@ registers = ["r8"]
263263name = " MovieVoiceLang"
264264address = 0x8264B4E4
265265registers = [" r19" ]
266+
267+ [[midasm_hook ]]
268+ name = " BeginBlock"
269+ address = 0x82607854
270+ registers = [" r4" ]
271+
272+ [[midasm_hook ]]
273+ name = " EndBlock"
274+ address = 0x826078D8
You can’t perform that action at this time.
0 commit comments