From a828620c6447e8c51f6e9d1767eabe0fc5ade0a0 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Mon, 5 Nov 2018 08:15:23 -0800 Subject: moving stuff so I can test --- App/App.ico | Bin 0 -> 46227 bytes App/App.vcxproj | 186 ++++++++++++++++++++++++++++++++++++++++ App/App.vcxproj.filters | 43 ++++++++++ App/Main.cpp | 193 ++++++++++++++++++++++++++++++++++++++++++ App/Version.h | 14 +++ App/Version.rc | 6 ++ App/small.ico | Bin 0 -> 46227 bytes Source/Main.cpp | 193 ------------------------------------------ Source/Panel.cpp | 1 + Source/Panel.h | 1 + Source/Random.cpp | 1 - Source/Source.ico | Bin 46227 -> 0 bytes Source/Source.vcxproj | 111 ++++++++++-------------- Source/Source.vcxproj.filters | 38 +++------ Source/Version.h | 14 --- Source/Version.rc | 6 -- Source/small.ico | Bin 46227 -> 0 bytes Test/Foo.cpp | 11 +++ Test/OrderingTests.cpp | 7 -- Test/Test.vcxproj | 27 +++--- WitnessRandomizer.sln | 44 +++++++--- 21 files changed, 557 insertions(+), 339 deletions(-) create mode 100644 App/App.ico create mode 100644 App/App.vcxproj create mode 100644 App/App.vcxproj.filters create mode 100644 App/Main.cpp create mode 100644 App/Version.h create mode 100644 App/Version.rc create mode 100644 App/small.ico delete mode 100644 Source/Main.cpp delete mode 100644 Source/Source.ico delete mode 100644 Source/Version.h delete mode 100644 Source/Version.rc delete mode 100644 Source/small.ico create mode 100644 Test/Foo.cpp delete mode 100644 Test/OrderingTests.cpp diff --git a/App/App.ico b/App/App.ico new file mode 100644 index 0000000..b3ec03b Binary files /dev/null and b/App/App.ico 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 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {CED79182-F36B-4D07-AD0E-249C15BFAD73} + Win32Proj + App + 10.0.17134.0 + App + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + WitnessRandomizer + + + + NotUsing + Level3 + Disabled + true + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + true + stdcpp17 + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level2 + Disabled + true + _DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + true + stdcpp17 + MultiThreadedDebug + C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + NotUsing + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + true + EditAndContinue + stdcpp17 + MultiThreaded + + + Windows + true + true + true + + + + + NotUsing + Level2 + MaxSpeed + true + true + true + NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + true + stdcpp17 + None + MultiThreaded + C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + \ 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 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + Resource Files + + + + + + \ 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 @@ +#include "windows.h" +#include + +#include + +#include "Randomizer.h" +#include "Version.h" +#include "Random.h" +#include "Panel.h" + +#define IDC_RANDOMIZE 0x401 +#define IDC_TOGGLESPEED 0x402 +#define IDC_SPEEDRUNNER 0x403 +#define IDC_HARDMODE 0x404 +#define IDC_READ 0x405 +#define IDC_RANDOM 0x406 +#define IDC_WRITE 0x407 +#define IDC_DUMP 0x408 + +HWND hwndSeed, hwndRandomize; +// int panel = 0x18AF; +int panel = 0x33D4; +std::shared_ptr _panel; + +LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + static bool wasSeedRandomlyGenerated; + + if (message == WM_DESTROY) { + PostQuitMessage(0); + } else if (message == WM_COMMAND) { + switch (LOWORD(wParam)) { + // Speed checkbox + case IDC_TOGGLESPEED: + if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { + CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_UNCHECKED); + } else { + CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_CHECKED); + } + break; + + // Randomize button + case IDC_RANDOMIZE: + { + std::wstring text(100, '\0'); + GetWindowText(hwndSeed, &text[0], 100); + int seed = 0; + if (wasSeedRandomlyGenerated || wcslen(text.c_str()) == 0) { + seed = Random::RandInt(0, 100000); + wasSeedRandomlyGenerated = true; + } else { + seed = _wtoi(text.c_str()); + wasSeedRandomlyGenerated = false; + } + + Randomizer randomizer; + short metadata = randomizer.Randomize(seed); + if (metadata & 0x1) break; // Was already randomized + + std::wstring seedString = std::to_wstring(seed); + SetWindowText(hwndSeed, seedString.c_str()); + if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { + randomizer.AdjustSpeed(); + } + SetWindowText(hwndRandomize, L"Randomized!"); + break; + } + case IDC_READ: + _panel = std::make_shared(panel); + break; + case IDC_RANDOM: + _panel->Random(); + break; + case IDC_WRITE: + _panel->Write(panel); + break; + case IDC_DUMP: + _panel->Serialize(); + break; + } + } + return DefWindowProc(hwnd, message, wParam, lParam); +} + +int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) +{ + LoadLibrary(L"Msftedit.dll"); + + WNDCLASSW wndClass = { + CS_HREDRAW | CS_VREDRAW, + WndProc, + 0, + 0, + hInstance, + NULL, + LoadCursor(nullptr, IDC_ARROW), + (HBRUSH)(COLOR_WINDOW+1), + WINDOW_CLASS, + WINDOW_CLASS, + }; + RegisterClassW(&wndClass); + + RECT rect; + GetClientRect(GetDesktopWindow(), &rect); + HWND hwnd = CreateWindow(WINDOW_CLASS, PRODUCT_NAME, WS_OVERLAPPEDWINDOW, + rect.right - 550, 200, 500, 500, nullptr, nullptr, hInstance, nullptr); + + CreateWindow(L"STATIC", L"Version: " VERSION_STR, + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 390, 15, 90, 16, hwnd, NULL, hInstance, NULL); + + CreateWindow(L"STATIC", L"Enter a seed:", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); + hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER, + 100, 10, 50, 26, hwnd, NULL, hInstance, NULL); + hwndRandomize = CreateWindow(L"BUTTON", L"Randomize", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); + +#if GLOBALS == 0x5B28C0 + CreateWindow(L"BUTTON", L"READ", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 100, 100, 26, hwnd, (HMENU)IDC_READ, hInstance, NULL); + CreateWindow(L"BUTTON", L"RANDOM", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 130, 100, 26, hwnd, (HMENU)IDC_RANDOM, hInstance, NULL); + CreateWindow(L"BUTTON", L"WRITE", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 160, 100, 26, hwnd, (HMENU)IDC_WRITE, hInstance, NULL); + CreateWindow(L"BUTTON", L"DUMP", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 190, 100, 26, hwnd, (HMENU)IDC_DUMP, hInstance, NULL); +#endif + + CreateWindow(L"BUTTON", L"", + WS_VISIBLE | WS_CHILD | BS_CHECKBOX, + 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); + CreateWindow(L"STATIC", L"Speed up various autoscrollers", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + + /* + CreateWindow(L"BUTTON", L"", + WS_VISIBLE | WS_CHILD | BS_CHECKBOX, + 10, 52, 12, 12, hwnd, (HMENU)IDC_SPEEDRUNNER, hInstance, NULL); + CreateWindow(L"STATIC", L"Allow hard-to-identify panels to be shuffled", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + + CreateWindow(L"BUTTON", L"", + WS_VISIBLE | WS_CHILD | BS_CHECKBOX, + 10, 52, 12, 12, hwnd, (HMENU)IDC_HARDMODE, hInstance, NULL); + CreateWindow(L"STATIC", L"Place harder puzzles in annoying spots", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + + CreateWindow(L"BUTTON", L"", + WS_VISIBLE | WS_CHILD | BS_CHECKBOX, + 10, 52, 12, 12, hwnd, (HMENU)IDC_NORANDOMIZE, hInstance, NULL); + CreateWindow(L"STATIC", L"Do not randomize any puzzles", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + + CreateWindow(L"BUTTON", L"", + WS_VISIBLE | WS_CHILD | BS_CHECKBOX, + 10, 52, 12, 12, hwnd, (HMENU)IDC_CASUAL, hInstance, NULL); + CreateWindow(L"STATIC", L"Don't randomize context-based puzzles", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + + CreateWindow(L"BUTTON", L"", + WS_VISIBLE | WS_CHILD | BS_CHECKBOX, + 10, 52, 12, 12, hwnd, (HMENU)IDC_BANSNIPES, hInstance, NULL); + CreateWindow(L"STATIC", L"Prevent sniping certain puzzles", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, + 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); + +*/ + + ShowWindow(hwnd, nCmdShow); + UpdateWindow(hwnd); + + MSG msg; + while (!GetMessage(&msg, nullptr, 0, 0) == 0) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + return (int) msg.wParam; +} 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 @@ +#pragma once + +#define TO_STRING2(s) L#s +#define TO_STRING(s) TO_STRING2(s) + +#define MAJOR 4 +#define MINOR 0 +#define PATCH 0 + +#define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) +#define VERSION MAJOR, MINOR, PATCH + +#define PRODUCT_NAME L"Witness Randomizer" +#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 @@ +#include "version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION +BEGIN +END diff --git a/App/small.ico b/App/small.ico new file mode 100644 index 0000000..b3ec03b Binary files /dev/null and b/App/small.ico differ diff --git a/Source/Main.cpp b/Source/Main.cpp deleted file mode 100644 index ce0e550..0000000 --- a/Source/Main.cpp +++ /dev/null @@ -1,193 +0,0 @@ -#include "windows.h" -#include - -#include - -#include "Randomizer.h" -#include "Version.h" -#include "Random.h" -#include "Panel.h" - -#define IDC_RANDOMIZE 0x401 -#define IDC_TOGGLESPEED 0x402 -#define IDC_SPEEDRUNNER 0x403 -#define IDC_HARDMODE 0x404 -#define IDC_READ 0x405 -#define IDC_RANDOM 0x406 -#define IDC_WRITE 0x407 -#define IDC_DUMP 0x408 - -HWND hwndSeed, hwndRandomize; -// int panel = 0x18AF; -int panel = 0x33D4; -std::shared_ptr _panel; - -LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static bool wasSeedRandomlyGenerated; - - if (message == WM_DESTROY) { - PostQuitMessage(0); - } else if (message == WM_COMMAND) { - switch (LOWORD(wParam)) { - // Speed checkbox - case IDC_TOGGLESPEED: - if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { - CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_UNCHECKED); - } else { - CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_CHECKED); - } - break; - - // Randomize button - case IDC_RANDOMIZE: - { - std::wstring text(100, '\0'); - GetWindowText(hwndSeed, &text[0], 100); - int seed = 0; - if (wasSeedRandomlyGenerated || wcslen(text.c_str()) == 0) { - seed = Random::RandInt(0, 100000); - wasSeedRandomlyGenerated = true; - } else { - seed = _wtoi(text.c_str()); - wasSeedRandomlyGenerated = false; - } - - Randomizer randomizer; - short metadata = randomizer.Randomize(seed); - if (metadata & 0x1) break; // Was already randomized - - std::wstring seedString = std::to_wstring(seed); - SetWindowText(hwndSeed, seedString.c_str()); - if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { - randomizer.AdjustSpeed(); - } - SetWindowText(hwndRandomize, L"Randomized!"); - break; - } - case IDC_READ: - _panel = std::make_shared(panel); - break; - case IDC_RANDOM: - _panel->Random(); - break; - case IDC_WRITE: - _panel->Write(panel); - break; - case IDC_DUMP: - _panel->Serialize(); - break; - } - } - return DefWindowProc(hwnd, message, wParam, lParam); -} - -int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) -{ - LoadLibrary(L"Msftedit.dll"); - - WNDCLASSW wndClass = { - CS_HREDRAW | CS_VREDRAW, - WndProc, - 0, - 0, - hInstance, - NULL, - LoadCursor(nullptr, IDC_ARROW), - (HBRUSH)(COLOR_WINDOW+1), - WINDOW_CLASS, - WINDOW_CLASS, - }; - RegisterClassW(&wndClass); - - RECT rect; - GetClientRect(GetDesktopWindow(), &rect); - HWND hwnd = CreateWindow(WINDOW_CLASS, PRODUCT_NAME, WS_OVERLAPPEDWINDOW, - rect.right - 550, 200, 500, 500, nullptr, nullptr, hInstance, nullptr); - - CreateWindow(L"STATIC", L"Version: " VERSION_STR, - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 390, 15, 90, 16, hwnd, NULL, hInstance, NULL); - - CreateWindow(L"STATIC", L"Enter a seed:", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); - hwndSeed = CreateWindow(MSFTEDIT_CLASS, L"", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER, - 100, 10, 50, 26, hwnd, NULL, hInstance, NULL); - hwndRandomize = CreateWindow(L"BUTTON", L"Randomize", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); - -#if GLOBALS == 0x5B28C0 - CreateWindow(L"BUTTON", L"READ", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 160, 100, 100, 26, hwnd, (HMENU)IDC_READ, hInstance, NULL); - CreateWindow(L"BUTTON", L"RANDOM", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 160, 130, 100, 26, hwnd, (HMENU)IDC_RANDOM, hInstance, NULL); - CreateWindow(L"BUTTON", L"WRITE", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 160, 160, 100, 26, hwnd, (HMENU)IDC_WRITE, hInstance, NULL); - CreateWindow(L"BUTTON", L"DUMP", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 160, 190, 100, 26, hwnd, (HMENU)IDC_DUMP, hInstance, NULL); -#endif - - CreateWindow(L"BUTTON", L"", - WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); - CreateWindow(L"STATIC", L"Speed up various autoscrollers", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); - - /* - CreateWindow(L"BUTTON", L"", - WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 52, 12, 12, hwnd, (HMENU)IDC_SPEEDRUNNER, hInstance, NULL); - CreateWindow(L"STATIC", L"Allow hard-to-identify panels to be shuffled", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); - - CreateWindow(L"BUTTON", L"", - WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 52, 12, 12, hwnd, (HMENU)IDC_HARDMODE, hInstance, NULL); - CreateWindow(L"STATIC", L"Place harder puzzles in annoying spots", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); - - CreateWindow(L"BUTTON", L"", - WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 52, 12, 12, hwnd, (HMENU)IDC_NORANDOMIZE, hInstance, NULL); - CreateWindow(L"STATIC", L"Do not randomize any puzzles", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); - - CreateWindow(L"BUTTON", L"", - WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 52, 12, 12, hwnd, (HMENU)IDC_CASUAL, hInstance, NULL); - CreateWindow(L"STATIC", L"Don't randomize context-based puzzles", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); - - CreateWindow(L"BUTTON", L"", - WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 52, 12, 12, hwnd, (HMENU)IDC_BANSNIPES, hInstance, NULL); - CreateWindow(L"STATIC", L"Prevent sniping certain puzzles", - WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, - 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); - -*/ - - ShowWindow(hwnd, nCmdShow); - UpdateWindow(hwnd); - - MSG msg; - while (!GetMessage(&msg, nullptr, 0, 0) == 0) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return (int) msg.wParam; -} diff --git a/Source/Panel.cpp b/Source/Panel.cpp index 5465bef..14f803c 100644 --- a/Source/Panel.cpp +++ b/Source/Panel.cpp @@ -1,5 +1,6 @@ #include "Panel.h" #include "Random.h" +#include "Memory.h" #include template diff --git a/Source/Panel.h b/Source/Panel.h index 4982f17..4f3ab11 100644 --- a/Source/Panel.h +++ b/Source/Panel.h @@ -1,6 +1,7 @@ #pragma once #include "json.hpp" #include "RandomizerCore.h" +#include "Memory.h" class Decoration { diff --git a/Source/Random.cpp b/Source/Random.cpp index cc3eb6c..c921e58 100644 --- a/Source/Random.cpp +++ b/Source/Random.cpp @@ -1,5 +1,4 @@ #include - #include "Random.h" int Random::s_seed = time(nullptr); // Seed from the time in milliseconds diff --git a/Source/Source.ico b/Source/Source.ico deleted file mode 100644 index b3ec03b..0000000 Binary files a/Source/Source.ico and /dev/null differ diff --git a/Source/Source.vcxproj b/Source/Source.vcxproj index 4319a91..d140781 100644 --- a/Source/Source.vcxproj +++ b/Source/Source.vcxproj @@ -18,35 +18,51 @@ x64 + + + + + + + + + + + + + + + + 15.0 - {CED79182-F36B-4D07-AD0E-249C15BFAD73} + {5C019BEA-E0B4-4215-825F-6A228CD3AE27} Win32Proj Source 10.0.17134.0 - Application + StaticLibrary true v141 Unicode - Application + StaticLibrary false v141 true Unicode - Application + StaticLibrary true v141 Unicode - Application + StaticLibrary false v141 true @@ -70,6 +86,9 @@ + + false + true @@ -79,80 +98,66 @@ false - - false - WitnessRandomizer - - + NotUsing - Level3 - Disabled + Level2 + MaxSpeed + true + true true - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + NDEBUG;_LIB;%(PreprocessorDefinitions) true - true stdcpp17 - MultiThreadedDebug + true Windows + true + true true - + - NotUsing - Level2 + Use + Level3 Disabled true - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true - true - stdcpp17 - MultiThreadedDebug Windows true - + NotUsing - Level3 - MaxSpeed - true - true + Level2 + Disabled true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + _DEBUG;_LIB;%(PreprocessorDefinitions) true - true - EditAndContinue stdcpp17 - MultiThreaded + true Windows - true - true true - + - NotUsing - Level2 + Use + Level3 MaxSpeed true true true - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) true - true - stdcpp17 - None - MultiThreaded Windows @@ -161,30 +166,6 @@ true - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/Source.vcxproj.filters b/Source/Source.vcxproj.filters index f480c6c..fe9204f 100644 --- a/Source/Source.vcxproj.filters +++ b/Source/Source.vcxproj.filters @@ -15,59 +15,43 @@ - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - - Source Files - Source Files - + Source Files - + Source Files - + Source Files - + Source Files - - - Resource Files - - - - - Resource Files - - - Resource Files - - \ No newline at end of file diff --git a/Source/Version.h b/Source/Version.h deleted file mode 100644 index 05696d6..0000000 --- a/Source/Version.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#define TO_STRING2(s) L#s -#define TO_STRING(s) TO_STRING2(s) - -#define MAJOR 4 -#define MINOR 0 -#define PATCH 0 - -#define VERSION_STR TO_STRING(MAJOR) L"." TO_STRING(MINOR) L"." TO_STRING(PATCH) -#define VERSION MAJOR, MINOR, PATCH - -#define PRODUCT_NAME L"Witness Randomizer" -#define WINDOW_CLASS L"WitnessRandomizer" diff --git a/Source/Version.rc b/Source/Version.rc deleted file mode 100644 index 9b90884..0000000 --- a/Source/Version.rc +++ /dev/null @@ -1,6 +0,0 @@ -#include "version.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION -BEGIN -END diff --git a/Source/small.ico b/Source/small.ico deleted file mode 100644 index b3ec03b..0000000 Binary files a/Source/small.ico and /dev/null differ diff --git a/Test/Foo.cpp b/Test/Foo.cpp new file mode 100644 index 0000000..d9d155e --- /dev/null +++ b/Test/Foo.cpp @@ -0,0 +1,11 @@ +#include "gtest/gtest.h" +#include "Random.h" + +TEST(Foo, Bar) { + int random1 = Random::RandInt(0, 1 << 30); + int random2 = Random::RandInt(0, 1 << 30); + ASSERT_NE(random1, random2); + int random3 = Random::RandInt(random1, random2); + ASSERT_GE(random3, random1); + ASSERT_LT(random3, random2); +} diff --git a/Test/OrderingTests.cpp b/Test/OrderingTests.cpp deleted file mode 100644 index 6549be7..0000000 --- a/Test/OrderingTests.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "gtest/gtest.h" -#include "Randomizer.h" -#include "Memory.h" - -TEST(OrderingTests, TestJungleOrder) { - Randomizer _randomizer; -} diff --git a/Test/Test.vcxproj b/Test/Test.vcxproj index aaa311c..36b192a 100644 --- a/Test/Test.vcxproj +++ b/Test/Test.vcxproj @@ -19,7 +19,7 @@ - {98bc35b9-ee1a-4d77-85f2-adaa72db16f7} + {2208ee21-5366-4042-89d6-1a3c4bd79ad4} Win32Proj 10.0.17134.0 Application @@ -33,22 +33,22 @@ - C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;$(IncludePath) + $(IncludePath) - C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;$(IncludePath) + $(IncludePath) - - - - {ced79182-f36b-4d07-ad0e-249c15bfad73} + {5c019bea-e0b4-4215-825f-6a228cd3ae27} + + + @@ -72,14 +72,17 @@ - Use + NotUsing pch.h Disabled X64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL - Level3 + Level2 + 4996 + true + C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories) true @@ -108,11 +111,11 @@ pch.h X64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDLL - Level3 + Level2 ProgramDatabase - - 4996 + true + C:\Users\localhost\Documents\GitHub\witness-randomizer\Source;%(AdditionalIncludeDirectories) true diff --git a/WitnessRandomizer.sln b/WitnessRandomizer.sln index 7d6b1c2..a9d1f7e 100644 --- a/WitnessRandomizer.sln +++ b/WitnessRandomizer.sln @@ -3,11 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28010.2048 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Source", "Source\Source.vcxproj", "{CED79182-F36B-4D07-AD0E-249C15BFAD73}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "App", "App\App.vcxproj", "{CED79182-F36B-4D07-AD0E-249C15BFAD73}" + ProjectSection(ProjectDependencies) = postProject + {5C019BEA-E0B4-4215-825F-6A228CD3AE27} = {5C019BEA-E0B4-4215-825F-6A228CD3AE27} + EndProjectSection EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Installer", "Installer\Installer.vdproj", "{90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}" + ProjectSection(ProjectDependencies) = postProject + {5C019BEA-E0B4-4215-825F-6A228CD3AE27} = {5C019BEA-E0B4-4215-825F-6A228CD3AE27} + EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Source", "Source\Source.vcxproj", "{5C019BEA-E0B4-4215-825F-6A228CD3AE27}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{2208EE21-5366-4042-89D6-1A3C4BD79AD4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,24 +29,32 @@ Global {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x64.Build.0 = Debug|x64 {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x86.ActiveCfg = Release|x64 {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x86.Build.0 = Release|x64 - {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x64.ActiveCfg = Release|x64 - {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x64.Build.0 = Release|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x64.ActiveCfg = Debug|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x64.Build.0 = Debug|x64 {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x86.ActiveCfg = Release|Win32 {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x86.Build.0 = Release|Win32 {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Debug|x64.ActiveCfg = Debug {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Debug|x64.Build.0 = Debug {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Debug|x86.ActiveCfg = Release - {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x64.ActiveCfg = Release - {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x64.Build.0 = Release + {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x64.ActiveCfg = Debug + {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x64.Build.0 = Debug {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x86.ActiveCfg = Release - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x64.ActiveCfg = Debug|x64 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x64.Build.0 = Debug|x64 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x86.ActiveCfg = Release|x64 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x86.Build.0 = Release|x64 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x64.ActiveCfg = Release|x64 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x64.Build.0 = Release|x64 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x86.ActiveCfg = Release|Win32 - {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x86.Build.0 = Release|Win32 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Debug|x64.ActiveCfg = Debug|x64 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Debug|x64.Build.0 = Debug|x64 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Debug|x86.ActiveCfg = Debug|Win32 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Debug|x86.Build.0 = Debug|Win32 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Release|x64.ActiveCfg = Debug|x64 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Release|x64.Build.0 = Debug|x64 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Release|x86.ActiveCfg = Release|Win32 + {5C019BEA-E0B4-4215-825F-6A228CD3AE27}.Release|x86.Build.0 = Release|Win32 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Debug|x64.ActiveCfg = Debug|x64 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Debug|x64.Build.0 = Debug|x64 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Debug|x86.ActiveCfg = Debug|Win32 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Debug|x86.Build.0 = Debug|Win32 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Release|x64.ActiveCfg = Debug|x64 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Release|x64.Build.0 = Debug|x64 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Release|x86.ActiveCfg = Release|Win32 + {2208EE21-5366-4042-89D6-1A3C4BD79AD4}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- cgit 1.4.1