diff options
Diffstat (limited to 'App')
| -rw-r--r-- | App/Main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
| diff --git a/App/Main.cpp b/App/Main.cpp index 7a8e7f3..7e802e9 100644 --- a/App/Main.cpp +++ b/App/Main.cpp | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #include <Richedit.h> | 2 | #include <Richedit.h> |
| 3 | 3 | ||
| 4 | #include <string> | 4 | #include <string> |
| 5 | #include <sstream> | ||
| 5 | 6 | ||
| 6 | #include "Version.h" | 7 | #include "Version.h" |
| 7 | #include "Random.h" | 8 | #include "Random.h" |
| @@ -18,7 +19,7 @@ | |||
| 18 | #define IDC_DUMP 0x408 | 19 | #define IDC_DUMP 0x408 |
| 19 | #define IDT_RANDOMIZED 0x409 | 20 | #define IDT_RANDOMIZED 0x409 |
| 20 | 21 | ||
| 21 | HWND hwndSeed, hwndRandomize; | 22 | HWND hwndSeed, hwndRandomize, hwndDebug; |
| 22 | // int panel = 0x18AF; | 23 | // int panel = 0x18AF; |
| 23 | int panel = 0x33D4; | 24 | int panel = 0x33D4; |
| 24 | std::shared_ptr<Panel> _panel; | 25 | std::shared_ptr<Panel> _panel; |
| @@ -68,12 +69,21 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
| 68 | */ | 69 | */ |
| 69 | if (randomizer->GameIsRandomized()) break; | 70 | if (randomizer->GameIsRandomized()) break; |
| 70 | Random::SetSeed(seed); | 71 | Random::SetSeed(seed); |
| 72 | |||
| 73 | |||
| 74 | std::wstringstream debug; | ||
| 75 | |||
| 71 | std::wstring seedString = std::to_wstring(seed); | 76 | std::wstring seedString = std::to_wstring(seed); |
| 72 | SetWindowText(hwndRandomize, L"Randomizing..."); | 77 | SetWindowText(hwndRandomize, L"Randomizing..."); |
| 73 | SetWindowText(hwndSeed, seedString.c_str()); | 78 | SetWindowText(hwndSeed, seedString.c_str()); |
| 74 | RedrawWindow(hwnd, NULL, NULL, RDW_UPDATENOW); | 79 | RedrawWindow(hwnd, NULL, NULL, RDW_UPDATENOW); |
| 75 | 80 | ||
| 76 | randomizer->Randomize(); | 81 | randomizer->Randomize(); |
| 82 | debug << Random::RandInt(0, 1000) << " "; | ||
| 83 | debug << Random::RandInt(0, 1000) << "\n"; | ||
| 84 | debug << Random::RandInt(0, 1000) << " "; | ||
| 85 | debug << Random::RandInt(0, 1000); | ||
| 86 | SetWindowText(hwndDebug, debug.str().c_str()); | ||
| 77 | if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { | 87 | if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { |
| 78 | randomizer->AdjustSpeed(); | 88 | randomizer->AdjustSpeed(); |
| 79 | } | 89 | } |
| @@ -163,6 +173,10 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd | |||
| 163 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | 173 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, |
| 164 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | 174 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); |
| 165 | 175 | ||
| 176 | hwndDebug = CreateWindow(L"STATIC", L"", | ||
| 177 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 178 | 200, 200, 100, 100, hwnd, NULL, hInstance, NULL); | ||
| 179 | |||
| 166 | /* | 180 | /* |
| 167 | CreateWindow(L"BUTTON", L"", | 181 | CreateWindow(L"BUTTON", L"", |
| 168 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | 182 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, |
