├── FlatOut2
├── testScript.txt
├── DIDetours.h
├── User32Detours.h
├── DXDetours.h
├── FlatOut2.rc
├── WinSockDetours.h
├── GameDetours.h
├── stdafx.cpp
├── targetver.h
├── resource.h
├── CDirect3D9DevHook.cpp
├── TestScriptRunner.h
├── DIDetours.cpp
├── DXDetours.cpp
├── stdafx.h
├── VirtualClient.h
├── GameDetours.cpp
├── FlatOut2.h
├── VirtualHost.h
├── CDirectInput8Hook.cpp
├── CDirectInput8Hook.h
├── CDIDevice8Hook.cpp
├── Logging.h
├── InstanceSettings.h
├── DetourCallDefs.h
├── TestScriptRunner.cpp
├── CDirect3D9Hook.h
├── CDirect3D9Hook.cpp
├── dllmain.cpp
├── CDIDevice8Hook.h
├── Logging.cpp
├── VirtualIP.h
├── InstanceSettings.cpp
├── FlatOut2.cpp
├── FlatOut2.vcxproj.filters
├── WinSockDetours.cpp
├── User32Detours.cpp
├── VirtualClient.cpp
├── FlatOut2.vcxproj
└── VirtualHost.cpp
├── .gitmodules
├── docs
├── images
│ └── virtual_network.png
└── virtual_net.md
├── Launcher
├── packages.config
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Launcher.csproj.user
├── UpdateNotifier.cs
├── Settings.StyleCop
├── Program.cs
├── GamePad.cs
├── Launcher.csproj
├── UpdateNotifier.Designer.cs
├── UpdateNotifier.resx
├── Setup.en.resx
├── FlatOut2.cs
├── AutoUpdate.cs
└── Setup.cs
├── version.json
├── Detours.vcxproj.filters
├── README.md
├── FlatOut2.sln
├── .gitignore
└── Detours.vcxproj
/FlatOut2/testScript.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/FlatOut2/DIDetours.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | void DIDetour();
--------------------------------------------------------------------------------
/FlatOut2/User32Detours.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | void User32Detour();
--------------------------------------------------------------------------------
/FlatOut2/DXDetours.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "CDirect3D9Hook.h"
3 |
4 | void DXDetour();
--------------------------------------------------------------------------------
/FlatOut2/FlatOut2.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MorMund/FO2-Splitscreen/HEAD/FlatOut2/FlatOut2.rc
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Detours"]
2 | path = Detours
3 | url = https://github.com/microsoft/Detours.git
4 |
--------------------------------------------------------------------------------
/docs/images/virtual_network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MorMund/FO2-Splitscreen/HEAD/docs/images/virtual_network.png
--------------------------------------------------------------------------------
/FlatOut2/WinSockDetours.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "VirtualIP.h"
3 | #include "InstanceSettings.h"
4 | extern VirtualIP *virtIP;
5 | void WinSockDetour();
--------------------------------------------------------------------------------
/Launcher/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FlatOut2/GameDetours.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #define FO2_WinMain (PVOID)0x00520ed0
3 |
4 | #define FO2_PlayIntroAddress (PVOID)0x00520BB0
5 | #define FO2_PlayMovieAddress (PVOID)0x004C8F00
6 |
7 | void DeferredHookDetour();
--------------------------------------------------------------------------------
/Launcher/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Launcher/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FlatOut2/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // FlatOut2.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/FlatOut2/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/version.json:
--------------------------------------------------------------------------------
1 | {
2 | "Version" : "0.1.2",
3 | "Date" : "2019/09/11",
4 | "CacheDuration" : "23:59:59.999",
5 | "Changelog" : [
6 | "Fixed Steam version of the game being unable to find the hosts game",
7 | "Added support for writing debug info to a log file",
8 | "Added notifications about updates to the mod"
9 | ]
10 | }
--------------------------------------------------------------------------------
/FlatOut2/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by FlatOut2.rc
4 |
5 | // Next default values for new objects
6 | //
7 | #ifdef APSTUDIO_INVOKED
8 | #ifndef APSTUDIO_READONLY_SYMBOLS
9 | #define _APS_NEXT_RESOURCE_VALUE 101
10 | #define _APS_NEXT_COMMAND_VALUE 40001
11 | #define _APS_NEXT_CONTROL_VALUE 1001
12 | #define _APS_NEXT_SYMED_VALUE 101
13 | #endif
14 | #endif
15 |
--------------------------------------------------------------------------------
/FlatOut2/CDirect3D9DevHook.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "CDirect3D9DevHook.h"
3 |
4 | CDirect3D9DevHook::CDirect3D9DevHook(IDirect3DDevice9 * ptr)
5 | {
6 | if (ptr == NULL) {
7 | MessageBox(NULL, L"Error in CDirect3D9DevHook::CDirect3D9DevHook. DirectX object pointer was null!", L"DirectX Error", MB_OK | MB_ICONERROR);
8 | throw std::exception("Error in CDirect3D9DevHook::CDirect3D9DevHook. DirectX object pointer was null!");
9 | }
10 |
11 | m_ptr = ptr;
12 | }
13 |
14 | HRESULT CDirect3D9DevHook::EndScene()
15 | {
16 | return m_ptr->EndScene();
17 | }
18 |
--------------------------------------------------------------------------------
/Launcher/Launcher.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ..\GameDir\
5 | true
6 |
7 |
8 | ..\GameDir\
9 |
10 |
--------------------------------------------------------------------------------
/FlatOut2/TestScriptRunner.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include