From 4d55d7d9aad8d3c2bedec371c165bbb848c3786b Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Fri, 8 Nov 2019 22:06:07 -0800 Subject: Looks like chained read/write isn't working --- App/Main.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'App') diff --git a/App/Main.cpp b/App/Main.cpp index 39dd517..535a18e 100644 --- a/App/Main.cpp +++ b/App/Main.cpp @@ -27,12 +27,11 @@ #define TMP4 0x504 #include "Panel.h" -int panel = 0x33D4; -std::shared_ptr g_panel; +// int panel = 0x33D4; // Tutorial vault +int panel = 0x0005D; // Outside Tutorial Dots Tutorial 1 +Puzzle g_puzzle; /* ------- Temp ------- */ - - // Globals HWND g_hwnd; HWND g_seed; @@ -133,13 +132,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS)); break; case TMP1: - g_panel = std::make_shared(g_witnessProc, panel); + g_puzzle = PuzzleSerializer(g_witnessProc).ReadPuzzle(panel); break; case TMP2: - if(g_panel) g_panel->Write(panel); - break; - case TMP4: - if(g_panel) g_panel->Serialize(); + PuzzleSerializer(g_witnessProc).WritePuzzle(g_puzzle, panel); break; } } @@ -223,10 +219,9 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS); CreateLabel(30, 340, 205, L"Speed up various autoscrollers"); - // CreateButton(200, 100, 100, L"Read", TMP1); - // CreateButton(200, 130, 100, L"Write", TMP2); - // CreateButton(200, 160, 100, L"Random", TMP3); - // CreateButton(200, 190, 100, L"Dump", TMP4); + CreateButton(200, 100, 100, L"Read", TMP1); + CreateButton(200, 130, 100, L"Write", TMP2); + CreateButton(200, 190, 100, L"Dump", TMP4); g_witnessProc->StartHeartbeat(g_hwnd); -- cgit 1.4.1