diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/ChallengeRandomizer.cpp | 4 | ||||
-rw-r--r-- | Source/Memory.h | 4 | ||||
-rw-r--r-- | Source/Panels.h | 8 | ||||
-rw-r--r-- | Source/Randomizer.cpp | 4 | ||||
-rw-r--r-- | Source/Randomizer.h | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/Source/ChallengeRandomizer.cpp b/Source/ChallengeRandomizer.cpp index fcd4e4a..1ecfdd3 100644 --- a/Source/ChallengeRandomizer.cpp +++ b/Source/ChallengeRandomizer.cpp | |||
@@ -94,8 +94,8 @@ ChallengeRandomizer::ChallengeRandomizer(const std::shared_ptr<Memory>& memory, | |||
94 | }); | 94 | }); |
95 | // Entity_Record_Player::reroll_lotus_eater_stuff | 95 | // Entity_Record_Player::reroll_lotus_eater_stuff |
96 | _memory->AddSigScan({0xB8, 0xAB, 0xAA, 0xAA, 0xAA, 0x41, 0xC1, 0xE8}, [&](int index) { | 96 | _memory->AddSigScan({0xB8, 0xAB, 0xAA, 0xAA, 0xAA, 0x41, 0xC1, 0xE8}, [&](int index) { |
97 | AdjustRng(index - 0x52); | 97 | AdjustRng(index - 0x13); |
98 | AdjustRng(index - 0xB); | 98 | AdjustRng(index + 0x34); |
99 | }); | 99 | }); |
100 | 100 | ||
101 | // These disable the random locations on timer panels, which would otherwise increment the RNG. | 101 | // These disable the random locations on timer panels, which would otherwise increment the RNG. |
diff --git a/Source/Memory.h b/Source/Memory.h index fa9eb60..fad6a38 100644 --- a/Source/Memory.h +++ b/Source/Memory.h | |||
@@ -4,8 +4,8 @@ | |||
4 | #include <vector> | 4 | #include <vector> |
5 | #include <windows.h> | 5 | #include <windows.h> |
6 | 6 | ||
7 | // #define GLOBALS 0x5B28C0 | 7 | #define GLOBALS 0x5B28C0 |
8 | #define GLOBALS 0x62A080 | 8 | // #define GLOBALS 0x62A080 |
9 | 9 | ||
10 | // https://github.com/erayarslan/WriteProcessMemory-Example | 10 | // https://github.com/erayarslan/WriteProcessMemory-Example |
11 | // http://stackoverflow.com/q/32798185 | 11 | // http://stackoverflow.com/q/32798185 |
diff --git a/Source/Panels.h b/Source/Panels.h index 85fa28b..9eb1a8e 100644 --- a/Source/Panels.h +++ b/Source/Panels.h | |||
@@ -92,11 +92,11 @@ std::vector<int> challengePanels = { | |||
92 | 0x00CDB, // Challenge Column Top Left | 92 | 0x00CDB, // Challenge Column Top Left |
93 | 0x00CD4, // Challenge Column Far Panel | 93 | 0x00CD4, // Challenge Column Far Panel |
94 | 0x00C80, // Challenge Triple 1 Left | 94 | 0x00C80, // Challenge Triple 1 Left |
95 | // 0x00CA1, // Challenge Triple 1 Center | 95 | 0x00CA1, // Challenge Triple 1 Center |
96 | // 0x00CB9, // Challenge Triple 1 Right | 96 | 0x00CB9, // Challenge Triple 1 Right |
97 | 0x00C22, // Challenge Triple 2 Left | 97 | 0x00C22, // Challenge Triple 2 Left |
98 | // 0x00C59, // Challenge Triple 2 Center | 98 | 0x00C59, // Challenge Triple 2 Center |
99 | // 0x00C68, // Challenge Triple 2 Right | 99 | 0x00C68, // Challenge Triple 2 Right |
100 | // 0x04CB3, // Challenge Left Timer | 100 | // 0x04CB3, // Challenge Left Timer |
101 | // 0x04CB5, // Challenge Middle Timer | 101 | // 0x04CB5, // Challenge Middle Timer |
102 | // 0x04CB6, // Challenge Right Timer | 102 | // 0x04CB6, // Challenge Right Timer |
diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp index 3078b22..baae8c3 100644 --- a/Source/Randomizer.cpp +++ b/Source/Randomizer.cpp | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | * Speed up *everything* ? Or maybe we'll just stop using this setting entirely. | 8 | * Speed up *everything* ? Or maybe we'll just stop using this setting entirely. |
9 | 9 | ||
10 | * Disable "power off on fail" for challenge | ||
11 | * Add setting for "Don't reset the challenge seed on new challenge" | 10 | * Add setting for "Don't reset the challenge seed on new challenge" |
12 | * Don't rerandomize anything outside of challenge on re-click | 11 | * Don't rerandomize anything outside of challenge on re-click |
13 | * Change re-randomization prevention? | 12 | * Change re-randomization prevention? |
@@ -234,6 +233,9 @@ void Randomizer::RandomizeMountain() { | |||
234 | 233 | ||
235 | void Randomizer::RandomizeChallenge() { | 234 | void Randomizer::RandomizeChallenge() { |
236 | ChallengeRandomizer cr(_memory, Random::RandInt(1, 0x7FFFFFFF)); // 0 will trigger an "RNG not initialized" block | 235 | ChallengeRandomizer cr(_memory, Random::RandInt(1, 0x7FFFFFFF)); // 0 will trigger an "RNG not initialized" block |
236 | for (int panel : challengePanels) { | ||
237 | _memory->WritePanelData<int>(panel, POWER_OFF_ON_FAIL, {0}); | ||
238 | } | ||
237 | } | 239 | } |
238 | 240 | ||
239 | void Randomizer::RandomizeAudioLogs() { | 241 | void Randomizer::RandomizeAudioLogs() { |
diff --git a/Source/Randomizer.h b/Source/Randomizer.h index c0b2d87..aeccbeb 100644 --- a/Source/Randomizer.h +++ b/Source/Randomizer.h | |||
@@ -76,6 +76,7 @@ private: | |||
76 | #define AUDIO_PREFIX 0x278 | 76 | #define AUDIO_PREFIX 0x278 |
77 | #define POWER 0x2A8 | 77 | #define POWER 0x2A8 |
78 | #define TARGET 0x2BC | 78 | #define TARGET 0x2BC |
79 | #define POWER_OFF_ON_FAIL 0x2C0 | ||
79 | #define IS_CYLINDER 0x2FC | 80 | #define IS_CYLINDER 0x2FC |
80 | #define CYLINDER_Z0 0x300 | 81 | #define CYLINDER_Z0 0x300 |
81 | #define CYLINDER_Z1 0x304 | 82 | #define CYLINDER_Z1 0x304 |
@@ -142,6 +143,7 @@ private: | |||
142 | #define AUDIO_PREFIX 0x270 | 143 | #define AUDIO_PREFIX 0x270 |
143 | #define POWER 0x2A0 | 144 | #define POWER 0x2A0 |
144 | #define TARGET 0x2B4 | 145 | #define TARGET 0x2B4 |
146 | #define POWER_OFF_ON_FAIL 0x2B8 | ||
145 | #define IS_CYLINDER 0x2F4 | 147 | #define IS_CYLINDER 0x2F4 |
146 | #define CYLINDER_Z0 0x2F8 | 148 | #define CYLINDER_Z0 0x2F8 |
147 | #define CYLINDER_Z1 0x2FC | 149 | #define CYLINDER_Z1 0x2FC |