Skip to content

Commit

Permalink
Add previously-available settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jbzdarkid committed Nov 7, 2019
1 parent e5e7309 commit 5085af8
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 17 deletions.
7 changes: 7 additions & 0 deletions App/App.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "winres.h"
#include "Version.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION
BEGIN
END
6 changes: 3 additions & 3 deletions App/App.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@
<ItemGroup>
<ClCompile Include="Main.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Version.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Source\Source.vcxproj">
<Project>{6b5df051-a51a-48cb-8acd-c6fad726019f}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="App.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
23 changes: 21 additions & 2 deletions App/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion App/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions App/Version.rc

This file was deleted.

Binary file modified GithubPackage/setup.exe
Binary file not shown.
32 changes: 28 additions & 4 deletions Installer/Installer.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -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"
{
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Source/Panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum IntersectionFlags {

class Endpoint {
public:
enum Direction {
enum class Direction {
LEFT,
RIGHT,
UP,
Expand Down

0 comments on commit 5085af8

Please sign in to comment.