libjpeg is a pain in the ass, especially due to Ubuntu shipping
libjpeg-turbo in jpeg8 mode as their default libjpeg, while every other
distro I checked (including debian!) ships libjpeg-turbo in jpeg6.2 mode
Thankfully stb_image.h exists - just a single header and it even
has a (much!) friendlier API.
It's not like Doom3 (or any of the mods I checked) actually use JPEGs,
but I'm sure if I'd drop support completely, someone would complain
(perhaps rightfully so).
for some reason neo/tools/compilers/dmap/optimize.cpp included windows.h
and GL/gl.h before including dmap.h, which indirectly includes qgl.h.
This made things in qgl.h explode - seems like APIENTRYP in the
QGLPROC() macro expanded to bullshit because of some APIENTRYP or
APIENTRY definition in windows.h or GL/gl.h
Those includes are totally unnecessary, dmap.h -> qgl.h already includes
GL/gl.h, indirectly via SDL_opengl.h and in that setup things somehow
are fine.
Apart from some minor stuff, this changes the signature of some methods
of Parser and Token classes and of the (unused) Random2 class.
That no problem though, because the calling code uses normal ints
anyway.
Don't include the lazy precompiled.h everywhere, only what's
required for the compilation unit.
platform.h needs to be included instead to provide all essential
defines and types.
All includes use the relative path to the neo or the game
specific root.
Move all idlib related includes from idlib/Lib.h to precompiled.h.
precompiled.h still exists for the MFC stuff in tools/.
Add some missing header guards.
variable set but not used
Removes some CollisionModel code under _DEBUG which was probably a
leftover, since it was completely useless (its done later anyways).
The unused WriteLossless() was using libjpeg internals found in
jpegint.h. This header is available with libjpeg8, but not shipped
by most distros. Disable the relevant code - no functional
changes.