================================================================================
Changes since Eternity Engine v3.40.15
================================================================================
--------------------------------------------------------------------------------
12/24/11

I am gearing up for a Christmas release of EE 3.40.20, which is codenamed
"Mjolnir" for the great hammer of the Norse Ćsir god Thor, son of Odin, which 
could cleave the earth and cause lightning to strike with every blow.

In order to deliver sufficient value in the new release, I have completed
another music related feature: support for "hi-def" music packs. A prerequisite
to allowing this was to go further along the path earlier taken in converting
the WAD system into a real virtual filesystem by allowing lumps to represent
physical filesystem files that do not have to remain open constantly and by
adding the ability to recursively add physical disk directories/folders into the
WAD directory as if they were a WAD or PK3.

To activate hi-def music support, the s_hidefmusic cvar must be set to true
first (note that this cvar can be changed at runtime, but won't take effect
until the next time the game is started up). Then, music of any SDL_mixer-
supported format can be placed into a "music" subdirectory under the target
game's base folder, as such:

HD music for DOOM would go in base/doom/music
HD music for Heretic would go in base/heretic/music
etc.

MP3 is heavily disrecommended for use, unfortunately, because the smpeg decoder
library included with SDL_mixer for this purpose is highly unstable. I would
recommend use of OGG format music when possible. The existing JHeretic and
JHexen HD music packs happen to be in OGG format already. I do not know if there
are corresponding packages for DOOM/DOOM II yet...

--------------------------------------------------------------------------------
12/22/11

Map music definitions can now be loaded from Hexen SNDINFO lumps, and that means
that Hexen now has functional music when loaded as a PWAD over DOOM II or 
Heretic! Yet another important milestone on the road to support.

Note that SNDINFO music definitions, which are deprecated in ZDoom, are probably
best discouraged for future use by new mods. At any rate, they are considered
higher priority than any built-in default music name for a map, even if said
name is BEX-modified, but are considered lower priority than any music name
defined for the map by a MapInfo entry.

--------------------------------------------------------------------------------
12/17/11

Yet more estructalloc usage has been propagated, particularly in the dynasegs
code and in the DECORATE state parser.

printz found yet another issue with improper case sensitivity in the DECORATE
state parser, again a result of qstring refactoring - this time it was the
comparison of the current token value with "goto" when determining if the
current token is a keyword. I just had to replace the == operator call with a
proper call to qstring::strCaseCmp.

--------------------------------------------------------------------------------
12/03/11

Getting EE to run on Win95 again did have one positive result in that it lead to
discovery of a compiler glitch in Visual Studio 2005 relating to inline 
assembler and/or the CDQ instruction - wtfever the problem actually is, the 
result is that the player would wall-slide backwards, due to incorrect answers
being returned from D_abs.

Because of this, I've decided it's just easier to eliminate the MSVC++-only
inline assembler version of D_abs and let the compiler inline the C version
wherever it feels there's an advantage to doing so. GCC builds still use a
different version of the routine that is written as a statement expression,
which is a GNU extension to C/C++.

--------------------------------------------------------------------------------
11/28/11

DavidPH suggested a modification to EHashTable that allows me to pass the 
pointer-to-members that it needs into the template instead of as parameters to
the constructor. It almost doesn't seem like it ought to work until you realize
that member pointers in C++ are compile-time constants ;)

--------------------------------------------------------------------------------
11/27/11

I got the Visual Studio 2005 project updated, and somehow let ConSiGno talk me
into trying to get that build to run under Windows 95, which, after a hell of a
lot of pain, I did manage. The 2005 build is also now optimized to nearly the
same degree as the 2008 release.

--------------------------------------------------------------------------------
11/26/11

Added the hal/i_platform.cpp module, which contains a number of preprocessor
defines that make testing parameters of the compilation environment (compiler,
target operating system, etc.) easier to deal with.

DavidPH has fixed up the CMake scripts, including removing the code that results
in the libpng and zlib test programs attempting to build on Linux-alikes.

-cdrom mode has finally been completely removed, as I got tired of the 
unpredictable prototype of the mkdir function, even between different versions
of GCC.

--------------------------------------------------------------------------------
11/02/11

Converted some more calls to ecalloc into estructalloc. This will be going on
for quite some time.

--------------------------------------------------------------------------------
10/28/11

Added GNUlib's Knuth-Morris-Pratt implementation of strcasestr as M_StrCaseStr,
and added a wrapper method for it to qstring as qstring::findSubStrNoCase. This
allows for more compact case-insensitive substring searches. 

K-M-P has O(n) behavior compared to O(n*m) behavior of the naive but common BSD
implementation of this routine. It does however still use a malloc of the size 
of the input "haystack" string in order to build a lookup table. 

However, this cost is amortized via not invoking K-M-P until an empirically 
established comparison threshold has been crossed in execution of the naive 
algorithm.

Added skeletal code for the inventory and inventorydelta EDF sections based on
the code from e_things.cpp. This includes the inheritance mechanism used there,
which will be adapted to function on inventory definitions so that they can
be extended.

--------------------------------------------------------------------------------
10/25/11

Added basic inventory dehflags_t and dehflagset_t structures, for eventual
parsing of the basic inventory flags field.

Added libConfuse cfg_opt_t definitions for the inventory and inventorydelta 
structures.

Removed the old inventory flag definitions from e_player.h, which were missed
earlier and started conflicting with the new ones.

The main EDF cfg_opt_t now references the inventory sections.

--------------------------------------------------------------------------------
10/24/11

esselfortium found some major bugs in dynamic musicinfo defs when he loaded the
32in24-11 alpha wad into EE:

* If music loading failed, EE would still think it was playing music later. This
  would lead to a Z_ChangeTag(NULL) call in S_StopMusic later, causing the
  engine to exit.

* A non-prefixed music name passed in would match an identical lump name
  preferentially, rather than testing for a prefixed (ie. D_ or MUS_) version of
  the lump first. This lead to a problem in this wad of the map name header
  lumps being selected because the music lumps were named things such as 
  "D_MAP33". Now, the music code will prefer prefixed lumps over unprefixed
  ones.
  
* Essel also discovered that the unprefixed lump would even be preferred if the
  name specified in MapInfo was prefixed. This was just plain wrong. If an
  explicitly prefixed name is passed in from MapInfo now, it will never match
  an unprefixed one, period.

--------------------------------------------------------------------------------
10/23/11

Added a new module to contain inventory definitions and processing code for EDF,
at long last.

inventory_t has been added as a prototypical basic inventory definition 
structure. This may change significantly before the system is finished, 
especially where support for both inheritance between inventory definitions,
and for provision of "subclass" information for support of specific types of
inventory items - weapons, health, powerups, quest givers, etc.

Also added some basic inventory flag definitions, based on ones from ZDoom.

The length of all mnemonics in EDF that are still limited to a static maximum
have been increased to 128 characters. It is likely in the future that these
names will shift to being dynamically allocated instead, though.

--------------------------------------------------------------------------------
10/22/11

Repaired a qstring security hazard by adding private method qstring::checkBuffer
which is now called pretty much everywhere before doing operations on the
qstring that require its buffer allocation to be valid first. Uninitialized
qstrings are no longer a problem for the engine because of this.

Ladna contributed a fix in the form of re-enabling the commented out call to
C_NetInit in d_main - don't confuse this with the C_InitNet call, which I also
had to restore much earlier.

