Tutorial: Compiling the RTCW-MP source code V1.41 with the free available IDE dev-c++ -1 reply

  • 1
  • 2

Please wait...

nUllSkillZ

GF Pwns Me!

50 XP

13th January 2004

0 Uploads

53 Posts

0 Threads

#1 14 years ago
  1. 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.
  2. Sources

Planetwolfenstein Forums | Modifications (Archives) | Who has actually used and have working DevC++ v4 and compiles RtCW mod-programming tutorials RTCW Source Package for Linux advice: I summarized the information of the mentioned sources. Downloads

  1. dev-c++ IDE Important: Compilation with dev-c++ version 5 is supposed to be not possible.

zip-file dev-c++ Version 4.0 zip-file Update dev-c++ V4 auf V4.01 RTCW windows source rtcwfiles.com 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

  1. 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.
  2. 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.
  3. 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".
  4. 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.
  5. 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
  6. 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
  7. 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":

  1. compiler options of the client project "cgame_mp_x86": -pipe -fsigned-char -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce -DWIN32 -D_WINDOWS -DC_ONLY –DCGAMEDLL
  2. compiler options of the server project "qagame_mp_x86": -pipe -fsigned-char -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -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
  3. compiler options of the user interface project "ui_mp_x86": -pipe -fsigned-char -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -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".




DragonFly

People say I post too much

50 XP

13th October 2002

0 Uploads

1,252 Posts

0 Threads

#2 14 years ago

excellent ... I'll sticky this thread :)




NoobProgrammer2004

I don't spend enough time here

50 XP

24th January 2004

0 Uploads

28 Posts

0 Threads

#3 14 years ago

=) you liked our convo apparenlty =P




DragonFly

People say I post too much

50 XP

13th October 2002

0 Uploads

1,252 Posts

0 Threads

#4 14 years ago

yep lol if anyone wants to make a mod for RTCW this should help :)




NoobProgrammer2004

I don't spend enough time here

50 XP

24th January 2004

0 Uploads

28 Posts

0 Threads

#5 14 years ago

Check Your Email Null! :fistpunch: :cheers: :type: ~Noobprog~




DEADEYE

Wild west mod of RTCW

50 XP

23rd April 2003

0 Uploads

3,213 Posts

0 Threads

#6 14 years ago

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 :naughty: any way thanks for your knowledge on mods :bows: good luck :deal:




NoobProgrammer2004

I don't spend enough time here

50 XP

24th January 2004

0 Uploads

28 Posts

0 Threads

#7 14 years ago

You got alot of good ideas win...why don't you make a mod?




NoobProgrammer2004

I don't spend enough time here

50 XP

24th January 2004

0 Uploads

28 Posts

0 Threads

#8 14 years ago

Thanks again for ur help null =)




mattyfinster

I don't spend enough time here

50 XP

29th September 2004

0 Uploads

17 Posts

0 Threads

#9 14 years ago

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




nUllSkillZ

GF Pwns Me!

50 XP

13th January 2004

0 Uploads

53 Posts

0 Threads

#10 14 years ago

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.




  • 1
  • 2