diff options
-rw-r--r-- | App/App.vcxproj | 4 | ||||
-rw-r--r-- | Source/Memory.cpp | 4 | ||||
-rw-r--r-- | Source/Panel.cpp | 25 | ||||
-rw-r--r-- | Source/Panel.h | 1 | ||||
-rw-r--r-- | Source/Random.cpp | 2 | ||||
-rw-r--r-- | Source/Randomizer.cpp | 48 | ||||
-rw-r--r-- | Source/Randomizer.h | 144 | ||||
-rw-r--r-- | Source/RandomizerCore.cpp | 0 | ||||
-rw-r--r-- | Source/RandomizerCore.h | 147 | ||||
-rw-r--r-- | Source/Source.vcxproj | 6 | ||||
-rw-r--r-- | Test/Temp.cpp | 2 | ||||
-rw-r--r-- | Test/Test.vcxproj | 4 |
12 files changed, 196 insertions, 191 deletions
diff --git a/App/App.vcxproj b/App/App.vcxproj index e5d0f94..1633837 100644 --- a/App/App.vcxproj +++ b/App/App.vcxproj | |||
@@ -92,6 +92,7 @@ | |||
92 | <ConformanceMode>true</ConformanceMode> | 92 | <ConformanceMode>true</ConformanceMode> |
93 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 93 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
94 | <LanguageStandard>stdcpp17</LanguageStandard> | 94 | <LanguageStandard>stdcpp17</LanguageStandard> |
95 | <TreatWarningAsError>true</TreatWarningAsError> | ||
95 | </ClCompile> | 96 | </ClCompile> |
96 | <Link> | 97 | <Link> |
97 | <SubSystem>Windows</SubSystem> | 98 | <SubSystem>Windows</SubSystem> |
@@ -109,6 +110,7 @@ | |||
109 | <LanguageStandard>stdcpp17</LanguageStandard> | 110 | <LanguageStandard>stdcpp17</LanguageStandard> |
110 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 111 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
111 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 112 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
113 | <TreatWarningAsError>true</TreatWarningAsError> | ||
112 | </ClCompile> | 114 | </ClCompile> |
113 | <Link> | 115 | <Link> |
114 | <SubSystem>Windows</SubSystem> | 116 | <SubSystem>Windows</SubSystem> |
@@ -127,6 +129,7 @@ | |||
127 | <ConformanceMode>true</ConformanceMode> | 129 | <ConformanceMode>true</ConformanceMode> |
128 | <LanguageStandard>stdcpp17</LanguageStandard> | 130 | <LanguageStandard>stdcpp17</LanguageStandard> |
129 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 131 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
132 | <TreatWarningAsError>true</TreatWarningAsError> | ||
130 | </ClCompile> | 133 | </ClCompile> |
131 | <Link> | 134 | <Link> |
132 | <SubSystem>Windows</SubSystem> | 135 | <SubSystem>Windows</SubSystem> |
@@ -147,6 +150,7 @@ | |||
147 | <ConformanceMode>true</ConformanceMode> | 150 | <ConformanceMode>true</ConformanceMode> |
148 | <LanguageStandard>stdcpp17</LanguageStandard> | 151 | <LanguageStandard>stdcpp17</LanguageStandard> |
149 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 152 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
153 | <TreatWarningAsError>true</TreatWarningAsError> | ||
150 | </ClCompile> | 154 | </ClCompile> |
151 | <Link> | 155 | <Link> |
152 | <SubSystem>Windows</SubSystem> | 156 | <SubSystem>Windows</SubSystem> |
diff --git a/Source/Memory.cpp b/Source/Memory.cpp index 168b4e2..0afeded 100644 --- a/Source/Memory.cpp +++ b/Source/Memory.cpp | |||
@@ -25,7 +25,7 @@ Memory::Memory(const std::string& processName) { | |||
25 | // Next, get the process base address | 25 | // Next, get the process base address |
26 | DWORD numModules; | 26 | DWORD numModules; |
27 | std::vector<HMODULE> moduleList(1024); | 27 | std::vector<HMODULE> moduleList(1024); |
28 | EnumProcessModulesEx(_handle, &moduleList[0], moduleList.size(), &numModules, 3); | 28 | EnumProcessModulesEx(_handle, &moduleList[0], static_cast<DWORD>(moduleList.size()), &numModules, 3); |
29 | 29 | ||
30 | std::string name(64, 0); | 30 | std::string name(64, 0); |
31 | for (DWORD i = 0; i < numModules / sizeof(HMODULE); i++) { | 31 | for (DWORD i = 0; i < numModules / sizeof(HMODULE); i++) { |
@@ -49,7 +49,7 @@ Memory::~Memory() { | |||
49 | 49 | ||
50 | void Memory::ThrowError() { | 50 | void Memory::ThrowError() { |
51 | std::string message(256, '\0'); | 51 | std::string message(256, '\0'); |
52 | FormatMessageA(4096, nullptr, GetLastError(), 1024, &message[0], message.length(), nullptr); | 52 | FormatMessageA(4096, nullptr, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.length()), nullptr); |
53 | std::cout << message.c_str() << std::endl; | 53 | std::cout << message.c_str() << std::endl; |
54 | exit(EXIT_FAILURE); | 54 | exit(EXIT_FAILURE); |
55 | } | 55 | } |
diff --git a/Source/Panel.cpp b/Source/Panel.cpp index 14f803c..8642461 100644 --- a/Source/Panel.cpp +++ b/Source/Panel.cpp | |||
@@ -1,12 +1,13 @@ | |||
1 | #include "Panel.h" | 1 | #include "Panel.h" |
2 | #include "Random.h" | 2 | #include "Random.h" |
3 | #include "Memory.h" | 3 | #include "Memory.h" |
4 | #include "Randomizer.h" | ||
4 | #include <sstream> | 5 | #include <sstream> |
5 | 6 | ||
6 | template <class T> | 7 | template <class T> |
7 | int find(const std::vector<T> &data, T search, size_t startIndex = 0) { | 8 | int find(const std::vector<T> &data, T search, size_t startIndex = 0) { |
8 | for (size_t i=startIndex ; i<data.size(); i++) { | 9 | for (size_t i=startIndex ; i<data.size(); i++) { |
9 | if (data[i] == search) return i; | 10 | if (data[i] == search) return static_cast<int>(i); |
10 | } | 11 | } |
11 | return -1; | 12 | return -1; |
12 | } | 13 | } |
@@ -167,8 +168,8 @@ void Panel::WriteIntersections(int id) { | |||
167 | 168 | ||
168 | for (int y=0; y<_height; y++) { | 169 | for (int y=0; y<_height; y++) { |
169 | for (int x=0; x<_width; x++) { | 170 | for (int x=0; x<_width; x++) { |
170 | intersections.push_back(min + x * width_interval); | 171 | intersections.push_back(static_cast<float>(min + x * width_interval)); |
171 | intersections.push_back(min + y * height_interval); | 172 | intersections.push_back(static_cast<float>(min + y * height_interval)); |
172 | int flags = 0; | 173 | int flags = 0; |
173 | if (find(_startpoints, {x, y}) != -1) flags |= IntersectionFlags::IS_STARTPOINT; | 174 | if (find(_startpoints, {x, y}) != -1) flags |= IntersectionFlags::IS_STARTPOINT; |
174 | intersectionFlags.push_back(flags); | 175 | intersectionFlags.push_back(flags); |
@@ -184,22 +185,22 @@ void Panel::WriteIntersections(int id) { | |||
184 | } | 185 | } |
185 | 186 | ||
186 | for (Endpoint endpoint : _endpoints) { | 187 | for (Endpoint endpoint : _endpoints) { |
187 | float xPos = min + endpoint.GetX() * width_interval; | 188 | double xPos = min + endpoint.GetX() * width_interval; |
188 | float yPos = min + endpoint.GetY() * height_interval; | 189 | double yPos = min + endpoint.GetY() * height_interval; |
189 | if (endpoint.GetDir()== Endpoint::Direction::LEFT) { | 190 | if (endpoint.GetDir()== Endpoint::Direction::LEFT) { |
190 | xPos -= .05f; | 191 | xPos -= .05; |
191 | } else if (endpoint.GetDir() == Endpoint::Direction::RIGHT) { | 192 | } else if (endpoint.GetDir() == Endpoint::Direction::RIGHT) { |
192 | xPos += .05f; | 193 | xPos += .05; |
193 | } else if (endpoint.GetDir() == Endpoint::Direction::UP) { | 194 | } else if (endpoint.GetDir() == Endpoint::Direction::UP) { |
194 | yPos += .05f; // Y position goes from 0 (bottom) to 1 (top), so this is reversed. | 195 | yPos += .05; // Y position goes from 0 (bottom) to 1 (top), so this is reversed. |
195 | } else if (endpoint.GetDir() == Endpoint::Direction::DOWN) { | 196 | } else if (endpoint.GetDir() == Endpoint::Direction::DOWN) { |
196 | yPos -= .05f; | 197 | yPos -= .05; |
197 | } | 198 | } |
198 | intersections.push_back(xPos); | 199 | intersections.push_back(static_cast<float>(xPos)); |
199 | intersections.push_back(yPos); | 200 | intersections.push_back(static_cast<float>(yPos)); |
200 | 201 | ||
201 | connections.first.push_back(endpoint.GetY() * _width + endpoint.GetX()); // Target to connect to | 202 | connections.first.push_back(endpoint.GetY() * _width + endpoint.GetX()); // Target to connect to |
202 | connections.second.push_back(intersectionFlags.size()); // This endpoint | 203 | connections.second.push_back(static_cast<int>(intersectionFlags.size())); // This endpoint |
203 | intersectionFlags.push_back(IntersectionFlags::IS_ENDPOINT); | 204 | intersectionFlags.push_back(IntersectionFlags::IS_ENDPOINT); |
204 | } | 205 | } |
205 | 206 | ||
diff --git a/Source/Panel.h b/Source/Panel.h index 4f3ab11..f4f4080 100644 --- a/Source/Panel.h +++ b/Source/Panel.h | |||
@@ -1,6 +1,5 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | #include "json.hpp" | 2 | #include "json.hpp" |
3 | #include "RandomizerCore.h" | ||
4 | #include "Memory.h" | 3 | #include "Memory.h" |
5 | 4 | ||
6 | class Decoration | 5 | class Decoration |
diff --git a/Source/Random.cpp b/Source/Random.cpp index d8f5eb2..d6e86a6 100644 --- a/Source/Random.cpp +++ b/Source/Random.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <chrono> | 1 | #include <chrono> |
2 | #include "Random.h" | 2 | #include "Random.h" |
3 | 3 | ||
4 | int Random::s_seed = time(nullptr); // Seed from the time in milliseconds | 4 | int Random::s_seed = static_cast<int>(time(nullptr)); // Seed from the time in milliseconds |
5 | 5 | ||
6 | void Random::SetSeed(int seed) { | 6 | void Random::SetSeed(int seed) { |
7 | s_seed = seed; | 7 | s_seed = seed; |
diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp index aaddf21..ce784be 100644 --- a/Source/Randomizer.cpp +++ b/Source/Randomizer.cpp | |||
@@ -21,7 +21,7 @@ | |||
21 | template <class T> | 21 | template <class T> |
22 | int find(const std::vector<T> &data, T search, size_t startIndex = 0) { | 22 | int find(const std::vector<T> &data, T search, size_t startIndex = 0) { |
23 | for (size_t i=startIndex ; i<data.size(); i++) { | 23 | for (size_t i=startIndex ; i<data.size(); i++) { |
24 | if (data[i] == search) return i; | 24 | if (data[i] == search) return static_cast<int>(i); |
25 | } | 25 | } |
26 | std::cout << "Couldn't find " << search << " in data!" << std::endl; | 26 | std::cout << "Couldn't find " << search << " in data!" << std::endl; |
27 | exit(-1); | 27 | exit(-1); |
@@ -44,10 +44,10 @@ void Randomizer::Randomize() | |||
44 | _lastRandomizedFrame = GetCurrentFrame(); | 44 | _lastRandomizedFrame = GetCurrentFrame(); |
45 | 45 | ||
46 | // Content swaps -- must happen before squarePanels | 46 | // Content swaps -- must happen before squarePanels |
47 | Randomize(upDownPanels, SWAP_LINES); | 47 | Randomize(upDownPanels, SWAP::LINES); |
48 | Randomize(leftForwardRightPanels, SWAP_LINES); | 48 | Randomize(leftForwardRightPanels, SWAP::LINES); |
49 | 49 | ||
50 | Randomize(squarePanels, SWAP_LINES); | 50 | Randomize(squarePanels, SWAP::LINES); |
51 | 51 | ||
52 | // Individual area modifications | 52 | // Individual area modifications |
53 | RandomizeTutorial(); | 53 | RandomizeTutorial(); |
@@ -88,7 +88,7 @@ void Randomizer::RandomizeSymmetry() { | |||
88 | } | 88 | } |
89 | 89 | ||
90 | void Randomizer::RandomizeDesert() { | 90 | void Randomizer::RandomizeDesert() { |
91 | Randomize(desertPanels, SWAP_LINES); | 91 | Randomize(desertPanels, SWAP::LINES); |
92 | 92 | ||
93 | // Turn off desert surface 8 | 93 | // Turn off desert surface 8 |
94 | _memory->WritePanelData<float>(0x09F94, POWER, {0.0, 0.0}); | 94 | _memory->WritePanelData<float>(0x09F94, POWER, {0.0, 0.0}); |
@@ -126,9 +126,9 @@ void Randomizer::RandomizeShadows() { | |||
126 | 126 | ||
127 | std::vector<int> randomOrder(shadowsPanels.size(), 0); | 127 | std::vector<int> randomOrder(shadowsPanels.size(), 0); |
128 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | 128 | std::iota(randomOrder.begin(), randomOrder.end(), 0); |
129 | RandomizeRange(randomOrder, SWAP_NONE, 0, 8); // Tutorial | 129 | RandomizeRange(randomOrder, SWAP::NONE, 0, 8); // Tutorial |
130 | RandomizeRange(randomOrder, SWAP_NONE, 8, 16); // Avoid | 130 | RandomizeRange(randomOrder, SWAP::NONE, 8, 16); // Avoid |
131 | RandomizeRange(randomOrder, SWAP_NONE, 16, 21); // Follow | 131 | RandomizeRange(randomOrder, SWAP::NONE, 16, 21); // Follow |
132 | ReassignTargets(shadowsPanels, randomOrder); | 132 | ReassignTargets(shadowsPanels, randomOrder); |
133 | // Turn off original starting panel | 133 | // Turn off original starting panel |
134 | _memory->WritePanelData<float>(shadowsPanels[0], POWER, {0.0f, 0.0f}); | 134 | _memory->WritePanelData<float>(shadowsPanels[0], POWER, {0.0f, 0.0f}); |
@@ -142,7 +142,7 @@ void Randomizer::RandomizeTown() { | |||
142 | void Randomizer::RandomizeMonastery() { | 142 | void Randomizer::RandomizeMonastery() { |
143 | std::vector<int> randomOrder(monasteryPanels.size(), 0); | 143 | std::vector<int> randomOrder(monasteryPanels.size(), 0); |
144 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | 144 | std::iota(randomOrder.begin(), randomOrder.end(), 0); |
145 | RandomizeRange(randomOrder, SWAP_NONE, 3, 9); // Outer 2 & 3, Inner 1-4 | 145 | RandomizeRange(randomOrder, SWAP::NONE, 3, 9); // Outer 2 & 3, Inner 1-4 |
146 | ReassignTargets(monasteryPanels, randomOrder); | 146 | ReassignTargets(monasteryPanels, randomOrder); |
147 | } | 147 | } |
148 | 148 | ||
@@ -152,10 +152,10 @@ void Randomizer::RandomizeBunker() { | |||
152 | // Randomize Tutorial 2-Advanced Tutorial 4 + Glass 1 | 152 | // Randomize Tutorial 2-Advanced Tutorial 4 + Glass 1 |
153 | // Tutorial 1 cannot be randomized, since no other panel can start on | 153 | // Tutorial 1 cannot be randomized, since no other panel can start on |
154 | // Glass 1 will become door + glass 1, due to the targetting system | 154 | // Glass 1 will become door + glass 1, due to the targetting system |
155 | RandomizeRange(randomOrder, SWAP_NONE, 1, 10); | 155 | RandomizeRange(randomOrder, SWAP::NONE, 1, 10); |
156 | // Randomize Glass 1-3 into everything after the door/glass 1 | 156 | // Randomize Glass 1-3 into everything after the door/glass 1 |
157 | const size_t glass1Index = find(randomOrder, 9); | 157 | const size_t glass1Index = find(randomOrder, 9); |
158 | RandomizeRange(randomOrder, SWAP_NONE, glass1Index + 1, 12); | 158 | RandomizeRange(randomOrder, SWAP::NONE, glass1Index + 1, 12); |
159 | ReassignTargets(bunkerPanels, randomOrder); | 159 | ReassignTargets(bunkerPanels, randomOrder); |
160 | } | 160 | } |
161 | 161 | ||
@@ -163,8 +163,8 @@ void Randomizer::RandomizeJungle() { | |||
163 | std::vector<int> randomOrder(junglePanels.size(), 0); | 163 | std::vector<int> randomOrder(junglePanels.size(), 0); |
164 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | 164 | std::iota(randomOrder.begin(), randomOrder.end(), 0); |
165 | // Waves 1 cannot be randomized, since no other panel can start on | 165 | // Waves 1 cannot be randomized, since no other panel can start on |
166 | RandomizeRange(randomOrder, SWAP_NONE, 1, 7); // Waves 2-7 | 166 | RandomizeRange(randomOrder, SWAP::NONE, 1, 7); // Waves 2-7 |
167 | RandomizeRange(randomOrder, SWAP_NONE, 8, 13); // Pitches 1-6 | 167 | RandomizeRange(randomOrder, SWAP::NONE, 8, 13); // Pitches 1-6 |
168 | ReassignTargets(junglePanels, randomOrder); | 168 | ReassignTargets(junglePanels, randomOrder); |
169 | } | 169 | } |
170 | 170 | ||
@@ -175,8 +175,8 @@ void Randomizer::RandomizeSwamp() { | |||
175 | 175 | ||
176 | void Randomizer::RandomizeMountain() { | 176 | void Randomizer::RandomizeMountain() { |
177 | // Randomize lasers & some of mountain | 177 | // Randomize lasers & some of mountain |
178 | Randomize(lasers, SWAP_TARGETS); | 178 | Randomize(lasers, SWAP::TARGETS); |
179 | Randomize(mountainMultipanel, SWAP_LINES); | 179 | Randomize(mountainMultipanel, SWAP::LINES); |
180 | 180 | ||
181 | // Randomize final pillars order | 181 | // Randomize final pillars order |
182 | std::vector<int> targets = {pillars[0] + 1}; | 182 | std::vector<int> targets = {pillars[0] + 1}; |
@@ -188,8 +188,8 @@ void Randomizer::RandomizeMountain() { | |||
188 | 188 | ||
189 | std::vector<int> randomOrder(pillars.size(), 0); | 189 | std::vector<int> randomOrder(pillars.size(), 0); |
190 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | 190 | std::iota(randomOrder.begin(), randomOrder.end(), 0); |
191 | RandomizeRange(randomOrder, SWAP_NONE, 0, 4); // Left Pillars 1-4 | 191 | RandomizeRange(randomOrder, SWAP::NONE, 0, 4); // Left Pillars 1-4 |
192 | RandomizeRange(randomOrder, SWAP_NONE, 5, 9); // Right Pillars 1-4 | 192 | RandomizeRange(randomOrder, SWAP::NONE, 5, 9); // Right Pillars 1-4 |
193 | ReassignTargets(pillars, randomOrder, targets); | 193 | ReassignTargets(pillars, randomOrder, targets); |
194 | // Turn off original starting panels | 194 | // Turn off original starting panels |
195 | _memory->WritePanelData<float>(pillars[0], POWER, {0.0f, 0.0f}); | 195 | _memory->WritePanelData<float>(pillars[0], POWER, {0.0f, 0.0f}); |
@@ -206,7 +206,7 @@ void Randomizer::RandomizeMountain() { | |||
206 | void Randomizer::RandomizeChallenge() { | 206 | void Randomizer::RandomizeChallenge() { |
207 | std::vector<int> randomOrder(challengePanels.size(), 0); | 207 | std::vector<int> randomOrder(challengePanels.size(), 0); |
208 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | 208 | std::iota(randomOrder.begin(), randomOrder.end(), 0); |
209 | RandomizeRange(randomOrder, SWAP_NONE, 1, 9); // Easy maze - Triple 2 | 209 | RandomizeRange(randomOrder, SWAP::NONE, 1, 9); // Easy maze - Triple 2 |
210 | std::vector<int> triple1Target = _memory->ReadPanelData<int>(0x00C80, TARGET, 1); | 210 | std::vector<int> triple1Target = _memory->ReadPanelData<int>(0x00C80, TARGET, 1); |
211 | _memory->WritePanelData<int>(0x00CA1, TARGET, triple1Target); | 211 | _memory->WritePanelData<int>(0x00CA1, TARGET, triple1Target); |
212 | _memory->WritePanelData<int>(0x00CB9, TARGET, triple1Target); | 212 | _memory->WritePanelData<int>(0x00CB9, TARGET, triple1Target); |
@@ -219,7 +219,7 @@ void Randomizer::RandomizeChallenge() { | |||
219 | void Randomizer::RandomizeAudioLogs() { | 219 | void Randomizer::RandomizeAudioLogs() { |
220 | std::vector<int> randomOrder(audiologs.size(), 0); | 220 | std::vector<int> randomOrder(audiologs.size(), 0); |
221 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | 221 | std::iota(randomOrder.begin(), randomOrder.end(), 0); |
222 | Randomize(randomOrder, SWAP_NONE); | 222 | Randomize(randomOrder, SWAP::NONE); |
223 | ReassignNames(audiologs, randomOrder); | 223 | ReassignNames(audiologs, randomOrder); |
224 | } | 224 | } |
225 | 225 | ||
@@ -231,9 +231,9 @@ void Randomizer::Randomize(std::vector<int>& panels, int flags) { | |||
231 | void Randomizer::RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex) { | 231 | void Randomizer::RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex) { |
232 | if (panels.size() == 0) return; | 232 | if (panels.size() == 0) return; |
233 | if (startIndex >= endIndex) return; | 233 | if (startIndex >= endIndex) return; |
234 | if (endIndex >= panels.size()) endIndex = panels.size(); | 234 | if (endIndex >= panels.size()) endIndex = static_cast<int>(panels.size()); |
235 | for (size_t i = endIndex-1; i > startIndex; i--) { | 235 | for (size_t i = endIndex-1; i > startIndex; i--) { |
236 | const size_t target = Random::RandInt(startIndex, i); | 236 | const int target = Random::RandInt(static_cast<int>(startIndex), static_cast<int>(i)); |
237 | if (i != target) { | 237 | if (i != target) { |
238 | // std::cout << "Swapping panels " << std::hex << panels[i] << " and " << std::hex << panels[target] << std::endl; | 238 | // std::cout << "Swapping panels " << std::hex << panels[i] << " and " << std::hex << panels[target] << std::endl; |
239 | SwapPanels(panels[i], panels[target], flags); | 239 | SwapPanels(panels[i], panels[target], flags); |
@@ -245,13 +245,13 @@ void Randomizer::RandomizeRange(std::vector<int> &panels, int flags, size_t star | |||
245 | void Randomizer::SwapPanels(int panel1, int panel2, int flags) { | 245 | void Randomizer::SwapPanels(int panel1, int panel2, int flags) { |
246 | std::map<int, int> offsets; | 246 | std::map<int, int> offsets; |
247 | 247 | ||
248 | if (flags & SWAP_TARGETS) { | 248 | if (flags & SWAP::TARGETS) { |
249 | offsets[TARGET] = sizeof(int); | 249 | offsets[TARGET] = sizeof(int); |
250 | } | 250 | } |
251 | if (flags & SWAP_AUDIO_NAMES) { | 251 | if (flags & SWAP::AUDIO_NAMES) { |
252 | offsets[AUDIO_LOG_NAME] = sizeof(void*); | 252 | offsets[AUDIO_LOG_NAME] = sizeof(void*); |
253 | } | 253 | } |
254 | if (flags & SWAP_LINES) { | 254 | if (flags & SWAP::LINES) { |
255 | offsets[PATH_COLOR] = 16; | 255 | offsets[PATH_COLOR] = 16; |
256 | offsets[REFLECTION_PATH_COLOR] = 16; | 256 | offsets[REFLECTION_PATH_COLOR] = 16; |
257 | offsets[DOT_COLOR] = 16; | 257 | offsets[DOT_COLOR] = 16; |
diff --git a/Source/Randomizer.h b/Source/Randomizer.h index c9603ac..fa7bc4c 100644 --- a/Source/Randomizer.h +++ b/Source/Randomizer.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | #include "RandomizerCore.h" | 2 | #include "Memory.h" |
3 | #include <memory> | ||
3 | 4 | ||
4 | class Randomizer { | 5 | class Randomizer { |
5 | public: | 6 | public: |
@@ -10,6 +11,13 @@ public: | |||
10 | 11 | ||
11 | void ClearOffsets() {_memory->ClearOffsets();} | 12 | void ClearOffsets() {_memory->ClearOffsets();} |
12 | 13 | ||
14 | enum SWAP { | ||
15 | NONE = 0, | ||
16 | TARGETS = 1, | ||
17 | LINES = 2, | ||
18 | AUDIO_NAMES = 4, | ||
19 | }; | ||
20 | |||
13 | private: | 21 | private: |
14 | 22 | ||
15 | int _lastRandomizedFrame = 1 << 30; | 23 | int _lastRandomizedFrame = 1 << 30; |
@@ -43,3 +51,137 @@ private: | |||
43 | 51 | ||
44 | friend class SwapTests_Shipwreck_Test; | 52 | friend class SwapTests_Shipwreck_Test; |
45 | }; | 53 | }; |
54 | |||
55 | #if GLOBALS == 0x5B28C0 | ||
56 | #define PATH_COLOR 0xC8 | ||
57 | #define REFLECTION_PATH_COLOR 0xD8 | ||
58 | #define DOT_COLOR 0xF8 | ||
59 | #define ACTIVE_COLOR 0x108 | ||
60 | #define BACKGROUND_REGION_COLOR 0x118 | ||
61 | #define SUCCESS_COLOR_A 0x128 | ||
62 | #define SUCCESS_COLOR_B 0x138 | ||
63 | #define STROBE_COLOR_A 0x148 | ||
64 | #define STROBE_COLOR_B 0x158 | ||
65 | #define ERROR_COLOR 0x168 | ||
66 | #define PATTERN_POINT_COLOR 0x188 | ||
67 | #define PATTERN_POINT_COLOR_A 0x198 | ||
68 | #define PATTERN_POINT_COLOR_B 0x1A8 | ||
69 | #define SYMBOL_A 0x1B8 | ||
70 | #define SYMBOL_B 0x1C8 | ||
71 | #define SYMBOL_C 0x1D8 | ||
72 | #define SYMBOL_D 0x1E8 | ||
73 | #define SYMBOL_E 0x1F8 | ||
74 | #define PUSH_SYMBOL_COLORS 0x208 | ||
75 | #define OUTER_BACKGROUND 0x20C | ||
76 | #define OUTER_BACKGROUND_MODE 0x21C | ||
77 | #define TRACED_EDGES 0x230 | ||
78 | #define AUDIO_PREFIX 0x278 | ||
79 | #define POWER 0x2A8 | ||
80 | #define TARGET 0x2BC | ||
81 | #define IS_CYLINDER 0x2FC | ||
82 | #define CYLINDER_Z0 0x300 | ||
83 | #define CYLINDER_Z1 0x304 | ||
84 | #define CYLINDER_RADIUS 0x308 | ||
85 | #define CURSOR_SPEED_SCALE 0x358 | ||
86 | #define NEEDS_REDRAW 0x384 | ||
87 | #define SPECULAR_ADD 0x398 | ||
88 | #define SPECULAR_POWER 0x39C | ||
89 | #define PATH_WIDTH_SCALE 0x3A4 | ||
90 | #define STARTPOINT_SCALE 0x3A8 | ||
91 | #define NUM_DOTS 0x3B8 | ||
92 | #define NUM_CONNECTIONS 0x3BC | ||
93 | #define MAX_BROADCAST_DISTANCE 0x3C0 | ||
94 | #define DOT_POSITIONS 0x3C8 | ||
95 | #define DOT_FLAGS 0x3D0 | ||
96 | #define DOT_CONNECTION_A 0x3D8 | ||
97 | #define DOT_CONNECTION_B 0x3E0 | ||
98 | #define DECORATIONS 0x420 | ||
99 | #define DECORATION_FLAGS 0x428 | ||
100 | #define DECORATION_COLORS 0x430 | ||
101 | #define NUM_DECORATIONS 0x438 | ||
102 | #define REFLECTION_DATA 0x440 | ||
103 | #define GRID_SIZE_X 0x448 | ||
104 | #define GRID_SIZE_Y 0x44C | ||
105 | #define STYLE_FLAGS 0x450 | ||
106 | #define SEQUENCE_LEN 0x45C | ||
107 | #define SEQUENCE 0x460 | ||
108 | #define DOT_SEQUENCE_LEN 0x468 | ||
109 | #define DOT_SEQUENCE 0x470 | ||
110 | #define DOT_SEQUENCE_LEN_REFLECTION 0x478 | ||
111 | #define DOT_SEQUENCE_REFLECTION 0x480 | ||
112 | #define NUM_COLORED_REGIONS 0x4A0 | ||
113 | #define COLORED_REGIONS 0x4A8 | ||
114 | #define PANEL_TARGET 0x4B0 | ||
115 | #define SPECULAR_TEXTURE 0x4D8 | ||
116 | #define CABLE_TARGET_2 0xD8 | ||
117 | #define AUDIO_LOG_NAME 0xC8 | ||
118 | #define OPEN_RATE 0xE8 | ||
119 | #define METADATA 0xF2 // sizeof(short) | ||
120 | #define SCRIPT_FRAMES 0x5BE3B0 | ||
121 | #elif GLOBALS == 0x62A080 | ||
122 | #define PATH_COLOR 0xC0 | ||
123 | #define REFLECTION_PATH_COLOR 0xD0 | ||
124 | #define DOT_COLOR 0xF0 | ||
125 | #define ACTIVE_COLOR 0x100 | ||
126 | #define BACKGROUND_REGION_COLOR 0x110 | ||
127 | #define SUCCESS_COLOR_A 0x120 | ||
128 | #define SUCCESS_COLOR_B 0x130 | ||
129 | #define STROBE_COLOR_A 0x140 | ||
130 | #define STROBE_COLOR_B 0x150 | ||
131 | #define ERROR_COLOR 0x160 | ||
132 | #define PATTERN_POINT_COLOR 0x180 | ||
133 | #define PATTERN_POINT_COLOR_A 0x190 | ||
134 | #define PATTERN_POINT_COLOR_B 0x1A0 | ||
135 | #define SYMBOL_A 0x1B0 | ||
136 | #define SYMBOL_B 0x1C0 | ||
137 | #define SYMBOL_C 0x1D0 | ||
138 | #define SYMBOL_D 0x1E0 | ||
139 | #define SYMBOL_E 0x1F0 | ||
140 | #define PUSH_SYMBOL_COLORS 0x200 | ||
141 | #define OUTER_BACKGROUND 0x204 | ||
142 | #define OUTER_BACKGROUND_MODE 0x214 | ||
143 | #define TRACED_EDGES 0x228 | ||
144 | #define AUDIO_PREFIX 0x270 | ||
145 | #define POWER 0x2A0 | ||
146 | #define TARGET 0x2B4 | ||
147 | #define IS_CYLINDER 0x2F4 | ||
148 | #define CYLINDER_Z0 0x2F8 | ||
149 | #define CYLINDER_Z1 0x2FC | ||
150 | #define CYLINDER_RADIUS 0x300 | ||
151 | #define CURSOR_SPEED_SCALE 0x350 | ||
152 | #define NEEDS_REDRAW 0x37C | ||
153 | #define SPECULAR_ADD 0x38C | ||
154 | #define SPECULAR_POWER 0x390 | ||
155 | #define PATH_WIDTH_SCALE 0x39C | ||
156 | #define STARTPOINT_SCALE 0x3A0 | ||
157 | #define NUM_DOTS 0x3B4 | ||
158 | #define NUM_CONNECTIONS 0x3B8 | ||
159 | #define MAX_BROADCAST_DISTANCE 0x3BC | ||
160 | #define DOT_POSITIONS 0x3C0 | ||
161 | #define DOT_FLAGS 0x3C8 | ||
162 | #define DOT_CONNECTION_A 0x3D0 | ||
163 | #define DOT_CONNECTION_B 0x3D8 | ||
164 | #define DECORATIONS 0x418 | ||
165 | #define DECORATION_FLAGS 0x420 | ||
166 | #define DECORATION_COLORS 0x428 | ||
167 | #define NUM_DECORATIONS 0x430 | ||
168 | #define REFLECTION_DATA 0x438 | ||
169 | #define GRID_SIZE_X 0x440 | ||
170 | #define GRID_SIZE_Y 0x444 | ||
171 | #define STYLE_FLAGS 0x448 | ||
172 | #define SEQUENCE_LEN 0x454 | ||
173 | #define SEQUENCE 0x458 | ||
174 | #define DOT_SEQUENCE_LEN 0x460 | ||
175 | #define DOT_SEQUENCE 0x468 | ||
176 | #define DOT_SEQUENCE_LEN_REFLECTION 0x470 | ||
177 | #define DOT_SEQUENCE_REFLECTION 0x478 | ||
178 | #define NUM_COLORED_REGIONS 0x498 | ||
179 | #define COLORED_REGIONS 0x4A0 | ||
180 | #define PANEL_TARGET 0x4A8 | ||
181 | #define SPECULAR_TEXTURE 0x4D0 | ||
182 | #define CABLE_TARGET_2 0xD0 | ||
183 | #define AUDIO_LOG_NAME 0x0 | ||
184 | #define OPEN_RATE 0xE0 | ||
185 | #define METADATA 0x13A // sizeof(short) | ||
186 | #define SCRIPT_FRAMES 0x63651C | ||
187 | #endif \ No newline at end of file | ||
diff --git a/Source/RandomizerCore.cpp b/Source/RandomizerCore.cpp deleted file mode 100644 index e69de29..0000000 --- a/Source/RandomizerCore.cpp +++ /dev/null | |||
diff --git a/Source/RandomizerCore.h b/Source/RandomizerCore.h deleted file mode 100644 index 89560b6..0000000 --- a/Source/RandomizerCore.h +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | #pragma once | ||
2 | #include "Memory.h" | ||
3 | #include <memory> | ||
4 | |||
5 | __declspec(selectany) int SWAP_NONE = 0x0; | ||
6 | __declspec(selectany) int SWAP_TARGETS = 0x1; | ||
7 | __declspec(selectany) int SWAP_LINES = 0x2; | ||
8 | __declspec(selectany) int SWAP_AUDIO_NAMES = 0x4; | ||
9 | |||
10 | class RandomizerCore | ||
11 | { | ||
12 | public: | ||
13 | }; | ||
14 | |||
15 | #if GLOBALS == 0x5B28C0 | ||
16 | #define PATH_COLOR 0xC8 | ||
17 | #define REFLECTION_PATH_COLOR 0xD8 | ||
18 | #define DOT_COLOR 0xF8 | ||
19 | #define ACTIVE_COLOR 0x108 | ||
20 | #define BACKGROUND_REGION_COLOR 0x118 | ||
21 | #define SUCCESS_COLOR_A 0x128 | ||
22 | #define SUCCESS_COLOR_B 0x138 | ||
23 | #define STROBE_COLOR_A 0x148 | ||
24 | #define STROBE_COLOR_B 0x158 | ||
25 | #define ERROR_COLOR 0x168 | ||
26 | #define PATTERN_POINT_COLOR 0x188 | ||
27 | #define PATTERN_POINT_COLOR_A 0x198 | ||
28 | #define PATTERN_POINT_COLOR_B 0x1A8 | ||
29 | #define SYMBOL_A 0x1B8 | ||
30 | #define SYMBOL_B 0x1C8 | ||
31 | #define SYMBOL_C 0x1D8 | ||
32 | #define SYMBOL_D 0x1E8 | ||
33 | #define SYMBOL_E 0x1F8 | ||
34 | #define PUSH_SYMBOL_COLORS 0x208 | ||
35 | #define OUTER_BACKGROUND 0x20C | ||
36 | #define OUTER_BACKGROUND_MODE 0x21C | ||
37 | #define TRACED_EDGES 0x230 | ||
38 | #define AUDIO_PREFIX 0x278 | ||
39 | #define POWER 0x2A8 | ||
40 | #define TARGET 0x2BC | ||
41 | #define IS_CYLINDER 0x2FC | ||
42 | #define CYLINDER_Z0 0x300 | ||
43 | #define CYLINDER_Z1 0x304 | ||
44 | #define CYLINDER_RADIUS 0x308 | ||
45 | #define CURSOR_SPEED_SCALE 0x358 | ||
46 | #define NEEDS_REDRAW 0x384 | ||
47 | #define SPECULAR_ADD 0x398 | ||
48 | #define SPECULAR_POWER 0x39C | ||
49 | #define PATH_WIDTH_SCALE 0x3A4 | ||
50 | #define STARTPOINT_SCALE 0x3A8 | ||
51 | #define NUM_DOTS 0x3B8 | ||
52 | #define NUM_CONNECTIONS 0x3BC | ||
53 | #define MAX_BROADCAST_DISTANCE 0x3C0 | ||
54 | #define DOT_POSITIONS 0x3C8 | ||
55 | #define DOT_FLAGS 0x3D0 | ||
56 | #define DOT_CONNECTION_A 0x3D8 | ||
57 | #define DOT_CONNECTION_B 0x3E0 | ||
58 | #define DECORATIONS 0x420 | ||
59 | #define DECORATION_FLAGS 0x428 | ||
60 | #define DECORATION_COLORS 0x430 | ||
61 | #define NUM_DECORATIONS 0x438 | ||
62 | #define REFLECTION_DATA 0x440 | ||
63 | #define GRID_SIZE_X 0x448 | ||
64 | #define GRID_SIZE_Y 0x44C | ||
65 | #define STYLE_FLAGS 0x450 | ||
66 | #define SEQUENCE_LEN 0x45C | ||
67 | #define SEQUENCE 0x460 | ||
68 | #define DOT_SEQUENCE_LEN 0x468 | ||
69 | #define DOT_SEQUENCE 0x470 | ||
70 | #define DOT_SEQUENCE_LEN_REFLECTION 0x478 | ||
71 | #define DOT_SEQUENCE_REFLECTION 0x480 | ||
72 | #define NUM_COLORED_REGIONS 0x4A0 | ||
73 | #define COLORED_REGIONS 0x4A8 | ||
74 | #define PANEL_TARGET 0x4B0 | ||
75 | #define SPECULAR_TEXTURE 0x4D8 | ||
76 | #define CABLE_TARGET_2 0xD8 | ||
77 | #define AUDIO_LOG_NAME 0xC8 | ||
78 | #define OPEN_RATE 0xE8 | ||
79 | #define METADATA 0xF2 // sizeof(short) | ||
80 | #define SCRIPT_FRAMES 0x5BE3B0 | ||
81 | #elif GLOBALS == 0x62A080 | ||
82 | #define PATH_COLOR 0xC0 | ||
83 | #define REFLECTION_PATH_COLOR 0xD0 | ||
84 | #define DOT_COLOR 0xF0 | ||
85 | #define ACTIVE_COLOR 0x100 | ||
86 | #define BACKGROUND_REGION_COLOR 0x110 | ||
87 | #define SUCCESS_COLOR_A 0x120 | ||
88 | #define SUCCESS_COLOR_B 0x130 | ||
89 | #define STROBE_COLOR_A 0x140 | ||
90 | #define STROBE_COLOR_B 0x150 | ||
91 | #define ERROR_COLOR 0x160 | ||
92 | #define PATTERN_POINT_COLOR 0x180 | ||
93 | #define PATTERN_POINT_COLOR_A 0x190 | ||
94 | #define PATTERN_POINT_COLOR_B 0x1A0 | ||
95 | #define SYMBOL_A 0x1B0 | ||
96 | #define SYMBOL_B 0x1C0 | ||
97 | #define SYMBOL_C 0x1D0 | ||
98 | #define SYMBOL_D 0x1E0 | ||
99 | #define SYMBOL_E 0x1F0 | ||
100 | #define PUSH_SYMBOL_COLORS 0x200 | ||
101 | #define OUTER_BACKGROUND 0x204 | ||
102 | #define OUTER_BACKGROUND_MODE 0x214 | ||
103 | #define TRACED_EDGES 0x228 | ||
104 | #define AUDIO_PREFIX 0x270 | ||
105 | #define POWER 0x2A0 | ||
106 | #define TARGET 0x2B4 | ||
107 | #define IS_CYLINDER 0x2F4 | ||
108 | #define CYLINDER_Z0 0x2F8 | ||
109 | #define CYLINDER_Z1 0x2FC | ||
110 | #define CYLINDER_RADIUS 0x300 | ||
111 | #define CURSOR_SPEED_SCALE 0x350 | ||
112 | #define NEEDS_REDRAW 0x37C | ||
113 | #define SPECULAR_ADD 0x38C | ||
114 | #define SPECULAR_POWER 0x390 | ||
115 | #define PATH_WIDTH_SCALE 0x39C | ||
116 | #define STARTPOINT_SCALE 0x3A0 | ||
117 | #define NUM_DOTS 0x3B4 | ||
118 | #define NUM_CONNECTIONS 0x3B8 | ||
119 | #define MAX_BROADCAST_DISTANCE 0x3BC | ||
120 | #define DOT_POSITIONS 0x3C0 | ||
121 | #define DOT_FLAGS 0x3C8 | ||
122 | #define DOT_CONNECTION_A 0x3D0 | ||
123 | #define DOT_CONNECTION_B 0x3D8 | ||
124 | #define DECORATIONS 0x418 | ||
125 | #define DECORATION_FLAGS 0x420 | ||
126 | #define DECORATION_COLORS 0x428 | ||
127 | #define NUM_DECORATIONS 0x430 | ||
128 | #define REFLECTION_DATA 0x438 | ||
129 | #define GRID_SIZE_X 0x440 | ||
130 | #define GRID_SIZE_Y 0x444 | ||
131 | #define STYLE_FLAGS 0x448 | ||
132 | #define SEQUENCE_LEN 0x454 | ||
133 | #define SEQUENCE 0x458 | ||
134 | #define DOT_SEQUENCE_LEN 0x460 | ||
135 | #define DOT_SEQUENCE 0x468 | ||
136 | #define DOT_SEQUENCE_LEN_REFLECTION 0x470 | ||
137 | #define DOT_SEQUENCE_REFLECTION 0x478 | ||
138 | #define NUM_COLORED_REGIONS 0x498 | ||
139 | #define COLORED_REGIONS 0x4A0 | ||
140 | #define PANEL_TARGET 0x4A8 | ||
141 | #define SPECULAR_TEXTURE 0x4D0 | ||
142 | #define CABLE_TARGET_2 0xD0 | ||
143 | #define AUDIO_LOG_NAME 0x0 | ||
144 | #define OPEN_RATE 0xE0 | ||
145 | #define METADATA 0x13A // sizeof(short) | ||
146 | #define SCRIPT_FRAMES 0x63651C | ||
147 | #endif \ No newline at end of file | ||
diff --git a/Source/Source.vcxproj b/Source/Source.vcxproj index 8d13e00..545753d 100644 --- a/Source/Source.vcxproj +++ b/Source/Source.vcxproj | |||
@@ -91,6 +91,7 @@ | |||
91 | <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 91 | <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
92 | <ConformanceMode>true</ConformanceMode> | 92 | <ConformanceMode>true</ConformanceMode> |
93 | <LanguageStandard>stdcpp17</LanguageStandard> | 93 | <LanguageStandard>stdcpp17</LanguageStandard> |
94 | <TreatWarningAsError>true</TreatWarningAsError> | ||
94 | </ClCompile> | 95 | </ClCompile> |
95 | <Link> | 96 | <Link> |
96 | <SubSystem>Windows</SubSystem> | 97 | <SubSystem>Windows</SubSystem> |
@@ -107,6 +108,7 @@ | |||
107 | <ConformanceMode>true</ConformanceMode> | 108 | <ConformanceMode>true</ConformanceMode> |
108 | <LanguageStandard>stdcpp17</LanguageStandard> | 109 | <LanguageStandard>stdcpp17</LanguageStandard> |
109 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 110 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
111 | <TreatWarningAsError>true</TreatWarningAsError> | ||
110 | </ClCompile> | 112 | </ClCompile> |
111 | <Link> | 113 | <Link> |
112 | <SubSystem>Windows</SubSystem> | 114 | <SubSystem>Windows</SubSystem> |
@@ -124,6 +126,7 @@ | |||
124 | <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 126 | <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
125 | <ConformanceMode>true</ConformanceMode> | 127 | <ConformanceMode>true</ConformanceMode> |
126 | <LanguageStandard>stdcpp17</LanguageStandard> | 128 | <LanguageStandard>stdcpp17</LanguageStandard> |
129 | <TreatWarningAsError>true</TreatWarningAsError> | ||
127 | </ClCompile> | 130 | </ClCompile> |
128 | <Link> | 131 | <Link> |
129 | <SubSystem>Windows</SubSystem> | 132 | <SubSystem>Windows</SubSystem> |
@@ -143,6 +146,7 @@ | |||
143 | <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 146 | <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
144 | <ConformanceMode>true</ConformanceMode> | 147 | <ConformanceMode>true</ConformanceMode> |
145 | <LanguageStandard>stdcpp17</LanguageStandard> | 148 | <LanguageStandard>stdcpp17</LanguageStandard> |
149 | <TreatWarningAsError>true</TreatWarningAsError> | ||
146 | </ClCompile> | 150 | </ClCompile> |
147 | <Link> | 151 | <Link> |
148 | <SubSystem>Windows</SubSystem> | 152 | <SubSystem>Windows</SubSystem> |
@@ -158,14 +162,12 @@ | |||
158 | <ClInclude Include="Panels.h" /> | 162 | <ClInclude Include="Panels.h" /> |
159 | <ClInclude Include="Random.h" /> | 163 | <ClInclude Include="Random.h" /> |
160 | <ClInclude Include="Randomizer.h" /> | 164 | <ClInclude Include="Randomizer.h" /> |
161 | <ClInclude Include="RandomizerCore.h" /> | ||
162 | </ItemGroup> | 165 | </ItemGroup> |
163 | <ItemGroup> | 166 | <ItemGroup> |
164 | <ClCompile Include="Memory.cpp" /> | 167 | <ClCompile Include="Memory.cpp" /> |
165 | <ClCompile Include="Panel.cpp" /> | 168 | <ClCompile Include="Panel.cpp" /> |
166 | <ClCompile Include="Random.cpp" /> | 169 | <ClCompile Include="Random.cpp" /> |
167 | <ClCompile Include="Randomizer.cpp" /> | 170 | <ClCompile Include="Randomizer.cpp" /> |
168 | <ClCompile Include="RandomizerCore.cpp" /> | ||
169 | </ItemGroup> | 171 | </ItemGroup> |
170 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 172 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
171 | <ImportGroup Label="ExtensionTargets"> | 173 | <ImportGroup Label="ExtensionTargets"> |
diff --git a/Test/Temp.cpp b/Test/Temp.cpp index 3d589c1..14f3bbf 100644 --- a/Test/Temp.cpp +++ b/Test/Temp.cpp | |||
@@ -9,6 +9,6 @@ GTEST_TEST(SwapTests, Shipwreck) { | |||
9 | int bu1 = 0x6; | 9 | int bu1 = 0x6; |
10 | int td1 = 0x5D; | 10 | int td1 = 0x5D; |
11 | 11 | ||
12 | randomizer.SwapPanels(si1, td1, SWAP_LINES); | 12 | randomizer.SwapPanels(si1, td1, Randomizer::SWAP::LINES); |
13 | 13 | ||
14 | } | 14 | } |
diff --git a/Test/Test.vcxproj b/Test/Test.vcxproj index 75e22a9..a6d8f75 100644 --- a/Test/Test.vcxproj +++ b/Test/Test.vcxproj | |||
@@ -61,6 +61,7 @@ | |||
61 | <WarningLevel>Level3</WarningLevel> | 61 | <WarningLevel>Level3</WarningLevel> |
62 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 62 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
63 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> | 63 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> |
64 | <TreatWarningAsError>true</TreatWarningAsError> | ||
64 | </ClCompile> | 65 | </ClCompile> |
65 | <Link> | 66 | <Link> |
66 | <GenerateDebugInformation>true</GenerateDebugInformation> | 67 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -79,6 +80,7 @@ | |||
79 | <WarningLevel>Level3</WarningLevel> | 80 | <WarningLevel>Level3</WarningLevel> |
80 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 81 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
81 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> | 82 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> |
83 | <TreatWarningAsError>true</TreatWarningAsError> | ||
82 | </ClCompile> | 84 | </ClCompile> |
83 | <Link> | 85 | <Link> |
84 | <GenerateDebugInformation>true</GenerateDebugInformation> | 86 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -95,6 +97,7 @@ | |||
95 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 97 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
96 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 98 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
97 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> | 99 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> |
100 | <TreatWarningAsError>true</TreatWarningAsError> | ||
98 | </ClCompile> | 101 | </ClCompile> |
99 | <Link> | 102 | <Link> |
100 | <GenerateDebugInformation>true</GenerateDebugInformation> | 103 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -113,6 +116,7 @@ | |||
113 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 116 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
114 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 117 | <AdditionalIncludeDirectories>..\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
115 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> | 118 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> |
119 | <TreatWarningAsError>true</TreatWarningAsError> | ||
116 | </ClCompile> | 120 | </ClCompile> |
117 | <Link> | 121 | <Link> |
118 | <GenerateDebugInformation>true</GenerateDebugInformation> | 122 | <GenerateDebugInformation>true</GenerateDebugInformation> |