glQuake for the lcc-win32 compiler

Current release compilation date:  January 10, 2000
Page updated January 10, 2000
 

This is a port of glQuake source code to the lcc-win32 compiler, based on the Dec. 21, 1999 Quake code release by ID Software. The code incorporates Dec. 27, 1999 bug fixes by Matthias "Maddes" Buecher at the Quake Info Pool.  MASM is used to compile assembly.  A tutorial at Quake Engine Resources explains how to get MASM. You can also get coding news and info from the Quake site at PlanetQuake.  Get the glQuake source for lcc-win32 here. The project has been compiled and tested successfully in single player mode on an AMD K6300 processor with 64Mb RAM and a 4Mb Genoa Rendition Verite board.  Rendition's miniGL driver was used. Frankly, this old Verite rocks on!  I haven't noticed any new bugs, but you may on your particular system. Use at your own risk.  All reports so far is that it works as well as the standard port.  Thanks to everyone who provided feedback.

It's here...get the complete source qs-lcc.zip, or just try out the executable glquake.zipAnd by request, a complete (or at least more complete) opengl32.lib for lcc.  If you get new opengl effects to work, let me know.

I started the port for my own amusement and was happily surprised with the results.  I hope others will enjoy it as well. It can probably be adapted to other major flavors of Quake (WinQuake, glQuakeWorld, etc.).  If there is interest, I'd like to find a home for related news and discussion.
Jeff Ford

JOURNAL  January 10, 2000  Changes, comments

A couple of fixes/enhancements are out there that I would like to incorporate-  underwater distortion switch, chasecam fix, the mirror texture- but I intend to keep this port compatible with the original version.  Future non-compatible changes will be maintained as a separate project on this site.

1.  No more dependence on the old dxsdk directory.  It's gone, and lcc's headers are used instead.  But I believe there is a typo in lcc's dsound.h: STDMETHOD(SetFormat) (THIS_ LPWAVEFORMATEX) instead of LPCWAVEFORMATEX.  This allows compilation, but please excuse my windows header ignorance and inform me if this is not the appropriate solution.  Obviously, make a backup of your original dsound.h.

2.  Icon resource compiles successfully.
 
 

JOURNAL   January 3, 2000  Comments

Opening the projects:  From lcc's Wedit menu bar,  select Project> Import> and import qs-lcc.prj located in the qc-lcc directory.  Similarly for the gas2masm project, import gas2masm.prj from the gas2masm subdirectory.

Please let me know if you have tried networking.  Yes, a glQuakeWorld port would be nice... it is planned.
 
 

JOURNAL   January 1, 2000  Compilation notes

The changes I made in the source are commented with "jf". The directory structure of the project is modified from the original source release to be more lcc-win32-friendly:

qs-lcc: c sources
   -doc: Docs about this port.
        --origdoc: The gnu licence and other source docs.
  -dxsdk: This and its subdirectories from the original source release. Directx headers from when I was a lad.
  -gas2masm: A separate lcc project for gas2masm.
         --lcc: Release directory for gas2masm. Contains gas2masm.exe.
  -lcc: Release directory for glQuake. Contains the glquake.exe.
  -lib: Libraries. See library notes below.  Contains opengl32.lib and quakeasm.lib
  -libsrc: Library source.

The opengl32.lib (import library) that comes with lcc does not contain all the imports required  by glQuake. The missing ones were pasted from the opengl.exp file as necessary and a new opengl32.lib was built.  Note that this does not include all missing openGL imports, so additional imports may be needed if more opengl features are added.

I put assembly into a static library for convenience.  Steps to create the assembly library:
Create preprocessor output file: lcc -EP -DGLQUAKE math.s
Remove extra spaces in output file math.i and rename to .spp
Convert: gas2masm <math.spp >math.asm
MASMize it: ml /c /Cp /coff /Zm /Zi math.asm
Make library: lcclib quakeasm.lib *.obj