├── TC5Ever ├── entry.cpp ├── settings.h ├── packages.config ├── framework.h ├── hooks.h ├── settings.cpp ├── hooks.cpp ├── .clang-format ├── TC5Ever.vcxproj.filters ├── dllmain.cpp └── TC5Ever.vcxproj ├── .github └── workflows │ └── msbuild.yml ├── TC5Ever.sln ├── config ├── README.md ├── .gitignore └── LICENSE /TC5Ever/entry.cpp: -------------------------------------------------------------------------------- 1 | #include "framework.h" 2 | 3 | -------------------------------------------------------------------------------- /TC5Ever/settings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace settings { 7 | std::vector Args(); 8 | } -------------------------------------------------------------------------------- /TC5Ever/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TC5Ever/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 4 | // Windows Header Files 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /TC5Ever/hooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | namespace hooks { 7 | namespace wsock { 8 | using ConnectFunc = decltype(connect); 9 | using ConnectFuncPtr = decltype(&connect); 10 | void HookConnect(std::function hook); 11 | }; 12 | 13 | void Attach(); 14 | void Detach(); 15 | }; -------------------------------------------------------------------------------- /TC5Ever/settings.cpp: -------------------------------------------------------------------------------- 1 | #include "framework.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace settings { 11 | std::vector Args() { 12 | int nArgs; 13 | auto* wArgv = CommandLineToArgvW(GetCommandLineW(), &nArgs); 14 | 15 | std::span s(wArgv, nArgs); 16 | std::vector args; 17 | 18 | std::transform(s.begin(), s.end(), std::back_inserter(args), [](auto wstr) -> std::string { 19 | auto wstrLen = wcslen(wstr); 20 | auto nChars = WideCharToMultiByte(CP_UTF8, 0, wstr, int(wstrLen), nullptr, 0, nullptr, nullptr); 21 | std::unique_ptr buf = std::make_unique(nChars + 1); 22 | WideCharToMultiByte(CP_UTF8, 0, wstr, int(wstrLen), buf.get(), nChars, 0, 0); 23 | return buf.get(); 24 | }); 25 | 26 | return args; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.github/workflows/msbuild.yml: -------------------------------------------------------------------------------- 1 | name: MSBuild 2 | 3 | on: [push] 4 | 5 | env: 6 | # Path to the solution file relative to the root of the project. 7 | SOLUTION_FILE_PATH: . 8 | 9 | # Configuration type to build. 10 | # You can convert this to a build matrix if you need coverage of multiple configuration types. 11 | # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix 12 | BUILD_CONFIGURATION: Release 13 | 14 | jobs: 15 | build: 16 | runs-on: windows-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v2 20 | 21 | - name: Add MSBuild to PATH 22 | uses: microsoft/setup-msbuild@v1.0.2 23 | 24 | - name: Restore NuGet packages 25 | working-directory: ${{env.GITHUB_WORKSPACE}} 26 | run: nuget restore ${{env.SOLUTION_FILE_PATH}} 27 | 28 | - name: Build 29 | working-directory: ${{env.GITHUB_WORKSPACE}} 30 | # Add additional options to the MSBuild command line here (like platform or verbosity level). 31 | # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference 32 | run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /property:Platform=x64 ${{env.SOLUTION_FILE_PATH}} 33 | 34 | - name: Upload build artifacts 35 | uses: actions/upload-artifact@v2 36 | with: 37 | name: TC5Ever 38 | path: x64\${{env.BUILD_CONFIGURATION}}\dinput8.dll 39 | -------------------------------------------------------------------------------- /TC5Ever.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.32126.317 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TC5Ever", "TC5Ever\TC5Ever.vcxproj", "{23D401D2-A787-49B4-821F-BB685D50502D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {23D401D2-A787-49B4-821F-BB685D50502D}.Debug|x64.ActiveCfg = Debug|x64 17 | {23D401D2-A787-49B4-821F-BB685D50502D}.Debug|x64.Build.0 = Debug|x64 18 | {23D401D2-A787-49B4-821F-BB685D50502D}.Debug|x86.ActiveCfg = Debug|Win32 19 | {23D401D2-A787-49B4-821F-BB685D50502D}.Debug|x86.Build.0 = Debug|Win32 20 | {23D401D2-A787-49B4-821F-BB685D50502D}.Release|x64.ActiveCfg = Release|x64 21 | {23D401D2-A787-49B4-821F-BB685D50502D}.Release|x64.Build.0 = Release|x64 22 | {23D401D2-A787-49B4-821F-BB685D50502D}.Release|x86.ActiveCfg = Release|Win32 23 | {23D401D2-A787-49B4-821F-BB685D50502D}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {57CA8822-9C36-4B51-B3B0-FF3C055A357A} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /TC5Ever/hooks.cpp: -------------------------------------------------------------------------------- 1 | #include "hooks.h" 2 | #include 3 | #include 4 | #include 5 | 6 | namespace hooks { 7 | namespace wsock { 8 | 9 | static ConnectFuncPtr oConnect; 10 | static std::function hConnect = nullptr; 11 | void HookConnect(std::function cb) { 12 | hConnect = cb; 13 | } 14 | 15 | int WINAPI connectHook(SOCKET s, const sockaddr* name, int namelen) { 16 | static_assert(std::is_same::value, "ensure hook function type is the same"); 17 | std::cout << "connect() hook called" << std::endl; 18 | if (hConnect) { 19 | return hConnect(oConnect, s, name, namelen); 20 | } 21 | return oConnect(s, name, namelen); 22 | }; 23 | 24 | } 25 | 26 | void Attach() { 27 | DetourTransactionBegin(); 28 | DetourUpdateThread(GetCurrentThread()); 29 | wsock::oConnect = reinterpret_cast(DetourFindFunction("wsock32.dll", "connect")); 30 | DetourAttach(reinterpret_cast(&wsock::oConnect), wsock::connectHook); 31 | DetourTransactionCommit(); 32 | std::cout << "detours attached" << std::endl; 33 | }; 34 | 35 | void Detach() { 36 | DetourTransactionBegin(); 37 | DetourUpdateThread(GetCurrentThread()); 38 | DetourDetach(reinterpret_cast(&wsock::oConnect), wsock::connectHook); 39 | DetourTransactionCommit(); 40 | std::cout << "detours detached" << std::endl; 41 | }; 42 | } -------------------------------------------------------------------------------- /TC5Ever/.clang-format: -------------------------------------------------------------------------------- 1 | # Visual Studio generated .clang-format file 2 | 3 | # The style options in this file are a best effort attempt to replicate the 4 | # current IDE formatting configuration from Tools > Options. The following 5 | # style options, however, should be verified: 6 | # AfterClass, AfterControlStatement, AfterEnum, AfterFunction, AfterNamespace, 7 | # AfterStruct, AfterUnion 8 | 9 | AccessModifierOffset: -4 10 | AlignAfterOpenBracket: DontAlign 11 | AllowShortBlocksOnASingleLine: true 12 | AllowShortFunctionsOnASingleLine: All 13 | BasedOnStyle: LLVM 14 | BraceWrapping: 15 | AfterClass: false # TODO: verify 16 | AfterControlStatement: false # TODO: verify 17 | AfterEnum: false # TODO: verify 18 | AfterFunction: false # TODO: verify 19 | AfterNamespace: false # TODO: verify 20 | AfterStruct: false # TODO: verify 21 | AfterUnion: false # TODO: verify 22 | BeforeCatch: true 23 | BeforeElse: true 24 | IndentBraces: false 25 | SplitEmptyFunction: true 26 | SplitEmptyRecord: true 27 | BreakBeforeBraces: Custom 28 | ColumnLimit: 0 29 | Cpp11BracedListStyle: false 30 | FixNamespaceComments: false 31 | IndentCaseLabels: false 32 | IndentPPDirectives: None 33 | IndentWidth: 4 34 | MaxEmptyLinesToKeep: 10 35 | NamespaceIndentation: All 36 | PointerAlignment: Left 37 | SortIncludes: false 38 | SortUsingDeclarations: false 39 | SpaceAfterCStyleCast: false 40 | SpaceBeforeAssignmentOperators: true 41 | SpaceBeforeParens: ControlStatements 42 | SpaceInEmptyParentheses: false 43 | SpacesInCStyleCastParentheses: false 44 | SpacesInParentheses: false 45 | SpacesInSquareBrackets: false 46 | TabWidth: 4 47 | UseTab: true 48 | -------------------------------------------------------------------------------- /TC5Ever/TC5Ever.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /config: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Component.CoreEditor", 5 | "Microsoft.VisualStudio.Workload.CoreEditor", 6 | "Microsoft.Net.Component.4.8.SDK", 7 | "Microsoft.Net.Component.4.7.2.TargetingPack", 8 | "Microsoft.VisualStudio.Component.TypeScript.TSServer", 9 | "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", 10 | "Microsoft.VisualStudio.Component.JavaScript.TypeScript", 11 | "Microsoft.VisualStudio.Component.Roslyn.Compiler", 12 | "Microsoft.Component.MSBuild", 13 | "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", 14 | "Microsoft.VisualStudio.Component.TextTemplating", 15 | "Microsoft.VisualStudio.Component.NuGet", 16 | "Microsoft.VisualStudio.Component.Debugger.JustInTime", 17 | "Component.Microsoft.VisualStudio.LiveShare.2022", 18 | "Microsoft.VisualStudio.Component.IntelliCode", 19 | "Microsoft.VisualStudio.Component.VC.CoreIde", 20 | "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", 21 | "Microsoft.VisualStudio.Component.Graphics.Tools", 22 | "Microsoft.VisualStudio.Component.VC.DiagnosticTools", 23 | "Microsoft.VisualStudio.Component.Windows10SDK.19041", 24 | "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", 25 | "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", 26 | "Microsoft.VisualStudio.Component.VC.Tools.ARM64", 27 | "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake", 28 | "Microsoft.VisualStudio.Component.VC.CMake.Project", 29 | "Microsoft.VisualStudio.Component.VC.ATL", 30 | "Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest", 31 | "Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest", 32 | "Microsoft.VisualStudio.Component.VC.ASAN", 33 | "Microsoft.VisualStudio.Component.VC.Modules.x86.x64", 34 | "Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", 35 | "Microsoft.VisualStudio.Component.VC.Llvm.Clang", 36 | "Component.IncredibuildMenu", 37 | "Component.Incredibuild", 38 | "Microsoft.VisualStudio.Workload.NativeDesktop", 39 | "Microsoft.VisualStudio.Component.VC.Redist.MSM" 40 | ] 41 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TC5Ever 2 | [![MSBuild](https://github.com/davidzech/TC5Ever/actions/workflows/msbuild.yml/badge.svg)](https://github.com/davidzech/TC5Ever/actions/workflows/msbuild.yml) 3 | 4 | Simple mod to enable 2 Player CO-OP link play with Time Crisis 5. It works by simply intercepting TCP `connect(2)` calls and replacing the destination address with whatever you choose as player 2. 5 | 6 | I have tested multiplayer with: 7 | 1. Two instances of the game on a single computer 8 | 2. Over LAN 9 | 3. Over the internet (port forwarding required) 10 | 11 | ## Installation 12 | 13 | Unzip `dinput8.dll` to the same directory where `TimeCrisisGame-Win64-Shipping.exe` exists. With a typical installation that would resolve to `/TC5/Binaries/Win64` 14 | 15 | As of right now, it is technically only needed for player 2 to have this dll installed, but I will likely add additional fixes for the game into the dll that will benefit both players. 16 | 17 | --- 18 | 19 | ## Player 1 (Server) 20 | 21 | To have player 1 host, make sure you have port `3742` open on the host pc, and start the game with `-netcoophost=1 -playside=1`. 22 | 23 | ### Launch script 24 | ```batch 25 | :: Start1.bat 26 | @start TimeCrisisGame-Win64-Shipping.exe -NOINI -Language=JPN -netcoophost=1 -playside=1 27 | ``` 28 | 29 | --- 30 | 31 | ## Player 2 (Client) 32 | 33 | To have player 2 connect to the host, launch the game with `-netcoophost=1 -playside=2 -address=`. 34 | 35 | By default, this mod will try to connect to player 1 via `localhost` or `127.0.0.1`, so launching two copies of the game as player 1 and player 2 will work. 36 | 37 | You should see a custom logging window appear if you have installed this mod correctly. 38 | 39 | ### Launch script 40 | ```batch 41 | :: Start2.bat 42 | @start TimeCrisisGame-Win64-Shipping.exe -NOINI -Language=JPN -netcoophost=2 -playside=2 43 | ``` 44 | 45 | ## Future 46 | 47 | Once I receive my Sinden Light Gun, I plan on adding features to make it feel as close to the original arcade experience as possible. Most likely this will mean getting the haptic recoil to operate correctly in all scenarios, as well adding good support for 2 player co-op using the same PC with two light guns attached. 48 | -------------------------------------------------------------------------------- /TC5Ever/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application 2 | #include "framework.h" 3 | #include "settings.h" 4 | #include "hooks.h" 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std::string_literals; 10 | extern "C" __declspec(dllexport) HRESULT WINAPI DirectInput8Create(HINSTANCE handle, DWORD version, REFIID r_iid, LPVOID* out_wrapper, LPUNKNOWN p_unk); 11 | 12 | using DirectInput8CreateFunc = decltype(&DirectInput8Create); 13 | 14 | static DirectInput8CreateFunc oDirectInput8Create; 15 | 16 | HRESULT WINAPI DirectInput8Create(HINSTANCE handle, DWORD version, REFIID r_iid, LPVOID* out_wrapper, LPUNKNOWN p_unk) { 17 | return oDirectInput8Create(handle, version, r_iid, out_wrapper, p_unk); 18 | } 19 | 20 | bool restoreDirectInput8Create() { 21 | static_assert(sizeof(TCHAR) == sizeof(char), "only compile !utf16 mode"); 22 | 23 | HMODULE hmod; 24 | char csyspath[320]; 25 | GetSystemDirectory(csyspath, sizeof(csyspath)); 26 | hmod = LoadLibrary((csyspath + "\\dinput8.dll"s).c_str()); 27 | if (hmod == NULL) { 28 | return false; 29 | } 30 | oDirectInput8Create = reinterpret_cast(GetProcAddress(hmod, "DirectInput8Create")); 31 | return true; 32 | } 33 | 34 | void Main(); 35 | 36 | bool APIENTRY DllMain(HMODULE hModule, 37 | DWORD ul_reason_for_call, 38 | LPVOID lpReserved) { 39 | switch (ul_reason_for_call) { 40 | case DLL_PROCESS_ATTACH: { 41 | DisableThreadLibraryCalls(hModule); 42 | if (!restoreDirectInput8Create()) { 43 | return false; 44 | } 45 | Main(); 46 | } 47 | case DLL_THREAD_ATTACH: 48 | case DLL_THREAD_DETACH: 49 | case DLL_PROCESS_DETACH: 50 | break; 51 | } 52 | return TRUE; 53 | }; 54 | 55 | void CreateDebugConsole() { 56 | FILE *conin, *conout; 57 | AllocConsole(); 58 | freopen_s(&conin, "conin$", "r", stdin); 59 | freopen_s(&conout, "conout$", "w", stdout); 60 | freopen_s(&conout, "conout$", "w", stderr); 61 | } 62 | 63 | void Main() { 64 | CreateDebugConsole(); 65 | 66 | std::vector args = settings::Args(); 67 | 68 | 69 | std::string address = "127.0.0.1"s; 70 | std::string playside = "1"s; 71 | 72 | std::cout << "Args: " << std::endl; 73 | for (std::string arg : args) { 74 | std::cout << arg << std::endl; 75 | 76 | static const std::string addrarg = "-address="s; 77 | static const std::string playerarg = "-playside="s; 78 | 79 | size_t pos; 80 | if ((pos = arg.find(addrarg)) != std::string::npos) { 81 | std::string value = arg.substr(pos + addrarg.length()); 82 | address = value; 83 | } 84 | if ((pos = arg.find(playerarg)) != std::string::npos) { 85 | std::string value = arg.substr(pos + playerarg.length()); 86 | playside = value; 87 | } 88 | } 89 | 90 | std::cout << "address: " << address << std::endl; 91 | std::cout << "playside: " << playside << std::endl; 92 | 93 | 94 | if (playside.find("2") != std::string::npos) { 95 | in_addr addr; 96 | inet_pton(AF_INET, address.c_str(), &addr); 97 | 98 | hooks::wsock::HookConnect([=](hooks::wsock::ConnectFuncPtr orig, SOCKET s, const sockaddr* n, int y) -> int { 99 | sockaddr_in* in = reinterpret_cast(const_cast(n)); 100 | in->sin_addr = addr; 101 | return orig(s, n, y); 102 | }); 103 | } 104 | 105 | hooks::Attach(); 106 | } 107 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml -------------------------------------------------------------------------------- /TC5Ever/TC5Ever.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | Win32Proj 24 | {23d401d2-a787-49b4-821f-bb685d50502d} 25 | TC5Ever 26 | 10.0 27 | 28 | 29 | 30 | DynamicLibrary 31 | true 32 | v143 33 | MultiByte 34 | 35 | 36 | DynamicLibrary 37 | false 38 | v143 39 | true 40 | MultiByte 41 | 42 | 43 | DynamicLibrary 44 | true 45 | v143 46 | MultiByte 47 | 48 | 49 | DynamicLibrary 50 | false 51 | v143 52 | true 53 | MultiByte 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | dinput8 76 | 77 | 78 | false 79 | dinput8 80 | 81 | 82 | true 83 | dinput8 84 | 85 | 86 | false 87 | dinput8 88 | 89 | 90 | 91 | Level3 92 | true 93 | WIN32;_DEBUG;TC5EVER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 94 | true 95 | NotUsing 96 | pch.h 97 | stdcpp20 98 | false 99 | false 100 | 101 | 102 | Windows 103 | true 104 | false 105 | ws2_32.lib;%(AdditionalDependencies) 106 | 107 | 108 | 109 | 110 | Level3 111 | true 112 | true 113 | true 114 | WIN32;NDEBUG;TC5EVER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 115 | true 116 | NotUsing 117 | pch.h 118 | stdcpp20 119 | false 120 | false 121 | 122 | 123 | Windows 124 | true 125 | true 126 | true 127 | false 128 | ws2_32.lib;%(AdditionalDependencies) 129 | 130 | 131 | 132 | 133 | Level3 134 | true 135 | _DEBUG;TC5EVER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 136 | true 137 | NotUsing 138 | stdcpp20 139 | false 140 | MultiThreadedDebug 141 | 142 | 143 | Windows 144 | true 145 | false 146 | ws2_32.lib;%(AdditionalDependencies) 147 | 148 | 149 | 150 | 151 | Level3 152 | true 153 | true 154 | true 155 | NDEBUG;TC5EVER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 156 | true 157 | NotUsing 158 | stdcpp20 159 | false 160 | MultiThreaded 161 | 162 | 163 | Windows 164 | true 165 | true 166 | true 167 | false 168 | ws2_32.lib;%(AdditionalDependencies) 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 192 | 193 | 194 | 195 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | --------------------------------------------------------------------------------