================================================================================ Changes since Eternity Engine v3.40.25 ================================================================================ -------------------------------------------------------------------------------- 10/31/12 With addition of support for WAD files embedded in ZIPs, zip support in Eternity is effectively 100% complete, and initial testing has turned up no issues so far. I am prepping for Alfheim release, and aiming for a November 3rd release date. -------------------------------------------------------------------------------- 10/29/12 ZIP support is now largely complete; the only major missing feature versus ZDoom is support for embedded WAD files, and that should be upcoming shortly in the next couple of days since Eternity already has support for memory lumps inside its WadDirectory VFS. Following up on more trouble with STL trying to use _Debug_message in Visual C++, I determined that some old tweaks SoM made to the project back when we still compiled with Visual C++ 6.0 had persisted into the VC2008 project, and were the cause of this trouble. Removing msvcrt.lib from explicit dependencies, and re-enabling the option to use "Default Libraries", took care of this problem. Eternity now uses the debug CRT when built in DEBUG mode and does not experience any issues in linking with STL and other std-namespace templates (our use of it is still extremely limited and will remain so for the foreseeable future, but there are a couple of places it has proven useful, such as the use of in p_chase.cpp to sort collections of vertices). disk_icon now defaults to off, due to the continued severe problems it causes on MacOS X, likely due to a glitch in SDL on that platform. InBuffer has been rewritten to drop the concept of using an input buffer, as my algorithm has turned out to only work when no more is read from the file than is actually available to read - otherwise it breaks down into an infinite loop. I can't see the difficulty in crafting a proper input buffering mechanism as being worth the very small advantage, if ANY, that it provides on top of OS IO buffers and any buffering that is already implemented inside the C stdio library. -------------------------------------------------------------------------------- 10/28/12 Applied printz's patch for enhanced MacOS X support, including his GUI-based integrated frontend. -------------------------------------------------------------------------------- 10/22/12 - 10/27/12 I have taken a short break from work on js-branch to introduce support for .ZIP files as a first-class supported data archive format, matching support in ZDoom. Eternity's recommended extension for such files intended as Eternity-specific modifications is .pke - use of .pk3 is heavily disrecommended due to potential for confusion with both Quake 3 and ZDoom modifications. Any extension is supported, however. When using -file, and not specifying an extension, .pke, .pk3, and .zip will be tried, in that order, after trying .wad first. -------------------------------------------------------------------------------- 10/12/12 Trunk work is a bit more scarce right now due to ongoing work on the Aeon branches - js-branch and python-branch. I somehow left the string "UNMODKEY" in part of e_hash.h in a method that is currently not used. Because Visual C++ pre-emptively discards unused portions of templates without even testing them for syntax errors, this flew under the radar until somebody tried to compile it in GCC. GCC is always the savior when it comes to this kind of error, since it parses templates whether they are used or not. -------------------------------------------------------------------------------- 09/30/12 Added an AutoPalette class which loads the PLAYPAL lump at initialization, and sets the lump to PU_CACHE when it is destroyed. This replaces repeated code at multiple points in the game engine to temporarily load the PLAYPAL lump, with the need to call Z_ChangeTag(PU_CACHE) at every single return point. Added VPNGImage::readFromLump, and introduced support into EDF linear fonts for PNG-format resources. Support is now complete in EDF Alfheim dialect for section title properties, which are a form of multi-valued property which anonymously follows a named section's title, with a colon between the two, as such: thingtype Foo : Bar, 10010, -1 { ... } By utilizing this feature on thingtypes, it is now possible to specify, in fixed order, the inherited thingtype, the DoomEd number, and the DeHackEd number. As with all mvprops, fields can be left off at the end, but not in the middle. If the thingtype does not inherit, but you need to specify a DoomEd number, use "Mobj" as the inherited type name - this is a generic standin which means that the thingtype does not really inherit from anything. -------------------------------------------------------------------------------- 09/24/12 With some help from essel, I've extracted the "mid" font that is used on DOOM CREDIT screens and added it to eternity.wad and fonts.edf, with some custom-made translations on top of the ones that were already available from the CREDIT resources. It is available for editor use in DOOM and DOOM II gamemodes. -------------------------------------------------------------------------------- 09/23/12 I used some invalid PNGs to test the fail-proofness of Eternity's PNG code as well as to verify that the concept of throwing a C++ exception through libpng to unwind the stack, in preference to its intended method of using longjmp, works as expected. Added WadDirectory::cacheLumpAuto, which loads a given lump into a ZAutoBuffer object rather than the wad directory cache. Added V_WritePNG, and V_WritePatchAsPNG. These support a new v_dumppatch command, which can be used to extract patch-format resources as .PNG files from within Eternity. esselfortium suggested that this is a sign that Eternity is becoming "SladEE" :P -------------------------------------------------------------------------------- 09/22/12 Massive changes: * Completed in_stats module. Scores for levels can be viewed using the new mapscores console command, and it can be queried multiple ways, using the map name and wad filename to determine what map you want to see scores for if you're not interested in the one that you're currently playing. As part of this, I added platform flag values to i_platform in the HAL; the only current one controls whether or not file paths are treated as being case sensitive on the current platform, for where this decision must be made at runtime. The exitlevel console command will also now mark all players in the game as "cheaters", simply so that the stats module will not record statistics. * Menu changes: + Titles and info items now have their color appropriately determined at runtime by fields stored in GameModeInfo, rather than being baked into menuitem strings at compile-time. + Fullscreen widgets now have wings drawn for them by the menu code, since D_drawWings is unable to make the decision on whether to draw them or not in time for it to apply uniformly. As a result, D_DrawPillars was split out of D_drawWings as a globally available subroutine in d_main. + Skin drawer title is now properly colorized and shadowed. As a result, shadowed text can now also be color remapped. * Added a ZAutoBuffer class, which grants a zone-allocated memory buffer a stack-based lifetime, for automatic release at the end of the scope. Already adapted some code in v_png to use it, and I expect to slowly convert other places where multiple efree() calls are made at different return points to use this instead. * Added WadDirectory::writeLump method, and a w_writelump console command which can be used to dump any lump in the wad directory to file, without any conversions applied. -------------------------------------------------------------------------------- 09/20/12 I have finally gotten around to rewriting the BOOM HUD code from SMMU, chiefly needed to avoid undefined sprintf behavior and to improve security of the code. It now uses qstring throughout instead of stack string buffers. Taking advantage of the custom color translation capability for fonts, I added a dark gray custom translation for the BOOM HUD font and modified the HUD to use this color for weapons which are completely out of ammo (as determined by the ammo-per-shot value), largely matching the behavior added to PrBoom-Plus. -------------------------------------------------------------------------------- 09/19/12 cfg_parse_internal has finally been dissolved into a series of state handler routines and a table of function pointers to them indexed by state number, matching the majority of Eternity's other finite state machine parsers. -------------------------------------------------------------------------------- 09/18/12 Up to four custom color translations, above and beyond the ten built-in colors as determined by the BOOM team, can now be specified on each EDF font. If not specified, these translations default to identity translations, and they do not have any corresponding lumps in eternity.wad. EDF string syntax has been extended in two critical manners: * \x is now supported for specification of hexadecimal character constants, as such: "\x89" - this is an alternative method of specifying embedded color and text property control characters. * Adjacent string literals - "Hello, " "world!" - will now be coalesced into a single token by the tokenizer, as in high-level languages like C++. EDF also now supports the notion of a language dialect, and the active dialect may be manipulated within EDF via use of the setdialect() function. Values accepted by this function currently include: * "DELTA" - this indicates the original EDF dialect, including backward compatibility to v3.31 and any extensions made since then until now. * "ALFHEIM - In Alfheim or higher dialect, colons - ':' - are now special characters, supported as an alternative CSS/JSON style of assignment operator, as well as in other special contexts. -------------------------------------------------------------------------------- 09/16/12 - 09/17/12 Loading and saving of player scores to and from a CSV file is now functional. qstring has been enhanced with short string optimization. Strings shorter than 16 characters will be stored in a local array instead of in a heap allocation, drastically reducing the number of small fragmentary heap allocations, particularly during EDF parsing. There is a trade-off however, as the logic in qstring is not compatible with the typical implementation pattern of SSO which abuses unions (in ways I will note are standards violations, too). qstring is a larger type and therefore fewer of them will fit into cache. However, since we NEVER EVER pass qstrings by value (under penalty of death!), I am hoping this proves to be insignificant. In another improvement made to reduce string allocations, MetaObject keys are now interned. Taken in combination with new changes made to EHashTable to support passing in of cached unmodulated keys (ie. the result of the hash function call but not taken modulus the table size yet), it is now possible to cache MetaObject property hash lookups, making resolution of properties much faster. MetaKeyIndex is a new class provided for the purpose of caching the hashed value of a MetaObject key. Adapted change of RUNTIME_CLASS macro into RTTI from the currently defunct inventory-branch (which WILL be rehabilitated eventually, pending some changes which are now ongoing). RTTIObject now contains static methods which forward to RTTIObject::Type for resolution of type names. These are strictly for convenience, as they require fewer scoping operators to access. Damage factors now use fixed_t instead of float, in order to prevent any introduction of floating-point platform-specific non-repeatability, which would fragment demo sync. -------------------------------------------------------------------------------- 09/09/12 esselfortium has provided significant improvements to several of the big font experimental color translations. The BOOM HUD font now has translations in Heretic as well, making the BOOM HUD functional (however inappropriate it may be, thematically speaking) within that game. Added emalloctag to match ecalloctag. The ability to have braceless lists in EDF has been readapted and fixed from the currently defunct inventory-branch, where it is currently implemented but apparently broken. Added an @identity keyword for font translations - when this is used as a value, an identity translation will be generated for that particular color slot. The identity translation is a monotonically increasing table of numbers from 0 to 255, which has no effect when applied as a translation. Added a new EDF util function, E_CfgListToCommaString. It collapses a cfg_list option into a comma-separated value string, with the options in list order. fraggle's head, as displayed by the 'r0x0rz delux0rz' easter egg, is now stored as a lump in eternity.wad instead of being embedded inside the executable. At request of Kate, I have recolored the level title text on the intermission screen when in Master Levels mode in order to provide better contrast - it is now gold instead of gray. Additional work has been carried out on the statistics/high scores module. -------------------------------------------------------------------------------- 09/08/12 Most calls to qstring::initCreate have been eliminated, since they became unnecessary when checkBuffer() and proper C++ RAII were added to the class. This has just been legacy code, a hold-over from the C codebase. I have extended the mn_testfont command to accept an optional string as well as a font name, so all characters of a font can be exercised by providing different test messages. -------------------------------------------------------------------------------- 09/07/12 Utilities have been added which determine what colors in the palette are used by a particular patch, and, via repeated application of the former, determine all of the colors used by the patches within a font. The new v_fontcolors command takes a font name and an output file name and will dump the list of used colors in the named font to that file. This is exceptionally useful for creation of hand-tweaked color translations. mn_testfont is also provided, which takes a font name and displays a test string in that font in each supported translation, in the form of a menu widget. Experimental translations have been added for the DOOM big font, now that support for colors can be extended to such fonts. -------------------------------------------------------------------------------- 09/06/12 EDF fonts are now capable of overriding font color properties, including the default color of a font, and of providing a partial or complete set of translation tables which apply only to that font. Translations can be supplied either within EDF in the form of ZDoom translation language strings, or via lump names within the T_START/T_END namespace. -------------------------------------------------------------------------------- 09/05/12 Since rendering of text to VBuffers has been possible for a while now, I have restored the functioning of fraggle's console easter egg to its behavior in SMMU, where it drew text in the HUD font directly onto the console background buffer (it did this in SMMU by hacking the screens array temporarily, an idiom which has not been applicable in Eternity for several years now). -------------------------------------------------------------------------------- 09/04/12 In order to more fluidly deal with some issues raised by the addition of automatic conversion and substitution of patches in the prior revision, I have revised WadDirectory to allow multiple caches per lump, each one other than the default being for purposes of storing conversions to a specific format. Right now the only such alternate cache is for conversion to patch_t format. -------------------------------------------------------------------------------- 09/03/12 All patches are now format-verified at load time. If they are found to be incorrect, the engine will check to see if they are actually .PNG files, and if so, they'll be loaded and converted into patches just-in-time. If this check fails, the patch lump will be permanently replaced by a copy of the default patch used for missing resources. For support of the above, I added code to VPNGImage to convert PNGs to patches. Significant changes were also required to the WadLumpLoader class hierarchy as a result of the above. Began work on a module which can track top score statistics for any levels, IWAD or PWAD. When a question widget pops up over a fullscreen widget, it needs to be treated as a fullscreen widget - this adjustment is made on the fly when pushing the question widget onto the widget stack. When the advanced filebox widget asks a question of the user, a sound will now be made matching the rest of the menu system. Made the widget stack static to mn_engin.cpp. Directories must be added to the list of source file names in WadDirectory or the Collection indices get out of sync with source IDs. -------------------------------------------------------------------------------- 09/02/12 Doing some cleanup work on Master Levels enhancements, a new V_FontFitTextToRect routine is available which can wrap text against a hard right boundary and clip it to a specified height. This ought to really come in handy later for Strife, as my implementation of it has learned from all of Rogue's mistakes and is both more efficient and significantly less buggy. Another Midgard regression was identified whereby the fade-out from a level to the intermission would slam up the intermission background and then do the fade, which looked very weird. This was a result of removing intermission background caching but failing to remove Lee's calls to WI_DrawBackground that were made outside of the drawing loop during intermission initialization. Version has been bumped to 3.40.27, and the next release name has been decided upon as "Alfheim", another of the worlds of Norse cosmology - the home of the elves, fairy folk, and other mystical beings of light. Collection now supports setting a prototype object of type T which can be used to invoke copy constructors when adding objects to the collection. This allows introduction of add() and addNew() methods matching PODCollection, but without introducing the requirement of possession of a default unparameterized constructor by type T, which I find undesirable as many of our non-POD types already don't have such a constructor. More methods in w_levels.cpp have been moved into the ManagedDirectory class because they access parts of it which should be encapsulated. A lookup of loaded wad filenames by wad directory source ID is now kept by WadDirectory. -------------------------------------------------------------------------------- 09/01/12 manageddir_t has been converted into a proper subclass of WadDirectory, and no longer allocates WadDirectory instances without properly constructing them as a result (I figure this was only working so long as WadDirectory did not have any virtual methods in it, nor contain any other non-POD objects). As a result of that change, WadDirectory has also been made a descendant of ZoneObject, so as to allow instrumented and tagged usage of operator new for managed directories. Continuing on this line of work, I also added a pImpl class for WadDirectory and used it to contain a reimplementation of the infoptrs reallocating array using PODCollection. -------------------------------------------------------------------------------- 08/31/12 Applied some long-planned enhancements to native Master Levels support: * An INTRMLEV lump is provided which displays the DOOM II intermission bg recolored to white and gray, matching somewhat the pencil sketch look of the Master Levels box art. * Appropriate level names will now be displayed in the intermission, provided the text files were available for load. * The Master Levels selection menu will prompt before exiting the menus. This required modification of the menu widget system to function on a proper stack of widgets rather than only being able to have one active widget tracked at a time. -------------------------------------------------------------------------------- 08/29/12 Some users found trouble compiling Eternity in debug mode, as it would complain that _Debug_message was not found. MSDN seems to indicate this is a result of not linking with the msvcrtd library, and that you should define _HAS_ITERATOR_DEBUGGING to 0 in order to avoid this. I am a bit confused, as I thought that EE did link with the debug CRT now... needs more investigation. -------------------------------------------------------------------------------- 08/28/12 Frustrated with lack of a + operator in qstring (which is by design, for reasons of efficiency - we do not pass qstrings by value, ever), I devised an alternative which avoids the problem - operator << is now supported with overloads for most basic types and for qstring instances, allowing streamed insertion. Since most qstring methods return qstring &, they can also be used within the streams. Another Midgard glitch was detected on Linux, where there is apparently greater susceptibility under GCC to mismatches between runtime and compiled floating point values (which is always a possibility everywhere). 4.0/3.0 as compiled was not comparing equal to or less than 4.0/3.0 as computed at runtime, resulting in misapplication of widescreen semantics and a crash in D_drawWings. -------------------------------------------------------------------------------- 08/27/12 Almost predictably, a heap corruption problem was identified immediately after Midgard launch by Gez and several others. The length calculation of the malloc for basepath has always been one character too small (no room for \0 left), so this was writing one byte past the end of the block. If the block was padded out enough, this remained undetectable. Fixed by rewriting the code in question to use qstring, to achieve secure file path concatenation as used in the majority of Eternity's code. ================================================================================ Changes since Eternity Engine v3.40.20 ================================================================================ -------------------------------------------------------------------------------- 08/26/12 Final code changes in prep for 3.40.25 'Midgard' release: * HUD messages will now be centered in all games if the game is running in a widescreen video mode. This just looks better. * The Master Levels runtime loader is now finally available from the WAD options menu. * A new page has been added to the video options menu to support configuration of the HAL video driver, software screen surface bitdepth, and OpenGL backend options. -------------------------------------------------------------------------------- 08/19/12 With Small removed, the start map has been disabled again until such time it is replaced with a better map possibly using ACS and/or Aeon. DavidPH and esselfortium have been added to the in-game credits screen. -------------------------------------------------------------------------------- 08/18/12 ConSiGno found a bug in the use of CAM_CheckSight for monsters which had them looking for the player out of their feet. If they had a ledge in front of them, you'd be invisible because of this. Fixed by making the same height adjustments used in the normal line-of-sight code - this was a consequence of the code originally being designed to handle point cameras only :P Spring cleaning is underway: * Small is gone for good; I have removed the AMX modules and much of the engine interface code, with the exception of natives and other code segments which may later be adapted to work with the Aeon API instead. * Deleted dead files from the EE project space: d_dialog, z_zone.cpp, old build directories for DJGPP and MinGW, DJGPP DOS code, etc. * Finally got rid of the dead and unsupportable Visual Studio 6 project files. * Killed off all extinct #define values in the VC2008 project. -------------------------------------------------------------------------------- 08/12/12 I eliminated the D_DoomExeName function; everywhere it was previously invoked is now hardcoded to use "eternity" or a portion of it such as eter/etern. Code in d_diskfile now uses estructalloc where appropriate, and static_cast is used in preference to C-style casts. After previous discussion with DavidPH, we have merged acs-branch back to trunk, as it is more or less complete at this point. Any additional follow-up work will be completed on trunk, unless it becomes major enough to warrant a new branch, naturally. -------------------------------------------------------------------------------- 08/11/12 With CAM_CheckSight finished, I was able to employ it in its originally envisioned role to enhance the followcam mode of the SMMU-inherited "cool demo" feature. The followcam will now be spawned at the furthest-away vertex in the player's sector that is within 256 units of the player and from which the player is visible, courtesy of CAM_CheckSight. In addition, the view will cancel once the player moves out of sight of the followcam. It will also pitch up and down to look at the player when a significant vertical height difference exists. Other small changes made included changing some annoying instances of pointers used for pass by reference in the automap into actual C++ references, resulting in much cleaner syntax within those functions. -------------------------------------------------------------------------------- 08/07/12 I have finally finished up CAM_CheckSight, the fast, re-entrant, and side effect free variant of P_CheckSight, based on the original Doom 1.2 tracer-like algorithm for which source is available through Heretic and Hexen. Adjustments required to finish it off included the following: * Support for polyobjects * Support for deep water blocking sight across the water boundary * Tracking of touched lines and polyobjects without changing validcount (which would constitute a potential side effect on the playsim). CAM_CheckSight is now unconditionally called down to by P_CheckSight if demo version is >= 3.40.24. If this is found to create any real compatibility issues, it may need a comp var, but I'd rather avoid it frankly. -------------------------------------------------------------------------------- 07/19/12 I have added support for editing of limited properties of the GameModeInfo structure and its subordinate mission info structure in EDF in the form of the gameproperties block. Each gameproperties block is treated like a delta and is applied over the native defaults in order of definition. -------------------------------------------------------------------------------- 07/18/12 In order to, by numerous requests, be more like other ports and fill in the wings of the 4:3 status bar with the small-screen-size border instead of a simple black rect, I have rewritten portions of R_ExecuteSetViewSize and added a new R_VideoEraseScaled function. Amongst other things, this allows the Heretic status bar to look at least half decent in 4:3 over widescreen. I also corrected a problem found by DavidPH where screenmodes with *either* width or height, but not both, less than 640 and 400 respectively, would be treated as if they were legacy 16:10-in-4:3 modes. The keybinding widget had been missed and was still drawing text in widescreen, over a text box drawn in 4:3 (found by CSonicGo). -------------------------------------------------------------------------------- 07/15/12 Support has finally been added for the long-planned correction of screen patches to draw in 4:3 aspect ratio while the game is running in widescreen modes via creation of a sub-VBuffer which is attached to the vbscreen, sharing its pixel data but with a smaller width and an offset such that it draws the smaller 4:3 screen centered over the 16:10, 16:9, etc framebuffer. -------------------------------------------------------------------------------- 06/24/12 The SMMU walkcam now has the ability to fly. Pressing fly up while in walkcam mode will put the camera in flying mode. It is bound to 4 units above the floor and 8 units below the ceiling while flying. It always pitch flies also, regardless of the value of p_pitchedflight. -------------------------------------------------------------------------------- 06/21/12 I have reformatted the automap models in am_map while thinking again about how they might be generalized and supported through EDF. I have applied some minor tweaks to the sound engine to address some things I have heard come up on occasion that seem like bugs. -------------------------------------------------------------------------------- 06/16/12 Due to continuing problems and the possibility of an upcoming release, I have been forced reluctantly to revert Ladna's new keybinding system. In order for him to possibly continue work on it in the future, I have split it off first into a new branch, kb-branch. -------------------------------------------------------------------------------- 06/15/12 I have rewritten E_GetJumpInfo and made it global, allowing DavidPH to use it on acs-branch for implementing ACS state sets. This means that Eternity will support idioms such as setting state to ThingType::StateLabel constructs within ACS. -------------------------------------------------------------------------------- 06/10/12 I have changed emalloc back to using Z_Malloc instead of Z_Calloc, chiefly at DavidPH's request. -------------------------------------------------------------------------------- 06/09/12 As an ultimate solution to the problems raised by addition of a default patch taking the place of missing screen patches, I have defined a new zone memory tag, PU_PERMANENT. Memory given this tag can be passed to Z_Free or Z_ChangeTag, but neither function will be allowed to mutate such a zone block; they will silently return instead. This means it is possible to allocate zone memory which can be invisibly immutable, which is precisely what is needed for the default screen patch. -------------------------------------------------------------------------------- 06/07/12 DavidPH added optional pitched flight mechanics, where looking up or down while flying will cause the player to fly in the direction he/she is looking. This is strictly optional because it is not authentic to the Raven play mechanics, and disrupts the ability I much treasure to "rain down retribution from above with utter impunity" that the Wings of Wrath otherwise grant by letting you fly level while looking downward. -------------------------------------------------------------------------------- 06/06/12 Added a fly console command, which acts like a powerup cheat by giving the player pw_flight. Added keybinding actions for flying up, down, and dropping to the ground ("flight center"). Flight actions are now recorded and played back in demos and are transmitted between nodes during netplay. DavidPH, who now has direct SVN access as an official member of Team Eternity, fixed some issues in saving of ACSArray values. -------------------------------------------------------------------------------- 06/05/12 I have started work on support for player flight, compatible with Heretic and Hexen's gameplay mechanics. -------------------------------------------------------------------------------- 06/04/12 DavidPH added support for ACS arrays. -------------------------------------------------------------------------------- 06/03/12 Applied one more patch from DavidPH, this one adding preliminary work toward CALLFUNC support. -------------------------------------------------------------------------------- 06/02/12 Applied yet another patch from DavidPH which has begun support for ACSE bytecode, additional ZDoom extensions within the ACS0 bytecode format, TAGSTRING support, better behavior in response to illegal opcodes, and a rewrite of P_FindMobjFromTID to enable ZDoom-compatible behavior, treating 0 as meaning the trigger object (note this would break any legacy Small scripts depending on _TID_TRIGGER irrevocably, but ask me if I care). -------------------------------------------------------------------------------- 05/30/12 Applied another patch from DavidPH which adds support for ZDoom's LOADACS lump, A_START/A_END namespace in wads, introduces more separation between the ACS virtual machine and the ACSThinker class, further develops the ACS savegame code, and more. -------------------------------------------------------------------------------- 05/29/12 Xaser found a major problem in P_SetPsprite caused by my failure to account for recursion - this could cause codepointers called on psprites to reference the wrong psprite, as curpsprite is a singleton member of the player_t structure. -------------------------------------------------------------------------------- 05/27/12 Applied several patches from DavidPH: * ACS0 dedicated loader with code tracer * CMake debug build flags * Support for a direct-threaded ACS interpreter loop when compiled under GCC -------------------------------------------------------------------------------- 05/20/12 TheGreenHerring requested that the M_STAT resource in eternity.wad be de-conflicted with the BOOM resource of the same name, due to the fact that the contained text is no longer the same. -------------------------------------------------------------------------------- 05/19/12 I have finally gotten around to renaming all the methods of WadDirectory to conform to Eternity's style guidelines for static and non-static class methods. Note that development is now gearing up on inventory-branch to finish the work earlier began on edf3-branch. -------------------------------------------------------------------------------- 05/18/12 Not long after adding PatchLoader::GetDefaultPatch, I realized that it was incorrect via allowing allocation of patches at PU_CACHE without passing in an owner pointer for them. If Eternity ever actually freed PU_CACHE blocks (currently such are never freed unless system malloc() returns NULL, which is an extreme rarity on modern operating systems and machines), this would have caused a Z_ChangeTag or Z_Free error about missing owners for cacheable blocks. The solution is to assign such cached default patches a dummy user, since there is no cache pointer for them to use in the WAD system, and the user will never be accessed or used for anything anyways - GetDefaultPatch returns a newly allocated dummy patch on each call regardless. The dummy user is just a static void pointer declared inside PatchLoader::GetDefaultPatch, which is passed down to Z_Calloc via the ecalloctag macro in V_LinearToPatch. -------------------------------------------------------------------------------- 05/09/12 I have added runtime_cast for provision of a generic dynamic_cast equivalent for RTTIObject descendants. Thinkers should continue to use thinker_cast, however, since it additionally checks if the object is removed before returning a non-NULL pointer value. -------------------------------------------------------------------------------- 05/08/12 The rttiTypes hash chains don't need to be dynamically allocated at runtime; instead they can be part of the static array. I have no idea why I chose to implement them this way in the original ThinkerType code. -------------------------------------------------------------------------------- 05/07/12 The ZDoom code license (aka BSD) has been added into the source code itself at the top of modules that contain ZDoom code, and in some cases, directly above the section that contains the code when it is limited to one section of a given file. -------------------------------------------------------------------------------- 05/06/12 The entire MetaObject hierarchy is now retrofitted to take advantage of inheritance from RTTIObject, replacing the limited MetaObject::isKindOf facility with full RTTI. -------------------------------------------------------------------------------- 05/03/12 In preparation for application of RTTIObject to the MetaObject hierarchy, I have added thorough documentation to the module and its header. -------------------------------------------------------------------------------- 04/22/12 Ladna fixed one more problem caused by command batches which assumed all commands have a variable_t and could cause a segmentation violation when certain console commands were executed via a keybinding. I have merged in DavidPH's patch to convert ThinkerType into RTTIObject, a generic ZoneObject descendant which offers all inheriting types the same custom RTTI functionalities of the previous implementation. This will allow other ZoneObjects to have factory construction, fast runtime casting, and inheritance reflection capabilities. This will more than likely be applied to the MetaObject hierarchy almost immediately. At essel's recommendation I have changed the defaults of several variables, including d_fastrefresh, to offer better out-of-the-box behavior of the engine. Most of these settings are ones which modernize the behavior of the program or avoid some common glitches under Windows. -------------------------------------------------------------------------------- 04/16/12 By popular demand, I have added a BDListItem template class which offers generic bi-directional double-linked list functionality in a vein similar to DLListItem's non-bi-directional linkage ability. -------------------------------------------------------------------------------- 04/14/12 Ladna fixed MORE keybinding bugs, and added command batches. -------------------------------------------------------------------------------- 04/11/12 M_NormalizeSlashes now has support for UNC paths, which are used in SMB networking (ie., \\host\path) - such paths are notable for not supporting use of POSIX path component separator characters. I have also added numerous file path manipulation routines to qstring: * pathConcatenate This will concatenate two strings assuming they are path components, adding in the proper separator and then calling normalizeSlashes to ensure that there are no redundant separators. * addDefaultExtension If the string does not seem to end with a filename extension already, this routine will concatenate a provided default extension with the string. * extractFileBase This routine will return the last component of a path, which is either a file name or the most-derived directory. I rewrote some code in d_main to test out these routines and to clean up the code in question. -------------------------------------------------------------------------------- 04/08/12 Ladna has fixed yet more keybinding issues, and has tweaked the concept of repeatability so that it applies in a universally consistent manner. -------------------------------------------------------------------------------- 04/07/12 My recent change to the main menus required the default items to be changed. An additional fallback behavior has been added to the /user directory before the game gives up and tries to write to /base, which is checking for the base/../user directory's existence first. Under Windows at least, this will almost always find the user directory without it having to be explicitly specified alongside an explicitly specified base. So now, for example, assuming this directory structure: /base /user /vc2008 then this command line: vc2008> debug\eternity.exe -base ../base will find the user directory which is one level up from the vc2008 directory. Notably this is how the Visual Studio environment launches the program, so this is of particular use to me ;) Ladna identified and fixed some more glitches in his new keybindings system. I have rewritten the DOOMWADPATH code in d_main to use a PODCollection instead of an ad hoc reallocating array. -------------------------------------------------------------------------------- 04/01/12 I eliminated the stack used in cam_sight, as it was unnecessary and was wrong, since it ran the risk of iterator invalidation if the stack was reallocated during recursive execution. The ZDoom Anywhere Moo fixes have been applied to the LOS check algorithm. -------------------------------------------------------------------------------- 03/31/12 I have added a new module, cam_sight.cpp, for holding "camera" line-of-sight checking, which has no effect on the playsim and is fully re-entrant. This should be suitable for allowing the external view cam in "cool demo" mode to test whether or not it can still see the player from its viewpoint. Because it is based directly on the early Doom 1.2/Heretic tracer-based LOS algorithm, it still needs ZDoom's fix for the "Anywhere Moo" bug applied to it, otherwise it will arbitrarily see through walls in certain cases. As part of this project, I have added STL-compatible iterator semantics to BaseCollection, so that all EE collections now have begin() and end() methods, and an ::iterator typedef. -------------------------------------------------------------------------------- 03/29/12 Ladna merged in some of his new m_queue functions from CS branch. -------------------------------------------------------------------------------- 03/22/12 DavidPH contributed another patch eliminating all instances in GCC of warnings about char * variables being assigned the values of character constants at compile time. After printz reported strange behavior out of EHashTable after its rebuild method had been called, whereby lookups would suddenly start to fail for objects known to have been in the table before the rebuild, I immediately caught a glaring logical error that has been present in this code since its original conception in C - objects would be linked into the wrong chains during the rebuild process courtesy of an incorrect assumption that objects which started out in the same chain under the previous hash table size would end up in the same chains together under the new hash table size. This is tantamount to stating that if A % C == B % C, then A % D == B % D for any A, B, C, D. If this were true, then the entire universe would likely collapse into a singularity :P The fix requires an O(N) lookaside of hash table chain end pointers to be temporarily allocated for the rebuild process, instead of always inserting objects at the end of the current chain being rebuilt. -------------------------------------------------------------------------------- 03/19/12 I had to make another minor correction to the logic in PODCollection, as my previous change had an off-by-one error, again noticed by printz. -------------------------------------------------------------------------------- 03/12/12 DavidPH fixed a problem in the CMake script which caused the OpenGL library to be searched for repeatedly, and Ladna merged in the patch. -------------------------------------------------------------------------------- 03/10/12 My earlier change to enable the autoaim setting to disable autoaiming of tracers didn't take into account the fact that P_AimLineAttack *must* be called before P_LineAttack, otherwise undefined and unexpected behaviors are possible. It is therefore now called even if autoaim is off, but the results of its call are ignored in that case. A critical error in PODCollection::assign was caught by printz, who noticed that it didn't reallocate properly. This was capable of causing crashes when code was added to the engine assigning PODCollections to each other. -------------------------------------------------------------------------------- 02/29/12 Long-standing end-user request fulfilled: drag-and-drop support for a single .LMP file, which will be unconditionally treated as if it is a demo to load and play in singledemo mode. I fixed a bug where -playdemo would not autostart the demo. This was a result of code that is an ugly mess in d_main.cpp, doing the same thing in two different locations. BOOM Team... >_< -------------------------------------------------------------------------------- 02/21/12 Drawing of the Select Episode and New Game menus in DOOM has been made 100% vanilla-compatible. -------------------------------------------------------------------------------- 02/18/12 While passing over the P_ChangeThingHeights routine, I just happened to realize it had a bug where it would restore a thing's original or "correct 3D" height even if the thing's height was equal to *neither* of those values; ie., a monster that has died or has been crushed. BOOM's use_traditional_menu option is no more. It has been utterly stamped out, and Eternity instead now always uses the traditional main menu, which is 100% vanilla compatible. -------------------------------------------------------------------------------- 02/11/12 I have eliminated a problem caused by earlier changes to M_Responder which caused all alphanumeric input to be double-echoed into input fields such as the save game menu. Savegames were still accidentally being saved into /base/ instead of /user/. A long-standing TODO has been eliminated via changing the game border to redraw every frame, removing the requirement of erasing all HUD graphics and recopying dirty portions from the game border back buffer. "redrawborder" is no more! The menu shouldn't capture key-up events; otherwise, strange things happen when you transition from in-game to menus or vice versa, involving such things as the player continuing to run without any buttons being held down. Ladna is making some changes to keybindings to improve the non-repeatable behavior of some menu actions. -------------------------------------------------------------------------------- 02/06/12 Ladna found a rare crashing problem when the game would try to flash the IO disk indicator during the process of changing resolutions. -------------------------------------------------------------------------------- 02/05/12 I have added support for substitution of a runtime-generated 4-pixel checkerboard graphic when screen patches are found to be missing from the wad directory. A lot of code in the engine still does independent checks or caches lump numbers however, so for this feature to be of universal benefit, all of those code points will need to be refactored eventually. Screen patches are one of the last resources which the game engine will not tolerate when missing. It would help Hexen and Strife development go a lot faster later if this is eliminated as a factor. Partially at Ladna's request and with several other peoples' suggestions taken into mind, I have split Eternity's /base directory into /base and /user, following the design of idTech 2, with /base retaining all read-only files such as WADs, EDFs, etc., and with writable files moving into /user as their preferred location - CFGs, CSCs, save games, DAT files, screenshots, etc. This is of massive benefit to CS branch, and also to the Linux install process. -user is now supported as a command-line parameter, and the environment var ETERNITYUSER can point to a global path to use. -------------------------------------------------------------------------------- 02/04/12 Ladna has pretty much finished his new keybindings system. I made a change to qstring::charAt so that it can again be this-const. Due to increasing difficulties with merges and trunk development, edf3-branch has been prematurely terminated and merged back into trunk, without inventory completed. Development of those features will soon resume on a new inventory-branch which I intend to keep on task. -------------------------------------------------------------------------------- 01/31/12 Ladna has started work on back-porting and redesigning his enhanced key binding features from cs-branch into trunk. Ladna also added an enhanced spy mode (F12 in co-op) which allows scanning through the player bi-directionally. -------------------------------------------------------------------------------- 01/30/12 M_StrCaseStr needed to use the portable pstrnlen rather than strnlen, which is not standard and isn't available on some flavors of GCC. Polyobject static init line types 348 and 349 needed to be supported as implicit ExtraData linedef specials when used directly in DOOM-format maps. They're not technically parameterized lines at runtime and that's why they weren't previously being handled. -------------------------------------------------------------------------------- 01/25/12 Ladna imported some mouse acceleration, sensitivity, and reading code from CS branch. -------------------------------------------------------------------------------- 12/30/11 In an attempt to resolve the strange bright white initial appearance of EE's frame buffer when starting up in OpenGL mode, I added code to initialize PBO 0 to all-black. ================================================================================ 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. 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), 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 ================================================================================