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 ------ GithubPackage/setup.exe | Bin 791040 -> 791040 bytes Installer/Installer.vdproj | 32 ++++++++++++++++++++++++++++---- Source/Panel.h | 2 +- 8 files changed, 61 insertions(+), 17 deletions(-) create mode 100644 App/App.rc delete mode 100644 App/Version.rc 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 diff --git a/GithubPackage/setup.exe b/GithubPackage/setup.exe index 223753d..0c95775 100644 Binary files a/GithubPackage/setup.exe and b/GithubPackage/setup.exe differ diff --git a/Installer/Installer.vdproj b/Installer/Installer.vdproj index 18a5315..de202fb 100644 --- a/Installer/Installer.vdproj +++ b/Installer/Installer.vdproj @@ -37,6 +37,14 @@ "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" + "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" + { + "Enabled" = "11:TRUE" + "PromptEnabled" = "11:TRUE" + "PrerequisitesLocation" = "2:1" + "Url" = "8:" + "ComponentsUrl" = "8:" + } } "Release" { @@ -53,6 +61,22 @@ "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" + "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" + { + "Enabled" = "11:TRUE" + "PromptEnabled" = "11:TRUE" + "PrerequisitesLocation" = "2:1" + "Url" = "8:" + "ComponentsUrl" = "8:" + "Items" + { + "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.6.1" + { + "Name" = "8:Microsoft .NET Framework 4.6.1 (x86 and x64)" + "ProductCode" = "8:.NETFramework,Version=v4.6.1" + } + } + } } } "Deployable" @@ -130,15 +154,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Witness Randomizer" - "ProductCode" = "8:{0A0A8EA4-812F-4B39-8C02-9FB2EEFB38FC}" - "PackageCode" = "8:{F7844209-B903-470B-BAFF-39E0C2E6C919}" + "ProductCode" = "8:{BF672BB2-4FD0-44B6-B279-C5F7346649DC}" + "PackageCode" = "8:{F55A05A7-103A-4E8D-B88F-94C00188B9A6}" "UpgradeCode" = "8:{4CB5496B-A47E-41D3-B4A7-677E29AB7513}" "AspNetVersion" = "8:2.0.50727.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:5.1.0" + "ProductVersion" = "8:5.1.1" "Manufacturer" = "8:jbzdarkid" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:https://www.github.com/jbzdarkid/witness-randomizer/issues" @@ -666,7 +690,7 @@ { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9D683AD9CFDD4F1E90EB22DB4509B5E4" { - "SourcePath" = "8:..\\x64\\Debug\\WitnessRandomizer.exe" + "SourcePath" = "8:..\\GithubPackage\\WitnessRandomizer.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_CC86D8CA6D3943FAB5F6A91D54540360" diff --git a/Source/Panel.h b/Source/Panel.h index b8e67df..1f2b8c6 100644 --- a/Source/Panel.h +++ b/Source/Panel.h @@ -53,7 +53,7 @@ enum IntersectionFlags { class Endpoint { public: - enum Direction { + enum class Direction { LEFT, RIGHT, UP, -- cgit 1.4.1