Seems fraggle had a knack for naming functions in very similar manners :P

--------------------------------------------------------------------------------
10/21/11

Basic compression has finally been added to the i_net low-level networking code
so that zero-valued fields in ticcmds won't be translated. Due to the fact that
a growing number of fields in ticcmd_t are zero for the vast majority of game
play (especially such fields as buttons, actions, chatchar, and look), this
should significantly reduce EE's packet overhead in the P2P netcode system.

This clears the way for Wagnerian expansion of the ticcmd structure which will
allow for guiltless support of inventory and weapons without an unreasonable
static limit on the total number of them implemented.

Corrected some stupid bugs in the packet size calculation and field parsing.

--------------------------------------------------------------------------------
10/18/11

Warning fixes for p_info.cpp to cut down the Jenkins warning count a bit :P

--------------------------------------------------------------------------------
10/15/11

Ladna added z_zone.h to p_sector.cpp, which I somehow neglected. This was oddly
only causing compile problems in GCC due to missing definitions of NULL and
size_t in p_saveg.h.

I think this can probably be blamed on Microsoft Visual C++'s propensity to
pre-discard code from semantic evaluation which it has determined early on is
unreferenced in the translation module... bloody brilliant, that stuff, but it
sure is good at hiding otherwise glaringly obvious problems.

--------------------------------------------------------------------------------
10/13/11

I have added a SectorThinker class and re-derived all sector thinker types from
it in order to add abstracted support to it for emulation of vanilla DOOM's
undefined behavior when retriggering vertical doors in motion and having that
action apply to a thinker type which is not actually a VerticalDoorThinker
(vldoor_t in the original code).

This self-corruption is implemented through the virtual function
SectorThinker::reTriggerVerticalDoor. Outside of old demos, only the 
VerticalDoorThinker class's implementation of this method actually does anything
and the rest simply return.

--------------------------------------------------------------------------------
10/11/11

The rest of the standards-violating BOOM allocation macros have been replaced:
 realloc -> erealloc
 strdup  -> estrdup
 free    -> efree
 
I have also introduced an awesome estructalloc macro which takes a structure
type name and a number of structure instances to allocate. This makes allocation
of single structs and arrays of structs very simple without requiring use of C++
new, which EE cannot override globally without causing problems with libraries.

--------------------------------------------------------------------------------
10/10/11

Fixed a problem identified by Yagisan's Jenkins compiler farm introduced
yesterday - GCC 4.4 still doesn't allow use of locally defined structure types
as parameters to template functions, despite the impending adoption of C++11 as
an official standard. Seems you have to specify support for the standard to be
enabled explicitly and I'm not ready to require that for compiling EE yet, so
all such types have been externalized from their functions, for now at least.

--------------------------------------------------------------------------------
10/09/11

The BOOM-introduced macro redefinitions of calloc and malloc, which are in 
violation of the C and C++ standards which do not allow for macro-redefinition
of names reserved by the C standard library in the event the library will be
included into the program, have been removed entirely.

All calls have been replaced with the ecalloc and new emalloc macros.

--------------------------------------------------------------------------------
10/04/11

Removed more instances of scope shadowing.

A buffer being used in the i_exception code was too small, according to the 
static analyzer output, and has been fixed.

--------------------------------------------------------------------------------
10/02/11

After further research, I have re-enabled the ability to do shrinking reallocs,
but with a fix that will return the currently allocated block if C realloc 
happens to return NULL during a shrinking operation - which according to the
standard it is allowed to do even though it seems illogical.

--------------------------------------------------------------------------------
10/01/11

Applied DavidPH's patch to successfully build on Linux using the in-tree 
versions of zlib and libpng.

D_HashTableKey is now used for console command hashing, versus the custom key
calculation it was using since SMMU.

Eliminated a lot of instances of variables being shadowed by declarations in
inner scopes, with assistance of some static analyzer output provided by 
CSonicGo.

Changed more calloc calls to ecalloc.

I have disabled the ability to do shrinking realloc calls through Z_Realloc. It
will now just return the buffer unmodified if the size is less than or equal to
the allocation's current size.

--------------------------------------------------------------------------------
09/30/11

player_t::attacker is now properly reference-counted against the Mobj to which
it points, outside of old demos.

This is a bug persisting from the original DOOM engine, but one that was missed
by the BOOM team when Lee added thinker reference counting. As a result, it was
possible to observe undefined behavior occuring when you were killed by an 
object which removes itself after death (such as a Lost Soul), and stayed there
watching it as it infought with other monsters and was killed.

With ZONESCRAMBLE (or INSTRUMENTED, in BOOM) defined, you would immediately see
the player's view spin around to an unrelated diagonal direction along the 
line y = x due to the Mobj's x and y coordinates being memset to gametic & 0xff
as it passed through Z_Free.

Without ZONESCRAMBLE, you would occasionally observe nothing if the allocation
wasn't immediately recycled by the C heap, but occasionally you'd turn to face
an entirely random-seeming direction. This was especially the case in the debug
build of the executable, where the Microsoft run-time's debug heap also does its
own clearing of freed memory in free() - in this case to the value 0xFEEEFEEE.

