Skip to content

Commit

Permalink
[Sonic Lost World] Make "Fix Depth of Field Draw Order" respect the S…
Browse files Browse the repository at this point in the history
…cene Effect option as well
  • Loading branch information
DeaTh-G committed Feb 26, 2024
1 parent 52e414f commit d7a0299
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Patch "Fix Depth of Field Draw Order" in "Fixes/Graphics" by "Sajid" does "Changes the pseudo-dof implementation of the game into the proper one seen on Wii U."
Patch "Fix Depth of Field Draw Order" in "Fixes/Graphics" by "Sajid & ĐeäTh" does "Changes the pseudo-dof implementation of the game into the proper one seen on Wii U."
static int p_DofRes = (int)ASLR(0x00FEFC7C);
static int p_GrassRes = (int)ASLR(0x00FB6D1C);
static int p_ShadowRes = (int)ASLR(0x00FB6D1D);
static int p_RetAddress = (int)ASLR(0x00904E94);

WriteAsmHook
(
$@"mov BYTE PTR [edi+28Ch], 0
movzx eax,byte ptr [{p_DofRes}]
$@"mov al, byte ptr [edi+28Ch]
mov dl, [{p_DofRes}]
and al, dl
mov [edi+28Ch], al
cmp byte ptr [{p_GrassRes}], 0
sete cl
Expand Down

0 comments on commit d7a0299

Please sign in to comment.