Source Code
My ancient compiler, Borland Turbo C++ 3.0
The Borland Turbo C++ 3.0 IDE. About as old and clunky as they come.

   The world's worth of Wolfenstein players have been making add-ons for the game for years now, and yet there are still a lot of Wolf3D add-ons constantly in development. The game still has a cult following, you might say. I have been playing around with Wolfenstein's levels, graphics and sound effects for years now, but something I could never do was change the hard-coded data in the EXE. This includes things like the ceiling colors and music for each level, episode names in the menus, the way the enemies behave, the floors on which the secret elevators are placed -- and that only scratches the surface of the things you can alter in the code. Finally, I have had a breakthrough with the code, and now a whole new world of changes are available to me. It's very exciting!

   Getting the code to compile isn't as simple as 1-2-3. Here's what you will need:

What I've been seeing for 4 years   The compiler is perhaps the hardest part, since unless you want (and know how) to make some changes to the code throughout, you will need a Borland compiler, and an old one too. The code compiles perfectly with Borland C++ 3.1. Anything other than Borland and you're taking a risk. Any version of Borland C++ beyond 3.1 and you have to update the old code. I have Borland Turbo C++ 3.0, and it seems to be sufficient overall. There are two problems however. It miscompiles two important files, the caching manager source file (ID_CA.C) and the sound manager (ID_SD.C), resulting in screwy-looking graphics like in the screen shot to the left, and slightly clipped-sounding FM effects (rubbing against walls, key pickup, etc). Fortunately I got the compiled .OBJ files for this source from a friend, so I am able to produce functioning EXEs now. In this section I'll provide you with everything I can to help you get the code to compile too.

GOOD NEWS -- COMPILER AVAILABLE
   Thanks to Brandon Farmer, another Wolfenstein source code enthusiast, I now have a link to the Borland Turbo C++ 3.0 compiler, available from his web sever. Snag it if you want to compile the code. Just make sure you also get the ID_CA.OBJ and ID_SD.OBJ files I supply for you (see below). If you want the same compiler id Software used (which can compile all files correctly), Borland C++ 3.1, try a flea market or garage sale.

SETTING UP BORLAND TURBO C++ 3.0
   Stuck? I wrote up a page of instructions on how to set up Borland Turbo C++ 3.0 and compile your first EXE.
   Click here to read it. If you are having trouble or need some more info, you can also check out Brandon Farmer's Source Code Help Center.


Source Code and Utilities

WOLFSRC.ZIP   Source Code   563 K   [ Download ]
Here it is -- the Wolfenstein 3D and Spear of Destiny source code. Includes Borland C++ 3.0/3.1 project file. Just remember to change the lib and include directories to reflect your compiler's location, and the location of the SIGNON.OBJ and GAMEPAL.OBJ files in the project. They will be C:\SOURCE\WOLF by default.

WOLFOBJ.ZIP   .OBJ Files   501 K   [ Download ]
All the .OBJ files from a successful compile of the original source code (plus the EXE produced after linking) are included here. May help you reverse-engineer any problems you may be having, or work around files you can't get compiled.

TCOBJ.ZIP   .OBJ Files   29 K   [ Download ]
These are only the two .OBJ files that Borland Turbo C++ 3.0 cannot compile properly. If you have this compiler, these are the only two precompiled .OBJ files that you should need to get things working right. (Check out my tutorial on setting up Turbo C++ 3.0 for more details.)

VGAFILES.ZIP   VGA*.WL6   165 K   [ Download ]
This archive includes VGAGRAPH.WL6, VGADICT.WL6, and VGAHEAD.WL6. You will need these exact versions of these files in order to play your compiled EXEs properly. Make sure to include them with your add-ons!

TC.ZIP   Compiler   3.1 MB   [ Download ]
This is the Borland Turbo C 3.0 compiler. It will compile Wolfenstein properly except for the two C files I mentioned above, which are available pre-compiled for you in WOLFOBJ.ZIP. Download them and dump them in your OBJ directory.

WOLFPAL.GIF   Color Table   21 K   [ View ]
If you're working on the source code and you want to put in new ceiling colors, this will help you. You can use this chart to quickly find the hex value for the palette index of the color you want. Just take the number from the vertical axis and then the number from the horizontal axis, and that's the value you put in for your ceiling color in WL_DRAW.C. This can also help for when you're setting other colors, like the color of highlighted menu items.


Tutorials

   Here are some beginner's tutorials to get you started with the basics of Wolfenstein source code modification. My advice to you is to study the source code, and study it well. Everything I know about C I learned from "reading" the Wolfenstein source. You'll figure out how to do lots of stuff if you just play around and experiment. But for the basic easy stuff that you've "always wanted to do", here's a few tutorials to get you up and running.

[ Changing the Ceiling Colors ]
[ Changing the Music on Each Level ]
[ Changing the Secret Elevator Back Maps ]
[ Adding New Keys and Their Status Bar Icons ]
[ Seamless Level Progression w/Ratio Reporting ]


[ Welcome ] [ News ] [ About the Bunker ] [ Add-ons ] [ Design Tips ]
[ Source Code ] [ My Project ] [ Links ]