about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-12-02 14:34:28 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2018-12-02 14:34:28 -0800
commit53bf008124d496c728099520dd2a9e06b6767ea1 (patch)
tree63baf75638796ce0a662b80d3f66a6b14f1efb32
parent76a0af6f8722673d3648604d7ae7c7acb3818f52 (diff)
downloadwitness-tutorializer-53bf008124d496c728099520dd2a9e06b6767ea1.tar.gz
witness-tutorializer-53bf008124d496c728099520dd2a9e06b6767ea1.tar.bz2
witness-tutorializer-53bf008124d496c728099520dd2a9e06b6767ea1.zip
No more desert color swapping
-rw-r--r--Source/Randomizer.cpp38
-rw-r--r--Source/Randomizer.h1
2 files changed, 24 insertions, 15 deletions
diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp index 48e9a4b..e0cbb2b 100644 --- a/Source/Randomizer.cpp +++ b/Source/Randomizer.cpp
@@ -1,24 +1,29 @@
1/* 1/*
2 * Random *rotation* of desert laser redirect?
3 * Disable wonkavator and hotel, so that 100% runs are possible
4 * Try to wire up both keep halves
5 * Wire up both halves of symmetry laser
6 * Turn off floating panel in desert
7
8
9 * Speed up *everything* ? Or maybe we'll just stop using this setting entirely.
10
11
2 * BUGS: 12 * BUGS:
3 * Shipwreck vault is solved reversed? -> Not reversed, just "half", you can normally solve orange. Seems to need pattern name. 13 * Shipwreck vault is solved reversed? -> Not reversed, just "half", you can normally solve orange. Seems to need pattern name.
4 * Tutorial sounds don't always play -> Unsure. Not controlled by pattern name. 14 * Tutorial sounds don't always play -> Unsure. Not controlled by pattern name.
5 * Make sure that monastery 1 isn't forced to trigger monastery 2
6 * Rainbow seems to be not copying background? 15 * Rainbow seems to be not copying background?
7 ** Rainbow 1 <-> Green 3 (the poly one) worked 16 ** Rainbow 1 <-> Green 3 (the poly one) worked
8 ** Rainbow 2 <-> Treehouse Right Orange 1 didn't 17 ** Rainbow 2 <-> Treehouse Right Orange 1 didn't
9 * FEATURES: 18 * FEATURES:
10 * Start the game if it isn't running? 19 * Start the game if it isn't running?
11 * Stop swapping colors in desert
12 * Randomize audio logs -- Hard, seem to be unloaded some times? 20 * Randomize audio logs -- Hard, seem to be unloaded some times?
13 * Swap sounds in jungle (along with panels) -- maybe impossible 21 * Swap sounds in jungle (along with panels) -- maybe impossible
14 * Make orange 7 (all of oranges?) hard. Like big = hard. (See: HARD_MODE) 22 * Make orange 7 (all of oranges?) hard. Like big = hard. (See: HARD_MODE)
15 * Add a setting for "disable wonkavator and hotel", so that 100% runs are possible
16 * I probably can randomize targets in bunker UV
17 * Random *rotation* of desert laser redirect?
18 * Add setting to disable laser randomization
19 * Try randomizing default-on for pitches & bunker 23 * Try randomizing default-on for pitches & bunker
20 * Try turning on first half of wire in shadows once tutorial is done 24 * Try turning on first half of wire in shadows once tutorial is done
21 * It might be possible to remove the texture on top of rainbow 5 (so that any panel can be placed there) 25 * It might be possible to remove the texture on top of rainbow 5 (so that any panel can be placed there)
26 * 20 challenges with 20 consecutive seeds
22*/ 27*/
23#include "Memory.h" 28#include "Memory.h"
24#include "Randomizer.h" 29#include "Randomizer.h"
@@ -58,10 +63,10 @@ void Randomizer::Randomize()
58 RandomizeChallenge(); 63 RandomizeChallenge();
59 64
60 // Content swaps -- must happen before squarePanels 65 // Content swaps -- must happen before squarePanels
61 Randomize(upDownPanels, SWAP::LINES); 66 Randomize(upDownPanels, SWAP::LINES | SWAP::COLORS);
62 Randomize(leftForwardRightPanels, SWAP::LINES); 67 Randomize(leftForwardRightPanels, SWAP::LINES | SWAP::COLORS);
63 68
64 Randomize(squarePanels, SWAP::LINES); 69 Randomize(squarePanels, SWAP::LINES | SWAP::COLORS);
65 70
66 // Individual area modifications 71 // Individual area modifications
67 RandomizeTutorial(); 72 RandomizeTutorial();
@@ -200,7 +205,7 @@ void Randomizer::RandomizeSwamp() {
200 205
201void Randomizer::RandomizeMountain() { 206void Randomizer::RandomizeMountain() {
202 // Randomize multipanel 207 // Randomize multipanel
203 Randomize(mountainMultipanel, SWAP::LINES); 208 Randomize(mountainMultipanel, SWAP::LINES | SWAP::COLORS);
204 209
205 // Randomize final pillars order 210 // Randomize final pillars order
206 std::vector<int> targets = {pillars[0] + 1}; 211 std::vector<int> targets = {pillars[0] + 1};
@@ -262,7 +267,7 @@ void Randomizer::SwapPanels(int panel1, int panel2, int flags) {
262 if (flags & SWAP::AUDIO_NAMES) { 267 if (flags & SWAP::AUDIO_NAMES) {
263 offsets[AUDIO_LOG_NAME] = sizeof(void*); 268 offsets[AUDIO_LOG_NAME] = sizeof(void*);
264 } 269 }
265 if (flags & SWAP::LINES) { 270 if (flags & SWAP::COLORS) {
266 offsets[PATH_COLOR] = 16; 271 offsets[PATH_COLOR] = 16;
267 offsets[REFLECTION_PATH_COLOR] = 16; 272 offsets[REFLECTION_PATH_COLOR] = 16;
268 offsets[DOT_COLOR] = 16; 273 offsets[DOT_COLOR] = 16;
@@ -284,14 +289,19 @@ void Randomizer::SwapPanels(int panel1, int panel2, int flags) {
284 offsets[PUSH_SYMBOL_COLORS] = sizeof(int); 289 offsets[PUSH_SYMBOL_COLORS] = sizeof(int);
285 offsets[OUTER_BACKGROUND] = 16; 290 offsets[OUTER_BACKGROUND] = 16;
286 offsets[OUTER_BACKGROUND_MODE] = sizeof(int); 291 offsets[OUTER_BACKGROUND_MODE] = sizeof(int);
292 // 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.
293 // offsets[SPECULAR_ADD] = sizeof(float);
294 // offsets[SPECULAR_POWER] = sizeof(int);
295 offsets[NUM_COLORED_REGIONS] = sizeof(int);
296 offsets[COLORED_REGIONS] = sizeof(void*);
297 }
298 if (flags & SWAP::LINES) {
287 offsets[TRACED_EDGES] = 16; 299 offsets[TRACED_EDGES] = 16;
288 offsets[AUDIO_PREFIX] = sizeof(void*); 300 offsets[AUDIO_PREFIX] = sizeof(void*);
289// offsets[IS_CYLINDER] = sizeof(int); 301// offsets[IS_CYLINDER] = sizeof(int);
290// offsets[CYLINDER_Z0] = sizeof(float); 302// offsets[CYLINDER_Z0] = sizeof(float);
291// offsets[CYLINDER_Z1] = sizeof(float); 303// offsets[CYLINDER_Z1] = sizeof(float);
292// offsets[CYLINDER_RADIUS] = sizeof(float); 304// offsets[CYLINDER_RADIUS] = sizeof(float);
293 offsets[SPECULAR_ADD] = sizeof(float);
294 offsets[SPECULAR_POWER] = sizeof(int);
295 offsets[PATH_WIDTH_SCALE] = sizeof(float); 305 offsets[PATH_WIDTH_SCALE] = sizeof(float);
296 offsets[STARTPOINT_SCALE] = sizeof(float); 306 offsets[STARTPOINT_SCALE] = sizeof(float);
297 offsets[NUM_DOTS] = sizeof(int); 307 offsets[NUM_DOTS] = sizeof(int);
@@ -314,8 +324,6 @@ void Randomizer::SwapPanels(int panel1, int panel2, int flags) {
314 offsets[DOT_SEQUENCE] = sizeof(void*); 324 offsets[DOT_SEQUENCE] = sizeof(void*);
315 offsets[DOT_SEQUENCE_LEN_REFLECTION] = sizeof(int); 325 offsets[DOT_SEQUENCE_LEN_REFLECTION] = sizeof(int);
316 offsets[DOT_SEQUENCE_REFLECTION] = sizeof(void*); 326 offsets[DOT_SEQUENCE_REFLECTION] = sizeof(void*);
317 offsets[NUM_COLORED_REGIONS] = sizeof(int);
318 offsets[COLORED_REGIONS] = sizeof(void*);
319 offsets[PANEL_TARGET] = sizeof(void*); 327 offsets[PANEL_TARGET] = sizeof(void*);
320 offsets[SPECULAR_TEXTURE] = sizeof(void*); 328 offsets[SPECULAR_TEXTURE] = sizeof(void*);
321 } 329 }
diff --git a/Source/Randomizer.h b/Source/Randomizer.h index 88afcc6..8c4d253 100644 --- a/Source/Randomizer.h +++ b/Source/Randomizer.h
@@ -18,6 +18,7 @@ public:
18 TARGETS = 1, 18 TARGETS = 1,
19 LINES = 2, 19 LINES = 2,
20 AUDIO_NAMES = 4, 20 AUDIO_NAMES = 4,
21 COLORS = 8,
21 }; 22 };
22 23
23private: 24private: