# TheDarknessRecomp
A static recompilation of [**The Darkness**](https://en.wikipedia.org/wiki/The_Darkness_(video_game)) (2009, Xbox 360, Title ID `545407EE`) to native Windows/Linux x86-64, built on the [ReXGlue SDK](https://github.com/rexglue/rexglue-sdk).
## Status
Fully playable: video, audio, gameplay, achievements, and progression all work.
Performance and framerate look very sad.
## Requirements
- CMake 3.25+, Ninja, Clang/LLVM (clang-cl works too)
- [ReXGlue SDK](https://github.com/rexglue/rexglue-sdk/releases) — see [`rexglue/README.md`](rexglue/README.md)
- [extract-xiso](https://github.com/XboxDev/extract-xiso/releases) and your own legally-owned copy of **TheDarkness** game
## Setup
1. **SDK** — download the `win-amd64` release and extract into `rexglue/win-amd64`.
2. **Licence copy** of game Title ID: `545407EE` (XA-2498), Media ID: `0F213645`, Module hash = `29362A3C8309E1AC`.
2. **Game data** — extract the Xbox 360 ISO with `extract-xiso.exe -x TheDarkness.iso`, then copy the contents into `assets/`:
```
assets/
default.xex
Content/
Conent_Eng/
Conent_Fre/
Conent_Ger/
Conent_Ita/
Conent_Spa/
ExtraContent/
System/
```
## Build
```powershell
cmake --preset win-amd64-release
cmake --build out\build\win-amd64-release
```
```bash
cmake --preset linux-amd64-release
cmake --build out/build/linux-amd64-release
```
## Run
```powershell
cd out\build\win-amd64-release
.\TheDarknessRecomp.exe
```
Logs land in `out\build\\logs\*.log`.
## Configuration
`settings/hardware.toml` (rendering/perf) and `settings/mapping.toml` (input) load automatically. CLI flags and `REX_*` env vars override them. See [`settings/README.md`](settings/README.md) for the reference.
## Credits
- [ReXGlue SDK](https://github.com/rexglue/rexglue-sdk)
- [extract-xiso](https://github.com/XboxDev/extract-xiso)
- [xenia](https://github.com/xenia-project/xenia) / [xenia-canary](https://github.com/xenia-canary/xenia-canary)