This usually does not crash the game merely by chance. If the page that the mobj
had been allocated on were released back to the system heap (ie, unmapped from
the process's address space on account of having no further allocations in it),
it would be possible to get an Invalid Page Fault exception. I've never seen it
happen though, in any DOOM-based engine so far. It is probably a consequence of
operating system behavior (ie, they don't happen to release pages from processes
in that manner at all, or rarely if ever).

--------------------------------------------------------------------------------
09/10/11

I have backported the awesome M_SafeFilePath routine which I wrote for the hub
savegame code in Chocolate Strife to Eternity, where it can fully benefit from
the free-less use of Z_Alloca. This has replaced most direct usage of the
M_StringAlloca function in Eternity, which is called as a subroutine from
M_SafeFilePath.

What M_SafeFilePath does is the following:

It accepts two file path component strings. It safely and securely concatenates 
them by pre-allocating a zero-filled buffer of the necessary size to hold both
input strings and an additional path separator character using M_StringAlloca.
It then performs the tripartite concatenation and then calls M_NormalizeSlashes
on the result to automatically ensure that a duplicate path separator has not
been introduced, in the event that either string A or B contain path separators
at the beginning or end.

This is the kind of basic useful utility that can eliminate hundreds of lines of
bothersome, boring-ass, and dangerous code from a game engine.

--------------------------------------------------------------------------------
09/02/11

Added hal/i_picker.h to contain a unified enumeration of supported IWADs for the
IWAD picker. Eventually there will be an i_picker.cpp to support a proper HAL
for IWAD picker implementations as well.

--------------------------------------------------------------------------------
09/01/11

Created an ecalloc macro to clean up the mess that resulted from the C++ porting
process whereby casts had to be added to all calloc calls. This macro evaluates
into a call to a template function called ecalloc_impl, which takes as its 
template parameter the type of pointer it should return. This function is 
implemented inline in z_zone.h and calls down to Z_Calloc.

--------------------------------------------------------------------------------
08/31/11

PNG reading is now fully functional. All graphic resources in startup.wad have
been replaced with PNGs, cutting the size of the file by 75%.

Low level sound channels can now attempt to have themselves recycled as soon as
the "shouldstop" structure member is asserted. There is no need after all to
wait for the sound update thread to set the channel data pointer to NULL first,
as only one thread can have the semaphore lock on the channel at a time.

This repairs loss of player gun sounds when the sound engine is fully
saturated, which was happening as a result of no channels being apparently 
available because they were all locked - even though some had just been stopped
by the S_StartSound call for the player gun weapon - the sound update thread did
not have a chance to run and mark the channels as free yet.

--------------------------------------------------------------------------------
08/30/11

Started work on v_png.cpp module, which will contain the VPNGImage class. This
class will be of utility in eventually supporting PNG resources anywhere in the
game engine.

--------------------------------------------------------------------------------
08/28/11

Support has been added to the IWAD settings menu and IWAD picker for FreeDoom
IWADs, partially courtesy of a patch from Gez.

zlib and libpng have been integrated into the game engine.

PNG screenshots are now supported.

--------------------------------------------------------------------------------
08/27/11

Corrected a mistake made with the new packet checksumming system whereby the
checksum was being included into the checksum calculation on net receive.

HashData has been further converted to C++ via addition of constructors and an
operator == method. A new constructor has also been added which accepts data to
be immediately hashed and finalized.

SMMU's W_LumpCheckSum algorithm has been replaced with a standard CRC32, 
courtesy of HashData.

--------------------------------------------------------------------------------
08/26/11

Removed the dead CONSHUGE code from SMMU, which was known by fraggle to have bad
stability problems.

--------------------------------------------------------------------------------
08/25/11

Did away with yet more proof that programmers are bad spellers by changing all
instances of "consistancy" to consistency. This glaring error has been in place
since the id source release...

Continuing with revisions to the low-level networking code, I have moved the
ticcmd checksumming feature into the low-level code, so that eventually the size
of packets can be made variable. The new code in i_net.cpp is written to be
completely agnostic with respect to the size or layout of the doomcom_t 
structure; instead of trying to read a struct as a byte array, the data from the
struct is now actually streamed into a plain old linear buffer of bytes first.

--------------------------------------------------------------------------------
08/22/11

The number of thinkers being loaded from a savegame will now be rangechecked
against the number the savegame says it should contain, for additional safety.

A_Scratch now supports a new "immediate operand mode" when given value 3, which
allows it to do a specified constant amount of damage. Special thanks to ellmo
for the suggestion.

--------------------------------------------------------------------------------
08/13/11

Minor tweaks to the Thinker class:

* Renamed deswizzle to deSwizzle for stylistic consistency.

* Thinker::references has been changed into a private class member, since it is
  not nor should be accessed directly anywhere outside of Thinker, including 
  inside descendant classes.

--------------------------------------------------------------------------------
08/09/11

Tracer attacks (aka bullets, shotgun pellets, etc) will now obey the player
autoaim setting in the same manner as projectiles, outside of old demo playback.

--------------------------------------------------------------------------------
08/08/11

Created P_SpawnMissileEx to drastically reduce code duplication amongst the 
various P_SpawnMissile variant functions.

--------------------------------------------------------------------------------
08/07/11

With help from printz we finally nailed down a heap corruption issue which was
causing EE to crash for him in ~ZoneObject. Lee Killough's implementation of
A_Mushroom copied an mobj to a temporary variable on the stack in order to
modify its position for use as an aiming target for P_SpawnMissile. Big hack.

I have fixed this by adding a P_SpawnMissileWithPos function that takes, in 
addition to the target object, coordinates at which to actually aim the missile.

--------------------------------------------------------------------------------
06/29/11

In further preparation for renewed work on weapons and inventory for EDF, I have
started some refactoring work on the netcode. This is necessitated by the fact
that the ticcmd_t structure is going to become too overgrown to remain 
functional with EE's packet-flooding networking system.

The following adjustments have been made:

* Default values of the netsend and netget routines are now set to functions
  that will call I_Error in case future mistakes occur similar to the one which
  caused netdemos to crash Eternity by causing it to suddenly believe it was in
  an actual network game as soon as the demo finished playing.
  
* The UDP packet buffer requested from SDL_net does not need to be 5000 bytes 
  long. It is now created at the size of the doomdata_t structure rounded up to
  the next four-byte boundary to leave some leeway.

--------------------------------------------------------------------------------
06/27/11

All menu patches drawn by the menu system are no longer translated using the
CR_RED table as they were in SMMU - this caused problems with various mods, such
as Plutonia 2, due to the wonky nature of the BOOM translation tables, which 
change colors that they shouldn't have to change. Blah.

--------------------------------------------------------------------------------
06/26/11

I have added a long-planned ability to pass preprocessing and format validation
callbacks into W_ReadLump courtesy of a WadLumpLoader class which bears a 
couple of virtual methods used to validate and preprocess respectively. 

I have immediately put this to its first pre-planned usage by creating a 
PatchLoader descendant. Use of this class when loading all patches from the WADs
has enabled the formerly ubiquitous calls to SwapShort and SwapLong used to fix
up the endianness of multibyte values read out of patches to be completely
removed from the engine, speeding up patch drawing routines by a non-negligible
amount and cleaning up the code significantly.

--------------------------------------------------------------------------------
06/24/11

In early preparation for restarting on the inventory system, I have removed all
of the dead inventory code from e_player.cpp.

MetaTables can now nest courtesy of re-derivation of MetaTable from MetaObject.
This means that a MetaTable can become a property of another MetaTable. Neat.

--------------------------------------------------------------------------------
06/23/11

The temporary configuration file created during the saving process needs to be
written to the base folder, and not in the EXE dir, to avoid problems with the
rename() call on Linux where it would state "Invalid cross-device link", as a 
result of the source and destination paths being on different logical mounts.

DavidPH contributed a patch to establish ability to build with OpenGL support
enabled on Linux using the CMake script.

================================================================================
Changes since Eternity Engine v3.40.11
================================================================================
--------------------------------------------------------------------------------
06/21/11

I eliminated multiple output of the "Loading extension" message emitted from
SDLGL2DVideoDriver::LoadPBOExtension. For safety, I reload the function pointers
after the GL context has been recreated, but it isn't necessary to output the
acknowledgement message when this happens. Instead it is only printed the first
time during startup.

--------------------------------------------------------------------------------
06/19/11

Happy birthday to me! ^__^

I have finally reintroduced the resolution choosing box, but it is now used to
construct a "geom" string for the user based on their "favorite aspect ratio"
and "favorite screen type" settings (fullscreen or windowed). This keeps the
lists of resolutions reasonably sized.

i_videomode has been moved from the game cfg to system.cfg, so all Eternity
games will now share the same configured resolution.

Separation of the default video mode setting from the setting shown in the menu
has been removed because of the confusion it was causing to end-users.

SDLVideoDriver::InitGraphicsMode will now fall back to the last successfully set
video mode recorded if the new mode set fails. If no mode was set previously,
Eternity will try to set the default mode of 640x480x8 windowed.

I_FatalError has been trimmed back down to ONLY being called where it is needed,
since this function cancels the execution of many of Eternity's shutdown
routines - in particular, configuration file saving. This leaves I_FatalError
calls in z_zone.cpp, where they are required to prevent reentrancy; m_misc.cpp,
due to the fact the config is saved during shutdown and an error there would
either cause a recursive exit or a fall-through from a noreturn function; and
a few other misc places.

--------------------------------------------------------------------------------
06/18/11

Added an i_softbitdepth variable that allows the bit-depth of the SDL software
backend's screen surface to be controlled by the end-user without the use of a
command-line parameter like -8in32. As a consequence, EE can now render to 16-
and 24-bit surfaces as well (note that 16-bit will incur color drift as the 
values in DOOM's palette don't fit into 16-bit's RGB565 precision - this is
particularly noticeable with grays, which seem to turn slightly pink or green).

All of the gl_ options defined earlier are now available in system.cfg for
tweaking the behavior of the SDL GL2D video backend.

--------------------------------------------------------------------------------
06/11/11

printz found a problem in DECORATE state support wherein the comparison with the
"bright" keyword was being done in a case-sensitive manner, making it 
unrecognized as a keyword unless it was in lower-case. This happened by accident
while I was refactoring qstring into a C++ class with operator overloads.

--------------------------------------------------------------------------------
06/05/11

I have completed and tested the ability to use the ARB pixel buffer object
extension, which entryway states is 1.5x to 2x faster than uploading to the
texture object directly.

I am now preparing for 3.40.15 release, which will be entitled "Wodanaz" for
one of the chief gods of the Germanic pantheon, better known as Odin, the 
Wanderer, ruler of Asgard and master of Valhalla.

--------------------------------------------------------------------------------
06/02/11

SoM fixed two problems with portals:

* Forty Two found an issue in one of his maps where sprites all over the level
  would seem to appear through walls on the other side of a linked portal line.
  SoM discovered this was a bug in solidsegs generation and was able to fix it
  in a couple of minutes.
  
* SoM also determined that the "jerk" felt when crossing line-to-line linked
  portals was lack of the same fix used in BOOM to smooth out line-to-line
  teleporters by fooling with the player's viewheight/viewz/bobbing properties.

I have added the ability to load the GL_ARB_pixel_buffer_object extension,
adapted from code in PrBoom-Plus, though it is not functional yet.

--------------------------------------------------------------------------------
05/31/11

I finally got around to rewriting the console message history buffer by remaking
it into an array of pointers instead of an array of fixed-size strings that had
to be memcpy'd around when the buffer was shrunk.

Now instead, the messages are all allocated in one block, and the messages[]
array points to each 128-byte segment of that single long string. When the 
buffer has filled up, the pointers are shifted down and the bottom 64 (no longer
128) are moved to the top of the array. This is vastly more efficient, and 
allows both for a smaller cut when shrinking the buffer, as well as a larger
buffer size - up to 512 messages are now kept in history, allowing the entire
cmdlist to appear again without being truncated even if the buffer shrinks.

--------------------------------------------------------------------------------
05/30/11

GL configuration variables have been added in a gl_vars.cpp module, and these
always exist even if EE_FEATURE_OPENGL is disabled for the sake of simplicity.

Fixed a crash found by Kaiser (not hobbs as accidentally indicated in the SVN
commit message for r1532) which involved attempting to manipulate the value of
the player skin variable in the menus - when I added support for vt_float
variables, I lost some code from mn_engin.cpp which was implicitly handling the
case of hacky vt_string variables which handle the '+' and '-' characters
explicitly in their console command handler callback and specify the 
vt_handlerset flag on themselves to enable it.

Removed any indication that the SDL GL2D backend intends to support the IO disk
flasher, as I'm really not seeing it as being practical at this point. I might
be able to implement it to draw into the screen buffer, however, but this is
low priority at the moment.

Removed the dead prototype for Z_ZoneHistory which was still hanging around in
z_zone.h.

--------------------------------------------------------------------------------
05/29/11

The SDL OpenGL 2D-in-3D video backend has been largely completed with the 
following changes:

* Finished up all code to bind textures and display the fullscreen quad.

* Kaiser noted that scaling properties are mandatory on GL textures (which seems
  to contradict the official documentation website), which made stuff start 
  appearing on screen.

* ReadScreen was implemented to get the private screen buffer, which allows
  screenshots and screenwipes to work.

* Code to select and instantiate the configured video driver object, or the
  highest-priority supported driver if there is no configuration setting, has
  been added to the HAL.
  
* All use of OpenGL in Eternity is now conditional on the EE_FEATURE_OPENGL
  preprocessor definition.
  
* Code has been added to fully release all resources both in GL and SDL when
  changing resolutions / video modes.
  
Other changes:

* Killed off the ZONE_NATIVE define as it is no longer referenced in the source.

* Removed z_zone.cpp from the VC2008 project.

--------------------------------------------------------------------------------
05/28/11

GL power-of-two texture dimensions are now calculated from the requested screen
mode's width and height, and texture objects are now generated.

--------------------------------------------------------------------------------
05/16/11

I have eliminated all of the code in the low-level SDL sound implementation
which attempts to change sounds to PU_CACHE when they are no longer being used
by any channels, since EE never purges cachables any more anyway unless the
system runs out of memory.

Doing this has allowed me to eliminate one of the critical sections in 
i_sdlsound.cpp by letting the audiospec callback assume responsibility for 
nullifying the data pointer of channels and therefore being the one to make the
decision when it itself has finished using that channel.

This change has finally seemed to alleviate all sound skipping on my machine.
-.-

--------------------------------------------------------------------------------
05/15/11

Began work on fundamental GL utilities such as calculation of proper power-of-2
texture sizes from arbitrary dimensions, drawing of quads, etc. Eliminted the
HALVideoDriver::InitGraphics method, since all it was previously doing was 
input initialization, which is now handled somewhere more appropriate.

The SDL GL2D backend can now cache palettes and built an 8-to-32 lookup table
(using code taken from an earlier implementation of -8in32), sets up the GL
viewport, and initializes an orthogonal projection.

--------------------------------------------------------------------------------
05/10/11

Began implementation of an alternate video backend capable of rendering the game
onto a GL texture and pasting it to the screen on a quad. The SDLGL2DVideoDriver
class also inherits from HALVideoDriver, like SDLVideoDriver before it.

Moved the last remnants of input initialization code from the video module.

--------------------------------------------------------------------------------
05/08/11

Started the process of creating a proper Hardware Abstraction Layer for Eternity
by creating a system-agnostic video driver layer in i_video.cpp and moving SDL-
specific drawing code to a subclass in i_sdlvideo.cpp.

--------------------------------------------------------------------------------
05/05/11

Yet another crashing bug was discovered via the vapordemo launch, and this time
it was a very old bug - dating all the way back to SMMU. fraggle fortunately
replaced the horrible mess that was the BOOM menu system, but when he did so he
inadvertently lost the (sloppy) mechanism which MBF was relying on to make sure
that translucency parameters would be reinitialized when an OPTIONS lump was 
loaded from a WAD.

Here's how it would work:

* The OPTIONS lump would be parsed by the code in m_misc.c.

* If an option was marked as being part of a particular menu page, the config 
  code would call a function from m_menu.c which caused the options on that page
  to do a refresh operation.

* The handler for the page with the translucency options would invoke code in
  r_data.c to recalculate and load the TRANMAP in MBF.
  
O_O

Yeah, this doesn't count in any way as a "fraggle blaming" because the flow of
control in that design was so obtuse that nobody would have noticed they were
breaking something.

Anyway vapordemo caused this 10-year-old-plus bug to suddenly surface simply by
specifying that translucency be enabled by default. Any Eternity users who had
previously disabled translucency would then be operating under an inconsistent
program state which made the game believe that the TRANMAP was loaded when it
was not, resulting in a crash in the renderer in the current column drawer
object's *DrawColumnTR method as soon as anything translucent came into view.

================================================================================
Changes since Eternity Engine v3.40.10
================================================================================
--------------------------------------------------------------------------------
5/02/11

A critical error was caught in the Blue Box 3.40.10 release which necessitated
the immediate release of a patch version to fix it. I had forgotten that the
class name of the PointThinker object representing the center-point of a 
PolyObject that is archived using its serialize method when saving the game 
needed to be manually read out from the save archive when loading it.

When thinkers go through ordinary serialization, they write their own names. But
when they are deserialized, the savegame code reads the name out first so that
it can instantiate an object of the proper type using the ThinkerType factory
idiom. This won't happen automatically anywhere else, and could be considered a
minor design problem with the thinker serialization system.

Of course the savegame code is still scheduled for yet another rewrite so that
it stores a lot of info as text and is more secure, so I may have a chance to
address the problem more fully at that point.

================================================================================
Changes since Eternity Engine v3.40.00
================================================================================
--------------------------------------------------------------------------------
05/01/11

Preparation for a new release is underway. Added a vapordemo utility to the
tools directory which can launch EE using CreateProcess with a specific command
line in order to give a professional interface to the "Blue Box" release.

--------------------------------------------------------------------------------
04/30/11

Added a "hal" folder to hold Eternity's system-agnostic low-level modules, or
what is otherwise known as a Hardware Abstraction Layer. We already use this
approach in i_sound.cpp, and it will soon be extended to i_video.cpp so that
Eternity can have an OpenGL-based 2D-in-3D video backend.

Added EX_ML_BLOCKALL ExtraData flag for linedefs at esselfortium's much-repeated
request. This is similar but not identical to ZDoom's BLOCKEVERYTHING flag, as 
it is lacking several hacks the latter has which allow things to see through 
block-everything linedefs under a set of haphazardly determined circumstances.
No thanks to that, I say.

--------------------------------------------------------------------------------
04/28/11

The videomodes list left over from before EE supported -geom has been removed.

--------------------------------------------------------------------------------
04/22/11

CSonicGo reported that the removal of status bar caching somehow even further
broke low detail mode, so effective as of now, Eternity no longer has support
for this. I have torn out all of the code and salted the earth where it once
stood so that it can never return :P This thing was unfortunately a thorn in my
side almost from day one, as it just kept accumulating more and more weird and
almost unexplainable problems.

CSonicGo also pointed out that GCC's strict standards compliance means you 
can't use unqualified names inherited from an unspecified template parent class.
Use of this-> to access data and method members is required because of a gaping
hole in the C++ standard that causes templates and inheritance to not work 
together properly otherwise. Bleh.

--------------------------------------------------------------------------------
04/17/11

M_ExtractFileBase will now truncate LFNs passed in, to allow the use of demo
files with names > 8 characters in base filename length. This was done to match
the logic earlier adapted in PrBoom+ and just recently in Chocolate Doom.

The PODCollection and Collection classes have been refactored so that they
derive from a common BaseCollection class which implements the portion of their
logic which can be shared. I also repaired a bad double construction problem in
Collection.

--------------------------------------------------------------------------------
04/16/11

Yet another massive round of recursive dependency removal has been undertaken,
but this is starting to seem like a never-ending chore.

I have finally gotten around to removing all caching of the DOOM status bar.
Impact on FPS determined to be infitesimal. In fact the game might even be 
faster.

--------------------------------------------------------------------------------
04/15/11

m_hash had a problem with a static array's declaration in MD5Hash which Visual
C++ ignored but upon which GCC predictably choked.

--------------------------------------------------------------------------------
04/14/11

Fixed some GCC warnings regarding the Thinker class, and fixed more instances of
string constants being assigned to char * members of structures.

Files are no longer mass-dependent on the d_dwfile.h header. This was a left-
over from years ago, back when d_io and d_dwfile were one header.

Also undertook another massive round of removing unnecessary inclusion of
headers through other headers.

Had to remove use of d_namlen in my adjustment to the base directory logic, as
POSIX states this to be an optional field of the dirent structure, and it seems
that GNU libc doesn't support it.

--------------------------------------------------------------------------------
04/13/11

The "wrotesound" hack has been removed from the I_SDLUpdateSoundCB post-mix
callback as it is unnecessary and incorrect to stop running the EQ when no
samples were written during the current mixing pass - this is due to the fact
that the EQ maintains a 3-sample buffer which needs to be pushed out to the
audio stream even if there's no new samples coming in. The chewing of CPU 
earlier observed was apparently due to Pentium IV denormalization problems,
which are now addressed with a "very small addend" factor adapted from the
original 3-band EQ code as found on musicdsp.org.

The d_inline define has been eliminated, since C++ supports "inline" natively.

Gez contributed a patch for mmus2mid.cpp which fixes a long-standing problem
with a message in TNT - Evilution's D_STALKS.

--------------------------------------------------------------------------------
04/12/11

Eternity will now no longer adopt a path as its valid base directory unless that
folder is observed to contain at least the files startup.wad, root.edf, and
a folder named "doom". Entryway apparently had problems in the past with EE
seeing an unrelated directory called "base" in its current working directory
and then refusing to run because it wasn't the real base dir.

Trailing slashes are now stripped from paths in several places before they get
passed to the C stat function, as that function seems incapable of finding a
path if the provided path string ends in a slash of either type.

--------------------------------------------------------------------------------
04/10/11

I moved all the XL parser class methods' code outside of their class definitions
because it was giving me bad Java flashbacks :P

Security improvements have been made to qstring so that if virtually any method
of the class is called which requires the buffer to be allocated, but the buffer
has not been allocated yet, it will go ahead and allocate its own buffer then at
that point.

This allows qstrings to now be used without an explicit intializer method 
being called on them, which is extremely important for supporting their use as
members of classes which only have a default constructor.

I have eliminated the "boolean" typedef in preference for using the native C++
bool type directly, as this allows a lot of #include statements to be eliminated
and also ensures that the bool type gets proper syntax highlighting in IDEs.

SMMU dynamic musicinfo addition has been refactored to match sounds, such that
unknown musics being requested will be added to the hash table on demand if a
corresponding lump can be found in a loaded wadfile. This is in preference to
the old system of scanning for D_ lumps in WAD files when they were added.

Added a findSubStr method to qstring.

Added an audio_buffers setting to system.cfg, as setting this to a higher number
seems to at least partially alleviate some of the sound skipping I am STILL
experiencing.

Support for the $edfoverride keyword has been restored to the new 
XLSndInfoParser class.

--------------------------------------------------------------------------------
04/09/11

I have completed the new state-based parser for Hexen SNDINFO lumps. Volume
clamp checks in the low-level sound code should be RANGECHECK-only, since this
is a condition which should never happen under ordinary circumstances.

NULL-origin sounds will no longer cut each other off unless they are the same
sound. So for instance you can only hear one Cyberdemon MOO at a time, but a
Cyberdemon MOO will not cut off a Boss Brain's wake-up sound. I think this is a
very good balance between compatibility and sanity.

--------------------------------------------------------------------------------
04/08/11

SHA-1 hashes are now computed on the combined header and wad directory of all
wad files that are loaded by Eternity.

Two new command-line parameters have been added to support this:

* -nowadhacks : Disables the application of all wad directory hacks, in case 
  there is an astronomically unlikely SHA-1 hash collision that breaks an 
  unrelated wad file. This would be repaired in the next release after being
  found, of course, by finding an additional way to distinguish the colliding
  WAD files.

* -showhashes : Outputs the wad file's SHA-1 hash to the system console every
  time a WAD file is added. This is for development purposes, since in order to
  add a hack, I do have to be able to see the SHA-1 hash code for the WAD file 
  :P
  
The one and only current wad hack is for Gothic DM 2, and it repairs the 
incorrect position of the FF_START lump in that wad by exchanging it with one of
the patch graphics (the lumpinfo_t's are swapped in the directory). Code for
wad hacks lives in the new w_hacks.cpp module.

--------------------------------------------------------------------------------
04/07/11

w_sound_update_type has been removed as it was no longer used, and I have merged
the three different Add*File methods of the WadDirectory class into one single
method, which reduces the code duplication that was going on there. The logic
does get a bit messy however and could use some revisiting to clean up later.

Added a Collection template class which is similar to PODCollection but can
store non-PODs, as it does placement construction and explicit destructor calls.

In preparation for adding the ability to have SHA-1-based hacks that can be
applied to the directories of certain well-known broken WAD files such as Gothic
DM 2, I rewrote the m_hash module into a series of HashAlgorithm and HashData
classes.

--------------------------------------------------------------------------------
04/04/11

I have added a PODCollection template class derived from ZoneObject which can
store POD objects and intrinsic C++ data types. This acts as a generalized
reallocating array, and efficiency is maximized as it does no unnecessary
constructor or destructor logic on these objects which explicitly do not need
it.

The MobjCollection structure has been refactored into a class and made to 
inherit from PODCollection<Mobj *>. It should be possible to replace almost all
use of reallocating array logic with the PODCollection class eventually.

--------------------------------------------------------------------------------
04/03/11

Added a toLong method to qstring which calls strtol.

MetaObject::toString has been reimplemented, as mentioned earlier, to use the
new getZoneSize and getBlockPtr methods that it inherits from ZoneObject. Used
together, these allow the entire MetaObject to be output as a hex dump instead
of only the parent class data, which isn't interesting at all - just a bunch of
linked list pointers.

The z_zone.cpp module has been permanently disabled with #if 0, and the 
ZONE_NATIVE define is no longer required to compile Eternity.

I eliminated all instances of ENCStringHashKey being accidentally passed into
varargs functions under the incorrect idea that this would invoke their implicit
conversion to const char * - obviously it does not.

--------------------------------------------------------------------------------
04/02/11

All metatable-related classes are now based on ZoneObject instead of defining
their own operator new and delete.

--------------------------------------------------------------------------------
04/01/11

It is now possible to reflect properties of the zone heap memory block into the 
object itself, and as a result there are methods to get the zone block pointer 
(an alternative to using dynamic_cast<void *>), and to return the true allocated
size of the object, which sizeof is not capable of doing (it returns the size of
the immediate type when given a dereferenced pointer - it is not polymorphic).

This latter facility can be used later in the MetaObject class to print out the
full object when doing the default hex dump behavior - currently only the base
class memory gets printed.

I have also fully revamped zone instrumentation so that it does not call
doom_printf but instead is drawn directly to the screen by code in d_main.cpp
using V_FontWriteText and the console font, which gives better formatting.

Bug fixes:
* P_CheckPosition3D shouldn't error out if it gets called during an old Heretic
  demo, which enable 3D object clipping even though the implementation is not
  the same and therefore they're not going to sync anyway ;)
  
* XLParser must return if root->index is equal to -1. This caused an I_Error 
  from W_CacheLumpNum if there were no SNDINFO lumps.

--------------------------------------------------------------------------------
03/31/11

Finally concocted a solution which allows non-POD Eternity classes to utilize 
zone allocation and tags and still have destructors called on them when 
Z_FreeTags is called. The ZoneObject class acts as a polymorphic base class to 
any class that wishes to be allocatable on the zone heap in this manner. 

--------------------------------------------------------------------------------
03/30/11

Started work on a finite-state automaton tokenizer for the XLParser class to use
after Randy Heit pointed out that treating the scripts as line-based wouldn't be
fully compatible, which really, I knew already, but I was being lazy ;)

--------------------------------------------------------------------------------
03/28/11

Rudimentary support for SNDINFO lumps is now complete. The parser is ZDoom
compatible via ignoring anything that isn't currently implemented, which means,
for now, almost everything :P  Currently the $MAP command is recognized but
doesn't do anything, and sounds can be successfully defined and then played back
using e_playsound or ACS.

Major milestone:
Korax is now audible in Hexen!

WORSHIP ME... and I may yet be merciful.

Then again, maybe not.


Linedefs in Hexen shouldn't have started out with their alpha set to 0, though.
This caused all 2S midtextures to mysteriously vanish. The fault for this bug
is the duplication of code between P_LoadLineDefs and P_LoadHexenLineDefs in
p_setup, something that needs to be rectified ASAP...

(Later)
I have extracted all the duplicated code out of the two linedef loader functions
and put it into a new shared routine, P_InitLineDef, which both call after 
parsing their specific map-format-dependent information into the line_t
structure. Yay!

--------------------------------------------------------------------------------
03/26/11

The deferred sound queue, a legacy bit of awfulness created as a workaround to
keep SMMU's implicit wad sounds feature working with EDF, has been removed and
replaced with a vastly simpler system - if S_SfxInfoForName requests a sound
from EDF which does not exist, and the mnemonic passed in matches an existing
DS lump, then it will create the wad sound using E_NewWadSound right there on 
the spot, in an on-demand system.

--------------------------------------------------------------------------------
03/21/11

SDL video centering should not be conditioned on the _WIN32 symbol in i_main,
since this functionality is supported just about everywhere SDL can run, even
including primitive non-windowing "window managers" on Linux which run every
application as a rect pasted to the screen without further adornment.

--------------------------------------------------------------------------------
03/20/11

Started knocking out some of the newest GCC's deprecation warnings with respect
to the assignment of string constants to variables or structure fields of type
char * (vs const char *). Some of these are a real pain in the ass to properly
fix however, as they cause const_cast to be necessitated in a couple of places
where these fields can also point to heap-allocated runtime-defined values. I
want to eliminate those eventually by introducing secondary fields which hold
the runtime value in addition to the normal const char * fields, but this is
very low priority.

Russell Rice discovered the /MP setting of Visual Studio 2008, and it sped up
Eternity compiles by over 50% via making proper use of my Intel Core 2 Quad's
four logical CPUs to do builds in parallel.

P_StartLineScript, which was previously only for Small scripts, can now defer
to running an ACS level script if there is no Small levelscript defined, With
the EE_NO_SMALL_SUPPORT symbol defined, the invocation of ACS through these
line types becomes unconditional.

In addition, the A_StartScript codepointer can now perform an ACS_ExecuteAlways
action if it is passed the new keyword value "acs" for the target virtual 
machine.

--------------------------------------------------------------------------------
03/19/11

By request of essel, ACS can now be loaded for DOOM-format maps by specifying 
the script lump to use for the map in MapInfo, with the new acsscript setting.

I have also implemented four new ACS specials:
* Thing_Projectile
* Thing_ProjectileGravity
* Thing_Activate
* Thing_Deactivate

Winnowing Hall now spews Imp fireballs if you walk up to the place where the
polyobject spinning walls should be ;)

