Inside3D
 • Front Page
 • Articles
 • Downloads
 • Forums
 • Hosting
 • Help Wanted
 • Interviews
 • Reviews
 • Staff

 
Allied Sites
 - AI Cafe
 - Bot Epidemic
 - Dark Places
 - Flat Earth
 - FrikBot
 - Ghoulish Art
 - Kilbert3D
 - Quake Info Pool
 - QSG: Quake Standards
 - Rusted Fork
 - Stroggs Gone Mad
 - More...
 
Quake
 - Getting Started
 - QuakeC Specs v1.0
 - QuakeC Tutorials
 - Quake Mod Index
 
Quake II
 - Getting Started
 - dll Sourcecode
 - Coding Tutorials
 
.dll Central
 - Getting Started
 - Learning
 - dll Primer
 - dll in C
 - dll in Delphi
 - Compilers
 
Jedi Knight
 - Getting Started
 - COG Specs
 - Sound Specs
 - Tutorials
 
Level Editing
 - Tutorials/Tips
 
 
Telefragged!!!

Compiling gamex86.dll with Borland C++ 5.x

1.  Start Borland C++ and select File | New -> Project.  The New Target dialog box comes up.  Press the Browse button and change to the directory where you put the gamex86.dll sourcecode.  Now type in "gamex86.ide" and press Ok.

2.   Now we're back in the New Target dialog box.  Under Target Type, select Dynamic Library.  Uncheck the OWL and Class Library boxes.  Press Ok.

3.   Now we are looking at the new project created by Borland C++.  Delete the gamex86.cpp, gamex86.def, and gamex86.rc nodes (we don't need them).  Right-click on the gamex86.dll [.dll] node and select Add Node.  This pops up a file dialog box - add all the .c files you see listed.  Then add the game.def file.

*You need to make a change to game.def for things to compile correctly.  Open it up and change it so under the "EXPORTS" it says "GetGameAPI=_GetGameAPI   @1".  Then save it.

4. Now we need to set the compiler options to compile a .dll that will work with Quake2.   There a couple modifications we need to make - select Options | Project:

a. Compiler node: under Defines, add "C_ONLY;" unless you have TASM.  Under Debugging, uncheck the "Debug information in .OBJs" and the "Browser reference info in .OBJs".

b. 32-bit Compiler node: Under the main node, select the Intel optimizing compiler - it is alot slower than the default Borland compiler, but it generates faster code.  Under the Processor node, select Double-Word under Data alignment.

c. Optimizations node: Select the "Optimize for Speed" radio button.

d. Linker node: Under the General node, uncheck the "Include debug info" and "ignore default libraries" boxes.  Under 32-bit Linker, check the "Allow import by ordinal" box.  Now press ok.

e. Messages node: On the main node, choose "Selected" under Message Set.  Under the Potential Errors node, uncheck "Possibly incorrect assignment".  Under the Inefficient Coding node, uncheck the first and second checkboxes.  Doing this is just to keep Borland C++ from generating tons of warnings from things that are done not-so-cleanly(tm) in the gamex86.dll source.

5.   Hit the compile button (the yellow folder with the ?) and wait.

6.   Now, assuming you have compiled the .dll in your \quake2\mymod directory, start Quake2 with the "+set game mymod" command line.  There you go!


 






UGO [an error occurred while processing this directive]

The Inside3D content and design is copyrighted by the Inside3D team, and may not be re-produced or copied without proper consent. All rights reserved. Any work credited to any author not part of Inside3D is copyrighted by that author. If you have any feedback, suggestions or flames please send it in to Inside3D or the author. Inside3D is hosted by telefragged and the design was originated by project-9.


.