summary refs log tree commit diff stats
path: root/App
diff options
context:
space:
mode:
Diffstat (limited to 'App')
-rw-r--r--App/Main.cpp21
1 files changed, 8 insertions, 13 deletions
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 @@
27#define TMP4 0x504 27#define TMP4 0x504
28 28
29#include "Panel.h" 29#include "Panel.h"
30int panel = 0x33D4; 30// int panel = 0x33D4; // Tutorial vault
31std::shared_ptr<Panel> g_panel; 31int panel = 0x0005D; // Outside Tutorial Dots Tutorial 1
32Puzzle g_puzzle;
32/* ------- Temp ------- */ 33/* ------- Temp ------- */
33 34
34
35
36// Globals 35// Globals
37HWND g_hwnd; 36HWND g_hwnd;
38HWND g_seed; 37HWND g_seed;
@@ -133,13 +132,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
133 CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS)); 132 CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS));
134 break; 133 break;
135 case TMP1: 134 case TMP1:
136 g_panel = std::make_shared<Panel>(g_witnessProc, panel); 135 g_puzzle = PuzzleSerializer(g_witnessProc).ReadPuzzle(panel);
137 break; 136 break;
138 case TMP2: 137 case TMP2:
139 if(g_panel) g_panel->Write(panel); 138 PuzzleSerializer(g_witnessProc).WritePuzzle(g_puzzle, panel);
140 break;
141 case TMP4:
142 if(g_panel) g_panel->Serialize();
143 break; 139 break;
144 } 140 }
145 } 141 }
@@ -223,10 +219,9 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
223 CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS); 219 CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS);
224 CreateLabel(30, 340, 205, L"Speed up various autoscrollers"); 220 CreateLabel(30, 340, 205, L"Speed up various autoscrollers");
225 221
226 // CreateButton(200, 100, 100, L"Read", TMP1); 222 CreateButton(200, 100, 100, L"Read", TMP1);
227 // CreateButton(200, 130, 100, L"Write", TMP2); 223 CreateButton(200, 130, 100, L"Write", TMP2);
228 // CreateButton(200, 160, 100, L"Random", TMP3); 224 CreateButton(200, 190, 100, L"Dump", TMP4);
229 // CreateButton(200, 190, 100, L"Dump", TMP4);
230 225
231 g_witnessProc->StartHeartbeat(g_hwnd); 226 g_witnessProc->StartHeartbeat(g_hwnd);
232 227