Decompilation of Deus Ex: Human Revolution
Go to file
2024-11-10 10:14:30 +00:00
3rdParty add imguizmo 1.83 and integrate for movement of instances 2023-07-23 17:27:22 +01:00
bfx add empty bfx classes 2022-06-23 10:53:25 +01:00
camera use minimal camera manager 2023-01-03 23:37:31 +00:00
cdcAnim add UIAction::origin in various places 2024-11-08 18:32:14 +00:00
cdcFile add DTPDataSection::GetName 2024-11-08 17:43:12 +00:00
cdcGameShell rename rendering -> cdcRender 2024-10-07 23:10:03 +01:00
cdcGeom rename math -> cdcMath 2022-10-29 12:25:00 +01:00
cdcKit/Animation fix windows build (struct declared as class, leading to linker errors) 2024-05-03 00:29:29 +01:00
cdcLocale use ImGuiListClipper for strings list 2023-05-02 17:01:27 +02:00
cdcMath QuatInlines.h 2024-05-01 23:12:13 +01:00
cdcMulticore add cdc::Job 2022-12-09 19:10:13 +00:00
cdcNative add NsInstance, NsGameBase and NsCoreBase 2024-05-02 20:19:51 +01:00
cdcObjects rename rendering -> cdcRender 2024-10-07 23:10:03 +01:00
cdcRender rename rendering -> cdcRender 2024-10-07 23:10:03 +01:00
cdcResource add UIActions::origin to show a tooltip with section id and path 2024-11-08 18:07:45 +00:00
cdcScene rename rendering -> cdcRender 2024-10-07 23:10:03 +01:00
cdcScript script/decompiler: show unitref initialization 2024-11-10 10:14:30 +00:00
cdcSound ui: zero check in buildUI(SoundPlex*, …) 2024-10-13 22:35:14 +01:00
cdcSys script: add ScriptDataCursor 2024-11-10 09:56:14 +00:00
cdcWorld script/decompiler: show unitref initialization 2024-11-10 10:14:30 +00:00
eventually_generated script/decompiler: show sound initialization 2024-11-10 10:14:29 +00:00
game rename rendering -> cdcRender 2024-10-07 23:10:03 +01:00
input implement linux mouselook 2022-11-13 01:33:56 +00:00
postprocessing rename rendering -> cdcRender 2024-10-07 23:10:03 +01:00
res shuffle dtp paths 2024-11-10 10:14:26 +00:00
CMakeLists.txt add DTPDataSection::GetName 2024-11-08 17:43:12 +00:00
config.h.in make dependency on d3dcompiler optional 2022-08-07 21:25:41 +01:00
dxvk-build-linux32.txt migrate from Joshua-Ashton/dxvk-native to doitsujin/dxvk 2023-01-13 17:15:24 +00:00
dxvk-meson.patch support linux build 2022-08-07 22:17:32 +01:00
objtree.txt add objtree.txt 2022-05-22 21:11:29 +01:00
README.md auto-detect BIGFILE location through registry key of steam installation of DXHRDC 2023-08-31 14:00:15 +01:00
spinnycube.cpp ui: show section paths in drm window 2024-11-08 18:59:39 +00:00
spinnycube.h d3d is made of structs, not classes 2022-06-29 14:52:31 +01:00
UIActions.h add UIActions::origin to show a tooltip with section id and path 2024-11-08 18:07:45 +00:00

Welcome

Screenshot

Code here is decompiled with IDA Pro and manually cleaned up, uninlined and rewritten to use templates. It is not a matching decompilation, and there is no workflow to merge the functions here with functions from the binary. The .exe contains class names as part of RTTI (see objtree.txt) but there has been no source leak. There has however been a debug info leak for Tomb Raider (2013). It's a different game, but uses a similar engine. This debug info contains:

  • file names and line numbers
  • function and class names
  • function signatures (argument and return types)
  • struct layouts (including inheritance and template names)

The first commit to integrate information from Tomb Raider is dated 14 July 2022. Some parts have no correspondence to Tomb Raider, for example everything in the 'camera', 'input' or 'postprocessing' subdirectory.

How to build (Linux 32-bit binary on Linux)

This build uses DirectX 11 through the dxvk-native project. CMake will automatically download and build the sources.

git clone https://github.com/rrika/cdcEngineDXHR.git
cd cdcEngineDXHR
mkdir native_build
cd native_build
cmake .. -DNATIVE_BUILD=ON
make

How to build (Windows 32-bit binary on Linux)

This build requires the Windows SDK. There exists a Rust tool named xwin that can download it on non-windows systems. See the rustup instructions for how to install Rust. Once that is done you can build and run xwin.

cargo install xwin --locked
xwin --accept-license --arch x86 splat
mv .xwin-cache/splat winsdk # need this specific folder name
# rm -rf .xwin-cache # if you want

The CMake build of this project expects to be in a directory adjacent to winsdk.

git clone https://github.com/rrika/cdcEngineDXHR.git
cd cdcEngineDXHR
mkdir build
cd build
cmake ..
make

How to build (Windows 32-bit binary on Windows)

In Visual Studio 2019 choose "Open a local folder" on start-up. VS should detect the CMakeLists.txt file and set up the build for you. Be sure to select x86, not x64.

How to run

This project requires a copy of Deus Ex: Human Revolution Director's Cut to run. In the installation location you will find a number of files:

BIGFILE.000
BIGFILE.001
BIGFILE.002
...
DXHRDC.exe

Run the binary as follows:

export BIGFILE=path/to/game/BIGFILE.000
./dxhr     # for linux build
./dxhr.exe # for windows build

In Visual Studio you can set the environment to BIGFILE=C:/path/to/game/BIGFILE.000 in the project properties. If you have installed the game through Steam on windows/wine, the files will be detected automatically.