summary refs log tree commit diff stats
path: root/Source
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 /Source
parenta828620c6447e8c51f6e9d1767eabe0fc5ade0a0 (diff)
downloadwitness-tutorializer-669717268201197412c69df36e65883b0af6fac8.tar.gz
witness-tutorializer-669717268201197412c69df36e65883b0af6fac8.tar.bz2
witness-tutorializer-669717268201197412c69df36e65883b0af6fac8.zip
Tests work now, + other cleanup
Diffstat (limited to 'Source')
-rw-r--r--Source/Random.cpp4
-rw-r--r--Source/Source.vcxproj81
-rw-r--r--Source/Source.vcxproj.filters57
3 files changed, 43 insertions, 99 deletions
diff --git a/Source/Random.cpp b/Source/Random.cpp index c921e58..d8f5eb2 100644 --- a/Source/Random.cpp +++ b/Source/Random.cpp
@@ -7,8 +7,8 @@ void Random::SetSeed(int seed) {
7 s_seed = seed; 7 s_seed = seed;
8} 8}
9 9
10// Returns a random integer in [min, max]
10int Random::RandInt(int min, int max) { 11int Random::RandInt(int min, int max) {
11 s_seed = (214013 * s_seed + 2531011) % 2147483648; 12 s_seed = (214013 * s_seed + 2531011) % 2147483648;
12 if (min == max) return min; 13 return (s_seed % (max - min + 1)) + min;
13 return (s_seed % (max - (min - 1))) + min;
14} 14}
diff --git a/Source/Source.vcxproj b/Source/Source.vcxproj index d140781..8d13e00 100644 --- a/Source/Source.vcxproj +++ b/Source/Source.vcxproj
@@ -18,25 +18,9 @@
18 <Platform>x64</Platform> 18 <Platform>x64</Platform>
19 </ProjectConfiguration> 19 </ProjectConfiguration>
20 </ItemGroup> 20 </ItemGroup>
21 <ItemGroup>
22 <ClInclude Include="json.hpp" />
23 <ClInclude Include="Memory.h" />
24 <ClInclude Include="Panel.h" />
25 <ClInclude Include="Panels.h" />
26 <ClInclude Include="Random.h" />
27 <ClInclude Include="Randomizer.h" />
28 <ClInclude Include="RandomizerCore.h" />
29 </ItemGroup>
30 <ItemGroup>
31 <ClCompile Include="Memory.cpp" />
32 <ClCompile Include="Panel.cpp" />
33 <ClCompile Include="Random.cpp" />
34 <ClCompile Include="Randomizer.cpp" />
35 <ClCompile Include="RandomizerCore.cpp" />
36 </ItemGroup>
37 <PropertyGroup Label="Globals"> 21 <PropertyGroup Label="Globals">
38 <VCProjectVersion>15.0</VCProjectVersion> 22 <VCProjectVersion>15.0</VCProjectVersion>
39 <ProjectGuid>{5C019BEA-E0B4-4215-825F-6A228CD3AE27}</ProjectGuid> 23 <ProjectGuid>{6B5DF051-A51A-48CB-8ACD-C6FAD726019F}</ProjectGuid>
40 <Keyword>Win32Proj</Keyword> 24 <Keyword>Win32Proj</Keyword>
41 <RootNamespace>Source</RootNamespace> 25 <RootNamespace>Source</RootNamespace>
42 <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> 26 <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
@@ -86,9 +70,6 @@
86 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 70 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
87 </ImportGroup> 71 </ImportGroup>
88 <PropertyGroup Label="UserMacros" /> 72 <PropertyGroup Label="UserMacros" />
89 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
90 <LinkIncremental>false</LinkIncremental>
91 </PropertyGroup>
92 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 73 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
93 <LinkIncremental>true</LinkIncremental> 74 <LinkIncremental>true</LinkIncremental>
94 </PropertyGroup> 75 </PropertyGroup>
@@ -98,66 +79,70 @@
98 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 79 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
99 <LinkIncremental>false</LinkIncremental> 80 <LinkIncremental>false</LinkIncremental>
100 </PropertyGroup> 81 </PropertyGroup>
101 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 82 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
83 <LinkIncremental>false</LinkIncremental>
84 </PropertyGroup>
85 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
102 <ClCompile> 86 <ClCompile>
103 <PrecompiledHeader>NotUsing</PrecompiledHeader> 87 <PrecompiledHeader>NotUsing</PrecompiledHeader>
104 <WarningLevel>Level2</WarningLevel> 88 <WarningLevel>Level3</WarningLevel>
105 <Optimization>MaxSpeed</Optimization> 89 <Optimization>Disabled</Optimization>
106 <FunctionLevelLinking>true</FunctionLevelLinking>
107 <IntrinsicFunctions>true</IntrinsicFunctions>
108 <SDLCheck>true</SDLCheck> 90 <SDLCheck>true</SDLCheck>
109 <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 91 <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
110 <ConformanceMode>true</ConformanceMode> 92 <ConformanceMode>true</ConformanceMode>
111 <LanguageStandard>stdcpp17</LanguageStandard> 93 <LanguageStandard>stdcpp17</LanguageStandard>
112 <TreatWarningAsError>true</TreatWarningAsError>
113 </ClCompile> 94 </ClCompile>
114 <Link> 95 <Link>
115 <SubSystem>Windows</SubSystem> 96 <SubSystem>Windows</SubSystem>
116 <EnableCOMDATFolding>true</EnableCOMDATFolding>
117 <OptimizeReferences>true</OptimizeReferences>
118 <GenerateDebugInformation>true</GenerateDebugInformation> 97 <GenerateDebugInformation>true</GenerateDebugInformation>
119 </Link> 98 </Link>
120 </ItemDefinitionGroup> 99 </ItemDefinitionGroup>
121 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 100 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
122 <ClCompile> 101 <ClCompile>
123 <PrecompiledHeader>Use</PrecompiledHeader> 102 <PrecompiledHeader>NotUsing</PrecompiledHeader>
124 <WarningLevel>Level3</WarningLevel> 103 <WarningLevel>Level3</WarningLevel>
125 <Optimization>Disabled</Optimization> 104 <Optimization>Disabled</Optimization>
126 <SDLCheck>true</SDLCheck> 105 <SDLCheck>true</SDLCheck>
127 <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 106 <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
128 <ConformanceMode>true</ConformanceMode> 107 <ConformanceMode>true</ConformanceMode>
108 <LanguageStandard>stdcpp17</LanguageStandard>
109 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
129 </ClCompile> 110 </ClCompile>
130 <Link> 111 <Link>
131 <SubSystem>Windows</SubSystem> 112 <SubSystem>Windows</SubSystem>
132 <GenerateDebugInformation>true</GenerateDebugInformation> 113 <GenerateDebugInformation>true</GenerateDebugInformation>
133 </Link> 114 </Link>
134 </ItemDefinitionGroup> 115 </ItemDefinitionGroup>
135 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> 116 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
136 <ClCompile> 117 <ClCompile>
137 <PrecompiledHeader>NotUsing</PrecompiledHeader> 118 <PrecompiledHeader>NotUsing</PrecompiledHeader>
138 <WarningLevel>Level2</WarningLevel> 119 <WarningLevel>Level3</WarningLevel>
139 <Optimization>Disabled</Optimization> 120 <Optimization>MaxSpeed</Optimization>
121 <FunctionLevelLinking>true</FunctionLevelLinking>
122 <IntrinsicFunctions>true</IntrinsicFunctions>
140 <SDLCheck>true</SDLCheck> 123 <SDLCheck>true</SDLCheck>
141 <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 124 <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
142 <ConformanceMode>true</ConformanceMode> 125 <ConformanceMode>true</ConformanceMode>
143 <LanguageStandard>stdcpp17</LanguageStandard> 126 <LanguageStandard>stdcpp17</LanguageStandard>
144 <TreatWarningAsError>true</TreatWarningAsError>
145 </ClCompile> 127 </ClCompile>
146 <Link> 128 <Link>
147 <SubSystem>Windows</SubSystem> 129 <SubSystem>Windows</SubSystem>
130 <EnableCOMDATFolding>true</EnableCOMDATFolding>
131 <OptimizeReferences>true</OptimizeReferences>
148 <GenerateDebugInformation>true</GenerateDebugInformation> 132 <GenerateDebugInformation>true</GenerateDebugInformation>
149 </Link> 133 </Link>
150 </ItemDefinitionGroup> 134 </ItemDefinitionGroup>
151 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 135 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
152 <ClCompile> 136 <ClCompile>
153 <PrecompiledHeader>Use</PrecompiledHeader> 137 <PrecompiledHeader>NotUsing</PrecompiledHeader>
154 <WarningLevel>Level3</WarningLevel> 138 <WarningLevel>Level3</WarningLevel>
155 <Optimization>MaxSpeed</Optimization> 139 <Optimization>MaxSpeed</Optimization>
156 <FunctionLevelLinking>true</FunctionLevelLinking> 140 <FunctionLevelLinking>true</FunctionLevelLinking>
157 <IntrinsicFunctions>true</IntrinsicFunctions> 141 <IntrinsicFunctions>true</IntrinsicFunctions>
158 <SDLCheck>true</SDLCheck> 142 <SDLCheck>true</SDLCheck>
159 <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 143 <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
160 <ConformanceMode>true</ConformanceMode> 144 <ConformanceMode>true</ConformanceMode>
145 <LanguageStandard>stdcpp17</LanguageStandard>
161 </ClCompile> 146 </ClCompile>
162 <Link> 147 <Link>
163 <SubSystem>Windows</SubSystem> 148 <SubSystem>Windows</SubSystem>
@@ -166,6 +151,22 @@
166 <GenerateDebugInformation>true</GenerateDebugInformation> 151 <GenerateDebugInformation>true</GenerateDebugInformation>
167 </Link> 152 </Link>
168 </ItemDefinitionGroup> 153 </ItemDefinitionGroup>
154 <ItemGroup>
155 <ClInclude Include="json.hpp" />
156 <ClInclude Include="Memory.h" />
157 <ClInclude Include="Panel.h" />
158 <ClInclude Include="Panels.h" />
159 <ClInclude Include="Random.h" />
160 <ClInclude Include="Randomizer.h" />
161 <ClInclude Include="RandomizerCore.h" />
162 </ItemGroup>
163 <ItemGroup>
164 <ClCompile Include="Memory.cpp" />
165 <ClCompile Include="Panel.cpp" />
166 <ClCompile Include="Random.cpp" />
167 <ClCompile Include="Randomizer.cpp" />
168 <ClCompile Include="RandomizerCore.cpp" />
169 </ItemGroup>
169 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 170 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
170 <ImportGroup Label="ExtensionTargets"> 171 <ImportGroup Label="ExtensionTargets">
171 </ImportGroup> 172 </ImportGroup>
diff --git a/Source/Source.vcxproj.filters b/Source/Source.vcxproj.filters deleted file mode 100644 index fe9204f..0000000 --- a/Source/Source.vcxproj.filters +++ /dev/null
@@ -1,57 +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="json.hpp">
19 <Filter>Header Files</Filter>
20 </ClInclude>
21 <ClInclude Include="Memory.h">
22 <Filter>Header Files</Filter>
23 </ClInclude>
24 <ClInclude Include="Panel.h">
25 <Filter>Header Files</Filter>
26 </ClInclude>
27 <ClInclude Include="Panels.h">
28 <Filter>Header Files</Filter>
29 </ClInclude>
30 <ClInclude Include="Random.h">
31 <Filter>Header Files</Filter>
32 </ClInclude>
33 <ClInclude Include="Randomizer.h">
34 <Filter>Header Files</Filter>
35 </ClInclude>
36 <ClInclude Include="RandomizerCore.h">
37 <Filter>Header Files</Filter>
38 </ClInclude>
39 </ItemGroup>
40 <ItemGroup>
41 <ClCompile Include="Memory.cpp">
42 <Filter>Source Files</Filter>
43 </ClCompile>
44 <ClCompile Include="Panel.cpp">
45 <Filter>Source Files</Filter>
46 </ClCompile>
47 <ClCompile Include="Random.cpp">
48 <Filter>Source Files</Filter>
49 </ClCompile>
50 <ClCompile Include="Randomizer.cpp">
51 <Filter>Source Files</Filter>
52 </ClCompile>
53 <ClCompile Include="RandomizerCore.cpp">
54 <Filter>Source Files</Filter>
55 </ClCompile>
56 </ItemGroup>
57</Project> \ No newline at end of file