How do I compile the code for Spear of Destiny or Shareware Wolfenstein 3D?
The source code comes prepared to build version 1.4 of the full version of Wolfenstein 3D, but is actually capable of building for multiple different versions of the game, as well as Spear of Destiny!
This tutorial assumes you have a project that builds successfully. If not, click here to set up a project for Wolf4SDL.
The changes
Open up your Version.h
file in the editor of your choice, and you should see the following block of lines:
//#define SPEAR //#define SPEARDEMO //#define UPLOAD #define GOODTIMES #define CARMACIZED //#define APOGEE_1_0 //#define APOGEE_1_1 //#define APOGEE_1_2 //#define JAPAN
These lines turn on/off various aspects of the code exclusive to particular versions or games. In Wolf4SDL, annotations have been added which help identify what lines need to be commented or uncommented to activate what version of the source code.
Game | Uncommented Lines |
---|---|
Wolf3d Full v1.1 Apogee (with ReadThis) | CARMACIZED APOGEE_1_1 |
Wolf3d Full v1.4 Apogee (with ReadThis) | CARMACIZED |
Wolf3d Full v1.4 GT/ID/Activision | CARMACIZED GOODTIMES |
Wolf3d Full v1.4 Imagineer (Japanese) | CARMACIZED JAPAN |
Wolf3d Shareware v1.0 | UPLOAD APOGEE_1_0 |
Wolf3d Shareware v1.1 | CARMACIZED UPLOAD APOGEE_1_1 |
Wolf3d Shareware v1.2 | CARMACIZED UPLOAD APOGEE_1_2 |
Wolf3d Shareware v1.4 | CARMACIZED UPLOAD |
Spear of Destiny Full and Mission Disks | CARMACIZED SPEAR GOODTIMES (Disable Quiz) |
Spear of Destiny Demo | CARMACIZED SPEAR SPEARDEMO |
By default, CARMACIZED
and GOODTIMES
are uncommented, making the source build for the GT/ID/Activision full version of Wolfenstein 3D.
If we wanted to compile the code for the up to date shareware version, we need CARMACIZED
and UPLOAD
. Change the lines as follows to do so:
//#define SPEAR //#define SPEARDEMO #define UPLOAD //#define GOODTIMES #define CARMACIZED //#define APOGEE_1_0 //#define APOGEE_1_1 //#define APOGEE_1_2 //#define JAPAN
With this change, if you compile the code, it will compile for the Shareware version of Wolfenstein 3D!
Note: You will need the game files for whatever game you build, otherwise it won't actually run anything.