Andrew Apted's Log 2007/07/10: Since the new object removal code gives some people errors about bad references, for the 1.29 release I have downgraded that to a warning. 2007/06/21: For 1.29 release, simplified the bot-game options: you no longer need "-players", only the "-bots" option is needed. 2007/06/20: Found a bug where some code passes ONFLOORZ in 'z' to the P_CheckAbsolutePos() function, which does not handle those special values. Since the release is imminent and I don't want to muck up the physics code, an awful hack work-around has been made, which shall cleaned up in a later release. 2007/06/13: Fixed new bug where loading a savegame would prevent weapon selection (using numeric keys) from working properly - they all would give the fist. Cause: pl->key_choices[] is not saved in savegame files, that is OK, but it was being reset to the wrong values (0 == FIST). 2007/06/12: Fixed bug #1734058 where fast (and turbo) crushers should not slow down when crushing. 2007/06/04: Noticed 'exittime' was not saved in savegames, so fixed it (though it would be hard to trigger this potential bug). Renamed GS_DEMOSCREEN to more accurate GS_TITLE_SCREEN. Removed the 'usergame' global, the same info is contained in the gamestate + demoplayback globals. More reworking of the gamestate flow logic. I'm nervous since it is likely something will break, and the breakage will inevitably cause a crash. Heavily reworked the Finale code (f_finale.cc), replacing the very kludgy way that F_Ticker() cycled through unused finale stages with a cleaner FindValidFinale() function. Fixed fatal error with Boss-Brain scream action. I have forgotten why I introduced the "fresh_game_tic" logic for the G_Ticker() code, and today's changes mean that it breaks the title screen progression. Oh boy. 2007/06/03: Fixed problem with MUS music on Win32 'detuning' when restarting the level, by sending a RESET_ALL_CONTROLLERS event to the MIDI output channel. Noticed that wipes sometimes flashed a 'wrong' frame, which I think is caused by capturing the old screen. Hence you get: (1) menu+old_level (2) old_level, (3) start of the wipe using (1) instead of (2). Trying to fix that problem really opened a can of worms!! The way that wipes were capturing the screen was plain wrong, another of those god awful hacks that managed to work OK with the original DOOM renderer but which fails miserably with OpenGL rendering. My new solution: E_ForceWipe(), which sets a flag and runs E_Display() directly to capture the screen. 2007/06/02: Fixed silly bug preventing screen wipes from working. 2007/06/01: Fixed IDFA and IDKFA cheats to give every type of ammo, and fill the clips of clip weapons. Fixed problem of title pic changes preventing the user from starting a new game (under normal circumstances it is rare, but when the title pic is animating very quickly then the problem is much more apparent). Added 'player_idx' field to ticcmd_t (it replaces 'unused1'), and removed the now-redundant BT_IN_GAME flag. 2007/05/29: Apparently the very first texture in the IWAD ("AASTINKY" for Doom 1 and "AASHITTY" for Doom 2) is treated just like no texture ("-") by the original EXE, and is never drawn. Added some hackish emulation code for it. 2007/05/28: Sound startup: when requested sound mode doesn't work, try lots of other modes until we find a working sound mode. The stereoness has the highest priority, followed by the frequency, and bits per sample has the lowest priority. Sound startup part II: support for different SDL audio drivers (via SDL_putenv "SDL_AUDIODRIVER=xxx"). The logic is analogous to the video driver: the default driver should be "dsound", but the -waveout option forces the "waveout" driver, plus the user can specify the exact driver using the -audiodriver option (handy on other OSes). Moved the main SDL_Init() call out of I_StartupGraphics, and pass a zero value (with or without SDL_NOPARACHUTE). The video,sound and cd code now use SDL_InitSubSystem(). Integrated patch #1624558 from Darren Salt, which fixes many compiler warnings. OpenGL: for workarounds for driver bugs, put them into a table and include some for R200 under Mesa 6.4 and 6.5. Code is based on a patch (pretty sure from Darren). 2007/05/27: Reimplemented the AMBIENT_SOUND feature (seems I was a bit hasty to remove it). Dummy textures (which are displayed when a texture of flat cannot be found) were broken and only displayed blackness, because the palette hadn't been loaded yet. Fixed it and removed the dependency on the palette. 2007/05/26: Noticed weapon selection for multiple weapons on a key is different than standard DOOM, where pressing '3' always switches to the super shotgun (when you have it) and only goes to the ordinary shotgun from the super shotgun. EDGE has the principle (inherited from DOSDoom I think) where you switch back to the last weapon you were using on that key. I plan to keep that principle, but make it work better than it does now. Okidoke, reworked the weapon selection-by-key stuff, removing the now unneeded 'weaponkey' array. Also made the next-weap/ prev-weap code use the priority field as the primary sorting criteria (the same logic is used when cycling through weapons on the same key). Fixed HQ2X scaling using the wrong palette. Fixed pseudo-sky-boxes (SkyMerge) using the wrong palette. 2007/05/25: Fixed weird assertion failures when a sound lump didn't exist, the caching code now creates 256 bytes of silence. Fixed the chainsaw sound problem, which occurred because the singularity feature was not implemented in the new sound code. Reworked way map objects (mobj_t) are removed from the playsim. In this new system, the map object is immediately removed from the mobjlist and blockmap, marked as REMOVED (state == NULL), and added to the remove_queue list. The 'fuse' field is used to count down time on the remove_queue (three seconds), then the object is actually deleted. Inside P_MobjThinker() we check for references to removed objects, and clear them. The impetus for this system is twofold: (1) allow sounds to play for a short time after removing an object (e.g. rockets hitting the sky), and (2) it should scale better when a large number of objects are being created and destroyed over small time-spans. 2007/05/20: Fixed loading Hexen format maps not honoring the ON_CEILING special from THINGS.DDF. 2007/04/25: DDF: made the SHOW_CLIP option of WEAPONS.DDF divide the current clip by ammopershot when showing it on the HUD. 2007/04/19: WAD code: compute MD5 hash of individual files. Fixed stupid bug that broke saving a savegame. 2007/04/18: Re-added the sound.ddf VOLUME and MAX_DISTANCE commands. Found the reason for the 'availabletics >= 0' assertion failure. When the new level is loaded, N_ResetTics() is called to reset gametic and maketic to 0. However, since this is called during G_Ticker(), the gametic is bumped up, breaking the "gametic <= maketic" invariant. Not really sure how to properly fix this. Ideally the big game-state changing functions (like loading a level!) are *not* called deep in the heirarchy like in the middle of a ticker function. For now I've put a band-aid on it. Improved edge.rc (the Win32 resource file), adding the VERSIONINFO block. When game is paused, release the mouse cursor. Mouse-wheel support for the automap, and tweaked zooming and panning speed. WAD code: merged the GWA and HWA cache checking stuff (which thankfully was mostly the same) into a single function FindCacheFilename(). Now the cached filenames include a 12-byte hexadecimal hash to prevent multiple files of the same name from colliding in the cache (getting the wrong GWA file causes level-load to fail). 2007/04/17: Added GetExecutablePath() to the EPI (exe_path.cc/h), which replaced the old (unreliable) I_ChangeToExeDir code. Drag-n-Drop now works again! Debugged the emergency Resolution selection code, which after a few tweaks is working fine. Also improved the R_DumpResList() code, which now is always printed. Also always I_Printf the command-line options. 2007/04/16: MAN I HATE LINKERS!! There are two source files for CD playback under Win32: w32_cd.cc and i_cd.cc, both providing the same API such as I_StartupCD(). Both files were part of the Win32 build, but the stupid linker never noticed the conflicts like it should. To cut a long rant short, I have removed i_cd.cc (the SDL version) from the Win32 build, although I've no way of knowing which is better. 2007/04/15: Continued reworking the resolution setting/changing code. Split it into two functions: R_InitialResolution() is responsible for setting the very first mode, trying a whole bunch of modes if the requested one fails, whereas R_ChangeResolution() is the one called by the menu code. The video mode is no longer changed from within E_Display(), which was one of those weird things inherited from the original DOOM sources. 2007/04/14: Began reworking the mode selection code, using the following principles: (a) the BPP given by -bpp and config file (and SCREENBITS var) is the "true" one passed to SDL I_SetVideoMode(). (b) the BPP shown in options menu is either 16 or 32. (c) for comparison purposes, 15 == 16 and 24 == 32, (d) for the list of available modes, if both are possible (e.g. 15 and 16) then only the power of two is stored. (e) the initial video mode (from config or command-line) will always be tried first, even when it isn't in the list of available modes. (f) modes are removed from the available list if the I_SetScreenMode() fails. (g) merge fucking scrmode_t and i_scrmode_t. (h) use pointers to scrmode_t instead of index numbers. Disabled the 'TEST RESOLUTION' button in Set Resolution menu. This seems to hark back to the pre-SDL (or even the DOS) days when we never knew what modes would work. 2007/04/13: More tweaks to the startup and shutdown code, e.g. fixing a problem of I_LockAudio() called twice without an unlock. Added I_MessageBox() to the i_system.h API, and fixed the Win32 version to make sure the dialog window appears on top of other windows (MB_SYSTEMMODAL + MB_SETFOREGROUND). Added mouse-button support for menus: left button is same as ENTER key, and right button is same as ESCAPE key. Discovered why on my Voodoo3 the default video mode was being set to 1792x1344 no matter what -width or -height was given: the Compare() function in v_res.cc would subtract two composed integers, the wanted bpp was 32 but all the available bpp=16, HENCE the largest 16-bit mode produced the lowest diff value. Aieee! 2007/04/11: Fixed the quit-sound, which wasn't playing due to the new software sound code. Win32 build: change over to link LibSDL dynamically, using the SDL.DLL (as well as include files and archive files) from the standard SDL-devel-1.2.11-mingw32.tar.gz package. Hopefully that fixes the problem with -directx option not working... Yay! Keyboard now works with the -directx option. Added mousewheel support for the menus. 2007/04/10: Implemented a "-gamma" command-line option. Implemented a fix for the "jerk up/down" problem when the player runs up to a lowering lift and activates it. The problem occurs because the player still has momentum, and the "step up" code kicks in when the lift reaches 24 units high. My fix is simply to treat lowering sectors that are above the player Z as blocking. Created an M_SFXOPT graphic for the Sound Options menu. 2007/03/28: Tweaked some system code (especially I_Error) to try and make them more robust. 2007/03/25: Sound code: finished the QUEUEING system, including support for 'Interleaved' stereo buffers. Converted the existing Ogg/Vorbis playing code to use the new system instead of OpenAL. Apart from tweaks & bug-fixes, the new sound code is done! 2007/03/23: Sound code: support for dynamically changing the number of mixing channels. When choosing fewer channels, all sounds except UI sounds are killed (hence the menu sounds should keep on playing). Removed SNCAT_Music category, the sound code will support music buffers directly. Sound code: Began work on QUEUEING system which is needed for Ogg/Vorbis playback (and eventually Humidity playback). It is modelled on the OpenAL system, hence the existing code for playing OGG/V should be fairly easy to migrate. Simplified the code using global sfx_volume and mus_volume variables, removing e.g. cfgsound, menusoundvol etc.. 2007/03/19: Removed the LINES/SECTORS.DDF AMBIENT_SOUND feature, which has been rather messed up for a long time and seems rarely used in mods. Implemented the "pseudo-looping" code. Noticed the Archvile fire didn't crackle, seems the entry in ATTACKS.DDF has been missing the correct sounds (FLAMST and FLAME) for a long time! 2007/03/18: Fixed sound code to use the values from the Sound Options menu, which are updated if the SDL audio device doesn't support the requested settings. Fixed stereo sound. My analysis of sound::UnlinkFX() -- only real usage is to keep the rocket (etc) sound after the object has gone away (especially when hitting the sky). Rather than saddle the sound code with this special case, I think the MOBJ code should simply keep removed mobjs around for a little while (a few seconds at most). Plans for looping sounds: I call it "pseudo-looping". In a nut shell: sounds don't automatically loop, instead they need to be "pumped" (started again) before they have finished playing. This system makes the StopLoopingFX() unnecessary, since the sound will play-out by itself. Fixed a weird bug in new code: the plasma explosion sound was cutting off the launch sound, even though they are in different categories. It turns out that the position for the launch sound was the plasma ball itself, therefor a KILLSOUND command in the DDF was killing the launch sfx! 2007/03/17: Okidoke, new sound code is starting to look quite good. Got the category system working (one problem was that player attacks never got the SNCAT_Weapon category). The algorithm for finding the right channel to kill when all the channels are full is working (including the idea of "hogs", which is when a category is using more channels than his limit). One thing of note: the PRIORITY field (in SOUNDS.DDF) has a smaller role to play now. For sounds on the level, it only has an effect when multiple sounds are played by a single thing. The priority is still very useful for non-level sounds (UI and Player/Weapon categories). 2007/03/15: Added 'Quiet Factor' to the Sound Options menu. I figure that giving the user the control (louder = more chance of distortion) is better than hard-coding my own preference. More work on sound code, moved blitting stuff to s_blit.cc/h, and managed to get the most basic setup running and playing some sounds, but so much more to do... 2007/03/14: Implemented new "Sound Options" menu, with settings for the sample rate, sample depth, stereoness, and number of channels to mix. Worked on the sound caching code, putting it in a separate file s_cache.cc/h to keep it out of the way. Made a position_c class (with x/y/z fields) which mobj_t inherits from, and which replaces sec_sfxorig_t. Hopefully this will simplify the sound API. 2007/03/13: Created a new build of EDGE.WAD, bumping the version number upto 5.0 (from now on it will match the DDF/RTS version). The [DOG] sprites were removed since they came from Wolf3d and hence we probably don't have the rights to use them. However the [DOG] entry (id #888) is still available, but it's just the DEMON sprite colormapped to brown. Implemented 'Shoot-thru Scenery' option in GamePlay menu (see below about PASS_MISSILE flag). Began work removing OpenAL Sound support, to replace it with LibSDL sound. 2006/11/25: Bit more work on the networking code. 2006/11/20: Restored -gdi as the default SDL driver, due to keyboard not working with -directx on my machine. Also, -directx will be saved in the config file so it doesn't need to be specified in the future when running EDGE. Discovered why many people consider the sound to be too quiet, the OpenAL 1.0 distance model is an inverse formula: (1 / d) but DOOM's distance model is linear: (1 - (d / max_d)). 2006/11/19: Added code to create DDF colourmap entries for the lumps appearing between C_START and C_END markers in the WAD. Support for colourmaps on BOOM [242] linetypes. This is another hack, because the texture names on the sidedefs are only known during LoadSideDefs() and are lost once we reach LoadLineDefs(). Fixed the generalised floor/ceiling "move by 24/32 units" linetypes, which never went downwards (ignored dir flag). 2006/11/18: Fixed Boom generalised stairs to handle the "ignore texture" flag. Added support for alternating stairs, which turned out to be a lot easier than expected, since I could use a feature already existing in EDGE: the "newtrignum" field! Moved teleport code into new file: p_telept.cc. Got elevators working. Code is rather kludgy, it basically tries to instantly move the ceiling to be floor + HEIGHT, where HEIGHT was the original sector height (c_h - f_h). At least with this method, the floor and ceiling cannot get out-of-sync (while the elevator is active), although it's possible that they end up out-of-sync afterwards. LINES.DDF: Changed all the P1/PR doors (about ten in all) to use TYPE=MANUAL instead of TYPE=PUSH. The difference is that MANUAL ignores the tag. BOOM uses the tag for lighting effects, hence some doors in DAWNING.WAD were not working. There's a small chance that this could mess up an EDGE mod which relies on the old behaviour, hence the -ecompat option will silently convert "MANUAL" type to "PUSH". 2006/11/17: Implemented P_CheckSightToPoint(), which prevents push/pull things from affecting things through solid walls. Fixed the flats rendered by the BOOM [242] linetype when used to make liquids areas. Began implementing BOOM Elevators. I decided the code would be a lot simpler to just have an "ELEVATOR" move type for the FLOOR plane_mover, instead of an elaborate set of classes for elevators. For linetypes 235-238, I've added new destination references "TRIGGERFLOOR" and "TRIGGERCEILING" which use the sector of the activating linedef. 2006/11/15: Found a bug in P_RadiusAttack(), which didn't add MAXRADIUS to the radius to search, meaning some things would be missed. The bug was present as far back as 1.27, maybe earlier. Strange that it was never noticed before. Simplified some code with P_RadiusThingsIterator() function. Worked on the Wind/Current/Point pushing code, which is now all basically working, and the force equation for point pushers matches very well in testing against PrBoom. Also updated friction code, Ice and Mud now give reasonable results. 2006/11/13: Made the region_properties_t hold the full sector type number (as loaded from the WAD). Added some fix-up code for this to the savegame loader, and bumped up the EDGEPATCH. 2006/11/10: Added initial menus for multiplayer games, only skeletons so far. 2006/11/08: Re-implemented a "KEEN_DIE" action, fixing a very horrible hack in DEH_EDGE which had to create a huge number of RTS scripts to achieve the same effect, and potentially messing up other stuff. Moved WIN32 timer stuff into w32_mus.cc, and reduced frequency from 140Hz to 70Hz (which might be more stable). 2006/11/07: Added new option '-videodriver'. Win32: made default SDL video driver be DirectX (instead of the default, which is GDI aka "windib"). This can be overridden by the -videodriver option, and also two new options '-gdi' and '-directx'. Linux: added new '-core' option, which causes EDGE to dump core when a fatal error (especially an assertion failure) or a segmentation fault occurs. 2006/11/06: Fixed (fatal) bug with handling of DeHackEd patches (more specifically: it has the wrong cached HWA filename). 2006/10/19: More compatibility with original DOOM. When 'True 3D gameplay' option is disabled, missiles can pass through scenery items (like trees, lamps and torches). This happened in the original because the heights were wrong (16 units high). For EDGE a new special "PASS_MISSILE" has been added to achieve the same effect. 2006/10/01: Reworked item pickup code in p_inter.cpp. Made the hack which kept keys in CO-OP games into higher quality code. Fixed weapons for _old_ DeathMatch so they don't disappear when picked up, and to also give 2.5 times the normal ammo. Fixed bots to cope better with old DeathMatch pickup rules. Fixed IDCLEV cheat to work in DeathMatch mode. 2006/09/23: Moved EDGE code from CVS to SVN repository, restructuring the directory layout, renamed ".cpp" files to ".cc", and moved stuff that was in sub-dirs (SDL/*, linux/*, win32/*) into the same directory as the rest of the source code ("src"). Worked on build system, fixing it for the new directory layout, creating a SConscript file for the "src" directory, and integrating the Windows cross-compiling stuff. 2006/09/16: For LINES.DDF, tidied up the RTS Enable Tag types, removing the unnecessary SINGLESIDED flag, and added some extra types for MONSTER activated lines. RTS: changed WHEN_PLAYER_NUM so that a single value gives the minimum number of players. 2006/09/09: Reworked the way Voodoo Dolls are spawned. Added support for Boom's SWITCHES and ANIMATED lumps. 2006/09/08: Made it so after saving a game and you go back to load it, the skull cursor will be on the slot you just saved. 2006/09/05: Added 'tag' numbers for things on the map. These values can be loaded directly from the Hexen map format. RTS work: keyword parameters for SPAWN_THING command, of the form "XXX=value". They must be placed after all the normal parameters. Valid keywords are: X,Y,Z,ANGLE,SLOPE,TAG. The TAG keyword can also be used on THING_EVENT and DAMAGE_MONSTERS commands too, and THING_EVENT allows "ANY" for the thing type. 2006/09/01 Been working on supporting BOOM's wind/current/point pushers. Added THINGS.DDF specials PUSHABLE and POINT_FORCE. Note that all things which are SHOOTABLE are automatically PUSHABLE. Added LINES.DDF sector effects SET_FRICTION, WIND_FORCE, CURRENT_FORCE and POINT_FORCE, which implement BOOM line types 223, 224, 225 and 226 respectively. 2006/08/17: Initial implementation for Boom linetype 223 "set friction". Boom's handling of muddy/icy sectors is quite complicated and I don't intend to emulate it perfectly, although I'll get as close as possible using EDGE's physics. Removed the old "Boom/Edge" compatibility option and detection code. EDGE will default to being a BOOM compatible engine. The EDGE-specific sector types have been renumbered to lie in the range 4400-4499. A new option "-ecompat" has been added to allow any existing mods which use the old numbers to work. 2006/08/16: The CAPSLOCK and NUMLOCK keys don't behave like normal keys (they act as if the key is pressed the whole time the light on the keyboard is on), so I've added a workaround for them. Experimented with automatically extracting the color for a dynamic light from the sprite (monster attacks). 2006/08/08: Automap: draw horizontal/vertical lines as a box, which fixes really bad rendering on the Voodoo 3. Ditto for progress bars. 2006/08/04: Removed the checks in RTS and DDF which required "#VERSION 1.29" to be present when using certain (new) features. Also removed the deprecated warning for the old-style DDF/RTS comments. Added POWERUP_BARE_BERSERK powerup to ddf, now POWERUP_BERSERK always gives you the fist and is retained for the level. That is a better way to keep backwards compatibility. Removed hack which made SILENT_TO_MONSTERS apply to both primary and secondary attacks unless "#VERSION 1.29" was given. This is a small break in backwards compatibility though. 2006/08/03: Added SPAWN_LIMIT to attacks.ddf, which limits the total number of the spawned objects on the level (both SPAWNER and TRIPLESPAWNER attacks). Used for Pain Elemental compatibility with DOOM. Simplified debug output: -debug (not -debugfile) enables output to the "debug.txt" file, in the same directory as "edge.log". Also made screenshots be stored in a "screenshot" directory in the same place. Now these features can work when EDGE is installed in a global (read-only) place, especially in Linux. 2006/08/02: Fixed bug where console background sometimes flashed over the whole screen at the start of the drop-down sequence. Savegames now use ZLIB for compression. The -warp option and IDCLEV cheats now allow a number, for better compatibility with original DOOM. 2006/07/31: Integrated 64-bit fixes by Darren Salt. Began work on using the "SCons" build system for EDGE. 2006/07/20: RTS: Added BLOCK_LINES command analogous to the existing UNBLOCK_LINES command. However any things (including the player) touching the line will get permanently stuck. Fixed bug when MOUSE_LOOK was disabled and you used a melee attack (punch/saw) on a monster, causing the vertangle to become "stuck" on a high angle -- rockets/plasma would go straight up into the ceiling, and punching stopped working. 2006/07/19: Fixed name matching for keys (REDCARD == RED_CARD). Fixed #CLEARALL in WEAPONS.DDF to prevent the player getting weapons previously marked as FREE. 2006/06/27: Reworked the DeathBot code, making it functional again. Still very dumb though. Also fixed the -bots command, and the BFG spray which stopped working in deathmatch. Finally the unused MF_JUSTPICKEDUP flag was removed. 2006/06/22: Fixed vertical wrapping of midmasked textures (especially when SMOOTHING was enabled). 2005/10/24: Music: The win32 MUS player now validates the format (to prevent trying to play a MIDI file as MUS). Also updated the code to prevent a possible race-condition when the song data is deleted. 2005/10/15: Renderer: default FAR distance is now 64000. RTS: fixes for SHOW_MENU: (a) allow no choices, (b) when only one choice, don't prefix with "1.", and allow SPACE/ENTER keys to accept, (c) 'Q' and 'X' keys can cancel the menu, (d) bump up maximum lines in TITLE area to 24. Applied Darren Salt's "no CD music" patch. 2005/10/11: DEH_EDGE: Fixed the player ammo limits, which were using some names ("DAGGERS" etc) which have since been replaced ("AMMO9" etc). 2005/10/02: Video: Added 1280x1024 and 1600x1200 as possible resolutions. 2005/09/19: Implemented (finally) some PNG save code. 2005/09/05: RTS: Implemented "ALL" keyword for START_MAP, causing the script to be spawned on every map. 2005/08/30: Fixed an infinite loop (!) when -music -nosound was given (or in my case: sound couldn't be initialised) and OGG music was tried to be played. Affected the Humidity player too. 2005/08/28: Increased TIP_SLOT_MAX from 30 to 45. 2005/08/23: Implemented new attack special "NOTARGET", which forces bullet and projectile attacks to go straight ahead and ignore the monster being aimed at. For object spawners (like the Pain Elemental), the spawned things won't automatically hate the player (or whatever their parent has a grudge against). 2005/08/19: Reworked the flat-flooding emulation to cope a bit better with the new Doom light-fading stuff. Also limited the size of the drawn plane, to prevent some very Slimetrail-like glitches (e.g. SCYTHE2 MAP17). Also changed the rendering order of solid surfaces, now back-to-front. So far I haven't noticed any ill effects, which is good, but will revert to the old code should a significant issue pop up. 2005/08/08: Allow the ENTER key to be used for in-game actions (previously the HU_Responder code always ate it). 2005/08/07: glBSP: Finished final testing for version 2.20. What remains now is to update the glBSPX front-end, update the documentation and web site, and then release the mungrel :). 2005/08/06: Fixed problem with BERSERK powerup which was applied to _all_ melee type weapons (e.g. the Chainsaw). For this I've added a new Attacks.DDF command BERSERK_MULTIPLY, which can work with most types of attacks (melee, shot, missiles). Added new PICKUP_EFFECT called "KEEP_POWERUP(BERSERK)", which makes the berserk be kept for the rest of the level, replacing the previously hard-coded kludge. It is automatically added when #VERSION < 1.29 for compatibility. 2005/08/01: Wad code: don't assume that the presence of C_START/C_END lumps indicates that the wad was meant for BOOM. 2005/07/17: OpenGL: added the missing glNormal assignments when rendering the skybox planes. 2005/06/04: Simplified the way monster reloading works, the RELOAD_CHECK action now increases the shot_count itself. Also added a new RELOAD_RESET action. Fix for Bug #1209521 (unable to use GWA files with levels in a modified EDGE.WAD). Screenshot work: Output format is now JPEG. Added key mappings for PrtScr key (not yet tested). Added new 'screenshot' console command, making sure the console itself is not saved -> getting it to work correctly required the glReadBuffer(GL_FRONT) calls to be removed (just use OpenGL's default: GL_BACK when double buffering). Linux: made the keypad numbers map to '0' upto '9' (similar to Darren's patch #682561, but not as general because the engine doesn't support mappings for the weapon keys yet, and that's too big a job this close to the release). 2005/05/27: Investigated why the railing texture (REDWALL) in Aliens TC doesn't show up in EDGE. It's because the patch is 200 pixels high, but the texture is specified as 128 pixels high (in the TEXTURE1 lump). Seems DOOM/BOOM allow this because of column based software rendering. The fix is not trivial, so I'm not going to worry about it for now. 2005/05/25: Fixes for continuous (perpetual) floor types in LINES.DDF (numbers 53, 87, 162, 181) which had height targets which were wrong or inconsistent (they all should go down to the lowest included floor and up to the highest included floor). Noticed the problem at the start of MAP01 in ONEWEEK.WAD. 2005/05/22: Tweaked the new lighting emulation, and tested it against the software renderer in LsdlDoom. The behaviour is not completely the same, but close enough I think (the player's weapon is now fixed too). 2005/05/21: Level loading code: detect the TNT Evilution MAP31 bug (missing yellow keycard) and fix it. Implemented emulation of Doom's lighting (the way it fades the further away things are). Can be changed in the Video Options menu. Default (for now) is enabled -- we'll see what people say about it with RC#2. The equations are not quite right, sprites are definitely too bright up close... 2005/05/18: Added support into EDGE for V5 GL-Nodes. Untested. 2005/05/15: Fixed bug with EDGE's network code, which wasn't setting the port on the destination address when the -server parameter was used (hence couldn't connect). Added "HOVER" special (as per RFE #1115207) for THINGS.DDF which makes the sprite of an item hover up and down. Added support for Ghosts, where bullets and missiles can pass through an enemy. The new things.ddf command is GHOST_CLASS and it takes a set of letter flags (like IMMUNITY_CLASS). Also implemented a SIDEGHOST special which is similar to SIDEIMMUNE but allows you to shoot through your buddies :). 2005/05/14: Added support for loading DDF files specified directly on the command-line. The way it works is to check the tag at the top of the DDF file, and convert that into a lump name (e.g. becomes DDFANIM). It's a bit dirty, but it's not a good idea to do major reworking this close to the release (IOW, we can clean it up later :). Added fix for Bug #882895, loading the correct language strings for TNT Evilution and The Plutonia Experiment. The base name of the IWAD is stored in 'iwad_base' global, this is consulted when loading DDF and causes "TNTLANG" or "PLUTLANG" lump to be read in when needed (in addition to all the normal stuff). Implemented NOZBUFFER special for things.ddf. Mainly useful for "particles" (e.g. smoke puffs, blood) to prevent Z-fighting when there are many of them in a small area. 2005/05/13: Been working on emulating Doom's original lighting (levels fading away in the distance). A real bug-bear has been OpenGL (more specifically: drivers) which only compute lighting & fog on the original vertices and interpolates across that -- the effect is terrible, made worse because the values are computed BEFORE the vertices are clipped to the view frustum. OpenGL FOG proved to be unsuitable because the equations always diminish to zero, which doesn't match the Doom formula (lighting values >= 128 diminish to a specific value). The Doom formula is this: level = lighting / 128.0 + 40 / dist - 1.0; where the result ranges from 0.0 to 1.0. Using a single OpenGL light at the view position and invoking the LOD polygon splitting code should give a good approximation to the original game. 2005/05/11: Created a new credit screen to go with the title screen. 2005/05/09: Added support for using HQ2X in the image code, fixing many many bugs with the epi/image_hq2x code in the process. There are two console variables to control this (they have command-line versions too): "hqscale" enables/disables the whole effect, "hqall" makes the effect apply to everything (sprites/flats/textures), it is normally disabled which means the effect only applies to HUD elements (title pics, status bar, etc). 2005/05/08: Integrating the H2QX (High Quality 2x scaling algorithm, by Maxim Stepin) into the EPI. Updated the code to directly handle palettised images (removes the unnecessarily loss of precision that the intermediate RGB-16 table caused, not to mention using less memory). Made it handle transparent pixels (based on Jaakko Keränen's Doomsday modification), and improved the YUV calculation. 2005/05/05: It seems the high value of Z_FAR (200000) causes serious problems on some OpenGL drivers (Geforce4 MX). I have changed the near and far clip distances to be 4 and 32000, and made them configurable ("nearclip" and "farclip" as console variables and cmd-line options). 2005/04/27: Added point classes to the EPI (ipos_c for integer, pos2_c and pos3_c for float), as per request from Andrew Baker. 2005/04/24: Attempted fix for Bug #1188291 : removed the EF_DLIGHT mobj flag (it was just a cached check of info->dlight.type), since it's possible in the monster resurrection code for this flag to get the wrong value. 2005/04/18: Camera class is shaping up, added some test code, fixed some bugs, the sphere-cone interection test seems to work, but the BBOX interection test is broken. 2005/04/15: Began work on a new camera class (rgl_camera), which should eventually replace the current mess. 2005/04/14: Added bounding box class to the EPI. Completed the EPI vector classes (although they still need some testing code). Added a fast, high-quality random number generator (the Mersenne Twister) to the EPI. Implemented test suite for it, and in case you were wondering: she passed. 2005/04/08: Fixed intermission code to display an error (instead of crashing) when the game definition is not found. Updated system network code, with 'nonet' variable (analogous to nosound and nomusic), I_StartupNetwork, I_ShutdownNetwork and I_NetworkReturnError functions. Improved network code's way of determining local IP address, and method used to find the server. Also fixed a problem in MP_Server where under Linux incoming broadcast packets were not received. Reinstated 'language' field of EDGE.CFG. 2005/04/07: Made #CLEARALL in Weapons.ddf do something useful (prevent you getting the previous weapons via the cheats). Added hack-ish fix for problem when weapon sprites and thing sprites share the same 4-letter prefix (e.g. rifle pick-up sprite in Immoral Conduct is SAWDL0, the other SAWDxx are weapon sprites). 2005/04/03: Found synchronisation problem with net-games, the random_seed was being set to different values. Sorted out the single player/coop/deathmatch variables, adding the following three macros: SP_MATCH() : deathmatch == 0 && numplayers <= 1 COOP_MATCH() : deathmatch == 0 && numplayers > 1 DEATHMATCH() : deathmatch > 0 Fixed the meaning of the 'netgame' global var to be "we are connected to a server and exchanging packets with it". Some parts of the code associated 'netgame' with multiple players, but you can play Deathmatch/Coop without a server (with Bots). Improved network startup, setting game parameters and player information from the packets received from the server. 2005/04/02: Spent some time working on multiplayer support. I have made the user interface in MP_Server a lot simpler, and updated the code to use TCP connections (NL_RELIABLE_PACKETS). For the first time two separate EDGEs are able to connect to the server and play a game, but they are not synchronised. 2005/03/28: Fixed image system to give title screens defined in IMAGES.DDF the higher threshhold before degradation. The title screen doesn't blur now at the LOW detail setting. 2005/03/23: Demo code: store player sync information (it may help 1.29 demos to work in later versions of EDGE). Fixed a problem causing large de-sync when using menus while recording. 2005/03/19: Fixed custom sky boxes so the top image (of the cube) does not need to be turned up-side-down. 2005/03/18: Looked for problem with secondary attacks not reloading properly. Found culprit in ddf_weap.cpp and fixed it. 2005/03/11: Added an additional four ammo types. The total is now 16. The eight new ones are called AMMO9 thru AMMO16, and the eight olds ones have aliases AMMO1 thru AMMO8. 2005/03/05: Implemented an additional sky stretch mode "ORIGINAL", which renders the sky just like the original EXE. It doesn't work well with mlook, which doesn't matter since the purists who prefer this sky mode will also disable mlook. Added "Mouse Look" enable/disable to gameplay menu, and save the setting in the config file. (I was a little surprised this option wasn't already there). 2005/03/01: Console: made it slide down/up rather than instantly appearing and disappearing. Made the font smaller. Created a new PNG background image. 2005/02/28: Implemented the "swap stereo" option by negating the listener UP vector passed to the AL. Added temp fix for console background (wrong size after the resolution was changed). 2005/02/27: Renderer: made world sprites and weapon sprites consistent WRT GL_BLEND and GL_ALPHA_TEST modes. Fixed certain teleporter linetypes (39, 97, 125-126, 207-208, 243-244 and 262-267) to teleport objects, for compatibility with Boom maps. Closes Bug #1144418. Updated OpenAL code with 'NO_SOURCE' define (-1), removing the use of zero, as zero may be a valid AL source identifier (as per advice from the OpenAL mailing list). Set PLAYINGSFXLIMIT to 30 (attempted fix for Bug #1152196), noting that we should improve our AL source management after 1.29. Sky code: allow room for tall sprites (upto 256 units) so that they don't get clipped. Fixes the trees in BOOMEDIT.wad. 2005/02/26: Reworked sound/music volumes for a large range (twenty steps on the sliders), with a non-linear lookup-table which gives finer control at the quiet end. Added velocity vectors to the sound system API, but have disabled doppler for now due to some bad-sounding effects. Pass relative and position info directly to I_SoundPlayback, and volume directly to I_MusicPlayback. Added I_CDTicker function to the CD code (Win32 and Linux). 2005/02/24: Fix for Bug #1144429: sectors that change the ceiling texture to F_SKY1 cause HOM. Fix (courtesy Darren Salt) for Boom generalised stairs (wrong movement height, 32 --> 24). Fixed Bug #1144422 where "MANUAL" linetypes (e.g. from generalised types) did not work properly (they should ignore their tag). Automap: use anti-aliasing (GL_LINE_SMOOTH), as requested in RFE #1116615. Can be turned off with SMOOTHMAP console var. Demos: play them via drag-n-drop onto the EDGE binary. 2005/02/23: Removed USE_DEH define from code and makefiles. Fix for Bug #1144419: line-to-line teleporters did not match Boom's behaviour (WRT reversing). 2005/02/21: For images.ddf, support both JPG and JPEG keywords. 2005/02/19: OpenAL: at startup, generate a single output source for the software music systems (OGG/Vorbis and Humidity). 2005/02/18: Made fading of powerup effects optional, new console variable FADEPOWER controls it. Closes Bug #1120467. Removed some unused globals (e.g. effect_colourmap), noting that non-player cameras have been broken for quite a while (they use too much data from the displayplayer). Something to be tackled after 1.29. Fixed demo filenames which would add ".edm" even if the given filename already had an extension. 2005/02/17: Input system: made gamekeys[] array store both pressed and released state of a key, clearing the released keys after the ticcmds have been built. This allows keys pressed very quickly (or some special cases, e.g. the mousewheel, where the down & up events are simultaneous) to be used in-game. Implemented next weapon / previous weapon keys. Fixed Bug #1122229, where a sector lighting of zero still allowed some stuff to be seen. Added a hack-ish but working fix for Bug #1119744 (actually Darren Salt's comment) where a rotated automap would not draw some parts of the map (wrong clipping). 2005/02/16: Discovered why mlook flip-over bug occurred: it is due to the FLOAT_2_ANG() macro, trying to cast a negative float value to an unsigned int -- I just assumed it would "wrap around", but it is actually limiting the value to the unsigned int range, hence FLOAT_2_ANG(-88) becomes zero! Adding a temp fix for the 1.29 release, afterwards switch to epi::angle_c class. Found problem with external PNG/JPEG loading. The Win32 functions ReadFile() and WriteFile() return zero _on error_, but the win32_epifile.cpp code assumed the opposite. 2005/02/14: Fixed bug not clearing the pain/death override state names (Bug #1092525). Added a fix for Bug #1121571, giving "Weird actor->movedir" error after a monster stops following an RTS path. Fixed fuck-up where using -playdemo with a non-existent file would make EDGE, for all intents and purposes, "lock up" (it kept trying to open the demo, ad infinitum -- I have a 250MB edge.log to prove it!). 2005/02/10: The TRACER and RANDOM_TRACER actions had almost identical code, the difference had nothing to do with randomness as their names suggest. Hence merged into a single function. 2005/02/09: Reverted smoke-trail Z-adjustment to be like the original (fix for Revenant's missile -- also with fixes in DDF). 2005/02/08: A bit more refactoring in p_action.cpp. New attacks.ddf command TRACE_ANGLE which removes hard-coded value. 2005/02/07: Fixed smoking tracers (missiles) so that they generate smoke even when not following their target. Removed EF_NOTRACE flag: the same thing can be achieved by simply setting the projectile's target to NULL. Moved the logic for "autoaim slightly to the left or right" into the P_MapTargetAutoAim() routine itself. Removed the global variable 'linetarget' (a dirty way of passing a value back from P_AimLineAttack function). Renamed functions for consistent use of the 'P_Act' prefix, namely that all DDF actions have this prefix, but no other functions have it. Reworked targetting method when autoaiming is off: instead of using a dummy MOBJ as the target, we now treat a "NULL" target to mean "fire straight ahead". It was mainly the LaunchProjectile() function that needed changing: the work is now done by DoLaunchProjectile() which takes the exact target coordinates, and a new function P_TargetTheory() for easily computing them, whether target is NULL or not. 2005/02/06: Weapons: allow clips to be reloaded without requiring them to be filled (in particular, when available ammo is less than a full clip size). This behaviour is disabled by the pre-existing NO_PARTIAL special. 2005/02/05: Worked on makefiles. 2005/02/03: Fixed problem causing the title screen to run too fast. 2005/02/02: Investigated the "shots passing through extrafloors" bug. It's a bit embarassing, it's not really a bug since there is no code there to contain a bug -- I never got around to writing the checks for a hitscan going sharply upwards. I remember the plan now: integrate the shoot & aim algorithm with the new sight code (which DOES check these kinds of situations properly). Since this change is far from trivial, I'll postpone it until after 1.29. 2005/01/31: Discovered why you don't slide along walls in certain places (e.g. curved corridors in Plutonia MAP03) -- happens since the code will never change the sign of a momentum component (DX or DY). For example, a slide that requires a low DY value to go from negative to positive won't occur. Fixing this can wait until after 1.29. 2005/01/29: Savegames: simplified format, removed silly XOR encryption and removed the redundant end markers. Should make savegame files smaller (initial tests show 30% to 40% reduction). Backwards compatibility has been maintained. Added some fixes for mid-masked textures, now the railings in Eternal MAP28 and the wireframe crate near the start of P.A.R E1M1 are working properly. A few things still don't work (e.g. forcefield on linedef #943 of Eternal MAP28). 2005/01/27: New demo system is tentatively working. 2005/01/26: Began work re-implementing demos based on the new spec. Some things I'll leave until later: running demos from lumps, using compression, support for more than 1 player, the player synchronisation feature, and storing explicit game events. 2005/01/25: Worked on new demo specs (docs/tech/demo_fmt.txt). 2005/01/21: Still reworking the player handling. Added a newgame_params_c class that is passed to G_DeferredInitNew and G_InitNew, and which includes information what players are in the game (local or networked, human or robot). Added I_Sleep() to the system interface. Reworked engine::Tick() to merge the singletic and normal behaviour into one simple loop. 2005/01/20: Began work on fixing demos. First step: remove reliance on having players outside of an in-progress game. 2005/01/19: Worked on loading JPEG images. 2005/01/17: Made partial clip reloading the default, use NO_PARTIAL weapon special in DDF to disable it. Fixed the NoAmmo+Clip handling (in particular, the chainsaw in Immoral Conduct). 2005/01/16: Finished work on PNGs as lumps, updating PNG reading code to use the epi::file_c interface (rather than a FILE*). 2005/01/15: DDF: made filenames in Images.DDF relative to gamedir. Likewise for filenames in Playlist.DDF. Missing OGG/Vorbis files now cause a warning (instead of fatal error). Worked on reading PNG images from lumps in the WAD, including new epi::mem_file_c class. 2005/01/14: Updated PNG loading code so that solid images are loaded without an alpha channel, which not only saves memory but also ensures that the "gap area" (when width or height is not a power-of-two) is correct/consistent (solid black). 2005/01/13: Reopened Bug #1026649 (misaligned textures), since my "fix" seemed to introduced more problems, e.g. a door in Dmonfear MAP10. PrBoom (and others it seems) are using the modulus of the y_offset with the texture_height, which can produce different results than the original Doom. Even BOOM 2.02 did not use the modulus. I think that PrBoom has broken compatibility. Now the question is: which one to support ? My preference is to be faithful to the original. 2005/01/11: Images.ddf: implemented support for using NEW sprites (the previous code only allowed replacement sprites). 2005/01/07: Fix for some PNG images which had transparent parts but were marked as solid (simple too: just check for tRNS chunk). Decided that IMAGES.DDF can't work with a single namespace, since the structure of WAD files means that name clashes are not just possible, they happen quite often. I'm fairly sure four namespaces are enough: Textures, Flats, Sprites and Graphics. Entries in IMAGES.DDF need a prefix, like this: [tex:STARTAN3] [flat:FWATER1] [spr:TROOA3] [gfx:BOSSBACK] OK.... been reworking image system to have multiple namespaces, and it really has simplified the code (e.g. I noticed that IMSRC_Font was redundant), and miscellaneous bits (dummy images and sky-merge images) are now separated into their own tubs. Needed to move R_InitSprites() earler in the startcode array (before W_ImageCreateUser) to handle sprites in IMAGES.DDF. 2005/01/06: Images.DDF: faster method for whitening RGB font patches. 2005/01/05: Preliminary support for music in Linux (and MacOSX) via the Humidity library. 2005/01/04: Found out that SW1STONE texture of DOOM 1 is different than the one in DOOM 2 (former is narrow on a grey bricky texture, latter is wide on a browny texture). I used to think DOOM 2 textures were a pure superset of DOOM 1. The new Window/Fullscreen toggle in the set-res screen was finished, and works OK in Linux. Images.DDF: support for weapon sprites, updating code so that offset (0, 0) does the reasonable thing: puts the weapon dead center horizontally and bottom of weapon == bottom of screen. Should also fix Bug #1093590 (missing weapon frames). Added "CROSSHAIR" special for images.ddf, centers the image on the screen (before the offsets are applied). Discovered that completely new sprites (not in any WAD) are not working when defined in IMAGES.DDF. Hmmm.... Implemented "DISKICON" console variable and option. 2005/01/03: Worked on specifying colours directly (without lumps) in colmap.ddf. The command is GL_COLOUR=#AABBCC. Slope thoughts: there are two ways to do them: (1) additive, i.e. the sloped part is additional to the base geometry, or (2) subtractive: the sloped part is "cut away" from the base geometry of the level. My preference is for (1), since it makes more sense with extrafloors. With (2), you have the potential of the extrafloor vanishing to nothing (the slope on top intersecting with the bottom). Can't happen with (1). 2005/01/02: Not being able to skip finale text screens was another little thing driving me nuts. Fixed. Reworked the code, got rid of the damn "fall throughs" in the switch statement (which obscured what the code was really doing). Moved HU crosshair code to rgl_thing (near psprite drawers), and stopped it being drawn when weapon uses a custom one. Reinstated the flashing on/off effect when a powerup is about to run out (I found the fading wasn't a good indicator for the player, and for invulnerability it didn't look good). Preliminary code for changing Windowed/Fullscreen in the Set Resolution screen. 2005/01/01: Worked on colourmap conversion code. Reinstated saving the autorun status into the config file (it was driving me mad). Seems I commented this out four years ago (almost to the day). 2004/12/31: Fixed Bug #1093599, sprite horizontal misalignments. Fixed weapons using both PARTIAL and FRESH specials, and removed the "reload" of non-clip weapons (just wasted ammo). 2004/12/30: Fixed problem with Voodoo-doll levels where you spawned at the location of the voodoo doll instead of the right spot (the LAST player spot is the one to spawn at). 2004/12/26: Worked on making MacOS X binaries. Had a few headaches: current directory (when launched from the Finder) was not right (damn GUIs...). Had to modify Zlib so the namespace didn't clash with a system library, also had to modify Libpng (one symbol clashed with AppKit: _png_get_uint IIRC). Had to modify LibSDL since the CAGuard class used in the CDROM code clashed with the same class in OpenAL. Finally, couldn't get drag-and-drop to work for love nor money. 2004/12/23: Discovered that drag-and-drop did NOT work under Windows 98 (others ?), for some reason when you drag a file onto the gledge executable, it sets the current directory to be the windows directory (C:\WINDOWS). That's truly fucked !!! Luckily it looks like the same workaround I used on Linux: using the path from argv[0], should save the day here too. 2004/12/21: Fixed savegames which stopped working due to my recent ticcmd changes. Disabled "multiplayer game" from the options menu since it won't do anything useful for a while (after 1.29). Fully disabled new dlight code (ON and COMPAT are identical). 2004/12/20: OGG Vorbis: removed the HOGGIE_OGG define from the code. Fixed playback on big-endian cpus (like PPC). Spent way too much time trying to find out why playback sounded so bad, when it was just the version of OpenAL I was using - getting the latest from CVS fixed it. 2004/12/18: The new image system allows full RGB sprites, but this doesn't work natively with PALETTE_REMAP handling, so I've added some code which can remap RGB images. Fixed sprites so that the OFFSET_X and OFFSET_Y commands in images.ddf can use "zero" (the default) with reasonable behaviour: centered horizontally and sitting on the floor. Fixed -warp to check compatibility: when test is definitive we automatically change the mode (to EDGE or BOOM). 2004/12/16: Worked on Boom level detection. The new function will scan through all the maps and check if they use EDGE and/or BOOM line-types and sector-types. I've also implemented a dialog when the result doesn't match the current compatibility mode. 2004/12/15: MP-Server: got it working again (albeit by a hair's breadth). Fixed problems sending bot ticcmds to server and back. 2004/12/14: Added X_OFFSET and Y_OFFSET commands to images.ddf. Tidied up the swarm of warnings caused by changing the scale fields in image_t to float. Using floating point for screen coords does make sense (especially since the coordinates are in the 320x200 space, whereas the screen could be 1024x768). Made the "Detail Level" option in the menu control the max texture size sent to the GL (with some kludges for skies and title backgounds). Lower levels prevent texture thrashing (big slowdowns) when using the Doom2 Retex Proj. Added good detection of narrow vs wide skies (use the aspect, Luke !). Removed old hack-crap support for the Doom2 Retex Proj. R_InitSprites is now a lot slower (due to the possibility of sprites defined in IMAGES.DDF). Hence updated the startup progress bar with local sprite progress. Also made the glBSP progress fade out after a second, preventing the problem where it just flashes on/off for a small wad. 2004/12/13: Tackled bug #1066453 (scrolling sides of thick extrafloors). Horizontal scrolling should be fixed now (it _adds_ the real X offset to the dummy line X offset). Added SIDE_MIDY special which will add in the real Y offset too. Thick extrafloors using SIDE_UPPER/LOWER can only be scrolled by making the linedef they're on scroll (dummy line has no effect). Also fixed the "LEFT" and "RIGHT" keywords (they weren't working). Added SCALE, ASPECT commands to IMAGES.DDF. Added function to the epi::PNG code which reads the width/height/solidness from a PNG file (it only has to read the header, therefore should be much faster than doing a full load), and now the w_image code can get the correct user image sizes. IMAGES.DDF is now ONLINE !! Created a ddfimage lump for the flats and textures in the Doom II Retexturing Project. Some images are alteratives, so selected ones I liked (e.g. sky1_alternative). There were some flats which existed with/without the "flat-" prefix, these also looked like alteratives. I have also adjusted the scaling factors, while *4 is the most common factor some are *8, and a few are weird (PLANET1 is *7), and a few also have different aspects (EXITDOOR). 2004/12/12: Found the cause of facing the wrong angle when using -warp. LibSDL is sending us a bogus mouse event at startup, as if the mouse moved 512x384 (i.e. half the screen res). While this is really a bug in SDL, I'll add a workaround for it. Fixed problem with single player "lag" (new network code). Updated rgl_unit code to handle additive lighting. Also added preliminary code to do multi-texturing, and I must say that it looks very nice indeed, while still being close to the old method. Speed is a real concern though. Updated the network code to recent protocol changes, and it can connect to the server and start a game once more. Made the local UDP port number random (allows reconnecting to the server). We also ignore the loopback addr (127.0.0.1). 2004/12/11: Tidied up pseudo-skybox code, doing the re-use optimisation (i.e. top face same as bottom face in MIRROR mode) inside w_image.cpp, and added support for getting the faces from IMAGES.DDF (add "_N", "_E" etc to the base name). Merged most of the W_ImageFromXXX methods into a single port of call: W_ImageLookup(), which takes the type of image required and some flags (e.g. one to allow a NULL return, and another to require the exact type specified). The method for handling animations now ensures that only the same type of images get animated (all flats vs all textures). 2004/12/10: More work on dynamic lighting. Fixed GL renderer to support both lighting types (Linear and Quadratic) at the same time. Got the image generation and size/intensity calculations to be fairly correct. Removed MAXDLIGHTRADIUS, now selecting an appropriate value in R2_FindDLights(). For the Beta: made it show "Beta 1.29" in the top-right corner (encourage people to use the full version when it's released). Menus: made many vars/funcs static, and added prototype for multiplayer setup menu (also doubles as "Leave Game" menu). Tackled support for 24/32 bit rendering. 2004/12/08: Worked on new dynamic lighting. Created docs/tech/libraries.txt (keep track of dependencies). 2004/12/07: Networking: quick description of tic handling (client-side). There are three important variables: gametic : the tic (time unit) upto which the game simulation has run (note that it increases during PAUSE and menus). maketic : the tic upto which the local player has built ticcmds (result of processing input events). lowtic : the tic upto which we have got all the ticcmds from all players (local and over the network). This equation is invariant: gametic <= lowtic <= maketic The game simulation can run whenever gametic < lowtic. When gametic == lowtic, we must wait until lowtic increases (which means we get at least one more set of ticcmds from everyone). We cannot let maketic get too far ahead of gametic. For one reason: buffering requirements, the other reason is that the simulation and on-screen view is getting too out-of-date for the player to react properly. Server-side is more complicated, since it must deal with all players at the same time. My mental image is like Tetris: we require the bottom line to become full before we can send those ticcmds to all the players and move on. As in tetris, when two lines are filled at the same time, we could process them in one go. (This analogy is a bit too simple, since we must remember recent lines in case we need to retransmit them). 2004/12/05: Fixed savegames for new player handling. Removed spawnbot cheat. Split demo code from g_game into new file e_demo. Moved ticker calls from e_net.cpp into e_main.cpp. Handle PAUSE key in the responder chain rather than as a special button in ticcmd (i.e. disallow pausing in netgames). 2004/12/04: Networking: removed unused 'ticdup' var. Renamed the 'thinker' field (player_t) to 'builder' (as it builds ticcmds, and the term thinker implies playsim calculations). Removed the drone stuff. Started reworking players: remove linked list in favour of having "player_t *players[MAXPLAYERS]" (i.e. how it was before, which for me is the most understandable way). Made displayplayer and consoleplayer integers. Renamed playerstarts to coop_starts and used the spawnpointarray_c. Well, finished the rework but there are still some rough edges, in particular I haven't tested savegames or demos yet. 2004/12/03: Fix crash when playing in deathmatch mode (an earlier change of mine caused the player object to become the [11] DM object). 2004/12/02: Removed the last vestiges of fixed-point code, as well as the table-driven sine/cosine/tan stuff. 2004/11/26: Moved animation stuff from ddf_main.h to new file ddf_anim.h. Moved switch stuff as well, into new file ddf_swth.h. Moved colourmap stuff into new file ddf_colm.h. Added "USER" type for ANIMS.DDF, for animating the images defined in IMAGES.DDF. Split the input handling (G_BuildTicCmd) into a new file e_input.cpp. Removed the unused MOUSE_ACC stuff. Reworked mlook handling (mainly to get rid of the fixed point calcs), made it work like horizontal turning. I changed the ticcmd_t format, hence old demos won't work anymore. Made the mlooking with keys be slow at first (like turning). Removed the now unneeded EBT_MLOOK constant. An age-old problem with looking up/down with the mouse in zoom mode (would only move in big jumps) has been cured by these changes. 2004/11/25: Support for a [SOUND_VOLUME] style. Removed unused global 'inhelpscreens'. Removed halo conversion stuff (w_image). Added SMOOTH special to IMAGES.DDF. Figured out why the current image system (w_image) is too inflexible: it's the way caching is tied to having one big image list. So I think separating the caching logic from the image loading and lookup logic is the way to go. Tidied up some (awful) code in wi_stuff.cpp, and updated it to use proper styles: [STATS] for single player and [NET_STATS] for coop and deathmatch. 2004/11/24: Updated background fillers (e.g. behind the menus) to use styles. Removed the "darken_screen" option, which was only changeable via the config file. RTS: allow lines to be extended by placing a '\' character at the end. It must be at the very end, any whitespace after it won't work. Also reworked RTS menus: (a) to tidy up and (b) to support multi-line titles. Split action definitions from rad_trig.h into new file rad_act.h. Implemented a new RTS command: MENU_STYLE style_name which sets the style for the SHOW_MENU command. The default style is [RTS_MENU]. The setting is local (specific to the script which uses it). 2004/11/23: Wrote font_c and style_c classes (and containers for them). Investigated the variables "message_nottobefuckedwith" and "message_dontfuckwithme". The former is used to prevent the current message from being overwritten by a new one (only used for chat strings). The latter seems to be there to force the _next_ message to be safe from overwriting, but in reality does very little in the current code. ----> Reworked. Simplified some HU stuff (removed the 'on' pointers and the laston, needsupdate fields). Did same for status bar. Started updating all text-writing code to use styles. At first I'm not worried about getting everything right, but to just get everything compiling/working again, and make it correct later. 2004/11/22: Removed the USE_GL define, once and for all. Worked on using the fonts defined in FONTS.DDF. Once issue that popped up: the DDF parsing code should contain no engine-specific code, yet having an API in fontdef_c for handling stuff like StringWidth() seems very natural. Hmmm... I guess it needs to be split (new font_c class contains the run-time API and cache). 2004/11/21: Weapons: re-added crosshair support. The following actions have been implemented: SETCROSS(FRAME) : crosshair jumps to the given frame TARGET_JUMP(FRAME) : crosshair jumps IF player has a target FRIEND_JUMP(FRAME) : crosshair jumps IF player target is a friend Friendly monsters: made monsters on different sides attack each other (revert to the logic used in EDGE 1.27). UNTESTED. Prototype png support for images.ddf. 2004/11/20: Removed the "CONSTANT" dlight type, which was not very useful, and I only want to deal with two different types in the code (Linear and Quadratic). Images.ddf: wrote parsing for IMAGE_DATA command. Found out why the dlights/shadows were producing some horizontal and vertical bands: the edges of the image were not totally clear, and also mipmapping needs to be disabled on them (otherwise the reduced images will get edges which are not totally clear). Styles.ddf: added "HELP" group (others are TEXT, TITLE and ALT). Worked on new dynamic lighting. Made dynamic lighting option have three values: OFF, ON and COMPAT. Got the new dynamic lighting working on walls. 2004/11/18: Added four new ammo types: DAGGERS, ARROWS, TORPEDOES, CRYSTALS (names influenced by Heretic/Hexen/HacX). That brings the total to twelve, which as far as I'm concerned is enough. Increased limit on holdable weapons from 32 to 64. Tested that these changes didn't break savegames -- OK. Images.ddf: added generators to w_image code for the BUILTIN types (needed for the new dynamic lights and shadows). I'm going to make the new dlights optional (i.e. off/on/compat), and remove the old ones in the release after 1.29. That way mod makers get a chance to try the new ones and update their mods if they want. 2004/11/17: Added gameplay option to prevent automatic weapon switching when getting a new weapon or fresh ammo -- unless the current weapon you are holding is unable to fire/reload. Worked a bit on images.ddf. 2004/11/16: Fix for Bug #1065988, where damage greater than 1000 could hurt even invulnerable/god-mode players. I'm pretty sure the check (which exists in the original Doom source) was there to allow telefragging, hence I've added a new function P_TelefragMobj() which by-passes the DamageMobj() step and uses KillMobj(). Began working on a _minimal_ IMAGES.DDF. It will only support solid colours and a few built-in types, in particular a lighting image which will be required for the new dynamic lighting method. 2004/11/15: Weapons: added DISCARD and SECDISCARD states. They are similar to the PARTIAL special: if you press the reload key with a half-empty clip (i.e. neither empty nor full), then the clip is discarded and the DISCARD states are entered. These states must end with the CHECKRELOAD action to cause the weapon to be reloaded. Implemented weapon IDLE states, with new commands IDLE_WAIT and IDLE_CHANCE to control how long to wait. After the full idle wait time has elapsed, the chance is re-checked every (idle_wait / 10) seconds. For example, "IDLE_WAIT=20" means the random test is tried at 20 seconds, 22 seconds, 24 seconds, and so forth, until the test succeeds. When IDLE_CHANCE is 100%, it happens first go. The IDLE states are only entered from READY and EMPTY states. Added RELOAD states to THINGS.DDF, where the RELOAD_SHOTS command gives the number of shots, and the RELOAD_CHECK action must be used to check if the monster needs to reload. Also, if the player thing has reload states, it is entered when his weapon reloads. Disabled the "ddf property" rubbish (which I added ages ago) when #version is < 1.28. May it die for good one day. 2004/11/14: Worked on parsing code for Styles.ddf. Found a design issue with styles: on the one hand, being able to redefine every screen to something different is necessary, on the other hand, being able to share all the common features in a single DDF entry would be good (save a lot of duplicated DDF). Templates would be ideal here, but it doesn't make sense to implement them before Andrew Baker's DDF parsing rewrite. After making a comprehensive list of required styles, a pretty good solution to the above became apparent. There are two areas where sharing is most useful: the option screens, and menu screens (such as load/save, episode choice, RTS menus). There will be two generic styles for these: [OPTIONS] and [MENU]. The specific styles (such as LOAD_MENU) will be omitted from our standard DDF, and when the code doesn't find it, the generic style is used instead. 2004/11/13: There were some places where a weapon was referred to by an integer instead of a pointer (upgraded_weap, benefit.subtype, cond.subtype). Replaced these with a pointer to the weapondef_c, consistent with how other stuff in DDF is referenced. I think ONCONDITION is finally fixed now. Added weapon special "ANIMATED" which allows the UP and DOWN states to be animations (instead of moving the sprite up/down). This requires the last frame to use the RAISE/LOWER actions (no others). Implemented weapon WARMUP and SECWARMUP states. Improved the way upgrading / removing an in-use weapon works (made it lower as normal). Added proper check for upgrades of upgrades. Worked on parsing code for Fonts.ddf. 2004/11/12: Weapons: decided that CLIPSIZE=1 could make sense, hence the default value specifying a non-clip weapon is now ZERO. Made sure that when you get both a clip weapon and some ammo in a pickup item, that the ammo will fill the clip if possible. Reworked the code for switching to a new weapon when you pickup a new weapon or fresh ammo, and decided that the NO_SWITCH special should prevent switches based on new ammo, but not affect switches when getting a new weapon (I think the latter would be better as a gameplay option). 2004/11/11: Added reload key for weapons, with a NO_MANUAL weapon special which disables it for a weapon, and a PARTIAL special which allows it to partially fill a clip. 2004/11/10: Weapons: decided that instead of having sa_XXX fields for second attack information, combining them with the first attack into a two-element array (e.g. ammo[2]) will simplify the code. Worked on merging the weapon actions, e.g. A_ReFire and A_ReFireSA are just stubs which call DoReFire(mobj, atk_num). Added SEC_SPECIAL command to weapons.ddf. These specials apply to the second attack. Implemented the NO_TRIGGER and FRESH weapon specials, the former prevents reloading clip weapons by pressing fire, the latter allows weapons to reload automatically when fresh ammo is picked up. Fixed a subtle bug with weapons and #CLEARALL. 2004/11/09: More weapon stuff. Noticed some mods using AMMOPERSHOT = 0, and made the parser check for this and set the ammo type to NO_AMMO. Also noticed that NO_AMMO and CLIPSIZE should work together: it simply means that the clip can _always_ be refilled. 2004/11/05: Started reworking weapons and clips, with these ideas in mind: (a) if clip_size == 0, weapon feeds directly out of the "ammo bucket", otherwise weapon holds some ammo in it (clip_size), even when not in use. For ammo in the HUD: total ammo + ammo in current clip. (b) the clip is filled when entering the reload states. When there are no reload states, clip gets filled automatically. (c) Reload states are entered: by CHECKRELOAD action, when pickup up new ammo which can fill an empty clip, and by manual reload key. (d) Picking up a new weapon (especially when it comes with ammo as a BENEFIT) should NOT enter reload states. EDGE should not switch to the new weapon if there is no ammo for it. Second attacks are causing some headaches... 2004/11/04: W_Image code: added a semi-permanent "shrink buffer", use for the intermediate shrunk-down images sent to the GL (mainly mipmaps). This saves the overhead of a new/delete pair for every image. Boom compat: bit 8 of the thing options (from the WAD) should be zero, otherwise indicates that other (new) flags may contain junk. Hence renabled support for the FRIEND flag. 2004/11/03: Debugged the new line-to-line teleporting code. 2004/11/01: Boom line/sector types: improved the way these are handled, moving the actual containers into ddf_boom.cpp and adding an API for checking if a number is a Boom type, and for clearing the cache. The containers are now static in ddf_boom.cpp. 2004/10/31: Created better algorithm for converting a colourmap into a single RGB colour (V_GetColourRGB). Made the invulnerability and night vision effect use the correct colourmaps (ALLWHITE, ALLGREEN). Noticed the sky wasn't affected by night vision -- fixed. Made code mark the sectors defined externally or in EDGE.DDF as Boom conflicting when the number is a Boom generalised type. Found a problem with DROPITEM() action: it takes a thing name in brackets, but since it can be used in attacks.ddf (which is parsed before things.ddf) the thing may not be loaded yet. Therefore it needs to remember the name and look it up later, which I've done using a new mobj_strref_c class. Found a nasty gotcha with strent_c: I added a constructor taking a C string, making it use Set(). Set() calls Clear(), which tries to delete[] the data pointer if already set. Problem is, the data pointer has never initialised, could be random rubbish --> CRASH. Sometimes C++ is a real joy. 2004/10/30: Made a "SPOOKY" wipe method. Removed FIRST_SILENT_TO_WEAPON and SECOND_XXX flags, instead allow a SILENT_TO_MONSTERS flag in the attack -- a little more elegant and easier to explain. Note: won't work with attack names given in brackets in the states, like ATTACK(FOO), since the noise alert happens when the weapon is fired, not when the attack is launched. 2004/10/28: Reworked the WHEN_APPEAR parsing to allow more readable values, in particular: (a) support a skill range, e.g. "3-5", (b) can have just skill values, "2:4" same as "2:4:sp:coop:dm", (c) can have just net modes, e.g. "dm" implies "1-5:dm", (d) prefix with '!' for negation: "!dm" means "1-5:sp:coop". Using '{ }' comments in DDF and ';' comments in RTS deprecated, since these characters could be useful in other contexts (curly brackets especially useful for scoping). We show a warning when #version >= 1.29, maybe becoming an error later (#ver >= 1.30). When reading DDF/RTS in external mode (-ddf option specified), prevented the error message if the file doesn't exist, instead we simply use the one in EDGE.WAD. This allows us to create new ddf files without worrying about breaking old external-based mods. 2004/10/27: The EPI file_c Read/Write functions were returning different values in Win32 and Linux (0 was success in Win32, but failure in Linux). Standardised that by replacing return value with 'bool'. Worked on EPI WAD class, and reading code is now in place. Removed unused functions W_RawLumpInfo and W_AddDynamicGWA in wad code, and made W_ReadLump internal. Implemented anims.ddf SEQUENCE command. Tried converting some of the elements in st_stuff.cpp into HUD.DDF definitions. The result was something a bit different to other ddf files, with lines of the form "Variable_Spec = Display_Spec". It shows promise... Another idea was STYLES.DDF, which works like CSS (Cascading Style Sheets, for HTML). For example the style [GAMEPLAY_MENU] would set the text font & colour, background image (or colour), even the sounds, but what it DOESN'T do is specify the menu itself. 2004/10/23: Finished epi::angle_c class, with built-in test suite. 2004/10/21: The reworking of teleport code (with support for line-to-line mode) is finished. That's the easy part. Now the hard part: testing that all the combinations of teleport specials work properly... 2004/10/20: Began work on new EPI angle grinder, err... class. Improved the "DOORS" wipe (split vertical quads into 5 pieces). 2004/10/19: Replaced old m_swap endianness handling (SHORT and LONG macros) with the new EPI versions EPI_LE_S16, EPI_LE_U32, and so forth. Wrote EPI assertion code (epiassert.cpp/h). Found out why Andrew Baker had problems throwing an error_c in the linux filesystem module: for some God-knows reason, having a copy constructor _without_ a "const" parameter causes GCC to complain. Put a const in (or take the constructor out), and it works. Weird. BTW I also learned that throw() after a method actually means it does _NOT_ throw any exceptions. I assumed the opposite, tsck tsck. Integrated two classes from my old ZCPPLIB code into the EPI: colour_c is for normal RGBA colours, and hsv_col_c is for Hue/Saturation/Value colours. The filenames begin with "math_", and I'm planning on adding more mathematical classes into the EPI (angles, vectors, etc). 2004/10/18: Wrote epi::bytearray_c class which is a simple growable array of bytes, needed in some places to read files or build them in-memory for writing later. 2004/10/16: Been thinking long and hard about the Boom compatilibity problem (in that some of our sector types conflict with the Boom generalised ones). For a deeper understanding, I created a table showing the conflicting types side-by-side, which proved to me that getting it wrong can mean maps becoming unplayable (e.g. swimmable water --> damaging air). So now I'm sure that we need to support both. The best we can do is try to determine the "mode" of a level (also the WAD it comes from), and when this differs from the current compatibility mode, pop up a dialog box and ask the user (with an appropriate default choice). Task #98107 on SourceForge has more details. I've also been thinking about the new WAD II system, and just can't get past the fact that creating our own pack/unpack utility is going to be a lot of work, especially one that has a GUI interface, since a command-line tool will put a lot of people off. Last night I looked for an open-source GUI archive utility we could base it on, but found nothing that worked on Windows. Hmmm... Back to code monkeying: added a Cmp() method to epi::timestamp_c, and simplified the comparison operators using it, and replaced use of the old i_time_t typedef with the new EPI one. Started making an EPI class for handling WAD archives, (a) it would be very useful to use in other programs (e.g. I'd like to convert GLBSP and DEH_EDGE to the EPI), and (b) it'll be a good experiment for a WAD II API. 2004/10/15: Made GLBSP and DEH_EDGE interface code print any failure error message into the EDGE.LOG file. 2004/10/13: Made WAD code recognise colourmap lists (C_START .. C_END). 2004/10/08: Tidied up startcode[] array, removing the message field (do it in the initialisation functions instead), and making their return type void instead of bool (since nothing ever returned false). Also fixed the mucked-up newlines. The GLBSP interface code (l_glbsp) now creates a good message line for the progress screen (but it isn't shown yet). Started work on Boom's line-to-line teleport types. New keywords for TELEPORT_SPECIAL: "LINE", "REVERSING" and "SILENT". 2004/10/07: Worked on Boom linetypes 211 and 212: instant platform TOGGLE. 2004/10/05: Made GWA building occur during W_InitMultipleFiles() for any wad that has levels but lacks GL nodes (either internally or in a companion gwa file). It also uses the new progress display. Much nicer I think. Finished adding native DeHackEd/BEX support to EDGE. It handles both DEH patch files (with or without the -deh option) and DEHACKED lumps. The HWA file is only created if it doesn't exist or the time stamps indicate the source has been modified more recently. Damn it ! Boom handling of DEH files is lax, and doesn't require the proper header line ("Patch file for DeHackEd v#.##"). Will need to modify DEH_EDGE to handle these non-standard files. Disabled the Linux music server code, which has been obsolete for a long time now. It will be replaced soon by Humidity. Optimised the W_CheckNumForTexPatch() function, by keeping track of what kind of data each lump is (pretty rough, we only need to know about patches, sprites and flats), and using that value when sorting the lumpmap[] array. Startup time is *much* faster now. 2004/10/04: Added an extra startup progress display for GLBSP building nodes. Added code to w_wad.cpp to detect level markers ("MAP03" etc), based on the lumps that follow (e.g. "THINGS" is always first). This will be used to detect wads that have missing GL nodes. 2004/10/03: Reworked w_wad code to replace some of the zone stuff (Z_Resize) with EPI equivalent. Did the same for sprite stuff in r_thing code. Done the w_texture code too. Was going to replace the remaining Z_Resize stuff in w_wad.cpp, but like Andy Baker has noted, there's not much point when the new WAD II system means that big chunks are going to be rewritten. 2004/09/29: Added temporary kludge to make Berserk powerup last a level. 2004/09/28: Began work on allowing "loose" filenames, i.e. being able to specify wads without requiring the -file parameter. Allows drag-n-drop. Added support for -deh option (no conversion yet) and integrated the handling of -script to match -file, causing the scripts to be parsed during W_ReadDDF (i.e. at same time as RSCRIPT lumps). 2004/09/27: Made spawned monster (via an attack) keep ambush status of parent, as requested in RFE #1033899. Added FIRST_SILENT_TO_MONSTERS and SECOND_SILENT_TO_MONSTERS weapon specials, i.e. splitting the SILENT_TO_MONSTERS flag (still there) into two separate ones for finer control. Closes RFE #1005856. Added an EXPLODE_RADIUS command (Things and Attacks) which says that an explosion will have the specified size. [Normally an explosion has the same size as the damage amount]. Closes RFE #915715. 2004/09/23: DEH_EDGE: finished plug-in stuff, tidied up, and released V1.2. 2004/09/22: DEH_EDGE: tested whether using the plug-in multiple times produced the correct results (i.e. no interference from previous runs). It failed, and tracking down the problem took quite a while. Started work on fully supporting the plug-in error API. 2004/09/20: Bug #1026649: Fix for texture mis-alignment when texture height is not a power of two and sidedef's Y offset is negative. Hopefully doesn't adversely affect anybody's Edge-specific add-on. Tidied up and checked in the specifications of the WAD-II system. 2004/09/19: Allow "KEY_" prefix in DDF for green card and skull keys. 2004/09/12: Removed the rgb_32k array (previously used for making translucency tables for the S/W renderer). This should speed up start times too, since computing this table was an expensive operation. DEH_EDGE: more work on the plugin, made it compute the percentage completion for the progress bar. Got a prototype working of EDGE converting a DEH lump from a wad file, then loading the new DDF. 2004/09/11: Implemented things.ddf "DIE" action (for Boom/MBF compatibility). DEH_EDGE: Worked on making the code embeddable into another program (in particular: EDGE). Began work on EDGE side (l_deh.cpp), and got a simple prototype working (with hardcoded filenames). 2004/09/04: Made death watching smoother. For the sky box generation, made the sampling use bi-linear filtering, which further improves (if only slightly) the way the sky looks. Added another sky stretch mode "MIRROR", which mirrors the sky (vertically) at the horizon. Fixed the horizontal sky alighment. Backwards compatibility: when version < 1.29 and the BERSERK powerup is used, automatically add the switch-weapon PICKUP_EFFECT. 2004/09/03: Removed glEnable(GL_TEXTURE_2D) from w_image, which AFAICT from the OpenGL specs is not necessary when uploading textures to the GL. Modified epi::basicimage_c class to support palettised images (one byte per pixel). The palette is not stored in basicimage_c, since this format will only be used internally by w_image code. Made sky generation (and pre-caching) occur at level load, to prevent the delay from happening in-game. Began more reworking of the guts of w_image, this time to removing IMG_Block in favour of using the epi::basicimage_c class. Righteo, most of that is done, and I also added support for converting the Doom Retexturing Project skies, but they came out up-side-down. 2004/09/02: Replaced CRC32_* functions (m_crc32) with the epi::crc32_c class. Removed I_SetPalette and I_Colour2Pixel from the system interface (not needed anymore). Also removed I_GetTruecolInfo and the colour shift calcs (SDL/i_video). Merged PIT_RadiusAttack and PIT_SphereAttack (p_map) into a single routine (the code only differed by the distance calc). Implemented the SIDE_IMMUNE flag for DDF: when set, that creature will be completely immune from "friendly fire" (bullets, missiles and explosions from someone on the same side). Also made the aiming code ignore things on the same side (unless it uses FORCE_AIM, which fixes a problem with the chain-saw). Also added an ULTRA_LOYAL special, which prevents monsters from retaliating if hurt by friendly fire. 2004/09/01: Added "Sky Stretch" option to video menu for the new sky conversion. Pulled out the "Post" image type (w_image) which was only required by the now absent column drawing functions. Also simplified the w_image API, e.g. you don't need to specify the mode anymore to W_ImageCache (all of the code uses only IMG_OGL now). I'm planning to rework the guts of w_image.cpp, use a class for "Block" images (palettised, one byte per pixel) and the epibasicimage_c class for RGBA images. This will simplify things even further. 2004/08/31: Improved the sky box conversion algorithm, generating six real sides. Applying a power function to the vertical dimension seems to produce better results for most skies (power value 0.7), though this should be controllable with a option in the video menu. 2004/08/30: Made filenames with embedded spaces usable in response files, they need to be surrounded with double quotes, like "C:\doom stuff\foo.wad". The DDF parser now disallows angles > 360. Started reworking GL sky box to (a) handle both pseudo- and real sky boxes, (b) look better, (c) work with the Doom Retexturing Project. 2004/08/29: Missing files (given with -file) will now produce an I_Error instead of simply printing a warning, since IMO a missing file is too significant to ignore (I've been bitten by this before, wondering why something was not working, only to find out the filename was wrong). Added sky-flooding emulation to the GL renderer. Removed the old (dead) bits of code implementing alternative sky drawing methods. Implemented Linux CD handling (SDL/i_cd.cpp). It probably works, my laptop (an iBook) requires special handling for the CD drive (you need to transfer the audio to the sound card yourself) which I haven't implemented (and don't intend to), but the CD spins up properly and there are no errors returned from SDL. What is lacking though is volume control. 2004/08/28: Fixed NO_AUTO_SWITCH weapon from switching when you have no ammo and pickup some new ammo. Whether it should go into reload states (maybe depending on some other flag) remains to be forumed. Split thing handling code in rgl_bsp.cpp into new file rgl_thing.cpp, and header file rgl_thing.h. Moved weapon sprite handling there too. Implemented basic RTS menu system, with the following new commands: SHOW_MENU title option1 option2 ... SHOW_MENU_LDF title option1 option2 ... JUMP_ON MENU label1 label2 ... The RTS menu will pause the game until the user presses a valid number key. The RTS menu currently prevents savegames - maybe this makes sense, otherwise the menu info will need to be added to the savegame system. By the way, the MENU keyword in JUMP_ON is a variable name (the only one supported at the moment), in the future we'll have user variables too. Reworked the screen-size code, pressing '+' and '-' now toggles the HUD to use. [In future: the huds will be found in HUD.DDF]. The routine R_FillBackScreen() therefore was no longer needed. Rewrote RAD_CollectParameters() to treat everything between matching '(' and ')' as a single token (these will be expressions). 2004/08/26: Split GL occlusion code into new files: rgl_occ.cpp/h. Split parts of rgl_defs.h into rgl_wipe.h and rgl_sky.h and rgl_unit.h. Added new files for powerup effects: rgl_fx.cpp/h. More work on startup, moving a bunch of initialisation functions in e_main.cpp into the startcode[] array. Removed the assembler stuff (I_RegisterAssembler and I_PrepareAssembler) which are not needed anymore. Linux: remove mouse grab when I_Error() is called and DEVELOPERS is defined. Linux makefile now links with the FLTK GUI library, and the I_Error() routine uses it to produce a pop-up message dialog. Discovered a problem: in both GNOME and KDE desktops, running Edge by double-clicking it sets the current directory to the user's home directory (NOT the directory containing the executable). For the time being, using the argv[0] directory will be sufficient, though long term it probably should be configurable (e.g. find IWads during installation). 2004/08/25: Simplified startup logo. Added 'hyperflags' field for mobjs, since the other two were almost full. Added new item special FORCE_PICKUP. Fixed problem with the cmdline options -width and -height (etc), as SetGlobalVars needs to be called directly after M_LoadDefaults. Began work on new system for powerup effects (and other stuff). The DDF command is like this: PICKUP_EFFECT = XXX(1), YYY(blah); The following keywords are planned: SWITCH_WEAPON(name) POWERUP_name(slot#) SCREEN_EFFECT(slot#, time) The screen effects for powerups will be controllable. There will be a number of slots (e.g. 30). Initially the effect in each slot will be hard-coded, but later they will be specifiable with DDF. Higher numbered slots override lower numbered slots (unless the effects can co-exist). Powerup effects and SCREEN_EFFECT both produce the same result, the difference is that POWERUP_xxx() links the timing of the effect (e.g. green tint for the suit) with the powerup countdown, whereas SCREEN_EFFECT will run independently. The latter is needed to make BERSERK last the whole level (but not the red tint). Also planned is a SCREEN_EFFECT command for RTS. Backwards compatibility will be retained by some code that checks the #VERSION of the DDF, when < 1.29 it will add the equivalent effects (e.g. SWITCH_WEAPON(FIST) for the berserk). 2004/08/22: Improved the startup progress screen, added an EDGE logo, and removed the code snippets that printed dots. Added new DDF benefit: SWITCH_WEAPON(XXX). Updated our DDF so the BERSERK powerup uses this, and removed the hard-coding. Added new weapon special: NO_AUTO_SWITCH, which prevents a new weapon being selected when you run out of ammo. It has a problem though: picking up new ammo can cause a weapon switch... 2004/08/21: Send RTS tips to the console. It didn't work that well with scripts that repeat a message (e.g. QDoom), as the console got clogged, so repeated messages are not sent. Startup reorganisation: Moved M_LoadDefaults to run much earlier on (before DDF_MainInit). The external DDF reading now happens in a separate routine, and runs just after W_InitMultipleFiles (which loads the DDF lumps internal in EDGE.WAD). Other initialisation functions also got moved (V_ColourInit, W_InitImages, RGL_Init, etc). I've also split the reading of internal DDF lumps out from AddFile (from W_InitMultipleFiles), in order to have images available to draw some text and a progress bar while loading the DDF (which is the most time-consuming parts of EDGE's initialisation). Made the RTS parsing routine work the same as the DDF ones (i.e. if data pointer is NULL, load from external file). Merged the internal and external DDF/RTS loaders into one: W_ReadDDF(). Got an ultra basic progress bar working. 2004/07/29: Been working on removing the S/W renderer and simplifying the tangled web of code that surrounded it. 2004/07/22: Found the Scythe MAP10 problem (Bug #983214) where the BOSS_BRAIN was not being killed by barrels. It required that the DDF "BOSSMAN" special be split into two new specials: "EXPLODE_IMMUNE" and "ALWAYS_LOUD". (The explosion immunity was the problem). GL Renderer: changed FAR distance to be 200000 instead of 32000, in order to fix clipping problems (esp. the sky) on really huge levels. If any Z-buffer artifacts show up, then I will need to make the FAR distance dependent on the level size (so the artifacts won't show up on normal-size levels). The required value is 4.0 * max_dist (due to the sky). 2004/07/20: Started work on the Timidity back-end to Humidity (required to get good quality music support under Linux). I'm still in the process of refactoring the code, e.g. making it C++, and have only taken baby steps to make it a proper back-end. 2004/07/17: Got the Win32 support in the music library (Humidity) working. It's based on the code from EDGE (win32/i_mus.cpp). 2004/07/14: Added support for V3 GL-Nodes to EDGE. Deus Vult now works. 2004/07/13: Added preliminary JPEG load/save code into the EPI. GLBSP: worked on producing better messages when levels fail to build, and implemented the V3 GL-Nodes (writing the lumps). 2004/07/12: Fix for inconsistent teleporting (Bug #958402). Worked on Version 3 of GL-Nodes specification, allowing those insanely complex levels to be built. 2004/07/10: Added PNG loading code into the EPI. It's not complete, in particular it cannot save, but it's a start. Made a prototype of using the images from the Doom Retexturing Project. 2004/07/05: DEH_EDGE: implemented BEX support: the [CODEPTR], [STRINGS], [SOUNDS], [MUSIC] and [SPRITES] sections. Made the frame code able to handle A_RandomJump forks. Added support for some of the BOOM/MBF actions: A_Stop, A_Detonate, A_PlaySound, A_Turn, A_Face, and A_LineEffect. 2004/07/04: Made a prototype of new dynamic lighting using the multi-pass rendering code. 2004/07/03: Fixed crash loading a level with dynamic lights when the option for dynamic lighting has been disabled (hence blocklights was a NULL ptr). Worked on adding multi-pass rendering to rgl_unit, and used it to make a prototype for better shadows under things. 2004/06/24: Fixed texture system to look for patches _first_ in the patch directory, secondly sprites, _then_ any other lump. Bug #972899. 2004/06/23: Made image system check for bogus columnofs[] values. Updated w_wad code to remember the "patch list" (lumps in between P_START and P_END and their lax equivalents). 2004/06/05: Added 12 STEALTH monsters (types 4050 to 4061) into THINGS.DDF (for Boom compatibility). 2004/06/03: Fix for non-power-of-two-width textures in GL. 2004/05/31: Fix for crouch bug (unable to stand back up). 2004/05/29: DEH_EDGE: worked on supporting text strings from the old binary format (patch format 4). Implemented being able to load multiple patch files. Added option for the EDGE version, defaulting to 1.28. 2004/05/28: Made DecideMeleeAttack() not require an attack, for compatibility with original Doom. Also optimised the use of P_CheckSight() in the melee and missile deciding functions. DEH_EDGE: Determined the positions of known text strings within the text area of binary DEH patches for DOOM 1.666 and 1.7, and added some extra strings for BEX compat. 2004/05/24: * EDGE 1.28 was released * 2004/05/19: Fixed GL bug where sky was flashing white when changing gamma (etc). Happened because the W_ImageCache() can do a glDisable(GL_TEXTURE_2D). 2004/05/16: Oops, began changing the use of (int)floor(XXX) to be (int)(XXX) -- removing the floor() -- but of course this is wrong !! Floor() is different from truncation. Renamed FL_ROUND to I_ROUND (the result is integer) and added a new macro I_FLOOR. 2004/05/14: Changed the deltaviewheight handling in p_user.cpp back to be like the original Doom code -- testing on E1M1 verifies that it does indeed work better. Bug #949650. Shortened the jump delay in our DDF. 2004/05/13: Looked for issues with floating point truncation (the C/C++ standards specify that this happens when casting to int, something I never realised before). Introduced FL_ROUND() macro -- though better mechanisms will be coded after 1.28. 2004/05/06: Updated the README.1ST file with v1.28 information. 2004/04/30: Did some work on Linux EPI functions (directory handling). 2004/04/29: DEH_EDGE: new code to determine if a thing is a monster (add the "MONSTER" special which EDGE requires), based on statistical analysis of several major DEH patches (Batman, Mordeth, etc), as follows: SOLID: yes 98/99, no 89/180 --> factor 25 SHOOTABLE: yes 99/99, no 27/180 --> factor 72 FLOAT: yes 17/99, no 3/180 --> factor 2 painstate: yes 96/99, no 3/180 --> factor 91 deathstate: yes 99/99, no 27/180 --> factor 72 raisestate: yes 56/99, no 1/180 --> factor 31 misl/melee: yes 97/99, no 5/180 --> factor 91 A_Chase: yes 99/99, no 21/180 --> factor 78 A_Fall: yes 83/99, no 10/180 --> factor 61 speed > 0: yes 97/99, no 8/180 --> factor 87 Score range for monsters: 425 to 608 Score range for non-monsters: 0 to 315 (Score = the sum of factor values). (Automatically excluded: Pickup items, Missiles). 2004/04/27: Rewrote P_ActLookForTargets: fixing a bug (a friendly monster could become it's own supportobj), ignoring anything that isn't a monster or a player, and most significantly _never_ targeting a thing on the same side. 2004/04/22: Worked on flat-flooding emulation for GL mode. 2004/04/20: Worked on emulating the deep-water trick (in GL mode). glBSP required some changes too. 2004/04/14: Player spawning: rely on the spawnpoint.info field rather than use DDF_LookupPlayer(). Allows different levels to use different player entries. Later on, DDF_LookupPlayer could be removed. Made text drawn in resolutions less than 640x400 look better (1:1 scaling), and fixed the awful looking "Chunky Text" problem. 2004/04/12: Fix for NightVision in GL, which didn't light everything up. Fix for console which appeared behind the menus (but ate keys). 2004/04/01: GL initialisation: detect card and enable specific workarounds, for example: set the DUMBSKY mode for Voodoo3 cards. 2004/03/30: Implemented SKIP_ALL argument to RTS GOTOMAP command. It causes the intermission states and any pre/post finales to be skipped. (It's a bit hacked in due to time constraints). Fixed up handling of obsolete commands (etc) in DDF and RTS, in particular disallowing them when #VERSION 1.28 or higher is used. Removed 8-bits modes from table in SDL video code when using GL. 2004/03/15: Implemented DUMBSKY console variable (-dumbsky option) for GL. 2004/03/14: Fixed (properly) the scrolling-gets-fucked-up bug. Reworked S/W sky handling again, because it moved out-of-sync with the level. New warning system for DDF/RTS: when #VERSION is 1.28 or higher, default is to always produce a fatal error [Later on: maybe pop up a dialog box]. Mod makers can use the -lax option to ignore them (get all warnings at once). 2004/03/13: Flat-flooding in GL: the "Deep Water" effect finally makes sense to me. It doesn't require missing lowers (HOM) at all. In a nutshell: during rendering, the self-referencing linedefs are completely ignored, hence it's as if the outermost sector covers the whole area, and the floor is drawn accordingly. 2004/03/12: Worked on improving pseudo skybox in GL mode. Force smoothing on sky textures. Fix lines by using GL_CLAMP_TO_EDGE extension. 2004/03/11: Fixed I_PathIsDirectory() under Linux, properly this time. Worked on preventing sky repeating (vertically) in S/W mode. 2004/03/07: Fixed issue of player sprite not walking, also updated player DDF to use CHECKMOVING in all CHASE frames (as per original Doom), and removed #CHASE redirection at end of PAIN frames (looks stupid). Added #VERSION directive for DDF files, and updated the code for RTS scripts. Parsing only, it has no effect yet. 2004/03/06: Small tidy-up of status bar code: removed the never used 'refresh' parameters (st_lib), and global stbar_update variable (st_stuff). Also added fix for colourmaps changing one frame too late. Implemented CAST_TITLE command for things.ddf, used to select the message in LDF during the cast screen. Updated our THINGS.DDF. Added support into DEH_EDGE. 2004/03/05: Reorganised the docs/ directory. Fixed changelog numbering scheme. 2004/03/04: Implemented scaling for TIP_GRAPHIC: a fourth parameter can be given, a numeric value: 1.0 is normal, 0.5 is half size, etc... That is consistent with the sprite scaling commands in DDF. 2004/03/01: Fixed bug with X offsets for flipped sprites. 2004/02/20: Made sprite name "NULL" be hard-coded to an empty image. Reworked things/weapon sprite checking code to allow NULL sprites. Removed all MP3 code. Indented all remaining two-space code. 2004/02/15: RTS SPAWNTHING: when thing is unknown, show warning instead of error. 2004/02/14: OpenGL: implemented pseudo-sky-boxes (converted from sky image). 2004/02/10: Reworked armour pickups, so that good armour "upgrades" lower class armours (as per discussion on Forum). S/W Renderer: added fix for sprites and masked textures which contain posts > 128 pixels high (limitation of the column drawers). OpenGL Renderer: implemented the Pixelfade wipe. 2004/02/09: Fix for bug #889374, where add-on textures were causing EDGE to crash under windows. Turned out to be an erroneous Z_Free() in w_texture.cpp when detecting duplicate textures. Reworked handling for transparent doors yet again. Lots of places in Whell-of-Time Doom where showing HOM instead of being see-thru. 2004/02/07: Screenshots: only call M_ScreenShot() during E_Display, so we know that the screen is in a savable state. Also fixed RGL_ReadScreen() which needed to turn the image up-side-down. Closes bug #889474. 2004/02/04: Fixed crash when idcleving from extrafloor level to non-EF level. Added options -(no)lighting and -(no)colormaterial, and more importantly console variables "vertexarray", "lighting" and "colormaterial". These help track down issues with GL drivers. 2004/02/03: Added "AMBUSH" special for things.ddf. Uses the pre-existing MF_AMBUSH mobj flag, no new code added. 2004/02/01: Weapon code: reset flash psprite when bringing up a new weapon. Controls run-away flash states. The DEH->EDGE converter is more-or-less finished. Lots of bug fixing still needed though. To handle A_KeenDie actions, had to create a potentially-huge RSCRIPT lump (with ONDEATH XXX commands) for every monster using A_KeenDie -- horrible. 2004/01/29: Fixed potential crash when non-player thing has the PICKUP special. 2004/01/26: Fixed problem with GL's 1D occlusion buffer. Turns out that making the range a "little bit wider" in the test function is *not* a good idea. In other words: only test what you would set. Investigated previous idea of flat-flooding in GL. No good. The deep-water effect relies on self-referencing linedefs, which the original DOOM renderer ignores, hence causing large areas of HOM which then get flat-flooded. Fixed transparent doors in the software renderer. Changed (improved ?) the invulnerability fade-out in GL. 2004/01/25: Worked on fixing transparent doors in GL, again (TNT MAP02). Discovered major issue with GL's 1D occlusion buffer: it ain't working ! Even stuff behind one-sided walls is being drawn. 2004/01/24: DEH_EDGE: conversion to DDF for things, attacks, weapons, sounds, music, and language strings are now all in place and finished. Fixed sounds.ddf BUG when replacing old entries with new ones, they would get the wrong sounds (due to rearranging the sfxinfo_t list). 2004/01/21: Mlook: Tilt sprites in GL so they don't disappear when mlooking far up or down. Fixed it for sprites split by liquid extrafloors. Fixed an assertion/crash when handling a level where a subsector only contains 1 or 2 segs, which happens occasionally due to problems in the level. Typical example: near start on MAP22. 2004/01/19: Things.ddf: added missing METAL sound to cyberdemon's chase states. Fixed the pain sound for the BOSS_BRAIN (was missing MAKEPAINSOUND). IDEA: Flat-flooding in GL: when detected (missing upper/lower), create a rectangle plane which gets drawn (1) before everything and (2) does NOT affect the depth buffer. Hence the plane will only show up in the bits that cause HOM. Issues: (a) reusing the same plane for multiple linedefs, (b) computing the size of the plane, (c) may interact badly with sky code, (d) using an E.F may be better. 2004/01/18: Mlook: fixed 1D occlusion buffer to handle 360 degree range, and fixed GL rendering to draw stuff behind the viewplane when looking far up or down (in this case, we don't clip to the viewport angles). 2004/01/17: Mlook: working on full mlook range for GL. Renamed 'vertangle' field in ticcmd_t to 'vertslope' (never was an angle). Made the mobj_t vertangle field into angle_t (with fix for savegames), ditto for viewvertangle variable. Fixed object movement (especially missiles) to have proper 3-dimensional speeds. 2004/01/16: Been working on a DEH->EDGE conversion utility. 2004/01/13: Colmap.ddf: new special "WHITEN", which will only be used for fonts. Implied when colourmap begins with "TEXT_" (but can be overridden). RTS Tips: the first 9 slots where unchangeable. Revoked that. Levels.ddf: Added PRE.COLOURMAP and END.COLOURMAP, which allows changing the colour of the text in finale screens. Fonts: modified colourmap handling for fonts so that text & status bar numbers are not forced to be red, but remain their original colours, while still allowing other colours to be used. W_Image.cpp: fixed crash bug in GL mode when using palette-remapped images and it tries to flush them (e.g. changing gamma setting). Config: remember the current Save/Load page. 2004/01/11: Merged RAD_DoParseWhenAppear into DDF_MainGetWhenAppear. Tidied up some blockmap stuff (p_map etc), with new BLOCKMAP_GET_X() and BLOCKMAP_GET_Y() macros. 2004/01/10: Armour: changed status bar to show _total_ armour, and the font colour represents the best type of armour held. Added condition "ARMOUR(##)" (for RTS ON_CONDITION etc) which tests against the total armour. Discovered that FLT_MIN is actually the smallest _positive_ floating point value. The caused a bug when activating the lift in MAP06. Fixed an assertion (crash) bug in hu_lib.cpp when using another language and the message has accent (>= 128) characters. Also reworked and reformatted the code. ConfigFile: made EDGE save/restore the current language. 2004/01/09: Zooming: always use current weapon's zoom factor if set in DDF. 2003/12/19: Been working on music library this week. Fixed bug not saving sky image (changeable with RTS) in savegames, by adding new variable SKY_IMAGE into the [GLOB] variable list. 2003/12/05: Added a workaround for Radeon 7500 linux driver bug that fucks up with 1x1 mip textures (shows black). Fixed bug with new sky code not covering all of the screen. 2003/12/04: Implemented new sky drawing method which eliminates a great deal of the "sparkles" which the old draw-sky-behind-everything method had. Works like this: during initial BSP walk, draw the sky walls/polys such that they only affect the depth buffer. Hence after the walk, the depth buffer contains a map of where to draw the sky. Then, before anything else is drawn, draw the sky into that map (using the GL_GREATER depth function). Note that places that normally cause HOM will _not_ have any sky drawn in them. Removed the old, never fully implemented "TileSky" crud. 2003/12/02: Fixed the "MAP06 ceiling fails to open" bug. Added a basic overlay HUD. Niceties like icons and well-placed values can wait until later (HUD.DDF). Changed default console background to "CONSOLE", and made a basic blue-ish flat that will be put into EDGE.WAD. 2003/11/29: Added a check for strings and letters to DDF_GetNumericValue. Fixed some music entries in levels.ddf (they were strings, not nums). Added new games.ddf command SPECIAL_MUSIC, which is used by the cast screen and the bunny scroll. Updated games.ddf and playlist.ddf with the correct cast/bunny music. Started getting to grips with the OpenAL library. 2003/11/28: Made the check for unterminated strings non-fatal, since it occurs in QDoomTst 1.1 and thus likely to occur in other add-ons too. Added some extra checks (unclosed <> and [] and unfinished command at end of file). Fixed shot attacks to honor the attack's RANGE setting. Implemented new RESISTANCE_CLASS command for DDF. Used the same way as IMMUNITY_CLASS, but the monster gets 60% less damage. Found the source of those odd bug reports about "invincible enemies" and "barrel explosions pull others toward them". It only occurred when the true-3d-gameplay option was off. Fixed ! Looked for the "friendly monster gets angry from immune hit" bug, but couldn't spot it. (Need a friendly monster for testing). Punted till next release. 2003/11/22: Hit a weird issue when fiddling with 16-bit sound output in Linux. The type 'char' is UNSIGNED in GCC under Linux/PPC, but the code assumed it was signed, causing heavy distortion. Added 16 bit sound for Linux (and -sound16 option to force it). 2003/11/13: Reverted sky code to old method (draw it behind everything), getting rid of the wobbles, and can be a lot faster (no need to split polygons). Adjusted GL light table (255 now the max, now 240). 2003/11/10: Reimplemented vertex arrays in GL renderer. Option -novertexarray disables it. 2003/11/09: EDGE will now automatically create an 'edge.log' file containing all startup and other messages. Reworked m_misc and m_option code to remove assumption that sizeof(bool) equals sizeof(int). Also tidied up m_misc (removing the bits that stored char pointers in integers). The defaults[] array is now static too. Fixed crash bug when a door closed on a dead player. Renamed Defered to Deferred (e.g. G_DeferedInitNew). Fixed a bug: chat macros in the config file were always overwritten by the defaults from DDF. 2003/11/02: Worked on OPL emulation player in Humidity. Got the timing/buffering issues fixed. Noticed too that timidity plays MIDI files too slowly (D_RUNNIN total time was 4:43 but should be 3:48). 2003/11/01: Added 'f' to some floating point constants. Updated MacOS X support in the EPI code (macosx_epi.cpp). 2003/10/29: Worked on tidying up the mus_2_midi code. 2003/10/25: Worked on Native MacOS X support in Humidity. 2003/10/24: Worked on MIDI reading code for music library (named 'Humidity'). 2003/10/23: Implemented new RTS on_condition WALKING. Added on_condition support for checking amount of powerups e.g. POWERUP_PARTINVIS(10). 2003/10/22: Worked on new EPI code: epitype.h epimacro.h epiendian.h epicrc.cpp/h and epimd5.cpp/h, ported from ZCPPLIB and SDL. 2003/10/21: Added workaround for the "BPP 4 Invalid" error when running GLEDGE (Linux and MacOS X) without specifying bpp (option or edge.cfg). Worked on mus_2_midi code. Got TIMIDITY to compile and run. 2003/10/17: Added initial player capacities for pellets, nails, grenades & gas into our DDF. 2003/10/11: Fixed DOOM 1 warnings about missing textures and missing sprites. Fixed RTS JUMP command (was seriously broken). Fixed RTS problem when using WAIT before a LABEL. Changed Windows argument parsing (win32/i_main.cpp) to handle double quotes, to allow filenames with spaces in them. Tidied up some stuff marked !!! and FIXME, unmarking them if they are part of the software renderer and hence not important anymore. Centered the PAUSE image. Fixed PALETTE_REMAP for GL renderer. 2003/10/10: Worked on MacOS X makefiles. Tidied up other makefiles. Restored software renderer wipe code in e_main.cpp. Fixed 16-bit translucency in SW renderer on MacOS X. 2003/10/09: Renamed ga_worlddone to ga_loadnext, which is more accurate (ga_worlddone sounds like it finishes something, but it actually loads the next level). Removed G_DoWorldDone (also a misnomer BTW) in g_game.cpp, as the logic boiled down to "currentmap = nextmap; G_DoLoadLevel()". Fixed the bug where PRE.TEXT didn't work on first level (MAP01, E1M1). Fix for special effects (green tint for suit, red tint for berserk) so that they fade out after dying. Fix for bug where projectiles that hit you on the head coming down at a sharp angle would not cause any damage. Problem occurred because ZMovement doesn't test the same things that XYMovement does. 2003/10/08: Fix for MAX_FALL: doesn't apply when player is swimming or flying. Fix for too much bobbing (now same as PrBoom). Fix for berserk: if already showing fist, don't lower/raise it. Fix for loss of precision when scrolling walls/floor. Fix for floor textures in GL (wrong scale, no transparency). When a path follower hits an RTS node, the trigger is enabled. 2003/10/06: Worked on removing warnings about 'invalid conversions', such as with skill_t or weapon_selection_e, plus some float --> int warnings and 'signed with unsigned comparisons'. 2003/10/04: Added FLO_UNUSED for some special uses of M_PI (unset DDF fields). 2003/10/03: Changed DDF and savegame code to remove the FIELD_OFFSET computation (which doesn't work properly with Winbloze C++ compilers). New code stores pointers into a dummy struct instead of field offsets. 2003/10/01: Updated l_glbsp.c code to handle GLBSP 2.05. Tried compiling EDGE with G++. A few things didn't compile (e.g. using ++ on finalstage_e and z_urgency_e), the biggest problem in m_option.c (the forward decl of extkeyconfiginfo). Plus a billion warnings :). Otherwise it seems to run OK. 2003/09/27: Fixed the FACE() action. 2003/05/20: Added support for MacOS X. ---- Been away for a little while ---- 2001/11/23: Found a bug, the default key for the secondary attack was set incorrectly so that it didn't activate (should be 'e' not 'E'). 2001/11/12: * EDGE 1.27 was released * 2001/11/11: Worked on fixing THIN sliding doors in GLEDGE. OK, done. Added code so that closed sliding doors (a) block player sound, and (b) block monster sight. Allowed sliding doors to close over the top of corpses and pickup items. Fixed a crash bug with "S1" sliding doors (i.e. COUNT=1). Starting making Windows, Linux and DOS packages for release. 2001/11/09: Found Marc's problem playing some MP3 files. Occurred because those MP3s begin with some non-MP3 data (looks like ID3 tags) which requires calling a special XingMP3 routine (head_info3). 2001/11/08: Found a problem with weapons.ddf UPGRADES command. It kept an integer index into weaponinfo[], but the DDF pointer arrays are now kept in FIRST-COME order (see my entry for 2001/04/27), hence the pointers can move about thus making indices invalid. One difficulty here is that numeric weapon indices are needed for the benefit system, which has a integer `subtype' field. Also the condition system does the same thing. For that reason, I'll disable the normal practice of keeping the pointers in first-come order for weapons -- a careful check of other usage of weaponinfo[] finds no other potential problems, apart from possible issues with #CLEARALL and Savegames (fixed BTW) that was already there. A quick test (DOOM, QDOOM & GUNSPC) shows that weapons are now working properly and nothing else seems to have broken. 2001/11/04: Finished off the README.1ST file with a description of all the command line options. Changed default console background to FWATER1. 2001/11/03: Reworked sfx_t handling (mainly DDF_SfxLookupSound) in order to prevent memory fragmentation. Will it help ? No idea. Starting looking into platform specific sound handling. Seems Win32 had a massive bug where I_UnloadSfx() never freed any sounds since the handle check was opposite to what it should be. Hopefully this explains Transon's sound problems. This might have been found earlier if the code used DEV_ASSERT instead of a unused message buffer. Was pretty ruthless on win32/i_sound.c, converting many of the errordesc stuff into DEV_ASSERTs or I_Errors instead, mainly out-of-memory conditions or invalid parameter stuff. It's not that the errordesc thing is bad, just that IMHO programmer errors and out-of-memory should _not_ be silently ignored. Reworked the AddChannel/GetChannel stuff in win32/i_sound.c, putting a limit on number of active channels (128) and general tidying. This also fixed a silly bug in there: the channel ptr array was being allocated with size `numstoredsfx' instead of `numchannels'. Fixed bug in l_mp3.c (L_MP3SetMusicLump) which didn't free bs_buffer when something went wrong. Hopefully this is the cause of the `bs_buffer == NULL' assertions that Marc & Espi have gotten. Just to be sure, fiddled with win32/i_mp3.c, adding some missing L_MP3ClearMusicFile() calls and making it a tad more robust. Worked on the README.1ST file, and added more changelog files into the doc/ directory (for EDGE 1.19 through to 1.24). 2001/10/29: Reworked RTS timing code, to fix problem with tagged_use retriggerable triggers. Reworked P_AddWeapon() function, to (hopefully) fix problems with upgradations. 2001/10/26: Implemented new BOUNCE_UP command of bouncing objects. 2001/10/24: Added code to check for wrong level data from a savegame, e.g. loading a DOOM2 map when playing the TNT iwad. Currently it bombs out with a fatal error -- which is pretty poor, but anything else is really hard, since the new level has already by partially loaded. Fixed automap not displaying the level's name. 2001/10/23: Worked on implementing crosshairs for GLEDGE. Done. Moved the `Boom line/sec' option in the gameplay menu to the top line and renamed it `Compatibility'. The options are now `EDGE' and `BOOM', with the potential for other ones in the future. Made the compatibility mode (BOOM/EDGE) part of gameflags_t. This means it will be properly stored in / loaded from savegames, where before you could load a savegame into the wrong compat mode and thus causing weird shit to occur -- that can't happen now. 2001/10/22: Worked on pre-caching sprites on level load. Youch, on a large map like MAP29 this causes a really long delay before the level starts (using GLEDGE anyway). Oh well. Default is now disabled, use the "-fastsprites' cmdline option to enable. Fixed GLEDGE handling of FOV's greater than 90 degrees (though HOM is still possible in places since GLEDGE still doesn't render anything behind the viewplane). New option in gameplay menu: `Weapon Kick'. Can be used to disable the kick effect used in certain weapons (including weapons using the KICK() code pointer). Default is enabled. There is an associated levels.ddf special tag "WEAPON_KICK" (and "NO_WEAPON_KICK") which can override the user's preference. 2001/10/21: New feature: STATES(ZOOM) for weapons.ddf. When used, that sprite will be used as the zoom image, e.g. a viewfinder. New feature: NO_TRIGGER_LINES attack special. Shot and projectile attacks with this flag never activate special linedefs. New feature: UNBLOCK_LINES for radius triggers. All lines on the map with the same tag will be unblocked, allowing players and monsters to pass. Only affects two-sided lines. Worked on supporting (in a very limited way) multiple palettes. Limitations: (1) it only works in GLEDGE, (2) font characters in other palettes won't work properly. Tidied up some !!! / FIXME stuff. 2001/10/20: Stopped EDGE drawing weapon sprites when view is ZOOMED. Made angle turning and mlooking slower when view is ZOOMED. 2001/10/12: Removed the JUST_A_WIP crap. 2001/10/11: Fixed the sprite rotation selection code for 16-rot sprites. 2001/09/30: Removed the USE_SAVESYS define from the code and makefiles, it is now always enabled. Fixed the DOS makefile which didn't include the new savegame code (D'oh !). Removed the USE_LAYERS define and the unused prototypical code that went with it. Fiddled with Win32 MP3 code to prevent the "bs_buffer == NULL" assertion in L_mp3.c, but I still don't see how it can happen. 2001/09/26: * Released GLBSP 1.95 * 2001/09/24: Worked on fixing POLYOBJ handling in GLBSP. Worked on glbspX (the GUI version). OK, it's not 100% (mainly missing a page in the manual), but quite releasable now. 2001/09/09: Damn it, somehow I broke the MELT wipe in software mode, all the others still work. OK, fixed. Centered the word "finished" on the intermission screen. Implemented DLIGHT.HEIGHT command, taking a percentage value. Fixed a problem with RTS scripts that have a condition (e.g. ONHEIGHT) and use WAIT as the first command. 2001/09/08: Worked on wipes for GLEDGE. Well, it got a bit ugly, since it really didn't fit in well with the existing wipe framework. Okidoke, four different wipes are done: Melt (standard DOOM), Crossfade, the sliders (top/bottom/left/right) and Doors. Only the `Corners' type was left out. Also the texture mapping on the doors type is a bit crook -- subdividing into 2x2 quads should help. 2001/09/04: Fixed the sloppy tag linking in RAD_GroupTriggerTags(), which caused the QD10 elevator button to crash. Fixed the problem with continuous ceilings (crushers), which was most notable on DOOM 2's MAP04 (The Focus) and DOOM's E3M5. If there are more cases of non-workitude, then we'll have to supply the proper OTHER_REF and OTHER_OFFSET commands in our DDF to fix those. Added a "-lax" option, mainly useful for debugging. 2001/08/31: Fixed a crash bug with RTS tips, and an assertion crash with light-transfer linetypes. 2001/08/25: Fixed a typo in e_main.c. 2001/08/21: Fixed shrunk-down-view glitches (the quick & dirty way: always draw the outer stuff). 2001/08/19: Added new DLIGHT_RANDOM(low,high) action -- flickering dlights. 2001/08/17: * EDGE 1.26 was released * 2001/08/16: Fiddled some more with Win32 fullscreen GL, using WS_POPUP in CreateWindow in i_main.c *seems* to work, but it feels very much like a fragile hack. Made Windows, DOS and Linux binaries for the release. 2001/08/15: Reworked detail-level option, the old "high" and "insane" settings were useless in practice. Fiddled with the win32/i_opengl.c code, trying to get fullscreen mode operational. Well, partially successful, the set-resolution menu doesn't cause EDGE to bomb out anymore, but we've still got a window (titlebar + border), plus weird effects after the change. Added code to fix the weird effects (untested), but I can't find any way to turn off the titlebar/border. Worked on my LevelSkinner program for a while. 2001/08/09: Fixed a new crash bug with RTS tips. Simplified EF savegame code: the ef_info field is just a cached value from the control line -- no need to find it & save it. 2001/08/07: Savegame work: Extrafloors. Doing sector_t now. Done, on to the testing & fixing phase. Fixed a bug with texture offsets, and a bug with sector heights (D'oh). 2001/08/06: Savegame work: RTS tips. Now doing moving sectors. OK, tackling the item respawn list. Righteo, those three are done, leaving only sector/extrafloor stuff to do (and debugging the whole big damn mess, of course :->). 2001/08/05: Reworked some code (notable exception: automap) not to be hardcoded to the Doom palette. Worked on fixing the MAP30 boss-brain for savegames, saving the shoot spots. Oops: was going to use DUMMYMOBJs for each target, but that would break if the save occurred whilst a cube was in flight. Thus I'm going to assume that spit-spot objects never disappear (or new ones appear) -- which means we don't need any savegame code for them at all -- the spots will be found again at the next ShootToSpot. Discovered why Heretic levels show up purple: the COLORMAP lump in EDGE.WAD is overriding the one in the heretic iwad, and it just so happens that the best green gets mapped to a dark colour by it. 2001/08/04: Added support in w_image.c for raw 320x200 image blocks, as used in Heretic and Hexen. Added code to display a dummy sprite if the patches are missing. Added code p_setup.c to load Hexen levels, a "for the fun of it" thing (full Hexen support is way out of the question, besides other ports have got it well covered). 2001/08/03: Re-fixed shoot code for extrafloor. Doesn't work in all places yet, that's slated for the conversion to BSP traversal (Post Releasum). Re-fixed flooding liquids that sit above the real sector's ceiling: the properties were not transferred properly. Broke through the 300K barrier :). Someone call Guiness... Fixed move-wait-return floors to handle extrafloors better. Fixed (well, I think) the pseudo-shadows in GL. Fixed the bunny thing at the end of Doom 1 full version. 2001/08/02: Bit of sector movement work. GLEDGE feels really slow, prolly down to the inefficient PolyQuad code. Bah. Fixed two really stupid bugs in the new touch node code. Fixed a recent bug with texture alignment on one-sided walls. Glbsp: implemented support for arbitrary level names. They are automatically detected. 2001/08/01: Change of pace: worked on glBSPX for a bit. 2001/07/31: Working on the sector movement code... Renamed `floorOrCeiling' to just `is_ceiling' so I can understand the code. Created new sector movement and checking routines in p_map.c. Fixed up crouching and RTS's MOVE_SECTOR command for new code. OK, AttemptMovePlane() has been rewritten -- on to the test/debug cycle (pedal pedal :->). Fixed a long standing bug with texture switching, most noticeable on MAP01 where sometimes the end-switch was lit up, sometimes normal. 2001/07/30: Reworked GL renderer to use "polyquads". Checked out DLIGHT with the new splitters: looking much better now, so I've renabled it for the release, even though it doesn't work in software mode. Added new things.ddf command DLIGHT_FADE, for smooth dlight fading. Added new line in video menu "Detail Level" -- commented out the screen composition line temporarily (we need an "Advanced" option menu). Disabled the HALO test code for the release. 2001/07/29: Worked on polygon splitting code. OK, the vertical separating splitter is working -- the code is very "Ugh !" though. OK, the vertical non-separating splitter is in and seems to work. Okidoke, now the horizontal polygon splitting code is done. While the new polygon splitting code works, I'm not happy with it, since it needs to make a new (small) polygon for every split piece, which ends up a lot slower than using e.g. triangle strips convering the same size. Ah well, it'll do. 2001/07/28: More LOD work: new "polyquad" routines in rgl_unit.c that can split quads into arbitrarily small pieces. Got the QUAD part is working, haven't started the harder POLY part yet. 2001/07/27: Re-fixed sprite scaling in GL that broke recently. Tidied up the new LOD routines in r2_util.c. Added support for it in the new SKY code (walls only ATM) -- it's better, but on really long walls a single LOD value is too simplistic. Seems that 1024 or so is the "magic" length -- anything bigger should be first split into smaller chunks (< 1024 each), and then compute the LOD for each one. 2001/07/26: Fixed silly bug in new sight code. Extrafloors seem to be blocking sight correctly now. Fixed another silly bug not creating extrafloors properly. Removed the second "Reset To Original" line in the main option menu -- one set of defaults seems enough IMHO. Started writing some very basic LOD (Level of Detail) code. The basic idea is obvious: far away things get drawn with lower polygon counts than closer stuff. I need this for the sky in GL: splitting *ALL* sky polygons to 64 units is a huge slowdown, even with quad-strips, and we really need 32 units (or less) to prevent rippling. Added a few missing images in f_finale.c, e.g. BunnyScroll. Untested. Removed big chunks of v_video1/2.c -- all the V_DrawPatch* routines are no longer used. Reworked the menu code. 2001/07/24: Sight code work... Slow going, but I need to nail it down since the new sight code will serve as a basis for new shoot/aim code. Implemented new LINE_EFFECT called "LIGHT_WALL". It is analogous to sector versions: it transfers the lighting from the tagging ilne's front sector to all other lines with the same tag. Added lines.ddf command LINE_PARTS. Takes the same tags as SCROLL_PARTS. Used for fine-grain control of LINE_EFFECT tags. 2001/07/23: glbspX work... Noticed that our sight code is using P_ApproxSlope, and therefore is probably not as accurate as it should be. The original DOOM code looks better: it's using the distance from src->dest as the common (implied) denominator of the slopes, hence InterceptVector2 returning a fraction (0->1) value. Wow, now it all makes sense. Noticed two nice optimisations in the PrBOOM sight code: bbox checking for lines, and vertical bbox checking on the LOS itself. Also, figured out that minisegs _can_ be ignored after all. Only one thing bugging me now: when we reach the subsector containing the dest obj, we need to check that obj's (x,y) point against the sector gaps. I can see why mucho effort has gone into optimising the sight code in DOOM and BOOM: it can slow things down a *LOT* when sub-optimal. Aha ! Since we are doing multiple passes over the same LOS, we don't need to check all possible lines again -- the first pass can generate an intercept list, saving lots of time for the other passes. Sweet. 2001/07/22: Fixed SECTOR_EFFECT command for recent changes. Untested. Worked on fixing sight code. Tail-recursivified the CheckSightBSP routine. Hmmm, the sight_gap stuff turned out to be useless, what we really need is sight gaps in the *sector* not the linedef. Makes me wonder if the normal gaps in line_t are really needed. Rewrote P_PlayerInSpecialSector() for new extrafloor code. Reinstated RTS_DISABLE_TAGGED thing action, and added it as a weapon action too. 2001/07/21: Re-enabled dlight code, just to see what it was like. Played with some halo code... Improved the GL sky, it still ripples, but is a lot less noticeable now. Mlooking far upwards still looks bad. We need a "quality" slider in the video menu, since the ripples can be reduced more but at the cost of lower FPS (since more polygons are needed). 2001/07/20: Added JUMP_DELAY new DDF command for players. Untested. 'Nuff said. More issues with sector movement: handling things is not trivial. Firstly we need to handle cases where things are sitting on or floating above other things. How this should work is obvious enough, you'd expect things to get pushed together and push other things, but how to code this in a nice reliable way (especially now we're going with a check-first move-later approach) is far from obvious. Secondly, there is the added complication of crushing sectors. For example, the player is standing on a demon in a crusher somewhere. We'd want both objects to get crushed, and their "effective" heights to be lower than the real heights by the appropriate amount. Our current code has nothing like an "effective" height though. Perhaps the check-first move-later approach is not the best way. It bugs me that it'll prolly require a "dry run" of trying to push all the things, which then gets repeated for the real move. What bugs me about the move-oops-undo approach is handling control sectors for extrafloors -- we need to remember what extrafloors were moved in case one of them fails, and then undo them all. Hmmm.... I'll stick with the "move-oops-undo" approach, at least where Things are concerned, as that'll mean the least change to the current code. Did a little work on bots, got them working again. 2001/07/19: Did some work on glbspX. 2001/07/18: FUCK. Still climbin' that BSP learning curve. The new object placement routine is not reliable, because when the bounding box intersects a partition line, we don't actually split it, and therefore a future partition line check can produce the wrong result, because we're checking an area that is too big. I didn't have to go far to find this problem -- it happens right near the start of MAP01 ! 2001/07/17: Began rework of sector movement code. Elevators are tricky... OK, I think they'll work like this: (a) check "non-safe" end (see notes below about "safe" ends). If move not possible, stop before moving anything. (b) move one end, then the other. Pass a flag for "safeness", meaning we don't need to worry about objects for that end. For normal sector elevators, move safe end first. For 3D platforms, safe end moved last. This logic relies heavily on the "safe end" concept. Hmmmm, yes the logic is OK. Added new `above_mo' and `below_mo' fields in mobj_t replacing the ride_em stuff. Added P_ChangeThingPosition() routine as the preferred method for atomicly moving a thing in the world. Started work on a "touch node" system for remembering what things are in or touch what sectors (blatant copy of the BOOM msecnode_t idea). 2001/07/16: Worked on fully implementing line gaps. There is now no limit to the number of extrafloors per sector (apart from memory :). Re-fixed keys in the status bar -- they were dependent on the order in ddf_main.h. Fixed crash bug with RTS CHANGE_TEX command and new code. 2001/07/15: Fixed up pegging/offsets for extrafloor sides. Fixed sky problems in software renderer. Fixed (I think) BOOM SKCK+ALL locked doors. Fixed a bug with autoaiming not aiming at monsters lower than you. Fixed a automap crash bug with new extrafloor code. Fixed THICK translucent extrafloors in new code. Played with rippling water surfaces in GL. Looks very cool. Changed HOM-detection option to just "-hom". Added `IDHOM' cheat. Partial fix for transparent doors. Also new code allows vertically scrolling mid-masked textures. 2001/07/13: More extrafloor work. I'm introducing "wall tiles", pre-computing the sides of walls that need to be drawn. This should speed up rendering, since currently we compute the tiles every time we visit that subsector. OTOH it will slow down sector movement some more. Well, after mucho work, got something going again (software mode). Damn -- rendering didn't get any faster. I think the BSP traversal part is probably close to optimal. I suspect what may be letting us down is not having the hand-optimised assembler col/span drawers. 2001/07/12: More work on extrafloors. MUCH to fix ! Ahh, made a mistake ages ago where the LIQUID extrafloor tag implies SEE_THROUGH. Thinking on it now, it makes more sense to NOT imply it, as the SEE_THROUGH tag is only really useful for liquids. Marc Pullen has done us a big favour though: all the liquid types in EDGE and QDOOM's DDF have the SEE_THROUGH tag explicitly. Therefore I'll fix the mistake and make it not-implied, and B.C. breakage should be minimal. Besides, monster sight through extrafloors has been broken anyway. I'll also implement the NOSHADE tag which makes the extrafloor keep the same lighting as above it. I can see why thing movement gets slow: it computes the sector gaps for a thing EVERY time it moves. Whee. We can fix that by storing the gaps in the sector (of course, now we slow down sector movement instead), also we'll need two sets of gaps to handle WATERWALKERs properly (ouch). Hmmm... that `hidden' flag in extrafloor_t has gotta go. The main reason for it was to handle flooders in a nice way. Therefore a better way is to keep the hidden liquids in a separate list. Or, perhaps put _ALL_ liquids in a separate list, they would both be sorted by height so it's possible to do a staggered traversal. Implemented a new console command: CRC which computes the CRC value of the given lump. 2001/07/11: Fixed some HOM problems with sky in GL. IDEA: use BSP tree to work out what sectors a thing touches (msecnodes). Currently we already do a BSP traversal on every P_SetThingPosition(), so with a little more work we can compute what sectors the thing touches too. Merged sidepart_t and plane_info_t in r_defs.h into a single structure: surface_t. Phew... I don't think our vert_region_t stuff is gonna cut it. What makes it unsatisfactory is that they are not independent, the ceiling of one is the floor of another, and even that relationship is poorly defined, which makes moving extrafloors HARD. So I think it's time to make the programming model correspond more closely to the editing model, i.e. back to sector + set of extrafloors. BIG changes afoot... 2001/07/10: Decided we need a msecnode_t system like BOOM uses to handle moving sectors/extrafloors in an efficient way. Should it handle vert regions too ? Hmmm.... More extrafloor rejigging. Replaced `soundtarget' in sector_t with a player number, mainly to get rid of the `mobj_t *' in there (allowing generic mobjs has implications for P_RemoveMobj). Started on routine(s) to check if sector moves are valid. For elevators there is two cases: (1) normal sector. It is always safe to move one end of the elevator without checking (upwards: ceiling, downwards: floor), so the normal check routine will do (for the other end). Safe end moves first. (2) thick extrafloor dummy sector (3D platform). Again one of the ends is always safe to move (upwards: bottom of EF, downwards: top of EF), so same as above: only need to check one end. Unlike the above: safe end moves _last_. That's a relief, since trying to check both floor/ceiling at the same time would've been a massive PITA. Another rejig of vert_region_t: this time making f_h, c_h and top_h the nominal height info, ignoring the floor->h and ceil->h values altogether. This is needed for 3D platform movement, so that EF regions can be moved independently of their dummy sector (during a move that is -- they will still match the dummy heights at all other times). 2001/07/09: Fixed problem with breathing support not showing air-bar sometimes. The code now considers your mouth to be at eye-height :) instead of on the top of your head. Re-enabled the "PAUSE" icon when paused. Started the "Big Extrafloor Rejig" that's been on the cards for so long now. First step: getting rid of extrafloor_record_t, and just keeping the info in the regions. Well, so far it mostly works (e.g. QD01-QD03), but needs fixing for floors that move over/under other floors (e.g. QD04). 2001/07/08: Allowed RTS path nodes to have multiple TAGGED_PATH destinations, the monster will choose one at random. Added new "PATH_EVENT" command which takes one arg: a state label -- when the monster reaches that node it will enter that state. Fixed savegame code for paths. Added parsing code for new RTS multiplayer commands "NET_MODE" and "TAGGED_PLAYER_SPECIFIC". Leave it 'til later to get them working. Worked on fixing thin horizontally sliding doors for GL. Changed the texturing mode: the texture on the second sidedef should be the same as the on the first, EDGE will automatically reverse it. 2001/07/07: Spent another while working out the RTS multiplayer semantics, trying to find the things that make the most sense. I'm fairly happy with the results. See docs/rts_rules.txt. Implemented the RTS_ENABLE_TAGGED action for weapons.ddf. Only useful for a few special effects, but it's also part of being able to create more "tool-like" weapons. Future plans: have some more keys usuable by weapons for special purposes, say four, and pressing them makes the weapon jump to specified states. Maybe another 4 keys to make the player thing jump to specified states too. Implemented GIVE_BENEFIT and LOSE_BENEFIT commands for RTS, and also LOSE_BENEFIT command for things.ddf (pickups). 'Nuff said I think. 2001/07/06: Implemented new RTS command ONCONDITION (some code was already there, it just needed the parser). It is like ONDEATH and ONHEIGHT: the trigger will not run unless the condition is satisfied. Used like this: ONCONDITION Where condition is something that the player is holding or is doing. It is one of these: HEALTH(num) BULLETS(num) // and the other ammo names GREEN_ARMOUR(num) // and the other armours KEY_BLUECARD // and the other keys CHAINGUN // and the other weapons POWERUP_PARTINVIS // and the other powerups JUMPING ATTACKING CROUCHING RAMPAGING SWIMMING USING The brackets on health, ammo and armour conditions are optional, when present they are a minimum needed, e.g. HEALTH(50) requires health 50 or higher to run. Without the brackets, they mean "any above zero". Those words can be prefixed with "NOT_", which negates the condition, e.g. NOT_KEY_REDSKULL means that the trigger will only run when the player *doesn't* have the red skull key. Multiple ONCONDITION lines can be used in each trigger script, and they _all_ have to be satisfied before the trigger will run. Probably the most useful of the conditions is the key ones, which can be used to make using triggers that require keys to work, just like what can be done with linedefs. Future plans: allow these conditions to be used in states in THINGS.DDF and WEAPONS.DDF, and the future HUD.DDF. Spent a while working out the full RTS execution semantics. There's a much harder issue to solve: multiplayer semantics. This is really really tricky ! The current code runs all triggers for all players, e.g. messing up timing aspects. Some triggers should only be run _once_, e.g. ones doing SPAWNTHINGs onto extrafloors. Some actions require players, e.g. TIP (presumably the player that satisfied the conditions) and some don't, e.g. MOVE_SECTOR. Arghhh. IDEA: it may help to specify triggers as "player specific". In such cases there is one trigger spawned _for each player_ in the game. Scripts that use TIP, DAMAGEPLAYER, GIVEARMOUR (etc) are candidates. IDEA 2: may also help to specify triggers as "absolute". These scripts are detached from players. Scripts that use SPAWNTHING, MOVE_SECTOR, LIGHT_SECTOR, SECTORV/L are candidates. OK, I'm thinking a new command like "NET_MODE" is prolly the way to go, taking a keyword (or several) to describe how the script works in multiplayer (net) games. "ABSOLUTE" would be one tag. "NORMAL" would specify the default: separate triggers spawned for each player. Other possibilities: one to "lock out" the other player triggers when the first is activated; one to be like absolute, but allow _any_ player who satisfies all conditions activate -- maybe another one for _all_ players must satisfy the conditions. 2001/07/05: Fixed bug where certain lighting linetypes (esp. 138) wouldn't work when used with the RTS ACTIVATE_LINETYPE command. Fixed -ddf when used on an empty directory -- missing files now cause an error instead of warnings. Maybe change this on a file-by-file basis later on to allow better backwards compat. 2001/07/04: Been working on glbspX (GUI version of glbsp). Looking good. 2001/07/02: Hacked up console code to get it working again. Made the text white and made pressing enter on an empty line not say "bad command". 2001/07/01: Worked on fixing the problem of EDGE not setting a good video mode when first run and 320x200x8 doesn't work. As the last resort it now tries all modes in the available list. I'm not sure yet how windowed/fullscreen should fit in -- probably like this: when fullscreen and all modes fail, then switch to windowing. Windowed mode is problematic: most windowing systems allow arbitrary sized windows (maybe a small restriction like multiple of 8). Using the same sizes as fullscreen-avail-list is not right. I'd say have a set of "standard" sizes (e.g. 640x480) and use those. Worked on implementing fullscreen/windowing mode choice in the EPI. Put screenmode_t into i_system.h and added a `windowed' flag. Made various bits of code handle the windowed flag (and global `in_a_window' flag which is analogous to the SCREENWIDTH/HEIGHT globals). V_AddAvailableResolution and I_SetScreenSize now take pointers to a screenmode_t. OUCH: `bpp' is used in many places, but I keep getting confused on whether it means "bits per pixel" or "bytes per pixel". Naughty acronym ! This should be changed to prevent confusion (== bugs), but I'll need to rename DEPTH --> PITCH in places too. Prolly went somewhat overboard renaming stuff. Oh well. Okidoke, everything seems to be working again. What's better is that the new Linux/SDL code handles the "Set Resolution" menu properly. It's working in GL mode too -- sweet. Fixed a bug with recent demo/title reworking, and a bug not setting defaults for the "extended" keys in the config. Implemented translucent solid boxes for software mode, fixing the non-darkening-menu-background thing. 2001/06/30: Disabled the DLIGHT stuff. No use releasing EDGE with half-arsed features -- they should work & work well. (Same goes for TILESKY). Added new keys for lines.ddf: GREENCARD, GREENSKULL, GOLDKEY, SILVERKEY, BRASSKEY, MONKEY (not really !), COPPERKEY, STEELKEY, WOODENKEY, FIREKEY and WATERKEY, bringing the total to 16. The names don't mean much (they could've been KEY1..KEY10, but how boring !). Like the new ammo types, TC makers can make them into anything. Implemented new I_Access() EPI function. Hopefully this should fix the read-only-IWAD problem under win32. Created L_CompareTimeStamps() routine based on Andy Baker's code that was in AddFile() in w_wad.c. 2001/06/28: Worked on incorporating Janis Legzdinsh's Hexen fixes into glBSP. The FLTK version is coming along... 2001/06/26: Decided to switch to the FLTK toolkit for the GUI version of glBSP, because (a) seems better supported under Win32, (b) C++ is just a much more natural language for doing GUI work than plain C (GTK+ is rather painful to code with). 2001/06/25: More work on making a GTK+ version of glBSP. 2001/06/23: Did some glBSP work. 2001/06/22: Added blockmap check for lumps > 128k (i.e. same as in Boom). Thought about optimising GenerateBlockMap, but the code looks fairly optimal already. Removed old code in r_bsp.c, r_segs.c, r_plane.c, and a few others. Created new file "ddf_boom.c", and began work on implementing generalised line & sector types. Okidoke, sector types are done (that was the easy part :->). Started work on the line types, crushers and stairs are done -- need to do some testing. Righteo finished the generalised line types. Some stuff isn't implemented, e.g. the "ALL keys" for locked doors, or reversable stairs -- because our DDF doesn't support such things. Plus some parts of BOOMREF.TXT are ambiguous, e.g. whether the 32-unit floor movers go _down_ 32 units when DIR==0. So it may take a while to find all the quirks (but hey, that's what releases are for :->). There's also the issue of manual doors -- BOOM uses the tag to do a light effect. This confuses EDGE ATM. OK added a "MANUAL" type that is the same as "PUSH" but ignores the tag. Also fixed: COUNT=0 in lines.ddf should mean "no limit on retriggering", and scroll direction for linetypes 250-253. 2001/06/21: Fixed DDF and RTS error messages to put the context info into the I_Error buffer, so it appears in the pop-up window under Win32. Changed S_ChangeMusic to make playlist number #0 mean "no music". Could be useful with the rts CHANGE_MUSIC command. Fixed an infinite-loop bug in E_DoAdvanceDemo when there are no title screens at all. 2001/06/19: Fixed up semantics for finding texture/flat anim sequences. Optimised the R_InitSprites() routine with a binary search. What's weird is that it is now SLOWER than before -- arghhh ! Optimised R_InitSprites even more, but it is still slower, which I believe is down to the inefficient searching in W_ImageFromPatch, due to recent changes having a lot more images to wade through. Reworked the way sprites enter the image system. Ah good, R_InitSprites is now nice and fast. Change `interscr' field of mapstuff_t into a string `episode_name', thereby removing DDF references to wi_map_t (games.ddf). This means we can delete the game entries when #CLEARALL is used. Implemented #CLEARALL for DDF. Half the files actually delete the entries, the other half use a `num_disabled_xxx' variable to pretend they are not there. 2001/06/18: Moved R_InitPicAnims from p_spec.c to r_data.c, and moved it and some other routines into the startcode[] array. Fixed texture loader to ignore textures with missing patches ("dud" textures), as it's better to use a dummy texture than to crash out with an error. Reimplemented level pre-caching -- and yeah it's better with it. Catalog of stuff in DDF that a #CLEARALL would affect: 0. Obvious: all types of lookups (name/number) would fail. I don't see any problem (yet) with false positives (e.g. the implications of not failing when the #CLEARALL is ignored). 1. Anims.ddf: (a) those flats/textures would no longer animate. Here it would be safe to delete the list, as nothing else contains pointers/references to anim defs. 2. Switch.ddf: same as for anims.ddf. 3. Weapons.ddf: (a) all FREE=TRUE weapons are automatically given to the player. (b) the "give all weapons" cheat gives the player all weapons known in DDF. Since the only references to weaponinfo_t (mainly the key choices) are made _after_ DDF cleanup time, it is also safe here to delete the weapon list. [UPDATE] Ouch, weapons look-ups return an integer (unlike every other DDF object) and it turns out they do have references: one in weapons and one in things (for benefits). 4. Lines.ddf: no other implications (or references) --> delete. 5. Sectors.ddf: no other implications --> delete. 6. Colmap.ddf: this has references in other DDF structures, so the entries should not be deleted. No other implications though, so the #CLEARALL could be safely ignored. 7. Language.ldf: no other implications --> delete. 8. Playlist.ddf: no other implications --> delete. 9. Sounds.ddf: has many references in other DDF structs. There are the "bastard sfxs", but they aren't looked-up until DDF cleanup time. There are no other implications though (apart from lookups), thus the #CLEARALL can be safely ignored. 10. Games.ddf: (a) wi_map_t used in other DDF structs. (b) the game entries are scanned in m_menu.c to create the Episode menu. (c) Entries are scanned to display title images when EDGE first starts up (play title music too). Here #CLEARALL would affect (b) and (c), and could be very useful for TCs. (OTOH there may be better ways). 11. Levels.ddf: (a) mapstuff_t reference only used within itself, hence the entries could be deleted. Otherwise no other implications --> delete. 12. Attacks.ddf: (a) references used in other DDF structs. (b) attacks have a dual nature, also functioning as objects depending on the type of attack. See the things.ddf bit, though it's prolly safe to just ignore #CLEARALL. 13. Things.ddf: (a) references used elsewhere. (b) things also have a number, which is looked up when loading the map (also by certain RTS commands). (c) the CASTORDER command can put the thing into the end-game cast parade -- a missing CASTORDER value upsets the parade. (d) the PLAYER command is used to find what thing type the player will become. One such thing type must exist for each player, or EDGE won't run. Implications for (b), (c) and (d) are just failing to find a thing. Since newer things override older ones, it is safe to have false positives. No other implications --> ignore. 14. States: (a) DDF files with states will add to the global list of what sprites are used. These sprites won't be removed by a #CLEARALL. Implication: R_InitSprites will look for sprite patches for unused weapons/things/attacks. (b) The state array itself will contain states that probably won't be used. To summarise: only weapons.ddf and games.ddf provide any benefit of a #CLEARALL directive (apart from the memory savings). Games.ddf is the trickiest, there are references so we can't just delete the entries. For the other DDF files, some can delete and the rest can ignore it. Hmmm... for games.ddf, I think put a boolean (like `disabled') in wi_map_t. Also the episode menu & title screen parts should be scanned once and store the results in a "cache" field in wi_map_t (or separately). IDEA: for the undeleteables: keep a "num_disabled_xxx" variable, initially zero. When #CLEARALL is used, set it. All scanning should take it into account. 2001/06/17: Started work fixing up texture animations. Moved some WAD structures (patch_t, mappatch_t and maptexture_t) into the dm_data.h header file where the other structures are kept. Worked on flats: creating a image for every flat within F_START to F_END. Similar work for textures: add an image for each entry in TEXTURE1/2. It's more efficient than the previous approach: look them up on-the-fly. Ouch: some stuff needs to be found case *insensitively*, as the BOOM source indicates. In particular: flat/texture names and lump names. Okidoke, put in some strupr()s and stricmp()s. Okidoke #2: New flat/texture loaders are working OK. Okidoke #3: Texture animations are back. Yeah baby. 2001/06/12: Replaced gasp states with new GASP_SOUND command for the player DDF. IDEA: fix the sight/aim/shoot code for extrafloors: use a bit-field instead of a dynamic array of vertical angle ranges. 2001/06/12: Worked on player physics when in multiple extrafloors (e.g half in a liquid, half out). The properties like gravity, viscosity (etc) become a weighted average of all intersected areas (weighted by how much of the player is in that area). Added new sector SPECIAL "SWIM". When you're in a sector or liquid with such a special sector, then it activates "swimming mode". In swimming mode you can swim up/down, plus you also swim in the MLOOK direction. Also the jump key works differently. For swimming mode to work well, the sectortype should a low GRAVITY value (e.g. 0), and have FRICTION and DRAG values the same and less than 0.9 or so. Viscosity is an optional extra :->. It's working quite nicely now. 2001/06/10: * Released version 1.94 of glBSP * Added new DRAG command for lines and sectors in DDF. It is a companion for the GRAVITY, FRICTION and VISCOSITY commands. DRAG means "air friction" -- it is how much objects get slowed down by the air when they are airborne (i.e. not touching the ground). The default value (0.99) provides backwards compat. Lower values (e.g. 0.91) makes liquids more "sticky". This command goes part way to help make water physics better, however more is needed make it really good. 2001/06/08: Improved software mipmapping, by ensuring that the mip is always increasing when drawing the columns (no icky "oscillation" on neighbouring columns). Fixed problem with TURN_RANDOM() thing action. 2001/06/07: Worked on LevNamer some more. Option parsing code is in place. Righteo got something working -- needs tidying up now. 2001/06/06: Added check for missing/empty REJECT lump. Reworked LevNamer docs: the usage is more intuitive now. 2001/06/05: Began work on a level renaming tool (called "LevNamer"). Did something unusual: actually wrote some documentation before writing any code. 2001/06/04: Worked on making the mipmapping in software mode back to per-column instead of per-surface. OK done, and is somewhat optimised. 2001/06/03: Added P_MobjSetRealSource(), for missiles that spawn missiles. Worked on savegame code for radius triggers. One complication is that radius scripts have no good identifier -- I'll use a checksum of important info I think. OK radius trigger part is done. 2001/06/02: Worked on savegame code -- region/sector stuff. Actually I think I jumped the gun a bit, it needs the big rejig (heh) to be complete (i.e. the extrafloor cleanup). Righteo, savegame code for (a) active buttons and (b) active lights is now in place. 2001/06/01: June already -- jeez. Anyway new GL sky code is in place, and working fine on various test levels, including the original E1M1. But the texturing part is way out of whack, that'll require quite some work, especially to renable the tilesky stuff. BTW also implemented the -homdetect option, for both renderers. OK, texturing on GL sky code is now fairly right -- (a) the plane parts are very wobbly, so increased the wall parts by 256 as a hack to compensate, (b) the code is really sub-optimal, needs optimising. Plus tilesky stuff is still off-line -- and I'm not sure if it is even worth keeping. 2001/05/31: Added preliminary support for an on-screen air indicator. IDEA: for GL skies: do a first pass over the level, and compute a "sky height" s.t. on every line where both sectors have a sky ceiling, the sky heights are the same. When rendering, render the sky at the sky height (as planes), and render sky "walls" where the sky height is larger than the real height on certain lines (i.e. 1S and 2S that don't have sky on their back). Hmmm... should work OK. Began work implementing this. Looks like a goer :-) 2001/05/30: Made armour value on status bar have same colour as the best armour currently held, i.e. red if we have red armour, yellow, blue or green if we only have green armour (or none). Made health and ammo colour on status bar the same as in BOOM. Experimental though -- will see what everyone else thinks before keeping it. Found a problem: ST_ReInit() gets called too early (during V_InitResolution) when the player structure hasn't been properly initialised yet. Hacked up for now. 2001/05/29: Reworked floor/ceiling height references (ref_XXX) and the GetSecHeightReference() function. Merged all the P_FindLowest/Highest Floor/Ceiling and P_FindNextXXX functions in p_spec.c into one big routine. Started off with just a simple goal: to fix the continuous floors on MAP12, but that required a version of FindHighestFloor which includes the current sector, etc etc... Some new DDF in that: (a) OTHER_REF and OTHER_OFFSET are used where DEST_REF and DEST_OFFSET are used, and specify the opposite height that continuously moving floors move to. The default matches standard DOOM/BOOM behaviour. (b) DEST_REF and OTHER_REF accept some tags placed (with a comma) after the normal reference (ABSOLUTE etc). They are "INCLUDE" and "EXCLUDE". Examples: DEST_REF = LOSURROUNDINGFLOOR, EXCLUDE; DEST_REF = HISURROUNDINGFLOOR, INCLUDE; where INCLUDE means to include the current sector with the surrounding sectors, and EXCLUDE means to exclude it. We need them both since, to remain backwards compatible, LOSURROUNDINGFLOOR implies INCLUDE and the other SURROUND types imply EXCLUDE. Later on I'd like to support an "EXTRA" tag too, which will take solid extrafloors into account when computing the height to move to. Well, at least MAP12 is working now. Added a `boom_compat' flag, including a -boom option and entries in the config file and gameplay option menu. In preparation for support for BOOM linetypes and sector types. Also added the initial DDF framework for them. Added a `in_a_window' flag, including -windowed and -fullscreen options and entry in the config file. Not used yet, prolly need to update I_SetScreenSize() function of EPI with windowing as a fourth parameter. Reworked AIR support -- removing CHOKE_START. Now, you start choking when your lung capacity completely runs out, and you only drown when your health runs out (since choking causes pain). Started reworking armour code: keeping all four armour values independently in player_t. This change seems quite natural, so far the code changes have been minimal. OK done, including a way to prevent underwater choke damage from being mitigated by armour. 2001/05/28: Fixed (for real this time) the slither on top of weapon in GL bug, and also a gap underneath the weapon. Reworked the CastTicker() code in f_finale.c. Done. There were many places where it could crash if an action required closecombat or range attacks were used without the monster having them. Also fixed a problem not mirroring certain sprites (e.g. the hell knight). Reworked CalcHeight() in p_user.c, mainly to fix a problem with the weapon sprite jumping when walking/running down stairs. Noticed that some continuous plats on MAP12 aren't working -- a problem in P_SetupSectorAction with mov_Continuous types. Started working on a fix... 2001/05/27: Yadex: implemented a "transfer property" feature, first you select the destination objects (sectors are the main ones I had in mind), then highlight the source object, then press `T'. The properties are copied from source to dest. For sectors, it is everything (heights, flats, etc), for things it is the type, angle & when_appear, for linedefs it is the flags, type and tag. One issue is sidedefs: currently they are left alone -- transferring the textures (etc) could be useful though it is unclear the best way to handle 2s lines. Yadex: implemented the `w' key in vertex mode doing the split-sector function (analogous to the same key in linedef mode). 2001/05/26: Temporarily hacked up P_ChangeSector so that extrafloors (esp. liquids) still work properly. I'm gonna overhaul it anyway. 2001/05/25: Fixed a few crash bugs in new savegame code. Fixed issues with hidden liquid floors in the software renderer. Did the same for the GL renderer. Fixed a new problem with flooders. 2001/05/24: Fixed the flat-lighting weapon-too-dark problem in the software renderer. Found the bug causing read-only IWADs to be ignored in Win32. Seems BCC32's idea of the "access" function is different to the normal UNIX semantics (which our code currently uses), e.g. the R_OK, W_OK defines are not defined anywhere in the BCC headers. Looked at the "open" function too -- here BCC32 is OK, hence I think we should remove the access calls in favour of open/close pairs. Fixed stupid crash bug in GLBSP, when used with a single filename. 2001/05/23: Worked on the issue where inside ceilings that are higher than the outside walls sometimes get drawn in GLEDGE. Near the start of MAP12 of DOOM 2 is a good example. The changes are an improvement, but may cause other problems with really short linedefs or segs (especially when a whole wall is made up of really short pieces). I dunno, but I tend to think a better way of handling the sky would help a lot. Added support for dithering under GL (-dither option, plus a line in the config file). Does it help/hinder/is good/is bad ? Well, close up walls look a bit smoother, sky too, otherwise unnoticeable (though other videocards may show more improvement). Fixed the slither at the top of certain weapons in GLEDGE. Fixed SPRITE_SCALE for sprites in GLEDGE, also sprites that intersect with liquid surfaces. CHTHON in qdoom now looks right. Fixed SPRITE_SCALE + liquids in the software renderer, at least vertically. Something odd is happening horizontally... OK, fixed horizontal SPRITE_SCALE in the software renderer. Phew, I'm glad this sprite scaling stuff is finally fixed, it's been pending for a looooong time now. Catalog of what actions can jump to what states: 1. things.ddf LOOKOUT -> CHASE CHASE -> IDLE, MELEE, MISSILE SUPPORT_LOOKOUT -> MEANDER REFIRE_CHECK -> CHASE PATH_CHECK -> MEANDER RESCHASE -> RESURRECT 2. weapons.ddf RAISE -> READY READY -> DOWN, ATTACK, SEC_ATTACK LOWER -> UP CHECKRELOAD -> RELOAD SEC_CHECKRELOAD -> SECRELOAD SHOOT -> ATTACK SEC_SHOOT -> SECATTACK REFIRE -> ATTACK NOFIRE -> ATTACK, READY NOFIRE_RETURN -> ATTACK, READY SEC_REFIRE -> SECATTACK SEC_NOFIRE -> SECATTACK, READY SEC_NOFIRE_RETURN -> SECATTACK, READY SHOOT -> FLASH (flash) FLASH -> FLASH (flash) SEC_SHOOT -> SECFLASH (flash) SEC_FLASH -> SECFLASH (flash) CHECK_MOVING -> IDLE (player) FLASH -> MISSILE (player) SEC_FLASH -> MISSILE (player) SHOOT -> MELEE, MISSILE (player) SEC_SHOOT -> MELEE, MISSILE (player) Hmmm, that sheds some light. Some of these actions would benefit from an ability to specify an alternative state in brackets, e.g. LOOKOUT(). Others (like NOFIRE) might be better done in a more atomic way -- or should I say "might have been better" as I think there's little point or value in changing them now. IDEA: a generic "PLAYER_JUMP" action for weapons.ddf, that can cause the player to go into the specified state. Useful ? Dunno. 2001/05/18: I think ACTIVATORS=MISSILE should be removed, in favour of just allowing missiles to activate any TYPE=SHOOT special line (the missile's shooter will have to match the existing ACTIVATORS line, of course). Having MISSILE as an activator was a stupid idea of mine. The only real implication of this change is that certain lines will be activateable by missiles, where before you'd have to use a bullet weapon (e.g. the door at the start of MAP18 of DOOM 2). OK removed now. MISSILE tag is still accepted, but ignored. 2001/05/17: Looked into SINGLESIDED=TRUE and missile-hitting-lines issues. I'm not happy with the current logic for missile hitting lines, it's messy (with parts in p_mobj.c and p_map.c) and feels unreliable. Updated the P_ShootSpecialLine() function to take a side parameter, which should fix the SINGLESIDED problems for both bullets and missiles. 2001/05/16: Reworked the tricky P_ComputeSectorRegions() func, using the changes to sector_t and vert_region_t. What I've got now looks and feels a lot cleaner -- let's hope it still works :). Okidoke, tested it, and seems everything still works. Good. Implemented SEC_NOFIRE_RETURN weapon action. 2001/05/15: Thoughts on breathing support: (a) Sectors tagged as "air-less" start decrementing the current amount of air within the player. Monsters are unaffected. This amount could be called "lung capacity", given as a time value e.g. 60 seconds, and is DDF definable. (b) When the air runs out -- player drowns. Enters the "DROWN" states if they exist, otherwise ordinary death states. (c) When the air reaches a certain limit, player starts choking. Enters "CHOKE" states if exist, otherwise pain states. This limit and intervals between gasps are DDF definable. (d) New powerup "SCUBA" gives players immunity to air-less sectors while powerup is in effect. Also just gaining the powerup fills lungs. (e) Leaving a air-less sector means regaining air. Lungs are filled immediately -- simplest option. If the player has "GASP" states, they are entered. (f) In the future: draw a nice diminishing bar when in an air-less sector. Bar could turn red when in choke limit. Started implementing the above. For the player DDF, the commands are LUNG_CAPACITY, GASP_START and CHOKE_START (all time values), and CHOKE_DAMAGE.XXX which controls choke damage, interval and choke/drown states. They have reasonable defaults. For sectors.ddf there's the new AIRLESS special. For things.ddf the new powerup name is POWERUP_SCUBA, use it just like POWERUP_ACIDSUIT. Finished it, and tested it all except for SCUBA powerup. Began doing stage I rework of extrafloor code, involving some minimal improvements including putting all vert_regions into one big array that is created at level load time. 2001/05/09: Made TAGGED_REPEATABLE allowable with no parameters. Fully implemented the new MOVE_SECTOR and LIGHT_SECTOR rts commands, including the ABSOLUTE keyword. IDEA: for vert_region, keep min & max of all things touching the region. Allows lowers/raises without checks in some cases. Whether it really helps remains to be seen. 2001/05/08: Found another problem with GLBSP: when subsectors become really wide but narrow, we can hit the angle accuracy limit, causing segs to be put in the wrong order (and the "subsector not closed" messages). Making ANG_EPSILON a lot smaller has fixed the problem in my test wad. BTW, I thought GLBSP had problems with MAP14 of DOOM 2, but it turns out that the map is made with the triangle holes in the ceiling, plus some missing upper/lower textures made it look like bad nodes. Yadex: implemented a function that "fills" a closed area with either a new sector reference, or if another sector is selected then with that sector reference. The key is `Z'. Doesn't handle islands yet. 2001/05/07: Worked on very minimal REJECT support for GLBSP. Just fixed a bug that meant the warning about 2s linedefs missing the left side was never displayed. 2001/05/04: Tidied up GLBSP error messages w.r.t. arguments. Tidied up some more GLBSP problems, e.g. it wasn't even showing the usual info when run with no arguments. 2001/04/29: Added USHORT() and ULONG() macros, and used them to tidy up p_setup.c in order to increase some limitations, especially in GL_SEGS. More GLBSP stuff: implemented debugging code in system.c. Added warning messages for lumps that overflow their usual limits (e.g. GL_SEGS). Found a serious bug when the blockmap gets truncated, the root superblock is created too small ! Fixed now. OK, with these fixes MAP26 of 10SECTOR.WAD now works in EDGE (albeit slowly, as in other engines). 2001/04/28: Some GLBSP work: added checks for VERY long linedefs and nodes, reworked blockmap truncation code, with a new "-maxblock" option that may help in some cases. 2001/04/27: Found a subtle searching problem for DDF (while checking out QDOOM cast-order problems). Some commands (e.g. CASTORDER) want the "newest" entry to override earlier ones. But if a newer entry replaces an earlier one (since it has the same name), then it will appear to be "older" since it keeps the same position in the array. Routines affected are: DDF_MobjLookupNum DDF_MobjLookupCast DDF_MobjLookupPlayer Everything else looks OK, e.g. weapon key cycles are computed after all DDF files have been read. Solution ? We're using arrays of pointers, so it seems adequate to simply keep the pointer array in first-come order, even when a new entry replaces an earlier one. Note: the rule about not moving the actual entry structures (mobjinfo_t etc) is still valid. Yep, that fixes the cast order issue, etc. Fixed sprite sizes in the cast finale. Went through the action routines in p_action.c, adding checks for fields that may be NULL (especially `currentattack'). Noticed that the QDOOM bouncing grenade was not bouncing off walls facing exactly south. Turned out to be two bugs in the bounce code, both of them combining to cause that bug. 2001/04/14: More work on ddf update guide. 2001/04/13: Docco work -- 1.25 update guide is almost done. 2001/04/12: Began reworking extrafloor code, making vert_region_t the main structure in the code and relegating sector_t to be little more than a container for vert_regions (or just "regions" for short). Deprecated the current SECTORL and SECTORV rts commands, which take the exact sector number and are thus prone to breakage. The new commands are: MOVE_SECTOR LIGHT_SECTOR which are otherwise identical. but take a tag number (and can thus affect multiple sectors at once). The new commands can also accept the word "ABSOLUTE" placed at the end, meaning to set the height/lighting to the absolute value rather than increment/decrement. Well, extrafloor rework is coming along, everything now compiles again after the changes, _except_ p_plane.c (which is the worst of the bunch), plus (often large) chunks of the code are currently commented out with //ZZZ or #if 0 (like p_spec.c and p_maputl.c). The highest ceiling and lowest floor heights are used quite a bit (including some places that aren't fully 3D aware yet, like p_sight.c), therefore I'm caching these values in two new sector_t fields: min_h and max_h. Description: adding an extrafloor works like this: the dummy sector (which should have only one region) has a line tagging the destination (like before). In the new code, the tag refers to an existing region (or several). This region gets split in half (vertically). The upper half keeps the same tag, properties, and ceiling and the floor is copied from the dummy region. The lower half keeps the floor, and the properties and ceiling are copied from the dummy region. The next bit is crucial: the dummy region's tag is _transferred_ to the lower half, not copied -- meaning it gets cleared to zero in the dummy region. That means all future tag-related operations (moving floors, property transfers, and those new RTS commands above) will affect the new region (lower half) and not the dummy sector. IMPLICATIONS: non-tag operations that move or alter the dummy sector will no longer work as they do now. So far I can only think of two cases: (a) using SECTORV or SECTORL on the dummy sector won't work, breaking compatibility. These RTS commands are now deprecated though. (b) using the stair building linetypes on a set of dummy sectors to get a rising 3D staircase no longer works either, in fact it'll prolly behave quite strangely due to that tag transfer. For now I'm not going to worry about these. Plus it must be said that other sector movements need updating to handle 3D floors better (e.g. Raise to Next Highest Excluded Floor). 2001/04/08: More documentation work. 2001/04/07: Removed the DDF template stuff, which was never used ("dormant code"). Started tidying up the DDF command lists to be like the savegame code, using the DDF_CMD() macro (with DF() abbreviation). Later on we'll remove the buffer_xxxx stuff and use offsets directly, so the current changes are just aesthetic but will require minimal changes when we do start using field offset values. Done tidying ddf tables, also removing the never-used `private' parameter in the parsing routines, and cleaning up sub-tables using DDF_SUB_LIST() and DDF_CMD_SUB() macros. Removed the '@' label stuff that no-one uses. Keep it simple. Fixed two bugs: (a) QDoom rain falling at the same time, (b) bouncing objects not entering their bounce states. Worked on changelog some more. 2001/04/04: Fixed the linux I_PathIsDirectory() routine, which was using access(filename, X_OK) which is not an adequate test. Now using the stat() function and S_ISDIR(). The BeOS port may need fixing too. 2001/03/17: Savegame work, today it's sidedefs and linedefs. Wrote routines in w_image.c for stringifying & un-stringifying image pointers. BTW the image system would be a cleaner without the differentation of types (ImageFromFlat vs ImageFromTexture etc etc)... It's to do with the way that images are added on-the-fly. Hmmmm, OK, we're kinda restrained by the current WAD semantics, e.g. finding a flat outside of F_START/F_END when it isn't found inside there. At times like these I start thinking about a new WAD format -- but it's no good, EDGE is a _Doom_ port and much (if not most) of its value is being able to play the existing corpus of Doom works. Sidedef and Linedef save code is in place, and compiles OK. Need to investigate stuff like GroupLines() and animation lists... 2001/03/14: Savegame stuff. Improved the way states are saved/restored in the savegame file -- the new system is much more robust than just saving the index into states[] (which can oh so easily change, e.g. by adding a new monster or item). Found the strange "corpses disappear after load" bug, turns out I forgot the important "tics" field in the mobj_t save table. Noticed that lots of code in p_action.c assumes `currentattack' is valid. The savegame code doesn't save that field yet -- hence a crash. Hmmmm, if it's our policy that EDGE shouldn't crash, even when DDF actions are used incorrectly (very reasonable IMO), then all action routines should check for things like this. 2001/03/13: Savegame work. Updated main code for [GLOB] changes. Updated structure/array/data loaders for top-level changes. Started writing code to dump savegames -- should be very useful for debugging. Righteo the savegame code is now fixed for the changes in the specs (docs/save_sys.txt) and the debugging code which dumps savegame files is done. I'm fairly happy with the specs and the code now. Still quite a lot to do yet though... 2001/03/12: Savegame work. OK, changes for globals (GLOB chunk) are in place, it's another table-driven dealie like DDF and the savegame structure stuff. 2001/03/11: Implemented ladders, pretty much a no brainer. Can be used for climbable vines and that sort of thing too. Usage: it is linedef based, when you are sitting on a ladder linedef (and the heights match) then pressing MoveUp/Down lets you climb the ladder. The LINES.DDF command is just: LADDER.HEIGHT = 128; that gives the height of the ladder, which should match the texture used. The ladder linetype should be a two sided line that has the same sector on both sides, and about 24 units away from the actual ladder texture. Ladders normally start on the ground, but can be raised by setting the Y_OFFSET in the first sidedef. 2001/03/10: More work tidying up the savegame spec. IDEA: ladder linetypes should be for _two_ sided lines. This means the check boils down to "is player sitting on this line" (plus a height check) -- which can be done at PIT_Check{Rel,Abs}Line time, much easier than doing a "is player touching (or near abouts) this one sided line". I'll try this out, if for nothing but the fun of it. 2001/03/09: Phew, been doing other stuff for a while. Not much you can do when the tank is empty. Anyway, started attacking the savegame system again -- reworked the specs to try and make it simpler (I kept thinking it was too complex) -- the [GLOB] chunk now does everything (well, almost everything) with NAME=VALUE pairs (not unlike ddf) and yeah, it feels like an improvement. The concepts behind the rest (SDEF, ADEF and STOR chunks) are pretty sound I think, not much can be simplified there -- but I did remove the top-level STRU and ARRY container chunks: the format now is basically Header + GLOB + a stream of SDEF/ADEF/STOR chunks + Trailer. I'm also rather keen to implement more BOOM support, namely the generalised linetypes & sectortypes, and line-to-line teleporters. That should allow BOOM stuff to be played without major issues like doors that won't open, albeit with some minor things not working (like accelerative scrollers, which are past the point of diminishing returns for me to code up). It'll need to be an option, since our DDF files (and quite likely those of other projects) use conflicting linetype and sectortype numbers. 2001/02/19: * Made WIP binary packages for Win32 and Linux. BTW, after using LibPNG (in another program), it's not too bad to use, just that it lacks a nice high-level way to say "just read in this whole image and give me the RGB data". 2001/02/12: Been looking at the LibPNG API -- it's more painful than what I remember, in particular the setjump stuff is downright... well, it's an exception model for errors, but in C... 2001/02/10: Started work redoing the texture animations, and general tidying up of the w_image <-> w_textur interaction. Replaced EDGEVERFIX with EDGEVERSTR. Also added JUST_A_WIP define to the makefiles, and made various stuff show "WIP" in (hopefully) prominent places when it is defined. We'll remove this define for the full 1.25 release. Brought the CHANGELOG up-to-date. 2001/02/09: Fix for projectiles not triggerring 1S special lines. Fix for berserk powerup not giving the fist. Fix for chainsaw causing crazy mlook angles. Fix for translucent tips in S/W renderer. Wrote L_ConvertToDB(), used to create linear->DB lookup tables. This also in the "common lib" (quotes because it doesn't really exist yet, it's a restructuring that has been planned for ages now, but Erik Sandberg didn't get the time). Attack it after the release... Made M_LoadDefaults() handle a missing EDGE.CFG file better -- it resets to recommended values. Added analogue resetting too. The problem with -warp seems to be that it was changed from G_DeferedInitNew() to G_InitNew(), which shouldn't be called so early on (in particular: before the renderer has initialised itself). Fixed it (I hope) by going back to G_DeferedInitNew, but passing an option to do the right thing w.r.t. net games. Also made it return false when it fails. 2001/02/08: Been looking at why -debugfile doesn't show enough info. On linux, I_Printf() calls I_WriteDebug(), but win32 doesn't do this. Removed I_WriteDebug() from the EPI, since all ports used the same code, and since `debugfile' itself is opened by the main code. Also renamed it to L_WriteDebug, because it is now in the common lib. There's a hack #define so we can gradually change the very many I_WriteDebug usages. I've also updated all the ports to (a) make sure I_Printf() stuff gets written to the debug file, (b) make all ports consistently show the "WARNING:" prefix for warnings. Wrote the I_SoundStopLooping() routine for Linux/SDL and BeOS/SDL, fixing the lowering platforms on MAP01. 2001/02/04: Fixed buglet with sprites in truebsp. Worked on reimplementing weapon sprite drawing for truebsp. Fixed a problem with the idbehold# cheats. Fixed a problem looking up a null string patch in f_finale.c. Weapon sprites are working again, but only by a hair's breadth. Needs tidying up badly. 2001/02/02: Fixed those GL sprite issues. Merged Dave Leatherdale's mouse fixes into linux/iv_sdl.c, and my additions into beos/bv_sdl.c. 2001/02/01: Reworking the sprite code for image system. OK, new sprite loading code is in place. It can handle 16 rotations (double the previous amount). It can also handle replacing single frames in PWADS. That ugly hack using -1 in a boolean_t has also been removed. OK, sprite code is working in software renderer, EXCEPT weapon sprites... Fixed another percent_t problem, this time with the JUMP() action. Updated GL code for the sprite changes. It runs, but some issues to sort out (like monsters' heads where their feet should be). 2001/01/31: After mucho headache, got DRI working on my potato system. I can now run EDGE accelerated on my Voodoo3 without the previous screen corruption, and hopefully without lock-up problems. Yay :-). Fixed floors/ceilings which scroll N/S. Fixed RTS tips, which got buggered after the percent_t change. 2001/01/29: Reworked SpawnMapThing() in p_setup.c to handle player starts that have no skills properly -- i.e. ignore the skill bits. Untested. Also cleared player `mo' fields before level load, should allow the missing player check to work. 2001/01/28: Began reworking the sprite/flat marker stuff in w_wad.c, to get flat animations going again. The new code will handle the lumps during the initial pass, storing a list of sprite/flat lumps in each datafile. OK, flat animations seem to be working fine again. 2001/01/27: Backwards compatibility: support the old TRANSLUCENCY and EXTRAFLOOR_TRANSLUCENCY ddf commands. Also converted percent_t type to floating point value (as Erik intended). Backwards compatibility: support DAMAGE_RANGE and DAMAGE_MULTI with results very similar to how it was before the new damage system. Everything that can be reasonably emulated, now is. Made the ddf label syntax (@XYZ) include the `@' in the label name. This means JUMP(@XYZ) instead of JUMP(XYZ). This should be more intuitive, if anyone ever uses this syntax that is. Removed the mipmapping code for posts from the image system -- not needed. Fixed gamma correction in GL code. We rely on the gamma function g() having this property: g(X * Y) = g(X) * g(Y). After updating X on my debian linux box to version 4.0.2, the old Voodoo3 GL no longer works :-((, and there is no DRI drivers either like I expected :-/. Bah ! 2001/01/26: Backwards compatibility: Bad semicolons (`;') in DDF no longer crash out with a fatal error, unless the -strict option is used. 2001/01/25: Added some temp hacks to fix status bar & view surround in GL. Even in GL, redrawing the status bar every frame is a large hit to the framerate (14 FPS down to 11 here). It may be down to all the texture changes, packing all the font chars & faces into single images _might_ help -- it would complicate the image system too much though. Something to try later on... 2001/01/24: More work on "tiled skies" for GL (do software mode later). Looking pretty sweet now, *finally* got all the texturing strangeness sorted out (seems the order of vertices affects the way textures are drawn -- odd). New file: rgl_sky.c, which contains the sky code out of rgl_main.c (and is surprisingly big). Bitten AGAIN by the startup sequence!! It's very obvious now, that level load should NOT occur before graphics are initialised. Everything must be initialised before any real work (like level load) is done, that's just common sense. I intend to clean this up soon. New tile-sky system is more-or-less in-place (only for GL ATM). It works by having dummy sectors with new line types (like how extrafloors work). The following LINES.DDF commands are available: TILESKY.TYPE=FLAT; // can be FLAT or TEXTURE. `FLAT' // will get the sky image from the front // sector's floor on the dummy line. // `TEXTURE' gets the image from the // dummy line itself, and textures with // transparent parts are allowed. TILESKY.LAYER=1; // there are 4 layers (1,2,3,4), starting // at the outermost and coming inwards. // For example, layer 2 is drawn over layer // 1. TILESKY.NUMBER=8; // number of times the image tiles. `1' // would stretch the image over the whole // top half of the sky. TILESKY.SQUISH=1.0; // these two control how the sky sphere TILESKY.OFFSET=-0.8; // is rendered. No need to bother with // these, the defaults are pretty good. Also the TRANSLUCENCY and SCROLL_* commands will affect the rendered skies as expected. Quake 3 eat your heart out :-). Note that these skies cannot be changed with "CHANGE_TEX SKY" in RTS, you need to use CHANGE_TEX on the sector floor or linedef. 2001/01/22: Implemented a different FUZZY effect for GL. It's quite nice. Experimented with a sky effect for GL, needs work. 2001/01/21: Got the GL renderer working with SDL (Linux). 2001/01/20: Added a fix for the multiple R2_Init() problem. It ain't very clean though, to reiterate what I've thought many times: the whole startup scheme needs an overhaul, making the startup dependencies much clearer and debuggable. My preference would be going into graphics mode at the earliest possible moment, and drawing our startup messages there rather than through I_Printf(). Fixed a "crazy chainsaw" problem. 2001/01/18: Made sure the Linux SDL port of EDGE works OK. This will be my main development platform from now on. Yep, it did. Hit upon a nasty bug though -- when EDGE crashes, the mouse cursor is frozen and cannot be moved, making it impossible to use GNOME, e.g. to shut it down. The bug is not in EDGE, nor in SDL by the looks of it, but either in the window manager (IceWM) or in the X server itself -- surely when XGrabPointer() is used and the grab window is closed then the grab state is nullified ? Arghhh. 2001/01/14: Been busy installing Debian/Linux 2.2 (potato). You forget just how many pieces of software you have configured or tweaked to make everything work nicely. Using various mesa & glide packages, I've finally been able to run EDGE accelerated on my 3dfx Voodoo 3 card under Linux :-). The damn thing screws up the X server though when it exits (not edge, the glide stuff), which is a real pain. Getting D.R.I. should fix this. Comparing the TNT2-64 with the Voodoo3 with QDOOM 0.90, I find the Voodoo3 looks nicer, but can't point my finger on exactly why, something about the magnification mode. It looks "realer". The TNT2 is also way darker, in the E2 levels I could barely see anything, but here on Voodoo they are OK. The DOOM lighting emulation currently does not take gamma properly into account, that's prolly part of it. GLEDGE is really shaping up as an engine worth something. 2001/01/08: R2_Init (and RGL_Init) in R_ExecuteChangeResolution they are meant to be once only initialisations, but they were being called multiple times. Fixed. Fixed a problem with GenerateBlockMap for the borderline case. 2001/01/06: Fixed problem with bright weapon sprites in GL. Fixed the `dynamic lighting' item in the video option menu, but the change only comes into effect at the next level load (like the `extras' option in the gameplay menu). Fixed the small sound/music volume bars not being synchronised. 2001/01/05: Added `SMOOTHING' to the video options menu. Only works for GL now, later on we should re-implement our bilinear column/span drawers. Implemented translucent mipmapping column/span drawers, fixing translucent water in the software renderer. Implemented R2_DrawImageBlock(). Made the FACE_TARGET action also set the monster's mlook angle (for what its worth). Added MO_MIDZ() convenience macro to the code. Implemented the following new thing actions: FACE(angle) // face the absolute TURN(angle) // turn by degrees TURN_RANDOM(angle) // turn between 0 and degrees MLOOK_FACE(angle) // mlook to the absolute MLOOK_TURN(angle) // mlook turn by degrees MOVE_FWD(amount) // move forwards/backwards by MOVE_RIGHT(amount) // move right/left by MOVE_UP(amount) // move up/down by STOP // stop moving The FACE and TURN actions were copied from MBF. For all these actions, if the or is omitted, then 0 is used (not usually useful). For the move actions, use a negative value to go the opposite way. NOTE: the amount in the move actions is a _momentum_ value, not a distance. Objects that are not affected by friction or gravity will keep moving in the direction until they hit something solid or perform another movement action (e.g. STOP). Reworked gib handling. There is now special states: STATES(GIB), which are entered when a thing is "gibbed", i.e. the dead corpse gets crushed by a door. Removed the `base_mip' stuff from W_IMAGE code. 2001/01/04: Made infrared goggles fade out in GL renderer, and fixed lighting equations in GL and software to be consistent. 2001/01/03: Removed ugly_mipmap stuff from w_image code. Worked on adding option menus for: Jumping, Crouching, Mipmapping, Shadows and Dynamic lighting. Some stuff in the video menu has been displaced for the time being (reverse telefx, reverse wipe, red/cyan 3D, stretch sky). Moved the "Set Resolution" menu up a level, from video menu to main option menu. Aha, in OpenGL, ReadPixels() can be used to read the depth buffer, and this can be used as an "object obscured" test for rendering halos (theoretically anyway). 2001/01/02: Started debugging the problem in Win32. If the debug file is accurate (and hasn't lost any lines -- a real possibility when a program crashes), then the I_SetScreenSize() routine succeeds but EDGE crashes on its `return true' line, which is WEIRD. Nope, can't find it, it still looks like the crash occurs when I_SetScreenSize() returns -- I get a debug message directly before the return, but no debug message directly after (in the calling function). I checked for stack corruption (the return address might get clobbered somehow), but that looked OK. The debug file checked out OK too. I'm completely stumped :-(. Added code to GL to approximate DOOM lighting. Looks gewwwd. Fixed the view window overlapping status bar thing. Fixed flat alignment in software renderer -- the "bug" was just the different memory layout of image_ts (column major). 2001/01/01: Removed `alpha' parameter from vctx.SolidLine routine -- there's no need for translucent line drawing right now (if ever). Updated text writing code (HU_LIB etc) to use colourmaps. Text in software & GL renderers should be the correct colours now. Time to update the TEXT_ entries in colmaps.ddf. Fixed all the (harmless) `Unknown font patch ...' messages. Removed the M_CELL1/2 stuff from m_menu.c -- no longer used. The font colours in GL looked bad (white turned out greenish !), so updated the colourmap reader to handle fonts specially. Hmmm, the Win32 software version isn't working :(, and I have no idea why. It starts up alright, loads everything, the screen turns black, and then bamm -- back to the dos box, without any message whatsoever. Created a test level & compared the range of lighting levels in the software and GL versions side-by-side. The difference is quite stark. Determined the following mapping table: doom light flat light [0,72] --> [0,8] [72,112] --> [8,48] [112,255] --> [48,255] 2000/12/31: Fixed the colour problem writing TGA files from GL renderer. Worked on dynamic lighting in the software renderer. Dynamic lighting is now working in software rendering, however the way floors and ceilings are drawn is not very good -- it needs a different approach I think. BTW, it's clear that long walls and large planes need more light sampling points (this goes for GL too). 2000/12/30: Tested the GL dynamic lighting. Vertex lighting is rather primitive (splitting large polys could help), but overall it's quite OK. Better than nothing :-). Fixed translucent stuff in GL. Found a problem in ReadPatchAsPost() in w_image.c: some patches are compressed ! i.e.: they only store one copy of a repeated column, and refer to it multiple times in the offset array. Hmmm... A worse possibility comes to mind: partial column sharing, i.e. column XXX points at the 2nd or 3rd post within column YYY. I strongly doubt this occurs in practise though. Anyway, rewrote the ReadPatchAsPost() routine. Working OK now. Added a fix (untested yet) for problems mlooking quickly up/down. 2000/12/29: Looked for flashing problem on the TNT2 card for quite a while, trying various things. I'm fairly sure it's down to a bug in the driver. Tried enabling GL_LIGHTING and using glMaterial(GL_EMISSION), and it works :-). It's still mind-boggling how bad these OpenGL drivers are though. Fixed gamma changing in the GL renderer. Worked on dynamic lighting in the GL renderer. 2000/12/28: More image work. Tried GLEDGE on a fast machine with a TNT2 card, there are main two issues: (a) solid sprites are slightly see-through, (b) everything is flashing, like lighting always changing. I've looked hard at the code, and can't see anything wrong. It's almost like OpenGL drivers for Win32 just don't work properly when GL_LIGHTING is disabled. 2000/12/27: Began removing all the `#ifdef USE_IMAGE' checks... Done. Moved line clipping code from am_map.c to r2_draw.c (vctx.SolidLine), and reworked the clipping code. Needs checking. Updating the column/span drawers, so that the coordinates are absolute on the screen instead of relative to the view window. This allows them to be used for drawing non-render stuff (backgrounds, menus, status bar, that kind of thing). This will remove a long-standing source of duplicated code (between r_draw1/2 and v_video1/2 files). Unfortunately this image work means I'm dismantling a lot of Erik's previous work (screen_t, viewbitmaps, etc). That sucks, but can't really be helped, as supporting GL means a whole new paradigm. Got vctx.DrawImage() partially working in the software renderer. Buggy as hell at the moment though. 2000/12/26: Worked on image system... Seems the old options menu code is still in m_menu.c, but is never used unless you press backspace from the sound menu. I've disabled it for now. Replaced all occurrances of V_DrawPatchName/InDirectName with the proper image system setup and calls to vctx.DrawImage(). Testing with GL... is working, more or less. Migrated the status bar code to the image system. It works now in GL, though still some way to go yet. Disk icon is done. Page-background in e_main.c is done. Rad_act.c is done. OK, wi_stuff.c is done. 2000/12/25: Ate, drank, and was merry. 2000/12/24: Started cleaning up font stuff (for image system), with a new H_font_t type. The number of text writing routines in the code is ridiculous, apart from hu_lib.c there is: f_finale.c, gui_ctrls.c, m_menu.c AND m_misc.c, all basically doing the same thing. Needs cleaning up... Moved some text routines (M_CharWidth thru to M_WriteTextTrans, six in all) from m_menu.c to hu_lib.c. 2000/12/23: Worked on converting GL code to image system. Moved 1D occlusion buffer stuff from rgl_tex.c (which will soon be removed) to rgl_unit.c. 2000/12/22: Updated mipmapping on ceilings/floors. Not really as good as before, but it's faster. The wall/floor mipmap selection needs improving: base it on the real wall/floor rather than the pixelised version. Updated colours & positions of the fixed tip slots. Added RTS command "CHANGE_MUSIC". It takes a number, which refers to an entry in playlist.ddf, and changes the current music. It is a companion to the already existing lines.ddf MUSIC command. 2000/12/21: Did some image system work. Mipmapping on walls is now done on a whole-wall basis (rather than a per-column basis). There is some "mip flashing" though (jumping back and forth over a small distance), not sure yet how to fix it. 2000/12/20: Finished the spawnpoint_t work, including moving P_SpawnMapThing from p_mobj.c into p_setup.c. Made the "death look" code mlook at attacker. 2000/12/19: Worked on replacing mapthing_t (used e.g. for item respawning) with a new structure spawnpoint_t, since mapthing_t is the in-wad format and is too limiting. 2000/12/18: New player paradigm: (a) Bring back MAXPLAYERS define, and make the limit 32. That's a pretty reasonable limit IMO, and having a limit simplifies the code a lot. It can always be increased later if needed. (b) playerlookup[] is fixed to be MAXPLAYERS in size. Pointers can be NULL in playerlookup[], that will be equivalent to having in_game == false. For non-NULL entries, we require one-to-one with the player number, i.e: playerlookup[num]->pnum == num. (c) Keep the `players' linked list, but it now contains only the IN-GAME players. Order is by increasing `pnum'. OK, reworked player code to handle this paradigm, which is fairly close to what was there before. Made some preliminary code (read: mega-hack city) for the VIEW chunk in savegame files. It's gonna be cool. Integrating it nicely into the image system will be a challenge though. 2000/12/17: Began updating the 1.25 CHANGELOG file. There really has been a lot of changes, even just in the last three months. Wrote a test routine for the saving primitives, and thereby found and fixed a serious problem with floating point values. Savegame work... 2000/12/16: Increase avail_weapons[] size to 10 in player_t. The status bar can only show 2..7 now, but perhaps more later on (with some DDF). OK -- reworking of weapon code is almost done. The player->weapons array is no longer the same size as the number of DDF weapons, it is fixed at MAXWEAPONS (32) and in-line in the player_t structure. Had to rework all the key_choices stuff too (bleh). Added DEBUG_DDF, DEBUG_RTS and DEBUG_NET defines which control debugging output for DDF, RTS and NET stuff. Default is OFF. Removed `p_saveg' and `r2_poly' from the makefiles. The p_inter.h file is now empty and can also be removed. 2000/12/15: :( Really not digging the player code at the moment, in particular the playerlookup[] array and the `players' linked list. My feeling is that one of these is redundant, e.g. the linked list aspect. There are issues with the savegame code, so this needs to be sorted out. Made the `ammo' field in player_t be in-line in the structure, rather than a pointer to external memory. Simplifies stuff without losing anything. Another big snag: the way player weapons are done is an issue for savegames, as the size of "player->weapons" array depends on what weapons are defined in DDF, and this can easily change. I think I'll limit the number of holdable weapons to some value, like 32, perhaps in-line them into player_t (like with ammo) for simplicity. 2000/12/14: Savegame work. Split loading/saving stuff into two new files: sv_load.c and sv_save.c. Hit a snag: the dummy target is not in the MOBJ list, but can be referred to by mobjs (esp. the player). Big potential for breakage here... 2000/12/13: Savegame work. The load/save menus now show some info from the highlighted savegame (the map, skill, and the timestamp), and are shifted to the left to make room for an image. 2000/12/12: Worked on finishing the GLBSP plugin for EDGE. 2000/12/11: Discovered (the hard way) that attacks NEED the attackrange=XXX command in the DDF for player autoaiming to work. Jeez. Actually that's quite a trap for DDF authors, so I've added a workaround. 2000/12/10: Another "UGH", HU_Start (and ST_Start) is called in p_mobj, yet HU_Erase (which crashes unless HU_Start has been called) is called in E_Display when gamestate == GS_LEVEL. Fuck me, the code is such a tangle of weird interdepencies like this :-(. Worked on drawing some GLBSP progress bars in EDGE. Looks nice :). 2000/12/09: Removed the RTS "SAVE" primitive (very non-useful, even dangerous), and implemented the "PLAYSOUND_BOSSMAN" primitive, which plays the sound at full volume everywhere (like the BOSSMAN thing special). Reworked the GenerateBlockMap code, due to a level (and a biggie at that) which caused the old code to crash. For the time being, I've made EDGE always generate the block map -- to really test it out. Oops -- the last fix for RTS crashes actually disabled radius triggers altogether. Took a while to find too, argh ! Reworked tip stuff (for THE last time :). There is now TIP_SET_ALIGN and TIP_SET_TRANS. The latter takes translucency value, and optionally a time value for fading, and replaces TIP_FADE. Oops II -- invulnerability whiteness recently broke. Fixed. Fixed the bug not executing the first action in a DDF thing. 2000/12/08: More savegame work. It can now write the [GLOB] info, and read it back in the menu code showing the right description. BTW, the LZO compression is working alright. Sweet. Too early yet to tell what the savings will be. 2000/12/07: Savegame stuff... 2000/12/06: Added a `ticker' function to the glBSP API (nodebuildfuncs_t). Added checks for the `cancelled' field of nodebuildcomms_t. Savegame work. Hmmm, player handling looks a bit strange, esp. the mixture of linked list and playerlookup[] stuff throughout the code. 2000/12/05: Reinstated the BOOMTEX extrafloor tag, to support BOOM-style water (linetype 242). The code swaps floor textures around to be compatible with Boom's texturing model (which is different than EDGE's liquid floors) -- won't work in all cases, but should work most of the time. Fixed some crash-causing bugs in RTS parser. Savegame work. 2000/12/04: Bit more work on savegame code. Well, one good thing has already come from the new image system: no more Medusa ! 2000/12/03: Began work on new savegame system (you know, the one I've been saying I'll implement since the start of this year :-). 2000/11/30: Worked on getting the GLBSP plug-in working. Spent way too much time trying to get the linker tools to actually remove all the symbols except ones I want to keep. No ! It couldn't even do this simple thing. Fixed a problem with W_AddDynamicGWA(), the lumplookup[] array (for lump caching) was not being enlarged like it should. With that, the GLBSP plug-in is working :). What it needs now is something to show the user, so they don't think EDGE has crashed. Drawing some progress bars like in Andy's glBSP GUI would be ideal. 2000/11/29: Added mid-masked wall drawing code for image system. 2000/11/28: Yes ! Got the win32/GUI version of glBSP (glbspX) working, and it looks very sweet. 2000/11/27: glBSP now compiles again (only the command-line version), but there are still many issues to sort out. OK -- command line glBSP is mostly working again. Updated win32 filenames (removing the "i_" prefixes), and the copyrights on the source headers to the rightful person (Andy Baker). 2000/11/26: More GLBSP work. The new architecture has been sorted out: the "glbsp.h" file is the interface to the main code, used by the clients (cmdline version, GUI versions & by EDGE). The `wart' (a prefix to identifiers to keep the namespace clean) here is "Glbsp". The system.h file is now mainly just a bridge to use the callback functions passed to GlbspBuildNodes(). 2000/11/25: Did a bit of work on GLBSP reorganisation. 2000/11/24: Added one last bit of tip stuff: TIP_FADE