I'm not sure if Turbo C++ will work. I've been using an installer package called "Borland C++ For Wolf3D" (or something like that) ever since I started messing around with the Wolf3D source code in the early 2000's. I remember that it was packaged with a Windows-based installer, probably created by members of the Wolf modding community and not by Borland. This package contains Borland C++ 3.1 and Turbo Assembler 3.1.
Turbo C++ is the cheaper version, Borland C++ was targeted at businesses. I have never tried compiling the source with Turbo C++, so I can't tell for sure if it will work or not.
This is how I would set up Borland C++ and the source code:
- Create a base folder for the compiler and the source code somewhere on your hard drive (let's say "C:\WORK")
- Get Borland C++ 3.1 and install it (or extract the files) to a subdirectory, like "C:\WORK\BORLANDC"
- Extract the CKSRCMOD archive into a subdirectory, like "C:\WORK\SRCMOD"
- Start DOSBox and mount the base folder ("C:\WORK") as your C drive
- Make sure the path to the BIN subdirectory of the compiler is added to your PATH variable. For example, run "SET PATH=%PATH%;C:\BORLANDC\BIN" or add this to a batch file.
- Navigate to the SOURCE subdirectory of your SRCMOD directory ("cd \srcmod\source") and start the Borland IDE by running "BC"
- The IDE should auto-load the project file. You should see the Project window at the bottom (select "Window -> Project" if it's not there). Check if all the source files are listed in that window. If not, something went wrong.
- Select "Options -> Directories..." and enter the correct path to the INCLUDE and LIB subdirectories of your Borland C++ directory under "Include Directories" and "Library Directories" respectively.
- Select "Compile -> Build all" and see what it does.
I just downloaded the source modding package from the KeenWiki and compiled it myself in Borland C++ 3.1 (with the "Build all" option). It compiled with 0 errors and 0 warnings and the resulting executable works perfectly fine.
Once you start modifying and re-compiling the code, you will most likely want to use "Compile -> Make", which only re-compiles the files that have been modified since the last run of the compiler. But I recommend doing your first build with the "Build all" option, since this will show you all the warning messages (if there are any). Do yourself a favor and do not ignore compiler warnings.
By the way, compiling everything may take quite a while in DOSBox, even when DOSBox is running at maximum speed. I'm actually running the Borland C++ compiler natively under Windows XP (32 bit) on a system with a 2.4 GHz CPU so I don't have to wait too long for the compiler to do its job. If running the compiler natively on a relatively modern CPU is an option that's available to you, then by all means, do it. You'll be glad you did.
On my development system, I have a BORLAND.BAT file that looks like this:
Code: Select all
I just copy this batch file into the SOURCE subdirectory of the source mod package (or whatever I'm working on) and double-click it to start the IDE, then I hit F9 to compile the code and ALT+X to quit once it's done. I don't use the IDE to edit the source files, I've got better, more modern tools to do that.
If you have to use DOSBox, I would recommend creating a batch file with the following contents and saving it in your base directory ("C:\WORK"):
Code: Select all
Dragging and dropping this batch file onto DOSBox.exe (or a shortcut to DOSBox) will automatically mount "C:\WORK" as the C drive in DOSBox and start the IDE. I think the IDE automatically causes DOSBox to run at max cycles, unless your main DOSBox configuration forces it to behave differently.
If you can tell me which aspects of the code you're interested in, I can probably guide you to the right places. But the source modding package probably won't help you all that much, since there's almost nothing in it in terms of enemy behavior. All it has is Keen and code for moving platforms. If you want to learn how the enemies are designed, grab the Keen Dreams source or the Atroxian Realm source instead.