about summary refs log tree commit diff stats
path: root/WitnessRandomizer/WitnessRandomizer.h
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-10-27 23:28:42 -0700
committerjbzdarkid <jbzdarkid@gmail.com>2018-10-27 23:28:42 -0700
commit2c9afc07fe5cc53fefb90540d5db2ca424c71a51 (patch)
tree55ba19ae0e3f52f732d9382b6deccf6d879035c7 /WitnessRandomizer/WitnessRandomizer.h
parentecc14a3463c0c1c52b5de17d2aeb719ce2942a4a (diff)
downloadwitness-tutorializer-2c9afc07fe5cc53fefb90540d5db2ca424c71a51.tar.gz
witness-tutorializer-2c9afc07fe5cc53fefb90540d5db2ca424c71a51.tar.bz2
witness-tutorializer-2c9afc07fe5cc53fefb90540d5db2ca424c71a51.zip
Major restructuring -- also set up for UI work tomorrow
Diffstat (limited to 'WitnessRandomizer/WitnessRandomizer.h')
-rw-r--r--WitnessRandomizer/WitnessRandomizer.h156
1 files changed, 0 insertions, 156 deletions
diff --git a/WitnessRandomizer/WitnessRandomizer.h b/WitnessRandomizer/WitnessRandomizer.h deleted file mode 100644 index d65cce3..0000000 --- a/WitnessRandomizer/WitnessRandomizer.h +++ /dev/null
@@ -1,156 +0,0 @@
1#pragma once
2
3// #define GLOBALS 0x5B28C0
4#define GLOBALS 0x62A080
5
6int SWAP_NONE = 0x0;
7int SWAP_TARGETS = 0x1;
8int SWAP_LINES = 0x2;
9int SWAP_STYLE = 0x4;
10
11class WitnessRandomizer {
12public:
13 WitnessRandomizer();
14
15 void Randomize(std::vector<int>& panels, int flags);
16 void RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex);
17 void SwapPanels(int panel1, int panel2, int flags);
18 void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order);
19
20 template <class T>
21 std::vector<T> ReadPanelData(int panel, int offset, size_t size) {
22 return _memory.ReadData<T>({GLOBALS, 0x18, panel*8, offset}, size);
23 }
24
25 template <class T>
26 void WritePanelData(int panel, int offset, const std::vector<T>& data) {
27 _memory.WriteData<T>({GLOBALS, 0x18, panel*8, offset}, data);
28 }
29
30private:
31 Memory _memory = Memory("witness64_d3d11.exe");
32};
33
34#if GLOBALS == 0x5B28C0
35#define PATH_COLOR 0xC8
36#define REFLECTION_PATH_COLOR 0xD8
37#define DOT_COLOR 0xF8
38#define ACTIVE_COLOR 0x108
39#define BACKGROUND_REGION_COLOR 0x118
40#define SUCCESS_COLOR_A 0x128
41#define SUCCESS_COLOR_B 0x138
42#define STROBE_COLOR_A 0x148
43#define STROBE_COLOR_B 0x158
44#define ERROR_COLOR 0x168
45#define PATTERN_POINT_COLOR 0x188
46#define PATTERN_POINT_COLOR_A 0x198
47#define PATTERN_POINT_COLOR_B 0x1A8
48#define SYMBOL_A 0x1B8
49#define SYMBOL_B 0x1C8
50#define SYMBOL_C 0x1D8
51#define SYMBOL_D 0x1E8
52#define SYMBOL_E 0x1F8
53#define PUSH_SYMBOL_COLORS 0x208
54#define OUTER_BACKGROUND 0x20C
55#define OUTER_BACKGROUND_MODE 0x21C
56#define TRACED_EDGES 0x230
57#define AUDIO_PREFIX 0x278
58#define POWER 0x2A8
59#define TARGET 0x2BC
60#define IS_CYLINDER 0x2FC
61#define CYLINDER_Z0 0x300
62#define CYLINDER_Z1 0x304
63#define CYLINDER_RADIUS 0x308
64#define CURSOR_SPEED_SCALE 0x358
65#define SPECULAR_ADD 0x398
66#define SPECULAR_POWER 0x39C
67#define PATH_WIDTH_SCALE 0x3A4
68#define STARTPOINT_SCALE 0x3A8
69#define NUM_DOTS 0x3B8
70#define NUM_CONNECTIONS 0x3BC
71#define MAX_BROADCAST_DISTANCE 0x3C0
72#define DOT_POSITIONS 0x3C8
73#define DOT_FLAGS 0x3D0
74#define DOT_CONNECTION_A 0x3D8
75#define DOT_CONNECTION_B 0x3E0
76#define DECORATIONS 0x420
77#define DECORATION_FLAGS 0x428
78#define DECORATION_COLORS 0x430
79#define NUM_DECORATIONS 0x438
80#define REFLECTION_DATA 0x440
81#define GRID_SIZE_X 0x448
82#define GRID_SIZE_Y 0x44C
83#define STYLE_FLAGS 0x450
84#define SEQUENCE_LEN 0x45C
85#define SEQUENCE 0x460
86#define DOT_SEQUENCE_LEN 0x468
87#define DOT_SEQUENCE 0x470
88#define DOT_SEQUENCE_LEN_REFLECTION 0x478
89#define DOT_SEQUENCE_REFLECTION 0x480
90#define NUM_COLORED_REGIONS 0x4A0
91#define COLORED_REGIONS 0x4A8
92#define PANEL_TARGET 0x4B0
93#define SPECULAR_TEXTURE 0x4D8
94#define CABLE_TARGET_2 0xD8
95#elif GLOBALS == 0x62A080
96#define PATH_COLOR 0xC0
97#define REFLECTION_PATH_COLOR 0xD0
98#define DOT_COLOR 0xF0
99#define ACTIVE_COLOR 0x100
100#define BACKGROUND_REGION_COLOR 0x110
101#define SUCCESS_COLOR_A 0x120
102#define SUCCESS_COLOR_B 0x130
103#define STROBE_COLOR_A 0x140
104#define STROBE_COLOR_B 0x150
105#define ERROR_COLOR 0x160
106#define PATTERN_POINT_COLOR 0x180
107#define PATTERN_POINT_COLOR_A 0x190
108#define PATTERN_POINT_COLOR_B 0x1A0
109#define SYMBOL_A 0x1B0
110#define SYMBOL_B 0x1C0
111#define SYMBOL_C 0x1D0
112#define SYMBOL_D 0x1E0
113#define SYMBOL_E 0x1F0
114#define PUSH_SYMBOL_COLORS 0x200
115#define OUTER_BACKGROUND 0x204
116#define OUTER_BACKGROUND_MODE 0x214
117#define TRACED_EDGES 0x228
118#define AUDIO_PREFIX 0x270
119#define POWER 0x2A0
120#define TARGET 0x2B4
121#define IS_CYLINDER 0x2F4
122#define CYLINDER_Z0 0x2F8
123#define CYLINDER_Z1 0x2FC
124#define CYLINDER_RADIUS 0x300
125#define CURSOR_SPEED_SCALE 0x350
126#define SPECULAR_ADD 0x38C
127#define SPECULAR_POWER 0x390
128#define PATH_WIDTH_SCALE 0x39C
129#define STARTPOINT_SCALE 0x3A0
130#define NUM_DOTS 0x3B4
131#define NUM_CONNECTIONS 0x3B8
132#define MAX_BROADCAST_DISTANCE 0x3BC
133#define DOT_POSITIONS 0x3C0
134#define DOT_FLAGS 0x3C8
135#define DOT_CONNECTION_A 0x3D0
136#define DOT_CONNECTION_B 0x3D8
137#define DECORATIONS 0x418
138#define DECORATION_FLAGS 0x420
139#define DECORATION_COLORS 0x428
140#define NUM_DECORATIONS 0x430
141#define REFLECTION_DATA 0x438
142#define GRID_SIZE_X 0x440
143#define GRID_SIZE_Y 0x444
144#define STYLE_FLAGS 0x448
145#define SEQUENCE_LEN 0x454
146#define SEQUENCE 0x458
147#define DOT_SEQUENCE_LEN 0x460
148#define DOT_SEQUENCE 0x468
149#define DOT_SEQUENCE_LEN_REFLECTION 0x470
150#define DOT_SEQUENCE_REFLECTION 0x478
151#define NUM_COLORED_REGIONS 0x498
152#define COLORED_REGIONS 0x4A0
153#define PANEL_TARGET 0x4A8
154#define SPECULAR_TEXTURE 0x4D0
155#define CABLE_TARGET_2 0xD0
156#endif \ No newline at end of file