about summary refs log tree commit diff stats
path: root/App/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'App/Main.cpp')
-rw-r--r--App/Main.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/App/Main.cpp b/App/Main.cpp index ce0e550..48cb93d 100644 --- a/App/Main.cpp +++ b/App/Main.cpp
@@ -3,9 +3,9 @@
3 3
4#include <string> 4#include <string>
5 5
6#include "Randomizer.h"
7#include "Version.h" 6#include "Version.h"
8#include "Random.h" 7#include "Random.h"
8#include "Randomizer.h"
9#include "Panel.h" 9#include "Panel.h"
10 10
11#define IDC_RANDOMIZE 0x401 11#define IDC_RANDOMIZE 0x401
@@ -18,8 +18,8 @@
18#define IDC_DUMP 0x408 18#define IDC_DUMP 0x408
19 19
20HWND hwndSeed, hwndRandomize; 20HWND hwndSeed, hwndRandomize;
21// int panel = 0x18AF; 21int panel = 0x18AF;
22int panel = 0x33D4; 22// int panel = 0x33D4;
23std::shared_ptr<Panel> _panel; 23std::shared_ptr<Panel> _panel;
24 24
25LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 25LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
@@ -53,16 +53,16 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
53 wasSeedRandomlyGenerated = false; 53 wasSeedRandomlyGenerated = false;
54 } 54 }
55 55
56 Randomizer randomizer; 56 Randomizer randomizer;
57 short metadata = randomizer.Randomize(seed); 57 short metadata = randomizer.Randomize(seed);
58 if (metadata & 0x1) break; // Was already randomized 58 if (metadata & 0x1) break; // Was already randomized
59 59
60 std::wstring seedString = std::to_wstring(seed); 60 std::wstring seedString = std::to_wstring(seed);
61 SetWindowText(hwndSeed, seedString.c_str()); 61 SetWindowText(hwndSeed, seedString.c_str());
62 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { 62 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) {
63 randomizer.AdjustSpeed(); 63 randomizer.AdjustSpeed();
64 } 64 }
65 SetWindowText(hwndRandomize, L"Randomized!"); 65 SetWindowText(hwndRandomize, L"Randomized!");
66 break; 66 break;
67 } 67 }
68 case IDC_READ: 68 case IDC_READ:
@@ -75,7 +75,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
75 _panel->Write(panel); 75 _panel->Write(panel);
76 break; 76 break;
77 case IDC_DUMP: 77 case IDC_DUMP:
78 _panel->Serialize(); 78 // _panel->Serialize();
79 break; 79 break;
80 } 80 }
81 } 81 }
@@ -113,7 +113,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
113 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 113 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
114 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); 114 10, 15, 90, 16, hwnd, NULL, hInstance, NULL);
115 hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"", 115 hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"",
116 WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER, 116 WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER,
117 100, 10, 50, 26, hwnd, NULL, hInstance, NULL); 117 100, 10, 50, 26, hwnd, NULL, hInstance, NULL);
118 hwndRandomize = CreateWindow(L"BUTTON", L"Randomize", 118 hwndRandomize = CreateWindow(L"BUTTON", L"Randomize",
119 WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 119 WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
@@ -176,7 +176,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
176 CreateWindow(L"STATIC", L"Prevent sniping certain puzzles", 176 CreateWindow(L"STATIC", L"Prevent sniping certain puzzles",
177 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 177 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
178 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); 178 27, 50, 205, 16, hwnd, NULL, hInstance, NULL);
179 179
180*/ 180*/
181 181
182 ShowWindow(hwnd, nCmdShow); 182 ShowWindow(hwnd, nCmdShow);