summary refs log tree commit diff stats
path: root/App
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-11-05 10:06:37 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2018-11-05 10:06:37 -0800
commit669717268201197412c69df36e65883b0af6fac8 (patch)
tree6345c3acd1ca42bbd31c3702e649a09512e5aed6 /App
parenta828620c6447e8c51f6e9d1767eabe0fc5ade0a0 (diff)
downloadwitness-tutorializer-669717268201197412c69df36e65883b0af6fac8.tar.gz
witness-tutorializer-669717268201197412c69df36e65883b0af6fac8.tar.bz2
witness-tutorializer-669717268201197412c69df36e65883b0af6fac8.zip
Tests work now, + other cleanup
Diffstat (limited to 'App')
-rw-r--r--App/App.icobin46227 -> 0 bytes
-rw-r--r--App/App.vcxproj32
-rw-r--r--App/App.vcxproj.filters43
-rw-r--r--App/Main.cpp30
-rw-r--r--App/small.icobin46227 -> 0 bytes
5 files changed, 26 insertions, 79 deletions
diff --git a/App/App.ico b/App/App.ico deleted file mode 100644 index b3ec03b..0000000 --- a/App/App.ico +++ /dev/null
Binary files differ
diff --git a/App/App.vcxproj b/App/App.vcxproj index b17f7a6..fbcb337 100644 --- a/App/App.vcxproj +++ b/App/App.vcxproj
@@ -20,11 +20,10 @@
20 </ItemGroup> 20 </ItemGroup>
21 <PropertyGroup Label="Globals"> 21 <PropertyGroup Label="Globals">
22 <VCProjectVersion>15.0</VCProjectVersion> 22 <VCProjectVersion>15.0</VCProjectVersion>
23 <ProjectGuid>{CED79182-F36B-4D07-AD0E-249C15BFAD73}</ProjectGuid> 23 <ProjectGuid>{235D27F1-9907-489B-8D58-636A0C5CD079}</ProjectGuid>
24 <Keyword>Win32Proj</Keyword> 24 <Keyword>Win32Proj</Keyword>
25 <RootNamespace>App</RootNamespace> 25 <RootNamespace>App</RootNamespace>
26 <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> 26 <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
27 <ProjectName>App</ProjectName>
28 </PropertyGroup> 27 </PropertyGroup>
29 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 28 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> 29 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -82,7 +81,6 @@
82 </PropertyGroup> 81 </PropertyGroup>
83 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 82 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
84 <LinkIncremental>false</LinkIncremental> 83 <LinkIncremental>false</LinkIncremental>
85 <TargetName>WitnessRandomizer</TargetName>
86 </PropertyGroup> 84 </PropertyGroup>
87 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 85 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
88 <ClCompile> 86 <ClCompile>
@@ -92,9 +90,8 @@
92 <SDLCheck>true</SDLCheck> 90 <SDLCheck>true</SDLCheck>
93 <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 91 <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94 <ConformanceMode>true</ConformanceMode> 92 <ConformanceMode>true</ConformanceMode>
95 <TreatWarningAsError>true</TreatWarningAsError> 93 <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\WitnessRandomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
96 <LanguageStandard>stdcpp17</LanguageStandard> 94 <LanguageStandard>stdcpp17</LanguageStandard>
97 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
98 </ClCompile> 95 </ClCompile>
99 <Link> 96 <Link>
100 <SubSystem>Windows</SubSystem> 97 <SubSystem>Windows</SubSystem>
@@ -104,15 +101,14 @@
104 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> 101 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
105 <ClCompile> 102 <ClCompile>
106 <PrecompiledHeader>NotUsing</PrecompiledHeader> 103 <PrecompiledHeader>NotUsing</PrecompiledHeader>
107 <WarningLevel>Level2</WarningLevel> 104 <WarningLevel>Level3</WarningLevel>
108 <Optimization>Disabled</Optimization> 105 <Optimization>Disabled</Optimization>
109 <SDLCheck>true</SDLCheck> 106 <SDLCheck>true</SDLCheck>
110 <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 107 <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
111 <ConformanceMode>true</ConformanceMode> 108 <ConformanceMode>true</ConformanceMode>
112 <TreatWarningAsError>true</TreatWarningAsError>
113 <LanguageStandard>stdcpp17</LanguageStandard> 109 <LanguageStandard>stdcpp17</LanguageStandard>
110 <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\WitnessRandomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
114 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> 111 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
115 <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
116 </ClCompile> 112 </ClCompile>
117 <Link> 113 <Link>
118 <SubSystem>Windows</SubSystem> 114 <SubSystem>Windows</SubSystem>
@@ -129,10 +125,8 @@
129 <SDLCheck>true</SDLCheck> 125 <SDLCheck>true</SDLCheck>
130 <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 126 <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
131 <ConformanceMode>true</ConformanceMode> 127 <ConformanceMode>true</ConformanceMode>
132 <TreatWarningAsError>true</TreatWarningAsError>
133 <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
134 <LanguageStandard>stdcpp17</LanguageStandard> 128 <LanguageStandard>stdcpp17</LanguageStandard>
135 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 129 <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\WitnessRandomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
136 </ClCompile> 130 </ClCompile>
137 <Link> 131 <Link>
138 <SubSystem>Windows</SubSystem> 132 <SubSystem>Windows</SubSystem>
@@ -144,18 +138,15 @@
144 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 138 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
145 <ClCompile> 139 <ClCompile>
146 <PrecompiledHeader>NotUsing</PrecompiledHeader> 140 <PrecompiledHeader>NotUsing</PrecompiledHeader>
147 <WarningLevel>Level2</WarningLevel> 141 <WarningLevel>Level3</WarningLevel>
148 <Optimization>MaxSpeed</Optimization> 142 <Optimization>MaxSpeed</Optimization>
149 <FunctionLevelLinking>true</FunctionLevelLinking> 143 <FunctionLevelLinking>true</FunctionLevelLinking>
150 <IntrinsicFunctions>true</IntrinsicFunctions> 144 <IntrinsicFunctions>true</IntrinsicFunctions>
151 <SDLCheck>true</SDLCheck> 145 <SDLCheck>true</SDLCheck>
152 <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 146 <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
153 <ConformanceMode>true</ConformanceMode> 147 <ConformanceMode>true</ConformanceMode>
154 <TreatWarningAsError>true</TreatWarningAsError>
155 <LanguageStandard>stdcpp17</LanguageStandard> 148 <LanguageStandard>stdcpp17</LanguageStandard>
156 <DebugInformationFormat>None</DebugInformationFormat> 149 <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\WitnessRandomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
157 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
158 <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
159 </ClCompile> 150 </ClCompile>
160 <Link> 151 <Link>
161 <SubSystem>Windows</SubSystem> 152 <SubSystem>Windows</SubSystem>
@@ -165,6 +156,7 @@
165 </Link> 156 </Link>
166 </ItemDefinitionGroup> 157 </ItemDefinitionGroup>
167 <ItemGroup> 158 <ItemGroup>
159 <ClInclude Include="Resource.h" />
168 <ClInclude Include="Version.h" /> 160 <ClInclude Include="Version.h" />
169 </ItemGroup> 161 </ItemGroup>
170 <ItemGroup> 162 <ItemGroup>
@@ -174,11 +166,9 @@
174 <ResourceCompile Include="Version.rc" /> 166 <ResourceCompile Include="Version.rc" />
175 </ItemGroup> 167 </ItemGroup>
176 <ItemGroup> 168 <ItemGroup>
177 <Image Include="small.ico" /> 169 <ProjectReference Include="..\Source\Source.vcxproj">
178 <Image Include="App.ico" /> 170 <Project>{6b5df051-a51a-48cb-8acd-c6fad726019f}</Project>
179 </ItemGroup> 171 </ProjectReference>
180 <ItemGroup>
181 <None Include="App.aps" />
182 </ItemGroup> 172 </ItemGroup>
183 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 173 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
184 <ImportGroup Label="ExtensionTargets"> 174 <ImportGroup Label="ExtensionTargets">
diff --git a/App/App.vcxproj.filters b/App/App.vcxproj.filters deleted file mode 100644 index 26b3d34..0000000 --- a/App/App.vcxproj.filters +++ /dev/null
@@ -1,43 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <Filter Include="Source Files">
5 <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6 <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7 </Filter>
8 <Filter Include="Header Files">
9 <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10 <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11 </Filter>
12 <Filter Include="Resource Files">
13 <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14 <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15 </Filter>
16 </ItemGroup>
17 <ItemGroup>
18 <ClInclude Include="Version.h">
19 <Filter>Header Files</Filter>
20 </ClInclude>
21 </ItemGroup>
22 <ItemGroup>
23 <ClCompile Include="Main.cpp">
24 <Filter>Source Files</Filter>
25 </ClCompile>
26 </ItemGroup>
27 <ItemGroup>
28 <ResourceCompile Include="Version.rc">
29 <Filter>Resource Files</Filter>
30 </ResourceCompile>
31 </ItemGroup>
32 <ItemGroup>
33 <Image Include="small.ico">
34 <Filter>Resource Files</Filter>
35 </Image>
36 <Image Include="App.ico">
37 <Filter>Resource Files</Filter>
38 </Image>
39 </ItemGroup>
40 <ItemGroup>
41 <None Include="App.aps" />
42 </ItemGroup>
43</Project> \ No newline at end of file
diff --git a/App/Main.cpp b/App/Main.cpp index ce0e550..48cb93d 100644 --- a/App/Main.cpp +++ b/App/Main.cpp
@@ -3,9 +3,9 @@
3 3
4#include <string> 4#include <string>
5 5
6#include "Randomizer.h"
7#include "Version.h" 6#include "Version.h"
8#include "Random.h" 7#include "Random.h"
8#include "Randomizer.h"
9#include "Panel.h" 9#include "Panel.h"
10 10
11#define IDC_RANDOMIZE 0x401 11#define IDC_RANDOMIZE 0x401
@@ -18,8 +18,8 @@
18#define IDC_DUMP 0x408 18#define IDC_DUMP 0x408
19 19
20HWND hwndSeed, hwndRandomize; 20HWND hwndSeed, hwndRandomize;
21// int panel = 0x18AF; 21int panel = 0x18AF;
22int panel = 0x33D4; 22// int panel = 0x33D4;
23std::shared_ptr<Panel> _panel; 23std::shared_ptr<Panel> _panel;
24 24
25LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 25LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
@@ -53,16 +53,16 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
53 wasSeedRandomlyGenerated = false; 53 wasSeedRandomlyGenerated = false;
54 } 54 }
55 55
56 Randomizer randomizer; 56 Randomizer randomizer;
57 short metadata = randomizer.Randomize(seed); 57 short metadata = randomizer.Randomize(seed);
58 if (metadata & 0x1) break; // Was already randomized 58 if (metadata & 0x1) break; // Was already randomized
59 59
60 std::wstring seedString = std::to_wstring(seed); 60 std::wstring seedString = std::to_wstring(seed);
61 SetWindowText(hwndSeed, seedString.c_str()); 61 SetWindowText(hwndSeed, seedString.c_str());
62 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { 62 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) {
63 randomizer.AdjustSpeed(); 63 randomizer.AdjustSpeed();
64 } 64 }
65 SetWindowText(hwndRandomize, L"Randomized!"); 65 SetWindowText(hwndRandomize, L"Randomized!");
66 break; 66 break;
67 } 67 }
68 case IDC_READ: 68 case IDC_READ:
@@ -75,7 +75,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
75 _panel->Write(panel); 75 _panel->Write(panel);
76 break; 76 break;
77 case IDC_DUMP: 77 case IDC_DUMP:
78 _panel->Serialize(); 78 // _panel->Serialize();
79 break; 79 break;
80 } 80 }
81 } 81 }
@@ -113,7 +113,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
113 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 113 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
114 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); 114 10, 15, 90, 16, hwnd, NULL, hInstance, NULL);
115 hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"", 115 hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"",
116 WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER, 116 WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER,
117 100, 10, 50, 26, hwnd, NULL, hInstance, NULL); 117 100, 10, 50, 26, hwnd, NULL, hInstance, NULL);
118 hwndRandomize = CreateWindow(L"BUTTON", L"Randomize", 118 hwndRandomize = CreateWindow(L"BUTTON", L"Randomize",
119 WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 119 WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
@@ -176,7 +176,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
176 CreateWindow(L"STATIC", L"Prevent sniping certain puzzles", 176 CreateWindow(L"STATIC", L"Prevent sniping certain puzzles",
177 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 177 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
178 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); 178 27, 50, 205, 16, hwnd, NULL, hInstance, NULL);
179 179
180*/ 180*/
181 181
182 ShowWindow(hwnd, nCmdShow); 182 ShowWindow(hwnd, nCmdShow);
diff --git a/App/small.ico b/App/small.ico deleted file mode 100644 index b3ec03b..0000000 --- a/App/small.ico +++ /dev/null
Binary files differ