NOTE: This file has been retired, and contains changelog entries from v3.33.33 up to the release of v3.35.92. See haleyjd_changelog_4.txt for more recent updates. ================================================================================ Changes since Eternity Engine v3.35.90 ================================================================================ -------------------------------------------------------------------------------- 03/22/09 I have added support for console variables which lack lower or upper bounds on their values, in order to support unlimited-length file paths (though truth be told, due to operating system limitations, file paths are still effectively limited to anywhere from between 512 to 1024 characters - but at least EE will not be to blame for this). I altered the LALIGNED menuitem flag so that all items using it on a menu page will draw their value components at the same x coordinate, making them aligned to a global standard. This vastly improves the appearance of LALIGNED menuitem groups, including particularly the one on the new IWAD paths page of the Wad Options menu. I have also added several options that were new since v3.33.33 to appropriate locations in the menu system. We are now prepared for the maintenance release. The version will be 3.35.92, and the user-suggested version name is "Nekhbet," a reference to the Egyptian hawk goddess, the personification of Upper Egypt, who holds a staff with a shen ring representing "all" or infinity, which in reference to time, would mean "eternity." A fitting name, I believe. -------------------------------------------------------------------------------- 03/17/09 I have made some changes to improve Heretic compatibility: 1. D'Sparil's teleport probability and teleport spot selection have been restored to their vanilla behavior, now that the GPLing of the code allows me to use it directly. EE still fixes the potential infinite loop, however, by adding a termination condition in the new distance-checking spot selection codepath through P_BossTeleport. In vanilla Heretic, if a level were made where the spots were all less than 128 units apart, and D'Sparil tried to teleport while in the midst of them, the game would lock up. 2. Gargoyle charging probabily has been reverted to 64/256 from 128/256, even though this causes a serious issue in Black Plague skill level where the imps seem to freeze constantly. This is, unfortunately, a "part" of the game which fixing would cause the game balance to be thrown off significantly. I was prompted to change this after watching some particularly brilliant youtube runs of the game in Black Plague skill level. Noticing how the imp stalls were often advantageous to the player makes me think that changing this is probably not as good an idea as I previously thought it would be. 3. Weredragon fireball smoke no longer burns. This is another change like the previous one. After seeing players strafing through those smoke trails repeatedly, I got the idea that maybe Raven didn't fix this problem intentionally, as it might make the beastballs too dangerous. 4. Iron Lich tornadoes can still change targets, which is an innovation I added, but they will not do so if an old demo is trying to play. This has almost zero impact on normal gameplay, but is very cool-looking when it happens, so I'm leaving this tweak in place. 5. If old demos are trying to play, 3D object clipping and TerrainTypes will be enabled. Even though Heretic demos stand pretty much zero chance of ever syncing in EE once the player touches any mobj_t's or shoots a gun, I'd like the reasons for the desyncs to at least be limited to things that I simply cannot help, and not just say "screw it all." -------------------------------------------------------------------------------- 03/16/09 After continued problems with the console pausing feature, I have altered it to work in the same manner as menu pausing, rather than having it create a sendpause event. "consoleactive" is now checked along with "menuactive" in various places, so that the console only pauses the game during single-player play, and not during netgames or while playing demos. -------------------------------------------------------------------------------- 03/15/09 I added full comments to the i_picker.c module, and I also changed the IWAD path variables to never be NULL, but rather default to the empty string, so that I can safely attach console variables to them. -------------------------------------------------------------------------------- 03/14/09 I have finally decoupled autorun from the capslock key and killed off any code expecting it to be bound there. There is now an autorun console variable, as well as an autorun keybinding action. Capslock has also been hacked to behave like a normal key under Windows, as I've been told it behaves under Linux. In Windows, capslock alternately sends a keyup and keydown event every time it is pressed once. This doesn't work with EE's dynamic keybinding system. -------------------------------------------------------------------------------- 03/13/09 I made a workaround for an issue in the menu system that was driving me up the wall. The previous change that allows paging to take place if you move past the first or last item on a menu using menu_up or menu_down actions was making me angry because I was accustomed to the previous behavior, having used it for years. So, I made it possible to trigger the old behavior by holding down Ctrl, which still requires some learning on my part, but at least makes it possible to have both behaviors at the same time. I also killed off the wrapping behavior that would take place on the first and last pages respectively, which makes what is going on a whole lot less confusing. -------------------------------------------------------------------------------- 03/08/09 I have completed a graphical IWAD choosing frontend for Eternity, implemented using SDL. It displays the titlescreens for the various games over a background, all of which are stored in a new base/startup.wad file, which uses the previous private wad directory system I mentioned adding recently. Only those games with an IWAD specified in the system.cfg file are displayed for choosing. Esselfortium created the background graphic, after the ugly one I made for initial testing was deemed far too hideous for public use ;) Unfortunately, several people were turned to stone by it before we managed to make the switch. -------------------------------------------------------------------------------- 03/07/09 Added a specific finale font to EDF after I noticed that the finale line step was off (this was previously handled with a special textmetric object in the GameModeInfo structure). After numerous commits, SoM and I have added mousewheel support. The mousewheel behaves badly (in my opinion) under SDL, and doesn't work too well with EE's keybinding system without some serious workarounds in the low-level input code. -------------------------------------------------------------------------------- 03/06/09 Added the long-planned system.cfg file, with support for specifying that all DOOM gamemodes should use the base/doom/Eternity.cfg file rather than their individual game-folder configurations. This allows you to have either one or many configs for those games, depending on your preferences. There are some other settings that I plan to add in short order, including most importantly the ability to store IWAD settings (these cannot go in the base/game configs because those cannot be used until we know what game we're using, and unless -game is used, that information can only be ascertained from the IWAD file). I started getting around to a bunch of the usability issues that EE has accumulated as FIXME's for the past few years, in preparation for an upcoming maintenance release. As of now, we have support for 8-button gamepads, and next/previous weapon actions that are suitable for gamepad and mousewheel use. -------------------------------------------------------------------------------- 03/02/09 I noticed that I forgot to add several of the new UDMF-related sector damage properties to the savegame code, so that sector transfers involving damaging floor types would be broken if you saved and then reloaded the game. Heretic E2M2 was a simple level for triggering this problem, since it has some lower- and-change-type floors right in the first room. It is, in fact, the level I have always historically used to test changes to the sector type transfer system. This is the third time I have used it for that purpose ;) -------------------------------------------------------------------------------- 03/01/09 I made some simple alterations to the wad file system that enable modules to open private wad files that are not linked into the main wad directory. In effect, I simply moved the main wad directory variables into a structure, and changed the W_ functions to take a pointer to that structure instead of using the main wad file directory explicitly. My initial idea for this is to base the new savegame format on WAD files, which would enable the data inside to be more easily examined and even edited. However, there are some serious problems with the way I would like this to work which remain unsolved. No decisions have been made yet. Esselfortium mentioned a weird bug with EDF ambience sounds not being relocated by linked portals. Turns out I had put the NOSECTOR flag on the EEAmbience and EEEnvironmentSequence objects, which prevents them from having the appropriate group id set as a side effect of not being attached to a sector. I have removed this flag from several EE control point objects where it is inappropriate. -------------------------------------------------------------------------------- 02/28/09 Finished adding changes to the EDF font system that enable the proper freeing of resources when font objects are overwritten (defined multiple times with the same mnemonic). -------------------------------------------------------------------------------- 02/26/09 After some problems and complaints with how the block font system I added in 3.33.50 turned up, I decided to design and implement a complete EDF font system, which externalizes all the previously natively defined details of font construction for both patch and block fonts. All fonts are now defined in fonts.edf, and all native subsystems now check global EDF-set variables to see what fonts they should use for various purposes. -------------------------------------------------------------------------------- 02/19/09 Test commit for Manc. -------------------------------------------------------------------------------- 02/04/09 By request, I changed the resurrect console command to work any time that the player is in PST_DEAD state, even if health is greater than zero. This allows you to escape certain situations such as being a zombie player. I also managed to very simply disable the R_Init loading box when -nodraw is active, by adding a check for the parameter's variable in the box drawing routine. Now all you get in -nodraw mode is a perfectly black screen. -------------------------------------------------------------------------------- 01/27/09 By implementing some more changes to the zone system, I was finally able to nail down the precise location of the malloc responsible for the heap corruption. Take a wild guess what it was before I tell you -- it was the TXTRCONV parser from SMMU. The code was assuming that the lump was null-terminated, a problem I had earlier in the SMMU skin parser, SMMU console script parser, and SMMU MAPINFO parser. This particular problem managed to stay just under the radar for all these years because it was highly sensitive to the *exact* alignment of the zone heap. As mentioned in the previous commit, even one configuration value differing could be enough to cause this error to disappear. If there were any zeroes between the end of the lump and the next block, the parser would stop there, leaving only the very last entry in the TXTRCONV table possible corrupt. Because of what tended to be loaded into the memory location previously, this had a very high probability of happening. The changes I made were to separate the CHECKHEAP and zone memory scrambling functions from the INSTRUMENTED define, allowing all three to be enabled independently. INSTRUMENTED itself can have side-effects on the heap, since it writes additional values into the zone memory headers. Memory scrambling can also be fatal to attempts to find heap corruption problems, and is generally only useful for finding pointer-class errors, such as accessing freed memory (it has been excellent at catching this in the past, particularly when mobj_t's are being inappropriately referenced). In this case, the ability to compile with CHECKHEAP in place but without zone scrambling or INSTRUMENTED enabled me to nail down the precise cause of the heap corruption, because it stopped the program at the exact time that the next block was corrupted, rather than at the next time that block happened to be touched by the zone heap, which was quite a bit later. None of my log files were able to pinpoint the TXTRCONV lump as being the source of this problem, due to it having been freed for a long time before the first level's Z_CheckHeap call. -------------------------------------------------------------------------------- 01/20/09 Esselfortium has finally succeeded in triggering the mysterious heap corruption issue that has been dodging in and out of my sights for a couple of years now, in a way that can be reliably replicated, but ONLY through the EXACT use of his complete setup - any difference in directory structure, files loaded, or even configuration file settings will cause the error to disappear. As such, I've had him send me his whole EE directory minus anything that it's impossible to have loaded in the way he's launching it, and I've been able to replicate the error consistently. There are still some issues with debugging the zone heap which I believe I can tune up to accelerate cracking this one. The first one I have added today is a paranoid check in Z_Free for invalid block tags - in particular, PU_FREE, or anything greater than or equal to PU_MAX. The first would indicate a double free taking place, which is something I had initially suspected for this problem due to the way in which the zone blocks are being corrupted (this assumption has proven itself false, however). The latter would indicate simple heap corruption, as no value outside the range from PU_FREE to PU_MAX should ever be written into a zoneblock's tag field. -------------------------------------------------------------------------------- 01/17/09 Applied a belated change for the Lost Episode - Evil Unleashed project. Megaspheres may now be collected by the player in any DOOM gamemode, not only in DOOM 2. -------------------------------------------------------------------------------- 01/12/09 Fraggle provided a fix for a strange Linux-only sprintf issue, where use of the "%s%c" idiom to append a character to the end of the same string was going haywire (sounds to me like maybe sprintf is being implemented with memcpy, which AFAIK is not adhering to the specification, since the specification doesn't say sprintf is forbidden from formatting into any of the same strings it takes as arguments - at least, not that I've ever heard). The offending code in the console had been there since SMMU and never had a problem until now, so who knows what it's really about. ================================================================================ Changes since Eternity Engine v3.33.50 ================================================================================ -------------------------------------------------------------------------------- 01/11/09 Added a processor affinity setting and supporting code in i_cpu.c for SDL builds on Windows and Linux. Setting processor affinity prevents the mysterious SDL_mixer multicore issue, which is some kind of thread contention problem (I suspect race conditions and/or inappropriate handling of resource locks). This is the final commit for 3.35.90 release, which will be codenamed "Simorgh," for the wise and holy mythical bird of Persian origin. -------------------------------------------------------------------------------- 12/31/08 Sector damage has been completely rewritten to function through four new fields in the sector: damage, damagemask, damagemod, and damageflags. These enable an incredible variety of sector damage behaviors, and these flags replace all previous code for doing sector damage, even for effects such as sector type 11. It will accordingly be possible to replicate and customize all such effects via use of ExtraData and/or UDMF. -------------------------------------------------------------------------------- 12/30/08 I have defined sector flags for purposes such as friction, push effects, and SMMU sound properties, in order to replace the BOOM generalized sector special system. In the process, I fixed the "oldspecial" hack from BOOM and two problems related to it: the field was not saved in save games, and it was unnecessarily transferred between sectors, causing sectors to appear secret that never were (this was apparently intentional in BOOM, but I cannot figure out Jim Flynn's logic behind doing it - it makes no sense at all, so now it is gone). -------------------------------------------------------------------------------- 12/16/08 I fixed up the disk flasher to not activate in gamemodes that do not support it, such as Heretic. SoM was supposed to have done this originally, but it slipped his mind ;) I had to have him commit it for me, however, because due to an overzealous firewall, I can no longer perform SVN commits at work. -------------------------------------------------------------------------------- 12/04/08 I have implemented secure map loading. Almost all indices are now fully rangechecked against the array they are accessing, so problems like bad segs or bad sector references get redirected to the first entry in the lump. While not guaranteed to produce an error-free experience, it will prevent virtually all crashes possible from loading malformed levels. In addition I have revamped REJECT handling so that too-large rejects are warned about but used normally, too-small rejects are padded out to the appropriate size, and 0-length rejects are handled as before (allocated at size and filled completely with zeroes). -------------------------------------------------------------------------------- 11/28/08 For Evil Unleashed, I have implemented toggling of the super shotgun's availability in DOOM gamemodes by testing for the presence of the SHT2A0 lump, instead of assuming that it should only be available in commercial mode. I have accordingly eliminated the COMMERCIAL weapons flag, as that was a stupid idea anyway. -------------------------------------------------------------------------------- 11/25/08 SoM added a powersaver command which can make EE sleep, giving up some CPU cycles so that it does not burn out CSonicGo's laptop battery so quickly. It is possible that some more work needs to be done with this, though, due to the performance drop it currently precipitates. -------------------------------------------------------------------------------- 11/16/08 Finally got around to converting all those GameModeInfo booleans into the flags I earlier defined. -------------------------------------------------------------------------------- 11/14/08 PC speaker emulation is now complete and is available as an additional sound driver setting under the sound menu. SoM added a new sort of portal linedef which can apply tagged portals directly to its front sector. Evidently this is very handy for mappers. -------------------------------------------------------------------------------- 11/11/08 I had to remove all calls to SDL_FreeRW which Julian had placed in his rewrite of the music engine a few years ago. Turns out these are not needed and are inappropriate. They cause a double free problem on the C heap which for some reason only becomes troublesome to Eternity if a digital music format such as OGG is loaded - some difference between this and MIDI dealing with subsequent memory allocations causes it to become a problem. -------------------------------------------------------------------------------- 11/10/08 Extensive work has been done on PC speaker sound. It should be functional very soon. I have begun adding EDF support for the feature. Sound definitions now include the ability to explicitly specify a PC speaker data lump in addition to their normal digital lump. When no such lump is specified, the engine searches for various other possibilities, including adding the DP prefix in place of DS when the sound is normally so prefixed. There is also a new EDF sound field which disables the playing of that sound as a PC speaker lump altogether, even if the PC speaker data lump is available. There were a number of sounds in DOOM for which this is the case, primarily the chainsaw idle sound and the various demons' snorts and pain sounds. I imagine that if these were to play, the game would sound really annoying, and most of the important sounds would get cut off. -------------------------------------------------------------------------------- 11/07/08 Fixed a new pair of int-to-bool conversion warnings in snes_spc that decided to pop up after I fixed the first one (stupid VC++...) I broke up i_sound.c, moving SDL-specific digital audio and music code into modules i_sdlsound and i_sdlmusic, introducing new driver structures to hold function pointers into the routines implemented there. This allows the generic low-level code in i_sound.c to deal with sound support for any potential library OR platform. This is mainly needed at the present to deal with PC speaker support, but it could be useful in the future for supporting alternate digital sound libraries such as OpenAL as well. Related to this, I repaired the ability to have music when the -nosfx parameter is used, by writing up code that the music engine can call to initialize and setup SDL and SDL_mixer if and only if the digital sound engine hasn't done it first. I could have done this originally, I just ended up taking the lazy route. The condition of the sound and music code at that time was pretty damn bad, so you really cannot blame me ;) -------------------------------------------------------------------------------- 11/05/08 SoM has completed a massive expansion of my VBuffer pseudo-class that has transformed it into EE's primary means of dealing with the screen buffer, period. VBuffers are now powerful, general graphic canvas objects that can blit and scale. The old screens array is now pretty much history. As a result of this work, SoM was also able to finally fix the disk flasher to work in SDL builds. It's nice to see that old feature available again, although EE has made it entirely optional, and it is disabled by default, since with the blazing access speed of modern hard-drives, it's nearly invisible anyway. -------------------------------------------------------------------------------- 11/04/08 Fixed a big problem with confusion between the detailshift and c_detailshift variables. One is supposed to be private to the renderer, and the other is for use by the configuration and console code, so that the state of the variable is not changed during bad times such as while rendering a frame. Failure to use the proper one meant that the configuration variable wasn't being propagated to the renderer at startup, leaving the game starting up in high detail mode even when low detail was enabled. Found out that the parameters extracted from the -geom command-line parameter were not being rangechecked when Kate tried to test out 1200x800 mode (which EE doesn't support quite yet). -------------------------------------------------------------------------------- 11/01/08 SoM eliminated almost all direct access to the video buffers outside of the V_ and R_ modules, reducing the number of drawing pipelines, which is important progress toward the ability to have features such as true color support. Vertical screen patch clipping has now been fully repaired. I fixed up C_Drawer so that it is not called while the -nodraw parameter is active. Now only the R_Init loading box currently appears, which is hard to get rid of without introducing some hacks. -------------------------------------------------------------------------------- 10/31/08 SoM split i_video.c up, creating a new module i_input.c, as I had noted needed to be done ages ago. :) SoM was also very busy with the following: * Palette update, when needed, is now performed during the screen update process in lieu of a call to SDL_Flip, instead of during gameplay. This is good for a number of reasons, not the least of which is the fact that it helps to abate problems with SDL's severe bug in DirectX 8-bit video modes which results in it moving the entire surface out of and back into video memory while applying an extremely expensive remapping operation to the entire buffer. * Palette changes are no longer lost when the user changes the gamma level setting, which is a bug stemming from the vanilla codebase. This was caused by not caching the current palette as set by the gameplay logic for effects such as radiation suit shielding, damage, and item flashes. This caching is now necessary anyway to support palette change on screen update, so it kills two birds with one stone. I have defined a set of flags for use by the GameModeInfo structure, with the goal of eliminating all of the boolean variables in the structure, which are just wasting a lot of space. -------------------------------------------------------------------------------- 10/29/08 SoM found a real optimization to work on in the form of adding virtual screen space to the screen buffers for resolutions whose horizontal dimension is a power of two, such as 1024x768, which have been noted to suffer from extremely disproportionate problems with cache misses. Fraggle explained this to me as a key clustering sort of problem. The cache is mapped to main memory through a hardware variation of a hash table. Each cache line represents a chunk of memory that is N bytes long, and N is invariably a power of two, such as 1024. This means that if your screen buffer is such a size, then every step down a row of pixels on the screen causes a cache line change, which means a potential cache miss. DOOM's approach of rendering vertical columns is unfortunately not very good when operating on buffers in main memory, as it typically has to do now. The addressing runs orthogonal to the direction of access, giving poor locality of reference to begin with. DOOM got away with this because it was using a small screen size and could write directly into the VGA buffer. Screen sizes of greater than 1024x768 are particularly vulnerable. Those below this, even power of two sizes, do not seem to suffer the same degree of crippling slow-down. Since EE will be adding widescreen support soon and raising the resolution cap considerably, this is important. Adding four bytes to the horizontal screen dimension was enough for SoM to see a 20 FPS improvement in timedemos in 1024x768. This approach has previously been implemented in the PrBoom-plus port, and thus we had been looking at adding it for quite a while. While he was at it, SoM also fixed up my console pausing feature, and improved the console command list to have a full filter parameter that searches for strings matching a prefix, as opposed to the simple alphabetic filter I had earlier implemented. -------------------------------------------------------------------------------- 10/27/08 - 10/28/08 I have completed a new texture loader which streams in the texture definitions through a byte pointer. It is capable of detecting and seamlessly handling both DOOM- and Strife-format textures, and I'm quite proud of it. I also cleaned up the gigantic mess that was R_Init, and to me at least, it seems to run just a little faster as a result. I don't think compilers are very good at optimizing 1000-line-long functions; there's just too much crap in the way of doing proper register allocation for them to deal with that much at once. Almost all of the stuff I moved out should have been written in separate routines originally, anyway, as they each deal with discrete, unrelated subproblems of texture loading. I also fixed a "conversion of bool to int" warning in the snes_spc library with a simple !! on the argument. This occurs on the interface between the C and C++ code in the library, since C does not have a builtin boolean type. -------------------------------------------------------------------------------- 10/26/08 I added an I_GetTicks routine which calls a platform-appropriate low-level timing routine for the purpose of timing optimizations. However, its resolution under Windows via use of the SDL_GetTicks routine is apparently insufficient, as it tends to return 0 a lot when timing routines such as R_FindPlane. I attempted to apply entryway's suggested optimization to R_FindPlane, which was to avoid calling sin and cos for flats with 0 angle, which is technically unnecessary. However, according to both timing and fastdemo results, this had absolutely NO measurable effect. sin and cos are implemented in Visual C++ with the optimizer running as single opcodes, fsin and fcos, which according to tables of Pentium IV and AMD CPU instruction timings, take somewhere in the neighborhood of 13 cycles for arguments between 0 and pi/2 (this is due to a hardware lookup table embedded directly in the FPU). Evidently a branch to check for angle 0.0f just doesn't save any real time. -------------------------------------------------------------------------------- 10/25/08 I have integrated Chocolate Doom's mouse acceleration behavior as an option against Eternity's usual mouse behavior, for the benefit of those users who find it to be better. I also added Choco's code for "novert" driver emulation. novert was a program used by a lot of serious old-schoolers to eliminate all vertical mouse movement, which by default causes relatively useless drift in the player's forward/backward momentum. SoM made some CPU usage improvements, since EE runs down CSonicGo's laptop battery too quickly :P -------------------------------------------------------------------------------- 10/22/08 Performed some streamlining of P_MobjThinker, even though my attempts at profiling EE seem to be leading me astray (I think that something is wrong with Visual C++'s profiler...) Removed various additional unnecessary or redundant demo version checks, including many dealing with linked portals, which are handled instead by the assertion of the useportalgroups variable, which is itself unasserted when demo_version < 333, as well as code to deal with the FLOATBOB and REFLECTIVE flags. -------------------------------------------------------------------------------- 10/21/08 SoM fixed an apparently long-lived and until-now-unnoticed bug with 3DMidTex clipping involving the lower-unpegged line flag. The clip window of the line would be improperly offset, allowing you to pass through the texture but blocking you at another visually unrelated location. It was just a little bad math. In preparation for attempts at some more serious optimizations in EE, I have moved the line->nodraw flag check from R_AddLine up to R_Subsector. There's just no point in making the function call if the line won't be drawn. I also moved a serious chunk of loop-invariant code dealing with handling of the fixedcolormap variable outside of the inner segloop. This is the most critical path of execution and yet it has sloppy stuff like that in it. And this stuff has been there all along, having survived both Lee's earlier serious optimizations, as well as Cardboard reorganization. That's what's amazing about it. Sometimes stuff like this doesn't catch the eye. -------------------------------------------------------------------------------- 10/20/08 Yet even more Heretic work. We are so painfully close to complete support. It now depends almost entirely on the finishing of the EDF weapons, inventory, and pickup definition systems. I tweaked the behavior of screenwipes on the transition from GS_CONSOLE to GS_LEVEL so that demos don't start up before the game engine has a chance to stabilize the screen resolution, etc. This makes sure that you have more time to process what's going on before the demo just suddenly starts playing, resulting in you missing some frames. In the process of this fix, I also found some serious issues with GS_CONSOLE that have evidently existed since SMMU: * Menus could be opened in GS_CONSOLE, which could cause some serious problems with responder/ticker/drawer order of execution, and the resulting undefined behavior would result in the game completely shutting down without any error message. You are now locked out of the menu system while you are in GS_CONSOLE gamestate. A message appears in the console if menu_toggle is activated alerting the user of this. * The console's C_InstaPopup routine didn't bother to check if the gamemode was GS_CONSOLE, so it would leave you staring at a screenful of HOM with no way to control the game if anything managed to activate it. I have also added screen-centering to EE for windowed video modes, via setting the appropriate SDL environment variable at startup. -------------------------------------------------------------------------------- 10/16/08 More Heretic fixes and additions. Fixed the ability to use -timedemo for entryway, who is interested in profiling EE against other ports. -------------------------------------------------------------------------------- 10/15/08 Heretic thingtype support is now at 77% after massive addition of inventory and weapon additions (the thingtypes are currently inert and do nothing but look pretty). Mapthing types are now 99% implemented; the only unimplemented mapthing type is the mace spot, which is handled very specially in Heretic (some might say strangely...) Added the MF3_RIP flag to support Heretic projectiles that pass through shootable things. The flags3 field is now unfortunately 100% used, however, so with the next needed flag it'll become necessary to rewrite all code segments that utilize the deh_ProcFlagsCombined routine to handle an array of four results rather than three. This is going to be a little bit of work, but not much, since I anticipated most of the problems back when combined flag support was initially added. -------------------------------------------------------------------------------- 10/14/08 Eliminated the unnecessary demo version check on the PUSHABLE flag. There's no need for any demo version checks on flags in the MF2/MF3 flag fields, because such flags never existed and are not set on any of the original objects, or at least not in a way that makes any difference in behavior (some may be set to on to provide for original behaviors, of course). This causes the first demo in Heretic v1.3 to sync for longer than it did before, as the player was previously stopped by unpushable pods in the hallway. Heretic demo support is still a lost cause, but I have enabled the playing of Heretic demos nonetheless, because they make the title sequence more interesting even when they desync ;) -------------------------------------------------------------------------------- 10/13/08 Restructured the screenwipe engine to support multiple arbitrary wipe effects. I immediately took advantage of the new system to support the Strife cross-fade effect, which can now be used in any gamemode by setting the wipetype console variable to "fade" - as a Heretic purism fix, you can also now set the wipetype to "none," which will disable the wipe engine altogether. EE will probably default to using the cross-fade wipe in Heretic and Hexen, however, because I think it fits those games very well, and that Raven's leaving out of a wipe routine was a mistake. Their sudden abrupt transitions look kind of sloppy by comparison. -------------------------------------------------------------------------------- 10/12/08 I have removed the R_DYNASEGS define and the now-dead code for the old handling of PolyObjects that it was holding out of the engine. The dynaseg code has proven stable and perfectly working in all tests thrown at it thus far. Removed some dead code and debugging stuff from the bunny scroller. -------------------------------------------------------------------------------- 10/11/08 SoM has seriously cleaned up and fixed the patch scaling code, so that horizontal clipping now works properly again. There are still lingering problems with vertical clipping, which will also be addressed soon. SoM also found time to apply a patch to the renderer which enables the drawing of a full 32 unique lighting levels, the most that can be supported by the normal COLORMAP lump without significant changes to the renderer. This makes new maps that use tons of lighting sectors look a lot better, while having minimal impact on old maps (it's practically impossible to tell the difference where it exists). -------------------------------------------------------------------------------- 10/10/08 Repaired some serious issues with the bunny scroller in non-320x200-aspect resolutions (most of the bunny scroll wasn't visible). Some of these bugs are stemming from serious problems in SoM's recent screen patch scaling rewrite, which need to be addressed as soon as possible. Made changes to Heretic menu sound behavior so that it matches the vanilla EXE more closely where applicable. I have started to lean more and more toward Heretic purism since the GPLing of the source code. My excuse for having incompatibilities has suddenly vanished, and with Choco-Heretic on the horizon, people will probably be expecting compatible behavior from Eternity. -------------------------------------------------------------------------------- 10/08/08 Moved the PLAYERRADIUS define to am_map.c because that's the only place where it has ever been used. Added the ability for bringing down the console to pause the game, but this is in beta and has several known problems. -------------------------------------------------------------------------------- 10/04/08 With the recent release of the Heretic and Hexen sources into the realm of the GPL, the way has been cleared for the mass addition of Hexen codepointers in advance of actual Hexen gamemode and EDF support. Most of the functions are only stubs, many are functionally incomplete, and yet others may change in implementation more than once before they get documented and added to the array of BEX pointers. -------------------------------------------------------------------------------- 10/02/08 I have made further adjustments to D'Sparil's sound behaviors for Heretic compatibility. I'm really not sure which of D'Sparil's sounds could and could not cut each off in the vanilla executable, but I've at least gotten it to where the most conspicuous ones will not do this. Added the d_iwad.c module from Chocolate Doom, but EE is not currently capable of using this code. It'll have to sit around and get bit-rot until I feel like modifying the d_main IWAD finding code to support what I want it to be able to do, which is provide an IWAD loading menu for cases where no immediate wad was found, or where multiple valid wads are available. Most importantly, I have rewritten the sound update loop to be perfectly thread-safe after further investigation of SDL_mixer's multi-core problems, which are caused by some sort of unknown thread contention/race condition issue. It turns out that we ourselves have not been perfect in this department either, and the SDL_mixer thread can get into race conditions with the low-level sound code if the channels array is modified during sound buffer updates. I've fixed it up by using semaphores to protect the channel data, and by completely inverting the sound loops for efficiency reasons. As a side-effect, the sound update loop is also even faster than before. Locality of access and register motion are vastly improved. After extensive testing, this does appear to improve stability on multi-core systems, but does not eliminate 100% of the crashes - some of them are still stemming from somewhere within SDL or SDL_mixer itself, and so far my efforts to get those improved have fallen on deaf ears. The SDL guys don't seem to be interested in any of my bug reports or patches. -------------------------------------------------------------------------------- 09/29/08 I have disabled the adjustment/scaling of mouse input relative to the screen resolution in windowed modes, because this scaling is inappropriate and unneeded under Windows, at least. It actually causes the mouse behavior to differ between resolutions, since the behavior of the SDL mouse input under windowed video modes appears to be entirely defined by the desktop resolution and Windows system settings for mouse sensitivity. SoM finally fixed a line portal HOM issue that had apparently been driving him nuts for a while. -------------------------------------------------------------------------------- 09/27/08 I updated the text screen emulation code with segments from the most recent Chocolate Doom commit in order to add proper support for blinking text, which was previously being interpreted as extended foreground/background colors instead (this was a bug in fraggle's original implementation that we dragged in and then neglected to fix for ages). Rewrote the Heretic status bar chain-end shader routines after I found out that they were broken in aspect ratios other than that of 320x200. The single new routine is now based on V_DrawBlockS and is used for all resolutions, even unscaled. -------------------------------------------------------------------------------- 09/25/08 FreeBSD portability tweaks courtesy of Kate: * linux/limits.h is just limits.h on that platform. * NO_FCVT must be defined to provide an fcvt function for psnprintf. * malloc.h is needed in mmus2mid.c for reasons I cannot imagine. -------------------------------------------------------------------------------- 09/18/08 Eliminated our dependency on the SDLmain library under the belief that it may have been linked to unnecessary Win32 libraries causing the phantom dwmapi dependency. It turns out that for a Win32 console library, SDLmain simply isn't doing anything at all - it just redefines our own main, and then calls it directly without doing anything else. But, this still has not removed the dwmpai dependency. I don't think it's possible to do anything about it. Fixed a weird bug in my menu paging change of 9/13 that could leave the item selection caret on non-selectable menu items. This wasn't really harmful, as in it didn't crash anything, but it was very weird to see and confusing to use. -------------------------------------------------------------------------------- 09/14/08 Added -geom command-line parameter to match PrBoom-plus. It allows the user to specify all parameters of the video mode in a simple string like the following: -geom 1024x768w This particular parameter would put the game in 1024x768 windowed mode. -------------------------------------------------------------------------------- 09/13/08 Applied a tweak to the menu system which allows the page to change if the user moves up or down beyond the first or last item on a page respectively, after continuous complaints about the way that paging works. If I keep adding new ways to page between menus, we're going to break some kind of record for redundant interface gestures :P Attempted to fix a problem which is apparently wide-spread. Software compiled under Vista using VC2008 and the most recent Win32 SDK results in an executable that will not run on Windows XP boxes if they have Internet Explorer 7 installed. There's some kind of ridiculous dependency leak which results in the software trying to load dwmapi.dll at startup. This is a Vista-only DLL which is part of the dynamic loading business. I initially attempted to get rid of the link to shell32.lib by using LoadLibrary to get at the RemoveFileSpec routine, but this did nothing. So I rewrote the code in question again to simply use our own portable M_GetFilePath routine from m_misc.c - this still did not remove the phantom dependency, however. I think that MS needs to stop being lazy and have different compiles of IE for XP and Vista, instead of making everybody else's stuff break. It simply isn't possible for EE to use LoadLibrary on every single system function it calls. Without doing that, I'm not sure how it will ever be possible to weed out this dependency; it appears to be traceable through multiple dynamic libraries. -------------------------------------------------------------------------------- 09/12/08 Repaired a serious bug in parameterized ceilings: an uninitialized variable in the setup routine would end up propagating a semi-random direction into the ceiling thinker, causing erratic behavior as a result of most parameterized ceiling actions. -------------------------------------------------------------------------------- 08/25/08 Inventory base-class flags are now defined for a ZDoom-equivalent level of functionality. I have applied a fix for the upcoming "Evil Unleashed" E5 project - sky floor visplanes of differing height are no longer merged. This is apparently something that ZDoom has done for a long time. I am concerned that this could cause a compatibility issue with older maps, though, so I'll need to stay aware. If such a problem is found, I'll provide a comp var to handle it. -------------------------------------------------------------------------------- 08/23/08 Tuned up the screen patch code to eliminate a bunch of dead code and unused variables left after SoM's scaling fix rewrite. I am also laying significant ground work for the EDF inventory/pickups/weapon system. -------------------------------------------------------------------------------- 08/18/08 Recoil values are now mapped through the weaponinfo structure (as they should have been all along) in preparation for EDF weapon support. I also added a new weapon flag, ALWAYSRECOIL. Besides being a good feature for editors, I believe this will be needed for the Heretic Phoenix Rod, which has always had a recoil effect on it. -------------------------------------------------------------------------------- 08/17/08 I have repaired EE's ability to allow the BFG to use zero ammo per shot by making a small change to the P_SubtractAmmo function - the value passed in the second parameter must be tested for a less-than-zero condition, not a less- than-or-equal-to condition. -------------------------------------------------------------------------------- 08/16/08 By request I have implemented the ability to use screen patches as well as linear graphics for the Heretic Demon Scroller episode finale. This just required some creative use of the VBuffer code. A new function has been written to support the creation of unscaled (320x200) VBuffers. I also had to fix another problem caused by SoM's recent scaling rewrite. V_DrawPatchInt was using the Cardboard video struct to initialize the screen patch scaling factors, when it actually needed to calculate these based on the dimensions of the passed-in VBuffer object. A while back I added some new toy console commands and tweaks to the summon command that allow you to pretend you're an Arch-vile. By combining the summon of a VileFire object with the new vilehit command, you get a very authentic attack. It's really fun to launch enemies with this. -------------------------------------------------------------------------------- 07/05/08 Blocks and masked blocks alike are all now fully clipped to the boundaries of the screen, like screen patches, forever eliminating any potential for those annoying "V_DrawBlock: block exceeds framebuffer boundary" errors, and allowing the console text to properly clip at the top. I tweaked console background drawing to change the amount of shading applied, especially to the background used in Ultimate Doom, which is already very dark on its own. I altered all of the e_ family of console commands to account for the better formatting capabilities of the new console font. You can now spawn homing fireballs from the console if you are aiming at an enemy when you issue the summon command. If the player has an aim target, it will be set as the tracer target of the fireball. Fireballs which have homing maintenance pointers will then properly home-in. This is fun to use with the Revenant missiles. -------------------------------------------------------------------------------- 06/29/08 EE hit a major milestone today with its 500th SVN revision. It has been about 300 revisions since the last release, which should speak untold volumes about the amount of work that's going into the next upcoming release. The ACS interpreter has been further decoupled so that multiple threads of execution can be supported on an individual script within the same codebase. This will allow implementation of ZDoom features such as ACS_ExecuteAlways, but this is again currently low priority. Getting the system up to basic Hexen-level functionality is my main concern. I finally broke down and wrote up support for the drawing of fonts that are made up of a single linear-format graphic. Users can now provide fonts between FONSTART and FONEND lumps, and these are automatically enumerated by the engine to succeed the natively-defined fonts; this makes user fonts automatically accessible to all Eternity features that allow the specification of a font, such as HUD text widget scripting. I took immediate advantage of the new system by providing a new console font which is of constant width and distinguishes properly between upper and lower case; console readability and formatting are vastly improved with this change, especially in Heretic where it was a major problem. I also added a new zone allocator tag, PU_RENDERER. This is used to replace an unmaintainable code segment in the renderer added by fraggle in SMMU which is called before R_Init when wad files are loaded at runtime - a giant list of Z_Free calls on all renderer-related allocations. These allocations now use the PU_RENDERER tag, and the list of frees is replaced with a single call to Z_FreeTags(PU_RENDERER, PU_RENDERER). If we are going to maintain the zone system, we ought to be using it to its fullest potential :) The Doomguy will now make the status bar OUCH face when he screams during a terminal fall with falling damage active. This looks really awesome IMO. -------------------------------------------------------------------------------- 06/26/08 The ACS virtual machine has now been decoupled from the level script codebase, allowing multiple ACS virtual machines to exist on independent codebases at one time. This may open the door to supporting such ZDoom features as ACS libraries in the future. This is not currently planned as a short-term feature, however. -------------------------------------------------------------------------------- 06/22/08 I fixed a bug in sound subchannels which would have caused all sounds played by an object to cut off if any of the sound subchannels were stopped. I macroized the span drawers to enable easy addition of code for translucent and additive-blended flats, which will be needed for two features - portal overlays, and Doom64-style double flats. In the process, I upgraded EE's flex-tran lookup tables to the 32K versions used by ZDoom. For some reason, my implementation of additive translucency was not working properly, and in order to fix it I needed to change up to the newer system. Additive transluceny is now vastly improved, and normal translucency looks significantly less green. I have also renamed all functions of the Small scripting interface code to use a SM_ prefix instead of A_, which is for action functions. I have NO idea what I was thinking when I overloaded it originally. -------------------------------------------------------------------------------- 06/13/08 Damage types mop-up: actor elemental pain and death states can now be specified in lists within the EDF thingtype definition. I added a defaultsprite field to mobjinfo as well, which is needed for controlling the remapping behavior of player skins and monsters with more than 29 frames (which must use additional sprite names). This allowed me to safely implement the Heretic player's burning death sequence, which cannot be remapped through the Corvus skin. If an EDF thingtype does not define a defaultsprite, its defaultsprite is instead read from the sprite field in its spawnstate, for what should be near-100% backward compatibility. Mobj sound subchannels have now been implemented, which means that each object can now have up to 8 simultaneous sounds playing, rather than just one. Unlike ZDoom, however, EE does not by default change the behavior of any sounds in DOOM. All sounds are setup to use CHAN_AUTO by default. If the EDF sound definition specifies a specific channel to play on, that will override the default behavior. Heretic is a different story however, as it already allowed certain objects to play more than one sound under special cirumstances. One such circumstance is D'Sparil, who never cuts off his demonic chants and seems to be able to say more than one thing at a time. I have thus made the appropriate changes to the sound-playing codepointers in his frames to specify what channel each sound he makes should play on. All Heretic monsters have additionally been altered to use the new PlaySoundEx codepointer (once again implemented from ZDoom's online documentation) rather than the old MBF PlaySound pointer. EDF keywords for action function parameters have been changed so that they are contextless - in other words, I don't care what action function the frame is using; each keyword always has the same meaning. This fixes some ugliness in the source and some usability issues, particularly with framedeltas that do not happen to set the action field before trying to specify arguments. Keywords are now specified in arrays near the codepointers that use them, and the BEX hash init routine takes care of collecting these and turning them into one large table. If a keyword conflict is detected during table building, it will be reported and the program will abort, allowing development to catch the problem immediately. I got rid of a line of HOM that was showing up at the bottom of the console by adjusting the console clipping code in the renderer to start one pixel higher. -------------------------------------------------------------------------------- 06/04/08 Custom damage types are now integrated, but custom actor and pain states are still a TODO item. I added a Quake damagetype for the damage done by Hexen earthquakes, and defined a BEX obituary string for death by shaking. -------------------------------------------------------------------------------- 06/01/08 Groundwork has been laid for the support of custom damage types in EDF. MODs (or Means of Death) were previously only an internal enumeration; they have now been promoted to named and numbered objects that are stored in a hash table, and make reference to the strings they cause as obituaries. The most important use of these, however, is for supporting multiple elemental pain and death states for thingtypes. I have modified DEH_String to return the value given to it as a parameter when that parameter specifies an invalid BEX mnemonic. This prevents the issue of having to check for NULL that would otherwise exist, and also makes sense in a round-about kind of way, since passing any other string to it in most contexts would mean you actually just wanted to use that string. -------------------------------------------------------------------------------- 05/31/08 Added Z_SysMalloc, Z_SysCalloc, and Z_SysFree functions to z_zone for allowing the direct use of C heap memory. This is needed so that we can move large static buffers off the zone heap and keep it in good shape regardless of how large a screen resolution cap that EE implements. The zone system was designed in essence to dynamically cache data. Placing any static allocations on it in actuality fails to make sense. However, I am not eliminating any use of PU_STATIC other than for exceptionally large, one-time- allocated buffers like the screen, primarily because use of two heaps at once will inevitably lead to code maintenance issues such as mixing the wrong malloc and free, causing bizarre-looking and hard-to-fix bugs. I have defined libConfuse options for most of what will become EDF inventory subclasses. These largely match the classes defined by ZDoom, with a few natural differences for EE, and also where I feel I have the opportunity to address what appear to be design oversights or questionable decisions in that port. -------------------------------------------------------------------------------- 05/29/08 Added an unreasonably high limit (100 states) on the number of walking frames that a single player thingtype can have, in order to ensure that the function E_IsPlayerInWalkingState will always terminate regardless of how the frames have been (mis)defined in EDF. I fixed a bug in EDF sound DeHackEd-number auto-allocation. I also had to comment out my magnificent enhanced Z_Realloc implementation and restore the old original function. There's something wrong with it which causes an extremely rare heap corruption problem (block size does not touch next block) which was apparently the cause of EDF occasionally crashing out at startup (libConfuse generates several thousand calls to realloc during the course of parsing the EDF files). I cannot find the problem in the function after walking the code several dozen times, so I'm stumped on it. -------------------------------------------------------------------------------- 05/25/08 Moved specification of player movement speed values into EDF player classes. Fixed PolyObjects to draw in the correct place on the automap when they exist inside linked portals. Dynasegs messed this up temporarily. -------------------------------------------------------------------------------- 05/23/08 More codepointers: * CheckPlayerDone * FadeIn * FadeOut I have also implemented an alphavelocity field for EDF thingtypes, and I have also added a new flag MF3_CYCLEALPHA, which causes an item to constantly cycle its translucency from 0 to 100%, inspired by the effect ZDoom applies to its partial invisibility sphere. Alpha velocity and cycling are powered by a counter in P_MobjThinker. On top of this, I also eliminated all instances of hard-coded "args max"; that is, everywhere I previously deliberately coded args arrays to be limited to 5. This is important since I am contemplating extending frames to contain at least 8 arguments. -------------------------------------------------------------------------------- 05/22/08 I have begun adding some ZDoom-equivalent codepointers by referring to the documentation provided on the ZDoom wiki. I have not been using any ZDoom code whatsoever during this process, and so the resulting action functions are 100% original GPL code. The first round of codepointer implementation added the following: * AlertMonsters * JumpIfTargetInLOS * SetTranslucent -------------------------------------------------------------------------------- 05/16/08 - 05/21/08 Prompted by problems esselfortium was having with his new level, I have designed and completed the implementation of a true dynamic seg system for the rendering of PolyObjects. "Dynasegs" are exactly what they sound like - segs that are generated dynamically and, via application of binary space partitioning theory, are recursively split through the BSP tree until they end up attached to the appropriate subsector. This allows PolyObjects to span nodelines without causing the PolyObjects' lines to block out normal linedefs in front of them by violating DOOM's front-to-back drawing order assumptions used by the screenspace clipper. This system is powered by application of the generic line function ax + by + c = 0 ; the vertices of each linedef are classified with respect to each node line. If the sidedness of the vertices differs, then the intersection point is calculated and the initial starting seg is split. The two resulting segs then recursively descend to the appropriate child nodes on either side for yet more splitting. This continues until each seg settles into a subsector, into which it is linked for later rendering. The real segs of the PolyObjects are not used under this system, and in fact I have had to add code to the seg drawer which causes the original segs to never render, as they sometimes appeared to be stretching from the location where the PolyObject was built to the location where it was rendered. There are some possible numeric instability issues, particularly in the use of the R_PointOnSide function, but initial testing hasn't revealed any cases where this is important so far. If it becomes an issue, I will have to provide my own equivalent routine which does a more stable test. Note that when classifying segs with respect to the node lines, it is important to employ an epsilon value. If a dynaseg is too close to the partition line, then the usual course of action should be to classify that seg as being on the same side of the partition line as the PolyObject's midpoint. Without this epsilon test, dynasegs actually render worse than normal PolyObjects in some circumstances - ironically, being more mathematically correct makes them cause more rendering problems. This is only an issue, of course, because people technically use PolyObjects incorrectly. BSP theory can only tolerate dynamic leaves / surfaces so long as such surfaces are separated from the static surfaces in the scene by a plane. When DOOM and Hexen mappers build PolyObject doors with the PolyObject lines exactly coincident to the lines of the door jamb surrounding it, they are violating this fundamental rule. Since PolyObject doors NEED to be coincident with the door jambs in order to look good, it is absolutely necessary to account for this by use of the epsilon test. -------------------------------------------------------------------------------- 05/13/08 Eliminated most of the remaining Eternity Total Conversion things, frames, and sounds defined in EDF, as well as the codepointers to which they made reference. The few that now remain will eventually be absorbed into Hexen support (this is the fog spawner, primarily). EDFs have now been split into subordinate files for each gamemode that live in that gamemode's directory under the base folder, and are conditionally included by the root EDF when the respective gamemodes are enabled. A new function, includeifenabled, was added to support this and get around the fact that including a file inside an ifenabled call would preclude the use of any ifenabled function calls inside the included file. Fixed a serious bug in screen patch clipping from SoM's recent scaling changes that was causing patches part-way off-screen to not draw at all, like it worked before the system was redesigned. -------------------------------------------------------------------------------- 05/08/08 Eliminated almost all uses of PATH_MAX in the source. This required extensive changes to file path handling code segments, particularly in d_main.c - Z_Alloca and a new Z_Strdupa function were used to help out with this. -------------------------------------------------------------------------------- 05/06/08 Eternity will no longer map sky visplanes for both the floor and the ceiling together. This caused sectors with sky in both the floor and ceiling to display HOM on the floor, and is an original vanilla glitch. -------------------------------------------------------------------------------- 05/05/08 In preparation for a maintenance release, I have done some mopping up of issues previously identified in the changelog: * Menus now display the name of the first key bound to the page up/down actions in the indicator text for the presence of a next or previous page. * Parameterized lighting actions now apply to the backsector of a line if started from a linedef and given tag 0. * FLOATBOB objects no longer have MBF torque physics applied to them. There are a few other issues remaining, but they are too complicated to fix at the moment. -------------------------------------------------------------------------------- 05/04/08 Added some code to memset new buttons to zero when the array is reallocated, to avoid possible problems caused by uninitialized buttons. Added the SPC preamp and bass boost variables to the configuration file, and made the bass boost option actually do something (I left out some code that was needed in its command handler routine). -------------------------------------------------------------------------------- 05/03/08 Some playtesting in Doom 2 revealed that my previous changes to switch sounds were yielding results far from satisfactory, since the sound of a switch could often occur at a point extremely distant from the switch linedef (this is due to the fact that a sector's sound origin is placed at its center, a point which can be outside the sector itself if it is large and concave or unconnected). Instead of simply copying the sector sound origin's properties directly, buttons now set the location of their degenmobj_t soundorg to the midpoint of the switch linedef, using this code: button->soundorg.x = line->v1->x + line->dx / 2; button->soundorg.y = line->v1->y + line->dy / 2; Results are now perfectly what you would expect. What would be interesting is if all linedefs already had a sound origin at their midpoints... -------------------------------------------------------------------------------- 05/02/08 Over the past few days I had been experimenting with the snes_spc 0.9.0 library for playing SPC music, having integrated SDL audio playback and filtering into one of the test programs it comes with. Today I added the library into Eternity as a subproject which compiles to snes_spc.dll under Win32, and added conditionally compiled code (using symbol HAVE_SPCLIB) into i_sound.c to support playback and amplification/bass boost settings. Eternity now supports SPC music. -------------------------------------------------------------------------------- 04/28/08 I got bored at work and decided to go ahead with a previous plan to change the gameModeInfo variable to GameModeInfo, since a capitalized name more properly reflects its status as a very important global variable. -------------------------------------------------------------------------------- 04/23/08 Sound samples are now converted and filtered on load to 44.1 kHz instead of being interpolated into the audio stream during playback. This has sped up I_SDLUpdateSound quite a bit, at the cost of some memory. The FatAttack series of Mancubus attack codepointers will no longer crash the game if the enemy using them does not have a valid target. These are some of the only pointers that never bothered to check actor->target for validity. I'll fix any others that I happen to see from now on. -------------------------------------------------------------------------------- 04/20/08 Esselfortium pointed out that it should be possible to use parameterized line special numbers directly on linedefs, since such specials never make use of the line tag field anyway. So it is now possible to use the line special numbers directly, and use only the tag field to refer to the ExtraData linedef record which holds the args and activation flags for the line. This makes line special 270 (ExtraData Control Line) obsolete, but the special will still be supported for backward compatibility, and in case there are ever instances in the future where it is actually needed for something. I also lengthened the amount of time that blood drop particles stay on the ground, by user request. -------------------------------------------------------------------------------- 04/17/08 Added savegame support for buttons at long last. DOOM never saved the buttonlist which would cause reusable switches to freeze in the on or off state if you saved the game before they popped out and then reloaded it. Since I removed all of the line and sector pointers from the button_t structure to enable efficiency for the previous rewrites, writing and reading the structures to/from the save file is as simple as a call to memcpy. -------------------------------------------------------------------------------- 04/16/08 I started reformatting the texture caching/construction code in r_data.c -- this stuff is one of the larger messes still left from the DOOM source code. I also worked on fixing DOOM switch bugs: * Limit on buttons has been removed. The buttonlist array will be reallocated if it manages to fill up. Buttons are now always used for switches, even if the switch will not make a later sound. * Switch sounds always come from the correct origin now. The previous behavior was actually semi-undefined and random, and cannot be emulated with the new code. I do not intend to provide a comp flag for this, as it has absolutely no impact on game play and cannot be intentionally exploited in a meaningful way. * Switch sounds can no longer be cut off by movement of the sector in which the switch resides. This fix was necessitated by the previous one. Buttons now contain their own independent sound origin (degenmobj_t) which has its properties copied from the switch sector's. * Eternity parameterized switches activated from the back side will now change the texture on the back side of the line properly, and the sound will eminate from the line's backsector instead of its frontsector. I seem to have fallen asleep half-way through writing this code earlier. -------------------------------------------------------------------------------- 04/13/08 Change to the EDF sound DeHackEd hash table to make it fully dynamic. I have eliminated "additive" sounds as a result, and all sound entries are now treated uniformly. This means that you can even change the DeHackEd number of a sound by redefining it inside an ESNDINFO or ESNDSEQ lump. I also as a result made sound defaults parsing last-chance, as it should have already been, and I also fixed the outstanding issue of there being no defaults parsing for sound sequences. -------------------------------------------------------------------------------- 04/09/08 Reformatted the sloppy old Eternity TC frames still in frames.edf -- these are going to all bite the dust very soon as I'm tired of looking at them. I also added delete.me files to ALL otherwise empty base/game folders, to ensure that they will end up in the distribution zip for the next release. -------------------------------------------------------------------------------- 04/08/08 Various additions to libConfuse: * Function-valued options are now possible with some lexer and parser tweaks. This is used to allow the action field of frames to provide the args in parentheses. This syntax is also now supported in cmp frames, and the previous method of args specification in cmp strings will be considered deprecated in the next release. * Keyword values are now supported in args and misc fields, including when they are specified as arguments of a function value. The keywords are stored in a large hashtable in e_edf.c and are relative to the context - the only ones with meaning for a given codepointer are ones that the codepointer expects as possible values to its arguments. * Cascading namespace resolution for unqualified names in args and misc fields. This makes specifiers such as thing: and frame: unnecessary most of the time, although they are still supported for situations where disambiguation is required. The namespaces are searched in a fixed, pre-defined order. I also did significant work on the gameModeInfo structure, moving more data into it, and merging it with the gamemode/gamemission variables. There is now once again one gamemodeinfo_t for each gamemode, and in addition, there are now missiondata_t structures which are applied over their respective gameModeInfo object at startup. They work much like EDF delta sections by replacing whatever fields in the gameModeInfo for which they do not possess the default value, which is typically 0 or NULL. My goal is to continue the process of getting rid of branches on gamemode and gamemission to the point where adding Hexen and Strife gamemodes will be nearly as simple as defining gamemodeinfo_t objects for them. It will already be a lot simpler than it was for Heretic, which I had begun support for before the gameModeInfo system was even an idea. -------------------------------------------------------------------------------- 03/29/08 SoM pulled out all of the linked portal clipping code so that he can start over with it. Various bugs and design issues required this. -------------------------------------------------------------------------------- 03/23/08 Added a separate noway sound to skins for compatibility. Legacy skins only normally allow "oof" and just use the oof sound for the noway sound. Even though the sounds are the same in the normal IWAD, they are still two different sound entries and could be replaced with different sounds by user mods. I also applied a minor fix to my previous tracer tweaks. -------------------------------------------------------------------------------- 03/21/08 Added heredoc syntax to the libConfuse parser in anticipation of being able to store interpreted scripts directly in EDF. I am currently examining Lua as a candidate language, but I am less than impressed with some of the features it lacks, and others that it does in ways I do not like. It certainly will not satisfy my desire for a scripting language that can bond to Doom's data structures at a level of abstraction lower than function calls. In order for the action routines to be efficiently and maintainably moved out of native code, I really need structure-like access. Unfortunately virtually no languages seem to provide this, other than JavaScript which is pretty much already ruled out by its size and heap incompatibility. Further tracer code refactoring. I have broken up the functions into normal and compatibility codepaths in order to keep the logic understandable, and I have factored out a lot of common code into external functions, reducing the +1000 line tracer functions to mere shells. -------------------------------------------------------------------------------- 03/18/08 Removed a weird no-op assignment hack in the seg rendering code. SoM later explained this as a debugging break-point that had escaped into the wild. -------------------------------------------------------------------------------- 03/17/08 libConfuse files are now buffered in memory instead of being read directly through DWFILE objects. This allows me to do arbitrary look-ahead during tokenization without requiring the use of input stream rewinding, which is hackish at best. I disabled adjustments that were made to tracers in revisions 406 and 408 due to some severe game-breaking glitches. It had become impossible to fire down off of ledges, and it was also impossible to beat Baphomet on DOOM II MAP30 due to your aim passing through the 2S lines and causing you to fire your rockets directly at the Boss Brain object instead of through the hole in its head. I took the opportunity to move all tracer-related code out of the overcrowded p_map and p_maputl modules into its own new module, p_trace, and refactored some code while doing so. I moved all demo comp checks being made for linked portal tests into the already exising R_*Active inline functions. There's no sense to having to test for this separately everywhere. SoM followed up by making sure that no linked portal logic can activate during old demos. I also changed all access to sector floor/ceiling portal cameras to use a new inlined function instead of going through 8 or so levels of indirection. This was extending a lot of source lines well past column 90 in some cases, and was awful to look at. -------------------------------------------------------------------------------- 03/16/08 Removed an accidental extra parameter to E_EDFLogPrintf in e_string.c. This was probably left over after some code refactoring. -------------------------------------------------------------------------------- 02/19/08 Fixed a long-standing problem with ACS line special execution via stack arguments. My reading of the zdoom documentation incorrectly resulted in misinterpretation and I was putting the arguments on the stack backward. I'm not sure when I would have noticed this if not for the "script 0 not found" error that it caused on the Shadow Wood. A lot of Hexen areas have suddenly come to life since fixing this, including the complicated rooms full of pits and smashing pillars on the Guardian of Ice and Shadow Wood areas. -------------------------------------------------------------------------------- 01/25/08 Made a test commit for Manc since the repository has moved to a new server. I added protocols for the new wipe functions to the headers and fixed an error in the HTML table of contents for the editing reference doc. -------------------------------------------------------------------------------- 01/13/08 Removed a lot of dead code related to linked portals. -------------------------------------------------------------------------------- 01/08/08 Began work to integrate flat rotation. -------------------------------------------------------------------------------- 01/03/08 SoM made another fix to the Cardboard rendering hack for glass sector support, and fixed a problem with screen resolutions of >= 320 width but 200 height. I made some changes which *might* increase the efficiency of screen wipes when wipewait is enabled after noticing that they were going painfully slow. -------------------------------------------------------------------------------- 01/02/08 SoM added a critical fix by removing the realx/yarray lookups and replacing them with a different scaling lookup which works like expected. This fixes, amongst other things, some hacks in screen patch scaling, and most of the problem with garbage above the status bar in some resolutions. -------------------------------------------------------------------------------- 12/30/07 Julian nominally joined Team Eternity as a full programmer and contributed some warning fixes and some other minor tweaks. We will probably not see him again for another whole year, though :P -------------------------------------------------------------------------------- 12/25/07 Fixed a bug in Lost Soul charging caused by changes for linked portals. The code was using dest->target instead of actor->target to determine the location to charge to, causing Lost Soul charges to go basically nowhere most of the time. I don't know how long this was broken or why it took so long for me to notice/figure it out. -------------------------------------------------------------------------------- 12/22/07 I made some needed modifications to jumping, including adjusting the jump height to match Hexen, removing the MIF_ONMOBJ flag from the player when he jumps off the head of a monster (not doing this enabled you to literally fly across the map by jumping up the side of a monster in just the right way...), and adding and tweaking a jump timer which keeps the player from jumping for a certain amount of tics after landing from a previous jump. I changed this value significantly from what is used in zdoom, as using the value they use caused the player to accumulate a significant amount of viewheight lowering on each consecutive jump. If you pogo-sticked in place long enough, your view would literally be touching the ground every time you landed. The effect was a bit like sea sickness. -------------------------------------------------------------------------------- 12/21/07 Joe added jumping at long last. -------------------------------------------------------------------------------- 12/16/07 Added comp_planeshoot to the compatibility options menu, and I also changed the textual description of some of the other compatibility options, in particular the 3D object clipping option, to make their purpose and effects more clear. -------------------------------------------------------------------------------- 12/14/07 Added a delete.me file under the base/shots directory so that it will appear in zips and tar.gz files, which don't generally like to store empty directories. I also got rid of the old extinct windirs.bat script, which was used to copy around eternity.wad and the EDFs when creating a new install of the source code before I came up with and committed to the repository the whole base hierarchy. -------------------------------------------------------------------------------- 12/03/07 Invented a work-around for the problem of palette-changing lag in fullscreen under recent SDL versions by adding support for rendering the game in 8-bit but copying the triple buffer to a 32-bit video surface. This way, palette changes only occur in the logical space and do not propagate to the hardware surface, where for some reason SDL now causes the program to block until the next hardware screen refresh. The hack is activated by use of the -8in32 command-line parameter. This causes EE to ask for a video surface of the configured resolution but in 32-bit color depth rather than 8-bit, and enables the cross-bitdepth updating code. -------------------------------------------------------------------------------- 12/01/07 Fixed a very early MacOS portability issue. For some reason errno was not visible in lexer.c on this platform, so I added an include of the appropriate header. -------------------------------------------------------------------------------- 11/13/07 Joe added functions to Small for changing flats and textures, to match those in ACS. -------------------------------------------------------------------------------- 10/20/07 Found out that all this hubbub with Linux and Win32 netcode supposedly being incompatible was due to Joe using the DOOM v1.9 (not Ultimate Doom) IWAD. Since E1M1 is significantly different between those versions of the game, an instant desync would result as soon as we did anything other than just move around in the opening area. Oh well, all the things I fixed needed to be done anyway ;) While co-opping with Joe I found a network-only sound engine bug. Due to some changes made in SMMU and EE, if a player started a sound before all the other players in the netgame had spawned, the game would crash. This was triggered by beginning the next level with the chainsaw selected as the current weapon. The rev-up sound would crash one node and hang up the other. -------------------------------------------------------------------------------- 10/19/07 I completely changed the way that startup data is transmitted by removing the possibly dangerous and non-portable assumption that the netcmds array of ticcmd structs can be indexed and iterated over as a byte array. Joe and I still cannot play a netgame. -------------------------------------------------------------------------------- 10/17/07 Added a VerifySDLVersions function to the debug version startup code after Joe turned out to be using a severely out-of-date version of SDL_net. This function tests the expected, compiled, and linked versions of the SDL libraries, and if any suffer a mismatch, a warning message appears. However, updating SDL_net did not fix our netgame problems. I continue to try to find the cause of these desyncs. -------------------------------------------------------------------------------- 10/16/07 Began efforts to get the netcode working again by restoring huge segments of code in d_main.c and d_net.c to their state as of MBF, and added the i_net.c module from anarkavre's WinMBF-Net hack. I have met various trouble with some of the incomplete changes that were in SMMU v3.21 and I have been removing and remedying such problems one at a time as they show up. The console is currently unsafe to use in netgames due to an unknown number of commands which should be sync-critical but are not marked as net-commands. The console command transmission has also not been optimized or changed, and so remains extremely wonky. It is also currently unsafe to try to start a netgame with anything other than Eternity's default configuration, since there are an unidentified number of sync-critical variables which are NOT transmitted at startup, as a result of having to disable SMMU's broken console var startup transmission and re-enable the crappy BOOM startup code. This means if any variable new since BOOM is asserted in one client but not another, the game is going to desync. Joe and I have had no success getting the Linux and Win32 versions to cross-talk so far. I am experimenting with various changes and tweaks to try to fix it. In particular, I have added packing pragmas and attributes to all structures that are directly transmitted through the network buffer, and added a series of routines which handle network endianness conversion of 16- and 32-bit integers. SoM added a cool new feature, attached sectors. These help to solve the problem of having one tag per sector by allowing sectors to transfer effects applied to them to other sectors via control linedefs. -------------------------------------------------------------------------------- 10/10/07 Finalized the new optional screen wipe blocking. By default it is off for normal play, but on during demo playback (starting demos instantly with the wipe running causes you to miss several frames of playback). It can be set to "never", "only in demos," or "always." I now run with it always enabled. I also tweaked some code to make the player unable to bob after dying, since I saw this happen several times while playing Heretic. If I died running into stairs in just the right manner, my corpse would stick to the step with my view bobbing. This tweak may need a comp flag, but I doubt it breaks anything. -------------------------------------------------------------------------------- 10/09/07 Readded the ability for the screen wipe routine to block the rest of the game by running in its own loop. Right now this is unconditional, but it will become optional after I get it fully working. -------------------------------------------------------------------------------- 10/02/07 Used new player class extensions to add the Corvus player class and skin for Heretic, as well as the HereticPlayer mobj type (which is mostly identical to DoomPlayer, aside from the states it uses). Also added "wimpy" death sound support to player skins and the PlayerSkull codepointer used to launch the player's spinning skull when he gibs in Heretic. -------------------------------------------------------------------------------- 09/29/07 Yet more player class progress. The player's thing type and all uses of player states are now mapped either through the player class, or through mobjinfo as is appropriate for each particular use. I have had to write a number of support routines to enable some of these changes. For example, there is now a routine in e_player.c called E_IsPlayerWalkingState. This routine traces the walking states for a given player class object and compares the states in that loop against the given state. This replaces a previous hack which assumed that the player walking states were a contiguous set of four frames beginning at S_PLAY_WALK1. -------------------------------------------------------------------------------- 09/28/07 Major progress on player classes. The default player skin is now mapped through the default player class, rather than being hard-coded as "Marine". -------------------------------------------------------------------------------- 09/27/07 Tweaked PCX file writing after a complaint by entryway. I found ZSoft's official documentation for the PCX format and found that the wrong palette type has been written into the header all these years. According to the docs, type "2" means grayscale, even though type 2 PCXs can still contain a palette, and many interpreting programs ignore this header byte entirely. Amongst those that do respect this byte, however, is Windows Explorer under Win9x, which renders DOOM's screenshot PCXs incorrectly in grayscale, giving them a sort of invulnerability-colormap look. The correct palette type byte value is 1. -------------------------------------------------------------------------------- 09/23/07 Eternal revealed yet another problem - the ability to shoot floors and ceilings breaks some glass-covered switches. These are weird hacks that rely on bullets being able to pass certain closed glass sectors and hit a switch inside them. With plane shooting enabled, EE would instead stop the bullet tracers on the glass, making the switch inside inaccessible. So I added a new comp var, which really should have been there all along, called comp_planeshoot. This toggles the ability to shoot planes on and off. I also added a tweak to EDF which forces all frames using the blank sprite (which is by default TNT1) to use spriteframe #0. -------------------------------------------------------------------------------- 09/22/07 Found another serious Cardboard bug while playing Eternal. This one is not a rendering problem, but rather a data flow issue. The segclip structure used to hold what were previously a lot of separate scattered-around rendering globals related to seg drawing was not being properly initialized or properly cleared out between segs. This means that not only were some parameters possibly carrying over between individual lines, but even between different maps, where the now invalid pointers could cause crashes. To top this off, an out-of-order execution issue in R_StoreWallRange causes certain values to be used from the segclip struct before it has even been initialized. On rare occasions this alone causes a crash by accessing a NULL line pointer. Fixed all of this by moving up a memset in R_StoreWallRange, and also memsetting the segclip structure to all-zeroes between each seg rendering operation. I also added a failsafe RANGECHECK to R_StoreWallRange which ensures that a NULL segclip.line, which should never happen, will not just crash the game. -------------------------------------------------------------------------------- 09/21/07 Made some minor tweaks to SoM's Cardboard fix and resolved the remaining redundant sky test FIXME. -------------------------------------------------------------------------------- 09/20/07 While attempting to nail down the precise nature of the Cardboard rendering problem, I found a lot of unnecessary branches of the form: foo = bar ? true : false; I replaced all of these with == ops and/or comparisons against 0, which are significantly faster (it's likely the compiler could optimize such constant expressions anyway, but I never count on the compiler to do something which can be simply optimized in the code). I also found two places in R_AddLine where there are redundant predicates testing for sky ceilings, where sky has earlier already been tested for. I put FIXME's on these, as I fear changing anything related to this code right now. SoM fixed the Eternal rendering bug this evening. It was indeed the 2S line rendering optimization. Unfortunately the optimization is now inapplicable in a large number of situations where it would ideally work. This is necessitated by DOOM's propensity for rendering through raised, closed sectors which have no textures on the surrounding 2S linedefs. These are generally referred to as "glass" sectors and have been extensively used in WADs such as Eternal to provide everything from unbreakable glass that blocks enemies' lines of sight, to a bizarre variant of transparent door which I've never seen documented on any page or FAQ of DOOM editing tricks. -------------------------------------------------------------------------------- 09/19/07 Player classes continue to make minor progress. -------------------------------------------------------------------------------- 09/18/07 I have identified a serious compatibility bug in Cardboard which is triggered on Eternal DOOM MAP03. This bug first appears in the initial Cardboard commit of r209 and causes the area behind the glass in the yellow key area to become a solid HOM. Preliminary testing indicates that this is somehow related to the Cardboard closed 2S lines optimization. -------------------------------------------------------------------------------- 09/17/07 I made some enhancements to the silencer powerup effect, which isn't currently available to editors but will be made so along with the dynamic weapon system and inventory/pickups. Mainly, the effect now reduces the volume of sounds played by the player's weapons, as it does in Quake 2. Also made a small tweak to my previous vissprite fix. -------------------------------------------------------------------------------- 09/16/07 Came up with a real fix to the Cardboard vissprite texturecolumn index overflow bug. The rangechecking code that was previously here has been promoted to an unconditional runtime check and has been made non-fatal. Instead, when the overstep has occured, the drawing loop will simply continue. At the start of the next iteration the loop ends automatically. -------------------------------------------------------------------------------- 09/13/07 Continued turning special-case weapon behaviors into weapon flags. -------------------------------------------------------------------------------- 09/12/07 I have turned back to the infant dynamic weapons system again for a change of pace. I have increased the number of WEAPON_FIXME tags significantly, and I think I have identified the vast majority of code points that will require modification to work with the new system. I have begun defining weapon flags that will de-hardcode behaviors specific to certain weapons. I've even defined a few flags that will make new features already, such as a flag that makes weapons always silenced (i.e. they will never alert enemies, a property that the fists really should have had in Doom already...). I will try to alternately work on weapons and ED sectors until both are totally finished. There will definitely not be a release until these two major features are complete. Joe wants to work on the inventory system and we will have to cooperate in defining the design and requirements for this, especially since it overlaps with work on the dynamic weapons system as far as being able to define weapon and ammo pickups goes. We think it is a good idea for player weapons owned, player ammo amounts, and player keys to fold into the inventory system so that only one interface for giving and taking items to/from the player is presented via scripting. How exactly this will be accomplished is what remains to be seen. Once both EDF inventory and weapons are complete, 100% Heretic support will be within our grasp! The new particle effects have also been finished, with some further tweaking to the blood effect. I'll probably never be totally satisfied with it, but it's certainly a vast improvement over the previous effect. -------------------------------------------------------------------------------- 09/11/07 Started work on finally knocking off one of the short-term TODO's that's been around forever -- improving those godawful particle effects that were taken as-is from zdoom. SoM's bullet puff code from ages ago which has been commented out in p_partcl.c has finally been integrated and improved. Sparks now fly when bullets hit floors, walls, and ceilings (the sparks behave differently on the floor and bounce up a bit), and shooting liquids results in a movie-like splash. Blood is now much more voluminous and dynamic. It behaves more like arterial spray from puncture wounds, falling and weaving, spreading out from a more centralized source. Particle sizes are now randomized, and the blood drop effect is more frequent and happens alongside the general spray rather than being exclusive of it. I believe these changes make the effects worth having in the engine. Previously they just looked like Quake-2-wannabe crap. Joe added texture and flat changing functions to Small, rewriting code from the ACS interpreter as necessary to prevent code duplication. -------------------------------------------------------------------------------- 09/10/07 The sector special transfer system is now 100% complete. Floors and ceilings contain a new spectransfer_t sub-structure which can be initialized to zero or to the special contents of a sector with functions defined in p_spec.c, and then its contents can be transferred to another sector by calling P_TransferSectorSpecial. There are also similar functions for transferring the special directly between two sectors without involving a spectransfer structure. -------------------------------------------------------------------------------- 09/04/07 Minor work on ED sectors; began implementation of a new system for transferring specials between sectors. This will be necessitated by the addition of fields for custom sector damage and other ED features, which need to be transferred between sectors along with the special in order for these features to work in the same way. It was already a mess anyway and should have been functionalized in BOOM. -------------------------------------------------------------------------------- 08/29/07 Work continues on ED sectors. I have also made a small modification to the sound engine that allows sourceless sounds to continue playing to the end when a new level is started. The reason for cutting off sounds at the start of a new map is because of the fact that in P_SetupLevel, all PU_LEVEL tags are freed. This would cause any sounds referencing mobj_t's on the old map (if any was even loaded, the game just assumes one was for simplicity's sake) to start accessing freed memory. Sourceless sounds on the other hand don't make reference to any mobj_t's and thus they do not need to be cut off at the beginning of levels. While this may lead to a Cyberdemon's moo carrying over as you activate the IDCLEV cheat, it also allows interface sounds to not cut off abruptly. I had long been irritated by the pistol sound generated by the menu while starting a new game getting cut short. This doesn't happen any more. -------------------------------------------------------------------------------- 08/28/07 Work on ExtraData sector records is accelerating. Current fields in the ED sector record are as follows: special tag damageamount damagemask damagemod floorterrain ceilingterrain colormap_upper colormap_middle colormap_lower floorxoffset flooryoffset floorangle ceilingxoffset ceilingyoffset ceilingangle This amounts to customizable sector damage, per-sector TerrainType overrides, ability to specify colormaps without setting up a 242 transfer, and the ability to align and rotate flats. I'm sure more stuff can be added, including zdoomesque "enter sector" or "hit floor" specials, which are actually an idea I had independently years ago when the idea of ExtraData was first conceived. -------------------------------------------------------------------------------- 08/23/07 I found a bug in the text HUD widget system that was causing the crosshair to disappear until the same timestamp that the last center message disappeared in all subsequent levels. The cleartic field of text widgets needed to be set to zero in the clear handler function for that widget type to prevent this. -------------------------------------------------------------------------------- 08/21/07 Tweaked the new "IWAD not found" error message. The new message is verbose and gives instructions on some of the various ways to let Eternity find your IWAD files. -------------------------------------------------------------------------------- 08/20/07 Work on -game system continues. Support for autoloading all files in the base/game/autoload directory, using the same opendir implementation earlier added to support the dynamic WAD loading menu, is under way. -------------------------------------------------------------------------------- 08/19/07 I've begun previously planned modifications to the base folder hierarchy and the way it is used in order to fully support the -game command-line parameter. When finished, -game should allow not only finding IWADs and the appropriate engine resource wad, but also addition of autoloaded GFS, root EDF, WADs, DEH/BEX and console scripts. The ability to have a default.gfs will allow games to use files (including IWADs) stored anywhere on the user's hard drive, and for the full set of involved files to be added to EE with one simple command-line parameter. -------------------------------------------------------------------------------- 07/18/07 The next release version of Eternity will be dedicated (once again) to the memory of our good friend and long-time Eternity fan Jason "Assmaster" Masihdas, who disappeared from the Internet on June 14th, only a week after SoM and I participated in his UniDoom Radio Show to talk about EE progress. He committed suicide by unknown means and for unknown motivations, which came as a shock to everyone in the community. He was a great friend, a solid rock to depend upon, and a genuinely nice guy. We will miss him dearly. Today I committed all my work from the past two and half months, so the changes are massive: * I sweeped the engine for all malloc/memset(0) function call pairs and changed them into calls to the until-now unused Z_Calloc function. Z_Calloc does a malloc and memset together, and is designed to semantically allocate arrays (it accepts two parameters, size of record, and number of records to allocate, much like fread works). * Integration of ExtraData sector records has begun. * I fixed a bug in M_QStrCreateSize that caused it to fail to initialize any bytes of the string beyond the qstring base size of 32 bytes. This could have potentially caused other qstring functions to run off the buffer if the string was modified externally under the assumption that the rest of the qstring buffer is initialized to zero (which is supposed to be the case at all times). * Added a BIGSHORT symmetric endianness correction routine to support a function which can load and convert GBA-format sprites into Doom patches in hopes of eventually supporting reading of data directly from the GBA Doom ROM. I also created a new linear-to-patch routine, which amongst other things, may be useful in the future for the support of using flats as textures. * Eliminated all unnecessary zero assignments to map entity fields in p_setup.c functions (lines, sectors, etc.). All of these are memset to zero when they are allocated, so assigning zeroes to fields (except for floating point ones) is redundant and just clutters up the code. * Began implementation of flat rotation. * Applied fixes to bugs in Cardboard's handling of player fixed colormaps and determining the width of vissprites. This latter problem has been causing "R_DrawSpriteRange: bad texturecolumn" errors in the debug build. * Added a debug sound log in an attempt to track down esselfortium's problems on his x86 Mac machine. It was very little help other than to verify for certain that the program is crashing inside of I_SDLUpdateSound on writing to byte 1024 of an 8192-byte buffer. Our current best guess is that this is some type of software conflict on essel's machine. Until he installs Visual Studio, I won't be able to make any further progress against this. Don't enable the debug sound log -- it generates about 10 MB of output per *second* of gameplay so watching a 5 minute demo with it active would generate a file in excess of 3 GB in size. Beside that, it would mean nothing to anybody except me. * Applied a fix to the OUCH face logic suggested by Andrey Budko which causes it to work properly when the player receives massive damage from monsters. For an odd reason the priority system caused it to only show for about one tic when damage was received from monsters, but to display normally when the damage was received by shooting a barrel (there's a special case for "being hurt by your own damn stupidity"). * Began changes to the wad file system that will transform it into a full- featured virtual file system capable of dealing with WADs stored in RAM as well as ZIP files. Step one was to move everything not directly related to the reading of WAD files, including filename parsing routines, to m_misc.c. -------------------------------------------------------------------------------- 06/15/07 Joe has recently updated the Linux build system to work with the base hierarchy and has added a new _ThingTeleport function for Small scripts. -------------------------------------------------------------------------------- 04/28/07 Added the base heirarchy to the SVN repo so that Eternity can be executed from the Visual Studio shell immediately upon checkout without any modification or need to run scripts to set stuff up. Users of Dev-Cpp may need to set their ETERNITYBASE environment variable to get the default location of the EXE to see the base directory, however. Linux users are stuck with an automake script which installs stuff properly for them, so there it's not really an issue. -------------------------------------------------------------------------------- 04/20/07 Added a missing CFG_END() to the skin sound options array. This would have caused a beautiful segmentation fault. Also made changes to PIT_CheckThing(3D) to isolate and avoid duplication of the code used for Lost Soul collisions. -------------------------------------------------------------------------------- 04/16/07 Applied minor tweaks to the earthquake code that should ensure that earthquakes cannot cut each others' effects off, and to ensure that the earthquake with the greatest Richter scale determines how much the player's screen will shake (the effect is not additive, both because it's difficult to achieve proper results with a system like that, and because it wouldn't be Hexen-compatible). -------------------------------------------------------------------------------- 04/13/07 The EDF boss spawner / boss probabilities logic was apparently broken during some reformatting a long time ago and has thus been messed up for quite a while. -------------------------------------------------------------------------------- 04/12/07 I tweaked up my codepointer rewrite to use fewer lines of code to retrieve the player and psprite pointers from the mo parameter, and I also fixed a major bug in the MapInfo parser. My previous fix to normalize the lump by adding a \n and \0 pair to the end of it was incorrect because it overflowed the buffer by writing two bytes past the end. This happened because I forgot I had already incremented the buffer length variable "size" by 2 when I allocated it. I was thinking the buffer was allocated at size+2, and therefore I needed to write the bytes to indices "size" and "size+1", when the correct indices were "size-2" and "size-1". This would cause random corruption of the last data field in the lump if the lump was not already linebreak-terminated, and worse, if the lump was a multiple of 32 bytes in size, the next block on the zone heap would get corrupted and the game would crash. Those looking for a temporary workaround until the next release should end their MapInfo lumps with a linebreak and pad them with spaces in order to avoid having size % 32 == 0. This should avoid both the corruption and the crash. -------------------------------------------------------------------------------- 04/11/07 Integrated joe's fix to the Phoenix problem of not being able to quicksave or quickload due to the menu system asking for some nonexistent BEX strings (this caused the internal error "DEH_String: unknown BEX mnemonic '%s'"). These strings were inappropriately caught in a mass search-and-replace operation after I rewrote DEH/BEX string handling. Also did some major reformatting of the data tables in d_dehtbl.c -- I'm not done yet though :P -------------------------------------------------------------------------------- 04/05/07 I have now changed weapon codepointers to use the same prototype as mobj action codepointers, so all issues related to crashes caused by EDF or DEH/BEX patches assigning the wrong type of pointer to the wrong frame are now a thing of the past. This was made possible by retrieving the player pointer from mo, and adding a "curpsprite" index to the player_t structure that allows retrieving the proper psprite pointer from the player. As a result, all monster pointers are now usable directly by the player (though many of them are not going to have satisfactory results when used this way), and a select few of the weapon pointers can now work for monsters. The Saw pointer is one of those, as it uses no fields at all from the player_t or psprite_t structures. This solution was glaringly obvious. I have no excuse for it having taken eight years for me to think of it :P -------------------------------------------------------------------------------- 03/29/07 I changed the quad cache column engine to not use quad caching at all for fuzz columns because they still looked totally wrong, and I couldn't figure out how to ever get the proper results when the columns were quad cached. So fuzz drawing through the quad engine is actually less efficient now, but the difference is so small, and fuzz columns are so rare, that it shouldn't be a problem. Maybe if you filled nuts.wad with only spectres you would see a difference. But I doubt it :P -------------------------------------------------------------------------------- 03/28/07 Minor work on player classes and EDF weapons is ongoing. -------------------------------------------------------------------------------- 03/08/07 Began work on changing how ammo handling is done in p_pspr.c so that ammo subtraction in weapon codepointers is done in one uniform way with a new function. This is preliminary work toward the dynamic weapons system, of course. I additionally identified numerous weapon FIXME's; things that will need to be changed or augmented to work with the EDF weapon system. -------------------------------------------------------------------------------- 03/04/07 I have completed fixes and changes that allow Eternity to fully and properly support dynamic sector colormaps. Colormaps for deep water are no longer read through the heightsec but are transfered directly to the affected sectors during level setup. This simplifies things drastically and allows scripting to be able to properly manipulate any sector's colormaps. -------------------------------------------------------------------------------- 02/28/07 Finished up the line id system and added savegame code for all of the recently added thinker types, including earthquakes and scripted/Hexen-style light fades. Also reformatted frames.edf. -------------------------------------------------------------------------------- 02/27/07 Added new Small natives _ThingSetFriend and _ThingIsFriend, for manipulating the friendliness of monsters from Small scripts. Still needed is a function which spawns a monster as friendly from the get-go. I rewrote P_FindLine to use the line tag hash table, and I started work on adding Hexen-style line IDs, which unlike tags have a default value of -1 instead of zero. Line IDs will be needed for ACS scripting, and will also be usable via ExtraData. Also started poking around with the high level netcode, but I'm not getting very far right now. -------------------------------------------------------------------------------- 02/25/07 Added a tweak to the TerrainTypes system that keeps FLOATBOB objects from causing terrain hits. I noticed some potions splashing down some watery steps in an E5 map of Heretic one time and thought it quite odd. They probably also shouldn't be subject to Lee's torque code either, for that matter, but I haven't addressed that separate issue yet. -------------------------------------------------------------------------------- 02/16/07 Joe finally fixed up the Linux build and install system to work with the base directory setup. -------------------------------------------------------------------------------- 01/30/07 Continued with GCC warning fixes. It seems that GCC 4 has a new strict aliasing optimization system which causes perfectly valid C code to throw a load of annoying warnings about type-punning breaking strict aliasing assumptions. This is a load of crap, of course. If strict aliasing causes valid code to give off warnings, then strict aliasing should have to be turned ON via an option, not turned OFF by one. But then expecting GCC to display any serious type of design logic has been unreasonable for quite some years now. GCC 4 builds of Eternity *must* use -fno-strict-aliasing, which unfortunately disables the optimizations for the entire game engine while most of it could safely utilize it. Type punning is utilized throughout important segments of the game to achieve polymorphism. The largest (and original) use is of course the thinker_t list. There are no plain thinker_t's -- all of them are embedded inside one of a good two dozen different structure types, all of which need to "think" once per gametic and are therefore kept on the same linked lists and allocated and freed with the same code. Other code which uses this same or a similar approach includes my generic queue and double-linked list modules, and the sound code, which allows degenmobj_t to pose as mobj_t in order to facilitate the playing of sounds by sectors and other static entities. -------------------------------------------------------------------------------- 01/24/07 Added a console variable that allows the game to spawn Unknowns at the location of unknown thing types (like zdoom does) except during demo recording, demo playback, or netgames. This option is on top of the messages which are shown at map start. -------------------------------------------------------------------------------- 01/21/07 Implemented Hexen-style earthquakes for Small, ACS, and parameterized Hexen / ExtraData line specials. Eternity's earthquakes are lacking a number of quirks that Hexen's had. Mainly, multiple ongoing earthquakes won't cancel any of the effects on the player. I also do not spawn any mobj_t's, and so Eternity does not have a temporary earthquake epicenter thingtype. Instead, the earthquake thinker itself contains a degenmobj_t (or rather, the degenmobj_t contains the thinker ;) This degenmobj_t serves to both hold the coordinates of the epicenter and works as a convenient sound origin (degenmobj_t can be type-punned as both thinker_t *and* mobj_t, which is its great asset). Note that earthquake sounds are played from the origin with full volume and zero attenuation. This means that if a Cyberdemon moos during an earthquake, you'll hear both sounds. -------------------------------------------------------------------------------- 01/18/07 Added ACS thing type numbers to EDF. These are gamemode-dependent, as only 256 id numbers are available to ACS line specials. The numbers have been made zdoom- compatible as much as possible, though I am very disappointed with the number of ids that zdoom has not bothered to allocate. There are many Doom and Heretic objects deserving of a spawn id number which are not currently allocated one. I am afraid to hand any out myself, as this situation may change in the future. I noticed that TerrainType sound mnemonics had not been expanded in length since the sound mnemonic max length was changed from 16 to 32 characters. This meant that TerrainTypes had an artificial lower name length limitation for a while. SoM continues work on linked portals with optimizations, bug fixes, and new features. You can shoot through them now ^_^ -------------------------------------------------------------------------------- 01/17/07 Finished up adding the rest of the Hexen parameterized lighting specials. However, I need to revise them to be able to work on a single sector on the backside of the line when activated as push line specials. In fact, I need to go over a bunch of the recently added specials and check them for this ability. They should all ideally support it. -------------------------------------------------------------------------------- 01/11/07 - 01/16/07 SoM has begun the long-anticipated integration of his Cardboard floating-point renderer into Eternity. We are currently both doing extensive testing on the code; it is working very well and eliminates virtually all numeric instability in the Doom renderer. A number of bugs have come up, but all have been quickly repaired. Once again, he has done the impossible. Lee Killough abandoned the idea of a floating point renderer because he believed it necessitated total demo incompatibility, would ruin compatibility with rendering engine exploits, and would necessarily cause problems such as gaping holes in levels due to the fixed-point BSP. So far, SoM has avoided every one of these problems with nothing but skillful grace. Much testing still needs to be done. I may invite some of the old beta testers back to try it out before there's a release ;) -------------------------------------------------------------------------------- 01/10/07 I've been adding more parameterized line specials to flesh out ACS. I've started with the easier stuff -- lighting. So far I've added Light_RaiseByValue, Light_LowerByValue, Light_ChangeToValue, Light_Fade, and Light_Glow. Light_Fade and Light_Glow are really cool because I resurrected the light fading code left over from FraggleScript. Although I quickly realized that I needed to more or less totally rewrite it to make it ACS compatible :P These are on top of the ACS_Execute, Suspend, and Terminate specials which are necessary for basic ACS functionality. Note that all these functions are also available in Small automatically through the param linespecs system, so it is now suddenly possible to execute ACS from Small ;) I also got sick of running through all 40 maps of Hexen and hoping that I could get one to execute my new line specials, so I added a new console command called p_linespec which can execute any parameterized line special by name. The syntax for the new command is as follows: $ p_linespec ... The name is exactly the same as used via ExtraData and ACS (and Small minus the leading underscore that is necessary in that language). The args are exactly as would be specified on an ExtraData special -- note that these in some cases differ from the args that would be given to the equivalent ACS action special, since ACS must be strictly Hexen-compatible, whereas ExtraData enables various extensions via having wider args values (signed dwords vs unsigned bytes). I might make an ACS-compatible version of the command that calls P_ConvertHexenLineSpec before executing the special. This would help those more familiar with zdoom be able to use the command effectively. -------------------------------------------------------------------------------- 01/09/07 Yet another ugly bug has reared its ugly head. It is possible for colliding Lost Souls to cause a recursive call to P_TryMove. The path through which this call occurs seems to be as such: P_XYMovement -> P_TryMove -> P_CheckPosition -> P_BlockThingsIterator -> PIT_CheckThing -> P_SetMobjState -> A_Look -> P_SetMobjState -> A_Chase -> P_Move -> P_TryMove Woops! Guess what. P_TryMove is not reentrant; never has been. Calling it recursively causes somewhere around 20 different global variables to be overwritten, causing the first clipping operation that was being done to go haywire. Well in this case, as crazy as this is going to sound, it was causing a spechit *underflow*. You've heard of spechit overflows I'm sure, but this was totally different. Sometimes the second P_TryMove call would return true for unblocked, and would have ran down numspechit, executing specials for any crossed lines. This left numspechit with the value of -1 after exiting that function. However, back in the first call to P_TryMove, the now-munged up clipping operation returns false. However, in P_Move there is code that monsters use to check for lines to press when they are blocked. This is what enables monsters to open doors and continue walking through them; without it, they would simply balk and turn straight around. This code checked if numspechit == 0. If it did, the clipping operation must have been successful, because P_TryMove *should* never return false if the spechit loop was executed. If the move was successful, there would be no reason to look for lines to push (monsters don't close doors that are already open, for instance). Due to the reentrant call, however, TWO non-reentrant clipping operations have occured during the space in which one should have been executed. This means that all bets on pre- and post-conditions were off. It turns out that P_TryMove in this case CAN return false after having run numspechit down to -1. The -1 value falls through the check and causes the monster to start looking for lines to press. Lines that do not exist. It uses as line pointers words that are in fact part of the zone memory block header for the dynamically allocated spechit array in BOOM/MBF. This was causing the game to crash in P_UseSpecialLine when it would try to access line_t fields on what was actually a string pointer (the filename pointer in memblock_t when compiled with INSTRUMENTED). I guess this bug has been in the Doom engine all along, but apparently it has never shown ill side-effects until now. The only fix I could come up with right now is to set numspechit to 0 at the end of P_TryMove instead of allowing it to remain -1. This eliminates the post-condition violation caused by recursive calls to the function and allows P_Move to avoid crashing. What actually needs to be done is to make the clipping engine reentrant by pushing all globals onto a stack or, ideally, collecting the globals into some sort of clip data structure that is passed around to all relevant functions. Unfortunately such an approach is unreconcilable with demo compatibility, so it would have to be done in such a way that it could be turned on and off. This grossly complicates the situation. For now, I am not addressing the issue of clipper reentrancy. -------------------------------------------------------------------------------- 01/08/07 I've been in a Hexen mood lately and have been playing it in DOSBox. This has lead me to start working on the ACS interpreter again. In fact, I finished it. Yep, that's right, EE can execute ACS scripts now. Of course, most of them won't do anything because a large portion of the action specials still are not implemented, and a few of the built-in functions don't work yet either, especially not any that rely on Hexen's thingtype script id's -- I believe adding the ability to specify these via EDF will offer maximum flexibility to the editor. In the process of testing ACS in Hexen, I found out that using Polyobj_GetForNum with zero polyobjects on the level would cause a divide by zero exception. This was caused by taking the hash key modulus the number of polyobjects. This function now has to check to make sure numPolyObjects != 0 before doing the hash key calculation. -------------------------------------------------------------------------------- 01/06/07 I added a tweak to the libConfuse parser and lexer which allows specified sections to contain spaces within unquoted strings. This is specified by putting a new CFGF_STRSPACE flag on the sections in question. This allows me to remove the requirement that sound sequence strings be quoted, which is something I myself found extremely irritating during their development. I eventually hope to rewrite the entire libConfuse parser to make it LALR(1) (this means look-ahead, look-right, one token). This means that it uses one token of look-ahead to determine the meaning of the current token being parsed. Examples of languages which are commonly parsed using LALR(1) parsers include C, C++, and Java. LALR(1) affords much more power than the current system, and it would enable such features as function-valued fields and possibly even arithmetic expressions to be added to EDF in the future, putting it at a level even with or above DECORATE. This will, of course, be a major undertaking. I don't expect to do it soon, as my initial pokings at the problem have lead nowhere. -------------------------------------------------------------------------------- 12/06/06 After a suggestion by fraggle, I've started work to eliminate all static limits on file path lengths by getting rid of the PATH_MAX constant. However, to do this maintainably I need alloca() functionality. As any good C programmer knows, alloca is non-standard and non-portable; Visual C++ 6.0 doesn't even have an implementation of it at all as far as I know. So, I wrote my own alloca. It is a garbage-collected implementation over the zone heap system. Zone blocks are allocated at PU_STATIC, but before being returned from Z_Alloca, an extra header is added in which links together all the alloca blocks. The pointer returned from Z_Alloca is pointing just beyond this extra header, and therefore it cannot be used with Z_Realloc or Z_Free, just as with normal alloca. Z_Alloca allocations are freed at the end of every frame in the program's main loop using a Z_Alloca(0) call. Since the list is empty most of the time, especially at runtime, this doesn't add much overhead. It also ensures that too many alloca allocations won't accumulate. -------------------------------------------------------------------------------- 12/04/06 Changed all of Eternity's paths and file io functions to use a base directory. The base directory can be specified through a new ETERNITYBASE environment variable or by using -base on the command line. The default location for the base directory is in the exe's directory, of course. There is one TODO with this. I need to make the presence of a base dir in the exe's directory override use of the environment variable. This doesn't currently work; if there is an environment variable, it is always used except when -base is specified. -------------------------------------------------------------------------------- 11/14/06 Applied a fix to the quad flush function for spectre fuzz columns that proff sent me. It restores the effect back to its original look by using the fuzz table offsets differently. I think it looks a lot better now. -------------------------------------------------------------------------------- 11/13/06 Started integration of the player class engine into the game. Unfortunately, I won't be able to totally complete it without fixing the netcode first. On the positive side, Chocolate Doom's netcode is now stabilized and fully functional, so I will be taking a look at it very soon with the eventual goal of getting it retrofitted into EE. I created the player.edf module to contain skin, class, and eventually weapon and inventory definitions. I also finally remembered to fix some of the EDF verbose log messages related to TerrainTypes. They would always use an -s ending even when there was only 1 of the given definition. I changed them to to use (s) like all the rest of the messages in other modules. -------------------------------------------------------------------------------- 11/09/06 Work continues on classes, but has been set back by the unexpected discovery of another extremely serious bug, this one from MBF. Turns out that monsters being removed from the game while still being targeted can end up being manipulated by the things that were targeting them at the time. This means that after having their thinkerclass links invalidated, they start getting moved back into the class lists. Problem is, the code that moves them in the list expects them to be in the list already. If they're not, the entire list gets corrupted and the AI routines fall into an infinite loop, causing the game to hard-lock. Turns out that removing the monsters from the threaded lists isn't possible. They must remain in the list but be moved into a new class, th_delete. I found this problem by creating a "banish" console command, which totally removes a targeted monster from the game. PrBoom had already solved this problem, so their code was helpful to me. -------------------------------------------------------------------------------- 11/08/06 Assmaster convinced me to separate EDF skins from player classes, so they are now their own independent global entities. This eliminates any oddity with classes defining multiple skins of the same name and unexpectedly overwriting each other. -------------------------------------------------------------------------------- 11/07/06 Made the EDF sprite hash persistent in case skins or player classes need to make use of it at runtime. Changed the new EDF skin objects to be hashed instead of being stored in a reallocating array. -------------------------------------------------------------------------------- 11/06/06 Prematurely began work on dynamic player classes. This will involve rewriting a good deal of the skin engine. -------------------------------------------------------------------------------- 11/05/06 Fixed a bug in the new 3D object clipping related to nightmare respawning -- you could get stuck inside monsters if you were standing over them, but not on the same floor level, when they decided to respawn. This was apparently an import error, as I don't believe zdoom has this problem. I also fixed EDF so that sounds.edf can be parsed as a default fallback again, although in this circumstance, sound sequences are still currently broken. I need to rewrite this part of EDF to parse sound sequences from the same cfg_t that sounds are coming from. -------------------------------------------------------------------------------- 11/04/06 SoM increased the precision of the span renderers yet again by doing true 6.26 fixed-point math. The extra precision was before being wasted through shifting, resulting in a lot of zeroes in the decimal places. I added DSTINK from Freedoom to eternity.wad after I noticed that this sound is missing from Doom Shareware versions 1.1 and 1.2. I could throw in the real DSTINK but I'd prefer to not add more technically illegal resources to the resource wad when there are acceptable free alternatives. I tested to see if it had a good DSGETPOW sound, but I didn't like it, so the real one will remain. -------------------------------------------------------------------------------- 11/03/06 Music selection widget is finished. I also seriously rewrote the way that text box widgets work; the selected item now remains in the center of the box instead of being at the end of it, and arrows with a MORE message appear at the box boundaries when the list can be scrolled up or down. I also fixed a bug with menu widgets which caused them to unnecessarily activate the menu system. Turns out there was a bug in music lump hashing too, and so new music lumps have once again been broken for a while. -------------------------------------------------------------------------------- 11/02/06 Added rootmenu and curpage fields to menu_t to create a solution to the problem of remembering what page a menu was last on. The key binding menu item for the hu_messages command still used the old "messages" command name and therefore didn't work. I added a console command that can play music. This is in anticipation of a jukebox-style menu that will let you play music, which is being added as a sort of easter egg feature. -------------------------------------------------------------------------------- 11/01/06 Started work on refining some of the recent changes to the menu system. -------------------------------------------------------------------------------- 10/30/06 Work on Linux issues continues. I also fixed a number of console bugs with text control characters, particularly the abscenter character. -------------------------------------------------------------------------------- 10/24/06 Began the laborious process of fixing the few hundred warnings thrown by gcc when compiling under Linux. They're all minor nitpickings aside from trouble with the PATH_MAX symbol on some distributions. I also added a fix for crashing when the user requests to load an empty save game slot from the command line. This was fixed for menus a long time ago, but I never thought about the -load command. ================================================================================ Changes since Eternity Engine v3.33.33 ================================================================================ -------------------------------------------------------------------------------- 10/22/06 SoM improved the automap for use with linked portals. Final commits are now being made for 3.33.50 release to mop up the last few remaining minor issues and problems. -------------------------------------------------------------------------------- 10/19/06 Added a style guide for new programmers :) -------------------------------------------------------------------------------- 10/18/06 Fixed console command event responding for real, finally, by adding a new call to G_KeyResponder(kac_cmd) in G_Responder. Joe added his SteamSpawn codepointer. Sequence saving/loading is complete. SoM made a massive linked portals commit. -------------------------------------------------------------------------------- 10/17/06 Rewrote the dynamic credits screen to make it look really snazzy. Fixed a bug in the abscenter text drawing code. Added a new separate ceiling sound origin for sectors so that they can run two sound sequences when both the floor and ceiling are affected by separate actions. Began sound sequence saving/loading code. Finished polyobject sequence support. -------------------------------------------------------------------------------- 10/10/06 Added an optional vissprite limit. -------------------------------------------------------------------------------- 10/09/06 And the fun continues: * Changed the ACS PRINTBOLD function to use FC_GOLD instead of FC_YELLOW. I keep making this mistake over and over in different parts of the source; you'd think I'd learn :P * DEH strings replacement has been significantly improved simply by making the parser always compare strings against their original values instead of the newest value assigned to them by DeHackEd. I don't know why it didn't work this way to begin with, and I'd consider it a bug fix. fraggle helped out a bit by providing a weird DEH patch that was mostly broken without this tweak, and some advice on how to fix it. * The DEH log file has been functionalized. The way it was done before was simply terrible. Really, the whole parser is overdue for a rewrite, but that's pretty low-priority since I encourage the use of EDF over DEH/BEX. * Several DEH parser bugs have been fixed, mainly dealing with the provision of invalid ammo or weapon indices. * Added DEH_String function similar to the one used by Chocolate Doom. This lets the game engine get DEH/BEX strings using their BEX mnemonic instead of relying on a global variable. I've gone through and replaced almost all uses of the global variables with calls to this function. I was also able to add a DEH_StringChanged function, which tells you whether or not a DEH/BEX patch has changed the value of a given string. This helped me fix a problem in the level name determination code where if DeHackEd was added, ALL levels would suddenly start to use the default DOOM level names. The proper thing to do is to enable default names only for maps that have actually had their name replaced :) * Added BEX strings TITLEPIC, TITLE, CREDIT, ORDER, and DEMO1 - DEMO4. These allow DEH/BEX replacement of screen resource names in the title/demo sequence. TITLE is for Heretic/Hexen, btw. -------------------------------------------------------------------------------- 10/08/06 I'm getting an enormous amount of work done every day. Basically this is my version of crunch mode :P * DoomBarrel's correct_height was not correct :P Somebody in the BOOM team didn't do their homework I guess, because a height of 28.0 actually is somewhat inside the top of the sprite. As a result, the map Barrels o' Fun was broken. The mancubus at the beginning could shoot fireballs to his heart's content and they would pass right through the barrels. Fixed it to be 34.0, which is much closer and causes the mancubus to blow up those barrels. * Longtics demo support. This means that EE can now play cph's Doom v1.91 demos, and that new demos recorded with 3.33.50 or later will have full turning precision :) * Fixed the intermission to kill all playing looped sounds, since otherwise they continue until the end of the intermission. * Started integrating joe's Hexen pillars code. * Fixed the "sky is too low by 1 pixel" problem. It turns out the whole screen was off by half a pixel on average. This was due to the new mlook code. Why? finetangent is horrible and causes roundoff error, especially for the value at which your default pitch angle rests (I believe it is near an asymptote of the tangent function). As a result, EE now simply uses Doom's old method of setting the centery/centeryfrac variables when your pitch angle is zero, because in fact there's no need to do any of that extra, inaccurate calcu- lation when it's zero. This is an extremely small optimization on top of a needed bug fix ;) * Removed sky stretching when playing old demos. Old demos have no mlook, and thus they don't need sky stretching. Looks a lot better now IMO. * Changed shadow text to use colormap 33 instead of 31, just to make sure that all the colors are mapped to true black :) It looks about the same to me, though. -------------------------------------------------------------------------------- 10/03/06 Another big day; this work has brought 3.33.50 to the brink of release. * Floor sequences are finished. They required some special consideration when dealing with delayed stairs. zdoom seems to leave the sequences running on such stair sectors, but I don't like that. * Fixed a number of bugs in param stairs, corrected major mistakes in their documentation, and removed the "delay" parameter for sync'd stairs. Sync'd stairs cannot delay between steps; I have no idea what I was thinking when I added that parameter to those types... * At long last, I found the bug in the zone heap introduced in BOOM when the engine is compiled with INSTRUMENTED defined and runs out of zone memory. VM blocks had their "extra" field, used to track internal fragmentation for memory statistics purposes, left uninitialized. The problem was that in Z_Free, only with INSTRUMENTED defined, the amount of space in the block minus the "extra" field is memset with gametic & 0xff to randomize memory (the idea being that it will cause a crash when freed memory is accessed, and I've found in the past that it's quite reliable at doing that). This out-of-control memsetting would completely trash the C heap and cause some pretty weird looking segmentation violations. I'll note that I was aware of the existence of this problem as early as my work doing MBF beta testing; Lee's double boss brain super war level would always crash after it started using "virtual" memory. The same went for DOOM II MAP30 in MBF, SMMU, and earlier EE versions. I found the problem by accident while doing stress testing with nuts.wad -- every time the amount of allocated RAM exceeded 16 MB and started using system malloc, I'd get a hard crash a few frames later in MSVCRT.DLL that always pointed to a Z_Free line. When I printed the zone heap, I noticed that several blocks had values like 0x62626262 in their zone ID fields, and then the real kicker -- the thinker list was getting corrupted the same way. I knew at that point that I was looking at something related to the memset in Z_Free. That led me directly to the vm block allocation code where I noticed the missing intialization for block->extra. Note that this has only ever affected *debug* builds of Eternity, thus you'll never have experienced this crash in any release. -------------------------------------------------------------------------------- 10/02/06 Figured out how to *really* fix general screen patch scaling. I just needed to add 1 to the inverse scaling factors that are used to step in column space. This pushes them up just high enough so that they go to the next pixel when they would if the computer were doing ideal real number math (ie, 3*0.333... should equal 1 and not 0.99998). This introduces an error of one pixel per every 65536 that are drawn, so at current possible screen resolutions there is no error at all (I dread the day when 65536 is a possible screen dimension :P ). Work on floor sequences continues. -------------------------------------------------------------------------------- 09/30/06 Worked REALLY late tonight. Three errors were fixed: 1. A heap corruption problem was being caused by a mistake I made in my tweak to have sounds always replace the sound of *lowest* priority instead of the first sound they find with a lower priority. This actually reduces loop overhead in S_getChannel rather than increasing it, as the search op can be done in a loop that was already there, and then a later loop can be eliminated altogether. But I was forgetting to actually set the channel number to the number of the channel with the lowest priority when this happened, so it was writing to channels[32] and trashing the next block on the zone heap. 2. While trying to help me fix this, SoM found out that sound link volume wasn't being clipped into range and caused an error in i_sound.c due to some out-of- date EDFs that still had a volume specified on the chgun sound. 3. I found the REAL ultimate reason for sounds playing at the wrong volume. There was a race condition between S_UpdateSounds and I_SDLUpdateSound, the latter of which DOES appear to be called from a separate thread as I have long suspected. If S_UpdateSounds was called before I_SDLUpdateSound (or during?), sometimes channels that had stopped were missed and would continue to have their hardware channel's parameters modified. This would cause any new sound reusing the same hardware channel (started in an S_StartSound call between S_UpdateSounds and I_SDLUpdateSound) to be modified instead of the original. I tried a number of different fixes to this but none were satisfactory until I thought of giving every sound that's played a unique ID number. ID numbers start at 0 and increase by one every time a sound is played. If a software and hardware channels' IDs don't match, that software channel won't be adjusted or stopped again until it has been cleared out by S_UpdateSounds. This makes the timing of calls to I_SDLUpdateSound irrelevant. This requires a new low-level sound API function I_SoundID that returns the idnum for the given hardware channel handle. -------------------------------------------------------------------------------- 09/28/06 More work on ceiling sequences. I have also revamped the entire sound engine priority system, and I believe problems with the old handling of priority were the source of the weird sound cutoff problems that were plaguing me back in August. Basically, the original sound engine ignores sound priority. If an overflow occurs with respect to the number of channels needed, it cuts off the first sound it finds with "lower priority." But the priority values stored in sfxinfo are not even used! All sounds not played through links were given a default priority value, so they were all equal. This meant that the very first sound found playing was generally cut off, even if it was something of relatively far greater importance. Say for example that an Imp is scratching your face. But 1500 units away are 32 crusher sectors whirring away at near-zero volume and using up all the sound channels with their obnoxious stnmov sound. The crushers may very well override the Imp, even though if you had a choice on what you'd rather hear, it would be the Imp and not the crushers. Now, priority values are loaded into the sound channels themselves, and they are scaled with the volume of the sound, so that quiet, more distant sounds have lower priority. As a dramatic example, a Cyberdemon in a large group of Imps would be sure to have his menacing MOOO! sound heard because his wakeup sound priority is very high and does not scale down with distance, whereas the Imps' sound is lower priority and scales down the further away they are. This makes sense obviously, because if there's a Cyberdemon around, you always want to know about it. I had to change the priority values of all Heretic sounds, because the old values were actually inverted. I took another look at Heretic's sound code, and it does something very similar to what I've done, except that their priority scale is inverted relative to DOOM's. In DOOM, a larger number means lower priority. So a Cyberdemon MOOO is high priority at 32, whereas an Imp's idle chortling has a paltry 120. This seems confusing even to me, so I can't blame Raven for changing it. In Heretic, a low number means low priority. For example, global ambience sounds were given a priority of 1, which is lower than anything else under their system. This makes more sense, but for compatibility purposes I have to maintain DOOM's values in preference to Heretic's. -------------------------------------------------------------------------------- 09/27/06 Began work on sound sequence support for ceiling actions. -------------------------------------------------------------------------------- 09/26/06 Added a tweak to the sound sequence system that will make Hexen work when the time comes to worry about that. Basically, "door" and "plat" type sequences need dedicated lookup arrays that store any sequences marked of that type with numeric ids between 0 and 63. These take precedence over the normal numeric sndseq hash table. I added a restart command for sound sequences after noticing zdoom has this, although it's not very useful yet because I'm not moving the envirosequence engine into data. I think it works fine as a native system, and I can provide a special enviromanager block in EDF to allow the user to tweak its default settings. Sound sequences now work for plat sectors :) -------------------------------------------------------------------------------- 09/25/06 Added topdamage field for 3D object burning, which was previously implemented as a special-case hack for FireBrazier objects for testing purposes. Added Heretic's environmental ambience sequences to sounds.edf, added the ability to have pure sound aliases, changed MapInfo environmental sound replacement to work with the sound sequence engine, and began integration of sector sound sequences, starting with doors. The difference between sound links and sound aliases is a bit difficult to explain, but basically it's like this: A) A sound alias simply provides another name by which the aliased sound can be played. It will be played in the exact same manner as though it had been started via its own name, because alias resolution is performed first. B) A sound link provides an entire separate set of parameters for playing a sound. Links are resolved after all the data has been used to setup the sound for playing. Sound aliases are needed so that the default sound sequences can use them and therefore become gamemode independent to the largest degree possible. I have also expanded the sound volume precision that is sent down to the system- specific sound driver code, increasing the range from 0-15 to the full 0-127. This gets rid of the presentation of false precision in ambience and sound sequences, and it smoothes out distance attenuation significantly. -------------------------------------------------------------------------------- 09/22/06 Fixed an error in the spechit emulation that was adapted from Chocolate Doom, and I let fraggle know about it :P -------------------------------------------------------------------------------- 09/21/06 Began addition of spechit overflow emulation, originally from prboom+ and with some tweaks from Chocolate Doom. This should improve Eternity's standing with the demo watching crowd a bit once again ;) -------------------------------------------------------------------------------- 09/19/06 I created a real realloc function for the zone heap, which is something I had been mulling over mentally for a couple of years now actually. The BOOM version of Z_Realloc was actually naive and always performed the worst case operation; that is, allocating a buffer of the new size, copying the old one into it, and then freeing the old one. Not only is this inefficient in a number of cases, but it also requires 2 times the necessary free RAM to be available during a realloc. The new Z_Realloc recognizes all possible cases: 1. The block can be expanded in place by absorbing the next free block. 2. The block can be shrunk. 3. The block can be left the same size. 4. The block must be moved. It seems the largest number of reallocs do fall into category 4, but there's a significant chunk that do not, and most of them are the ones occuring during actual gameplay (libConfuse actually generates an enormous number of realloc calls during EDF, and this skews any statistics I try to generate using the zone logging file -- most of them are of type 4). The secret feature is more or less complete now, and options related to it have been added to the config file. I added an MDK cheat console command sort of like the one zdoom has. It fires a tracer that can instantly kill any monster. This comes really in handy when you summon up something that you don't really want to deal with ;) -------------------------------------------------------------------------------- 09/18/06 Finished up memory usage improvements by creating a conditionally compiled log file system for the zone heap which can record all memory operations. -------------------------------------------------------------------------------- 09/13/06 Made small tweaks to some of EE's parameterized codepointer functions. -------------------------------------------------------------------------------- 09/11/06 Low detail mode integration has been completed, along with the addition of the ability to have multiple span drawing engines as well (now you can use the old inaccurate drawers if you're an ultra-purist; me, I'll stick with the new ones). I have begun a massive sweep of the source code to find allocations that are at PU_STATIC level which should actually be PU_CACHE. The vast majority of these appear to be patch graphics used in the HUD, menus, and other systems. -------------------------------------------------------------------------------- 09/05/06 In connection to the special feature, I have changed the music volume range back to its original 0 to 15, I have enabled the ability to have a single unified mouse sensitivity setting instead of two independent axes (in actuality, setting the unified value just propagates the value to both of the normal settings), and I have also added the ability for the game engine to use multiple column drawer engines. This is in preparation for the restoration of "low detail" mode. I restored the old column drawers and made the quad cache optimization an option alongside the original rendering method. -------------------------------------------------------------------------------- 09/01/06 Applied some bug fixes and tweaks to the e_thingtype console command. -------------------------------------------------------------------------------- 08/31/06 Work on the special feature continues, and it's almost complete. -------------------------------------------------------------------------------- 08/30/06 Added an "emulated" flag to the menu system to standardize some behavior previously hard-coded to the emulated old main menu. Added memorial messages for Toke, and bumped everything up to the new version. -------------------------------------------------------------------------------- 08/21/06 A truly horrible weekend for the Doom community. Since I'm actually writing this well after the fact, I won't go into a lot of detail, but suffice it to say that our friend Toke will be sorely missed. I have already decided to dedicate the next release of Eternity, which will now be deemed v3.33.50 "Phoenix", to his memory. I'm also working on a "secret feature" that will be a nice little extra touch for this release, and something that Toke might have appreciated since he loved the oldschool purist DOOM. This kind of tragedy has a way of grabbing you and slapping you hard in the face over and over until you realize just how fleeting and tenuous life really is. -------------------------------------------------------------------------------- 08/09/06 The whole 3D clipping fiasco put me off coding for a while and so I didn't get much done during the past month. Amongst things that were done, however, are basic types for EDF things. These are standard sets of flags that can be extended in the future without breaking peoples' EDF patches. I've noted a long-standing problem in the sound engine. Sometimes sounds seem to be getting cut off unexpectedly. For example, a demon's snort in the E1M5 demo for Ultimate Doom seems to cut off the player's shotgun blast. Extensive debugging hasn't revealed anything yet, but I know I'm not just imagining this. -------------------------------------------------------------------------------- 07/04/06 July 4th. How patriotic. Anyways, during the past week I have integrated a tweaked version of zdoom's 3D object clipping code into Eternity to replace our defunct system. It seems to work flawlessly after some initial difficulties with touchy objects and 3DMidTex lines. The new system has some capabilities our old one did not, including the ability for me to easily add fire damage to things like torches when you stand on top of them :) -------------------------------------------------------------------------------- 06/26/06 I fixed a bug in EE's screen patch scaling that was making black pixels show up at the ends of some columns (this was the cause of the dark lines on the R_Init loading box at startup). I have also discovered that 3D object clipping is once again completely broken with respect to sector movement. I have no idea if my recent changes are responsible for this (and if so, which), or if this is a problem reaching back to or earlier than the last release. The problems in the system have come to a head and must be dealt with. I have again made a new experimental fork of the engine to work with. Right now I'm thinking about trying to restart from scratch with it :( -------------------------------------------------------------------------------- 06/20/06 Fixed some bugs in the text HUD widgets. -------------------------------------------------------------------------------- 06/19/06 Yay it's my birthday! Today's a big day for Eternity too. The release of Crucified Dreams revealed some problems in EE's MapInfo system that required addressing so that I could make a custom MapInfo lump for that project. I also bit the bullet and got the seg limit expansion done at long last. The entire "ordeal" lasted about 5 minutes and was incredibly simple. The limit on all mutually referencing map entities should now be 65535 rather than 32767. Yet more sound sequence work has also been done. -------------------------------------------------------------------------------- 06/17/06 Got many things done. More joe Small functions and work on sound sequences. I found a long-hidden bug in the music engine that was doing a case-sensitive compare on lump names. This was failing to pick up new music lumps. Put in some tweaks for 3D object clipping to try to make it more symmetric. Fixed a bug in joe's free TID function related to maxing out the value of an unsigned short and trying to compare against the value -- an infinite loop could occur. I also made the 32-bit rendering fixes conditional on the R_SIXTEEN define just in case there are problems with the changes. -------------------------------------------------------------------------------- 06/10/06 After a few days of work, I have finally cracked the cause of a long-standing crash bug in the DOOM engine related to areas of height 2500 or greater. The Caves of Circe level from Hexen was crashing reliably in the same place every time I fell down a deep hole. By saving the game and jumping off again and again and employing both printf-style debugging as well as all of the debugger's tools, I found that the same integer underflow in the clipping arrays could cause three different errors: 1. The error would be caused by R_DrawColumn attempting to draw to some outrageous coordinate such as 32000. 2. The game would crash in R_DrawSpan in a similar manner. 3. The game would trash out almost the entire BSS static variable memory segment via an out-of-control iteration on the spanstart array in R_MakeSpans, and then segv at some arbitrary point later, often during shutdown when trying to write the configuration file. This made debugging more complicated, but once again my invaluable experience with the "two-week bug" enabled me to instantly recognize the overflow when it happened. Determining where it happened was a bit more difficult, since map files generated by VC++ obviously do not include static variables. I had to insert guard variables around the various arrays in the renderer to check for the overflow's beginning in RAM. The problem? Short ints aren't sufficient for the clipping arrays in DOOM. If the difference between floor and ceiling is too large in the right circumstance, it will attempt to store a value into the array that is less than -32768. This causes integer underflow, resulting in a value of +32000 typically. Since there's by necessity no bounds checking (and I'll note my attempts to add it ended in frustration), the error goes uncaught and makes the game go crazy later when trying to draw the underflowed columns or spans. The solution? Upgrade all clipping arrays, including openings and spanstart, to 32-bit integers. This doubles the amount of memory usage, particularly for visplanes, and will hurt cache performance, no doubt. However, the framerate of the engine doesn't seem affected on modern machines so my concern is minimal at this point. Also added some of joe's new Small natives :) -------------------------------------------------------------------------------- 06/06/06 The sound sequence engine is largely complete, including support for Heretic's global environmental ambience sequences. -------------------------------------------------------------------------------- 06/04/06 Added s_sndseq.c module and did major sound sequence work. I also got rid of the old Linux and MinGW build scripts that were obsolete and/or broken. -------------------------------------------------------------------------------- 06/03/06 Began laying ground work for sound sequences. -------------------------------------------------------------------------------- 06/01/06 You can now run console scripts from the command line using -exec. I added this mainly because 3.33.35 will require a console script to be run the first time to restore default values to the new dynamic console keybindings. Otherwise, everyone's keys.csc would be out of date again, and that was a nightmare last time. Removed pretty much everything DOOM-specific from eterhtic.wad to make it half the size it was before. -------------------------------------------------------------------------------- 05/31/06 Made EDF significantly more error-tolerant by substituting default values for some bad entries, sounds in particular. Warnings are now issued to the verbose log instead of causing an exit. Began work on EDF ambient sound definitions, inspired by Mordeth and some stuff I saw in zdoom's documentation. Added joe's new Linux build system to replace the ancient, no longer working one that fraggle made many years ago. Joe intends to build the Linux releases for me in the future, as well as making SVN revision compilations on an irregular basis. -------------------------------------------------------------------------------- 05/26/06 Partially generalized the finale system so that you can specify what type of finale sequence occurs after a map via MapInfo :) I needed this for my new "Episode 5" project, which needs a just-text intermission after the first map, but in Ultimate DOOM which didn't previously support text-only intermissions that go to the next map (they always ended the episode). -------------------------------------------------------------------------------- 05/25/06 Started research for the impending rewrite of the console. Quake 2's source code is going to be enormously useful, for I have found that it has a significantly cleaner and more efficient method of storing console text than any I had even imagined (I wish I had thought of it on my own...). I added a routine to the font engine that goes through all the patches of the font and finds the widest character width. This will be needed to more accurately calculate the number of characters allowed per console line. I've also made some minor adjustments to help joe_ compile under Linux. -------------------------------------------------------------------------------- 05/22/06 Added a new ALWAYSFAST flag, which makes a monster always have -fast/Nightmare attack speed behavior. Note that this doesn't speed up any fireballs they shoot, however, since that is handled separately through the fastspeed, nor would it make the Demon's walking frames half duration. -------------------------------------------------------------------------------- 05/21/06 Consolidated the gameinfo_t structures for Shareware, Retail, and Ultimate DOOM since only two whole fields differed between them. Those fields are now patched at runtime in d_main.c. I didn't delete the extra structs from the source, however, since it might be necessary to go back to the older setup if more fields are introduced that differ from the Retail settings. I also made a ton of minor adjustments that allow the port to be built with the Dev-C++ MinGW-based development package. The worst bug I got rid of was that the packing attributes on structures in amx.h (the Small compiler) were being totally ignored due to interference of typedefs. I should probably change my project to use -Wall and kill off some warnings too. I also got the DOS build running again. Why? I dunno, nostalgia maybe? I plan to do a full multiplatform release for the next version so that Eternity can definitively claim to be the last port to support DOS. The worst changes that DOS needed were 1) I forgot to change ENDOOM loading to be gamemode-dependent in the DOS version of the code, and 2) there's no STDISK crap in Heretic, so that also has to be switched off via gameModeInfo. This was technically a bug in the SDL version too, except that disk drawing is currently broken and therefore de facto disabled there. -------------------------------------------------------------------------------- 05/19/06 Figured out why flat swirling was crashing. SoM was accidentally accessing flattranslation[pl->picnum] and using its value when it was equal to -1 as an addend with firstflat in the argument to W_CacheLumpNum. Fixed by restoring pl->picnum to flattranslation[pl->picnum] after determining whether or not the flat is swirling (swirling flats don't animate, so this works fine). I also found out that my portal tainting system wasn't quite complete. Only the first generation of child portals were properly reset, and portals were still starting out with an uninitialized taint value at the beginning of the level, which would cause spurious rendering failures the first time you laid eyes on them (dunno how I missed this). -------------------------------------------------------------------------------- 05/18/06 Numerous issues have been found by different people in 3.33.33, so a maintenance release will most likely be forthcoming in the near future. Work has already begun, actually. I found an easy way to vastly optimize the blockmap unlinking operation for PolyObjects. During linking, the polymaplink_t's generated are now stored on an additional single-linked list that originates in the PolyObject itself. This way when the object is unlinked, I can simply run down this single-linked list and delete each node instead of searching the blockmap for the links. It's so simple that I'm plain sick that I didn't think of it earlier :P ================================================================================ EOF ================================================================================