Finally, I fixed an ominous warning from GCC concerning some undefined use of
va_arg in libConfuse which it claimed would cause the program to abort. This
was due to the odd promotion behavior which occurs in variadic functions in C
and C++, and was triggered by C++'s different treatment of enumerations.

--------------------------------------------------------------------------------
03/17/11

Catoptromancy once again comes to the rescue with a fix for EE's autoconf build
system, so it can once again be used by those who prefer it to the newer CMake
script.

--------------------------------------------------------------------------------
03/12/11

I changed the IWAD and resource wad tracking variables into static members of
the WadDirectory class and changed them to track the source IDs corresponding to
those wads instead of exposing their internal FILE handles for no good purpose.

--------------------------------------------------------------------------------
03/09/11

Continuing at last with EE's gradual conversion to a proper C++ architecture, I
have converted the waddir_t structure into a full-blown WadDirectory class, and
have refactored all the code in w_wad.cpp as a result into methods of this
object (excepting the non-"InDir" functions from the original code, which, for
now at least, persist as "convenience" functions for invoking methods of the
wGlobalDir object).

--------------------------------------------------------------------------------
02/14/11

Catoptromancy found a bug (or more of a "logic hole" really) in the low-level
app state maintenance code whereby EE could keep the mouse grabbed while in a
minimized state. Turned out the fix was as simple as adding a call to UpdateGrab
when an SDL_APPACTIVE event is received.

