Hexen II - Unofficial v1.15 Patch
=================================

THIS MATERIAL IS NOT MADE OR SUPPORTED BY ACTIVISION.

This is an unofficial patch for Hexen II; it will update v1.11/1.13/1.14 retail
game to version 1.15. It is based on the source code released by Raven Software
and addresses a number of bugs in the final game.

For proper functionality, you have to have the v1.11 retail patch installed
before installing this update.

OpenGL version has been largely reworked for better visual quality and more
compatibility with different hardware.

If you have Portal of Praevus installed, download and install unofficial v1.14
Mission Pack patch instead.

To install, unpack this archive into your Hexen II folder. If you use a 3Dfx
card, it is recommended that you download and install the latest MiniGL or
WickedGL drivers for better image quality and performance of the OpenGL version.

Since v1.13
=============

Bug Fixes
-------------

* Fixed a nasty stack corruption problem that would result in a crash upon
  loading progs (i.e. on map start) once in a while.
* Fixed demos freezing upon changing maps.
* (OpenGL) "fov" console variable now works in OpenGL mode.
* (OpenGL) Fixed the problem where the game would eventually crash with 
  "mod_numknown == MAX_MOD_KNOWN" error in OpenGL mode after playing for a
  while.
* (OpenGL) Fixed Z-fighting on alias model shadows in OpenGL mode.
* Fixed artifact numbers not displaying properly in the status bar if over 9.
* (OpenGL) Aspect ratio is now correctly maintained in non-4/3 full screen video
  modes.
* (OpenGL) gl_texturemode command now affects all textures, including 2D
  overlays, lightmaps (upon map restart), models and sprites.

Other changes
-------------

* Further tweaked model and world lighting. Model lighting should now look more
  realistic in both software and OpenGL modes, and fullbright special surfaces
  (liquds, lava) should no longer saturate in OpenGL mode.
* Virtual machine revised: all 16-bit offsets should now be 32-bit (allowing for
  larger progs size, more variables, functions, etc). The HCC compiler has been
  rebuilt accordingly, now it is included with the source code distribution.
  Progs version has been incremented and original progs recompiled; the
  executable, however, still understands both v1.11 and v1.12/1.13 old progs.
* (OpenGL) Replaced several rare OpenGL calls and made others link optionally
  at runtime; the OpenGL executable should be much more miniport friendly now.
  If you were getting "Linked to Missing Export" errors trying to run GLHexenII
  on castrated OpenGL implementations such as S3Quake, try again.
* Optimized server performance since the last version by reducing the number of
  conditionals and dereferencing (introduced in the last versions by maintaining
  support of old progs) and replacing several math functions with table lookup
  equivalents. Graphical subsystem is still in the process of tweaking and is
  currently slower than the previous version due to compatibility oriented
  changes above. (Multitexturing in OpenGL is soon to come.)
* (OpenGL) Feature detection logic revamped; OpenGL v1.1 texture object
  capabilities (instead of v1.0 extensions) are used by default if found.

Since v1.12a
=============

Bug Fixes
-------------

* Removed flickering and unnecessary redraw in map loading screens
* No longer displaying "unknown command" for console variables not initialized
  in dedicated server mode when these are read from configuration files
* Fixed out of memory errors when running with small hunk and setting very high
  resolution (hunk size now affects the maximum resolution the game can run at)
* Fixed several buffer overrun errors (e.g. a very long OpenGL extension string
  on modern graphics hardware would overflow the console buffer and corrupt
  adjacent data)
* Made episode intermission screens be drawn full screen (full window if in
  windowed mode) regardless of the display resolution and -scale2d command line
  option, avoiding the "hall of mirrors" effect
* (OpenGL) Fixed stray lines at the bottom of all 2D graphics
* (OpenGL) Fixed gamma adjustment (previously non-functional); gamma can now be
  adjusted from the menu like in software mode, provided that video adapter
  supports hardware gamma
* (OpenGL) Fixed the bug where a texture of the same name but different content
  in a subsequent map (compared to a prior map) would cause the game to crash or
  display the wrong texture ("cache mismatch error")
* (OpenGL) Made all map specific OpenGL textures be deleted upon loading a
  different map (adjustable with gl_purge_maptex console variable) to keep
  memory usage low on boards that keep textures cached in system memory (e.g.
  nVidia)
