From c10b73f30280e5dd758b77e2ef8e5a622ff3c876 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Sun, 18 Nov 2018 14:34:34 -0800 Subject: Works, on old version --- App/Main.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'App') 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 @@ #include #include +#include #include "Version.h" #include "Random.h" @@ -18,7 +19,7 @@ #define IDC_DUMP 0x408 #define IDT_RANDOMIZED 0x409 -HWND hwndSeed, hwndRandomize; +HWND hwndSeed, hwndRandomize, hwndDebug; // int panel = 0x18AF; int panel = 0x33D4; std::shared_ptr _panel; @@ -68,12 +69,21 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) */ if (randomizer->GameIsRandomized()) break; Random::SetSeed(seed); + + + std::wstringstream debug; + std::wstring seedString = std::to_wstring(seed); SetWindowText(hwndRandomize, L"Randomizing..."); SetWindowText(hwndSeed, seedString.c_str()); RedrawWindow(hwnd, NULL, NULL, RDW_UPDATENOW); randomizer->Randomize(); + debug << Random::RandInt(0, 1000) << " "; + debug << Random::RandInt(0, 1000) << "\n"; + debug << Random::RandInt(0, 1000) << " "; + debug << Random::RandInt(0, 1000); + SetWindowText(hwndDebug, debug.str().c_str()); if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { randomizer->AdjustSpeed(); } @@ -163,6 +173,10 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + hwndDebug = CreateWindow(L"STATIC", L"", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 200, 200, 100, 100, hwnd, NULL, hInstance, NULL); + /* CreateWindow(L"BUTTON", L"", WS_VISIBLE | WS_CHILD | BS_CHECKBOX, -- cgit 1.4.1