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 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'Test/Temp.cpp') 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