diff options
| author | jbzdarkid <jbzdarkid@gmail.com> | 2018-10-26 21:09:12 -0700 | 
|---|---|---|
| committer | jbzdarkid <jbzdarkid@gmail.com> | 2018-10-26 21:09:12 -0700 | 
| commit | 9503fc300e1c2d9fcddcf5b8ecc009cd4429337a (patch) | |
| tree | 2be6a28d2e1c5e70a7e83a77f9f53d819ae820fd /WitnessRandomizer/WitnessRandomizer.h | |
| parent | 2270169041973370d171347e534071d34b88714e (diff) | |
| download | witness-tutorializer-9503fc300e1c2d9fcddcf5b8ecc009cd4429337a.tar.gz witness-tutorializer-9503fc300e1c2d9fcddcf5b8ecc009cd4429337a.tar.bz2 witness-tutorializer-9503fc300e1c2d9fcddcf5b8ecc009cd4429337a.zip | |
Change offsets to #defines, support new version
Diffstat (limited to 'WitnessRandomizer/WitnessRandomizer.h')
| -rw-r--r-- | WitnessRandomizer/WitnessRandomizer.h | 134 | 
1 files changed, 129 insertions, 5 deletions
| diff --git a/WitnessRandomizer/WitnessRandomizer.h b/WitnessRandomizer/WitnessRandomizer.h index a824fba..0e88cee 100644 --- a/WitnessRandomizer/WitnessRandomizer.h +++ b/WitnessRandomizer/WitnessRandomizer.h | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | #pragma once | 1 | #pragma once | 
| 2 | 2 | ||
| 3 | //#define GLOBALS 0x5B28C0 | ||
| 4 | #define GLOBALS 0x62A080 | ||
| 5 | |||
| 3 | int SWAP_NONE = 0x0; | 6 | int SWAP_NONE = 0x0; | 
| 4 | int SWAP_TARGETS = 0x1; | 7 | int SWAP_TARGETS = 0x1; | 
| 5 | int SWAP_LINES = 0x2; | 8 | int SWAP_LINES = 0x2; | 
| @@ -16,15 +19,136 @@ public: | |||
| 16 | 19 | ||
| 17 | template <class T> | 20 | template <class T> | 
| 18 | std::vector<T> ReadPanelData(int panel, int offset, int size) { | 21 | std::vector<T> ReadPanelData(int panel, int offset, int size) { | 
| 19 | return _memory.ReadData<T>({_globals, 0x18, panel*8, offset}, size); | 22 | return _memory.ReadData<T>({GLOBALS, 0x18, panel*8, offset}, size); | 
| 20 | } | 23 | } | 
| 21 | 24 | ||
| 22 | template <class T> | 25 | template <class T> | 
| 23 | void WritePanelData(int panel, int offset, const std::vector<T>& data) { | 26 | void WritePanelData(int panel, int offset, const std::vector<T>& data) { | 
| 24 | _memory.WriteData<T>({_globals, 0x18, panel*8, offset}, data); | 27 | _memory.WriteData<T>({GLOBALS, 0x18, panel*8, offset}, data); | 
| 25 | } | 28 | } | 
| 26 | 29 | ||
| 27 | private: | 30 | private: | 
| 28 | Memory _memory; | 31 | Memory _memory = Memory("witness64_d3d11.exe"); | 
| 29 | int _globals = 0x5B28C0; | 32 | }; | 
| 30 | }; \ No newline at end of file | 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 | #elif GLOBALS == 0x62A080 | ||
| 95 | #define PATH_COLOR 0xC0 | ||
| 96 | #define REFLECTION_PATH_COLOR 0xD0 | ||
| 97 | #define DOT_COLOR 0xF0 | ||
| 98 | #define ACTIVE_COLOR 0x100 | ||
| 99 | #define BACKGROUND_REGION_COLOR 0x110 | ||
| 100 | #define SUCCESS_COLOR_A 0x120 | ||
| 101 | #define SUCCESS_COLOR_B 0x130 | ||
| 102 | #define STROBE_COLOR_A 0x140 | ||
| 103 | #define STROBE_COLOR_B 0x150 | ||
| 104 | #define ERROR_COLOR 0x160 | ||
| 105 | #define PATTERN_POINT_COLOR 0x180 | ||
| 106 | #define PATTERN_POINT_COLOR_A 0x190 | ||
| 107 | #define PATTERN_POINT_COLOR_B 0x200 | ||
| 108 | #define SYMBOL_A 0x1B0 | ||
| 109 | #define SYMBOL_B 0x1C0 | ||
| 110 | #define SYMBOL_C 0x1D0 | ||
| 111 | #define SYMBOL_D 0x1E0 | ||
| 112 | #define SYMBOL_E 0x1F0 | ||
| 113 | #define PUSH_SYMBOL_COLORS 0x200 | ||
| 114 | #define OUTER_BACKGROUND 0x204 | ||
| 115 | #define OUTER_BACKGROUND_MODE 0x214 | ||
| 116 | #define TRACED_EDGES 0x228 | ||
| 117 | #define AUDIO_PREFIX 0x270 | ||
| 118 | #define POWER 0x2A0 | ||
| 119 | #define TARGET 0x2B4 | ||
| 120 | #define IS_CYLINDER 0x2F4 | ||
| 121 | #define CYLINDER_Z0 0x2F8 | ||
| 122 | #define CYLINDER_Z1 0x2FC | ||
| 123 | #define CYLINDER_RADIUS 0x300 | ||
| 124 | #define CURSOR_SPEED_SCALE 0x350 | ||
| 125 | #define SPECULAR_ADD 0x38C | ||
| 126 | #define SPECULAR_POWER 0x390 | ||
| 127 | #define PATH_WIDTH_SCALE 0x39C | ||
| 128 | #define STARTPOINT_SCALE 0x3A0 | ||
| 129 | #define NUM_DOTS 0x3B4 | ||
| 130 | #define NUM_CONNECTIONS 0x3B8 | ||
| 131 | #define MAX_BROADCAST_DISTANCE 0x3BC | ||
| 132 | #define DOT_POSITIONS 0x3C0 | ||
| 133 | #define DOT_FLAGS 0x3C8 | ||
| 134 | #define DOT_CONNECTION_A 0x3D0 | ||
| 135 | #define DOT_CONNECTION_B 0x3D8 | ||
| 136 | #define DECORATIONS 0x418 | ||
| 137 | #define DECORATION_FLAGS 0x420 | ||
| 138 | #define DECORATION_COLORS 0x428 | ||
| 139 | #define NUM_DECORATIONS 0x430 | ||
| 140 | #define REFLECTION_DATA 0x438 | ||
| 141 | #define GRID_SIZE_X 0x440 | ||
| 142 | #define GRID_SIZE_Y 0x444 | ||
| 143 | #define STYLE_FLAGS 0x448 | ||
| 144 | #define SEQUENCE_LEN 0x454 | ||
| 145 | #define SEQUENCE 0x458 | ||
| 146 | #define DOT_SEQUENCE_LEN 0x460 | ||
| 147 | #define DOT_SEQUENCE 0x468 | ||
| 148 | #define DOT_SEQUENCE_LEN_REFLECTION 0x470 | ||
| 149 | #define DOT_SEQUENCE_REFLECTION 0x478 | ||
| 150 | #define NUM_COLORED_REGIONS 0x498 | ||
| 151 | #define COLORED_REGIONS 0x4A0 | ||
| 152 | #define PANEL_TARGET 0x4A8 | ||
| 153 | #define SPECULAR_TEXTURE 0x4D0 | ||
| 154 | #endif \ No newline at end of file | ||