--------------------------------------------------------------------------------
02/09/11

Made an adjustment to the interim behavior of the PIT_StompThing3D function, by
user request, which will stop the ability of non-player objects to telefrag the
player if they occupy the same space during transition through a linked portal.
Players now "win" and will telefrag monsters instead. If two players pass 
through at the same time, *both* players will be telefragged. Hey, you gotta be
fair with this kind of thing! :P

--------------------------------------------------------------------------------
02/02/11

I added a parser for ZDoom-format translation strings to the EDF library module,
although it isn't used anywhere yet.

--------------------------------------------------------------------------------
01/29/11

Failure to write the configuration file should not be a reason to call 
I_FatalError; instead a message is now output to the console and the function
returns. This keeps Eternity from issuing an interesting error message about
terminating in an "abnormal fashion" for something so mundane as not having
write permissions to a directory.

I also had to restore some translucency checks that I removed earlier when 
adding linedef alpha support which were causing a crash for essel.

--------------------------------------------------------------------------------
01/22/11

Undertook a couple rounds of attempted optimizations, aimed mostly at trying to
improve cache performance, which is known to be the primary bottleneck inside
the renderer, to the point that NO change made to R_DrawMasked can affect the
framerate in any positive manner except by improving cache performance (or in
other words, the engine is completely cache-bound):

