I'm a long time player who recently discovered these forums. One exciting surprise was finding an active OpenDeadlock project. I have a software background and would like to contribute.
I'll start with this post, which will be a quick how-to guide for running the latest code. I hope it will save time for others who follow.
Summary
The OpenDeadlock codebase currently contains a set of development tools to read and convert data from the original game. The main project lives on SourceTree under the name 'Decoder'. It contains code for five command-line executables:
1) Binloader
- a command-line tool used to extract byte data from files at specific offsets
3) Decoder
- a command-line tool that reads sprite data from Deadlock and outputs as images
5) Palettetool
The first four projects are C++, while the last is Java. Here, I'll describe how to build the third project "Decoder" in Windows using Visual Studio.
Step 1) Install Tools
Download and install the following:
Mercurial, for source control
- Click download next to a Windows installer
e.g. "Mercurial 5.8 Inno Setup installer - x64 Windows
- Check that "Add the installation path to the search path" is selected
- Check that "Desktop development with C++" is selected
- Install
- Note this is the legacy page specifically for version 6
- Check that "Install development headers and libraries for C and C++" is selected
a) Open a cmd console with Start -> Run -> cmd
b) Go to your development directory, for example:
- `cd\`
`mkdir dev`
`cd dev`
Mercurial (hg) will then fetch our code from SourceForge and create the directory `opendeadlock-decode`
Step 3) Compile Decoder
We'll use Visual Studio as our IDE and compiler
a) Open Visual Studio 2019
b) Click "Not now, maybe later." to skip the registration screen
c) Click Start Visual Studio
d) Click "Open a local folder"
e) Navigate to .\opendeadlock-decode\decoder
f) Click "Select folder"
After a few seconds, the console should display some build logs, eventually ending with:
"1> CMake generation finished."
g) Locate Visual Studio's "Solution Explorer" pane (top right)
h) Right-click on CMakeLists.txt -> Select "Build"
The console should again fill with build logs ending in "Build Succeeded"
i) Right-click on CMakeLists.txt -> Select "Debug"
The exe will be created with the help menu displayed.
Step 4) Run Decoder
a) Open the cmd console and navigate to your build directory from Step 2b).
b) Enter `cd opendeadlock-decode\decoder\out\build\x64-Debug\decoder`
c) Enter `decoder` to see the help menu
d) Copy the necessary files to the output directory, and enter the following format:
Code: Select all
decoder.exe <palette file> <sprite table file> <sprite table start position> <sprite table length> <sprite file> <output directory> <output format> [bigendian] [matte index]
Figure out what counts as a palatte file, sprite table file, etc and where those files live in the Deadlock CD or GOG directories.