about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-10-22 21:32:20 -0700
committerjbzdarkid <jbzdarkid@gmail.com>2018-10-22 21:32:20 -0700
commit4da4677cb662108502791e49078df386949c0e21 (patch)
tree3b9380a3a253b776e3b4a083717d1d89053571a9
parentf255be24d96352c43ec5197cf1bfd6a5a7bb47be (diff)
downloadwitness-tutorializer-4da4677cb662108502791e49078df386949c0e21.tar.gz
witness-tutorializer-4da4677cb662108502791e49078df386949c0e21.tar.bz2
witness-tutorializer-4da4677cb662108502791e49078df386949c0e21.zip
Ideas & bugs & zzzzz
-rw-r--r--WitnessRandomizer/Memory.h5
-rw-r--r--WitnessRandomizer/WitnessRandomizer.cppbin13170 -> 24480 bytes
-rw-r--r--WitnessRandomizer/WitnessRandomizer.h12
3 files changed, 9 insertions, 8 deletions
diff --git a/WitnessRandomizer/Memory.h b/WitnessRandomizer/Memory.h index 2453cf0..6b50948 100644 --- a/WitnessRandomizer/Memory.h +++ b/WitnessRandomizer/Memory.h
@@ -24,10 +24,11 @@ public:
24 } 24 }
25 25
26 template <class T> 26 template <class T>
27 void WriteData(const std::vector<int>& offsets, const std::vector<T>& data) { 27 bool WriteData(const std::vector<int>& offsets, const std::vector<T>& data) {
28 if (!WriteProcessMemory(_handle, (LPVOID)ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), NULL)) { 28 if (!WriteProcessMemory(_handle, (LPVOID)ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), NULL)) {
29 ThrowError(); 29 return false;
30 } 30 }
31 return true;
31 } 32 }
32 33
33private: 34private:
diff --git a/WitnessRandomizer/WitnessRandomizer.cpp b/WitnessRandomizer/WitnessRandomizer.cpp index ebf0146..9d3e917 100644 --- a/WitnessRandomizer/WitnessRandomizer.cpp +++ b/WitnessRandomizer/WitnessRandomizer.cpp
Binary files differ
diff --git a/WitnessRandomizer/WitnessRandomizer.h b/WitnessRandomizer/WitnessRandomizer.h index 26affa3..182c88e 100644 --- a/WitnessRandomizer/WitnessRandomizer.h +++ b/WitnessRandomizer/WitnessRandomizer.h
@@ -2,18 +2,18 @@
2 2
3int SWAP_TARGETS = 0x1; 3int SWAP_TARGETS = 0x1;
4int SWAP_PATHWAYS = 0x2; 4int SWAP_PATHWAYS = 0x2;
5int SWAP_STYLE = 0x40; 5int SWAP_STYLE = 0x4;
6int SWAP_COLORS = 0x4; 6int SWAP_COLORS = 0x8;
7int SWAP_TRACED = 0x80; 7int SWAP_TRACED = 0x10;
8 8
9 9
10int SWAP_SIZE = 0x8; 10int SWAP_SIZE = 0x20;
11 11
12 12
13class WitnessRandomizer { 13class WitnessRandomizer {
14public: 14public:
15 15
16 WitnessRandomizer() = default; 16 WitnessRandomizer();
17 17
18 void Randomize(std::vector<int> panels, int flags); 18 void Randomize(std::vector<int> panels, int flags);
19 void SwapPanels(int panel1, int panel2, int flags); 19 void SwapPanels(int panel1, int panel2, int flags);
@@ -21,5 +21,5 @@ public:
21private: 21private:
22 void SwapPanelData(int panel1, int panel2, int finalOffset, int dataSize); 22 void SwapPanelData(int panel1, int panel2, int finalOffset, int dataSize);
23 23
24 Memory _memory = Memory("witness64_d3d11.exe"); 24 Memory _memory;
25}; \ No newline at end of file 25}; \ No newline at end of file