1. All redundant and unused fields were eliminated from core rendering structs
   including vissprite_t, drawseg_t, and seg_t. This rendered an average 2 FPS
   improvement in Sunder MAP12.
   
2. Tweaked all Visual Studio 2008 project settings toward maximum optimization,
   including the following amongst others I am probably forgetting:
   
   * Inline wherever compiler judges best practice
   * Prefer speed over accuracy for floating-point math
   * Enable compiler intrinsic functions
   * Whole program optimization / LTCG
   * Omit frame pointers
   * And most importantly, use SSE2 instructions.
   
   Altogether these optimizations render an average 10 FPS improvement in Sunder
   MAP12 on top of the 2 already gained from the tweaks forslightly improved 
   cache performance. Note that this means however that VC2008 builds of EE
   will no longer run on CPUs prior to the Pentium IV, however. I have since
   verified with IDA Pro that the SSE2 opcodes are used pervasively in the
   binary code, and apparently to great effect.

--------------------------------------------------------------------------------
01/20/11

I added a new P_LastEnemyRoar routine which gets called, outside old demo comp 
and if the option is set, whenever a monster changes targets due to BOOM's
lastenemy feature (the one controlled by option monsters_remember). It has 
always bothered me that this change removed the roars you would get every time
a monster finished off its current target and then became angry at something
else. These were often useful for guaging the progress of infighting in distant
areas of the map involving boss characters, such as the Cyberdemon - MOOOO!

