From 3a03f478e407f35bfafd192c22f82bc8c6e25a38 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Wed, 6 Nov 2019 09:19:21 -0800 Subject: And... it works? --- Source/ChallengeRandomizer.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'Source/ChallengeRandomizer.cpp') diff --git a/Source/ChallengeRandomizer.cpp b/Source/ChallengeRandomizer.cpp index fa9a234..de08885 100644 --- a/Source/ChallengeRandomizer.cpp +++ b/Source/ChallengeRandomizer.cpp @@ -1,7 +1,7 @@ #include "ChallengeRandomizer.h" #include -// Reads the (relative!) address of the RNG, then shifts it to point at RNG2 +// Modify an opcode to use RNG2 instead of main RNG void ChallengeRandomizer::AdjustRng(int offset) { int currentRng = _memory->ReadData({offset}, 0x1)[0]; _memory->WriteData({offset}, {currentRng + 0x20}); @@ -39,22 +39,6 @@ ChallengeRandomizer::ChallengeRandomizer(const std::shared_ptr& memory, }); if (!alreadyInjected) { - // reveal_exit_hall - _memory->AddSigScan({0x45, 0x8B, 0xF7, 0x48, 0x8B, 0x4D}, [&](int index){ - _memory->WriteData({index + 0x15}, {0xEB}); - }); - - // begin_endgame_1 - _memory->AddSigScan({0x83, 0x7C, 0x01, 0xD0, 0x04}, [&](int index){ - if (GLOBALS == 0x5B28C0) { // Version differences. - index += 0x75; - } else if (GLOBALS == 0x62D0A0) { - index += 0x86; - } - // Overwriting a 74 12 opcode - _memory->WriteData({index}, {0xEB}); - }); - // shuffle_integers _memory->AddSigScan({0x48, 0x89, 0x5C, 0x24, 0x10, 0x56, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x63, 0xDA, 0x48, 0x8B, 0xF1, 0x83, 0xFB, 0x01}, [&](int index) { AdjustRng(index + 0x23); -- cgit 1.4.1