* (OpenGL) Fixed transparency issues in intermission screens
* (OpenGL) Made the maximum OpenGL texture size be determined based on given
  OpenGL implementation, rather than hard-coded 256 for 3Dfx and 1024 for
  everything else. Minimum value is 64 (required of any OpenGL implementation)
  and maximum is 1024. gl_max_size console variable dropped, use -maxtexsize <x>
  command line switch to force maximum texture size
* (OpenGL) Made console fonts, skies, player skins and other non-map graphics
  abide by the maximum texture size (previously resulted in blank textures
  displayed on some adapters because maximum was exceeded)
* No longer drawing to front buffer wherever possible (used to cause flickering)
* (OpenGL) Enabled palettized (8-bit) textures on any board that supports
  GL_EXT_shared_texture_palette extension, not just the 3Dfx and PowerVR boards.
  Disable with -no8bit command line switch for (arguably) higher visual quality
* (OpenGL) Made translucent graphics (smoke puffs, flame tongues, etc) be
  displayed correctly on non-3Dfx boards (and with non-MiniGL drivers)
* (OpenGL) Fixed dynamic lighting for alias and brush models
* (OpenGL) Decreased light map intensities together with increase in contrast
  (see below) to match look and feel of software rendering mode; overbrighted
  light maps much less frequent
* (OpenGL) Made timerefresh give an error message instead of crashing the game
  if executed when the map is not loaded
* Fixed system speed dependent Portal of Praevus intro text scroll rate
* (OpenGL) Added handling of Alt+Tab and other kill focus events (these should
  now function properly unless with 3Dfx MiniGL)
* (OpenGL) Set the gl_ztrick default value to 0 (ztrick often causes problems
  like "hall of mirrors" and "snow" effects, and does not necessarily improve
  performance on modern hardware)
* (OpenGL) Fixed occasional corrupted textures (pixel rows no longer have to be
  aligned at 4)
* Fixed sys_delay console variable not properly loading from configuration files
* Disabled cheats in coop games (have to be explicitly enabled by the server to
  work)
* Fixed MIDI music volume adjustment (can now be adjusted from the main menu or
  with bgmvolume; hardware MIDI volume capability is used when present). Dropped
  the midi_volume command
* Fixed status bar/view size not properly saving to/loading from configuration
  files
* Disabled status bar animation on screen resize (might have caused
  unpredictable results if done too fast)
* Made the color variable be truncated to 8 least significant bits before
  determining player color (overflow was possible)
* (Software) Fixed gun model not being drawn if fov > 90
* (Software) Made maximum field of view be 170 degrees instead of 110
* Fixed sound from other applications (and some software wave table MIDI
  synthesizers) being muted when in DirectSound mode
* (Software) Estimating surface cache size correctly for stretched video modes
* (Software) Disabled Alt+Tab's and other unneeded event handling in DirectDraw
  and VESA VBE modes by overriding MGL's WndProc with our own (generally,
  switching  from/to a VESA VBE mode on the fly results in a blue screen).
  Alt and other system keys should now work properly in these modes.
* (Software) Fixed the game crash upon entering video menu when there is not
  enough memory for some windowed video mode
* Fixed the sys_memory command (no longer prints abracadabra if memory block
  names are too long)
* (Progs) Fixed timing/system speed dependence problems in Crusader's tomed
  Meteor Staff, Assassin's Crossbow and Scarab Staff (tomed and untomed),
  Demoness's Flame Orb (tomed and untomed)
* (Progs) Fixed Necromancer's tomed Raven Staff missiles occasionally colliding
  amongst each other

Other Changes
-------------
* The ability to look higher up and lower down
* Removed hard-coded 72 frames per second frame rate cap (now adjustable from
  console using cl_maxfps and sv_fps variables, for client and dedicated server
  respectively)
* The ability to turn off disk activity display (rotating skull in the upper
  right corner) using showskull console variable (0 by default)
* Non-Portal-of-Praevus support: if no mission pack is installed, the in-game
  menus are adjusted accordingly. Demoness character class can now be used in
  multiplayer games, but intentionally not available when starting a
  non-mission-pack single player game (that would contradict the storyline)
