about summary refs log tree commit diff stats
path: root/Source/Randomizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Randomizer.cpp')
-rw-r--r--Source/Randomizer.cpp196
1 files changed, 96 insertions, 100 deletions
diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp index 72072a8..74166af 100644 --- a/Source/Randomizer.cpp +++ b/Source/Randomizer.cpp
@@ -130,10 +130,18 @@ void Randomizer::Randomize() {
130 MEMORY_CATCH(RandomizeChallenge()); 130 MEMORY_CATCH(RandomizeChallenge());
131 131
132 // Content swaps -- must happen before squarePanels 132 // Content swaps -- must happen before squarePanels
133 MEMORY_CATCH(Randomize(upDownPanels, SWAP::LINES | SWAP::COLORS)); 133 //MEMORY_CATCH(Randomize(upDownPanels, SWAP::LINES | SWAP::COLORS));
134 MEMORY_CATCH(Randomize(leftForwardRightPanels, SWAP::LINES | SWAP::COLORS)); 134 //MEMORY_CATCH(Randomize(leftForwardRightPanels, SWAP::LINES | SWAP::COLORS));
135 135
136 MEMORY_CATCH(Randomize(squarePanels, SWAP::LINES | SWAP::COLORS)); 136 // Tutorial Bend
137 for (int panel : utmPerspective) {
138 Tutorialise(panel, 0x00182);
139 }
140 // Tutorial Straight
141 for (int panel : squarePanels) {
142 Tutorialise(panel, 0x00064);
143 }
144 //Randomize(squarePanels, SWAP::LINES | SWAP::COLORS);
137 145
138 // Individual area modifications 146 // Individual area modifications
139 MEMORY_CATCH(RandomizeTutorial()); 147 MEMORY_CATCH(RandomizeTutorial());
@@ -171,9 +179,9 @@ void Randomizer::RandomizeLasers() {
171void Randomizer::PreventSnipes() 179void Randomizer::PreventSnipes()
172{ 180{
173 // Distance-gate swamp snipe 1 to prevent RNG swamp snipe 181 // Distance-gate swamp snipe 1 to prevent RNG swamp snipe
174 _memory->WriteEntityData<float>(0x17C05, MAX_BROADCAST_DISTANCE, {15.0}); 182 //_memory->WriteEntityData<float>(0x17C05, MAX_BROADCAST_DISTANCE, {15.0});
175 // Distance-gate shadows laser to prevent sniping through the bars 183 // Distance-gate shadows laser to prevent sniping through the bars
176 _memory->WriteEntityData<float>(0x19650, MAX_BROADCAST_DISTANCE, {2.5}); 184 //_memory->WriteEntityData<float>(0x19650, MAX_BROADCAST_DISTANCE, {2.5});
177} 185}
178 186
179// Private methods 187// Private methods
@@ -186,21 +194,21 @@ void Randomizer::RandomizeTutorial() {
186} 194}
187 195
188void Randomizer::RandomizeSymmetry() { 196void Randomizer::RandomizeSymmetry() {
189 std::vector<int> randomOrder(transparent.size(), 0); 197 /*std::vector<int> randomOrder(transparent.size(), 0);
190 std::iota(randomOrder.begin(), randomOrder.end(), 0); 198 std::iota(randomOrder.begin(), randomOrder.end(), 0);
191 RandomizeRange(randomOrder, SWAP::NONE, 1, 5); 199 RandomizeRange(randomOrder, SWAP::NONE, 1, 5);
192 ReassignTargets(transparent, randomOrder); 200 ReassignTargets(transparent, randomOrder);*/
193} 201}
194 202
195void Randomizer::RandomizeDesert() { 203void Randomizer::RandomizeDesert() {
196 Randomize(desertPanels, SWAP::LINES); 204 //Randomize(desertPanels, SWAP::LINES);
197 205
198 // Turn off desert surface 8 206 // Turn off desert surface 8
199 _memory->WriteEntityData<float>(0x09F94, POWER, {0.0, 0.0}); 207 /*_memory->WriteEntityData<float>(0x09F94, POWER, {0.0, 0.0});
200 // Turn off desert flood final 208 // Turn off desert flood final
201 _memory->WriteEntityData<float>(0x18076, POWER, {0.0, 0.0}); 209 _memory->WriteEntityData<float>(0x18076, POWER, {0.0, 0.0});
202 // Change desert floating target to desert flood final 210 // Change desert floating target to desert flood final
203 _memory->WriteEntityData<int>(0x17ECA, TARGET, {0x18077}); 211 _memory->WriteEntityData<int>(0x17ECA, TARGET, {0x18077});*/
204} 212}
205 213
206void Randomizer::RandomizeQuarry() { 214void Randomizer::RandomizeQuarry() {
@@ -228,7 +236,7 @@ void Randomizer::RandomizeShadows() {
228 // Change shadows avoid 8 to power shadows follow 236 // Change shadows avoid 8 to power shadows follow
229 _memory->WriteEntityData<int>(0x1972F, TARGET, {0x1C34C}); 237 _memory->WriteEntityData<int>(0x1972F, TARGET, {0x1C34C});
230 238
231 std::vector<int> randomOrder(shadowsPanels.size(), 0); 239 /*std::vector<int> randomOrder(shadowsPanels.size(), 0);
232 std::iota(randomOrder.begin(), randomOrder.end(), 0); 240 std::iota(randomOrder.begin(), randomOrder.end(), 0);
233 RandomizeRange(randomOrder, SWAP::NONE, 0, 8); // Tutorial 241 RandomizeRange(randomOrder, SWAP::NONE, 0, 8); // Tutorial
234 RandomizeRange(randomOrder, SWAP::NONE, 8, 16); // Avoid 242 RandomizeRange(randomOrder, SWAP::NONE, 8, 16); // Avoid
@@ -237,12 +245,12 @@ void Randomizer::RandomizeShadows() {
237 // Turn off original starting panel 245 // Turn off original starting panel
238 _memory->WriteEntityData<float>(shadowsPanels[0], POWER, {0.0f, 0.0f}); 246 _memory->WriteEntityData<float>(shadowsPanels[0], POWER, {0.0f, 0.0f});
239 // Turn on new starting panel 247 // Turn on new starting panel
240 _memory->WriteEntityData<float>(shadowsPanels[randomOrder[0]], POWER, {1.0f, 1.0f}); 248 _memory->WriteEntityData<float>(shadowsPanels[randomOrder[0]], POWER, {1.0f, 1.0f});*/
241} 249}
242 250
243void Randomizer::RandomizeTown() { 251void Randomizer::RandomizeTown() {
244 // @Hack...? To open the gate at the end 252 // @Hack...? To open the gate at the end
245 std::vector<int> randomOrder(orchard.size() + 1, 0); 253 /*std::vector<int> randomOrder(orchard.size() + 1, 0);
246 std::iota(randomOrder.begin(), randomOrder.end(), 0); 254 std::iota(randomOrder.begin(), randomOrder.end(), 0);
247 RandomizeRange(randomOrder, SWAP::NONE, 1, 5); 255 RandomizeRange(randomOrder, SWAP::NONE, 1, 5);
248 // Ensure that we open the gate before the final puzzle (by swapping) 256 // Ensure that we open the gate before the final puzzle (by swapping)
@@ -250,18 +258,18 @@ void Randomizer::RandomizeTown() {
250 int panel4Index = find(randomOrder, 4); 258 int panel4Index = find(randomOrder, 4);
251 randomOrder[std::min(panel3Index, panel4Index)] = 3; 259 randomOrder[std::min(panel3Index, panel4Index)] = 3;
252 randomOrder[std::max(panel3Index, panel4Index)] = 4; 260 randomOrder[std::max(panel3Index, panel4Index)] = 4;
253 ReassignTargets(orchard, randomOrder); 261 ReassignTargets(orchard, randomOrder);*/
254} 262}
255 263
256void Randomizer::RandomizeMonastery() { 264void Randomizer::RandomizeMonastery() {
257 std::vector<int> randomOrder(monasteryPanels.size(), 0); 265 /*std::vector<int> randomOrder(monasteryPanels.size(), 0);
258 std::iota(randomOrder.begin(), randomOrder.end(), 0); 266 std::iota(randomOrder.begin(), randomOrder.end(), 0);
259 RandomizeRange(randomOrder, SWAP::NONE, 3, 9); // Outer 2 & 3, Inner 1-4 267 RandomizeRange(randomOrder, SWAP::NONE, 3, 9); // Outer 2 & 3, Inner 1-4
260 ReassignTargets(monasteryPanels, randomOrder); 268 ReassignTargets(monasteryPanels, randomOrder);*/
261} 269}
262 270
263void Randomizer::RandomizeBunker() { 271void Randomizer::RandomizeBunker() {
264 std::vector<int> randomOrder(bunkerPanels.size(), 0); 272 /*std::vector<int> randomOrder(bunkerPanels.size(), 0);
265 std::iota(randomOrder.begin(), randomOrder.end(), 0); 273 std::iota(randomOrder.begin(), randomOrder.end(), 0);
266 // Randomize Tutorial 2-Advanced Tutorial 4 + Glass 1 274 // Randomize Tutorial 2-Advanced Tutorial 4 + Glass 1
267 // Tutorial 1 cannot be randomized, since no other panel can start on 275 // Tutorial 1 cannot be randomized, since no other panel can start on
@@ -270,16 +278,16 @@ void Randomizer::RandomizeBunker() {
270 // Randomize Glass 1-3 into everything after the door/glass 1 278 // Randomize Glass 1-3 into everything after the door/glass 1
271 const size_t glass1Index = find(randomOrder, 9); 279 const size_t glass1Index = find(randomOrder, 9);
272 RandomizeRange(randomOrder, SWAP::NONE, glass1Index + 1, 12); 280 RandomizeRange(randomOrder, SWAP::NONE, glass1Index + 1, 12);
273 ReassignTargets(bunkerPanels, randomOrder); 281 ReassignTargets(bunkerPanels, randomOrder);*/
274} 282}
275 283
276void Randomizer::RandomizeJungle() { 284void Randomizer::RandomizeJungle() {
277 std::vector<int> randomOrder(junglePanels.size(), 0); 285 /*std::vector<int> randomOrder(junglePanels.size(), 0);
278 std::iota(randomOrder.begin(), randomOrder.end(), 0); 286 std::iota(randomOrder.begin(), randomOrder.end(), 0);
279 // Waves 1 cannot be randomized, since no other panel can start on 287 // Waves 1 cannot be randomized, since no other panel can start on
280 RandomizeRange(randomOrder, SWAP::NONE, 1, 7); // Waves 2-7 288 RandomizeRange(randomOrder, SWAP::NONE, 1, 7); // Waves 2-7
281 RandomizeRange(randomOrder, SWAP::NONE, 8, 13); // Pitches 1-6 289 RandomizeRange(randomOrder, SWAP::NONE, 8, 13); // Pitches 1-6
282 ReassignTargets(junglePanels, randomOrder); 290 ReassignTargets(junglePanels, randomOrder);*/
283 291
284 // Fix the wall's target to point back to the cable, and the cable to point to the pitches panel. 292 // Fix the wall's target to point back to the cable, and the cable to point to the pitches panel.
285 // auto wallTarget = _memory->ReadPanelData<int>(junglePanels[7], TARGET, 1); 293 // auto wallTarget = _memory->ReadPanelData<int>(junglePanels[7], TARGET, 1);
@@ -292,10 +300,10 @@ void Randomizer::RandomizeSwamp() {
292 300
293void Randomizer::RandomizeMountain() { 301void Randomizer::RandomizeMountain() {
294 // Randomize multipanel 302 // Randomize multipanel
295 Randomize(mountainMultipanel, SWAP::LINES | SWAP::COLORS); 303 //Randomize(mountainMultipanel, SWAP::LINES | SWAP::COLORS);
296 304
297 // Randomize final pillars order 305 // Randomize final pillars order
298 std::vector<int> targets = {pillars[0] + 1}; 306 /*std::vector<int> targets = {pillars[0] + 1};
299 for (const int pillar : pillars) { 307 for (const int pillar : pillars) {
300 int target = _memory->ReadEntityData<int>(pillar, TARGET, 1)[0]; 308 int target = _memory->ReadEntityData<int>(pillar, TARGET, 1)[0];
301 targets.push_back(target); 309 targets.push_back(target);
@@ -312,14 +320,14 @@ void Randomizer::RandomizeMountain() {
312 _memory->WriteEntityData<float>(pillars[5], POWER, {0.0f, 0.0f}); 320 _memory->WriteEntityData<float>(pillars[5], POWER, {0.0f, 0.0f});
313 // Turn on new starting panels 321 // Turn on new starting panels
314 _memory->WriteEntityData<float>(pillars[randomOrder[0]], POWER, {1.0f, 1.0f}); 322 _memory->WriteEntityData<float>(pillars[randomOrder[0]], POWER, {1.0f, 1.0f});
315 _memory->WriteEntityData<float>(pillars[randomOrder[5]], POWER, {1.0f, 1.0f}); 323 _memory->WriteEntityData<float>(pillars[randomOrder[5]], POWER, {1.0f, 1.0f});*/
316} 324}
317 325
318void Randomizer::RandomizeChallenge() { 326void Randomizer::RandomizeChallenge() {
319 ChallengeRandomizer cr(_memory, Random::RandInt(1, 0x7FFFFFFF)); // 0 will trigger an "RNG not initialized" block 327 /*ChallengeRandomizer cr(_memory, Random::RandInt(1, 0x7FFFFFFF)); // 0 will trigger an "RNG not initialized" block
320 for (int panel : challengePanels) { 328 for (int panel : challengePanels) {
321 _memory->WriteEntityData<int>(panel, POWER_OFF_ON_FAIL, {0}); 329 _memory->WriteEntityData<int>(panel, POWER_OFF_ON_FAIL, {0});
322 } 330 }*/
323} 331}
324 332
325void Randomizer::RandomizeAudioLogs() { 333void Randomizer::RandomizeAudioLogs() {
@@ -338,92 +346,80 @@ void Randomizer::RandomizeRange(std::vector<int> &panels, int flags, size_t star
338 if (panels.size() == 0) return; 346 if (panels.size() == 0) return;
339 if (startIndex >= endIndex) return; 347 if (startIndex >= endIndex) return;
340 if (endIndex >= panels.size()) endIndex = static_cast<int>(panels.size()); 348 if (endIndex >= panels.size()) endIndex = static_cast<int>(panels.size());
341 for (size_t i = endIndex-1; i > startIndex; i--) { 349 for (size_t i = 0; i < panels.size(); i++) {
342 const int target = Random::RandInt(static_cast<int>(startIndex), static_cast<int>(i)); 350 /*const int target = Random::RandInt(static_cast<int>(startIndex), static_cast<int>(i));
343 if (i != target) { 351 if (i != target) {
344 // std::cout << "Swapping panels " << std::hex << panels[i] << " and " << std::hex << panels[target] << std::endl; 352 // std::cout << "Swapping panels " << std::hex << panels[i] << " and " << std::hex << panels[target] << std::endl;
345 SwapPanels(panels[i], panels[target], flags); 353 SwapPanels(panels[i], panels[target], flags);
346 std::swap(panels[i], panels[target]); // Panel indices in the array 354 //std::swap(panels[i], panels[target]); // Panel indices in the array
347 } 355 }*/
356
348 } 357 }
349} 358}
350 359
351void Randomizer::SwapPanels(int panel1, int panel2, int flags) { 360void Randomizer::Tutorialise(int panel1, int tutorialStraight) {
352 std::map<int, int> offsets; 361 //const int tutorialStraight = 0x00064;
353 362
354 if (flags & SWAP::TARGETS) { 363 _memory->CopyEntityData<byte>(tutorialStraight, panel1, PATH_COLOR, 16);
355 offsets[TARGET] = sizeof(int); 364 _memory->CopyEntityData<byte>(tutorialStraight, panel1, REFLECTION_PATH_COLOR, 16);
356 } 365 _memory->CopyEntityData<byte>(tutorialStraight, panel1, DOT_COLOR, 16);
357 if (flags & SWAP::AUDIO_NAMES) { 366 _memory->CopyEntityData<byte>(tutorialStraight, panel1, ACTIVE_COLOR, 16);
358 offsets[AUDIO_LOG_NAME] = sizeof(void*); 367 _memory->CopyEntityData<byte>(tutorialStraight, panel1, BACKGROUND_REGION_COLOR, 12);
359 } 368 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SUCCESS_COLOR_A, 16);
360 if (flags & SWAP::COLORS) { 369 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SUCCESS_COLOR_B, 16);
361 offsets[PATH_COLOR] = 16; 370 _memory->CopyEntityData<byte>(tutorialStraight, panel1, STROBE_COLOR_A, 16);
362 offsets[REFLECTION_PATH_COLOR] = 16; 371 _memory->CopyEntityData<byte>(tutorialStraight, panel1, STROBE_COLOR_B, 16);
363 offsets[DOT_COLOR] = 16; 372 _memory->CopyEntityData<byte>(tutorialStraight, panel1, ERROR_COLOR, 16);
364 offsets[ACTIVE_COLOR] = 16; 373 _memory->CopyEntityData<byte>(tutorialStraight, panel1, PATTERN_POINT_COLOR, 16);
365 offsets[BACKGROUND_REGION_COLOR] = 12; // Not copying alpha to preserve transparency. 374 _memory->CopyEntityData<byte>(tutorialStraight, panel1, PATTERN_POINT_COLOR_A, 16);
366 offsets[SUCCESS_COLOR_A] = 16; 375 _memory->CopyEntityData<byte>(tutorialStraight, panel1, PATTERN_POINT_COLOR_B, 16);
367 offsets[SUCCESS_COLOR_B] = 16; 376 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SYMBOL_A, 16);
368 offsets[STROBE_COLOR_A] = 16; 377 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SYMBOL_B, 16);
369 offsets[STROBE_COLOR_B] = 16; 378 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SYMBOL_C, 16);
370 offsets[ERROR_COLOR] = 16; 379 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SYMBOL_D, 16);
371 offsets[PATTERN_POINT_COLOR] = 16; 380 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SYMBOL_E, 16);
372 offsets[PATTERN_POINT_COLOR_A] = 16; 381 _memory->CopyEntityData<byte>(tutorialStraight, panel1, PUSH_SYMBOL_COLORS, sizeof(int));
373 offsets[PATTERN_POINT_COLOR_B] = 16; 382 _memory->CopyEntityData<byte>(tutorialStraight, panel1, OUTER_BACKGROUND, 16);
374 offsets[SYMBOL_A] = 16; 383 _memory->CopyEntityData<byte>(tutorialStraight, panel1, OUTER_BACKGROUND_MODE, sizeof(int));
375 offsets[SYMBOL_B] = 16; 384 _memory->CopyEntityData<byte>(tutorialStraight, panel1, NUM_COLORED_REGIONS, sizeof(int));
376 offsets[SYMBOL_C] = 16; 385 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, COLORED_REGIONS, NUM_COLORED_REGIONS);
377 offsets[SYMBOL_D] = 16; 386 _memory->CopyEntityData<byte>(tutorialStraight, panel1, TRACED_EDGES, 16);
378 offsets[SYMBOL_E] = 16; 387 _memory->CopyEntityData<byte>(tutorialStraight, panel1, PATH_WIDTH_SCALE, sizeof(float));
379 offsets[PUSH_SYMBOL_COLORS] = sizeof(int); 388 _memory->CopyEntityData<byte>(tutorialStraight, panel1, STARTPOINT_SCALE, sizeof(float));
380 offsets[OUTER_BACKGROUND] = 16; 389 _memory->CopyEntityData<byte>(tutorialStraight, panel1, NUM_DOTS, sizeof(int));
381 offsets[OUTER_BACKGROUND_MODE] = sizeof(int); 390 _memory->CopyEntityData<byte>(tutorialStraight, panel1, NUM_CONNECTIONS, sizeof(int));
382 // These two control the "burn intensity", but I can't swap out burn marks in new ver, so they should probably stay tied to each frame. 391 _memory->CopyArray<float>(tutorialStraight, panel1, DOT_POSITIONS, _memory->ReadEntityData<int>(tutorialStraight, NUM_DOTS, sizeof(int))[0]*2);
383 // offsets[SPECULAR_ADD] = sizeof(float); 392 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DOT_FLAGS, NUM_DOTS);
384 // offsets[SPECULAR_POWER] = sizeof(int); 393 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DOT_CONNECTION_A, NUM_CONNECTIONS);
385 offsets[NUM_COLORED_REGIONS] = sizeof(int); 394 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DOT_CONNECTION_B, NUM_CONNECTIONS);
386 offsets[COLORED_REGIONS] = sizeof(void*); 395 _memory->CopyEntityData<byte>(tutorialStraight, panel1, NUM_DECORATIONS, sizeof(int));
387 } 396 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DECORATIONS, NUM_DECORATIONS);
388 if (flags & SWAP::LINES) { 397 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DECORATION_FLAGS, NUM_DECORATIONS);
389 offsets[TRACED_EDGES] = 16; 398 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DECORATION_COLORS, NUM_DECORATIONS);
390 offsets[AUDIO_PREFIX] = sizeof(void*); 399 //_memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, REFLECTION_DATA, NUM_DOTS);
400 _memory->WritePanelData<long long>(panel1, REFLECTION_DATA, { 0 });
401 _memory->CopyEntityData<byte>(tutorialStraight, panel1, SEQUENCE_LEN, sizeof(int));
402 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, SEQUENCE, SEQUENCE_LEN);
403 _memory->CopyEntityData<byte>(tutorialStraight, panel1, DOT_SEQUENCE_LEN, sizeof(int));
404 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DOT_SEQUENCE, DOT_SEQUENCE_LEN);
405 _memory->CopyEntityData<byte>(tutorialStraight, panel1, DOT_SEQUENCE_LEN_REFLECTION, sizeof(int));
406 _memory->CopyArrayDynamicSize<int>(tutorialStraight, panel1, DOT_SEQUENCE_REFLECTION, DOT_SEQUENCE_LEN_REFLECTION);
407 _memory->CopyEntityData<byte>(tutorialStraight, panel1, GRID_SIZE_X, sizeof(int));
408 _memory->CopyEntityData<byte>(tutorialStraight, panel1, GRID_SIZE_Y, sizeof(int));
409 _memory->CopyEntityData<byte>(tutorialStraight, panel1, STYLE_FLAGS, sizeof(int));
410
411
412
413
414 //arrays.push_back(AUDIO_PREFIX);
391// offsets[IS_CYLINDER] = sizeof(int); 415// offsets[IS_CYLINDER] = sizeof(int);
392// offsets[CYLINDER_Z0] = sizeof(float); 416// offsets[CYLINDER_Z0] = sizeof(float);
393// offsets[CYLINDER_Z1] = sizeof(float); 417// offsets[CYLINDER_Z1] = sizeof(float);
394// offsets[CYLINDER_RADIUS] = sizeof(float); 418// offsets[CYLINDER_RADIUS] = sizeof(float);
395 offsets[PATH_WIDTH_SCALE] = sizeof(float);
396 offsets[STARTPOINT_SCALE] = sizeof(float);
397 offsets[NUM_DOTS] = sizeof(int);
398 offsets[NUM_CONNECTIONS] = sizeof(int);
399 offsets[DOT_POSITIONS] = sizeof(void*);
400 offsets[DOT_FLAGS] = sizeof(void*);
401 offsets[DOT_CONNECTION_A] = sizeof(void*);
402 offsets[DOT_CONNECTION_B] = sizeof(void*);
403 offsets[DECORATIONS] = sizeof(void*);
404 offsets[DECORATION_FLAGS] = sizeof(void*);
405 offsets[DECORATION_COLORS] = sizeof(void*);
406 offsets[NUM_DECORATIONS] = sizeof(int);
407 offsets[REFLECTION_DATA] = sizeof(void*);
408 offsets[GRID_SIZE_X] = sizeof(int);
409 offsets[GRID_SIZE_Y] = sizeof(int);
410 offsets[STYLE_FLAGS] = sizeof(int);
411 offsets[SEQUENCE_LEN] = sizeof(int);
412 offsets[SEQUENCE] = sizeof(void*);
413 offsets[DOT_SEQUENCE_LEN] = sizeof(int);
414 offsets[DOT_SEQUENCE] = sizeof(void*);
415 offsets[DOT_SEQUENCE_LEN_REFLECTION] = sizeof(int);
416 offsets[DOT_SEQUENCE_REFLECTION] = sizeof(void*);
417 offsets[PANEL_TARGET] = sizeof(void*);
418 offsets[SPECULAR_TEXTURE] = sizeof(void*);
419 }
420 419
421 for (auto const& [offset, size] : offsets) { 420 //arrays.push_back(PANEL_TARGET);
422 std::vector<byte> panel1data = _memory->ReadEntityData<byte>(panel1, offset, size); 421 //arrays.push_back(SPECULAR_TEXTURE);
423 std::vector<byte> panel2data = _memory->ReadEntityData<byte>(panel2, offset, size); 422
424 _memory->WriteEntityData<byte>(panel2, offset, panel1data);
425 _memory->WriteEntityData<byte>(panel1, offset, panel2data);
426 }
427} 423}
428 424
429void Randomizer::ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order, std::vector<int> targets) { 425void Randomizer::ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order, std::vector<int> targets) {