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/App.rc | 7 +++++++ App/App.vcxproj | 6 +++--- App/Main.cpp | 23 +++++++++++++++++++++-- App/Version.h | 2 +- App/Version.rc | 6 ------ 5 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 App/App.rc delete mode 100644 App/Version.rc (limited to 'App') diff --git a/App/App.rc b/App/App.rc new file mode 100644 index 0000000..760bba0 --- /dev/null +++ b/App/App.rc @@ -0,0 +1,7 @@ +#include "winres.h" +#include "Version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION +BEGIN +END diff --git a/App/App.vcxproj b/App/App.vcxproj index 698d364..25ec076 100644 --- a/App/App.vcxproj +++ b/App/App.vcxproj @@ -173,14 +173,14 @@ - - - {6b5df051-a51a-48cb-8acd-c6fad726019f} + + + 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); diff --git a/App/Version.h b/App/Version.h index cbb8fa3..32753aa 100644 --- a/App/Version.h +++ b/App/Version.h @@ -5,7 +5,7 @@ #define MAJOR 5 #define MINOR 1 -#define PATCH 0 +#define PATCH 1 #define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) #define VERSION MAJOR, MINOR, PATCH diff --git a/App/Version.rc b/App/Version.rc deleted file mode 100644 index 9b90884..0000000 --- a/App/Version.rc +++ /dev/null @@ -1,6 +0,0 @@ -#include "version.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION -BEGIN -END -- cgit 1.4.1