* Several irrelevant notices no longer being echoed into in-game and dedicated
  server console unless in developer mode (e.g. no more spamming with "meshing
  model ..." in OpenGL mode)
* More concise memory usage: all memory allocated explicitly is now allocated
  on the hunk (hunk and zone sizes adjusted accordingly); surface cache size
  increased in software mode for high resolutions. VirtualAlloc() now used
  instead of malloc(). Dropped -minmemory switch (used to only report that so
  much memory is used, but still allocate the same amount as without it); use
  -heapsize <x> to set the hunk size explicitly. Default is between 14.5M and
  24M, depending on available physical memory, and 14M for dedicated server mode
* Console text updates no longer forcing screen redraws (all redraws, except in
  loading screens, are now done by the main game loop)
* (OpenGL) Default contrast of 2D and 3D graphics tweaked to match that of
  software rendering mode (previously much dimmer); the values can be adjusted
  from the command line using -contrast <x> and -2dcontrast <x> switches. Valid
  range is 0 < x <= 255. The default values are 2 and 1.25 respectively
  (previously both 1).
* (OpenGL) 2D graphics linear filtered (instead of point sampled)
* (OpenGL) More efficient memory usage uploading textures to the OpenGL pipeline
* (OpenGL) Adjusted transparency: lower sky level is now transparent (adjust
  with r_skyalpha <x>, default is 0.67), and water transparency (r_wateralpha)
  decreased to 0.33 (previously 0.4) to reflect default gamma/contrast changes
* (OpenGL) Black (instead of red) clear color when gl_clear is enabled -
  "cracks" are much less visible
* (OpenGL) WM_MOVE events ignored when in full screen
* Most cheats usable in multiplayer as well as single player, if the server
  allows that (adjust with sv_cheats, default is 0)
* Broadcast messages (obituaries, chat) and cheat usage echoed in dedicated
  server console
* Old version 1.11 progs (as well as new 1.12+ progs) supported to allow
  compatibility with older game add-ons. This is not guaranteed to work,
  however, so updated progs should be obtained from add-on author whenever
  possible. Upon map load, a warning will be given if old version progs are in
  use. Uninstall Portal of Praevus if it is installed and delete/move pak4.pak
  from the data1 directory if you experience host/program errors with old progs
* Multiple (per map) progs support back in the game (which map uses which progs
  is defined in maplist.txt)
* Some additional info (such as game name, device capabilities used, etc)
  displayed on game startup
* Mouse filter defaulting to enabled (adjust with m_filter console variable)
* Music added to Portal of Praevus intro screen
* Some error messages being more descriptive (sound/MIDI related)
* Configurable sound output format (instead of hard-coded 11025 Hz/16 bps).
  Adjust sampling rate from the command line with -sspeed <x> (x in Hz) and
  number of bits per sample with -sbps <y>. Defaults are 11025 and 16
  respectively
* (Software) Video performance optimizations: maximum number of video pages used
  for page flipping now adjustable with vid_maxpages (default is 3, triple
  buffering) - the more pages are used, the less is the chance of flickering
  when the frame rate is high and vertical syncs are off (vid_wait: 0 = vertical
  sync off; 1 = vertical sync on; 2 = triple buffering optimized;
  -1 = auto-detect (default)); however, some VESA VBE video drivers are buggy
  and report more pages than there really are; direct frame buffer access is
  now disabled by default (adjust with vid_nopageflip), thus we don't read
  access the frame buffer (which is slow and causes a lot of slowdown on
  translucencies in DirectDraw and VESA VBE modes); other buffering
  optimizations in nopageflip modes
* (Software) Video modes no longer being switched 3 times on game startup. A
  default windowed mode is set, then the preferred video mode is attempted after
  parsing the configuration files, and default full screen mode is set only if
  that fails.
* (Software) Scitech MGL headers updated to the latest stable version (4.0),
  the executable is now linked dynamically to the MGL DLL file, mglfx.dll.
  Updated WinDirect (VESA/DDRAW) MGL libraries (wdir16.dll, wdir32.dll)
* Some debug calls removed from memory allocation routines


=============

The source code is available as separate download, to reduce size. Sources were
compiled using LCC-Win32 and MASM. Paths need to be changed in the project
files, and several files moved around to compile.

Although old Hexen II mods should work with this version (the executable
supports both new v1.14 and old v1.11-1.13 progs), it is highly recommended
that you obtain updated progs if possible. You may experience program errors
with old format.

For technical stuff, contact Pa3PyX:
Email: pa3pyx87405703@icqmail.com
Web: http://pa3pyx.come.to/
ICQ: 87405703
