From 3a03f478e407f35bfafd192c22f82bc8c6e25a38 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Wed, 6 Nov 2019 09:19:21 -0800 Subject: And... it works? --- Test/Temp.cpp | 64 ++++++++++++++++++++++++++-------------------------- Test/Test.vcxproj | 16 +++++++++---- Test/packages.config | 2 +- 3 files changed, 45 insertions(+), 37 deletions(-) (limited to 'Test') 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 @@ class Temp : public testing::Test { protected: - std::vector ReadSubtitles(int size) { - Memory memory("witness64_d3d11.exe"); - std::vector data; - data.resize(size); - ReadProcessMemory(memory._handle, (LPVOID)0x3D89F000, &data[0], sizeof(char) * size, nullptr); - return data; - } + std::shared_ptr _memory = std::make_shared("witness64_d3d11.exe"); + // std::vector ReadSubtitles(int size) { + // Memory memory("witness64_d3d11.exe"); + // std::vector data; + // data.resize(size); + // ReadProcessMemory(memory._handle, (LPVOID)0x3D89F000, &data[0], sizeof(char) * size, nullptr); + // return data; + // } }; -TEST(SwapTests, Shipwreck) { - Randomizer randomizer; - int shipwreck = 0xAFB; - int thEntry = 0x288C; - int si1 = 0x00000022; - int bu1 = 0x6; - int td1 = 0x5D; - int ypp = 0x33EA; - int ramp_activation_shapers = 0x21D5; - int mill_upper_5 = 0x146C; - int mill_entry_left = 0x1E5A; - int mill_upper_7 = 0x03686; - - randomizer.SwapPanels(ypp, mill_upper_7, Randomizer::SWAP::LINES); - -} +// TEST_F(Temp, Shipwreck) { +// Randomizer randomizer(_memory); +// int shipwreck = 0xAFB; +// int thEntry = 0x288C; +// int si1 = 0x00000022; +// int bu1 = 0x6; +// int td1 = 0x5D; +// int ypp = 0x33EA; +// int ramp_activation_shapers = 0x21D5; +// int mill_upper_5 = 0x146C; +// int mill_entry_left = 0x1E5A; +// int mill_upper_7 = 0x03686; +// +// randomizer.SwapPanels(ypp, mill_upper_7, Randomizer::SWAP::LINES); +// } /* TEST_F(Temp, Extract) { -// std::vector data = ReadSubtitles(166480); - std::vector data = ReadSubtitles(166480); - std::ofstream file("raw.txt"); - ASSERT_TRUE(file.is_open()); +// std::vector data = ReadSubtitles(166480); + std::vector data = ReadSubtitles(166480); + std::ofstream file("raw.txt"); + ASSERT_TRUE(file.is_open()); - std::string hex = "0123456789ABCDEF"; - for (int i=0; i{6b5df051-a51a-48cb-8acd-c6fad726019f} + + + + - + @@ -51,7 +55,8 @@ pch.h Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true + + EnableFastChecks MultiThreadedDebug Level3 @@ -70,7 +75,8 @@ pch.h Disabled X64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true + + EnableFastChecks MultiThreadedDebug Level3 @@ -94,6 +100,7 @@ ..\Source;%(AdditionalIncludeDirectories) 4996 true + true @@ -113,6 +120,7 @@ ..\Source;%(AdditionalIncludeDirectories) 4996 true + true @@ -125,6 +133,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/Test/packages.config b/Test/packages.config index 1dcab87..a412a41 100644 --- a/Test/packages.config +++ b/Test/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file -- cgit 1.4.1