summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2019-11-07 09:02:13 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2019-11-07 09:02:13 -0800
commit5085af8b5163f14d37284b5ee0e8fb2c4aaef7cb (patch)
treefa222a472835953e0eada02ed2350e3aeefcfe08
parente5e7309fc273dcc2cb2b6dd727117fd11ae38d0f (diff)
downloadwitness-tutorializer-5085af8b5163f14d37284b5ee0e8fb2c4aaef7cb.tar.gz
witness-tutorializer-5085af8b5163f14d37284b5ee0e8fb2c4aaef7cb.tar.bz2
witness-tutorializer-5085af8b5163f14d37284b5ee0e8fb2c4aaef7cb.zip
Add previously-available settings
-rw-r--r--App/App.rc7
-rw-r--r--App/App.vcxproj6
-rw-r--r--App/Main.cpp23
-rw-r--r--App/Version.h2
-rw-r--r--App/Version.rc6
-rw-r--r--GithubPackage/setup.exebin791040 -> 791040 bytes
-rw-r--r--Installer/Installer.vdproj32
-rw-r--r--Source/Panel.h2
8 files changed, 61 insertions, 17 deletions
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 @@
1#include "winres.h"
2#include "Version.h"
3
4VS_VERSION_INFO VERSIONINFO
5 FILEVERSION VERSION
6BEGIN
7END
diff --git a/App/App.vcxproj b/App/App.vcxproj index 698d364..25ec076 100644 --- a/App/App.vcxproj +++ b/App/App.vcxproj
@@ -174,13 +174,13 @@
174 <ClCompile Include="Main.cpp" /> 174 <ClCompile Include="Main.cpp" />
175 </ItemGroup> 175 </ItemGroup>
176 <ItemGroup> 176 <ItemGroup>
177 <ResourceCompile Include="Version.rc" />
178 </ItemGroup>
179 <ItemGroup>
180 <ProjectReference Include="..\Source\Source.vcxproj"> 177 <ProjectReference Include="..\Source\Source.vcxproj">
181 <Project>{6b5df051-a51a-48cb-8acd-c6fad726019f}</Project> 178 <Project>{6b5df051-a51a-48cb-8acd-c6fad726019f}</Project>
182 </ProjectReference> 179 </ProjectReference>
183 </ItemGroup> 180 </ItemGroup>
181 <ItemGroup>
182 <ResourceCompile Include="App.rc" />
183 </ItemGroup>
184 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 184 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
185 <ImportGroup Label="ExtensionTargets"> 185 <ImportGroup Label="ExtensionTargets">
186 </ImportGroup> 186 </ImportGroup>
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 @@
17#define RANDOMIZE_DONE 0x404 17#define RANDOMIZE_DONE 0x404
18#define RANDOMIZE_CHALLENGE_DONE 0x405 18#define RANDOMIZE_CHALLENGE_DONE 0x405
19#define CHALLENGE_ONLY 0x406 19#define CHALLENGE_ONLY 0x406
20#define DISABLE_SNIPES 0x407
21#define SPEED_UP_AUTOSCROLLERS 0x408
20 22
21// Globals 23// Globals
22HWND g_hwnd; 24HWND g_hwnd;
@@ -79,8 +81,14 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
79 RedrawWindow(g_seed, NULL, NULL, RDW_UPDATENOW); 81 RedrawWindow(g_seed, NULL, NULL, RDW_UPDATENOW);
80 } 82 }
81 Random::SetSeed(seed); 83 Random::SetSeed(seed);
82 std::thread([hwnd]{ 84 std::thread([]{
83 if (IsDlgButtonChecked(hwnd, CHALLENGE_ONLY)) { 85 if (IsDlgButtonChecked(g_hwnd, DISABLE_SNIPES)) {
86 g_randomizer->PreventSnipes();
87 }
88 if (IsDlgButtonChecked(g_hwnd, SPEED_UP_AUTOSCROLLERS)) {
89 g_randomizer->AdjustSpeed();
90 }
91 if (IsDlgButtonChecked(g_hwnd, CHALLENGE_ONLY)) {
84 SetWindowText(g_randomizerStatus, L"Randomizing Challenge..."); 92 SetWindowText(g_randomizerStatus, L"Randomizing Challenge...");
85 g_randomizer->RandomizeChallenge(); 93 g_randomizer->RandomizeChallenge();
86 PostMessage(g_hwnd, WM_COMMAND, RANDOMIZE_CHALLENGE_DONE, NULL); 94 PostMessage(g_hwnd, WM_COMMAND, RANDOMIZE_CHALLENGE_DONE, NULL);
@@ -106,6 +114,12 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
106 PostMessage(g_hwnd, WM_COMMAND, RANDOMIZE_READY, NULL); 114 PostMessage(g_hwnd, WM_COMMAND, RANDOMIZE_READY, NULL);
107 } 115 }
108 break; 116 break;
117 case DISABLE_SNIPES:
118 CheckDlgButton(hwnd, DISABLE_SNIPES, !IsDlgButtonChecked(hwnd, DISABLE_SNIPES));
119 break;
120 case SPEED_UP_AUTOSCROLLERS:
121 CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS));
122 break;
109 } 123 }
110 } 124 }
111 return DefWindowProc(hwnd, message, wParam, lParam); 125 return DefWindowProc(hwnd, message, wParam, lParam);
@@ -167,6 +181,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
167 EnableWindow(g_randomizerStatus, FALSE); 181 EnableWindow(g_randomizerStatus, FALSE);
168 CreateCheckbox(10, 300, CHALLENGE_ONLY); 182 CreateCheckbox(10, 300, CHALLENGE_ONLY);
169 CreateLabel(30, 300, 200, L"Randomize the challenge only"); 183 CreateLabel(30, 300, 200, L"Randomize the challenge only");
184 CreateCheckbox(10, 320, DISABLE_SNIPES);
185 CheckDlgButton(g_hwnd, DISABLE_SNIPES, TRUE);
186 CreateLabel(30, 320, 240, L"Disable Swamp and Shadows snipes");
187 CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS);
188 CreateLabel(30, 340, 205, L"Speed up various autoscrollers");
170 EnableWindow(g_randomizerStatus, FALSE); 189 EnableWindow(g_randomizerStatus, FALSE);
171 190
172 g_witnessProc->StartHeartbeat(g_hwnd); 191 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 @@
5 5
6#define MAJOR 5 6#define MAJOR 5
7#define MINOR 1 7#define MINOR 1
8#define PATCH 0 8#define PATCH 1
9 9
10#define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) 10#define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH)
11#define VERSION MAJOR, MINOR, PATCH 11#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 @@
1#include "version.h"
2
3VS_VERSION_INFO VERSIONINFO
4 FILEVERSION VERSION
5BEGIN
6END
diff --git a/GithubPackage/setup.exe b/GithubPackage/setup.exe index 223753d..0c95775 100644 --- a/GithubPackage/setup.exe +++ b/GithubPackage/setup.exe
Binary files 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 @@
37 "PrivateKeyFile" = "8:" 37 "PrivateKeyFile" = "8:"
38 "TimeStampServer" = "8:" 38 "TimeStampServer" = "8:"
39 "InstallerBootstrapper" = "3:2" 39 "InstallerBootstrapper" = "3:2"
40 "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
41 {
42 "Enabled" = "11:TRUE"
43 "PromptEnabled" = "11:TRUE"
44 "PrerequisitesLocation" = "2:1"
45 "Url" = "8:"
46 "ComponentsUrl" = "8:"
47 }
40 } 48 }
41 "Release" 49 "Release"
42 { 50 {
@@ -53,6 +61,22 @@
53 "PrivateKeyFile" = "8:" 61 "PrivateKeyFile" = "8:"
54 "TimeStampServer" = "8:" 62 "TimeStampServer" = "8:"
55 "InstallerBootstrapper" = "3:2" 63 "InstallerBootstrapper" = "3:2"
64 "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
65 {
66 "Enabled" = "11:TRUE"
67 "PromptEnabled" = "11:TRUE"
68 "PrerequisitesLocation" = "2:1"
69 "Url" = "8:"
70 "ComponentsUrl" = "8:"
71 "Items"
72 {
73 "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.6.1"
74 {
75 "Name" = "8:Microsoft .NET Framework 4.6.1 (x86 and x64)"
76 "ProductCode" = "8:.NETFramework,Version=v4.6.1"
77 }
78 }
79 }
56 } 80 }
57 } 81 }
58 "Deployable" 82 "Deployable"
@@ -130,15 +154,15 @@
130 { 154 {
131 "Name" = "8:Microsoft Visual Studio" 155 "Name" = "8:Microsoft Visual Studio"
132 "ProductName" = "8:Witness Randomizer" 156 "ProductName" = "8:Witness Randomizer"
133 "ProductCode" = "8:{0A0A8EA4-812F-4B39-8C02-9FB2EEFB38FC}" 157 "ProductCode" = "8:{BF672BB2-4FD0-44B6-B279-C5F7346649DC}"
134 "PackageCode" = "8:{F7844209-B903-470B-BAFF-39E0C2E6C919}" 158 "PackageCode" = "8:{F55A05A7-103A-4E8D-B88F-94C00188B9A6}"
135 "UpgradeCode" = "8:{4CB5496B-A47E-41D3-B4A7-677E29AB7513}" 159 "UpgradeCode" = "8:{4CB5496B-A47E-41D3-B4A7-677E29AB7513}"
136 "AspNetVersion" = "8:2.0.50727.0" 160 "AspNetVersion" = "8:2.0.50727.0"
137 "RestartWWWService" = "11:FALSE" 161 "RestartWWWService" = "11:FALSE"
138 "RemovePreviousVersions" = "11:TRUE" 162 "RemovePreviousVersions" = "11:TRUE"
139 "DetectNewerInstalledVersion" = "11:TRUE" 163 "DetectNewerInstalledVersion" = "11:TRUE"
140 "InstallAllUsers" = "11:FALSE" 164 "InstallAllUsers" = "11:FALSE"
141 "ProductVersion" = "8:5.1.0" 165 "ProductVersion" = "8:5.1.1"
142 "Manufacturer" = "8:jbzdarkid" 166 "Manufacturer" = "8:jbzdarkid"
143 "ARPHELPTELEPHONE" = "8:" 167 "ARPHELPTELEPHONE" = "8:"
144 "ARPHELPLINK" = "8:https://www.github.com/jbzdarkid/witness-randomizer/issues" 168 "ARPHELPLINK" = "8:https://www.github.com/jbzdarkid/witness-randomizer/issues"
@@ -666,7 +690,7 @@
666 { 690 {
667 "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9D683AD9CFDD4F1E90EB22DB4509B5E4" 691 "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9D683AD9CFDD4F1E90EB22DB4509B5E4"
668 { 692 {
669 "SourcePath" = "8:..\\x64\\Debug\\WitnessRandomizer.exe" 693 "SourcePath" = "8:..\\GithubPackage\\WitnessRandomizer.exe"
670 "TargetName" = "8:" 694 "TargetName" = "8:"
671 "Tag" = "8:" 695 "Tag" = "8:"
672 "Folder" = "8:_CC86D8CA6D3943FAB5F6A91D54540360" 696 "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 {
53 53
54class Endpoint { 54class Endpoint {
55public: 55public:
56 enum Direction { 56 enum class Direction {
57 LEFT, 57 LEFT,
58 RIGHT, 58 RIGHT,
59 UP, 59 UP,