From d49e5d0023e30e77f3cae3bd1d209d3af246c2cf Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:25:49 +0000 Subject: [PATCH] [Shadow Gens] Always Use Movie Shadow Skin: fix missing assets and RH1 softlock --- ...s Use Movie Shadow Skin (experimental).hmm | 54 ++++++++++++------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/Source/Shadow Generations/Gameplay/Always Use Movie Shadow Skin (experimental).hmm b/Source/Shadow Generations/Gameplay/Always Use Movie Shadow Skin (experimental).hmm index 84f2229..e68684f 100644 --- a/Source/Shadow Generations/Gameplay/Always Use Movie Shadow Skin (experimental).hmm +++ b/Source/Shadow Generations/Gameplay/Always Use Movie Shadow Skin (experimental).hmm @@ -1,4 +1,4 @@ -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. @@ -6,35 +6,49 @@ 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(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 + + // 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" + ) ); } \ No newline at end of file