Skip to content

Commit

Permalink
[Shadow Gens] Always Use Movie Shadow Skin: fix missing assets and RH…
Browse files Browse the repository at this point in the history
…1 softlock
  • Loading branch information
hyperbx committed Dec 14, 2024
1 parent ab57480 commit d49e5d0
Showing 1 changed file with 34 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
Patch "Always Use Movie Shadow Skin (experimental)" in "Gameplay" by "Hyper & angryzor" does
Patch "Always Use Movie Shadow Skin (experimental)" in "Gameplay" by "Hyper" does
/*
Always uses the Movie Shadow skin across the game.

Notes;
- This requires the Sonic the Hedgehog 3 Movie Pack DLC.

Known issues;
- Stage-specific animations and cutscenes outside of the Tokyo mission will not be animated properly.
- All animations and cutscenes that are not used by the Tokyo mission will not be animated properly.
- Swing poles are unusable.
*/
{
WriteAsmHook
(
$@"
mov al, 2
ret
",
long[] addrs =
{
/* v1.10.0.0: 0x1406836D9 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x44\x0F\xB6\xE0\x3C\x02", "x????xxxxxx"),
/* v1.10.0.0: 0x14011785D */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x88\x85\x40\x01\x00\x00", "x????xxxxxx"),
/* v1.10.0.0: 0x1400FF474 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x0F\xBE\xD0\x33\xC9", "x????xxxxx"),
/* v1.10.0.0: 0x140180D11 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x3C\x02\x0F\x85\xBC\x01\x00\x00", "x????xxxxxxxx"),
/* v1.10.0.0: 0x140180EE0 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x3C\x02\x0F\x85\xFC\x05\x00\x00", "x????xxxxxxxx"),
/* v1.10.0.0: 0x14A93E2F3 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x31\xDB\x3C\x02\x0F\x85\x80\x00\x00\x00", "x????xxxxxxxxxx"),
/* v1.10.0.0: 0x1407EB9AB */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x84\xC0\x41\x0F\x95\xC7", "x????xxxxxx"),
/* v1.10.0.0: 0x14B5ACCE4 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x66\x89\x0D\xCC\xCC\xCC\xCC\x3C\x01", "x????xxx????xx"),
/* v1.10.0.0: 0x14060DC48 */ ScanSignature("\xE8\xCC\xCC\xCC\xCC\x88\x45\x67\xC6\x45\x77\x01", "x????xxxxxxx")
};

var asm = Assemble("mov al, 2; nop; nop; nop");

/* v1.10.0.0: 0x146AF7E00 */
foreach (var addr in addrs)
WriteProtected<byte>(addr, asm);

// Force load Movie Shadow resources.
WriteNop
(
/* v1.10.0.0: 0x1401806D0 */
ScanSignature
(
"\x40\x53\x48\x83\xEC\x20\x48\x89\xCB\xE8\xCC\xCC\xCC\xCC\x48\x89\xC2\x48\x89\xD9\xE8\xCC\xCC\xCC\xCC\x48\x85\xC0\x74\x15",
"xxxxxxxxxx????xxxxxxx????xxxxx"
"\x0F\x84\x13\x0E\x00\x00\x49\x8B\xCE",
"xxxxxxxxx"
),

HookBehavior.Replace
6
);

WriteProtected<byte>

// Disable Movie Shadow grind rail code.
Memory.WriteForceJump
(
/* v1.10.0.0: 0x14060E211 */
/* v1.10.0.0: 0x1406F10CA */
ScanSignature
(
"\x75\x55\x45\x33\xC0",
"xxxxx"
),

0xEB
"\x0F\x84\x38\x01\x00\x00\x48\x8D\x54\x24\x30",
"xxxxxxxxxxx"
)
);
}

0 comments on commit d49e5d0

Please sign in to comment.