Quake Source on Windows 7/VS 2008 Express

2014/12/21 19:54

I downloaded the quake 1 and 3 sources some time ago but never got to looking at them, or even compiling them until now. Unfortunately the Quake 1 source won’t compile as it is in visual studio 2008, but thankfully the steps required to make it do so are quite easy:

  1. When you first try to compile it you’ll get some complaints about int variables called “errno” in net_wins.c, net_wipx.c sys_win.c. To solve this simply change the definition and any further references to it to something like “errno1″
  2. It will complain about not being able to link to LIBC.lib. As it seem you don’t need this library go into the Linker “Input” section of your project properties and add LIBC.lib to the “Ignore Specific Library” field (I think you only need to do this for the Release and Debug builds of the Software Rendering version, the GL Debug and GL Release don’t seem to link to these libraries.
  3. If you have a fairly new graphics card you might get a buffer overflow error on startup due to Con_Printf trying to list all the OpenGL extensions found (see GL_Init() in gl_vidnt.c). the Quick fix for this is to increase the buffer size defined by MAXPRINTMSG in console.c, I just doubled it.
  4. (Optional) it’s set to start in fullscreen mode by default, which can be quite jarring while you are looking through the source. You can add “-startwindowed” to the Command Arguments in Project Properties->Debugging or, like me just set the line ‘if (COM_CheckParm(“-startwindowed”))’ in vid_win.c to if(true)

Now you should be able to compile and run the source, but it isn’t much use without some resource files for you to use in the game. My copy of Quake is several thousand miles away in an attic, and I couldn’t find a new physical copy online so I downloaded the 1.08 version of the demo from the id website, where you can also get the source code, but it seems their zip of the demo only contains an .exe which does nothing. Further searching got me to the 1.06 version of the demo here which works almost perfectly (The textures in GL Quake do not show- I am looking into that.)

To install the demo you will need an older version of windows, compatibility mode in 7 didn’t work for me and neither did installing it in XP. I used dosbox to install it and then set the Project Properties->Debugging->Working Directory in VS to the same directory i installed it to. After doing this you should be able to compile build and play through the demo on Windows 7 :)