PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

PQ2 v0.11 Source Code Released

The source code to v0.11 is available. I considered charging a $25 shipping / handling / media fee and distributing it on CD-ROM via Snail Mail, but I thought you would rather spend your money on DEXplor :roll:

Download it here.

From the ReadMe_PQ2_SRC.txt file:

<font face="Courier New">
Dan East, Jan 21, 2002

mailto:quake@dex-plor.com
http://quake.pocketmatrix.com
http://dex-plor.com

Here are the sources for my port of Quake II to the Pocket PC platform. This was a pretty clean, straightforward port, especially compared to Quake 1. :) id Software is definitely getting better at writing portable software (or at least software that builds cleanly with Microsoft compilers). Pocket Quake II builds with Microsoft's eVC++ (which is free). The Pocket PC SDK is required. You also need the GAPI SDK. Notice that the GAPI header file needs tweaking to properly compile under C. I don't know why MS created such a header that requires C++.

I attempted to make polite changes to the source code. All Pocket PC / Windows CE specific modifications have been wrapped with appropriate precompiler directives. So, these sources should still build fine under VC++ for Windows / PC targets (although I've not tried it, so there may be a loose end or two I missed).

I have also applied one of my Fixed Point conversions from Quake 1. There are several more fixed point conversions from Quake 1 that are applicable to Quake II. I'll get around to adding them later. Hopefully they will increase the fps a few points.

Sound is currently not working. id Software had existing routines in place for WaveOut APi support. I simply used directives to prevent the compilation of all the DirectX sound routines, which of course are not supported under Windows CE. I may have inadvertently blocked out a critical portion of the WaveOut routines as well. I can't really think of any other reason the sound would not work.

Various Unicode conversions were provided, as required by certain Windows CE APIs.

Compact Flash support was added to the Pak search paths.

All display output is performed via GAPI direct screen access. Additional video modes were created to fit the Pocket PC display: 240x180 portrait, 320x240 landscape left, and 320x240 landscape right. The actual flipping is performed when the back buffer is blitted to the display hardware. I basically used the display routines from my Pocket Quake 1 port for PQ2.

The input handlers are also borrowed from the PQ1 source (why would I want to write the same thing twice? :) ).


So what is needed?

1) Fix the sound routines

2) Pak file compression (I really don't like the simplistic approach I took with Pocket Quake 1. While it is nice to simply gzip up a pak, and not require a proprietary packing utility, the loading is way too slow. With the additional sizes of Quake II's data files the problem would be exacerbated).

3) Fixed point integer conversions, fixed point integer conversions, fixed point integer conversions! I am confident the FPS can at LEAST be doubled through extensive conversion of the existing floating point math to fixed point.

I'd like to thank id Software and John Carmack for releasing the source to Quake II.

Finally, thanks to Randall Schleufer for the awesome skins. Notice that the skins (controls.bmp and titlebar.bmp) are copyright, and may not be used in any commercial products, which would include a commercial, id Software-licensed build of PQ2

</font>

Dan East
Cool Dan, thanks for the release :). I got the game.dll file compiled with no problems wich is great now i can use your code as a refrence to port other mods to the ppc. I feel i should have no proble, doing this at all since i have written many little mods for q2/q3. I hope to have a working bot out for yall as soon as i can find that link to gladiator and sit down with the source to it for a few hours.
thanks!
mark (killzat) · 22 Jan 2002, 11:05 UTC
Bah I tried to get the PQ2 .exe to load directly from my Q2 dir on the CF card using a standard routine, I'm new to Q2 code so why doesn't this work? Seems to with PQ1.
Mark, I don't quite understand what you're trying to do. You should be able to stick the pq2 executable on a CF card and run it from there. The PAK file must still reside in the prescribed directory.

Dan East
mark (killzat) · 22 Jan 2002, 17:03 UTC
Yeah well exactly, that's what I thought and what the code sort of shorts, however it won't do that.

I put the pocketquake2.exe (392K) in /Storage Card/Quake2 directly and it shows the usual intro window, but won't even flash up the top green part that you ALWAYS seen even when there's no enough memory.

It can't find the PAK file.

Have you tried it yourself?
Make sure game.dll and ref_soft.dll are in the same dir as pocketquake2.exe.

Dan East
mark (killzat) · 22 Jan 2002, 19:02 UTC
That explains it.

**Mark hits head against wall**

Need to select 'View All Files' to see them - doh.