I also finally got around to adding a proper Visual Studio 2005 project for
Eternity. Our main build is with 2008, but 2005 should be useful for maintaining
Windows 9x support for as long as it remains practical.

Started fixing the old automake script to work with the new C++ codebase as well
but this is unfinished and untested.

--------------------------------------------------------------------------------
01/18/11

essel noticed that I had inadvertently nerfed the edf-intername MapInfo option
back while working on MapInfo prototypes and changed the name of the command to
edf_intername.

--------------------------------------------------------------------------------
01/17/11

Adjustments made to FindIWADFile for the previous release left a situation where
a NULL pointer could be dereferenced. Really this function is a mess and should
probably be rewritten to use a qstring or a PU_AUTO string buffer instead of
malloc'ing and freeing strings over and over. But that's for later I guess.

DOOMWADPATH should only use ';' as the path separator on Windows, because ';' is
a valid filepath character on POSIX systems apparently. On those, ':' is the 
expected delimiter.

Additionally, upon user request, I coded a function called M_CheckMultiParm that
can check for an aliased command line parameter, and then used it to allow
-play and -recorddemo aliases to the -playdemo and -record commands, since their
syntax has historically been inconsistent.

--------------------------------------------------------------------------------
01/16/11

-vanilla was semi-broken due to the fact that G_SetOldDemoOptions needed to be
invoked *before* the call to G_InitNewNum. Otherwise it would setup the level
under current-version behavior, and the RNG would usually be totally off. I was
probably just extremely lucky back when I tested -vanilla initially. I also
noticed that the "basename" variable was starting out uninitialized in the
G_DoPlayDemo function.

--------------------------------------------------------------------------------
01/15/11

SoM fixed a bug which caused 1S linedefs to not generate portal overlay planes.
This was bugging essel in one of his vapormaps.

--------------------------------------------------------------------------------
01/13/11

Small scripting (deprecated though it may be) was entirely non-functional in the
old startmap due to my having moved GS_LEVEL set below the call to 
SM_LoadLevelScript.  Chasecam initialization should also not be done before
GS_LEVEL set.

--------------------------------------------------------------------------------
01/12/11

Finished support for heredoc-format sound sequences in EDF. This will also make
it dead simple later to pass in Hexen SNDSEQ entries and have them parsed by the
same code.

I have also, while working on sound sequences, added the ability to set a 
property on the sequence which will play ALL non-volume-specifying commands at
a randomized volume, which properly matches the behavior of the vanilla Heretic
executable with its built-in ambient sequences. Also followed up on a really
old idea of mine to have a volume scaling ability for global ambient sound
sequences, which is now controlled via the s_enviro_volume cvar. One reason this
is needed badly is because the sequences seem too quiet if played at vanilla-
compatible volume levels over the blaring Windows native MIDI synth instead of
the demure serenity that was Heretic's music rendered in OPL.

--------------------------------------------------------------------------------
01/10/11

I started work on a long-planned ability to specify EDF sound sequences in an
alternate heredoc-based format which matches the way they're defined in Hexen
exactly, aside from the "end" command still not being required since it can be
implicitly added at the known end of the sequence.

--------------------------------------------------------------------------------
01/09/11

SoM was able to figure out the problems that plagued portal overlays in the
previous release version.

I had to remove the I_FatalError calls from the default quad flush handler
functions, as EE actually calls them for some reason now, without any apparent
ill effects.

================================================================================
Changes since Eternity Engine v3.39.20
================================================================================
--------------------------------------------------------------------------------
01/08/11

