[quake2] Porting latest Quake2Max to Linux

Karen Pouelle hockeyvixen at yahoo.ca
Mon Jul 14 19:39:31 EDT 2003

"The only reasons I am not doing it are:"

All great reasons.

Quake 2 pak files have a file length limit of 56 characters ( or somewhere
around there).  There's no limit except for the filesystem's for files that
are not in paks.  If you are replacing the original wal files used in the
baseq2 game (as I am doing), then be assured none of THOSE files which Id
Software provided exceed the 56 character limit OR the 127 byte limit.

"use strncpy and truncate the filename? (obviously pointless) malloc() a

"use an arbitrary limit for a maximum filename length and refuse longer

Add error checking as you wish.  Files loaded from paks will not exceed the
limit set in either the pak format or the Quake 2 client's loading of files
from paks.  

"the code assumes that filenames are not shorter than 4 Byte."

Does that 4-byte include paths?  A check for short names can be added if that
condition (short filenames) is possible.  There's no need to crash or skip
loading of a file for some silly reason like the file name is too short. :) 
If the file is a .wal file, then a file named '.wal' is still not shorter
than 4 bytes.  I don't see how a wal file could be any shorter and still have
the .wal extension on the end of the name.

"Where does the stuff _really_ go?"

I'd start with the "src/ref_candygl/gl_image.c" where I made the patch from.
The higher resolution textures are "candy".  All textures loaded in OpenGL
mode are promoted to 16 bit or higher by the hardware anyway, so except for
the 4 x increase in texture sizes I've made, there's no difference in
performance, in fact there may be some slight increase due to the hardware
not having to promote the 8 bit files to 16, but that's probably offset by
the computing needed decoding jpg and png's.  

"Should both be changed?"

If it tests good, I don't see why not.  It depends on if you wish to add the
feature to the non-candy version.  It could be kept seperate until it was
proven not to cause any problems.  I've been using it for 6 months or so in a
binary that was made for me.

Hope that helps.



Post your free ad now! http://personals.yahoo.ca

More information about the quake2 mailing list