From 1501b173c058f11e53507532ad583a6ac9c061cc Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Sat, 17 Nov 2018 14:02:28 -0800 Subject: 4.0.5 --- Test/Temp.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'Test') diff --git a/Test/Temp.cpp b/Test/Temp.cpp index c847c6b..6ccaeff 100644 --- a/Test/Temp.cpp +++ b/Test/Temp.cpp @@ -1,7 +1,21 @@ #include "gtest/gtest.h" #include "Randomizer.h" +#include +#include -GTEST_TEST(SwapTests, Shipwreck) { +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; + } +}; + +TEST(SwapTests, Shipwreck) { Randomizer randomizer; int shipwreck = 0xAFB; int thEntry = 0x288C; @@ -17,3 +31,18 @@ GTEST_TEST(SwapTests, Shipwreck) { 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::string hex = "0123456789ABCDEF"; + for (int i=0; i