Tutorial: Compiling the RTCW-MP source code V1.41 with the free available IDE dev-c++
Content
This tutorial describes the order of events of compiling the multiplayer source code of "Return to castle Wolfenstein" version 1.41 with the free available IDE dev-c++ version 4.01 under the Windows OS.
Tip
To avoid mistakes copy options, file names etc. out of this tutrial.
Installation of dev-c++
Extract the files of the zip to a directory of you choice.
Start the setup-program. Installation according to the instructions.
I installed with the option "custom" and all of its components.
Extract the files of the update with the options "use path" and "override older files" (these are translations of the german terms) in the installation path of dev-c++.
Installation of the RTCW source
Start the setup-program. Installation according to the instructions.
Set up the mod directory
Important:
Because the linker has problems with long directory names please use short directory names.
Create a directory with a short name in the root directory (for example: "c:\mymod").
Copy the directories "main" and "src" including their sub-directories of the source directory "c:\Wolf_source_141\MP\WolfMP-Source\" and paste them into the directory "c:\mymod".
Create a new directory "dev" in the directory "mymod". In this directory the later created dev-c++ project files will be stored.
After compiling this directory will also contain all of the created files.
creation of the dev-c++ project
general
In front of the mod creation three projects have to been created.
One project for the client, one project for the server and one project for the user-interface.
Order of events
In a first step the first procect file will be created.
All the needed files will be added to this project.
Afterwards the first mod file will be compiled/linked.
This process will be repeated for the other two projects.
creaton of the project file
Start dev-c++ and choose in the menu "File" the option "New project".
In the appearing dialog window choose "Empty Project" (scroll) and "C project".
After clicking "OK" another dialog window will appear. The name of the project has to be written in it.
The projects have the following names:
The client project is named "cgame_mp_x86",
the server project is named "qagame_mp_x86" and
the user interface project is named "ui_mp_x86".
Save the project files in the directory "c:\mymod\dev".
The automtically added empty source file has to been deleted.
Open the context menu by right clicking on the file symbol in the left corner of the window and choose the option "Remove from project".
adding the source files to the project
Important:
Don't add the file "bg_lib.c" to the projects. Otherwise there will be errors when compiling.
Open the context menu by right clicking on the file symbol in the left corner of the window and choose the option "Add to project".
A file selection dialog windows appeaers where the following source files of the directory "c:\mymod\src" have to be choosen.
Multiple selection is possible.
source files of the client project "cgame_mp_x86":
cg_*.c
../game/bg_animation.c
../game/bg_misc.c
../game/bg_pmove.c
../game/bg_slidemove.c
../game/q_math.c
../game/q_shared.c
../ui/ui_shared.c
source files of the server project "qagame_mp_x86":
ai_*.c
g_*.c
q_*.c
bg_animation.c
bg_misc.c
bg_pmove.c
bg_slidemove.c
../botai/*.c
source files of the user interface project "ui_mp_x86":
ui_*.c
../game/bg_misc.c
../game/q_math.c
../game/q_shared.c
bugfix
To avoid a bugfix with "stdlib.h" the line "#define MAX_PATH 144" of the file "ai_main.c" of the server project "qagame_mp_x86" has to be commented out.
Setting of the project options
Open the menu "Project" and choose the option "Project options".
In the appearing dialog window choose the options "Create a DLL" and "Do not create a console".
Insert the following options in the field "Extra comiler options":
compiler options of the server project "qagame_mp_x86":
-pipe -fsigned-char -DNDEBUG -O6 -mcpuentiumpro -marchentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce -DWIN32 -D_WINDOWS -DC_ONLY –DGAMEDLL
compiler options of the user interface project "ui_mp_x86":
-pipe -fsigned-char -DNDEBUG -O6 -mcpuentiumpro -marchentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL -DUI_EXPORTS -DC_ONLY
Remark:
I don't know at all what these options cause/result in/achieve (don't know the english term).
I took over these options from the sources.
Theres a discrepancy of the options for the user interface project mentioned in the sources.
I used the option as mentioned above.
Compiling/Linking
Open the menu "Execute" and choose the option "Rebuild all".
The corresponding file will be compiled and linked and saved to the directory "c:\mymod\dev".
After compiling/linking of the three projects there will be the files „cgame_mp_x86.dll“, „qagame_mp_x86.dll“ and „ui_mp_x86.dll“ to this directory.
Remark 1:
The linker reports a warning but the files are working.
Remark 2:
The file size of the compiled/linked files differs from the original files. May be because of the differnt optimisation methods of the used compilers.
Running the mod
Create a directory in the "Return to castle Wolfenstein" directory at the same height as "main" directory with the name of the mod.
Copy the files „cgame_mp_x86.dll“, „qagame_mp_x86.dll“ and „ui_mp_x86.dll“ to this directory.
You will find the further proceeding in the tutorial "RTCW mod-programming tutorials".
Re: Tutorial: Compiling the RTCW-MP source code V1.41 with the free available IDE dev-c++
what a great effert , that says it all if your getting stuck making a mod......i have a stalingrad mod in mind ,were 1000 germans got there head blown off a day,after the luftwaffers leveled stalingrad, chimneys were the snipers positions .they were stuck at the volga river .so snipers had a feild day
any way thanks for your knowledge on mods
good luck
Last edited by win; January 26th, 2004 at 04:55 PM.
Re: Tutorial: Compiling the RTCW-MP source code V1.41 with the free available IDE dev-c++
Hi all just wondering if i could get some help.
Well these source files for the projects i cant find
cg_*.c
ai_*.c
g_*.c
q_*.c
ui_*.c
and once uve got it all how do you adjust settings for it like ammo needles knifes and stuff like that i wanna make it so you can throw knifes and needles are poison and every player starts of with 500 clips
pls help.
Regards
MattyfinsteR
Last edited by mattyfinster; October 25th, 2004 at 02:17 PM.
Re: Tutorial: Compiling the RTCW-MP source code V1.41 with the free available IDE dev
With cg_*.c I've meant all files starting with cg_.
You have to find the appropriate functions in the source-code files.
And then change/edit these functions.
This site is part of the Defy Media Gaming network
The best serving of video game culture, since 2001. Whether you're looking for news, reviews, walkthroughs, or the biggest collection of PC gaming files on the planet, Game Front has you covered. We also make no illusions about gaming: it's supposed to be fun. Browse gaming galleries, humor lists, and honest, short-form reporting. Game on!