Getting OJP Source Code

OJP's source is stored under what is called "revision control", meaning that the files are stored on a remote server in a way that remembers the changes that have been made to files.  This remote server is called the repository.  There are two ways to access these files:

Accessing OJP's Repository with TortoiseSVN

  1. Install TortoiseSVN.  You can get the latest version @ tortoisesvn.tigris.org .  This tutorial was written for TortoiseSVN v1.4.0.
  2. Create a new folder in Windows Explorer.  This folder will contain your local (working) copy of the OJP repository.
  3. Right click on the new folder and click on SVN Checkout.
  4. Paste in https://OpenSVN.csie.org/ojp/ for the URL of Repository.
  5. Click Ok.
  6. Click Yes to accept the security certificate for the repository.  The resulting initial download of the repository is long, so now would be a good time to break for a snack or bathroom break.
  7. Congradulations, you now have a working local copy of the OJP repository!  At this point, you might want to consult the Compiling and Debugging OJP tutorial if you're interested in playing around with OJP's code.

Compiling and Debugging OJP

This section covers how to compile and/or debug OJP in Visual Studios 2005.  This Tutorial is Incomplete!

Compiling:

  1. Open the solution file (.sln).
  2. Select Build->Configuration Manager from the menu bar.
  3. On the Active solution configuration pulltab, select Final.
  4. Click Close.
  5. Select Build->Build Solution from the menu bar.
  6. The resulting dlls will be in the /ojpbasic or /ojpenhanced folders (depending on which distribution you're compiling).

Debugging:

  1. Open the solution file (.sln).
  2. Select Build->Configuration Manager from the menu bar.
  3. On the Active solution configuration pulltab, select Debug.
  4. Right click on your JK2game project in the Solution Explorer.
  5. Click on Set as Startup Project.
  6. Right click on your JK2game project again.
  7. Select Properties.
  8. Click on Debugging under Configuration Properties.
  9. Set Command to point to the jamp.exe in your GameData folder wherever your copy of JKA is installed.
  10. Add the following to the beginning of your Command Arguments "+set fs_cdpath "<your JKA /GameData>" +set fs_game "<ojpbasic/ojpenhanced>" +set fs_dirbeforepak 1 +set sv_pure 0 +set viewlog 1".  Where <your JKA /GameData> is the location of your /GameData folder of your JKA install.  And <ojpbasic/ojpenhanced> is either ojpbasic or ojpenhanced based on which distribution you're using.  Example:  +set fs_cdpath "d:\games\Jedi Knight Academy\GameData" +set fs_game ojpenhanced +set fs_dirbeforepak 1 +set sv_pure 0 +set viewlog 1
  11. Set Working Directory to "../..".
  12. (Skip this step if you last compiled in the Debug solution configuration) Select Build->Rebuild Solution from the menu bar.
  13. From the menu bar, select Debug->Start Debugging.
Troubleshooting Debugger Problems
ProblemSolution
Modified dlls don't take effect.
Modified dlls get overwritten.
Doublecheck Command Arguments setting.  The sv_pure 0 settings is especially important.
I'm getting a assert error whenever someone presses alt fire while flying the Asteroids version of the Y-Wing!It's a bug in the Y-Wing's NPC file.  Its weapon should be set to WP_BLASTER instead of WP_NONE.  The bug is harmless as it doesn't break anything.  It's best to either fix the file or just not fly the Y-Wing while debugging.

Build Configurations

This is a list of the possible build configurations of the OJP source code and what they do:

Code Preprocessors

This is a list of known code preprocessor flags used in the OJP source code:

Editting Guidelines