summary refs log tree commit diff stats
path: root/Test/Temp.cpp
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2019-11-06 09:19:21 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2019-11-06 09:19:21 -0800
commit3a03f478e407f35bfafd192c22f82bc8c6e25a38 (patch)
tree0af1c7ec125b098d5cf3c0e19ccf03b511f6d5b9 /Test/Temp.cpp
parent66b2bc177853d33f4559eb240fbbca354b173fa2 (diff)
downloadwitness-tutorializer-3a03f478e407f35bfafd192c22f82bc8c6e25a38.tar.gz
witness-tutorializer-3a03f478e407f35bfafd192c22f82bc8c6e25a38.tar.bz2
witness-tutorializer-3a03f478e407f35bfafd192c22f82bc8c6e25a38.zip
And... it works?
Diffstat (limited to 'Test/Temp.cpp')
-rw-r--r--Test/Temp.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/Test/Temp.cpp b/Test/Temp.cpp index 6a45140..3b31539 100644 --- a/Test/Temp.cpp +++ b/Test/Temp.cpp
@@ -6,45 +6,45 @@
6class Temp : public testing::Test 6class Temp : public testing::Test
7{ 7{
8protected: 8protected:
9 std::vector<char> ReadSubtitles(int size) { 9 std::shared_ptr<Memory> _memory = std::make_shared<Memory>("witness64_d3d11.exe");
10 Memory memory("witness64_d3d11.exe"); 10 // std::vector<char> ReadSubtitles(int size) {
11 std::vector<char> data; 11 // Memory memory("witness64_d3d11.exe");
12 data.resize(size); 12 // std::vector<char> data;
13 ReadProcessMemory(memory._handle, (LPVOID)0x3D89F000, &data[0], sizeof(char) * size, nullptr); 13 // data.resize(size);
14 return data; 14 // ReadProcessMemory(memory._handle, (LPVOID)0x3D89F000, &data[0], sizeof(char) * size, nullptr);
15 } 15 // return data;
16 // }
16}; 17};
17 18
18TEST(SwapTests, Shipwreck) { 19// TEST_F(Temp, Shipwreck) {
19 Randomizer randomizer; 20// Randomizer randomizer(_memory);
20 int shipwreck = 0xAFB; 21// int shipwreck = 0xAFB;
21 int thEntry = 0x288C; 22// int thEntry = 0x288C;
22 int si1 = 0x00000022; 23// int si1 = 0x00000022;
23 int bu1 = 0x6; 24// int bu1 = 0x6;
24 int td1 = 0x5D; 25// int td1 = 0x5D;
25 int ypp = 0x33EA; 26// int ypp = 0x33EA;
26 int ramp_activation_shapers = 0x21D5; 27// int ramp_activation_shapers = 0x21D5;
27 int mill_upper_5 = 0x146C; 28// int mill_upper_5 = 0x146C;
28 int mill_entry_left = 0x1E5A; 29// int mill_entry_left = 0x1E5A;
29 int mill_upper_7 = 0x03686; 30// int mill_upper_7 = 0x03686;
30 31//
31 randomizer.SwapPanels(ypp, mill_upper_7, Randomizer::SWAP::LINES); 32// randomizer.SwapPanels(ypp, mill_upper_7, Randomizer::SWAP::LINES);
32 33// }
33}
34 34
35/* 35/*
36TEST_F(Temp, Extract) { 36TEST_F(Temp, Extract) {
37// std::vector<byte> data = ReadSubtitles(166480); 37// std::vector<byte> data = ReadSubtitles(166480);
38 std::vector<char> data = ReadSubtitles(166480); 38 std::vector<char> data = ReadSubtitles(166480);
39 std::ofstream file("raw.txt"); 39 std::ofstream file("raw.txt");
40 ASSERT_TRUE(file.is_open()); 40 ASSERT_TRUE(file.is_open());
41 41
42 std::string hex = "0123456789ABCDEF"; 42 std::string hex = "0123456789ABCDEF";
43 for (int i=0; i<data.size(); i++) { 43 for (int i=0; i<data.size(); i++) {
44 if (data[i] == '\r') continue; 44 if (data[i] == '\r') continue;
45 file << data[i]; 45 file << data[i];
46 46
47 } 47 }
48 file.close(); 48 file.close();
49} 49}
50*/ \ No newline at end of file 50*/ \ No newline at end of file