================================================================================ Changes since Eternity Engine v3.40.37 ================================================================================ -------------------------------------------------------------------------------- 01/19/14 Added one last feature, "aimshift", which allows customizing the way that enemies mis-aim at monsters in the way that normally happens for SHADOW, GHOST, and totally invisible monsters. This is needed so that the PSX spectre varieties can have this behavior without making it an intrinsic property of another flag they have. I also took care of a related problem I'd been meaning to address for a while of the DONTDRAW flag having this inaccuracy effect when it is needed to only disable vissprite generation without having other side effects by most of the game engine. This would be a compatibility break, if anybody ever actually used EE for anything :P -------------------------------------------------------------------------------- 01/18/14 Doing prep work for the lead-up to Bifrost release: * Added framerate options d_fastrefresh and d_interpolate to the video options menu and rearranged the pages of that menu to put more important settings first. Also, interpolation is now on by default. We'll see how the community reacts :) * Added smooth_turning to the config file as someone earlier reported that it was not being saved. * Changed the "dampening" keyword in EDF to "damping" as I see the latter much more frequently and thus suspect it to be the correct term. * printz sent me a list of some warnings about unused variables of the type that Visual Studio ignores, and I fixed all the ones that are not simply due to unfinished features. -------------------------------------------------------------------------------- 01/16/14 Fine tuning of the reverb effects and bug fixes have occurred: * The EQ parameters in the reverb engine weren't being updated except the first time, so I mysteriously couldn't hear any difference between the "bright" and "dark" presets. * Tweaked the default "corner" frequencies of the reverb's 3-band EQ to 250 and 4000 respectively, based on various advice from different audio tech web pages. Seems much more effective. * Fine-tuned parameters in the presets to make them slightly more distinguished between bright and dark variations. Being unsatisfied with the way that environments could apply to global sounds, I have also rewritten the sound loop so that a secondary buffer is used for sound channels that want reverberation, and then the two buffers are mixed together before being output by the global EQ pass. By adding a new function S_StartInterfaceSound, there is now full semantic separation between playsim audio and global sounds made by systems such as the menus and console. As a result of this change, I am also able to add reverb as a parameter to various sound-playing action functions, as well as to EDF ambience and sound sequence definitions. -------------------------------------------------------------------------------- 01/15/14 Finished integration of reverb with the playsim: * The high-level sound engine now keeps track of the active environment for the display player and notifies the reverb engine when a change occurs. * The reverb engine now sets a flag to notify the low-level sound update loop that it needs to call into the reverb engine effect processor. * Nine environmental presets (basic reverb effects including the Freeverb default settings and 8 different room sizes with different "luminosities" via equalization parameters) are now defined in base/sounds.edf. * Added a p_testenvironment console command which sets the zone that the player running the command is in to the indicated reverb. -------------------------------------------------------------------------------- 01/14/14 Finishing up work on integration of reverb with the playsim: * Added EESoundEnvironment with a ZDoom-compatible doomednum of 9048 and the ability to alter its spawn sector's sound zone by setting it to the EDF reverb specified by its args[0] and args[1] fields. * Data from an ereverb_t can now be propagated into the reverb class and its subordinate data structures in s_reverb.cpp. * Sound engine now gets "earsec" when there's a valid listener during sound origin adjustment, so that the currently active zone can be adjusted from it in addition to the existing sound kill flag checks that are done. -------------------------------------------------------------------------------- 01/12/14 Made interface changes to the IWAD picker, startup acknowledgment messages, and menus to call the two main Freedoom IWADs by their new names "Phase 1" and "Phase 2", as opposed to Ultimate Freedoom and Freedoom. My solution to D_DDTBLU looping did turn out to be insufficient, both by being not good enough to cover Freedoom's D_RUNNIN, which has a stuck note on a different channel, and by being overkill by causing notes to potentially end at the end of a song before they are supposed to end, such as in D_BUNNY. I corrected this by inserting the All Notes Off event with the proper channel number for each track (for some reason, mmus2mid generates a track for every MIDI channel it uses, one channel per track...) at the very beginning of songs, with time offset 0. This prevents it from interfering with normal playback of the program, but kills any notes that have hung over past a loop. Gearing up for 3.40.46 "Bifrost" release, I am finishing the last feature slated for it, which is playsim and high-level sound engine support for the reverb engine in the form of "sound environment zones," which will be partially compatible with ZDoom (the range of available effects is considerably smaller and will not likely include any of the same presets). Done so far: * Sound zones are created at map load with a flood-fill-like algorithm over the sectors by recursively walking through them to adjacent sectors which adjoin by 2S lines which are not marked as a boundary. Very similar to sound propagation for alerting monsters. * The extended line flag EX_ML_ZONEBOUNDARY can be specified via ExtraData to mark a line as a sound zone boundary. * A no-op ereverb_t structure with a reserved ID of 0 is defined and added to the reverb hash during EDF processing. This default environment will cause the sound engine to turn off reverberation. A function is also provided for getting the default environment directly without doing a hash lookup. * EMAPINFO can override the default sound environment for all sectors in a map by specifying defaultenvironment , where the two IDs that range from 0 to 255 match the corresponding EDF reverb definition. While working on the above I fixed two unrelated problems: * qstring::toLong was needlessly missing this-constness, possibly because it uses a non-const char ** argument, which in my mind made it potentially mutating, but, it's not. Use of the char ** to write into *after* the method call returns would be mutating, and extremely ill-advised. * Found a place in the inventory system where a flag-style option was being specified without the CFGF_SIGNPREFIX flag, meaning it wouldn't have allowed use of + and - before the option name as was intended. -------------------------------------------------------------------------------- 01/11/14 Reverted out some changes to the d_net core gameloop code which aren't needed for the new interpolation system (chiefly, returning the number of tics run down from RunGameTics to TryRunTics and then to D_DoomLoop). I was alerted of adoption of new official alternate names for the Freedoom IWADs ("freedoom1.wad" and "freedoom2.wad" respectively) and made alterations to EE so that it allows and prefers these names when searching for IWADs. The older unofficial names are still supported for now but are considered deprecated. -------------------------------------------------------------------------------- 01/10/14 Due to architectural differences, the Odamex approach to interpolation wasn't behaving optimally in EE when the framerate would go below 35 fps, and would introduce a large amount of lag in the renderer. With some additional help from Kaiser, I adapted the approach he uses in Doom64 EX, which was originally based on prboom-plus's code. To do this I first introduced a HAL for timer implementation, which was a long- standing TODO on the path to getting everything that's done through SDL only abstracted behind the HAL. The HALTimer structure has function pointers that can be initialized by a timer driver implementation for interpolation calculations. This way the most accurate timing method available can be used on a per-platform basis. Implementing the Odamex approach first was still a very useful exercise, though, which made the re-implementation easier, having an understanding of the problem being solved. -------------------------------------------------------------------------------- 01/08/14 Recoded portions of the renderer to get sector properties of the viewpoint from view.sector, which guarantees proper interaction of interpolation with features such as BOOM deep water. Added an r_boomcolormaps cvar (may add to configuration later?) which re-enables the old BOOM behavior of applying the view.sector's colormap properties to everything that is in view. This fixes some maps such as Freedoom E1M1/MAP01. Some maps like BOOMEDIT look worse with it on, though, IMO. Right now it's default off. -------------------------------------------------------------------------------- 01/07/14 Made some tweaks to interpolation that seem to make it work without screenwipes being enabled. I shouldn't add in more than one frame's worth of time, because if the game IS running behind, we can't interpolate that anyway. It needs a chance to catch up. -------------------------------------------------------------------------------- 01/06/14 Added interpolation when the viewpoint is a camera. Removed the "low precision" span drawer engine, which is another example of an option nobody ever needed or wanted ("Look ugly" vs "Look correct"). Along the same lines as the above, I have also removed the optional vissprite limit, which is equivalent to an unnecessary potential branch prediction stall on every vissprite projection. -------------------------------------------------------------------------------- 01/05/14 Ability to interpolate the player viewpoint, position of vissprites, and sector heights is now in place, after significant help in understanding the problem provided earlier by Dr. Sean of the Odamex team. Big thanks to him. -------------------------------------------------------------------------------- 01/01/14 Happy New Year! More work on elimination of branches on GMI enumeration values: * The mn_newgame command now has a callback in GMI which implements proper new game behavior for each game mode. This eliminates need for a redundant mn_hnewgame command for Heretic entirely. * Par time determination now has a callback in GMI. * The ability of Lost Souls to bounce while old demos are playing back is now controlled through a GMI flag. Because this behavior varies both between gamemodes AND game missions (ie. not in Doom 2, but in Final Doom), this needed a handy ability for missions to add and remove flags from their base gamemode (this works similar to addflags and remflags in EDF thingtypes). * Missions which support changing the names of MAP31/32 to match BFG Edition are now controlled with the MI_WOLFNAMEHACKS missioninfo flag. * Missions which add MAP33 "Betray" are now controlled by the MI_HASBETRAY missioninfo flag. * Missions which support Doom 2 managed mission pack selection via the episode menu are now determined with an MI_DOOM2MISSIONS mission flag. * Missions which do not set things' z height when teleporting during playback of old demos are now controlled with an MI_NOTELEPORTZ mission flag. Beta Lost Souls have been further tweaked to mesh better with the modern engine. The Pre-Beta didn't have flying monsters yet so id just offset the sprite a certain height above the floor. With flying logic in place, the offsets should just be based on the monster's position. Also slightly changed its death behavior so that it more closely matches how the Pain Elemental falls when it explodes. By user request, the ability to save custom comments in the configuration files has been entirely removed, which completely resolves the BOOM problem of the help comments getting out of sync with the variables any time one is added or removed from the program. Nobody used this anyway. -------------------------------------------------------------------------------- 12/31/13 I am currently working on eliminating more branches on GameModeInfo->id, GameModeInfo->missionInfo->id, and GameModeInfo->type. Work so far: * The music changing cheat now calls a function pointer in GameModeInfo that implements the proper behavior for that game. * Conditional playing of DSPDIEHI is controlled by a GMI flag. * MN_PatchOldMainMenu is no longer necessary; Doom 2 games now reference a separate main menu through the already existing GMI pointer. I also found that I forgot to add emulation of the A_RavenPlayerScream pointer to the skin viewer when I added that action function for proper Heretic player death sound behavior. -------------------------------------------------------------------------------- 12/30/13 While performing more code audits (just looking for weird stuff in the source code), I cleaned up a number of things: * C++ style adjustments * Variables with excessive scope (declared at top of function when only used in a single control statement, for example). printz sent a small list of warnings from OS X compile that needed addressing (printf security, incorrect formatting characters, and a signed-vs-unsigned problem in the new wave sound format reader). Researched possible solutions to D_DDTBLU no longer looping correctly. It seems that inserting an all-notes-off event at the end of each MIDI track in the converted MUS data will emulate the behavior of DMX with respect to program loops without introducing any issues, at least for the stock MUS lumps. I am not entirely confident that this isn't overkill, but, I'll leave it be as the solution for now until somebody complains about finding a WAD with broken music. -------------------------------------------------------------------------------- 12/29/13 A major announcement is that starting with r2790, the Eternity Engine is now under the GNU General Public License v3.0. This is mostly prompted by increasing interest in porting of Doom to phone and tablet devices, many of which do not support free software development. I feel it would be grossly unfair to my team and I to have our work monetized on iPhone and then be unable to compile our own competing version of the program without paying Apple's developer tax and then being subject to their highly objectionable terms of service, which include the ability to revoke your license to develop at any time, including because you competed with their own products (or one of their select friends' products) too much. The basic freedoms that were intended to be protected by the GPL are not met under those kinds of conditions, on what I like to call "prison platforms." By transitioning to the GPLv3, Eternity gains the following: * Protection from TiVoization (the above phenomenon of being locked to a private developer code signing key). * Ability to specify that we desire proper recognition when our work is used in other ports, even if the terms are legally removable from the license. * Exclusion from the GPLv2's outdated allowance for requiring a written request for the source code. GPLv3 only allows this when the product is being distributed on a physical medium, where such a restriction may actually make sense based on the medium's storage capacity for example. This has been abused by some non-mainstream devs in the Doom community against projects such as Chocolate Doom and is deeply disturbing to me as it represents, from my POV, an attempt to restrict distribution of the source code by making it needlessly inconvenient to obtain. There's no valid reason for this in the age of file sharing, online storage, and universal broadband. Now, in order to avoid creating unnecessary schisms in the community, where the vast majority of projects are still GPLv2, I've also added an additional permission clause for what I term "license reciprocity." This means if I use your GPLv2 code, and your personal team isn't violating the spirit of the GPLv3 (ie. by publishing locked down iPhone versions) then you're free to adapt back any changes I make to your code *without* upgrading to GPLv3. These terms do not survive (ie. once you back adapt the code, it is just under plain jane GPLv2 again). This does mean somebody else can then take your project and use parts of my code in ways against my wishes, but since that isn't *your* fault you can't be punished for it. I'd just encourage more projects to follow suit and convert up to the newest version of the GPL. As for original code written by Team Eternity, permission will virtually always be granted to use it under GPLv2 if such permission is properly requested either verbally or in writing. Just taking the code and using it without getting permission is not acceptable though. Please talk to me about it. -------------------------------------------------------------------------------- 12/28/13 I converted MBFHelperDog's definitions to use DECORATE state format. -------------------------------------------------------------------------------- 12/27/13 In advance of further support for Heretic, Hexen, and Strife, I have defined functions which remap doomednums for all of those games into the 7000 range, which is pretty much fully allocated at this point for translation purposes. I also allocated the low end of the unused 6000 range to "reverse translation" of Doom's objects, so that they are available in all games by non-conflicting numbers in this range. For example, an Archvile could be spawned in Heretic, Hexen, or Strife by using doomednum 6064 instead of 64. Objects in the 2000 and 3000 range fall under 6200 and 6300 respectively. -------------------------------------------------------------------------------- 12/25/13 Fixed the ability to play back internal demos using -playdemo on the command line by changing some code in D_AddFile so that demo loading failure is not fatal. This regression occurred when WadDirectory was refactored for zip file support and the system was made more particular about checking files for existence. Demos have always been allowed to float through the initial loading check and then cause an error later if they're not found when they actually start to play. Removed my old half-finished attempt at generalizing the SMMU LevelInfo system so that it could store multiple definitions in memory and push them to the active LevelInfo object, which was part of a plan to support Hexen MAPINFO which was active around June 2010 when I got hired at the tribe. The shift in my routines threw off EE development for about 2 months and that project basically was ruined. Either way, I have different ideas on how to support Hexen MAPINFO now. While testing the above using vapordemo to make sure I didn't break anything, I found several problems suddenly surfaced in the portal system: * When portal groups are setup, the scan done for Mobjs in sectors needs to scan the thinker list for all objects in that sector, NOT the sector's touching thinglist. Otherwise, MF_NOSECTOR objects get skipped and, since these include such things as MapSpots and Ambience, which can play sounds, that's bad. They need valid groupids. * Mobjs cannot clear groupid when they are removed, because they may continue to be referenced by things that still target them. This would cause invalid group lookups when those objects tried to get the position of their targets. * SoM had a bit of a hack going where the link getting functions were inline conditionally on RANGECHECK. I don't like that because having two copies of the functions creates the possibility of them going out of sync. I removed the inlines, as I don't think it's performance critical enough to warrant being inline in the first place. I also changed the way invalid group lookup warning messages work, so that they go to the console rather than the player message widget. -------------------------------------------------------------------------------- 12/24/13 After initial testing of the wave loader against some randomly downloaded files, I found that some support beyond the so-called "canonical form" will be more or less necessary due to proliferation of the WAVEFORMATEX and extensible headers, which many tools generate even for plainjane PCM files where neither is technically required. To support those header types, I also need to tolerate presence of a "fact" chunk between the header and the data, as Microsoft's specification requires one to exist (still, not all files will have one due to non-compliant writers, and I don't assume that it exists without checking for it first - nor do I actually require that it exists myself as it's not interesting to me). This made all my test waves play back in EE, at least, so it's an improvement. essel says use of 24-bit, 32-bit, and IEEE PCM formats are almost exclusively reserved for high-end professional audio development, so it's very unlikely that I'll be adding support for those until and unless someone specifically requests them. Noticed while pasting the code on pastie that my DMX padding check was wrong and was testing against byte 2 instead of byte 17. Woops. Easy fix. Enhanced the runtime wad loading dialog with capability to browse the file system directory tree, as a Christmas present to printz who called it out as one of his desired features on a Doomworld Forums thread. This had been in my head as an idea for a long time (and had been previously requested by other users), and I came up with a relatively simple way of doing it finally. In the process of recording a YouTube demonstration of the above, I noticed that EE had started pulling DSTINK from eternity.pke even if the sound existed in the IWAD, which was incorrect because the IWAD is supposed to override the resource file on the basis of being loaded after it. Turns out that the NSG-style loading methods of WadDirectory needed to be recoded so that they respect resource loading order more than namespace priority as otherwise this will become a universal problem as more code is rewritten to use NSG-style logic (in particular when the graphics/ namespace is fully supported through VImageManager). -------------------------------------------------------------------------------- 12/23/13 Taking further advantage of the new sound mixer, I have separated loading of digital sound effects out of the low-level code into a new high-level s_formats module. In addition to revamping format detection and sanitization of DMX 0x03 samples, I have added support for 8- and 16-bit Microsoft waves, in the so- called canonical format only (not tolerating all the multiple complex possible RIFF chunks). Needs serious testing. Also added proper support for the sounds/ namespace in PKE archives - EE will look there first for sound resources, and only resort to the global namespace when it didn't find anything there (courtesy of the NSG-style lookup functions in WadDirectory). -------------------------------------------------------------------------------- 12/22/13 Completed an EDF data model for reverb specification. Added back Pre-Beta Lost Souls with a ZDoom-compatible spawn number and some tweaked behaviors that make them fit with the modern game a bit better (bright flag on their frames, improved sprite offsets, and not leaving an ugly corpse hanging in midair when they die). Backed out the change adapted from Chocolate Doom to warp the mouse to the lower right as, under SDL's broken mouse handling code, this somehow manages to translate itself into player motion if the mouse is unlocked without the game becoming paused (such as during multiplayer for example). -------------------------------------------------------------------------------- 12/21/13 Implemented an optional pre-delay buffer for the reverb engine. Added a moving average FIR low pass filter to the backend of the reverb effect to experiment with cutting some of the high-pitch noise that is responsible for the Freeverb algorithm's metallic sound. Seems to work, though is not powerful enough to prevent the metallicity at very high reverb levels. Later experimented with a configurable low-pass/high-pass/band-pass filter, but settled instead on a full 3-band equalization pass by recommendation of esselfortium, as it is the ability to variably scale different frequency bands in a reverb effect which is responsible for about 90% of the perception of different "materials" in filter effects. For example, trimming high frequencies more than low results in wood or carpeting, or a densely packed space (lots of furniture or people), whereas emphasizing high gives a sense of metal and glass and reflective surfaces. I believe the reverb engine itself is now finalized with the following layout: input->[opt. predelay]->[combs]->[allpasses]->[opt. 3band]->output Now will begin the actually much more expansive work of integrating support for it into the game engine, which has some of the following as subgoals: * Tracking of "ear" data on a per-player basis, with savegame support * Implementation of the ear "stack" so that it can be pushed and popped when the user interface (menu or consoles) become active, without erasing the active reverberation data for the playsim. * Sector, line, and thing types/flags for control of sound environment zones. * ExtraData support for the above as is required. * EDF definition of reverb properties. -------------------------------------------------------------------------------- 12/20/13 Taking immediate advantage of the new sound mixer, I have started work on an experimental reverb engine, based on the public domain Freeverb model. -------------------------------------------------------------------------------- 12/19/13 Rewrote the sound mixer loop to use floating point samples, and rewrote the sound effect loader to translate from U8 to double precision samples. This opens the door for: * Support for 16-bit wave-format samples * Realtime audio effects which would be too inaccurate or cause too many int <-> float conversions if mixing were being done in Sint16 format still. Due to the inner mixing loop now being clip-free, the 3-band equalizer is no longer optional, and all traces of the s_equalizer option are gone. The rational tanh soft clipper, used on the results of the 3band equalization pass, is responsible for all normalization of samples. Also rewrote the 3-band equalizer to run over the full stream with a single function call, which is a significant optimization. -------------------------------------------------------------------------------- 12/18/13 Adjusted the sound loading code to trim the DMX pad bytes - discovered during Chocolate Strife development - from samples. Figured out all 3 of the PSX linedef flags. A 2S line in PSX will not render a midtexture at all unless one of line flags (512|1024|2048) are set, and when set, those flags have the following meanings: * 512 (0x200): Midtexture is masked * 1024 (0x400): Midtexture is rendered with 25% additive translucency * 2048 (0x800): Midtexture is solid Translucent lines usually occur in the combination of (0x400|0x800), but the other combinations occur and seem to make no difference to the line's rendering. 0x200 only occurs on lines with masked textures. I am not aware if clearing the masked flag (or replacing it with the solid one) would cause the texture to render with black areas instead of transparency, but it's a reasonable guess on what might happen. There is ONE line in MAP07 (E1M7 from Ultimate Doom) which has a midtexture but yet has none of these flags set, and sure enough, it does not render any middle texture in PSX Doom. This was what tipped me off to how the flags really work, together with use of the masked flag in maps not derived from Jaguar Doom. -------------------------------------------------------------------------------- 12/17/13 Support for PSX line flags, as best that I currently understand them. I need to do additional visual "reverse engineering" work to determine what's really going on with them. Added an ev_mapspecials command, which prints out information on every non-static linedef special that the current level is using. -------------------------------------------------------------------------------- 12/16/13 Added EEPSXSpectre, which is an additive-blended spectre with an approximated translucency level to match PlayStation Doom. He has doomednum 890. Added EEPSXBloodyChain, which is a PSX-specific object, with doomednum 891. Things are now translated when loading PSX format maps: * Demons with special flag values are changed into EENightmareSpectre or EEPSXSpectre depending on their flags. A generic form of support for the nightmare flag is not available, as adding flags to thingtypes in this manner causes issues with features that PSX doesn't have, like nightmare skill and archvile respawning. It's easy enough to create a Nightmare version of a monster via EDF anyway. * doomednum 64 (normally the Archvile) is redirected to 891. -------------------------------------------------------------------------------- 12/15/13 When playing maps with map numbers greater than 35 and no EMAPINFO, EE would display a "bad music number" message at the start of each map due to a lack of rangechecking in the function that calculates music number for map number for DOOM II. I have added an eclamp function template to m_compare, and used it to ensure that all of the default music track number generators use indices that are strictly within bounds. Began work on the VImage / VImageManager classes which will represent Eternity's new unified internal image storage format and a loader which caches lumps and translates them into that format while hiding the details from the game engine to the greatest extent possible. -------------------------------------------------------------------------------- 12/14/13 While performing a code audit to determine all codepoints that need addressing before it could be possible for EE to render in 32-bit color, I found and fixed up various minor issues: * Commented-out crap all over the engine left from rewrites and refactorings. * Expired FIXME and TODO comments. * Dead code in the particle engine from god knows when. * Incorrect copypasta of comments * Code that has been #ifdef'd out since we still supported DOS... -------------------------------------------------------------------------------- 12/12/13 Converted all the old Z_SysCalloc calls in the VBuffer code to ecallocs, as since conversion of the zone heap to a native heap implementation, there has been no strategic advantage to putting large video buffers directly on the C heap. Added basic loading support for the PSX map format, including its fixed-point vertex and specialized sector format. -------------------------------------------------------------------------------- 12/09/13 I have recoded the way that psprite scaling factors are calculated so that it is based purely on the view window geometry and not needlessly reliant on the renderer's field of view. This corrects the long-standing issue of weapons floating above the status bar in high FOV and in very wide widescreen modes such as 17:9 and 32:15. -------------------------------------------------------------------------------- 12/08/13 Added support for single patch textures between TX_START / TX_END lumps, as in ZDoom, and the corresponding textures/ directory in PKE archives. Added code to PatchLoader to support limited translation of linears into patches when one is found while trying to load a patch, as a hold-over until the new unified image internal storage system I am planning is finished. Once it is in place, there will be no more need for runtime conversion of resources between different formats. Patch, linear, or PNG, all graphics will be converted to and drawn using one unified internal format. This will allow us to eliminate TONS of drawing code in the V_ modules, and is an important move toward two possible future goals: * True-color rendering support * True 3D GL renderer Upstreamed some important copy construction glitch fixes for Collection and PODCollection from my psxwadgen project, where I caused undefined behavior by trying to copy-construct them in the patch conversion code adopted from SLADE. -------------------------------------------------------------------------------- 12/07/13 I have removed the only partially working at best "start on first new map" feature from SMMU, as it's always been mostly clutter and could confuse users more than help them out. Turns out maps with zero nodes were supposed to work, via the Doom engine's design of returning subsectors[0] if an attempt to access nodes[-1] is made via numnodes being zero when used in the calculation "numnodes - 1". Unfortunately at some point in BOOM or MBF development, Lee Killough refactored the R_PointInSubsector function without taking care to preserve this behavior. As a result, everywhere in the engine BUT this function was already behaving correctly in the case of an empty BSP tree. But of course, like most things in vanilla Doom, this was subject to a quirk - Z_Malloc returns a 32-byte block in vanilla when it asks for zero, which is the only thing that prevented an illegal operation in P_SetupNodes. So with R_PointInSubsector fixed and a special check for zero-size lump added in P_LoadNodes, EE can handle these maps again. The only kind of map that can run with NO BSP btw is a single-sector map that is perfectly convex. Vanilla did have a separate issue that could stop maps with only one sector from working, so despite tolerating an empty BSP tree, it could still crash on these maps. -------------------------------------------------------------------------------- 12/01/13 Removed extinct low-detail column drawer modules from the project files. Support has been added for subtractive blending through a precalculated tranmap (a SUBMAP lump can also be added to a wad to override this blending when we're running in an 8-bit color mode). Added TLSTYLESUB flag for thingtypes to enable subtractively blended sprites. Added EDF definition for EENightmareSpectre, which is a custom monster from the PlayStation version of Doom. He is a subtractively blended demon with double the health - quite dangerous, taking two whole SSG blasts to go down for the count! Being the logical and spiritual successor of MBF, I have reasserted our claim to the ancestral territory of the 800-900 range of doomednums, which are wide open for use currently with no assignment in other ports. (MBF defined the helper dog with DoomEd num 888). So, the Nightmare Spectre is available in Doom with the spawn number 889. -------------------------------------------------------------------------------- 11/29/13 Added support for the grAb chunk, created by ZDoom and now a virtual community standard, which allows for specification of x and y offsets in PNG-format graphics. This should take effect anywhere a PNG gets used as a patch. -------------------------------------------------------------------------------- 11/27/13 MacOS X just happens to be having a serious crisis with toupper()/tolower() in its standard libraries right now (how can this possibly be a "thing"???), so I eliminated the remaining calls to them for printz and ConSiGno's benefits. -------------------------------------------------------------------------------- 11/24/13 Replaced most usage of functions with custom functions defined in m_ctype.h and placed in an ectype namespace which are guaranteed to be: * ASCII no matter where the program is compiled, which is what the rest of EE expects. * Safe whether called with signed or unsigned char values. * Treat all extended ASCII (>127) as control characters, which is how EE uses them (ie. they cannot be subject to translation via toupper/tolower, nor considered to be alpha, numeric, hex, or punctuation characters). -------------------------------------------------------------------------------- 11/23/13 Need secure tolower/toupper calls in EE's M_Strupr/M_Strlwr functions, as GCC 4.x has started using lookup-based chartype functions that are vulnerable to the common problem of char promoting to signed int (and of course, ZERO sanity checking inside libc functions being considered perfectly acceptable despite the ridiculous consequences this has for security). -------------------------------------------------------------------------------- 11/22/13 Added support for using left and right on the keyboard to rotate monster sprites during the DOOM II intermission, as is possible in similar code on the skin viewer, and as was allowed during the DOOM 64 cast call. Not totally happy with the implementation because it should depend on keybindings so you can also do it with gamepads etc. -------------------------------------------------------------------------------- 11/17/13 When the HUD message widget steps down its y position to account for an active chat widget, the distance stepped is now defined in terms of the hud font's absh value rather than a hardcoded 8 px. Stepping of HUD messages from line to line is also now based on the absh value. As a result of these changes, it is now possible to use V_FontFitTextToRect to support multi-line HUD messages. This is an important prereq for Strife support, and also fixes problems we already have with longer than usual messages getting cut off at the edges of the screen. -------------------------------------------------------------------------------- 11/14/13 Removed all processor affinity hack code after extensive playtesting. No crashes so far. -------------------------------------------------------------------------------- 11/10/13 ConSiGno noticed a regression from the menu item system refactoring which had emulated menus' big sliders rendering a small font text string in addition to their patch and slider - though I CODED a method named MenuItem::shouldDrawDescription and properly overloaded it in the big slider class, I SORT of forgot to ever put a call to the base class virtual anywhere. Oops!? Upgraded Eternity to build against all of the newest trunk versions of SDL 1.2 and its support libraries. Not only has this completely resolved the MIDI loop deadlocking issue that has plagued us since Windows Vista came out, it also added support for FLAC music, the potential capability of supporting FluidSynth with minimal work, and makes the old processor affinity hack unneeded. -------------------------------------------------------------------------------- 11/08/13 Converted the HUD widget system into a proper class hierarchy from the C pseudo- OOP it was still using, which was relying on type punning. The message issued during shareware games about ignoring wads in the game autoloads directory will now only be displayed if there was actually an autoload path to load files from; if there isn't one, we be quiet about it. -------------------------------------------------------------------------------- 11/07/13 All files and directory paths that are loaded from the game path will now preferentially check for and load a copy that exists under user/ before checking and loading one that exists under base/, as user is the preferred location for storing anything that didn't come with the Eternity install package. Identified and repaired some currently inconsequential undefined behavior in the cam_sight code where non-POD PODCollection was being initialized via memset instead of with a constructor call. Since the object didn't have any important virtual methods and was mostly POD-like, this was doing mostly the same thing by chance. -------------------------------------------------------------------------------- 11/06/13 Removed now unnecessary macros conditionally defining the GetWindowLongPtr and SetWindowLongPtr functions in the i_w32main module, which were there only for the benefit of Visual C++ 6. -------------------------------------------------------------------------------- 10/27/13 Added a manifest file to Eternity in the 2010 and 2012 projects which declares the application to be "DPI aware," which prevents low-level scaling operations and off-screen drawing being done by Windows. Microsoft has recommended that all games include such an exclusionary declaration in their manifests. Special thanks to fraggle for researching this issue and sharing his findings with us. -------------------------------------------------------------------------------- 10/18/13 Refactored all the code relating to implementation of individual types of menu items in the menu engine to use a class hierarchy, as had been long planned and partially migrated toward previously by moving the special behaviors per type into arrays of function pointers. -------------------------------------------------------------------------------- 10/16/13 Added 2880x1620 to the 16:9 picklist, as it fits within the limits, and there is at least one PC monitor manufacturer producing this display size. -------------------------------------------------------------------------------- 10/14/13 Upped the hopefully temporary resolution cap to 2880x1800 to allow for use of Apple Retina displays at their native fullscreen resolution. -------------------------------------------------------------------------------- 09/21/13 Adapted a change to the low-level input code from Chocolate Doom which warps the mouse to a more out-of-the-way location when releasing it. -------------------------------------------------------------------------------- 09/18/13 Give Lich fireballs the MF4_NOZERODAMAGE flag when they are spawned invisible by the lich fire attack pointer. -------------------------------------------------------------------------------- 09/14/13 Added an MF4_NOZERODAMAGE flag, which allows for missiles with the Heretic and Hexen behavior of not invoking P_DamageMobj with a value of 0 damage. This in particular affects the behavior of terrain type missiles, as noted by multiple people, they never cause infighting in Heretic or Hexen yet did in Eternity. -------------------------------------------------------------------------------- 09/12/13 Support for gibhealth property in EDF thingtypes. This field is a little bit interesting because it depends on another field somewhat for its default value. This gets tricky where thingtype inheritance is involved, so to make it simple, if an inheriting thingtype changes its spawnhealth, its gibhealth will reset to the gamemode's default gibhealth calculation. So if you inherit and change spawnhealth, you'll need to change gibhealth too if you had customized it in the base class. Heretic player death sound behavior has been corrected via addition of a Raven player death pointer separate from Doom's. The Raven player classes don't necessarily make a sound based on whether or not they gibbed, but on the amount and types of damage taken in either case. -------------------------------------------------------------------------------- 09/10/13 New flags for thingtypes were added to control MBF's torque (mis)feature: * NOTORQUE - an object given this flag will never be subjected to torque simulation even if it is enabled. This has been applied to DOOM objects that appear to float or are rooted into the ground (such as floating skulls, and small torches). This fixes a WIDE range of maps where this feature creates problems, including Sunder MAP10 where some torches get torqued off ledges and block your path backward through the map, and No Rest for the Living MAP03, where some floating skulls fall off a staircase unnecessarily. Does not apply during playback of 203 demos. * ALWAYSTORQUE - an object given this flag ignores the comp_falloff variable and will do torque calculation regardless. -------------------------------------------------------------------------------- 09/08/13 Noticed another bug while playtesting Heretic - BOOM's code to make players make an "OOF!" sound when bouncing off of walls in icy sectors didn't exclude dead players, so if you died and slid along the ice and bounced off a wall, your corpse would become quite talkative. -------------------------------------------------------------------------------- 09/07/13 Split base, user, and gamepath determination code out of d_main into d_files. Changed GameModeInfo's teleFogType field from a DeHackEd num to a thingtype mnemonic. -------------------------------------------------------------------------------- 09/02/13 Added state flags, and the STATEF_SKILL5FAST flag to control monsters who set states to be faster during Nightmare gameplay, such as the Demon. This is controlled by using the "fast" keyword via DECORATE state syntax, as in ZDoom. A possible difference from ZDoom is that any number of keywords are now tolerated between the tics and the action function, so that multiple flags can apply to the same state. This will be critical later on for Strife support, as Training skill, which ZDoom doesn't even bother to try to implement properly, will require a corresponding "slow" flag that affects skill 0, on some of the same states which in Bloodbath become faster. Such a state would end up looking like such: SARG E 4 slow fast A_SargAttack -------------------------------------------------------------------------------- 09/01/13 Added a new m_compare module to hold custom comparative function templates, which don't require the inclusion of the massive from STL. Applied the new functions in various places they were needed (mainly places already defining MIN/MAX macros). -------------------------------------------------------------------------------- 08/31/13 Added pw_torch powerup effect from Heretic/Hexen, and did some refactoring of the fixedcolormap handling code in P_PlayerThink to make things work cleaner. Added code that can give pw_flight in P_GivePower. Added a custom "ravpower" cheat for Heretic, which makes up for its lacking of an equivalent to idbehold in the vanilla game (to get powers there, you had to slowly cheat for inventory items, find them, and then use them). Heretic's KEYDEFS lump now includes default bindings for flight and keylook. -------------------------------------------------------------------------------- 08/30/13 Restricted lockdefs to using integer-type cvars with a range of 0 to 255. Line type 99 in Heretic incorrectly had a lockdef binding, making it appear colored on the automap. Added the ability to override lockdefs through the EV binding system to take care of this. -------------------------------------------------------------------------------- 08/28/13 The console command hash table build was moved to before EDF processing so that EDF is capable of making reference to cvars in definitions. Added support for mapcolor property inside EDF lockdefs; its value may be any of the following: * A 6-digit hex constant starting with # (ie., #FF0000) which will be closest- color matched to the PLAYPAL. * A cvar name, starting with $, specifying a console variable which contains the value to use (ie., $mapcolor_ydor). * A decimal integer between 0 and 255, indicating a palette index to use. -------------------------------------------------------------------------------- 08/26/13 Added a w_hacks handler for ConSiGno's really broken otakon wad, which is just absolutely terrible to play, and has an equally broken wad directory. Worth the effort? Unlikely :P -------------------------------------------------------------------------------- 08/25/13 Removed the extinct low-detail span drawer engine code. The number of BEX pointer hash chains is now defined in terms of the pointer table size, so that it naturally grows along with the input set size. Linear lumps are now handled in a more flexible manner by the flat loading code to avoid out-of-bounds reading of truncated resources. Added a DM_KEEPITEMS deathmatch flag, which allows players to keep their current inventory when respawning during multiplayer games. I noted this option makes co-op a lot more fun in games like Heretic where there's just too much stuff you need to effectively play from a pistol start every time you die. Of course since EE's inventory system is not entirely complete yet, this currently only affects keys, backpacks, and ammo. -------------------------------------------------------------------------------- 08/24/13 For some reason SLADE turned F_SKY2 in heretic/eternity.pke into a patch, so I fixed it. -------------------------------------------------------------------------------- 08/23/13 Started work on adding Heretic's cheat codes. Added quicken, ponce, skel, massacre, kitty, engage, ravmap, and the "mean" iddqd cheat that kills you. Changed from the SGI STL string hash to sdbm, which was profiled by a blogger on the Internet to have the absolute best trade-off between speed and collision frequency when given input consisting of the entire English lexicon. There is one faster algorithm, but it had similar collision behavior and is significantly more complicated code-wise, making it not worth the implementation effort. After observing strange behavior in the "stat" memory instrumentation display in Heretic, I have refactored the font engine to not use globals to store text display state, adding V_FontDrawTextEx which takes all possible parameters in a clean structure. -------------------------------------------------------------------------------- 08/22/13 Added respawnat property to EDF thingtypes to fully complete support for the Heretic fire mace - this allows items which are collection-spawned to then respawn at a random position in that (or a different) spot collection when item respawning is enabled. Fixed Heretic mace spots to NOT be NOSECTOR, since this causes them to float in the air when sectors move underneath them. -------------------------------------------------------------------------------- 08/21/13 Refactored cheats in preparation for adding support for multiple games' cheats. Added experimental VC2012 project. I'll probably be sunsetting 2010 rapidly, since there's no advantage to using it over 2012. -------------------------------------------------------------------------------- 08/20/13 Made a tweak to portal line-of-sight calculations which should improve efficiency when the scan passes through a portal block but does not actually end up intersecting any portal lines inside that block - when this happens, all short-circuiting behaviors in the algorithm can be re-enabled so long as no portal lines have been previously crossed. Added BaseCollection::checkWrapItertor. When collections shrink, they need to reset their wrap iterator position in case it now points at an invalid location. -------------------------------------------------------------------------------- 08/19/13 Found that a NOTSHAREWARE flag for thingtypes is needed due to Heretic using unmodified commercial-version maps in its shareware IWAD, which during mutiplayer spawn items not normally in the episode. In Heretic, these were hacked out by doomednum in P_SpawnMapThing (disgusting). In Eternity, we'll just use a flag to control it. ZDoom uses the presence of sprites in the IWAD to control such things, but that isn't satisfactory to me for various reasons; ie, those objects STILL shouldn't be available in shareware, even if somebody hacks in their sprites. A bug has surfaced in the DOOM bodyque used to track player corpses; Heretic's behavior when a player skull pops (removing the body that is left behind after a short period of time) interferes with this and causes undefined behavior by not using proper Mobj reference counting. I have refactored the bodyque to use PODCollection, to clear itself for safety between maps, and to use a MIF_PLYRCORPSE flag so that corpses which are removed via Mobj::remove can be scanned for in the player bodyque and removed from it. -------------------------------------------------------------------------------- 08/17/13 Refactored base/sounds.edf and heretic/sounds.edf to use modern EDF syntax. Raven-style item respawning is now fully supported, with addition of the following EDF properties: * Pickup.Respawn and Pickup.Remove states are now supported in DECORATE-style state blocks to define state sequences for objects to be set to when they respawn Raven-style or are picked up and will not respawn. This is different from ZDoom which doesn't allow this level of customization. * MF4_RAVENRESPAWN flag controls whether an item respawns Doom-style (being actually removed and then spawned anew) or Raven-style (using the states and simply becoming dormant for a while). * Five new action functions for controlling Raven-style respawning behavior: * A_HideThing * A_UnHideThing * A_RestoreArtifact * A_RestoreSpecialThing1 * A_RestoreSpecialThing2 Remapped the DeHackEd initial_bullets and initial_health variables to affect the specific EDF item effect definitions that those values are meant to change. Big bug fix: the ev binding for Heretic linetype 70 was set to WR activation type instead of SR, via copypasta error; found randomly while playtesting. -------------------------------------------------------------------------------- 08/16/13 A Doomworld forums user noted that the Doomguy had become hyperactive on the status bar; the face icon was updating at renderer speed instead of being based on the game ticker. This was a minor regression caused by code refactoring for the inventory system migration. Parent type and class name now have accessors in RTTIObject::Type. It is now possible to query a MetaTable for the first object of a given type by passing a MetaObject::Type reference, in addition to the by-name lookup that was previously available. -------------------------------------------------------------------------------- 08/15/13 Support has been added for items which spawn at a random spot out of the collection of all such spots on a map, via the EDF collectionspawn property. Added definitions for the Heretic mace spot and pickup object to heretic/things.edf. Heretic support milestone: All Heretic objects with doomednums are now implemented! -------------------------------------------------------------------------------- 08/14/13 Conversion of Heretic objects to DECORATE states is FINALLY finished, except for the fire mace state (it doesn't have an object to adhere to yet). Added qstring::empty to match C++'s std::string class. Refactored MobjCollection to use a qstring as its hash key rather than messing with its own dynamic string allocation. -------------------------------------------------------------------------------- 08/11/13 Conversion of Heretic objects to DECORATE state syntax is STILL ongoing. XLParser has been changed to add lumps that it parses to the EDF data source hive so that it subject to the same behavior of never reparsing lumps it has already parsed. This will avoid such things as duplicate SNDINFO entries being added every time a wad is runtime loaded. SNDINFO processing has also been moved into EDF and occurs just before EDF sound processing, so that EDF-defined sounds with the same names can take precedence without requiring a hacky new keyword inside the SNDINFO language to enable that behavior. My apologies go to the ZDoom crew, as they should remove support for the $edfoverride keyword I earlier requested that they tolerate. EE will ignore the keyword if it sees it, as it is no longer useful. Fixed a bug in the followcam code which caused the camera to have a groupid of zero, which during normal play is fine, but during old demos doesn't match against the R_NOGROUP value (-1) that all sectors and things have at that point. Also changed the followcam vertex sorting code to use a lambda instead of a function object class, now that we have C++11. -------------------------------------------------------------------------------- 08/10/13 Removed hacks to D'Sparil's states which accounted for then-incorrect sound engine behavior with regard to cutting off multiple sounds being played by an object. Added support for the semi-rare beta Heretic IWAD with 3 levels which was rushed out the door by John Romero a couple of days before the game's first release. This is treated as a special version of the shareware mission. Refactored IWAD version identification code to not use an unnecessary amount of indirection (which had historical reasons, I assure you), after it made rice very sad on IRC ;) -------------------------------------------------------------------------------- 08/09/13 Continued with conversion of Heretic objects to use of DECORATE state syntax. -------------------------------------------------------------------------------- 08/07/13 Started addition of simplified Heretic codepointers that implement vanilla behavior without requiring extensive use of arguments (this was originally done partially to sidestep Heretic licensing issues and not because it was practical in some cases). Corrected important places in Heretic gamecode to use Heretic's wonky idea of what 1 degree is in the binary angle measure system - the value it uses is actually off by roughly 40%, being 1.4 degrees instead. This makes a significant noticeable difference in the behavior of homing missiles. -------------------------------------------------------------------------------- 08/06/13 During debugging I noticed that the RTTIObject type hash was seriously overloaded (3-4 objects on some chains), so I doubled the hardbaked table size. Thingtypes can now define a dropitem through a multi-valued property field, allowing either Doom or Heretic-style item drop behaviors. The existing droptype field is grandfathered into this system as an unconditionally Doom-style drop. Dropitems are stored in mobjinfo as a MetaDropItem object in the metatable. All of Heretic's enemy item drops are now properly specified through EDF now that the proper behavior is available. All uses of the deprecated A_HticDrop pointer have been redacted from the frame data. Doom-style drops are still performed during P_KillMobj for compatibility. Heretic-style drops occur in the A_Fall codepointer as they did in Heretic. This is important so that the Heretic-style drops actually toss the item, since if they attempt to apply momentum too early, the item is stopped inside the still-solid dying enemy that is tossing it out. -------------------------------------------------------------------------------- 08/05/13 Heretic DECORATE state conversion continues with significant progress. Another inventory milestone: ammo types are now defined as artifacts, and ammo amounts are now tracked through the player inventory. -------------------------------------------------------------------------------- 08/03/13 By request, NERVE.WAD will be recognized by its header+directory SHA-1 hash through the "wad hacks" subsystem and will have the ENRVMETA lump loaded for it if it is added through -file instead of in-game via the managed mission pack support for it. This required addition of a small system for deferring load of mission metadata to after completion of W_InitMultipleFiles. -------------------------------------------------------------------------------- 08/02/13 Heretic things.edf has had its syntax modernized to take advantage of Alfheim dialect enhancements, and I have begun converting all of the objects to use DECORATE state syntax. -------------------------------------------------------------------------------- 07/30/13 Fixed sudden surfacing of uninitialized memory in the IWAD picker boot-up routine in d_iwad that could randomly cause all IWADs to appear as enabled regardless of the actual configuration or non-configuration of paths in the system.cfg file. Thanks again to ConSiGno and others who confirmed the same behavior on their machines. -------------------------------------------------------------------------------- 07/29/13 Another inventory milestone - armor type and effects are now defined using item effects. Amongst other things this eliminates the ancient hack being used to differentiate Heretic armor from Doom's, and allows creation of armor with custom protective properties beyond 25%, 50%, or 75% absorption. Unlike ZDoom, Eternity needs armor protection specified in terms of a numerator and denominator (a discrete fraction), and not a floating point percentage. This is necessary for demo compatibility, DeHackEd, and for having actual self-consistent engine behavior (I found contradictory values in THREE different places for the protection amount of green armor amongst ZDoom's various DECORATE definitions... WTF is that about?!). -------------------------------------------------------------------------------- 07/28/13 P_GiveBody has been rewritten to utilize EDF health effect definitions. DeHackEd misc fields regarding health affect only the particular definitions to which they originally corresponded. Changed ALL giving of health in the game engine into P_GiveBody calls, so that things like health bonuses and Megaspheres can be properly customized. -------------------------------------------------------------------------------- 07/27/13 Another minor inventory milestone finds players' possession of a backpack being tracked entirely through the inventory system. Wiped out the rest of the old SMMU backpack dropping system, which would throw out a backpack containing all of a player's weapons and ammunition during -trideath mode; this has been broken pretty much since 3.29 Gamma or possibly even before, so this is just cleanup. This may be replaced later with something resembling a player active weapon drop if the DM_PLAYERDROP dmflag is enabled. -------------------------------------------------------------------------------- 07/25/13 Refactored the way item respawning works in preparation for inventory specifications and Heretic features. In the process, I found and fixed a +10 year old bug which would cause superitems to item respawn even if the "super items respawn" deathmatch flag was not enabled. Inventory is now saved and loaded from savegames. I have begun work on a new P_TouchSpecialThing function which will replace the current one once hardcoded pickupfx become a thing of the past (this requires fully re-implementing all the existing effect types to respect their EDF definitions first). The function is uncalled for the time being. -------------------------------------------------------------------------------- 07/23/13 A major milestone was passed in inventory implementation as player keys are now completely stored and tracked via the inventory system (player->cards no longer exists). Lockdefs are fully functional through the EV_ line special binding system. -------------------------------------------------------------------------------- 07/21/13 I was requested to add /usr/share/doom as a UNIX-alike scanning location for IWADs. Lockdefs support in EDF is mostly complete, with a few outstanding TODOs such as support for automap color specification pending. DavidPH added support for looking at the $XDG_CONFIG_HOME environment variable while searching for Eternity's user dir, before assuming the file location is named "~/.config". -------------------------------------------------------------------------------- 07/20/13 Added fast lookup facility for key subtype artifacts similar to the one for ammo types. Key definitions for Doom's keys have been added to items.edf in preparation for beginning of work on lockdefs support (the ability to specify what keys are needed to activate a particular linedef dynamically). -------------------------------------------------------------------------------- 07/19/13 Found that my MD5 implementation has been subtly broken since it was originally written (way back in the C versions of EE) by not using big endian numbers where the algorithm expects them. This has been fixed and the algorithm now validates for several known MD5 outputs. -------------------------------------------------------------------------------- 07/16/13 E_GetMaxAmountForArtifact has been added to account for special cases for some artifact subtypes such as ammo types, which can change their maximum amount depending on such things as possession of another inventory item (the backpack in their particular case). Added fast lookup facilities for ammo artifacts and for player backpacks which bypass the need to do a full table lookup. -------------------------------------------------------------------------------- 07/15/13 Conversion of cfg_t's to MetaTables should not adapt default values, as this breaks the potential for prototypical inheritance to work properly, and also causes MetaTables to be populated with every possible field regardless of value specification, using a ton more memory than is necessary, and making the MetaTable::get* methods' capability of returning a default value unused as it should have been. Started work on specification of the powerup effect type, and an enumeration of artifact subtypes. The design is a bit muddled currently, however, and may significantly change before it becomes actually functional. -------------------------------------------------------------------------------- 07/07/13 The ability to define armor effects is now going into place in the inventory module. Also defined an "artifact" effect type in advance for objects that are stored into the player inventory and not immediately used. Artifacts will in turn reference other item effects that determine what happens when they are used, dropped, etc. Basic code is now in place for storage and querying of player inventories, including: * Adding of items to the inventory * Removal of items from the inventory * Sorting of items in the inventory by their sort key (this is going to support Strife-style inventory where items stay in a convenient and predictable order, and Eternity is going to use this everywhere rather than giving any heed to the broken arbitrary ordering used by Heretic, Hexen, and ZDoom). Improved ability to use interned MetaObject keys by adding a MetaKeyIndex class. -------------------------------------------------------------------------------- 07/06/13 Processing of pickupfx in EDF has been moved from e_edf to the new inventory module; eventually pickupfx will be more complicated than they currently are, and will control attachment of EDF-defined pickup effects to sprites. Currently they still function using the fixed enumeration. When fopen() fails during D_CheckIWAD, the error message given should call strerror() to state what problem it actually encountered if errno is non-zero. Thanks again to ConSiGno for perpetually causing the weirdest things to happen everytime he runs Eternity :P As a result of further debugging the same problem prompting the above change, paths which fail stat() will no longer be forwarded to the IWAD picker. This would result in a false success message followed immediately by an error message that was directly contradictory, which was confusing to say the least. -------------------------------------------------------------------------------- 07/05/13 Added a MetaConstString class which points to an internal static string resource and can therefore achieve yet another form of interning by sharing its const char * member directly between instances, rather than duplicating it inside each instance. This class should be used any time an internal static string is going to be assigned to multiple MetaObjects. EHashTable's getNumItems and getLoadFactor are now exposed by MetaTable for its key hash. Most basic MetaObject descendants' methods are now inline for speed and for brevity of specification. -------------------------------------------------------------------------------- 07/04/13 This-const versions of EHashTable::tableIterator and its reflection within the MetaTable class are now available, so that it's possible to pass around const MetaTable references and actually be able to iterate over the table. Iteration is a constant process anyway so this is just correction of an oversight. items.edf has now been added to the root base folder, as well as a game-specific submodule in the doom folder. It currently contains some test definitions which do nothing except allow me to exercise code in the e_inventory module. -------------------------------------------------------------------------------- 07/03/13 The item effect system is beginning to take shape inside the inventory system, and it is now at a point where EDF can actually invoke the inventory item processing code. None of the definitions do anything yet, but the ability to specify them is as always the first step toward actual functionality. -------------------------------------------------------------------------------- 06/30/13 Added an E_MetaTableFromCfg function which converts a cfg_t into a MetaTable, with optional prototypical inheritance behavior similar to a JavaScript object hierarchy. The hash growth function used previously only by MetaTables has been generalized so that other code in the engine can call it. In particular it needs to be applied to the MetaKey interning table. New weapon and inventory modules have been added and are beginning to take shape based on my new development plan for inventory, which will store the various required definitions as MetaTable instances, rather than creating dozens or even hundreds of new binary structure types or even worse, thick class hierarchies like the mess that ZDoom uses and result in highly restrictive behavior of certain Hexen objects that seem to frustrate the hell out of everybody I've ever heard discuss them. -------------------------------------------------------------------------------- 06/29/13 I have done various work toward issues that are holding up dynamic weapons: * The already-defined WPF_NOTSHAREWARE flag is now used in various places in weapon-related code instead of testing against specific weapon ID numbers (wp_plasma and wp_bfg, in particular). * An up sound field was added to weaponinfo_t to account for weapons with a sound which is played when they are initially brought up, such as the chainsaw and Heretic's Gauntlets of the Necromancer. -------------------------------------------------------------------------------- 06/24/13 Removed console commands and configuration file bindings of variables related to end-user weapon preferences, and made the current array used for looking them up static to p_pspr. Also removed the second row of the array, which is no longer needed. The entire array itself is actually a contrivance at this point, but can remain in place until the EDF weapon definitions system is able to fully specify weapon priority order. -------------------------------------------------------------------------------- 06/23/13 Various small tweaks and fixes for metatables: * Super() ought to be used in MetaObject constructor lists, as it inherits from RTTIObject and thus can take advantage of that typedef. * E_SplitTypeAndState, used in metastate resolution such as for the A_Jump DECORATE codepointer, should not tolerate use of a single colon where a "::" sequence is expected. * MetaKey interning could calculate the hash code for a string twice in the worst case where only one calculation was necessary, partially defeating the efficiency gain of key interning. Fixed by caching the hash code in a local variable immediately. * MetaKeys were being added the interned keys collection twice, causing lookups by cached key index to arbitrarily break. -------------------------------------------------------------------------------- 06/22/13 I am warming up for another crack at starting Eternity's dynamic inventory, pickup effects, and weapon systems. This time the attempt will be done on trunk so that it cannot become subject to branch development hell. To start off the process, the earlier abortive inventory code still left in EE trunk from a couple years ago has been burned out completely. I removed the demo-comp-optioned tweak to Lost Souls that tries to avoid recursion through the clipping engine when they collide with objects or walls, via using P_SetMobjStateNC instead of P_SetMobjState, because this causes problems with some obscure DeHackEd methods of causing strange things to happen when objects using the A_SkullAttack codepointer suffer collisions. Several old SMMU features which are annoying from the standpoint of inventory and dynamic weapons support have been removed, including the following: * bfglook, an attempt to balance the BFG in multiplayer with mlook enabled. Could potentially return as an EDF weapons option in the future, but don't count on it. * weapon change time; this isn't something that should be infinitely flexible. I could see replacing this with an instant weapon changes DM flag for the multiplayer nuts later. Codepointers have all been reworked to take an actionargs_t structure, which allows me to eliminate hackish use of a stack in P_SetPsprite to accomplish redirecton of frame arguments to make generic codepointers work on weapon frames in the expected way. Eliminated attempts to prevent recursion in A_Chase, due to potential demo and DeHackEd compatibility implications. The UI for changing weapon preferences has been removed, as weapon changing behavior has to become part of the game definition under EDF if it is supposed to be able to support an arbitrary number of weapons, and different sets of them per player class. There's no way to reflect priority between an arbitrary number of weapons in a way that both mod authors AND end users can control. -------------------------------------------------------------------------------- 06/14/13 Some forwarding methods in RTTIObject which were intended to be static were not actually static. Apparently I hadn't actually used them yet or this would have been obvious a long time ago. I made some changes to the savegame code to use those newer statics, which pretties up the lookup of Thinker class types during the savegame loading loop. -------------------------------------------------------------------------------- 06/09/13 Added the i_forcefeedback option to the gamepad options menu. -------------------------------------------------------------------------------- 06/08/13 I have reworked the XInput haptic effects into a class hierarchy and changed various details of their management, mostly to avoid unnecessary dynamic overhead for singular effects. I_StartHaptic now takes two parameters instead of one, which generally reflect the intensity and the duration of an effect. Haptics are now updated immediately when a new effect starts, so that the effect begins immediately; this gives a very slightly better minimum response time for short effects. Added haptic damage feedback. Reworked the BFG and chainsaw effects to have better ramp-up and intensity. Added i_forcefeedback cvar and system.cfg variable to control haptics support. -------------------------------------------------------------------------------- 06/05/13 Haptic feedback support is largely functional, with the following effects implemented for XInput devices: * Weapon firing kickback * BFG warm-up rattle * Hexen Earthquakes * Chainsaw idling (effect is not finalized yet and I'm displeased with the current intensity) -------------------------------------------------------------------------------- 06/04/13 Started work on support for a force feedback HAL, with a specific implementation for XInput on Windows. Gamepads advertise support for haptic feedback by returning an instance of a HALHapticInterface descendant from their override of the virtual method HALGamePad::getHapticInterface(). -------------------------------------------------------------------------------- 06/02/13 Undefined behavior surfaced in use of PODCollection with structures containing DLListItem instances - if an object is moved in memory, then the pointers inside the DLListItem become invalid. For now, PODCollection must be avoided with self- or mutually referential objects. The crash happened at startup while interning metatable keys. printz noticed that translation handling was still broken as a result of recent changes made to wad namespace iteration - R_InitTranslationTables wasn't called until after EDF parsing, so attempts to lookup translation tables during EDF were not obtaining the expected namespace information from local caching static variables - instead, it needs to go straight to the WadDirectory for that info. The audio_buffers variable controlling the SDL_mixer sample buffer bandwidth must be forced to be a power-of-two. Special thanks to ConSiGno for crashing Eternity in front of his friends by trying to set this variable to some crazy unsupported value :P -------------------------------------------------------------------------------- 05/29/13 DavidPH has added the capability for EE to create and find its user directory tree in the standard install location on Linux (and potentially other UNIX- alikes, though this requires additional support in being able to identify POSIX compliant platforms which we don't currently have in the engine). -------------------------------------------------------------------------------- 05/28/13 The BOOM HUD was mistakenly changed to use "yellow" color instead of "gold"; thanks to ConSiGno for catching it early. ================================================================================ EOF ================================================================================