From 5085af8b5163f14d37284b5ee0e8fb2c4aaef7cb Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Thu, 7 Nov 2019 09:02:13 -0800 Subject: Add previously-available settings --- App/Main.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'App/Main.cpp') diff --git a/App/Main.cpp b/App/Main.cpp index f8b7422..78726ed 100644 --- a/App/Main.cpp +++ b/App/Main.cpp @@ -17,6 +17,8 @@ #define RANDOMIZE_DONE 0x404 #define RANDOMIZE_CHALLENGE_DONE 0x405 #define CHALLENGE_ONLY 0x406 +#define DISABLE_SNIPES 0x407 +#define SPEED_UP_AUTOSCROLLERS 0x408 // Globals HWND g_hwnd; @@ -79,8 +81,14 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) RedrawWindow(g_seed, NULL, NULL, RDW_UPDATENOW); } Random::SetSeed(seed); - std::thread([hwnd]{ - if (IsDlgButtonChecked(hwnd, CHALLENGE_ONLY)) { + std::thread([]{ + if (IsDlgButtonChecked(g_hwnd, DISABLE_SNIPES)) { + g_randomizer->PreventSnipes(); + } + if (IsDlgButtonChecked(g_hwnd, SPEED_UP_AUTOSCROLLERS)) { + g_randomizer->AdjustSpeed(); + } + if (IsDlgButtonChecked(g_hwnd, CHALLENGE_ONLY)) { SetWindowText(g_randomizerStatus, L"Randomizing Challenge..."); g_randomizer->RandomizeChallenge(); PostMessage(g_hwnd, WM_COMMAND, RANDOMIZE_CHALLENGE_DONE, NULL); @@ -106,6 +114,12 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) PostMessage(g_hwnd, WM_COMMAND, RANDOMIZE_READY, NULL); } break; + case DISABLE_SNIPES: + CheckDlgButton(hwnd, DISABLE_SNIPES, !IsDlgButtonChecked(hwnd, DISABLE_SNIPES)); + break; + case SPEED_UP_AUTOSCROLLERS: + CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS)); + break; } } return DefWindowProc(hwnd, message, wParam, lParam); @@ -167,6 +181,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance EnableWindow(g_randomizerStatus, FALSE); CreateCheckbox(10, 300, CHALLENGE_ONLY); CreateLabel(30, 300, 200, L"Randomize the challenge only"); + CreateCheckbox(10, 320, DISABLE_SNIPES); + CheckDlgButton(g_hwnd, DISABLE_SNIPES, TRUE); + CreateLabel(30, 320, 240, L"Disable Swamp and Shadows snipes"); + CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS); + CreateLabel(30, 340, 205, L"Speed up various autoscrollers"); EnableWindow(g_randomizerStatus, FALSE); g_witnessProc->StartHeartbeat(g_hwnd); -- cgit 1.4.1