Merged cpp-branch into trunk for 10th anniversary release. Eternity is now 
officially a C++ port, and the most compatible one in existence :)

See cpp-branch-changes.txt for information on changes that took place during
the branch development process.

--------------------------------------------------------------------------------
12/23/10

Removed a bizarre and incorrect toggle-on of the comp_zombie variable for demo
versions 200 through 202 which was either adapted blindly - or incorrectly -
from an early PrBoom version many years ago, and prevented all suicide and death
exits from functioning during -complevel 9 demo playback. 

This allows 30sdx2556.lmp to sync up until MAP11, at which point the player 
takes a sudden dive into a nukage river and then dies near some blue key bars 
after hurting himself with a rocket. I am told an Arch-vile jump is supposed to 
take place at the point where he falls into the river, so we probably have some
enemy behavior or clipping engine differences yet to be accounted for.

--------------------------------------------------------------------------------
11/20/10

Due to continuing and probably only worse-in-the-future issues with the C99
standard's refusal to provide ANY mechanism for structured type punning, 
something that Eternity had come to rely heavily upon to allow object-oriented
techniques to be applied in C, we have made the decision to move to C++.

This effort has begun with a new cpp-branch. Development on that branch will be
logged to a separate changelog file on that branch, which will eventually be
merged back into trunk once it is sufficiently stable.

--------------------------------------------------------------------------------
11/11/10

Again by request I've added an alpha field and ADDITIVE extflag value for
ExtraData linedefs, which enable use of flex translucency and additive blending
with lines. This has been technologically possible for years but I never got
around to adding a good way to access it, partly for lack of ideas.

--------------------------------------------------------------------------------
11/08/10

We have merged portal-clip branch into EE prematurely in order to pull in 
support for portaly overlays.

--------------------------------------------------------------------------------
11/06/10

Invalid subsector references will now be cleansed from the BSP tree, in order to
prevent access violations that will otherwise occur. This stops the long-noted
segmentation violation/venetian blinds crash in DEEPCRE.WAD's E1M1, which has an
invalid BSP tree in only one subsector, which consists of a single seg making
up a door track (glitchy node builder I suppose, probably didn't properly handle
degenerate subsectors).

Fixed a control path not returning a value in stopchan, which I recently rewrote
to help stop sound stuttering.

--------------------------------------------------------------------------------
11/05/10

Essel also found Cardboard glitches with respect to splitting visplanes and
drawing of segs across which the only differences were the angles of flats.
Somehow these checks got left out.

EE has hit r1337!

Added support for an MF4_BRIGHT flag by request. This flag can turn an object
fullbright on all of its frames without requiring the entire set of frames to
be manually altered to use the "bright" flag.

--------------------------------------------------------------------------------
10/31/10

Happy Halloween! Level-error-related console error messages have been improved
to include the numbers/indices of offending structures in the map in most cases.

I removed dependency on host ability to perform unaligned reads from the
GetLevelWord/DWord routines for additional portability.

I was getting severe stuttering in the sound engine and I suspected that it 
might be related to the recent d_fastrefresh tweak - possibly the main thread 
running in such a tight fast loop is pre-empting the sound update thread too 
often.

I moved reclamation of stopped sound channels, which can block the sound update
loop explicitly, out of the main loop and into I_StartSound, so that sound
channels are reclaimed when they are actually needed, and not constantly polled
for having been stopped. It seems to have stopped the stuttering.

esselfortium's ExtraData test map also uncovered a bug with skies and colormaps
which caused the last sector drawn's colormap to apply to all skies.

--------------------------------------------------------------------------------
10/25/10

An ugly bug surfaced today - when I rewrote cvars to support defaults properly,
I forgot that ct_constant cvars have value pointers. This was causing an access
violation if you tried to display the value of any constant, such as ver_name,
ver_date, or creator.

--------------------------------------------------------------------------------
10/24/10

Adjusted some ExtraData keywords for readability. Added proper support for 
multiple-level PWADs to the Master Levels / managed wad directory system, so 
that TEETH.WAD is now fully playable. Along with this tweak I added an optional
parameter to the w_startlevel command that allows starting a specific map from
a managed wad directory. So for example one can use the console command 

$ "w_startlevel teeth.wad MAP31"

and proceed directly to the secret level. The file named has to be in the 
directory currently enumerated by the Master Levels directory setting, of
course. Perhaps in the future Eternity can maintain additional enumerated
directories?

--------------------------------------------------------------------------------
10/19/10

Some problems with inputting blank values into the menu system that have existed
since the SMMU rewrite of the mess in MBF were resolved by adding a 
cf_allowblank console variable flag. Variables with that flag receive special
treatment in the menu system.

You can now escape or backspace out of the Master Levels menu after finishing a
level, and you will return to the title screen.

File paths are now displayed in the menu using "smart" truncation. While viewing
the item, the right-hand side of the string will be truncated to a fixed margin
and a ... will be appended. While editing the string, the input caret will not
pass beyond the same margin, and instead, the displayed portion of the string is
ran forward, and the left side is truncated with an ellipsis. This keeps your
typing in view no matter how long the string is.

--------------------------------------------------------------------------------
10/17/10

ExtraData sectors have now been completed with addition of support for 
overriding the TerrainTypes of a sector on a per-surface basis. I also repaired
a long-standing bug in the routine used to retrieve a terrain given an mobj_t
which considered only the thing's subsector, and not the floor it was standing
on. Because of the need for a demo comp check for this, I have bumped up the
version to 3.39.21. I also created some new macros, maek_full_version and
full_demo_version, that resolve long-standing problems with being able to 
easily compare demo versions down to the subversion level (not to be confused
with Subversion, as we do not track SVN revisions in the source currently).

--------------------------------------------------------------------------------
10/12/10

I decided to break up the various p_?enemy modules into smaller a_ modules that
contain various types of codepointers, some by game, and others by specific
ranges of functionality. The breakdown is as follows:

* a_counters.c - contains Eternity 'counter assembly' pointers
* a_common.c   - contains basic pointers shared by all games like A_Chase
* a_decorate.c - contains ZDoom-inspired, DECORATE-compatible pointers
* a_doom.c     - DOOM gamecode
* a_general.c  - Eternity generalized/parameterized pointers
* a_heretic.c  - Heretic gamecode
* a_hexen.c    - Hexen gamecode (very tenative; do not use!!!)

Yagisan has completely revamped the CMake system so that it is operational with
his automated compiler farm. This has extended support to some additional
platforms and brought in some additional warning and error fixes.

--------------------------------------------------------------------------------
10/11/10

Finally got back around to work on ExtraData sectors, possibly one of the most
put-off-after-being-started features in Eternity's history. I can't even 
remember when I started writing the code for these, but more and more things
just kept getting in the way. esselfortium needs flat offsets and rotation for
his uber-detailed slopes, though, and doesn't want to wait for UDMF to start
using them, so I'm pushing it through.

Started off by getting the parsing of sector flag fields functional, and loading
up offsets and floor/ceiling angles into the mapsectorext_t structure, which is
right where I left off before. I have also written a routine which will reverse
the angles into a clockwise orientation, in order to match ZDoom, which for
some reason I simply don't understand, considers flat rotation angles in the
opposite direction of DOOM's natural 3D coordinate system... so don't blame me.
I figured it would cause the least headaches in the future with UDMF 
interoperability if I chose to do it the same way in ExtraData.

================================================================================
EOF
================================================================================