diff options
-rw-r--r-- | App/Version.h | 4 | ||||
-rw-r--r-- | Installer/Installer.vdproj | 14 | ||||
-rw-r--r-- | Source/Memory.h | 4 | ||||
-rw-r--r-- | Source/Panel.cpp | 2 | ||||
-rw-r--r-- | Source/Panels.h | 29 | ||||
-rw-r--r-- | Source/Randomizer.cpp | 18 |
6 files changed, 49 insertions, 22 deletions
diff --git a/App/Version.h b/App/Version.h index 32753aa..8068f03 100644 --- a/App/Version.h +++ b/App/Version.h | |||
@@ -4,8 +4,8 @@ | |||
4 | #define TO_STRING(s) TO_STRING2(s) | 4 | #define TO_STRING(s) TO_STRING2(s) |
5 | 5 | ||
6 | #define MAJOR 5 | 6 | #define MAJOR 5 |
7 | #define MINOR 1 | 7 | #define MINOR 2 |
8 | #define PATCH 1 | 8 | #define PATCH 0 |
9 | 9 | ||
10 | #define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) | 10 | #define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) |
11 | #define VERSION MAJOR, MINOR, PATCH | 11 | #define VERSION MAJOR, MINOR, PATCH |
diff --git a/Installer/Installer.vdproj b/Installer/Installer.vdproj index de202fb..e791590 100644 --- a/Installer/Installer.vdproj +++ b/Installer/Installer.vdproj | |||
@@ -44,6 +44,14 @@ | |||
44 | "PrerequisitesLocation" = "2:1" | 44 | "PrerequisitesLocation" = "2:1" |
45 | "Url" = "8:" | 45 | "Url" = "8:" |
46 | "ComponentsUrl" = "8:" | 46 | "ComponentsUrl" = "8:" |
47 | "Items" | ||
48 | { | ||
49 | "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.6.1" | ||
50 | { | ||
51 | "Name" = "8:Microsoft .NET Framework 4.6.1 (x86 and x64)" | ||
52 | "ProductCode" = "8:.NETFramework,Version=v4.6.1" | ||
53 | } | ||
54 | } | ||
47 | } | 55 | } |
48 | } | 56 | } |
49 | "Release" | 57 | "Release" |
@@ -154,15 +162,15 @@ | |||
154 | { | 162 | { |
155 | "Name" = "8:Microsoft Visual Studio" | 163 | "Name" = "8:Microsoft Visual Studio" |
156 | "ProductName" = "8:Witness Randomizer" | 164 | "ProductName" = "8:Witness Randomizer" |
157 | "ProductCode" = "8:{BF672BB2-4FD0-44B6-B279-C5F7346649DC}" | 165 | "ProductCode" = "8:{5A3C6188-EA4B-4FEE-94EE-BF7D91681792}" |
158 | "PackageCode" = "8:{F55A05A7-103A-4E8D-B88F-94C00188B9A6}" | 166 | "PackageCode" = "8:{E8C66354-4ED4-4958-9D6C-A0DC3BD6C3EA}" |
159 | "UpgradeCode" = "8:{4CB5496B-A47E-41D3-B4A7-677E29AB7513}" | 167 | "UpgradeCode" = "8:{4CB5496B-A47E-41D3-B4A7-677E29AB7513}" |
160 | "AspNetVersion" = "8:2.0.50727.0" | 168 | "AspNetVersion" = "8:2.0.50727.0" |
161 | "RestartWWWService" = "11:FALSE" | 169 | "RestartWWWService" = "11:FALSE" |
162 | "RemovePreviousVersions" = "11:TRUE" | 170 | "RemovePreviousVersions" = "11:TRUE" |
163 | "DetectNewerInstalledVersion" = "11:TRUE" | 171 | "DetectNewerInstalledVersion" = "11:TRUE" |
164 | "InstallAllUsers" = "11:FALSE" | 172 | "InstallAllUsers" = "11:FALSE" |
165 | "ProductVersion" = "8:5.1.1" | 173 | "ProductVersion" = "8:5.2.0" |
166 | "Manufacturer" = "8:jbzdarkid" | 174 | "Manufacturer" = "8:jbzdarkid" |
167 | "ARPHELPTELEPHONE" = "8:" | 175 | "ARPHELPTELEPHONE" = "8:" |
168 | "ARPHELPLINK" = "8:https://www.github.com/jbzdarkid/witness-randomizer/issues" | 176 | "ARPHELPLINK" = "8:https://www.github.com/jbzdarkid/witness-randomizer/issues" |
diff --git a/Source/Memory.h b/Source/Memory.h index 6e0c7b1..c19d92b 100644 --- a/Source/Memory.h +++ b/Source/Memory.h | |||
@@ -5,8 +5,8 @@ | |||
5 | #include <vector> | 5 | #include <vector> |
6 | #include <windows.h> | 6 | #include <windows.h> |
7 | 7 | ||
8 | #define GLOBALS 0x5B28C0 | 8 | // #define GLOBALS 0x5B28C0 |
9 | // #define GLOBALS 0x62D0A0 | 9 | #define GLOBALS 0x62D0A0 |
10 | 10 | ||
11 | #define HEARTBEAT 0x401 | 11 | #define HEARTBEAT 0x401 |
12 | enum class ProcStatus { | 12 | enum class ProcStatus { |
diff --git a/Source/Panel.cpp b/Source/Panel.cpp index ea65142..43e9763 100644 --- a/Source/Panel.cpp +++ b/Source/Panel.cpp | |||
@@ -4,6 +4,8 @@ | |||
4 | #include "Randomizer.h" | 4 | #include "Randomizer.h" |
5 | #include <sstream> | 5 | #include <sstream> |
6 | 6 | ||
7 | #pragma warning (disable:26451) | ||
8 | |||
7 | template <class T> | 9 | template <class T> |
8 | int find(const std::vector<T> &data, T search, size_t startIndex = 0) { | 10 | int find(const std::vector<T> &data, T search, size_t startIndex = 0) { |
9 | for (size_t i=startIndex ; i<data.size(); i++) { | 11 | for (size_t i=startIndex ; i<data.size(); i++) { |
diff --git a/Source/Panels.h b/Source/Panels.h index 5b4e085..7959e21 100644 --- a/Source/Panels.h +++ b/Source/Panels.h | |||
@@ -544,7 +544,6 @@ std::vector<int> junglePanels = { | |||
544 | 0x03616, // Jungle Laser | 544 | 0x03616, // Jungle Laser |
545 | }; | 545 | }; |
546 | 546 | ||
547 | |||
548 | std::vector<int> audiologs = { | 547 | std::vector<int> audiologs = { |
549 | 0x3C0F7, // Boat Treehouse Rock | 548 | 0x3C0F7, // Boat Treehouse Rock |
550 | 0x3C0FD, // Boat Broken Boat | 549 | 0x3C0FD, // Boat Broken Boat |
@@ -610,6 +609,22 @@ std::vector<int> audiologs = { | |||
610 | // 0x338CA, // UTM Invisible Dots | 609 | // 0x338CA, // UTM Invisible Dots |
611 | }; | 610 | }; |
612 | 611 | ||
612 | std::vector<int> orchard { | ||
613 | 0x00143, // Orchard Apple Tree 1 | ||
614 | 0x0003B, // Orchard Apple Tree 2 | ||
615 | 0x00055, // Orchard Apple Tree 3 | ||
616 | 0x032F7, // Orchard Apple Tree 4 | ||
617 | 0x032FF, // Orchard Apple Tree 5 | ||
618 | }; | ||
619 | |||
620 | std::vector<int> transparent { | ||
621 | 0x009B8, // Symmetry Island Transparent 1 | ||
622 | 0x003E8, // Symmetry Island Transparent 2 | ||
623 | 0x00A15, // Symmetry Island Transparent 3 | ||
624 | 0x00B53, // Symmetry Island Transparent 4 | ||
625 | 0x00B8D, // Symmetry Island Transparent 5 | ||
626 | }; | ||
627 | |||
613 | // There might be something to do with these, I haven't decided yet. | 628 | // There might be something to do with these, I haven't decided yet. |
614 | std::vector<int> nothingPanels = { | 629 | std::vector<int> nothingPanels = { |
615 | // Doors & Shortcuts & Shortcut doors & Door controls | 630 | // Doors & Shortcuts & Shortcut doors & Door controls |
@@ -671,18 +686,6 @@ std::vector<int> nothingPanels = { | |||
671 | 0x09DB8, // Swamp Summon Boat | 686 | 0x09DB8, // Swamp Summon Boat |
672 | 0x17CDF, // Jungle Summon Boat | 687 | 0x17CDF, // Jungle Summon Boat |
673 | 688 | ||
674 | // Identical sets | ||
675 | 0x00143, // Orchard Apple Tree 1 | ||
676 | 0x0003B, // Orchard Apple Tree 2 | ||
677 | 0x00055, // Orchard Apple Tree 3 | ||
678 | 0x032F7, // Orchard Apple Tree 4 | ||
679 | 0x032FF, // Orchard Apple Tree 5 | ||
680 | 0x009B8, // Symmetry Island Transparent 1 | ||
681 | 0x003E8, // Symmetry Island Transparent 2 | ||
682 | 0x00A15, // Symmetry Island Transparent 3 | ||
683 | 0x00B53, // Symmetry Island Transparent 4 | ||
684 | 0x00B8D, // Symmetry Island Transparent 5 | ||
685 | |||
686 | // Misc | 689 | // Misc |
687 | 0x03629, // Tutorial Gate Open | 690 | 0x03629, // Tutorial Gate Open |
688 | 0x09FAA, // Desert Lightswitch | 691 | 0x09FAA, // Desert Lightswitch |
diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp index 9b877cd..14583f8 100644 --- a/Source/Randomizer.cpp +++ b/Source/Randomizer.cpp | |||
@@ -139,18 +139,18 @@ void Randomizer::Randomize() { | |||
139 | 139 | ||
140 | // Individual area modifications | 140 | // Individual area modifications |
141 | RandomizeTutorial(); | 141 | RandomizeTutorial(); |
142 | RandomizeSymmetry(); | ||
143 | RandomizeDesert(); | 142 | RandomizeDesert(); |
144 | RandomizeQuarry(); | 143 | RandomizeQuarry(); |
145 | RandomizeTreehouse(); | 144 | RandomizeTreehouse(); |
146 | RandomizeKeep(); | 145 | RandomizeKeep(); |
147 | RandomizeShadows(); | 146 | RandomizeShadows(); |
148 | RandomizeTown(); | ||
149 | RandomizeMonastery(); | 147 | RandomizeMonastery(); |
150 | RandomizeBunker(); | 148 | RandomizeBunker(); |
151 | RandomizeJungle(); | 149 | RandomizeJungle(); |
152 | RandomizeSwamp(); | 150 | RandomizeSwamp(); |
153 | RandomizeMountain(); | 151 | RandomizeMountain(); |
152 | RandomizeTown(); | ||
153 | RandomizeSymmetry(); | ||
154 | // RandomizeAudioLogs(); | 154 | // RandomizeAudioLogs(); |
155 | } | 155 | } |
156 | 156 | ||
@@ -188,6 +188,10 @@ void Randomizer::RandomizeTutorial() { | |||
188 | } | 188 | } |
189 | 189 | ||
190 | void Randomizer::RandomizeSymmetry() { | 190 | void Randomizer::RandomizeSymmetry() { |
191 | std::vector<int> randomOrder(transparent.size(), 0); | ||
192 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | ||
193 | RandomizeRange(randomOrder, SWAP::NONE, 1, 5); | ||
194 | ReassignTargets(transparent, randomOrder); | ||
191 | } | 195 | } |
192 | 196 | ||
193 | void Randomizer::RandomizeDesert() { | 197 | void Randomizer::RandomizeDesert() { |
@@ -238,6 +242,16 @@ void Randomizer::RandomizeShadows() { | |||
238 | } | 242 | } |
239 | 243 | ||
240 | void Randomizer::RandomizeTown() { | 244 | void Randomizer::RandomizeTown() { |
245 | // @Hack...? To open the gate at the end | ||
246 | std::vector<int> randomOrder(orchard.size() + 1, 0); | ||
247 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | ||
248 | RandomizeRange(randomOrder, SWAP::NONE, 1, 5); | ||
249 | // Ensure that we open the gate before the final puzzle (by swapping) | ||
250 | int panel3Index = find(randomOrder, 3); | ||
251 | int panel4Index = find(randomOrder, 4); | ||
252 | randomOrder[min(panel3Index, panel4Index)] = 3; | ||
253 | randomOrder[max(panel3Index, panel4Index)] = 4; | ||
254 | ReassignTargets(orchard, randomOrder); | ||
241 | } | 255 | } |
242 | 256 | ||
243 | void Randomizer::RandomizeMonastery() { | 257 | void Randomizer::RandomizeMonastery() { |