diff options
| author | jbzdarkid <jbzdarkid@gmail.com> | 2018-11-05 08:15:23 -0800 |
|---|---|---|
| committer | jbzdarkid <jbzdarkid@gmail.com> | 2018-11-05 08:15:23 -0800 |
| commit | a828620c6447e8c51f6e9d1767eabe0fc5ade0a0 (patch) | |
| tree | ce54393a34eb02ce5f801487f170d9c0d99bb66e /App | |
| parent | 1d1218aa855a0b7500c94d5017575855d646e1c4 (diff) | |
| download | witness-tutorializer-a828620c6447e8c51f6e9d1767eabe0fc5ade0a0.tar.gz witness-tutorializer-a828620c6447e8c51f6e9d1767eabe0fc5ade0a0.tar.bz2 witness-tutorializer-a828620c6447e8c51f6e9d1767eabe0fc5ade0a0.zip | |
moving stuff so I can test
Diffstat (limited to 'App')
| -rw-r--r-- | App/App.ico | bin | 0 -> 46227 bytes | |||
| -rw-r--r-- | App/App.vcxproj | 186 | ||||
| -rw-r--r-- | App/App.vcxproj.filters | 43 | ||||
| -rw-r--r-- | App/Main.cpp | 193 | ||||
| -rw-r--r-- | App/Version.h | 14 | ||||
| -rw-r--r-- | App/Version.rc | 6 | ||||
| -rw-r--r-- | App/small.ico | bin | 0 -> 46227 bytes |
7 files changed, 442 insertions, 0 deletions
| diff --git a/App/App.ico b/App/App.ico new file mode 100644 index 0000000..b3ec03b --- /dev/null +++ b/App/App.ico | |||
| Binary files differ | |||
| diff --git a/App/App.vcxproj b/App/App.vcxproj new file mode 100644 index 0000000..b17f7a6 --- /dev/null +++ b/App/App.vcxproj | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <ItemGroup Label="ProjectConfigurations"> | ||
| 4 | <ProjectConfiguration Include="Debug|Win32"> | ||
| 5 | <Configuration>Debug</Configuration> | ||
| 6 | <Platform>Win32</Platform> | ||
| 7 | </ProjectConfiguration> | ||
| 8 | <ProjectConfiguration Include="Release|Win32"> | ||
| 9 | <Configuration>Release</Configuration> | ||
| 10 | <Platform>Win32</Platform> | ||
| 11 | </ProjectConfiguration> | ||
| 12 | <ProjectConfiguration Include="Debug|x64"> | ||
| 13 | <Configuration>Debug</Configuration> | ||
| 14 | <Platform>x64</Platform> | ||
| 15 | </ProjectConfiguration> | ||
| 16 | <ProjectConfiguration Include="Release|x64"> | ||
| 17 | <Configuration>Release</Configuration> | ||
| 18 | <Platform>x64</Platform> | ||
| 19 | </ProjectConfiguration> | ||
| 20 | </ItemGroup> | ||
| 21 | <PropertyGroup Label="Globals"> | ||
| 22 | <VCProjectVersion>15.0</VCProjectVersion> | ||
| 23 | <ProjectGuid>{CED79182-F36B-4D07-AD0E-249C15BFAD73}</ProjectGuid> | ||
| 24 | <Keyword>Win32Proj</Keyword> | ||
| 25 | <RootNamespace>App</RootNamespace> | ||
| 26 | <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> | ||
| 27 | <ProjectName>App</ProjectName> | ||
| 28 | </PropertyGroup> | ||
| 29 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| 30 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
| 31 | <ConfigurationType>Application</ConfigurationType> | ||
| 32 | <UseDebugLibraries>true</UseDebugLibraries> | ||
| 33 | <PlatformToolset>v141</PlatformToolset> | ||
| 34 | <CharacterSet>Unicode</CharacterSet> | ||
| 35 | </PropertyGroup> | ||
| 36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
| 37 | <ConfigurationType>Application</ConfigurationType> | ||
| 38 | <UseDebugLibraries>false</UseDebugLibraries> | ||
| 39 | <PlatformToolset>v141</PlatformToolset> | ||
| 40 | <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| 41 | <CharacterSet>Unicode</CharacterSet> | ||
| 42 | </PropertyGroup> | ||
| 43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
| 44 | <ConfigurationType>Application</ConfigurationType> | ||
| 45 | <UseDebugLibraries>true</UseDebugLibraries> | ||
| 46 | <PlatformToolset>v141</PlatformToolset> | ||
| 47 | <CharacterSet>Unicode</CharacterSet> | ||
| 48 | </PropertyGroup> | ||
| 49 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
| 50 | <ConfigurationType>Application</ConfigurationType> | ||
| 51 | <UseDebugLibraries>false</UseDebugLibraries> | ||
| 52 | <PlatformToolset>v141</PlatformToolset> | ||
| 53 | <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| 54 | <CharacterSet>Unicode</CharacterSet> | ||
| 55 | </PropertyGroup> | ||
| 56 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| 57 | <ImportGroup Label="ExtensionSettings"> | ||
| 58 | </ImportGroup> | ||
| 59 | <ImportGroup Label="Shared"> | ||
| 60 | </ImportGroup> | ||
| 61 | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| 62 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| 63 | </ImportGroup> | ||
| 64 | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| 65 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| 66 | </ImportGroup> | ||
| 67 | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| 68 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| 69 | </ImportGroup> | ||
| 70 | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| 71 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| 72 | </ImportGroup> | ||
| 73 | <PropertyGroup Label="UserMacros" /> | ||
| 74 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| 75 | <LinkIncremental>true</LinkIncremental> | ||
| 76 | </PropertyGroup> | ||
| 77 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| 78 | <LinkIncremental>true</LinkIncremental> | ||
| 79 | </PropertyGroup> | ||
| 80 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| 81 | <LinkIncremental>false</LinkIncremental> | ||
| 82 | </PropertyGroup> | ||
| 83 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| 84 | <LinkIncremental>false</LinkIncremental> | ||
| 85 | <TargetName>WitnessRandomizer</TargetName> | ||
| 86 | </PropertyGroup> | ||
| 87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| 88 | <ClCompile> | ||
| 89 | <PrecompiledHeader>NotUsing</PrecompiledHeader> | ||
| 90 | <WarningLevel>Level3</WarningLevel> | ||
| 91 | <Optimization>Disabled</Optimization> | ||
| 92 | <SDLCheck>true</SDLCheck> | ||
| 93 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 94 | <ConformanceMode>true</ConformanceMode> | ||
| 95 | <TreatWarningAsError>true</TreatWarningAsError> | ||
| 96 | <LanguageStandard>stdcpp17</LanguageStandard> | ||
| 97 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
| 98 | </ClCompile> | ||
| 99 | <Link> | ||
| 100 | <SubSystem>Windows</SubSystem> | ||
| 101 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| 102 | </Link> | ||
| 103 | </ItemDefinitionGroup> | ||
| 104 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| 105 | <ClCompile> | ||
| 106 | <PrecompiledHeader>NotUsing</PrecompiledHeader> | ||
| 107 | <WarningLevel>Level2</WarningLevel> | ||
| 108 | <Optimization>Disabled</Optimization> | ||
| 109 | <SDLCheck>true</SDLCheck> | ||
| 110 | <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 111 | <ConformanceMode>true</ConformanceMode> | ||
| 112 | <TreatWarningAsError>true</TreatWarningAsError> | ||
| 113 | <LanguageStandard>stdcpp17</LanguageStandard> | ||
| 114 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
| 115 | <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 116 | </ClCompile> | ||
| 117 | <Link> | ||
| 118 | <SubSystem>Windows</SubSystem> | ||
| 119 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| 120 | </Link> | ||
| 121 | </ItemDefinitionGroup> | ||
| 122 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| 123 | <ClCompile> | ||
| 124 | <PrecompiledHeader>NotUsing</PrecompiledHeader> | ||
| 125 | <WarningLevel>Level3</WarningLevel> | ||
| 126 | <Optimization>MaxSpeed</Optimization> | ||
| 127 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
| 128 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| 129 | <SDLCheck>true</SDLCheck> | ||
| 130 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 131 | <ConformanceMode>true</ConformanceMode> | ||
| 132 | <TreatWarningAsError>true</TreatWarningAsError> | ||
| 133 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | ||
| 134 | <LanguageStandard>stdcpp17</LanguageStandard> | ||
| 135 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
| 136 | </ClCompile> | ||
| 137 | <Link> | ||
| 138 | <SubSystem>Windows</SubSystem> | ||
| 139 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
| 140 | <OptimizeReferences>true</OptimizeReferences> | ||
| 141 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| 142 | </Link> | ||
| 143 | </ItemDefinitionGroup> | ||
| 144 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| 145 | <ClCompile> | ||
| 146 | <PrecompiledHeader>NotUsing</PrecompiledHeader> | ||
| 147 | <WarningLevel>Level2</WarningLevel> | ||
| 148 | <Optimization>MaxSpeed</Optimization> | ||
| 149 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
| 150 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| 151 | <SDLCheck>true</SDLCheck> | ||
| 152 | <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 153 | <ConformanceMode>true</ConformanceMode> | ||
| 154 | <TreatWarningAsError>true</TreatWarningAsError> | ||
| 155 | <LanguageStandard>stdcpp17</LanguageStandard> | ||
| 156 | <DebugInformationFormat>None</DebugInformationFormat> | ||
| 157 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
| 158 | <AdditionalIncludeDirectories>C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 159 | </ClCompile> | ||
| 160 | <Link> | ||
| 161 | <SubSystem>Windows</SubSystem> | ||
| 162 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
| 163 | <OptimizeReferences>true</OptimizeReferences> | ||
| 164 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| 165 | </Link> | ||
| 166 | </ItemDefinitionGroup> | ||
| 167 | <ItemGroup> | ||
| 168 | <ClInclude Include="Version.h" /> | ||
| 169 | </ItemGroup> | ||
| 170 | <ItemGroup> | ||
| 171 | <ClCompile Include="Main.cpp" /> | ||
| 172 | </ItemGroup> | ||
| 173 | <ItemGroup> | ||
| 174 | <ResourceCompile Include="Version.rc" /> | ||
| 175 | </ItemGroup> | ||
| 176 | <ItemGroup> | ||
| 177 | <Image Include="small.ico" /> | ||
| 178 | <Image Include="App.ico" /> | ||
| 179 | </ItemGroup> | ||
| 180 | <ItemGroup> | ||
| 181 | <None Include="App.aps" /> | ||
| 182 | </ItemGroup> | ||
| 183 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| 184 | <ImportGroup Label="ExtensionTargets"> | ||
| 185 | </ImportGroup> | ||
| 186 | </Project> \ No newline at end of file | ||
| diff --git a/App/App.vcxproj.filters b/App/App.vcxproj.filters new file mode 100644 index 0000000..26b3d34 --- /dev/null +++ b/App/App.vcxproj.filters | |||
| @@ -0,0 +1,43 @@ | |||
| 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 new file mode 100644 index 0000000..ce0e550 --- /dev/null +++ b/App/Main.cpp | |||
| @@ -0,0 +1,193 @@ | |||
| 1 | #include "windows.h" | ||
| 2 | #include <Richedit.h> | ||
| 3 | |||
| 4 | #include <string> | ||
| 5 | |||
| 6 | #include "Randomizer.h" | ||
| 7 | #include "Version.h" | ||
| 8 | #include "Random.h" | ||
| 9 | #include "Panel.h" | ||
| 10 | |||
| 11 | #define IDC_RANDOMIZE 0x401 | ||
| 12 | #define IDC_TOGGLESPEED 0x402 | ||
| 13 | #define IDC_SPEEDRUNNER 0x403 | ||
| 14 | #define IDC_HARDMODE 0x404 | ||
| 15 | #define IDC_READ 0x405 | ||
| 16 | #define IDC_RANDOM 0x406 | ||
| 17 | #define IDC_WRITE 0x407 | ||
| 18 | #define IDC_DUMP 0x408 | ||
| 19 | |||
| 20 | HWND hwndSeed, hwndRandomize; | ||
| 21 | // int panel = 0x18AF; | ||
| 22 | int panel = 0x33D4; | ||
| 23 | std::shared_ptr<Panel> _panel; | ||
| 24 | |||
| 25 | LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | ||
| 26 | { | ||
| 27 | static bool wasSeedRandomlyGenerated; | ||
| 28 | |||
| 29 | if (message == WM_DESTROY) { | ||
| 30 | PostQuitMessage(0); | ||
| 31 | } else if (message == WM_COMMAND) { | ||
| 32 | switch (LOWORD(wParam)) { | ||
| 33 | // Speed checkbox | ||
| 34 | case IDC_TOGGLESPEED: | ||
| 35 | if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { | ||
| 36 | CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_UNCHECKED); | ||
| 37 | } else { | ||
| 38 | CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_CHECKED); | ||
| 39 | } | ||
| 40 | break; | ||
| 41 | |||
| 42 | // Randomize button | ||
| 43 | case IDC_RANDOMIZE: | ||
| 44 | { | ||
| 45 | std::wstring text(100, '\0'); | ||
| 46 | GetWindowText(hwndSeed, &text[0], 100); | ||
| 47 | int seed = 0; | ||
| 48 | if (wasSeedRandomlyGenerated || wcslen(text.c_str()) == 0) { | ||
| 49 | seed = Random::RandInt(0, 100000); | ||
| 50 | wasSeedRandomlyGenerated = true; | ||
| 51 | } else { | ||
| 52 | seed = _wtoi(text.c_str()); | ||
| 53 | wasSeedRandomlyGenerated = false; | ||
| 54 | } | ||
| 55 | |||
| 56 | Randomizer randomizer; | ||
| 57 | short metadata = randomizer.Randomize(seed); | ||
| 58 | if (metadata & 0x1) break; // Was already randomized | ||
| 59 | |||
| 60 | std::wstring seedString = std::to_wstring(seed); | ||
| 61 | SetWindowText(hwndSeed, seedString.c_str()); | ||
| 62 | if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { | ||
| 63 | randomizer.AdjustSpeed(); | ||
| 64 | } | ||
| 65 | SetWindowText(hwndRandomize, L"Randomized!"); | ||
| 66 | break; | ||
| 67 | } | ||
| 68 | case IDC_READ: | ||
| 69 | _panel = std::make_shared<Panel>(panel); | ||
| 70 | break; | ||
| 71 | case IDC_RANDOM: | ||
| 72 | _panel->Random(); | ||
| 73 | break; | ||
| 74 | case IDC_WRITE: | ||
| 75 | _panel->Write(panel); | ||
| 76 | break; | ||
| 77 | case IDC_DUMP: | ||
| 78 | _panel->Serialize(); | ||
| 79 | break; | ||
| 80 | } | ||
| 81 | } | ||
| 82 | return DefWindowProc(hwnd, message, wParam, lParam); | ||
| 83 | } | ||
| 84 | |||
| 85 | int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) | ||
| 86 | { | ||
| 87 | LoadLibrary(L"Msftedit.dll"); | ||
| 88 | |||
| 89 | WNDCLASSW wndClass = { | ||
| 90 | CS_HREDRAW | CS_VREDRAW, | ||
| 91 | WndProc, | ||
| 92 | 0, | ||
| 93 | 0, | ||
| 94 | hInstance, | ||
| 95 | NULL, | ||
| 96 | LoadCursor(nullptr, IDC_ARROW), | ||
| 97 | (HBRUSH)(COLOR_WINDOW+1), | ||
| 98 | WINDOW_CLASS, | ||
| 99 | WINDOW_CLASS, | ||
| 100 | }; | ||
| 101 | RegisterClassW(&wndClass); | ||
| 102 | |||
| 103 | RECT rect; | ||
| 104 | GetClientRect(GetDesktopWindow(), &rect); | ||
| 105 | HWND hwnd = CreateWindow(WINDOW_CLASS, PRODUCT_NAME, WS_OVERLAPPEDWINDOW, | ||
| 106 | rect.right - 550, 200, 500, 500, nullptr, nullptr, hInstance, nullptr); | ||
| 107 | |||
| 108 | CreateWindow(L"STATIC", L"Version: " VERSION_STR, | ||
| 109 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 110 | 390, 15, 90, 16, hwnd, NULL, hInstance, NULL); | ||
| 111 | |||
| 112 | CreateWindow(L"STATIC", L"Enter a seed:", | ||
| 113 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 114 | 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); | ||
| 115 | hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"", | ||
| 116 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER, | ||
| 117 | 100, 10, 50, 26, hwnd, NULL, hInstance, NULL); | ||
| 118 | hwndRandomize = CreateWindow(L"BUTTON", L"Randomize", | ||
| 119 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
| 120 | 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); | ||
| 121 | |||
| 122 | #if GLOBALS == 0x5B28C0 | ||
| 123 | CreateWindow(L"BUTTON", L"READ", | ||
| 124 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
| 125 | 160, 100, 100, 26, hwnd, (HMENU)IDC_READ, hInstance, NULL); | ||
| 126 | CreateWindow(L"BUTTON", L"RANDOM", | ||
| 127 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
| 128 | 160, 130, 100, 26, hwnd, (HMENU)IDC_RANDOM, hInstance, NULL); | ||
| 129 | CreateWindow(L"BUTTON", L"WRITE", | ||
| 130 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
| 131 | 160, 160, 100, 26, hwnd, (HMENU)IDC_WRITE, hInstance, NULL); | ||
| 132 | CreateWindow(L"BUTTON", L"DUMP", | ||
| 133 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
| 134 | 160, 190, 100, 26, hwnd, (HMENU)IDC_DUMP, hInstance, NULL); | ||
| 135 | #endif | ||
| 136 | |||
| 137 | CreateWindow(L"BUTTON", L"", | ||
| 138 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | ||
| 139 | 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); | ||
| 140 | CreateWindow(L"STATIC", L"Speed up various autoscrollers", | ||
| 141 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 142 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | ||
| 143 | |||
| 144 | /* | ||
| 145 | CreateWindow(L"BUTTON", L"", | ||
| 146 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | ||
| 147 | 10, 52, 12, 12, hwnd, (HMENU)IDC_SPEEDRUNNER, hInstance, NULL); | ||
| 148 | CreateWindow(L"STATIC", L"Allow hard-to-identify panels to be shuffled", | ||
| 149 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 150 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | ||
| 151 | |||
| 152 | CreateWindow(L"BUTTON", L"", | ||
| 153 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | ||
| 154 | 10, 52, 12, 12, hwnd, (HMENU)IDC_HARDMODE, hInstance, NULL); | ||
| 155 | CreateWindow(L"STATIC", L"Place harder puzzles in annoying spots", | ||
| 156 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 157 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | ||
| 158 | |||
| 159 | CreateWindow(L"BUTTON", L"", | ||
| 160 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | ||
| 161 | 10, 52, 12, 12, hwnd, (HMENU)IDC_NORANDOMIZE, hInstance, NULL); | ||
| 162 | CreateWindow(L"STATIC", L"Do not randomize any puzzles", | ||
| 163 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 164 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | ||
| 165 | |||
| 166 | CreateWindow(L"BUTTON", L"", | ||
| 167 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | ||
| 168 | 10, 52, 12, 12, hwnd, (HMENU)IDC_CASUAL, hInstance, NULL); | ||
| 169 | CreateWindow(L"STATIC", L"Don't randomize context-based puzzles", | ||
| 170 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 171 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | ||
| 172 | |||
| 173 | CreateWindow(L"BUTTON", L"", | ||
| 174 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | ||
| 175 | 10, 52, 12, 12, hwnd, (HMENU)IDC_BANSNIPES, hInstance, NULL); | ||
| 176 | CreateWindow(L"STATIC", L"Prevent sniping certain puzzles", | ||
| 177 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | ||
| 178 | 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); | ||
| 179 | |||
| 180 | */ | ||
| 181 | |||
| 182 | ShowWindow(hwnd, nCmdShow); | ||
| 183 | UpdateWindow(hwnd); | ||
| 184 | |||
| 185 | MSG msg; | ||
| 186 | while (!GetMessage(&msg, nullptr, 0, 0) == 0) | ||
| 187 | { | ||
| 188 | TranslateMessage(&msg); | ||
| 189 | DispatchMessage(&msg); | ||
| 190 | } | ||
| 191 | |||
| 192 | return (int) msg.wParam; | ||
| 193 | } | ||
| diff --git a/App/Version.h b/App/Version.h new file mode 100644 index 0000000..05696d6 --- /dev/null +++ b/App/Version.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #define TO_STRING2(s) L#s | ||
| 4 | #define TO_STRING(s) TO_STRING2(s) | ||
| 5 | |||
| 6 | #define MAJOR 4 | ||
| 7 | #define MINOR 0 | ||
| 8 | #define PATCH 0 | ||
| 9 | |||
| 10 | #define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) | ||
| 11 | #define VERSION MAJOR, MINOR, PATCH | ||
| 12 | |||
| 13 | #define PRODUCT_NAME L"Witness Randomizer" | ||
| 14 | #define WINDOW_CLASS L"WitnessRandomizer" | ||
| diff --git a/App/Version.rc b/App/Version.rc new file mode 100644 index 0000000..9b90884 --- /dev/null +++ b/App/Version.rc | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #include "version.h" | ||
| 2 | |||
| 3 | VS_VERSION_INFO VERSIONINFO | ||
| 4 | FILEVERSION VERSION | ||
| 5 | BEGIN | ||
| 6 | END | ||
| diff --git a/App/small.ico b/App/small.ico new file mode 100644 index 0000000..b3ec03b --- /dev/null +++ b/App/small.ico | |||
| Binary files differ | |||
