[WDJ]	wesleyjohnson

START: 11/1/2009

*** w1_softerror
patchfile= w1_softerror.patch
- committed revision 544   by smite-meister
Adds a I_SoftError function, as an alternative to I_Error function
Softerror function prints message once, ignores messages already
printed, and returns to caller.
Changes some I_Error calls to I_SoftError

*** w2_doordelay
patchfile= w2_doordelay.patch
- committed revision 546    by smite-meister
Adds a Doordelay control variable and menu item
Alters the time that a door stays open.  Allows players to
succeed in overly difficult wads without resorting to noclip.

*** w3_gamma
patchfile= w3_gamma.patch
- merged with w25_gamma
Adds another, darker, gamma table.
See newer gamma generator.

*** w4_zalloc
patchfile= zalloc.patch,  zalloc_v2.patch
- merged with w22_zone
Two critical errors fixed in the Z_Malloc code.
See newer z_zone.c file, with more capability.

*** w5_heretic
patchfile= w5_heretic.patch
- committed revision 548   by smite-meister
Fixes bug that used up an inventory item with saving the game.
Fixes bug that crashed program when player time > 15 min.  (no sucks message)

*** w6_time_wrap
patchfile= w6_time_wrap.patch
- committed revision 549   by smite-meister
Fixes bug when time wrapped and program hung.

*** w7_flat
patchfile= w7_flat.patch
- committed revision 564   by smite-meister
Removes old change had flats searching the entire file, ignoring
F_START and F_END.  This failed for at least one wad, that had the same name
on a sprite.  Changed to honor F_START and F_END, and only when that fails,
then search entire file (so that gothic2.wad also works).

*** w8_voodoo
patchfile= w8_voodoo.patch
- committed revision 563    by smite-meister
Create voodoo dolls for extra player1 start positions.
This is necessary for many wads, which use the voodoo dolls for timers
and action activators.

*** w9_demo
patchfile= w9_demo.patch
- committed revision 562    by smite-meister
Demo code is commented and all demo versions that cannot be played are
properly handled such as to prevent crashing the program.

*** w9.1_misc
patchfile= w91_misc.patch
- merged with w23_comment
Comments

*** w9.5_opt_debug
patchfile= w95_opt_debug.patch
- for debugging purposes, do not commit

*** w9.6_oldwater
patchfile= w96_oldwater.patch
- HOLDING
- patches to oldwater
- some comments as to parameter that oldwater needed
- OLDWATER should be removed

*** w9.7_sound
patchfile= w97_sound.patch
- todo
Patches sdl/i_sound to work.
 

*** w10_specials
patchfile= w10_specials.patch
- committed revision 552   by wesleyjohnson, 
Fix, clean and comment, Legacy special linedefs.
Fixes linedef type specials, for Boom and Legacy
Adds comments for linedef type specials.
Fixes comments in some other associated files.

*** w11_status
patchfile= w10_status.patch
- committed revision 553     by wesleyjohnson
Fix bug where life and ammo status would have bad background after
a save game.  R_FillBackScreen called by G_DoSaveGame, which then did not
refresh status display, because of unsatisfied global tests.

*** w12_drawpatch
patchfile= w12_drawpatch.patch
- committed revision 554, 555,  by wesleyjohnson
Simplify the combination of DrawPatch and GetLump using PU_CACHE, by
creating a function that does both.  This brings most of the casual usage
of PU_CACHE into 3 DrawPatch functions.  This is in preparation for fixing
usage of PU_CACHE throughout the whole program.

*** w13_alloc_cache
patchfile= w13_alloc_cache.patch
- merged with w22_zone
- Careful analysis of the PU_CACHE usage and fixing any usage where it
crosses another call of Z_Malloc.
- Adds additional PU_IN_USE, PU_LUMP, PU_CACHE_DEFAULT, to help prevent
memory allocated from be deallocated while in use.

*** docs
patchfile= w15_docs.patch
- committed revison 565   by wesleyjohnson
- Update docs for release, and special linedefs
- Fixes docs for release 1.44
- Fixes editspec and associated docs to correctly describe the Legacy
special linedefs.

*** makefile
patchfile= w15_makefile.patch
- committed revision 566   by wesleyjohnson
Fix makefile to work with older make, that does not understand some new
make syntax.
Clear up use of LINUX, FREEBSD, keep consistent with docs,
make new usage explicit.
Add debug, optimization controls.

*** gets
patchfile= w15_gets.patch
- committed revision 567    by wesleyjohnson
Fix t_func.c to not use the function gets(), which is so bad the
compiler will warn of any use of it (it overruns the buffer).
Replaced it with fgets().

*** w16_segabor
patchfile= w16_segabor.patch
- committed revision 571   by wesley johnson
Brings over the segabor patches from Legacy 143beta_macosx.
Fixes the SHORT bug, which overused the SHORT and LONG macros to do endian swaps.

*** w17_rdraw
patchfile= w17_rdraw.patch
- committed revision 572   by wesley johnson
Rename of some rdraw variables to add the prefix rdraw_ to give them more unique names,
because they were named identical to some other variables in structs.  This makes it
much easier to grep or search for all uses, and to realize exactly which variable was
being used.

*** w18_SM
patchfile= w18_SM.patch
- committed revision 573   by wesley johnson
Make use of ENUM values for legacy flat modes, instead of int literals.

*** w19_plane_limit
patchfile= w19_plane_limit.patch
- committed revision 574   by wesley johnson
Correct R_MakeSpans to not overwrite startspan[] and to not corrupt yslope[] and
other static memory.  Limits the spans to valid ranges.
This bug was repeatably triggered by the big room in 3DHorror.wad.


*** w20
patchfile= w20_thing_status.patch
- committed revision 575    by wesley johnson
Add limit checks to thing drawing code that handles things split by
a Legacy 3D floor.  Cures bug that such things overdraw the
status bar.

*** w21
patchfile= w21_dc_source.patch
- committed revision 576    by wesley johnson
Cleanup of code in rdraw8, extraneous stmts, add comments,
fix some indentation.
Change some temps to use stdint types.

*** w22_zone
patchfile= w22_zone_alloc_patch
- committed revision 577    by wesley johnson
Reissue of w13_alloc_cache patch, with matching z_zone file.
Careful analysis of the PU_CACHE usage and fixing any usage where it
crosses another call of Z_Malloc.
Adds additional PU_IN_USE, PU_LUMP, PU_CACHE_DEFAULT, to help prevent
memory allocated from be deallocated while in use.

*** w23_comment
patchfile= w23_comment.patch
- committed revision 578    by wesley johnson
Fix indentation to match surrounding, spelling.
Add comments to record.
Add {} on FOR and IF with multiple lines, to clarify reading.

*** w24_init_warnings
patchfile = w24_init_warnings.patch
- committed revision 579    by wesley johnson
Fix stmts that give compiler warnings about variable be used uninit.
Large amount of re-indentation and added {} in p_spec.c.

*** w25_gamma
patchfile = w25_gamma.patch
- committed revision 580    by wesley johnson
Replaces w3_gamma.  Compile option with multiple gamma table generators.
Adds control to select gamma table generator.
Removes old gamma tables.
Adds Effects menu, because video menu too crowded with added gamma
controls.

*** w26
Remove  screen.c.rej
patchfile = w26.patch
- committed revision 584   by wesley johnson
Misc patches to remove compiler warnings, and cleanup interfaces.
No net effects on execution.

*** w27
patchfile = w27.patch
- committed revision 585   by wesley johnson
Fix legacy.dat wadversion test to accept version 142 wad.
Misc patches to remove compiler warnings.

*** w28_setup
patchfile = w28_setup.patch
- committed revision 586   by wesley johnson
Fix bug introduced in w24, where save game writes bad save files.
Caused by init of sectors to NULL, and is unexplainable.

*** w29_sound
patchfile = w29_sound.patch
- committed revision 587  by wesley johnson
Fix (again) the heretic sound, where names are different than Doom.
Fix (again) some sound code for SDL.

*** w30_wad_swap
patchfile = w30_wad_swap.patch
- committed revision 588  by wesley johnson
First part of extensive changes for problem of endian conversion of
patches as they are displayed.  Creates the support SWAP macros and
the wad functions for using them.

*** w31a_swap_patch
patchfile = w31a_swap_patch.patch
- committed revision 589  by wesley johnson
Second part of changes for endian conversion.
Uses new macro names where needed in network code.
Removes endian code from draw patch code.
Creates new draw patch functions to simplify the usual _NUM and _NAME calls.
Extensive checking and comments on all endian swaps, fixed several places where
endian swaps were applied where they should not.

*** w31b_swap_patch
patchfile = w31b_swap_patch.patch
- committed revision 590   by wesley johnson
Third part of changed for endian conversion.
Covers hardware and other subdirectories that were missed in part 2.

*** w32_round
patchfile = w32_p3.patch
- committed revision 591   by wesley johnson
Gives alternative for round and roundf in video.  They are not standard library
and are C99 only.

*** w33_b_node
patchfile = w33_b_node2.patch
- committed revision 592   by wesley johnson
Adds a test for indexes out-of-bounds before accessing the b_node array.
This stops legacy from having a segfault for some wads with minor flaws,
like using a Boom linedef 244 instead of 242.
Also fixes some indenting and add some brackets to make readable.

*** w34_zone
patchfile = w34_zone.patch
- committed revision 593   by wesley johnson
Fix possible failing of Z_FreeTags when it combines free blocks.
Change size_t to uintptr_t, per stdint.h.
Mark free blocks with id.
Remove id and tag as PU_INVALID, blocks that are destroyed.
Create PU_PRIV_CACHE level, which does not get purged until 2nd pass of
trying to allocate in Z_Malloc.  These can be used for those cached
blocks that require considerable processing to create, like multi-patch
textures.

*** w35_texture_generate
patchfile = w35_texture_generate.patch
- committed revision 594   by wesley johnson
Fix segfault in phobiata.wad.  It has a texture of one patch, but that
patch is smaller than the texture.  The draw routine segfaults upon
trying to access texture columns that are not in the patch.
The new function will create in the patch cache a new patch of the dimensions
of the texture, using the patch columns.  All columns will exist.
Wad structures in the headers are changed to use stdint types, so they are
not dependent upon machine word size.
Comments are added to document discovered information.
Some names are changed to better reflect their intended usage, and
reduce confusion with the same name in different usage.

*** w36_draw_clip
patchfile = w36_draw_clip.patch
- committed revision 595   by wesley johnson
Fix segfaults due to low level draw using bad ylookup[].
The video column lookup table, ylookup[], is only as wide as the view window.
The low level draw routines RANGECHECK now checks against the view window
instead of vid.width and vid.height.
All callers of the low level draw routines now check their parameters
against the view window boundaries before calling.
Added some tests to intercept bad sprite ptrs caused by wads without all
the sprites present.
Comments are added to document discovered information.
Some names are changed to better reflect their intended usage, and
reduce confusion with the same name in different usage.

*** w36b_draw_clip
patchfile = w36b_draw_clip.patch
- committed revision 599   by wesley johnson
Move some {} and put \n on some I_SoftError.

*** w37_multi_patch_texture
patchfile = w37_multi_patch.patch
- committed revision 600   by wesley johnson
Added capability to combine patches (from a multi-patch texture) into
one patch, that has transparent regions.  This is needed for phobiata.wad
and makes a great difference in the appearance.  The gates and fences
can now be seen through.
Added texture_model field to texture to replace using test on
numpatches to determine drawing routine.

*** w37_things_print
patchfile = w37_things_print.patch
- committed revision 601   by wesley johnson
I_SoftError messages in things.c were missing a \n.

*** w38_enemy
patchfile = w38_enemy.patch
- committed revision 602   by wesley johnson
Fixed some test logic to include testing for valid ptr to target before
using the ptr.  This stops segfaults that happen in heavy fighting.

*** w37_compiler_msg
patchfile = w37_compiler_msg.patch
- committed revision 603   by wesley johnson
Fixed switch stmts to not give compiler message.  This was done before
in w37 but got lost before commit.

*** w39_overflow
patchfile = w39_overflow.patch
- committed revision 607   by wesley johnson
Stops overflow in sofware rendering from drawing large bars on screen.
Cleans up display of phobiata.wad map07.

*** w39b_overflow
patchfile = w39b_overflow.patch
- committed revision 611  by wesley johnson
Intercept top < bottom errors in software rendering so they do not interact with
overflow trap.

*** w40_makefile
patchfile = w40_makefile_v3.patch
- committed revision 612   by wesley johnson
Restore user and debug controls in makefile.
Support edit of makefile to select system media, debug, optimization.
Dependency files generated from makefile.
Remove makedep.mak which was not being maintained.

*** w40_makefile_v4
patchfile = w40_makefile_v4b.patch
- committed revision 614   by wesley johnson
Some dependencies not covered by previous patch.
Disable of automatic dependency generation was needed, user can choose.
DEBUG var set from command line is not modifiable in makefile.
- clashed with changes by smite

*** svn612_reaction
patchfile = svn612_reaction.patch
- committed revision 615   by wesley johnson
Some adjustments to large compiler-error removal patches.
Some compilers put comments after macros into the macro expansion, with dramatic failure.
Adjusted and commented realloc of drawsegs, with alternative code.

*** w40_makefile_v4d
patchfile = w40_makefile_v4b.patch
- committed revision 617   by wesley johnson
Make debugging easier by including video change.
Re-Re-adjusted CFLAGS.

*** w40_misc
patchfile = w40_misc.patch
- committed revision 618   by wesley johnson
Misc. cosmetic and alignment.
Preparation for savegame improvements.

*** w40_tarray
patchfile = w40_tarray.patch
- committed revision 619   by wesley johnson
Inconsistencies in t_array allocation.
Gave it some protection until issue is finally determined.
Some cosmetic improvements too.
Preparation for savegame improvements.

*** w40_GDESC
patchfile = w40_GDESC.patch
- committed revision 620   by wesley johnson
Preparation for savegame improvements.
Made a table of most game strings and settings.
Table is now searched.
Added command line forcing switches to force a mode selection
without having to rename files.
Added wad_selection.txt documentation.
Removed game name string allocation that was lost memory.

*** w40_savegame
patchfile = w40_savegame.patch
- committed revision 621   by wesley johnson
The big savegame change.
Added headers to savegame.
Savegame sync bytes are written and checked.
Provision for optional savegame sections.
Checks to not load savegames of different word length or endianess.
Checks that wad and game are same as when saved.
Made saving of raw structures more robust.  Easier for
programmer to support and helps avoid making silent errors in savegame.

*** w41_draw_clip
patchfile = w41_draw_clip.patch
- committed revision 622   by wesley johnson
Revisit of w36_draw_clip.
Severe display artifacts observed on flats in Twilight.wad, but not in
other wads, which are fixed by this patch.
Remove a test on dc_x as it was skipping needed loop end operations.
Limit range of dc_x earlier, as calls to SegLoop can have x1..x2 range
exceed the screen.

*** w41_dehacked
patchfile = w41_draw_clip.patch
- committed revision 623   by wesley johnson
Dehacked file pl2.deh (plutonia2) segfaults due to writing string over const.
String replacement changed to use Z_Strdup, and old string is abandoned,
as it could be a const.  There is no good test to recover allocated
strings, but dehacked does not encounter many of those, and executes only
once at load time.

*** w41_draw_clip_b
patchfile = w41_draw_clip_b.patch
- committed revision 624   by wesley johnson
Phobiata.wad had a bright line on right edge of screen.
Test to limit rw_stopx changed from rdraw_viewwidth-1 to rdraw_viewwidth
because the loop range of dc_x is rw_x .. rw_stopx-1.

*** w41_sound
patchfile = w41_sound.patch
- committed revision 625   by wesley johnson
Adds conditional code that makes sound work for systems with old SDL
versions.   When detecting an old version of the SDL mixer include file,
code is inserted to write the midi file to a tmp file and load it
the old way.

*** w41_makefile
patchfile = w41_makefile.patch
- committed revision 626   by wesley johnson
Fixes dependencies so that they are recognized by MAKE.
This fix may only work on Linux.

*** w41_main
patchfile = w41_main.patch
- committed revision 627   by wesley johnson
Makes the legacy home directory available to the savegame code.
Simplifies some of the directory string copies.
Preparation for savegame directories and files.
Removes some old code.

*** w41_savegame_time
patchfile = w41_savegame_time.patch
- committed revision 628   by wesley johnson
Adds the level time to the savegame header.
Fixes error messages.
Handles a NULL mobj pointer, instead of I_Error on it.

*** w41_savegame_dir
patchfile = w41_savegame_dir.patch
- committed revision 629   by wesley johnson
First cut at improving savegame menu system.
These are a work in progress, and are not finished.
Controled by defines  SAVEGAME99, SAVEGAMEDIR, as set in doomdef.h.
Adds ability to have 99 savegames.  Still cannot see more than 6.
Not all controls are finished.
Adds ability to have savegame directories.
This code works and is playable, but network game save will change in
future revision.

*** w42_message
patchfile = w42_message.patch
- committed revision 630   by wesley johnson
Simple message function.

*** w42_savegame
patchfile = w41_savegame_dir.patch
- committed revision 631   by wesley johnson
Cleaned up savegame menus.
Made legacy home string separately available.
Added directory and savegame delete.
Added directory and savegame scrolling.
Except for system dependent directory scanning, this finishes
the savegame revision.

*** w43_modelsector
patchfile = w43_modelsector.patch
- committed revision 632   by wesley johnson
Clean up use of sector models for Boom deep water and Legacy water.
This changes uses of sector->heightsec to be a model sector reference,
and changes most tests against it to be against sector->model.
This excludes special colormap sectors from being treated as water
sectors and properly ignores their floor and ceiling levels.
Enforce protection against model sector=-1 at the time sector model is set,
thus removing many unnecessary tests and making code intent clear.
Change some repetitive array accesses to use ptrs, reducing code size.

*** w44_byteswap
patchfile = w44_patchfile.patch
- committed revision 633   by wesley johnson
Finishes change from LE_SHORT, LE_LONG, to LE_SWAP16 and LE_SWAP32.
Fixes midi file big-endian uses to use BE_SHORT and BE_LONG.

*** w44_quicksave
patchfile = w44_quicksave.patch
- committed revision 634   by wesley johnson
Fix quicksave getting clobbered by save or load.
Fix quicksave to be able to change save file.
Fix quickload to correct message

*** w45_naming
patchfile = w45_naming.patch
- committed revision 637   by wesley johnson
Change some immature language to something more useful.
FIXED_TO_FLOAT_MULT
FIXED_TO_FLOAT( x )  : changed to use FIXED_TO_FLOAT_MULT
  changed divide to multiply, got smaller code
Comments, and other edits that do not change code generated.

*** w46_hardware1
patchfile = w46_hardware1.patch
- committed revision 638   by wesley johnson
Changes to the hardware renderer to fix some problems, and to clean it
up so other fixes are easier.

SPRITE_LIGHTLEVEL : convert sprite drawing to use same lightlevel
calculations that software renderer has been using.

TERM_TRANSFORM : generates precalculated combined transform terms that
reduces transforms per vertex to only 5 multiplies and 5 adds for
sprites, and 8 multiples and 8 adds for world.

DOOR_CLOSED_FIX : code from software renderer for closed doors. Not
enabled yet, needs checking.

Reduced lightlevel K-factor in LUT table from 2 to 1.2 to better match the
software renderer brightness.

Tests that rejects empty lines for trigger copied from software
renderer, as it has more conditions that seem important.

Code from r_bsp that determines the light levels of ceiling and floor,
taking into account multiple floors.

Code from r_things that fixes the problem with sprites being lighted
from the sector only.  It takes into account the 3D floors.

*** w47_main_GDESC
patchfile = w45_main_GDESC.patch
- committed revision 639   by wesley johnson
Tests of strife shareware were not recognized and caused segfault.
Finished Strife and Strife shareware additions.
Added needed lump recognition.
Added strife mode, (not implemented).
Fix change to -game switch so that unrecognized names cause error.
Other cosmetic and organizational adjustments and removed some old
comments and code.

*** w47_wad_selection
patchfile = w45_wad_selection.patch
- committed revision 640   by wesley johnson
User documentation changed to reflect strife and -game switch changes.

*** w44_quicksave
patchfile = w44_quicksave.patch
- committed revision 641   by wesley johnson
Commit quicksave again, quicksave changes are missing.
Fix quicksave getting clobbered by save or load.
Fix quicksave to be able to change save file.
Fix quickload to correct message

*** w47_naming2
patchfile = w47_naming2.patch
- committed revision 642   by wesley johnson
Another FIXED_TO_FLOAT, and some commentary.

*** w48_wad_structure
patchfile = w48_wadstruct.patch
- committed revision 643   by wesley johnson
Change structures used to access wad to use uint16_t and uint32_t.

*** w48_realloc
patchfile = w48_realloc1.patch
- committed revision 644   by wesley johnson
Check for failure on calls to realloc.  Moved expansion of realloc structures
to subroutines.  Gets them out of the code that is executed frequently
so they do not occupy space in the processor cache.

*** w48_struct_comments
patchfile = w48_comments1.patch
- committed revision 645   by wesley johnson
Comments added to main structures, as aid to debugging their use.

*** w49_animation_interpic
patchfile = w49_animinterpic.patch
- committed revision 646   by wesley johnson
Two animation structures had the same name.
Renaming of structures and some variables, to make reading and search
easier.
Comments added.

*** w49_animation_textures_and_flats
patchfile = w49_animtex.patch
- committed revision 647   by wesley johnson
Two animation structures had the same name.
Renaming of structures and some variables, to make reading and search
easier.
Comments added.
Eliminated storing -1 value in boolean field.
Eliminated extra entry needed for -1 terminator to list.
Changed test condition on one loop to instead test a count derived from
the other existing end-of-list indicator.

*** w49_medikit_message
patchfile = w49_medikit.patch
- committed revision 648   by wesley johnson
Fix from DoomWiki (wrong) and prboom (right) to known Doom bug.
When health < 25 and pickup a medikit, gives an special message.
Message did not appear because medikit gave +25 health before the
test was done.  Changed to test for 50 health after adding +25.

*** w49_ouch_face_on_damage
patchfile = w49_ouchface.patch
- committed revision 649   by wesley johnson
Fix from DoomWiki (and prboom) to known Doom bug.
When damage > 20, was supposed to give the ouch face.
The test subtraction was reversed, testing a negative damage.

*** w49_fraggle_proto
patchfile = w49_fraggle.patch
- committed revision 650   by wesley johnson
Functions in fragglescript files did not have prototypes, changed to (void).
Changed misuse of name floor (a library function) to mfloor.

*** w49_floor_rename
patchfile = w49_floor.patch
- committed revision 651   by wesley johnson
Rename usages of floor name (a library function) to mfloor.
Overloading of floor library function causes confusion with editors, and
potentional compile errors where the original library function gets used.
The bin size was reduced by about 1K.

*** w49_sector_rename
patchfile = w49_sectors.patch
- committed revision 652   by wesley johnson
Clarify usage of sector numbers in structures and code, and the list of
lines.  Use more unique names.
Rename sector lines[] to linelist[], and added comments.
Fix another use of floor name.

*** w50_planelight
patchfile = w50_planelight.patch
- committed revision 653   by wesley johnson
Split the R_GetPlaneLight function into two, to avoid the repeated
passing of a FALSE parameter.
Eliminated clutter of viewz test in parameter that is now done in function.
Reduced program size and faster execution.

*** w50_bsp_viewer_common
patchfile = w50_bspviewer.patch
- committed revision 654   by wesley johnson
Removes common determinations on the viewer model sector to a Setup
function.
The viewer variables are used by R_FakeFlat and R_RenderSprite.
This code is much easier to read and understand, and is smaller.
Makes model floor and ceiling transitions more consistent.
Old code is retained for comparison until such time as correctness is clear.

*** w50_friction
patchfile = w50_friction.patch
- committed revision 655   by wesley johnson
Investigating why prboom has different friction in mud than Legacy.
That may be due to control device issues and momentum.
Added some improvements from ZDoom and prboom, for heretic and hexen.
Comments and cleaned up some.

*** w50_blaze_door_sound
patchfile = w50_blaze_door_sound.patch
- committed revision 656   by wesley johnson
Fix from WikiDoom to known Doom bug.
When blaze door hits someone and goes back up, it plays the wrong sound.
Added test for blaze door to play appropriate sound.

***
- committed revision 657   by wesley johnson
WDJlog.txt  update

*** w51_hardware_world
patchfile = w51_hardware_world.patch
- committed revision 658   by wesley johnson
Hardware renderer use of world names fixed same as software renderer.
Some other name changes to more descriptive.

*** w51_textures
patchfile = w51_textures.patch
- committed revision 659   by wesley johnson
Commented code as to the conflict between texture[0] and 0=no-texture.
Added a fix for the conflict that allows the first texture to be displayed.
Some changes to names and array accesses.

*** w52_no_texture
patchfile = w52_no_texture.patch
- committed revision 660   by wesley johnson
Check for no texture, and prevent segfault.
Catches error when 3Dslab does not have side texture.

*** w52_attack_self
patchfile = w52_attack_self.patch
- committed revision 661  by wesley johnson
Documents a fix for a monster attacking itself.
See WikiDoom bugs.

*** w52_2player_segfault
patchfile = w52_2player_segfault.patch
- committed revision 662   by wesley johnson
Documents a bug that is not fixed.
When 2 players, with 2nd player not active, the second player will segfault
at the marked location, when the 1st player enters the lift on MAP01.
This would be the first act making a sound that the other player could hear.

*** w52_moving_sector
patchfile = w52_moving_sector.patch
- committed revision 663   by wesley johnson
Found too many uses of variable "move" in code, so renamed and commented
some of them.

*** w52_model_sector_colormap
patchfile = w52_model_sector_colormap.patch
- committed revision 664   by wesley johnson
Cleanup colormap setup in p_spec.c, and commented the special linedefs.
Rename the color mapping control sector as model_sector.

*** w52_colormap
patchfile = w52_colormap.patch
- committed revision 665   by wesley johnson
Extensive visit of all the colormap code.
Comment uses of colormaps.
Cleanup colormap setup in p_setup.c, and commented special linedefs,
and removed incomplete hardware renderer code for colormap generation.
Have hardware renderer use the same colormap generator function as the
software renderer, and same linedef setup.
Cleanup the colormap generator, comment, and have it calc hardware
renderer fields too.

*** w52_skintable_translations
patchfile = w52_skintable.patch
- committed revision 666   by wesley johnson
Too many uses of the term trans, confusing translucent and skin
translation.
The skin tables are renamed from translationtables to skintranstables,
and dc_translation becomes dc_skintran.
Define SKIN_TO_SKINMAP, MT_TO_SKINMAP, to bring indexing calculations
to one common place.
Create skin table lookup, which prepares code to have skin tables read
from files.
Rename the standard colormap tables as reg_colormaps, to differentiate
them from all the other things named colormap.

*** w52_lighttable
patchfile = w52_lighttable.patch
- committed revision 667   by wesley johnson
Use LIGHTTABLE on colormaps, hiding table indexing calculations.
Renamed the fakefloor lightlist_t to ff_lightlist_t to differentiate it
from the other r_lightlist_t.
Renamed some list uses to ff_list, to differentiate them from other lists.
Fixed expand_lightlist, gave it an error message on failure.

*** w52_translucent
patchfile = w52_translucent.patch
- committed revision 668   by wesley johnson
Spell out translucent, so can differentiate it from other trans operations.
Rename trans enum values to be readable.
Use translucenttable[xxx] syntax, instad of *(translucenttable + xxx).
Make table for translucent selection to GL conversion.

*** w52_draw_masked
patchfile = w52_draw_masked.patch
- committed revision 669   by wesley johnson
The R_RenderMasked routines have some global parameters.  Rename them
with dm_ so they can be easily identified.
Simplify some colormap code segments where there were redundant tests.

*** w52_fog_sheet
patchfile = w52_fog_sheet.patch
- committed revision 670   by wesley johnson
Fixes fog sheet bug, where fog sheet would not display in software renderer.
Adds code to clip the fog sheet properly.

*** w52_fog_floor_colormap
patchfile = w52_fog_floor_colormap.patch
- committed revision 671   by wesley johnson
Provided alternative code where FF_FOG test for setting colormap was
unusual compared to other places in the code.  Not sure which is
correct.

*** w52_hw_colormap
patchfile = w52_hw_colormap.patch
- committed revision 672   by wesley johnson
Bug fix, hardware renderer can now display Boom colormaps, and can now
display levels of colormap brightness.
Create R_ColormapAnalyze, to generate hardware rgba info from Boom colormaps.
Enhance the extra_colormap rgba field to be an array, selected by lightlevel.
This gives the opengl colormaps some lightlevel effect.
Enhance ColormapGenerate, to fill out the rgba lightlevel array.

*** w52_hw_transparent_wall
patchfile = w52_hw_transwall.patch
- committed revision 673   by wesley johnson
Sprites behind transparent walls are not drawn.
Transparent walls are drawn after the sprites so they can be overlayed.
There was work already done, that needed to be enabled.
Made it clearer and added comments.

*** w52_hw_bsp_viewer
patchfile = w52_hw_bsp_viewer.patch
- committed revision 674   by wesley johnson
Convert hardware renderer to use the same bsp viewer global variables
that are used in the software renderer, as in bsp.c.

*** w52_hw_brightness
patchfile = w52_hw_brightness.patch
- committed revision 675   by wesley johnson
Adjust hardware brightness again, because rgba[] now gives some darkness.

*** w52_hw_no_texture2
patchfile = w52_hw_no_texture2.patch
- committed revision 676   by wesley johnson
More no-texture tests needed in FakeFloor rover code, with wider protection.
A 3Dslab that is missing a side texture could cause a segfault, eventually,
when it is referenced during FakeFloor roving.

*** w52_VIEW_COLORMAP_GEN
patchfile = w52_view_colormap_gen.patch
- committed revision 677   by wesley johnson
Turn off VIEW_COLORMAP_GEN debug enable, which had got left on.

*** w52_hw_extracolormap_surf
patchfile = w52_extracolormap_surf.patch
- committed revision 678   by wesley johnson
Extracolormap_to_Surf, common function for hardware rgba[] handling,
because these operations are getting more and more complicated.
This was in w52_hw_colormap.patch, but was found to be missing after
the latest commit.
GetPlaneLight changes in hw_main.c.
These were in w50_planelight.patch, but were found to be missing after
this latest commit.

*** w53_drawsplats_looping
patchfile = w53_drawsplats_looping.patch
- committed revision 679   by wesley johnson
The usual test and continue for draw range too high, in this case, left
the iteration variable unchanged, and thus stuck in a tight loop.
Changed to not use continue stmt.

*** w53_chexquest
patchfile = w53_chexquest.patch
- committed revision 680   by wesley johnson
Fix chexquest problems.
Chexquest was showing bloody splats, provided by legacy.dat.
Added a GDESC_ flag to indicate that the iwad needs to have precedence.
Reduced the violence of the splats for chexquest mode.
Added code to detect and intercept Doom graphics that were left in the
chexquest1 wad by the developers.
When player escapes the difficulty menu, it goes to the episode menu,
which is displaying the Doom1 episode names to Chex players.
Added code to give Chex episode names, instead of Doom episode names,
or block the episode menu.

*** w53_bossdeath
patchfile = w53_bossdeath.patch
- committed revision 681   by wesley johnson
Fix from DoomWiki and prboom.
BossDeath logic from UltimateDoom does not work with some earlier PWAD.
Upon detect of shareware or registered, revert to earlier BossDeath
test, that allows all Boss types to trigger effect.

*** w53_buildstairs
patchfile = w53_buildstairs.patch
- committed revision 682   by wesley johnson
BuildStairs bug from DoomWiki, already fixed (mostly).
Init some more fields, init them even when not boomsupport,
moved stair attribute switch stmt out of the loop (const for the loop).

*** w53_line_of_sight
patchfile = w53_lineofsight.patch
- committed revision 683   by wesley johnson
Sleeping Sargeant bug from DoomWiki.
Line-of-sight code had typo, testing x==node->y, instead of y==node->y.

*** w54_dehacked
patchfile = w54_dehacked.patch
- committed revision 684   by wesley johnson
Dehacked file in chexquest-newmaps segfaults due to writing string over const.
String replacement in sprites changed to use Z_Strdup, and old string
is abandoned. This one was missed in previous dehacked patch.

*** w54_lightlist
patchfile = w54_lightlist.patch
- committed revision 685   by wesley johnson
Fix segfault in chexquest-newmaps due to lightlist bad value.
Init some special lightlist fields, and comment where segfault occurs.
Do not know how the level causes this, but it is repeatable.
With the init, the segfault is prevented, and there is no visible effect.

*** w54_crosshairs
patchfile = w54_crosshairs.patch
- committed revision 686   by wesley johnson
Chexquest-newmaps has a scope with crosshairs, that for the software
render is considerably off to the left.
Center the fragglescript pictures overlayed upon screen so that the
scope crosshairs line up with the actual firing point.

*** w54_new_chexquest
patchfile = w54_newchexquest.patch
- committed revision 687   by wesley johnson
Chexquest-newmaps and others have more than the original 5 maps.
When a there is a -file (gamemodified=1), then allow all episodes and maps.

*** w55_savemobj
patchfile = w55_savemobj.patch
- committed revision 689   by wesley johnson
Savegame repeats mobj numbers when more than 1023 mobj.
Seen in hth2.wad (Hi-Tech Hell 2 - Alien Tech), which saves 1899 thinkers.
Realloc of mobj list fixed.

*** w55_maxcolormap
patchfile = w55_maxcolormap.patch
- committed revision 690   by wesley johnson
Wad hth2.wad uses 38 colormaps, increase to 64 colormaps.
Comment some colormap vars, and make it more clear.
Not enough memory saved to use dynamic methods.

*** w56_savemenu_scroll
patchfile = w56_savemenu_scroll.patch
- committed revision 691   by wesley johnson
Fix savegame menu so that when pressing uparrow or downarrow the scrolling
is performed whenever it can, instead of rollover to top or bottom
of menu.

*** w56_legacy_docs
patchfile = w56_legacy_doc.patch
- committed revision 693   by wesley johnson
Updated the Legacy.html to reflect new controls and switches.
This is not complete.
Updated a little bit of Faq.html, but much of it still needs review.
There are still many references to newdoom in the doc pages.

*** w57_trymove
patchfile = w57_trymove.patch
- committed revision 694   by wesley johnson
Comments added for TryMove, LineAttack.
Rename TryMove global vars to tm_* and the return global vars to tmr_*.
Rename LineAttack global vars la_* and the return global vars to lar_*.
Cleanup some function stubs, and some indenting, and some IF stmts
to make easier to read.

*** w57_sight
patchfile = w57_sight.patch
- committed revision 695   by wesley johnson
Comments added for Sight functions.
Rename CheckSight global vars to cs_*, and the return global vars to
see_* (which are also used independently by P_AimLineAttack).
Rename SightTraverse hsight global vars to strav_*.

*** w57_largemap
patchfile = w57_largemap.patch
- committed revision 696   by wesley johnson
Fix some math overflow for large maps like Europe.wad, where MAP01 is
enormous.
Change some short wad field types to uint16_t where needed, as those fields
could be overflowed and they do not need a sign.
Detect some buggy wad conditions and correct it as much as possible, 
or Error msg exit, at least prevent segfaults.
Detect bad linedef number, missing sidedefs, in P_LoadSegs.
Detect missing sidedefs, in P_LoadSubsectors.
Detect bad sector number, in P_LoadSideDefs2.
Detect bad seg number, in P_GroupLines.

*** w57_blockmap_overflow_coping
patchfile = w57_blockmap.patch
- committed revision 697   by wesley johnson
Fix blockmap loading to handle large blockmaps.
Detect blockmap overflow and correct the list indexes.
Will load Europe.wad which overflows the blockmap x3 times.
Europe.wad will load and run after this patch, but has automap problems,
and some other bugs.
Rename the blockmap global vars to be less confusing, as blockmaphead
and blockmapindex (as neither is the lump).
Make the blockmap unsigned, because every value read from it is unsigned
except for one test, which can be ==0xffff instead.
Adjust some of the blockmap functions.

*** w57_automap_overflow
patchfile = w57_automap.patch
- committed revision 698   by wesley johnson
Fix automap to handle large maps like Europe.wad.
Do math as to avoid overflowing integer math.
Detect when overflow will happen and limit zoom to prevent it.
Change conversion calculation to floating point math.
Removed some unused code using #ifdef 0.
Rewrote some parts to use center of attention instead of corner of
window, and cope with map edges better.

*** w58_r_defs
patchfile = w58_r_defs.patch
- committed revision 715   by wesley johnson
Comments on many r_defs structure fields.
Comment out unused ff_delta field.
Comments where ff_delta was initialized.

*** w58_attached_memory_leak
patchfile = w58_attached_memory_leak.patch
- committed revision 716   by wesley johnson
Free memory allocated to sector->attached before freeing sectors in
ZMalloc purge.
Init sectors list pointer, now that it no longer causes save game
corruption.

*** w58_silhouette
patchfile = w58_silhouette.patch
- committed revision 717   by wesley johnson
Rename some silhouette fields and function variables so can understand
how they are being used.
tsilheight -> sil_top_height
bsilheight -> sil_bottom_height
sprtopclip -> spr_topclip
sprbottomclip -> spr_bottomclip

*** w58_top_patch
patchfile = w58_top_patch.patch
- committed revision 718   by wesley johnson
Clarify some draw_masked and render segs variables, so can understand
how they are being used.  Preparation for attacking 3Dfloor sprite bugs.
Standardize some render function defines.
dm_topscreen -> dm_top_patch
dm_botscreen -> dm_bottom_patch
topscreen -> top_post_sc
bottomscreen -> bottom_post_sc
local light index -> dlit

*** w58_viewangle
patchfile = w58_viewangle.patch
- committed revision 719   by wesley johnson
Rename of viewangle arrays to make them readable.
xtoviewangle -> x_to_viewangle
viewangletox -> viewangle_to_x

*** w58_visplane_hash
patchfile = w58_visplane_hash.patch
- committed revision 720   by wesley johnson
Clarified the visplane hashing, renamed, and rewrote some free list
functions, to make it more explicit and understandable.
Plane freelist had head and tail reversed from usual list interpretations.
Gave visplane base the naming  vispl_*.
Gave visplane global parameters the naming  vsp_*.
Because of longer names the code got larger.
Running it through strip, removing the symbols, shows the true code size.

*** w58_visplane_naming
patchfile = w58_visplane_naming.patch
- committed revision 721   by wesley johnson
Preparation for attacking 3Dfloor sprite bug.
Naming changes, spacing, etc.
Renamed some structure fields to be explict, such as front_frac and
back_frac (instead of f_frac and b_frac), and high_top instead of just high.
Standardize some strange function declarations.
Many comments added.
No logic changes.

*** w58_visplane_revision
patchfile = w58_visplane_revision.patch
- committed revision 722   by wesley johnson
Preparation for attacking 3Dfloor sprite bug.
Small changes here and there to clarify code.
Simplified R_ExpandPlane, it was copied from CheckPlane and mostly
irrelevant.
Floor rover renamed to fff, and bff, which changes many lines, but makes
it clearer which is which.

*** w58_missed_stuff
patchfile = w58_missed_stuff.patch
- committed revision 726   by wesley johnson
Some local renames and comments that belonged with w58 that were missed.

*** w59_whatsnew
patchfile = w58_whatsnew.patch
- committed revision 738   by wesley johnson
Update whatsnew.html with new features, bug fixes, and known bugs from
my notes.
Update legacy.html with gamma table.
Update console.html with gamma commands.

*** w60_gcc4.4.4_complaints
patchfile = w60_gcc4.4.4_complaints.patch
- committed revision 746   by wesley johnson
Fix some valid gcc 4.4.4 compiler complaints.

*** w60_automap_status
patchfile = w60_automapstatus.patch
- committed revision 747   by wesley johnson
Automap is messed up for some screen sizes and splitscreen.
Fix bug made in w57_automap_overflow, by restoring original draw sizes.
Automap does not adapt to splitscreen, nor screen size, and has its own
status bar adaptation.

*** w60_displayplayer
patchfile = w60_displayplayer.patch
- committed revision 748   by wesley johnson
Add variables consoleplayer_ptr, displayplayer_ptr, displayplayer2_ptr.
To fix splitscreen displayplayer tests to not segfault.
This does NOT fix the splitscreen specific segfault causes.
These variables save on many tests of players[consoleplayer] and can
be tested against other player ptrs, and fixes clumbsy tests of
ptr against index.
Reduces code size by about 3K.

*** w60_splitplayer
patchfile = w60_splitplayer.patch
- committed revision 749   by wesley johnson
Fix splitscreen player2 failure that has existed for a long time.
Splitscreen player was not being created because even local play uses commands
sent through the network code, and they were being sign extended into nonsense.

*** w60_splitsound
patchfile = w60_splitsound.patch
- committed revision 750   by wesley johnson
Fix sound code segfaults in splitplayer mode.

*** w60_splitdemo
patchfile = w60_splitdemo.patch
- committed revision 751   by wesley johnson
Prevent demos from destroying an existing split player setup.

*** svn744_makefile
patchfile = svn744_makefile.patch
- committed revision 753   by wesley johnson
Linux 2.4 and others still have GLU lib in /usr/X11R6/lib.

*** w61_texture_combine
patchfile = w61_texture_combine.patch
- committed revision 755   by wesley johnson
The wad caesar.wad causes a texture failure.  Making allocation slightly
larger prevents this failure.

*** w61_effects_menu
patchfile = w61_effects_menu.patch
- committed revision 756   by wesley johnson
Make Effects menu permanent.  Next changes will add to it and too
difficult to cope with it being optional.

*** w62_patch_combine
patchfile = w62_patchcombine.patch
- committed revision 757   by wesley johnson
Patch combine fixes.
Detect empty patch properly instead of letting large value represent it.
Handle posts longer than 255 by creating a separate post, instead of error
escape.
Improve some messages, and comments.

*** w62_PNG
patchfile = w62_PNG.patch
- committed revision 758   by wesley johnson
Detect PNG patches, to prevent them from crashing the draw routines.
Create a dummy patch to replace them.
Test wad is longdays.wad, which has a PNG patch.

*** w62_sprite_limit
patchfile = w62_sprite_limit.patch
- committed revision 759   by wesley johnson
Remove sprite limits.  A user setting allows from 128 to 16000 sprites.
Sprite tables are dynamically adjusted according to previous frame
sprite count, and user setting (soft limit) in Effects menu.
Table size is hard limited to twice the user setting.
Nearest sprites to player have preference.
When there are more sprites than the table size (>256) the farther sprites
have semi-random access to last half of table (sporatic visibility,
they flicker), so the player knows there are more sprites in the distance.
Sprites are sorted by scale as they are inserted into table, so sprite
sort routine is ifdef'ed out.
Test wad is longdays.wad, which has thousands of sprites.
Test at user setting of 128 sprites, upto when your computer bogs down.

*** w62_crush_floating_monster
patchfile = w62_crush.patch
- committed revision 761  by wesley johnson
Fix monster height vrs room logic that due to some strange fix, had
floating monsters getting away from crushing ceilings undamaged.
Changed logic around so crush test is done first, and then can be
modified for special cases.  The special cases I found are limited,
but this is much easier to maintain without breaking it again.
I have tested this on several wads with crushers and it appears to work,
and I have verified that cacodemons and heads get crushed now.
It could use more testing for the strange special cases that I do not
know about.

*** w61_boom_demo
patchfile = w61_boom_demo.patch
- committed revision 762   by wesley johnson
Fix demo player to understand Boom demo headers.
This stops them from crashing the playback machine.
This patch got lost, which is why it is out of order.

*** w63_texture_size
patchfile = w63_texture_size.patch
- committed revision 763   by wesley johnson
Set texture size variable txcblocksize.
Stops compiler from complaining, which was right, although it took me
a long long time to find it.

*** w63_PU_LOCK_SB
patchfile = w63_PU_LOCK_SB.patch
- committed revision 764   by wesley johnson
The statusbar background was still getting released from memory.
Added a locked allocation, PU_LOCK_SB, which users of PU_STATIC cannot
release using ChangeTag.  ChangeTag requires use of PU_UNLOCK_CACHE to
change the PU_LOCK_SB to PU_CACHE.
Changed some temp uses of PU_STATIC to PU_IN_USE or PU_LUMP, which will
not release the memory if another user had the same patch with PU_STATIC.

*** w63_switch_endian
patchfile = w63_switch_endian.patch
- committed revision 765   by wesley johnson
Loading of switches has endian conversion that should be conditional
on BIG_ENDIAN, and needed to be done only when loading cache, not on
cache hits.

*** w63_doommode
patchfile = w63_doommode.patch
- committed revision 766   by wesley johnson
Alter the doommode enum names to reflect the actual games.
doom_shareware, doom_registered, ultdoom_retail, doom2_commercial
Found bad enum tests: "if (shareware)" and fixed them
as "if (gamedesc_index == GDESC_heretic_shareware)".

*** w63_GDESC_improve
patchfile = w63_GDESC_improve.patch
- committed revision 767   by wesley johnson
Revised GDESC_ code to have three alternative filenames for each entry.
This allows the engine to check several alternative filenames, to
allow a unique name and a common name, and to cover both filenames for
Ultimate Doom without needing two separate Ultimate Doom entries.
The id code is now specified in a field to make it independent of the
entry position in the table.
Removed code for -shdev, -regdev, -comdev, and replaced it with one
simpler switch, -devgame <gamename>, to remove the only need to know the
index of GDESC table entries.  Probably, those switches have not
been used since Doom development in the 90's.

*** w63_wikibugs
patchfile = w63_wikibugs.patch
- committed revision 768   by wesley johnson
Comment fixes to bugs described in wikibugs.

*** w64_savegame_limit
patchfile = w64_savegame_limit.patch
- committed revision 769   by wesley johnson
Savegame size limits removed.  Longdays.wad has savegame size from 468K to 806K.
Savegame was made to work within a 128K buffer, by reading and
writing when the free space is less than 1024 bytes.  Error detection,
buffer allocation, and deallocation, and file access is encapsulated within
the savegame functions.
The network also transmits savegame to a new user.  When there is not
a file then the savegame function reallocs a larger savebuffer, as needed.

*** w65_savemenu_bugs
patchfile = w65_savemenu_bugs.patch
- committed revision 770   by wesley johnson
Fix a number of nusance bugs in the savegame menu system.
Puts a ".." string in the UP-TO-LEGACY directory menu entry.
Fix allows new directory to be created from DIR line and from any
blank directory entry.
Fix directory menu scrolling to stop at end.
Fix savegame and directory menu failure after delete entry.
When current directory is deleted, fixed to null savegamedir name.
Fix "EMPTY SLOT" message being presented as a savegame name, by
preserving the slot status for all scrolling.

*** w65_old_patch_remove
patchfile = w65_old_patch_rem.patch
- committed revision 771   by wesley johnson
Remove old unused patch remanant.
Preliminary to fixing draw sprite vrs 3dfloor bug.

*** w65_old_vissort_remove
patchfile = w65_old_vissort.patch
- committed revision 772   by wesley johnson
Remove old unused vissprite sort routine.
Preliminary to fixing draw sprite vrs 3dfloor bug.

*** w65_plane_drawnode
patchfile = w65_plane_drawnode.patch
- committed revision 773   by wesley johnson
Sort floor planes into the drawnode list as they are traversed instead of
the previous repeated search of the same data.
Preliminary to fixing draw sprite vrs 3dfloor bug.

*** w65_savegame_line_ptr
patchfile = w65_save_ptr.patch
- committed revision 774   by wesley johnson
Fix segfault in DoomII MAP27 on use of door->line.
The line may be NULL.  Fixed savegame to save and restore NULL ptrs
for line and mapthings.
                                                            
*** w65_savegame_get_put
patchfile = w65_savegame_get_put.patch
- committed revision 775   by wesley johnson
Two savegame functions use local vars get and put, and these must be
copied to and from save_p before and after SG_Readbuf and SG_Writebuf.
Changed value 1024 in SG_Readbuf and SG_Writebuf to a defined trigger value.
Increased free space trigger to 2048 bytes.
Added optional code to test and print minimum free space in the
savegame buffer.

*** w65_sprite_limit_fix
patchfile = w65_sprite_limit_fix.patch
- committed revision 776   by wesley johnson
Fix a minor error in testing for request = current.

*** w65_farthest
patchfile = w65_farthest.patch
- committed revision 777   by wesley johnson
Move some variables that were made conditional into the conditional code
so the compiler stops complaining about variables not used.

*** w66_save_SGI
patchfile = w66_saveSGI.patch
- committed revision 779   by wesley johnson
Savegames for SGI will no longer pad the savegame to align reads and writes.
Padding will not work with the new savegame buffer, as it does not keep
a fixed alignment.  The WRITEU16, and similar inline functions should
perform unaligned byte transfers to the buffer, if needed.

*** w66_alpha2_docs
patchfile = w66_alpha2_docs.patch
- committed revision 780   by wesley johnson
Update the docs for latest news, bug fixes, and update some legacy
usage instructions.

*** w66_buggy_wad
patchfile = w66_buggy_wad.patch
- committed revision 781   by wesley johnson
More checks against buggy wads.

*** w67_colormap_msg
patchfile = w66_colormap.patch
- committed revision 782   by wesley johnson
Fix bad colormap missing msg.

*** w67_linedef
patchfile = w66_linedef.patch
- committed revision 783   by wesley johnson
Decode boom generalized linedef better, so to detect bad linedef numbers.
More efficient switch linedef executable.

*** w67_plutonia
patchfile = w66_plutonia.patch
- committed revision 784   by wesley johnson
Bad detection for plutonia, CAM01 needed to be CAMO1.

*** w67_stop_demo
patchfile = w66_stop_demo.patch
- committed revision 785   by wesley johnson
Stop demos when menus are open.  They keep stealing the keypresses and
make it impossible to use the menus.

*** w67_player_spawn
patchfile = w66_player_spawn.patch
- committed revision 786   by wesley johnson
Convert player spawn code to pass playernum as parameter instead of
mangling the wad things.  This allows the wad things to be searched
again.

*** w67_savegame_netvars
patchfile = w66_savegame_netvars.patch
- committed revision 787   by wesley johnson
The savegame format changes everytime some more cv_ netvars are added.
This change makes the savegame load immune to this.  It will read
netvars until it hits the SYNC mark, instead of reading according the
the NETVARS found in this version.  This allows older savegames to
still load.

*** w67_voodoo_player
patchfile = w67_voodoo_player.patch
- committed revision 788   by wesley johnson
Due to wads that use the voodoo player in strange ways, the voodoo
player has appeared as the player in some function calls.  This will
segfault when trying to get the player index [player - players].
Fix by creating the voodoo player more like vanilla doom does it, and
then intercept the problems as they occur.
Provides an instadeath control for voodoo telefrag mitigation.
In deathmatch, the voodoo telefrag is blocked.
Provides a voodoo_mode to control voodoo effects, with settings
Vanilla, Multispawn, Target, and Auto.
In Vanilla, voodoo dolls can create zombies and the walking dead.
Other modes prevent those from occuring by redirecting damage to the
player.
In Multispawn mode the voodoo doll player gets the damage.
In Target mode the player that shot the voodoo doll, or last triggered
a linedef, or last pushed a switch, will get the damage.
Target mode is meant for coop and deathmatch.
In Auto mode it behaves as Target, unless it detects voodoo dolls for
players other than player1, upon which it will change to Multispawn.
Plutonia MAP06 is a known voodoo Multispawn level.

*** w67_doc
patchfile = w67_doc.patch
- committed revision 789   by wesley johnson
Update docs for w67 patches.

*** w67_stop_demo2
patchfile = w67_stop_demo2.patch
- committed revision 790   by wesley johnson
Fix Stop Demo patch that got somewhat mangled.  Also added restore of
screen and demo after the menu is exited.

*** w67_deathmatch_voodoo
patchfile = w67_deathmatch_voodoo.patch
- committed revision 794   by wesley johnson
Fix extraneous voodoo dolls spawned in deathmatch, broken by voodoo
patch.

*** w67_coop_damage
patchfile = w67_coop_damage.patch
- committed revision 795   by wesley johnson
Fix damage tests to allow monster damage during coop play, broken by
voodoo patch.

*** w68_braintargets
patchfile = w68_braintargets.patch
- committed revision 796   by wesley johnson
Remove hard limits for braintargets, similar to prboom.
Prevents overrun of braintargets array.
Resolves bug 1001667, from 2004.

*** w68_vile_bugs
patchfile = w68_vile_bugs.patch
- committed revision 797   by wesley johnson
Vile ghost fix commented.
Vile revived stuck together bug fixed, similar to zdoom and prboom,
fixing bug 1037683.
Vile fire location bug fixed, similar to prboom.

*** w68_menu_exitgame
patchfile = w68_menu_exitgame.patch
- committed revision 799   by wesley johnson
Fix game menus, so that the check for "already playing" will give
the user an immediate message asking "Abort this game Y/N".  Upon a
YES it will quit the game and let the user continue.
Combine 3 static menu msg buffers into one large one.  There can
be only one menu message at a time.

*** w68_menu_mouse
patchfile = w68_menu_mouse.patch
- committed revision 800   by wesley johnson
Fix mouse bugs in menus.
Fix so mouse cannot change values until button pushed, because previously
one mouse slide could accidently change a dozen values.
Extraneous mouse tracking removed.
Menu mouse sensitivity put in a define and lowered.

*** w69_fs_rename
patchfile = w69_rename.patch
- committed revision 801   by wesley johnson
Rename global fragglescript variables to fs_.
Apply standard indenting.
Rename enum defs to TT_ BRACKET_ FSVT_ and FSST_.
Other minor cleaning.

*** w69_fs_parse
patchfile = w69_parse.patch
- committed revision 802   by wesley johnson
Fix fragglescript parsing to use safer, faster
string handling code, to protect against overrun of strings.

*** w69_fs_args
patchfile = w69_fs_args.patch
- committed revision 803   by wesley johnson
Simplify fragglescript function args concatenation.
More indenting and cleanup.

*** w69_fs_misc
patchfile = w69_fs_misc.patch
- committed revision 804   by wesley johnson
Fix some extern defs in fs code to use header file.
Rename some enum as WT_.
Change some sprint into snprint.
Some other minor cosmetic changes.

*** w69_fs_var_rename
patchfile = w69_fs_var_rename.patch
- committed revision 805   by wesley johnson
Rename fragglescript var and value types.
Rename array savelist and types.
Rename Init of arrays.

*** w69_fs_docs
patchfile = w69_docs.patch
- committed revision 806   by wesley johnson
Fix docs for latest patches.

*** w70_timelimit_bug
patchfile = w70_timelimit.patch
- committed revision 807   by wesley johnson
Fix timelimit to use tics, fixing bug 989967.

*** w70_savegame_spaces
patchfile = w70_savegame_spaces.patch
- committed revision 808   by wesley johnson
Fix code so savegame description allows spaces again.

*** w70_pld_Makefile
patchfile = w70_pld_Makefile.patch
- committed revision 809   by wesley johnson
Fix Makefile to link with "-lm" because of MATH1 functions pow and powf.
Submitted by pld-Linux patch lib.

*** w70_pld_linux_x_video
patchfile = w70_pld_linux_x_video.patch
- committed revision 810   by wesley johnson
Accept some patches submitted from pld-linux patch lib.
In linux_x port, handle larger number of vidmodes without crash.
In linux_x port, do not force Colormap upon X, when not in x_pseudo
(TrueColor) we handle colormapping.

*** w70_netcmd_WRITESTRINGN
patchfile = w70_netcmd_WRITESTRINGN.patch
- committed revision 814   by wesley johnson
Linux 2.6 compile warning messages squashed, and smaller code.

*** w71_kin_progress
- committed revision 815   by wesley johnson
Move kin log file "progress.txt" from linux_x/ to _logs/.

*** w70_TNT
patchfile = w70_TNT.patch
- committed revision 816   by wesley johnson
Fix TNT recognition.

*** w71_linux_x
patchfile = w71_linux_x.patch
- committed revision 817   by wesley johnson
General repairs to linux_x directory.
Update system calls to same changes as made recently to SDL.
Fix prototype changes.
Deactivate unused code and obsolete code.
Fix keyboard translation and event posting.
Add X error handler code.
Fix X joystick code.
Verified to run Linux X11 in software mode.

*** w72_spritelump_type
patchfile = w72_spritelump_type.patch
- committed revision 818   by wesley johnson
Combine sprite lump tables into one record and array.

*** w72_spritelump_limits
patchfile = w72_spritelump_limits.patch
- committed revision 819   by wesley johnson
Fix spritelump array to be dynamic expanded, thus removing spritelump
limits.  This fixes the last issue of bug 3157859.

*** w72_dehacked
patchfile = w72_dehacked.patch
- committed revision 820   by wesley johnson
Fix dehacked special string copy to use Z_Strdup like the other fixes,
so do not write const string.
Some minor code changes.
Add some comments and {}.

*** w72_cheat_char
patchfile = w72_cheat_char.patch
- committed revision 821   by wesley johnson
Fix CheckCheat to use the ASCII char in the event (data2), and not the
16bit char in data1, to avoid special keys being mistakenly recognized.
The cheat code saw the 0 key =0x48 and LSHIFT key =0x0148 to be the
same by accident.
This fixes bug 3194389.

*** w72_spritelump_type_fix
patchfile = w72_spritelump_type2.patch
- committed revision 824   by wesley johnson
Fix bug in spritelump_type patch where the signs of two hardware
render lines got changed.  (Late night, copying too much)

*** w73_missile_prep
patchfile = w72_missile_prep.patch
- committed revision 825   by wesley johnson
Cleanup of code around missile movement.
Prep for mancubus missile bug fix.

*** w73_mancubus_walls
patchfile = w72_mancubus_walls.patch
- committed revision 826   by wesley johnson
Fix bug of mancubus fireballs going through walls.
Fix bug of missiles exploding within walls instead of upon them.

*** w74_misc
patchfile = w74_misc.patch
- committed revision 829   by wesley johnson
Made extensive use of pmo = player->mo.
Added comments.
Straigtened code indentation, added some {}.

*** w74_boom_demo
patchfile = w74_boom_demo.patch
- committed revision 830   by wesley johnson
Created DemoAdapt functions to change engine settings for demos.
Fix demo code to better handle boom, prboom, demos.
Use more of the demo setup variables.
Correct the turn code to use relative turns for boom demos.
Commented more of the demo code.

*** w74_boom_demo
patchfile = w74_boom_demo.patch
- committed revision 831   by wesley johnson
Seemed to miss something on first try.

*** w74_demo144
patchfile = w74_demo144.patch
- committed revision 832   by wesley johnson
DoomLegacy demo format will have a header of version 144, and the
characters "DL".  DoomLegacy demos shall only use the one demo version number.
Three later fields shall record the DoomLegacy VERSION, demoversion,
and sub-demoversion numbers.
Not yet enabled, alpha still writes demoversion 143.

*** w74_boom_demo
patchfile = w74_boom_demo.patch
- committed revision 833   by wesley johnson
Remove duplicate code inserted by svn 831.

*** w74_sector_friction
patchfile = w74_sector_friction.patch
- committed revision 834   by wesley johnson
Changed to MBF style sector friction (from examination of Killough code in prboom),
making DoomLegacy more consistent with DoomLegacy 2.0, prboom and
other modern ports, with some fixes and differences.
Water friction and Heretic friction are also converted to sector friction.
Sectors get the friction and movefactor values at load time,
and are updated whenever a flag or friction control changes.
Finds stickiest friction on icy sector edge too.
Independent friction for each 3dfloor slab.
Old boom friction thinker code is compile-time conditional (FRICTIONTHINKER),
and is only used for demos. Demos select appropriate friction code.
Rearranged some Move and Thrust functions during the conversion.
Did not preserve perfect demo compatibility with Boom and prboom.
Moved a Heretic chicken friction calc, which may have fixed a latent bug.

*** w74_player_bob
patchfile = w74_player_bob.patch
- committed revision 835   by wesley johnson
Converted to independent player bob momentum of Killough, as in DoomLegacy 2.0,
MBF and prboom, with fixes and adaptations.
Compile-time conditional on BOB_MOM.
Fixes many problems of previous bobbing, such as bobbing while riding
conveyor, and interaction with friction.

*** w74_3dfloor_opening
patchfile = w74_3dfloor_opening.patch
- committed revision 836   by wesley johnson
Rewrite of 3dfloor opening code, simplified logic, moved redundant
tests making it faster, and fixed an error.
Old code could select floor and dropoff floor as 3dfloor slabs on same
side of line.

*** w74_monster_friction
patchfile = w74_monster_friction.patch
- committed revision 837   by wesley johnson
Monsters use same sector friction as players.
Selection mechanism for monster friction (none, MBF, momentum).
The MBF monster friction only gives the monster momentum on ice, 
and this creates surge when moving off ice, and stall when moving onto ice.
Momentum monster friction selection accumulates momentum on every move,
and fixes the surge and stall problems.
Additional code to prevent hangups on dropoff ledges, get monster
unstuck from edges, and to allow monsters to fall off conveyor belts.
Pass detection of dropoff to calling routines.
Renamed P_Move to P_MoveActor.
Tuning required months of testing and adjusting algorithms.

*** w74_adv_options_menu
patchfile = w74_adv_options_menu.patch
- committed revision 838   by wesley johnson
Create Adv Options menu, for monster friction, gravity, voodoo mode,
voodoo insta-death, and door delay.

*** w75_flip_offset
patchfile = w75_flip_offset.patch
- committed revision 840   by wesley johnson
- committed revision 842   had log, but not code patch
As suggested by Fraggle, use (width-offset) instead of offset when displaying a
sprite frame flipped.

*** w75_docs
patchfile = w75_docs.patch
- committed revision 843   by wesley johnson
Update docs for alpha3 release.

*** w76_monster_stuck
patchfile = w76_monster_stuck.patch
- committed revision 847   by wesley johnson
Fix monster momentum friction to help stuck monsters.
Must have full speed impulse for stopped monsters because some wads,
like TNT, have overlapped monster positions, and it depends upon that
vanilla behavior to get them unstuck from each other.

*** w76_z_test_notes
patchfile = w76_z_test_notes.patch
- committed revision 848   by wesley johnson
Part of the code for z_testing of monsters is disabled and it is not a
mistake.  The code existed previous to heretic code inclusion, and
heretic has similar behavior.  This documents the variables and code
that belong to the old code.

*** w76_multimenu
patchfile = w76_multimenu.patch
- committed revision 850   by wesley johnson
Reorganize the multiplayer menus.
Main menu is now compatible with original (and does not have any legacy.wad
graphics), to allow menu modifications like in Plutonia2.
Created a SingleMulti menu to select between (Single player, Two
player, Multi-player).
The two player setup has been fixed to allow setup before starting
server.

*** w76_levelname
patchfile = w76_levelname.patch
- committed revision 851   by wesley johnson
Level names for TNT and Plutonia were not displayed because they
depended upon gamemission, which was never setup.  Replaced logic
with gamedesc_id, which gives same information.
Removed gamemission.
Cleaned up some related macros and levelname functions.

*** w76_TNT_MAP30_stair
patchfile = w76_TNT_MAP30_stair.patch
- committed revision 852   by wesley johnson
TNT MAP30 depends upon a stair builder bug that was fixed by Boom.
Fix using DemoAdapt so that for TNT MAP30, it disables the Boom
stairbuilder fix (giving the original buggy code).  Sometimes the bug
increments a stair twice.  TNT MAP30 has 24 steps, but they removed some
linedefs to have only 18 steps (some of which increment by 16) because
of the bug.

*** w76_TNT_MAP31_key
patchfile = w76_TNT_MAP31_key.patch
- committed revision 853   by wesley johnson
TNT MAP31 yellow key is missing because wad has it marked as
multiplayer only.  This makes it impossible to finish the level.
This fix removes the multiplayer flag from this key, for this game and map.

*** w76_plutonia_text
patchfile = w76_plutonia_text.patch
- committed revision 854   by wesley johnson
The plutonia text was missing, and TNT text was not displayed.
Added P1TEXT .. P6TEXT.
Tried to enter the plutonia text by hand, but had errors, and had to
copy it from prdoom and plutonia2 (to get plutonia2 DEH to work).
Fixed the finaltext logic to select Doom2, plutonia, or TNT text.

*** w76_text_reorg
patchfile = w76_text_reorg.patch
- committed revision 855   by wesley johnson
Text enum names moved from d_englsh.h to dstrings.h, as they are
universal to french, english, and all languages.
Removed text[] that are not changable from DEH.  This forced
several strings with SAVEGAMENAME combined at compile-time with other
strings, to be made to combine at run-time.
SAVEGAMENAME usage also changed to handle savegame name from text[],
because it will changable from BEX.
This is in preparation for BEX text modification code.

*** w77_DEH_Init
patchfile = w77_DEH_Init.patch
- committed revision 856   by wesley johnson
Save all DEH replaced strings into deh_ vars for comparison.
This allows multiple replacements of the same string, or other name,
without mutual interference.  Because FreeDoom will contain such a DEH
lump, it would have prevented any other PWAD from using DEH to replace
the same string.  The save is performed in DEH_Init.

*** w77_DEH_strcasecmp
patchfile = w77_DEH_strcasecmp.patch
- committed revision 857   by wesley johnson
DoomLegacy and other ports changed to using strcasecmp, so that lumps
would not fail due to name case.  This changes most DEH string
comparisions to use strcasecmp.

*** w77_DEH_replace_string
patchfile = w77_DEH_replace_string.patch
- committed revision 858   by wesley johnson
A common replace_string function is created.
It performs checks against hostile strings, ensuring that replacement
strings contain only the % that the original string contained.
It blocks certain characters that are considered dangerous, and have
been used to attack programs.
It allocates the new string using malloc, instead of Z_Alloc.
Define DEH_RECOVER_STRINGS, enables the testing of strings
for being const or malloc, and recovery of malloc memory.

*** w77_BEX_flags
patchfile = w77_BEX_flags.patch
- committed revision 859   by wesley johnson
Add BEX flag by name.  There is a conflict between MF_TRANSLUCENT
which is defined in doomdeh.txt, and MF_FLOORHUGGER which is not.

*** w77_translucent
patchfile = w77_translucent.patch
- committed revision 860   by wesley johnson
Fix the conflict between MF_TRANSLUCENT and MF_FLOORHUGGER.
Change MF_FLOORHUGGER to MF2_FLOORHUGGER.
Adds logic to distinguish between them in old DEH patches.
Fixes translucent code to be affected by BEX changes to MF_TRANSLUCENT.
Change translucent to a table.
Added PACKED_ATTR define so that table can be packed.

*** w77_action
patchfile = w77_action.patch
- committed revision 861   by wesley johnson
Separated action function declares from info.c into new file action.h, so
they can be used in dehacked.c too.

*** w77_BEX_file
patchfile = w77_BEX_file.patch
- committed revision 862   by wesley johnson
Main body of BEX text, pointer, processing.
Recognizes [STRINGS], [POINTER], [PARS], and BEX include.

*** w77_par_time
patchfile = w77_par_time.patch
- committed revision 863   by wesley johnson
Fix par logic to test for BEX modifications, and to display PAR time
only when such PAR times are valid.
Change SUCKS for non-id-games to have a limit of 24 hours, so
the player can see their time.

*** w77_devgame
patchfile = w77_devgame.patch
- committed revision 864   by wesley johnson
Check -devgame parameter for valid <name>, before using it, preventing
segfault.

*** w77_french
patchfile = w77_french.patch
- committed revision 865   by wesley johnson
Convert d_french.h to a run-time replacement of text[] strings, after
DEH has made a copy.  Now FRENCH can be used with DEH string replacement.
There are functions to replace non-game strings, and game strings
separately, and functions for heretic and chexquest strings.
There are calls at the appropriate places in d_main.c.
The d_french.h file has many new strings that need translation.

*** w77_BEX_language
patchfile = w77_BEX_language.patch
- committed revision 866   by wesley johnson
Added BEX_LANGUAGE option that loads a BEX file to replace all strings
in text[].  This more limited in the strings it can reach, but the bex
file can be changed for any language without compiling the source.
It accepts a parameter  -lang <name>, where <name> can be any language
name (i.e. french, german, etc.).  It will form a filename, french.bex,
and attempt to process it.  If <name> is blank, or if
BEX_LANGUAGE==AUTO, is selected, it will use the default, "lang.bex".
Changed BEX to also accept strings with double quotes.
The french.bex file has many new strings that need translation.

*** w77_action_french_files
- committed revision 867   by wesley johnson
Add action.h and lang_bex/french.bex to the svn system.

*** w78_help_docs
patchfile = w78_help_docs.patch
- committed revision 868   by wesley johnson
Update legacy.html with correct installation instructions, fix errors.
Improve -help command line switch.
Add a -v switch for verbose, and use it to print out more information.

*** w78_max_wadpath
patchfile = w78_max_wadpath.patch
- committed revision 869   by wesley johnson
Use MAX_WADPATH for almost all file path string manipulation.
Add cat_filename function to encapsulate proper file name concatenation.
Protect filename strings against extra long strings in command line, wad,
and config files.
Harden many string operations against buffer overflow.

*** w78_net_playdemo
patchfile = w78_net_playdemo.patch
- committed revision 870   by wesley johnson
Update some net functions to use ptrs instead of repeating array
indexing.
Harden a net buffer string operation against buffer overflow.
Fix DeferredPlayDemo function, to put command in Execute as one
string, so it does not execute partial strings and fail.

*** w78_win32_compile
patchfile = w78_win32_compile.patch
- committed revision 871   by wesley johnson
Additions to Makefile to support compilation on Win98 using MinGW.
Create /dep file to hold *.dep files outside of source code.
Change to WIN32 GlobalMemory lib call that is present on Win98.
Fix dehacked.c problems with compiler not likely unsigned char in lib calls.
Allow underline in dehacked/BEX names.
Some other gcc 4 compiler complaints fixed.

*** w78_execute_config
patchfile = w78_execute_config
- committed revision 872   by wesley johnson
Execute of config file on window systems fails because the COM buffer
system mangles windows path backslashes.  Extensive fixes to COM
buffer handling to prevent this, by distinguishing script commands and
those commands that have filename parameters.

*** w78_com_args
patchfile = w78_com_args.patch
- committed revision 873   by wesley johnson
Update COM buffer execution interface.
The COM_args function is unused.
Added COM_Args function that returns count and first 4 com parameters.
This makes for fewer calls, converts calls into literal array access.

*** w78_command_files
patchfile = w78_command_files.patch
- committed revision 874   by wesley johnson
Make doomwaddir, legacyhome, config file strings hardened against
windows no having environment variables.
Will now search two possible doomwaddir names before trying current
directory.
No longer allows current directory to be "" string, as that results in
save and config files being put into root directory.  Will copy the
current directory string instead and use only absolute paths.
Doomwaddir code and config file code moved and organized together.

*** w78_nosound
patchfile = w78_nosound.patch
- committed revision 875   by wesley johnson
The nosound variable name conflicts with a Watcom support function.
The support function really ought to be named better, but cannot fix
that.  Rename nosound, to nosoundfx, as sure fix.
Watcom compilation still has other problems.

*** w78_blockmap_mem_corrupt
patchfile = w78_blockmap_mem_corrupt.patch
- committed revision 876   by wesley johnson
With a missing or bad blockmap in the wad, the code will corrupt
Zone memory block headers.
Add checks for the missing blockmap, and overruns of the blockmap
allocation.
Add more complete ZONEID checking (some as PARANOID) and better reports to the
Zone memory functions.

*** w78_video_misc
patchfile = w78_video_misc.patch
- committed revision 877   by wesley johnson
Comment video setup functions, so they are more understandable.
Straighten video menu switch, unnecessarily complicated.

*** w78_whatsnew
patchfile = w78_whatsnew.patch
- committed revision 878   by wesley johnson
Update legacy.html and whatsnew.html docs to svn877.

*** w78_Make_win32
- committed revision 879   by wesley johnson
Doc file on how to make DoomLegacy on Win32 system.

*** w79_duplicate_symbols
patchfile = w79_duplicate_symbols.patch
- committed revision 881   by wesley johnson
Working on Mac has revealed that our linker is not showing us duplicate
symbols and is combining them.
Added linker flag to give warning when duplicate symbol.
Fixed some vars that should be static.
Fixed some header variable declares that were not extern.

*** w79_deh_flags
patchfile = w79_deh_flags.patch
- committed revision 882   by wesley johnson
The previous BEX code really messed up the DEH flags code, such that in phobiata
the player could not slide along the walls.
This fixes the DEH and BEX flags logic so that DEH changes only the
flags it intends to and clears flag2 bits (like MF2_SLIDE) only when it
shows that it is changing flag2 bits.

*** w79_deh_text
patchfile = w79_deh_text.patch
- committed revision 883   by wesley johnson
Some text strings got changed (DOS -> your os) and now DEH cannot
recognize them.  This adds a hashed lookup that can recognize strings
that we no longer have, and point DEH at the right string.
It also is used by chex newmaps.c to recognize ult doom strings after
the chex modifications have changed all the strings.
Chex also changed some strings with two %s, to have one %s, and Newmaps
wants to change it back to two %s.  The %s counting method would not
allow this, so a new explicit table had to be created.

*** w79_demo_ctrl
patchfile = w79_demo_ctrl.patch
- committed revision 884   by wesley johnson
Fix the demos so they stop interfering with savegame loading.
The screen would wipe, and then wipe a second time and the controls
would be useless.
Created a new contol var, demo_ctrl, that stops demos once a savegame
has been loaded, and does the advance demo job too.  It replaces advancedemo.

*** w79_demo_friction
patchfile = w79_demo_friction.patch
- committed revision 885   by wesley johnson
Attempt to fix demos to record and honor monster friction settings.
Older demos need to use MBF monster friction or Doom no friction.

*** w79_save_limit_99
patchfile = w79_save_limit_99.patch
- committed revision 886   by wesley johnson
Prevent savegames over 99.  Would crash on load.
Was missing explicit check.

*** w79_jumpgravity
patchfile = w79_jumpgravity.patch
- committed revision 887   by wesley johnson
JUMPGRAVITY is variable by fragglescript, no longer a macro.
Change it to jumpgravity.

*** w79_team_name
patchfile = w79_team_name.patch
- committed revision 888   by wesley johnson
Fix segfault when command "teamplay 1".
Team_name[] was array of ptrs to const strings, and the const strings
cannot be written.  Created basic team structure, with name.
Only basic functions for team name for now, but can become a dynamic list.

*** w79_deathmatch_spawn
patchfile = w79_deathmatch_spawn.patch
- committed revision 889   by wesley johnson
Fix bug 1095897.
Players spawn in deathmatch on other players, and get locked.
Tests for this were in code, but failed because player corpse does not have
MF_SOLID set, thus things check was skipped.
Must temporarily set MF_SOLID to do CheckPosition test.
Changed player corpse to honor cv_solidcorpse setting.
Set MF_SOLID on solid player corpse.

*** w79_FIXED_MAX
patchfile = w79_fixed_max.patch
- committed revision 890   by wesley johnson
Use of MAXINT on 32 bit fixed_t variables is not safe on 64 bit machines.
Define a FIXED_MAX and FIXED_MIN that are used as the max and min
of fixed_t variables.
These can be maintained according to the size of fixed_t.
Change all used of MAXINT with fixed_t vars to use FIXED_MAX and FIXED_MIN.

*** w79_spec_enum
patchfile = w79_spec_enum.patch
- committed revision 891   by wesley johnson
Most enum names in spec.h look like variable names.
Give them prefixes.

*** w79_lowest_ceiling
patchfile = w79_lowest_ceiling.patch
- committed revision 892   by wesley johnson
Search for lowest ceiling was flawed by an additional paranoid test that
would also defeat a Boom search limit meant to prevent overflow.
Removed the additional paranoid test.
Tuned other sector floor and ceiling height searches to execute faster,
as they were using n! passes of the thing list.

*** w79_floor_up
patchfile = w79_floor_up.patch
- committed revision 893   by wesley johnson
Fix bug 0585154.
In Doom2 Map05, two doors to secret rooms will not work.
If another door (1st of 4 doors on left) is opened first, then tag 9
will move the floors of these two rooms like doors.
Checks against hitting something had been made conditional on 3D floors,
for some reason.  Restoring these tests stopped the floors movement
like the original, and the flawed Map05 is then still playable.
Must be careful to not have problem with Doom2 Map06, with the spider
demon in the crusher.  Some possible tests would freeze the crusher if
something was stuck in the ceiling or floor.
This is enabled by COMPAT_FLOOR_STOP, for now.

*** w80_vid_defs
patchfile = w80_vid_defs.patch
- committed revision 894   by wesley johnson
Revise vid structure to handle problems with MAC and direct video.
The driver sets up the display and screen size according to its
characteristics.
The buffer width can be different than the screen width, to handle the
Mac which pads it buffer lines to a power of 2.
The driver can control the video buffer width independently of the
screen buffer width, neither of which need to match the screen width.
Contains fields that are multiplied by the buffer width.
Fixes many common draw routines to increment by buffer width instead of
screen width so they are correct for any driver buffer choice.
Fixes uses of bpp as byte to be bytepp, as bpp is bits-per-pixel.
Introduces the controls for DRAW8PAL, DRAW15, DRAW16, DRAW24, DRAW32.

*** w80_vid_port_fixes
patchfile = w80_vid_port_fixes.patch
- committed revision 895   by wesley johnson
Minimal fix of djgppdos, linux_X, macos, os2, sdl, win32, port drivers for
the new vid structure.  This is a temporary fix, as they need to be rewritten.

*** w80_vid_control_fixes
patchfile = w80_vid_control_fixes.patch
- committed revision 896   by wesley johnson
Fixes for new vid structure, to use drawmode, and buffer line sizes in
many draw routines.
Introduces code that uses drawmode to select bpp drawing, instead of
testing bpp.
Changes borderpatch to borderflat, as it is not a patch that is drawn.
Changes setmodeneeded to use -1 as inactive, instead messing with
changing 0.. to 1.. everywhere.
Saves true bpp to config, instead of some hacked value.
Fixes am_map, d_main, f_wipe, m_menu, r_data, r_draw, screen,

*** w80_video_fixes
patchfile = w80_video_fixes.patch
- committed revision 897   by wesley johnson
Code has not used dirty rectange limited drawing since DOS.
Disable Mark_Rect function and calls using DIRTY_RECT macro.
Introduce ENABLE_DRAW15, ENABLE_DRAW16, ENABLE_DRAW24, ENABLE_DRAW32
macro controls in doomdef.h for conditional draw code.  User can disable
compiling drawing code for modes they cannot use.
Introduce pixel structures for 24bpp, and 32bpp.
Introduce color translation table, color8, that works for all draw
modes, replacing color8to16.  Init it when screen bpp is determined.
Fix draw16 to use uint16_t instead of short.
Introduce basic draw functions, V_GetDrawAddr, V_DrawPixel, V_DrawPixels,
that work in all bpp draw modes, for use in splash screens, wipes, and
the like.
Fixed V_CopyRect, VID_BlitLinearScreen, V_DrawMappedPatch,
V_DrawScaledPatch, HWR_DrawSmallPatch, V_DrawTranslucentPatch,
V_DrawPatch, V_BlitScalePic, V_DrawFill, V_DrawFlatFill,
V_DrawFadeScreen, V_FadeConsBack, to draw correctly using buffer width
and drawmodes.
Update V_DrawTiltView and V_DrawPerspView in similar fashion,
but they have other serious problems.
Diabled V_DrawBlock and V_GetBlock because they were not safe for use
on screens with extended draw modes,
and substituted other existing draw routines for the uses.

*** w80_map_con
patchfile = w80_map_con.patch
- committed revision 898   by wesley johnson
Fix draw of auto map for all draw modes, using V_DrawPixel.
Fix draw of CON_DrawBackPic for all draw modes, using V_GetDrawAddr
and V_DrawPixel.
Fix draw of D_PageDrawer for all draw modes, using V_DrawPixels.

*** w80_finale_init
patchfile = w80_finale_init.patch
- committed revision 899   by wesley johnson
Fix draw of finale screens, for all draw modes, using V_DrawPixel.
Fix screenshot to use correct buffer widths, but it is still limited to
8bpp mode because of the save format.
Fix fuzz init, and ylookup init, for all draw modes.
Fix R_FillBackScreen, R_DrawViewBorder, for all draw modes, using V_DrawPixels.
Fix wi_stuff, for all draw modes.

*** w80_wipe
patchfile = w80_wipe.patch
- committed revision 900   by wesley johnson
Change wipe functions to not pass parameters they do not use, and also
fix them for all draw modes.
Remove ColMajorXForm transform, as it was not really faster, and
was limited to 8bpp, now using a simple pixel copy.
Created a proportional fade for the extended draw modes, which is not
as smooth as the 8bpp translucent tables, but gives similar function.
Reorganized strange wipe control table for simpler access.

*** w80_request_bpp
patchfile = w80_request_bpp.patch
- committed revision 901   by wesley johnson
Introduce new command line switches and common control structure, so that
each port driver does not do this in a unique way.  The port drivers now
react to the common control variables.  Most old control variables
declared in the port drivers, such as rendermode, vidwait, fullscreen,
have been moved to video.c.
A new V_Init_VideoControl, now registers common controls.
A new V_CanDraw, returns true when a bpp can be drawn.
Set req_drawmode according to command line requested drawmode.
Switch "-highcolor", now sets REQ_highcolor (request a 15 or 16 bpp mode).
Switch "-truecolor", sets REQ_truecolor (request a 24 or 32 bpp mode).
Switch "-native", sets REQ_native, which requests use of the native
drawing mode.
Switch "-bpp 15", sets req_bpp and REQ_specific, which requests a
specific bpp mode (can be 8, 15, 16, 24, or 32).
Fixes DrawPixel routines to use direct ptr access to pixels, which
should give the fastest code.

*** w80_draw16_minimal
patchfile = w80_draw16_minimal.patch
- committed revision 902   by wesley johnson
Fixed draw16 routines to give minimal functionality.
Fixed translucent draw using proportional addition of pixels.

*** w80_sdl_port
patchfile = w80_sdl_port.patch
- committed revision 903   by wesley johnson
Extensive rewrite of mode code in sdl port driver.
It now handles all bpp mode requests.
I_StartFrame no longer locks the video buffer, because that needs to be
kept to a minimal time, during I_FinishUpdate.  This is dictated by
SDL specs.
VID_PrepareModeList merged into I_StartupGraphics.
Use of SDL_GetVideoInfo made useful (instead of bypassed).
Created VID_SetMode_vid to do actual mode setting, to reduce
duplicated effort.
Extensive video reporting using verbose switches "-v" and "-v2".

*** w80_testbpp
patchfile = w80_testbpp.patch
- committed revision 904   by wesley johnson
Adds a command line switch "-testbpp", that forces the bpp requested to
succeed.  The hardware actually uses the native bpp and converts the
drawn bpp in I_FinishUpdate.  This is meant for test and development of
the extended bpp draw modes, when matching hardware is not available.
This code is conditional on the TESTBPP macro, and only exists in
sdl/i_video.c at this time.

*** w80_draw16_ext
patchfile = w80_draw16_ext.patch
- committed revision 905   by wesley johnson
Moved common draw routine from r_draw8.c to r_draw.c.
Fixed r_draw8.c to use ybytes instead of width.
Added translucent_index variable and field because translucentmap ptr
only worked for palette based drawing.
Fix r_draw16.c so that 15 and 16 bpp draw functions work.
Create new draw functions for those that were missing.
Create transparent and fog effects using shift and add of 15 and 16 bpp pixels.
Has many alternative code sections for further experimentation.

*** w80_fade16
patchfile = w80_fade16.patch
- committed revision 906   by wesley johnson
Fix screen fade effects for 15/16 bpp drawing.

*** w80_testbpp_8
patchfile = w80_testbpp_8.patch
- committed revision 907   by wesley johnson
Explicit reject of -bpp 8 -testbpp.

*** w80_r_draw
patchfile = w80_r_draw.patch
- committed revision 908   by wesley johnson
Makefile must compile r_draw.c anytime any r_draw8.c, r_draw16.c,
r_draw24.c or r_draw32.c is modified.
Add empty r_draw24.c and r_draw32.c.
Fuzztable offsets needed to be multiple of pixel size.

*** w80_SDL_video_error
patchfile = w80_SDL_video_error.patch
- committed revision 909   by wesley johnson
Fixes SDL port driver so that StartupGraphics does not return unless
has valid video mode and display.  Print appropriate error message to
stderr.

*** w80_draw_endian
patchfile = w80_draw24_endian.patch
- committed revision 910   by wesley johnson
Fix DrawPixel for big endian machines.

*** w80_draw_24bpp_create
patchfile = w80_draw24_create.patch
- committed revision 911   by wesley johnson
Create functions for DRAW24 mode.
Fill in functions in r_draw24.c and other support.
Improved fog.
Not fully optimized.

*** w80_draw_32bpp_create
patchfile = w80_draw32_create.patch
- committed revision 912   by wesley johnson
Create functions for DRAW32 mode.
Fill in functions in r_draw32.c and other support.
Not fully optimized.

*** w80_green_console
patchfile = w80_green_console.patch
- committed revision 913   by wesley johnson
Fix green console to be more readable and not distort colors in 15..32 bpp.
Add GREEN_TINT_255 control, set to 0x16.
Dim background to 25% for higher contrast (gray green).

*** w80_fade_32
patchfile = w80_fade_32.patch
- committed revision 914   by wesley johnson
Fix fade effects for 24/32 bpp drawing

*** common/colortst.wad
- committed revision 915  by wesley johnson
colortst.wad update for fog effects

*** w80_background_border_32
patchfile = w80_backborder32.patch
- committed revision 916   by wesley johnson
Fix background border not filling screen in DRAW32 and other video
modes.  Needed to multiply side size by bytepp.

*** w80_video_init
patchfile = w80_video_init.patch
- committed revision 917   by wesley johnson
Change V_Init to V_Init_Draw, and make it responsible for setup of
draw variables for DrawPixel and other v_video draw routines.
Have it make needed palette (palette was missing during intro screens).

*** w80_linux_xshm
patchfile = w80_linux_xshm.patch
- committed revision 918   by wesley johnson
Update linux xshm to latest interface and improve code.
Can handle drawing in -native bpp mode, -highcolor, -truecolor modes, and
using -bpp.
It will setup direct draw to the image buffer using native bpp (-native).
This does not change the hardware bpp, nor the previous method of leaving the
hardware bpp at the system setting, and converting our 8bpp draw buffers to it.
Changing hardware bpp is possible, I just cannot find the docs at this time.

*** w80_linux_ggi
patchfile = w80_linux_ggi.patch
- committed revision 919   by wesley johnson
Update linux ggi to latest interface and improve code.
Can handle drawing in -highcolor, -truecolor modes, and using -bpp.
Will change hardware bpp.
Does not detect native bpp.
This has not been test compiled as I do not have ggi libraries.

*** w81_cleaning
patchfile = w81_cleaning.patch
- committed revision 920   by wesley johnson
Fix comments, add {}, remove dead code and obsolete commented out lines.
Align code.
Cleanup some messy code arrangements to cleaner equivalent.
Rename enum items cl_ to CLM_.
Rename SendRam to SendData.
Rename enum freemethode_t with SF_ to enum TAH_e with TAH_,
because of confusion with other enums, and gave the enum more descriptive names.
Make KICK defines into an enum kick_msg_e.
Rename enum filestatus_t to filestatus_e.
Rename fwriteshort to fwrite16, fwritelong to fwrite32.

*** w81_Doom2Map8
patchfile = w81_Doom2Map8.patch
- committed revision 921   by wesley johnson
Missing break stmt in switch stmt.
Doom2 Map8 is dropping into secret level code,
even though it is not a secret level.

*** w81_pain_skullspawn
patchfile = w81_pain_skullspawn.patch
- committed revision 922   by wesley johnson
Fix bugs and irritations in pain elemental, skull spawning.
Skull limit code made conditional on demoversion, using EN_skull_limit.
Pain elemental skull spawning made conditional using EN_old_pain_spawn.
Checks added for skulls and pain elementals attacking dead monsters,
may not be needed, but will test.
Formally init target and tracer ptrs in mobj.

Fixed skull spawning using a version of Boom code that checks on line
crossings.  Partial checking code already present was rewritten into
P_CheckCrossLine.
Skulls no longer spawn into void walls.

Pain elementals fixed so if there is not room to spawn skull, it silently
removes the skull instead of sending it down to floor to explode.
Conditional code is present for:
(REMOVE) remove skull (like Edge) (currently selected),
(KILL) explode in place (like prboom) (disabled),
(DAMAGE) which causes it to explode on floor (previous Legacy) (disabled).

*** w81_savegame_buffer
patchfile = w81_savegame_buffer.patch
- committed revision 923   by wesley johnson
Fix for bug_3442118, where Hell Ground wad (hg.wad) map04 will overrun
the savegame buffer.
Increased the reserved free space from 2K to 4K, and the header buffer size.

*** w81_fogsheet
patchfile = w81_fogsheet.patch
- committed revision 924   by wesley johnson
Fogsheet improvements.
Drawing routines for fog sheet with shifting effects, using mid texture.
Mid texture determines the color of the fog, and the intensity of the
shifting pattern.
Fog is not finished.

*** w81_Boom_translucent
patchfile = w81_Boom_translucent.patch
- committed revision 925   by wesley johnson
Fixed Boom translucent linedef 260.
Tagged lines now get the translucent effect too.
Recognizes and uses named translucent lumps introduced by linedef 260.
Analyzes Boom translucent lumps to get alpha for DRAW15, DRAW16,
DRAW24, DRAW32, and opengl draw modes, which now work.
Will draw using closest existing translucent implementation, or use
analyzed alpha.
Added TRANSLU_75 in RGB draw routines, to implement a 75/25% translucent draw.
OpenGL does draw the translucent textures in BOOMEDIT.WAD,
but does not draw other transparent textures behind the closest one.
OpenGL also fails to draw transparent over the switches in hg.wad,
due to unknown causes.

*** 
- committed revision 926   by wesley johnson
Add files r_draw24.c, r_draw32.c, which were missing.

*** w81_Boom_colormap
patchfile = w81_Boom_colormap.patch
- committed revision 927   by wesley johnson
Boom deepwater colormap fixed.
Effect menu has selections for Boom Deepwater colormap effect:
Sector colormap (Boom colormap behaves same as Legacy colormaps),
Boom visible colormap (where colormap is visible like in legacy),
Boom colormap (where the colormap is not visible like in Boom),
and Boom detect (which adjusts according to detected Boom and Legacy linedefs).
The Boom colormap selections make the Boom deep water sectors appear
normal until walked into, then the deepwater colormap will have global effect.

*** w81_Boom_pusher
patchfile = w81_Boom_pusher.patch
- committed revision 928   by wesley johnson
Gave the Point pusher a square law effect (enabled by mbf_support),
as in prboom (an MBF feature actually, Boom is not square law).

*** w81_door_thinker_check
patchfile = w81_door_thinker_check.patch
- committed revision 929   by wesley johnson
Derived from prboom fixes doc (cph 2001/04/05).
Doom bug: cannot raise a door when ceiling action is in same sector.
Add check to door logic that ceiling action being modified is a door action.
This also prevents corruption of the ceiling action.

*** w81_wad_to_angle
patchfile = w81_wad_to_angle.patch
- committed revision 930   by wesley johnson
Note prboom fix doc (cph 2001/04/05), of Vanilla Doom bug found by Ville Vuorinen.
Signed mapthing_t angle would create table lookup using negative index.
Fix uses new func, wad_to_angle(), to isolate the signed wad field, from
unsigned angle_t usage.
It does not emulate the Doom buggy behavior.

*** w82_colortst_wad
wads/colortst.wad
- committed revision 931   by wesley johnson
Fog sheets

*** w82_bex_frame
patchfile = w82_bex_frame.patch
- committed revision 932   by wesley johnson
Fix strcmp error in BEX parsing of FRAME and PARS.
Fixes hg.wad, eye shooting missiles.

*** w82_hw_translucent_order
patchfile = w82_hw_translucent_order.patch
- committed revision 933   by wesley johnson
Fix hardware render to draw translucent in distance order.
This fixes BOOMEDIT.WAD.

*** w82_hw_Boom_colormap
patchfile = w82_hw_Boom_colormap
- committed revision 934   by wesley johnson
Boom deepwater colormap fixed in hardware renderer.
Extend view_colormap to affect hardware render too.

*** w82_get_gl_info
patchfile = w82_get_gl_info.patch
- committed revision 935   by wesley johnson
Bug 3419447.
Fix buffer overrun of DBG_Printf strings by video card extensions.
Create common function, Query_GL_info(), to get GL info strings,
check renderer, and set gl_extensions string and oglflags.
Create DBG_Print_lines() function to print extension strings on multiple
lines, and prevent buffer overrun.
Change SDL, Win32, X11 opengl port drivers, to use these functions.
In DBG_Printf(), when verbose, print to stderr too;

*** w82_CONS_Printf_va
patchfile = w82_cons_printf_va.patch
- committed revision 936   by wesley johnson
Fix buffer overruns caused by vsnprintf to buffer without string termination.
Create function CONS_printf_va() to handle va_list printing to console.
This replaces multiple copies of print buffers and vsnprintf.

*** w82_hw_obj_colormap
patchfile = w82_hw_obj_colormap.patch
- committed revision 937   by wesley johnson
Fix hardware render so that colormaps affect objects too.
Fixed HWR_RenderPlane to have colormap parameter, so can pass in floor
and ceiling colormaps, same as in software renderer.

*** w82_hw_StoreWall_float
patchfile = w82_hw_StoreWall_float.patch
- committed revision 938   by wesley johnson
Change HWR_StoreWallRange to have float operands.  Part of the code
treated them as 0.0 to 1.0, and part was integer like the software
renderer.
General spelling fixes, replace some stub decl with proper include.

*** w83_filestatus_e
patchfile = w83_filestatus_e.patch
- committed revision 939   by wesley johnson
Fix filestatus_t stragglers to be filestatus_e.

*** w83_get_gl_info_char
patchfile = w83_gl_info_char.patch
- committed revision 940   by wesley johnson
Fix get_gl_info for (char*) type warnings on newer compilers.

*** w83_fs_linetrigger
patchfile = w83_fs_linetrigger.patch
- committed revision 941   by wesley johnson
Condense some of the door, switch, and other line trigger code.
Fix some floor and switch code to detect incomplete fragglescript
created linedefs (no sidedefs, no frontsector),
and skip secondary actions that would have segfault.
Fix fragglescript to init more fields in temp linedef to some safe
value.
Fixes win32 crash on fragglescript teleport, per Bug 3185357.

*** w80_win32_vid_fixes
patchfile = w80_win32_vid_fixes.patch
- committed revision 942   by wesley johnson
This is not in order, was in the w80 patch series, but did not get committed.
Minimal fix of win32 port drivers for the new vid structure.
This is a temporary fix, as they need to be rewritten.

*** w83_draw32_remove_printf
patchfile = w83_draw32_remove_printf.patch
- committed revision 943   by wesley johnson
Remove a debugging printf that is in svn, but not in my working files.

*** w83_num_skincolor
patchfile = w83_num_skincolor.patch
- committed revision 944   by wesley johnson
Change MAXSKINCOLORS to NUMSKINCOLORS, which is how it is used.
Moved in doomdef as it is dependent upon code, not a setting.
Caused confusion in understanding code.

*** w83_fs_func_safety_checks
patchfile = w83_fs_func.patch
- committed revision 945   by wesley johnson
General cleanup on all fragglescript functions.
Move error code to after return, for speed.
Added many checks for valid mobj and fields that could segfault in fragglescript.
Fixed much of fragglescript code fragility.
There is a compile-time var, OLDBEHAVIOR, that disables some fixes
that would change some details of fragglescript behavior.  It is
assumed that no scripts depend upon these details, but the switch is
included for debugging.  Phobia and hth2 were tested and seem unaffected.
Changed fixedvalue to access int arg directly, which saved 6K in code.
Added comments.

*** w83_fs_op
patchfile = w83_fs_op.patch
- committed revision 946   by wesley johnson
General cleanup on all fragglescript operations.
Move error code to after return, for speed.
Added comments.

*** w83_fs_func_old
patchfile = w83_fs_func_old.patch
- committed revision 947   by wesley johnson
Remove OLDBEHAVIOR code in fragglescript functions.

*** w83_makefile
patchfile = w83_makefile.patch
- committed revision 948   by wesley johnson
Move OBJ of an interface to that interface makefile section.
Made WIN32 interface compilable (which uses different names than the
others).
Removed strange i_cdmus_o var.
Created MAINOBJ var.
Moved linux_x common OBJ (in xshm and ggi) to a common OBJ assign,
leaving only the video.

*** w83_cdmus_optional
patchfile = w83_cdmus.patch
- committed revision 949   by wesley johnson
Make CD-music a makefile compile option.
Setting CDMUS (default is CDMUS=1) in the makefile enables compiling CD
music code.  Without CDMUS, all CD code is removed, including cd-volume
controls.  This allows compiling without some special libraries, that
some interfaces require.
To override default, use NOCDMUS on the make command line, or edit
makefile.
> make NOCDMUS=1

*** w83_fs_array_camera_spec
patchfile = w83_fs_array_spec.patch
- committed revision 950   by wesley johnson
General cleanup on fragglescript array functions,
camera functions, and spec functions (if, elseif, while, for).
Move error code to after return, for speed.
Added comments.

*** w83_fs_script_parse
patchfile = w83_fs_script_parse.patch
- committed revision 951   by wesley johnson
General cleanup on fragglescript script and parse functions.
Move error code to after return, for speed.
Added comments.

*** w83_fs_func_doc
patchfile = w83_fs_func_doc.patch
- committed revision 952   by wesley johnson
Update the fragglescript function docs to the actual code
implementation.
Fix some comments in the code.

*** w83_wipe24
patchfile = w83_wipe24.patch
- committed revision 953   by wesley johnson
Fix wipe for 24bpp draw.  One index was not using bytepp.

*** w84_palette24
patchfile = w84_palette24.patch
- committed revision 954   by wesley johnson
Make color8_translate palette used by draw15, draw16, draw24, draw32,
respond to gamma settings, and palette changes, such as palette flash,
object pickup, damage red.

*** w84_ouchface
patchfile = w84_ouchface.patch
- committed revision 955   by wesley johnson
Previous ouchface fix was not complete.
Needed to set face priority to 8, to keep the ouchface visible for
more than one tic.
Self-damage code also needed ouchface fix.
Ouchface has mouth open wide, "ahhhh".

*** w84_compressed_patch
patchfile = w84_compressed_patch.patch
- committed revision 956   by wesley johnson
Fixes the patch combiner to handle compressed patches (which share some
of the patch columns).  It under-estimated the new size so it did
not allocate enough space for the combined patch, which causes it to
abort into using the picture format instead.
This fixes the elevator railings (SW1COMM) in Requiem.wad MAP08,
which use compressed patches.

*** w84_bob_spawn
patchfile = w84_bob_spawn.patch
- committed revision 957   by wesley johnson
An attempt to clear the player bob at spawn.
Remove some old commented out code.

*** w84_IPX_option
patchfile = w84_IPX_option.patch
- committed revision 958   by wesley johnson
Make IPX network code optional by a define in doomdef.
Makes all IPX code conditional on USE_IPX.
Enabled by default for those that have IPX headers.
This fixes bug in OpenBSD that does not have IPX, but where a specific
test is not in place.

*** w84_whatsnew
patchfile = w84_whatsnew.patch
- committed revision 959   by wesley johnson
Update whatsnew doc to current patch level.

*** w85_colormap_gen
patchfile = w85_1_colormap_gen.patch
- committed revision 960   by wesley johnson
Tune the legacy linedef colormap generate.
The wad alpha of 'a' to 'z' is now converted to 0..255 internally,
to avoid losing alpha intensity to conversion roundoff.
Fixed the drab color of hardware-render at high alpha caused by wrong
alpha conversion calc.

*** w85_mouse
patchfile = w85_2_mouse.patch
- committed revision 961   by wesley johnson
Rewrite of mouse handling, providing relative mouse motion like many other
ports use for SDL, and fixing the WarpMouse code in the absolute mouse motion
that we have been using.
Grabinput has been restored and made to work.
Provides option selection for grabinput.
Provides SDL port with selection for mouse relative or absolute.
Fixes OpenBSD mouse problem of bug/patch 3547682.
OpenBSD reports mouse motion x and y as separate events.  In DoomLegacy
later mouse motion events in a frame overwrote previous motion.  Mouse events
are now added (like Legacy2 and other ports examined).

*** w85_opengl_mode
patchfile = w85_3_opengl_mode.patch
- committed revision 962   by wesley johnson
SDL OpenGL is not switching video modes at all.
In my previous sdl rework, I forgot opengl video mode switch.
This fixes opengl video mode switch similarily to the others, and it now
switches video modes.

*** w85_statusbar_overlay
patchfile = w85_4_statusbar_overlay.patch
- committed revision 963   by wesley johnson
The statusbar and overlay were not positioned correctly in OpenGL.
The statusbar is now consistent for all video modes.
This fixes the overlay to use fdupy instead of dupy.

*** w85_secnode_freed
patchfile = w85_5_secnode_freed.patch
- committed revision 964   by wesley johnson
A previous patch in w79, sped up P_CheckSector, but made it vulnerable
to a second thing being removed by the player on a moving lift,
resulting segfault.  Removed the vulnerable nxt_ns ptr.
Instead, when test determines that secnode was freed then resort to
previous behavior of restarting from beginning of touching_thinglist.

*** w85_fixedcolormap
patchfile = w85_6_fixedcolormap.patch
- committed revision 965   by wesley johnson
Fix bug introduced by BOOM_COLORMAP, which segfaults when restoring
game saved during use of fixed_colormap.

*** w85_heretic_SWITCHES
patchfile = w85_7_heretic_switches.patch
- committed revision 966   by wesley johnson
Allow Heretic and Blasphemer PWAD to fully use the SWITCHES lump without
restricting it to only episode 4.
Other ports do not have any restriction on Heretic use of the SWITCHES entries.
Requested by a Heretic wad project.
Check for missing switch textures and default to use texture 1.

*** w86_viewer_colormap
patchfile = w86_1_viewer_colormap.patch
- committed revision 968   by wesley johnson
Make some BOOM_GLOBAL_COLORMAP code non-optional, for use with fog and
other colormaps.
Shortened some of the Boom Colormap Option text strings so they fit
low-res screens.  This affects saved configs.
Move BSPVIEWER code to r_main and make it non-optional.
Add test for colormap fog using viewer_extracolormap.  This is not
very good fog but at least it works now as documented.

*** w86_FF_cleanup
patchfile = w86_2_FF_cleanup.patch
- committed revision 969   by wesley johnson
Reorganize the FF_flags to be understandable, and easier to test, and
to not hide important relationships.
FF_RENDERSIDES -> FF_OUTER_SIDES
FF_INVERTSIDES && FF_RENDERSIDES -> FF_INNER_SIDES
FF_ALLSIDES && FF_RENDERSIDES -> FF_OUTER_SIDES | FF_INNER_SIDES
FF_RENDERPLANES -> FF_OUTER_PLANES
FF_INVERTPLANES && FF_RENDERPLANES -> FF_INNER_PLANES
FF_BOTHPLANES && FF_RENDERPLANES -> FF_INNER_PLANES | FF_OUTER_PLANES
FF_RENDERALL -> FF_OUTER_SIDES | FF_OUTER_PLANES
FF_CUTLEVEL -> FF_CUTSOLIDS | FF_CUTEXTRA
FF_DOUBLESHADOW -> FF_SLAB_SHADOW
Rework the BSP Fake floor code to be understandable.
Change BSP ffloor to ffplane, because it tracks planes, and there are
too many ffloor references in the code that have other meanings.
ffloors -> ffplane
numffloors -> numffplane

*** w86_Glide_types
patchfile = w86_3_Glide_types.patch
- committed revision 970   by wesley johnson
Cleanup hardware typenames and structs.  Change to use uint32_t and uint16_t.
GlideMipmap_t -> Mipmap_t
GlideTexture_t -> MipTexture_t
GlidePatch_t -> MipPatch_t

*** w86_HWR_types
patchfile = w86_4_HWR_types.patch
- committed revision 971   by wesley johnson
Use type names xxx_t, and "typedef struct" in hardware struct defines.
FColorARGB -> ARGB_t
FRGBAFloat -> RGBA_float_t;
F2DCoord -> v2d_t;
FTransform -> FTransform_t
v3d_t, wallVert3D, FOutVector -> vxtx3d_t  (combined type, no more copy)
EPolyFlags -> PolyFlags_e
ETextureFlags -> TextureFlags_e
ESurfFlags -> SurfFlags_e
FSurfaceInfo -> FSurfaceInfo_t
hwdspecialstate_t -> hwd_specialstate_e
hwdfiltermode -> hwd_filtermode_e
TGAHeader, *PTGAHeader -> TGAHeader_t

*** w86_5_misc
patchfile = w86_5_misc.patch
- committed revision 972   by wesley johnson
Cleanup some code to not have so many return stmts, code should exit
through only a few return stmts.
Cleanup unused functions and redirected functions.
R_GetFlatNumForName -> R_FlatNumForName  (like R_TextureNumForName)
P_FlatNumForName -> P_AddLevel_FlatNumForName (unused)

*** w86_hw_cache
patchfile = w86_6_hw_cache.patch
- committed revision 973   by wesley johnson
Cleanup of code in hw_cache, concerning bytepp, endian issues,
and much better draw code for the various bytepp switches.

*** w86_drawflags
patchfile = w86_7_drawflags.patch
- committed revision 974   by wesley johnson
Add drawflags and appropriate TF_ flags to hw_cache parameters so that do not
have global draw cache modifiers.

*** w86_hw_fx1
patchfile = w86_8_hw_fx1.patch
- committed revision 975   by wesley johnson
Fix hardware draw of fx1 translucent.
Fixes display of linedef 288 in opengl.

*** w86_hw_view_colormap
patchfile = w86_9_hw_view_colormap.patch
- committed revision 976   by wesley johnson
Fix the hardware draw of Boom and view_colormap.
Now see global colormap change with Boom deep water and colormap fog
in opengl mode.

*** w87_mobj_subsector
patchfile = w87_1_mobj_subsector.patch
- committed revision 977   by wesley johnson
Fix segfault in dsv4.  When wrong buttons are pressed player is hurt.
If they are pressed after getting the yellow key, then segfault.
There is a mobj without a subsector, and script code must check first.

*** w87_legacywad
patchfile = w87_2_legacywad.patch
- committed revision 978   by wesley johnson
The legacywad filename used cat_filename with a zmalloc buffer,
but cat_filename requires a buffer of MAX_WADPATH because it
terminates it with 0.  This caused segfault at program shutdown.
Fixed to use strdup after the cat_filename call.

*** w87_light255
patchfile = w87_3_light255.patch
- committed revision 979   by wesley johnson
Light calculations are done in range 0..255.  The LIGHTSEGSHIFT is
only performed at the table lookup.  The extralight is now 0..255.
Calculate the wall orientation light outside of loops.
Simplified much of the light table code.

*** w87_camera
patchfile = w87_4_camera.patch
- committed revision 980   by wesley johnson
Chase camera is now fixed to be usable with splitscreen players, with
the first player getting the chase camera.
This could be expanded to allow two chase cameras now, but the chase camera
gets hung up going through doorways, so I do not recommend it.

*** w87_viewer_display
patchfile = w87_5_viewer_display.patch
- committed revision 981   by wesley johnson
Simplified code of player weapon display by using viewer variables.
Disabled debug printf statement concerning netvars.

*** w87_fs_misc
patchfile = w87_5b_fs_misc.patch
- committed revision 982   by wesley johnson
A portion of w83_fs patches that seems to have got left out.

*** w87_extralight_misc
patchfile = w87_5c_extralight__misc.patch
- committed revision 983   by wesley johnson
A portion of w87_light255 patch that seems to have got left out.

*** w87_translucent
patchfile = w87_6_translucent.patch
- committed revision 984   by wesley johnson
Augmented translucent draw to handle alpha of 0..255 for all draw modes.
DRAW8PAL can now draw translucents by reversing translucent table usage.
RGB draw modes can now draw spans using arbitrary alpha.
Simplified flat draw using some new global variables.
Water can now be drawn with a translucent alpha > 128.

*** w87_plane_merge
patchfile = w87_7_plane_merge.patch
- committed revision 985   by wesley johnson
Hardware render sort changed to merge when adding plane.
Indented code in p_mobj.c.

*** w88_LinkFFloor
patchfile = w88_1_LinkFFloor.patch
- committed revision 986   by wesley johnson
Changed P_AddFFloor to P_LinkFFloor, for clarity.
Changed flags parameter type to uint32_t.
Cleaned up some comments and indenting.

*** w88_fogwater_decode
patchfile = w88_2_fogwater_decode.patch
- committed revision 987   by wesley johnson
Create data structures for translucent effects.
Create effect options for "water effect", and "fog effect".
Change linedef decoding for new water and fog effects, affecting
301 (translucent water), 302 (fog), 304 (opaque water).
Each of these can use the following alpha and fog selection.
For opaque water, it only affects the fog inside.
The #xxx in upper texture that set the alpha now also selects the fog
effect, and the alpha can be 0..255.
Syntax  #xxxF, xxx is the alpha (0..255) and F is the effect.
'A': FW_clear, no fog  (old WATER default)
'B': FW_cast,  paint all surfaces with textures
'C': FW_colormap, use colormap fog (which only colors all sectors)
'D': FW_inside, render inside side, plane views (old FOG)
'E': FW_foglite, outside side, plane views, low alpha overall fog sheet
'F': FW_fogdust, outside, when in fog apply overall fog sheet (FOG default)
'G': FW_fogsheet, outside, overall fog sheet, sector join fog sheet
'H': FW_fogfluid, outside, inside fluid, fogsheet
This only handles the linedefs, the code that draws these is in later patches.

*** w88_extralight
patchfile = w88_3_extralight.patch
- committed revision 988   by wesley johnson
Simplify the addition of extralight and orient light, removing many tests,
by precalculating the extralight for different situations.
Create extralight_cm (3/4 of extralight) for colormap fog,
and extralight_fog (1/2 of extralight) for FF_FOG.
Light precedence is now  FF_FOG, colormap fog, translucent, normal.

*** w88_fogdraw
patchfile = w88_4_fogdraw.patch
- committed revision 989   by wesley johnson
Rewrite all fog draw functions to new specifications.
Average 3 source texture pixels to generate fog color, except DRAW8PAL
which can only average 2 pixels.
Use of fog alpha.

*** w88_fogface
patchfile = w88_5_fogface.patch
- committed revision 990   by wesley johnson
Create the fog face sheets needed for some fog modes.
Draw the fog face sheets when in such foggy sectors.

*** w88_fogjoin
patchfile = w88_6_fogjoin.patch
- committed revision 991   by wesley johnson
Create fog sheets at fog joins for the fogsheet fog model.
This lessens the visibility with distance similar to true fog ray
tracing, but using what is available in this map model.  It tolerates
well mixing fog and non-foggy sectors, which other methods would not.

*** w88_hwfogdraw
patchfile = w88_7_hwfogdraw.patch
- committed revision 992   by wesley johnson
Adds fog drawing and fog texture creation to hardware renderer.
Draw the fog face sheets when in foggy sectors.

*** w88_hwfogjoin
patchfile = w88_8_hwfogjoin.patch
- committed revision 993   by wesley johnson
Create fog draws of join sheets for FF_JOIN in hardware render.

*** w88_hw_waterside
patchfile = w88_9_hw_waterside.patch
- committed revision 994   by wesley johnson
Fix split wall draws so that hardware renderer draws water sides with
3dfloor backsectors, and they are drawn translucent.

*** w88_docs
patchfile = w88_10_docs.patch
- committed revision 995   by wesley johnson
Update editing and whatsnew for alpha 4 release.

*** fogtst.wad
file = common/wads/fogtst.zip
- committed revision 996   by wesley johnson
A wad to test fog effects.

*** w88_alpha4
patchfile = w88_11_alpha4.patch
- committed revision 997   by wesley johnson
Update whatsnew doc for alpha4 release.

*** w88_alpha4_version
patchfile = w88_12_alpha4ver.patch
- committed revision 998   by wesley johnson
Update alpha4 VERSIONSTRING.

*** w88_blockfill
patchfile = w88_13_blockfill.patch
- committed revision 999   by wesley johnson
A previous patch ( w86_hw_cache, svn973 ) caused a bug, triggered when an imp
shoots a fireball.
Used the block ptr as a loop var and returned the same to the caller.
Fixed by giving the loop its own copy of the ptr.

*** w89_offset_patch
patchfile = w89_1_offset_patch.patch
- committed revision 1000   by wesley johnson
FreeDoom is using large patches, with an offset to select a portion.
A single patch texture, with an offset, was generating the wrong
texture.  This detects these and uses the multiple patch combine
generation instead.  Large patches also are directed to multiple patch
combine to avoid multiple large copies of the same patch.

*** w89_savegame_buffer_size
patchfile = w89_2_save_size.patch
- committed revision 1001   by wesley johnson
Second fix for bug_3442118, where Hell Ground wad (hg.wad) map04
could still overrun the savegame buffer.
Increase savegame min free buffer to 64K.
Requires 12643 to write thinkers of hgh2.wad.  If was close to write
trigger that would overrun the 4K free space.

*** w89_boom_translucent_load
patchfile = w89_3_boom_tranlsu.patch
- committed revision 1002   by wesley johnson
RGB draw modes sometimes also use translucent table.
Load the lump for all draw modes.

*** w89_hardware_draw_over_deepwater
patchfile = w89_4_hw_draw_deepwater.patch
- committed revision 1003   by wesley johnson
In ic2005.wad there are three situations where textures are drawn pegged
to mobile deepwater sectors.
1) A translucent over a deepwater door.
2) A transparent texture (electric arc) under a deepwater ceiling.
Pushing a switch turns it on and off.
3) A thin texture used for grid flooring, with deepwater ceiling to move it.
Two sided middle textures must be pegged to the original ceiling,
not to the deepwater sector.
Fixes bug 3169993.

*** w89_heretic_finale
patchfile = w89_5_heretic_finale.patch
- committed revision 1004   by wesley johnson
Fix bug 0799500.
After Heretic E2M8 ending pic, the palette was not restored.
The finale heretic code now a separate func, another state for heretic
finale has been provided (to avoid showing the cast),
and the palette is restored after the underwater pic has been shown.

*** w89_kill_sfx
patchfile = w89_6_kill_sfx.patch
- committed revision 1005   by wesley johnson
Fix bug 3078850, chainsaw sound plays full length.
Many fixes in sound effects playing.
Fixed StopSound to work, needed for chainsaw.
Added flags to sounds to control tests and sound killing,
(SFX_single, SFX_id_fin, SFX_saw, SFX_player, SFX_org_kill, and others).
Multiple sfx per origin are allowed as default.
Changed the tests for specific sounds in the port drivers to flag tests.
Updated port sound effect drivers, start sfx, stop sfx, kill flagged
sounds, update sfx param, sound is playing, and get sfx lump.
There is now a common GetSfx, which each port calls to get a sfx lump.
Ports (SDL, linux, os2, macos) now use priority and sound age when
too many channel requests.
Excessive volume detected now uses SoftError, and limits volume instead.
Removed duplicated sfx lump precache from port drivers, so now other
precache options work as intended.
Increased SDL to 16 channels.
The menu pistol sound will get killed early because setup stops sounds
before releasing all the sound memory.  Previously, StopSound
did not work, so memory was released while the pistol was still playing.

*** w89_empty_chan
patchfile = w89_7_empty_chan.patch
- committed revision 1006   by wesley johnson
Fix SDL find empty channel search.  Search was init wrong.

*** w89_softerr
patchfile = w89_8_softerror.patch
- committed revision 1007   by wesley johnson
SoftError is mandatory, and no longer a compile option.
SoftError message changed to print "Warn:" instead.

*** w89_free_sound
patchfile = w89_9_free_sound.patch
- committed revision 1008   by wesley johnson
Fix problems in free memory of sound effect that caused Z_Free errors.
Notable when executing fragglescript ambiant sound (phobia.wad).

*** w89_boom_colormap
patchfile = w89_10_boom_colormap.patch
- committed revision 1009   by wesley johnson
Fix bug in Boom deepwater colormap support.
Would use bogus colormap at [-1] instead of using no colormap.
Bug would only show in opengl because opengl uses the rgba field instead
of the colormap table field, which was NULL.

*** w89_term_transform
patchfile = w89_11_term_transform.patch
- committed revision 1010   by wesley johnson
Make hardware render TERM_TRANSFORM the permanent choice, removing
the conditional compilation.  Removed the dead code that this creates.
Rename some functions.
Fix some spelling.

*** w89_corona
patchfile = w89_12_corona.patch
- committed revision 1011   by wesley johnson
Cleaned the hardware render corona code.
Revised the original corona draw, because it works better with sorted draw.
Created compilation options, and a menu choice.
Corona choices are
  OFF
  SPRITE (drawn with the sprite)
  DYN (drawn from dynamic lights)
  AUTO (decided by draw modes)
The SPRITE draw works the best with transparent walls, as it draws the
corona at the time the sprite is drawn.  This works well with sorted draw.
The DYN corona draw (dynamic lights) does not draw corona behind
translucent walls.
The dynamic lights must remain active because it provides the wall
lighting from things.

*** w89_draw_sorted
patchfile = w89_13_draw_sorted.patch
- committed revision 1012   by wesley johnson
Hardware drawn sprites would be occluded by transparent walls behind them.
A fixed draw order did not work.
Created hardware draw function that draws sprites and walls together
in depth order.
Draw Menu choices
  EARLY  (draw before sprites, oldest code)
  LATE   (draw after sprites, previous code)
  SORTED (draw sorted with sprites)
The EARLY draw works for transparent, but not translucent.
The LATE draw has distant transparent walls drawn over nearby sprites.
The SORTED draw has sprites drawn correctly for transparent and
translucent walls.
Later this menu item may be removed, with only draw sorted remaining.

*** w90_Makefile
patchfile = w90_1_makefile.patch
- committed revision 1013   by wesley johnson
Fix debug libs with CDMUS conditional.
Remove old dependencies.

*** w90_malloc
patchfile = w90_2_malloc.patch
- committed revision 1014   by wesley johnson
Remove old references to malloc.h, except for WATCOM.
Fixes bug 0000602, compiling under FreeBSD.

*** w90_tmap_asm
patchfile = w90_3_tmap_asm.patch
- committed revision 1015   by wesley johnson
Change asm source for name changes.
  dc_transmap -> dc_translucentmap
  colormaps -> reg_colormaps
Applied patch from Alexey Dokuchaev.
Fixes bug 0000604.
Added dr_alpha test and capability for alpha>128 to asm code.
Fixed asm to increment by vid.ybytes.
Makefile modified for asm support.
Due to complexity, asm will likely lag in getting fixes made to drawers.
It uses strange tricks for speed up, which are difficult to maintain.

*** w90_freemem
patchfile = w90_4_freemem.patch
- committed revision 1016   by wesley johnson
Fix "Free 0" console printout.
Fix FreeMem interface to indicate when guessing, and suppress printout
of guessed mem numbers.
FreeBSD, remove use of kvm which requires kmem priv, and use sysctl instead.
Applied FreeBSD patch from Alexey Dokuchaev.
Fixes bug 0000610.
Fixes partially bug 0601.

*** w90_legacyhome
patchfile = w90_5_legacyhome.patch
- committed revision 1017   by wesley johnson
Change preferred directory name for savegames to ".doomlegacy"
( "doomlegacy" for win/dos ).
Will also check for ".legacy" (legacy).
When not found, will create ".doomlegacy".
Fixes bug 0000609.

*** W91_rancking
patchfile = w91_1_rancking.patch
- committed revision 1019   by wesley johnson
Fix rancking spelling to ranking.

*** W91_trans_draw8
patchfile = w91_2_transdraw8.patch
- committed revision 1020   by wesley johnson
Fix bug in translucent draw of sprite for 8bit screens.
Set dr_alpha to 0 for all translucent sprite draws.
This affects phobia.wad fires, where would get random dr_alpha.

*** W91_flats_limit
patchfile = w91_3_flats_limit.patch
- committed revision 1021   by wesley johnson
Remove limits on flats.  AddFlats now automatically increases the
levelflats array when necessary.  Remove one use of alloca().

*** W91_alloca
patchfile = w91_4_alloca.patch
- committed revision 1022   by wesley johnson
Remove uses of alloca, replacing them with calloc, and explicitly
freeing the allocations.

*** W91_drawsetup
patchfile = w91_5_drawsetup.patch
- committed revision 1023   by wesley johnson
Convert video draw to use a setup function instead of passing a screen
parameter with each call.  Added additional functionality, and made
it more uniform across the various draw functions.  A single V_DrawSetup
now controls the attributes for a series of draw calls.
Added V_DRAWCENTER, to center the splash screen, finale, and menu
screens in the monitor window.

*** W91_bindfraggle
patchfile = w91_6_bindfraggle.patch
- committed revision 1024   by wesley johnson
Previously I had changed the command t_runscript to fs_runscript, but
now find that chex newmaps binds the t_runscript command to the z key.
Restore previous t_runscript and t_running commands for this purpose.
Chex newmaps scope works again.

*** W91_flats_limit_2
patchfile = w91_7_flatslimit2.patch
- committed revision 1025   by wesley johnson
Fix bug in W91_flats_limit.  Must zero new levelflats allocation,
because unanimated are left to default values.  Was failing after
about 5 to 7 loads of plutonia savegames.

*** W91_fragglescript_respawn
patchfile = w91_8_fraggle_respawn.patch
- committed revision 1026   by wesley johnson
Fix bug_3588902.
Create and Free Extra_Mapthing, used for FraggleScript created mobj
that can respawn or can Nightmare respawn.
Savegame now saves Extra_Mapthing as an optional section (see Sync).
This is needed for respawn queue.
Will still load old save games.
Changed savegame ptr tools to also handle savegame mapthing ptrs.
Fixed WRITE_MAPTHING_PTR and READ_MAPTHING_PTR to handle extra mapthing.
Previously they were presented with mapthing ptrs that were not part
of the mapthings array, and created bad indexes in the savegame.
Nightmare respawn modified to fix several bugs.
It had a mixture of previous fixes.  Added better fix for nightmare
respawn at (0,0) as used in prboom and eternity.
Fixed where in several respawn, the mapthing mobj was not being updated
for new mobj.

*** W92_Makefile
patchfile = w92_1_Makefile.patch
- committed revision 1027   by wesley johnson
Fix bug 0000605, bug 0000608.
Fix Makefile directory create problems.
There is now a make_options file that can hold all the local make
settings, which lessens the need to edit the Makefile.
When this file does not exist, the directories will be made.
Remove directory prerequisites, as they could never work (date changes
with every use).
Fix dependency make problems.  Dependencies are no longer loaded for
many housekeeping make commands, so make does not try to re-build them.
Remove -separate flag from sed.
Fix for compilation on W98 using MinGW.
Other makefile improvements.

Other musserv and sndserv makefiles have been combined with the linux makefile,
because of the duplication of maintenance.
Remove file: linux_x/musserv/Makefile.freebsd
Remove file: linux_x/musserv/Makefile.scoos5
Remove file: linux_x/musserv/Makefile.scouw2
Remove file: linux_x/musserv/Makefile.scouw7
Remove file: linux_x/musserv/Makefile.linux
Remove file: linux_x/sndserv/Makefile.scoos5
Remove file: linux_x/sndserv/Makefile.scouw2
Remove file: linux_x/sndserv/Makefile.scouw7
Add file: linux_x/musserv/Makefile

*** W92_Mac
patchfile = w92_2_Mac.patch
- committed revision 1028   by wesley johnson
Commit of extensive changes for Mac, and Mac using SDL.
Change MACOS to MACOS_DI (Mac Direct Interface) which is NOT SDL.
Mac using SDL defines MAC_SDL.
This is not a working solution for Mac, just the best current code.
Includes some useful optional debugging code.
Updates Makefile for selecting MAC, and some MAC options.

Add file "sdl/SDLmain.m"

*** W92_WinVid
patchfile = w92_3_winvid.patch
- committed revision 1030   by wesley johnson
Commit of more changes to video draw in Win32 code to make it
compatible with vid structure.  Untested.

*** W92_OS2_X11
patchfile = w92_4_Os2_X11.patch
- committed revision 1031   by wesley johnson
Commit of more changes to video draw in OS2 code and Linux X11 code
to make use of new generic video draw functions.  Untested.

*** W92_keys
patchfile = w92_5_keys.patch
- committed revision 1032   by wesley johnson
Implement changes to keycodes in DOS, OS2, LINUX_X, and WIN32 ports.
Previous changes to Some KEY names were only in SDL.
This only makes it possible to compile and some ports may only have
one usable joystick.  Mostly Untested.

*** W92_stricmp
patchfile = w92_6_stricmp.patch
- committed revision 1033   by wesley johnson
Change uses of stricmp and strnicmp to strcasecmp and strncasecmp.
Added comments in many places.
Other cleanup.

*** W92_hw_bsp_inits
patchfile = w92_7_hw_bsp_inits.patch
- committed revision 1034   by wesley johnson
Init some polyvertex variables in hw_bsp.

*** W92_includes
patchfile = w92_8_includes.patch
- committed revision 1035   by wesley johnson

Addfile  doomincl.h
Removefile  macos/p_spec.h

Reorganize doomdef.h and doomtype.h into:
doomdef.h  = defines only, usable in H files
doomtype.h = typedefs, system detection, usable in H files
doomincl.h = doomdef.h + doomtype.h + common functions and variables
    First include in most C files so that precompiled headers get the
    most benefit.
    Defines WINVER, so doomincl.h must precede some lib includes that would 
    define WINVER first (Redefine error).
    Moved logstream and debugging files to doomincl.h.
Fixed the includes in almost every H and C files.  Added many includes
to cover usage in the H or C file.  Removed some includes due to changes.
Changed include defines to xx_H, to be in our namespace
(and not in the __xx__ namespace, which makes it look like a system name).
General cleanup of things that would not normally be mixed with a code
change.
Cleanup of log headings, removing lines with no maintenance content.
Removed duplicate headers in some files.
Fix some macro naming and collisions.
Added headers to some files that were missing them.
Fixed indentation in some files.
Removed ZZ_Alloc macro, because it had little use and hid usage of Z_Malloc.
This touches almost every file.
Turned off some debugging defines, and changed names to avoid collision.
No code changes were made.

*** W92_winjoy
patchfile = w92_9_winjoy.patch
- committed revision 1036   by wesley johnson
Fix win32 joystick to use newer joystick interfaces.
Will allow two joysticks.
Untested.

*** W92_WaitVBL
patchfile = w92_10_waitvbl.patch
- committed revision 1037   by wesley johnson
I_WaitVBL is no longer used by sdl, nor the code, it never worked,
and most ports had dummy functions.
Now there is I_Sleep, that is used (in one place, optionally, as an
experiment).
Removed I_WaitVBL from all the ports, and added an I_Sleep function,
using usleep() from unistd.

- committed revision 1038   by wesley johnson
w92 10b
Remove extra I_Sleep in sdl.

*** W93_hw_same_vertex
patchfile = w93_1_hw_same_vertex.patch
- committed revision 1040   by wesley johnson
When using -opengl, FreeDoom Map09 had HOM in one particular passage.
Changed save vertex test to inequality cured the HOM.

*** W93_movecamera
patchfile = w93_2_movecamera.patch
- committed revision 1041   by wesley johnson
Fragglescript movecamera has only 6 param, but phobiata.wad has a call
with 7 param, and the game would freeze at that point.
Previous updates to fragglescript in W83 fixed the param checking.
Changed movecamera to more gracefully ignore the extra parameter, while
printing a warning message.

*** W93_interface
patchfile = w93_3_interface.patch
- committed revision 1042   by wesley johnson
Extensive divergence of the port code has occured, with some interfaces
being retired and others created.  Most of the ports had not been
updated.  This updates those critical interfaces and calls.
Makefile updated too, with passage of WIN_NATIVE define.
Filesearch code updated in most ports.

*** W93_ticrate_graph
patchfile = w93_4_ticrate_graph.patch
- committed revision 1043   by wesley johnson
Move ticrate graph generation to v_video, and remove it from port code.
There is only one copy to maintain now and every port has the same
response to vid_ticrate.
Gave the display a more consistent time axis.

*** W93_win_native
patchfile = w93_5_win_native.patch
- committed revision 1044   by wesley johnson
Extensive changes to get WIN_NATIVE port working again.
Now works in window and fullscreen, windows draw and Directx draw.
Tested in 8bpp and native bpp.
Has -win parameter to force windows drawing.

*** W93_hw_translu
patchfile = w93_6_hwtranslu.patch
- committed revision 1045   by wesley johnson
Fix hardware Boom 260 translucent draw of tagged linedefs.

*** W93_screendeg
patchfile = w93_7_screendeg.patch
- committed revision 1046   by wesley johnson
Add a -screendeg command line option, which is a generalization of
-left and -right.
A few comments and some #ifdef around some unused code.

*** W93_execute_script
patchfile = w93_8_execute_script.patch
- committed revision 1047   by wesley johnson
Fixes bug_589 (bug_3375763).
The execution of a bind button would fail because the string was parsed
without understanding the escaped quotes within quotes.
Fixed script detection to understand exec lines.
The syntax of button names with spaces in a quoted string is hard to
read, and error prone.  Have given the user the ability to name them with
underlines in place of the spaces.  Such names do not need to be quoted.
If the key name search fails then any underlines in the name are replaced
with spaces, and the key name search retried.  This also allows control
names to have underlines (which they currently do not).
This allows the messy
  alias ps0 "playersprites 0; bind \"mouse 3\" ps1"
to be specified as
  alias ps0 "playersprites 0; bind mouse_3 ps1"
which is much easier to read.

*** W93_docs
patchfile = w93_9_docs.patch
- committed revision 1048   by wesley johnson
Updated the docs legacy.html and whatsnew.html.

*** W93_viewheight
patchfile = w93_10_viewheight.patch
- committed revision 1049   by wesley johnson
Fix code that updates player viewheight to provide a slow rise and fall
for changes to the cv_viewheight.  Existing vanilla code could not cope
with changes in cv_viewheight because it required an external setup
to provide the delta.
Fixes bug_1296539.

*** W94_nosecret
patchfile = w94_1_nosecret.patch
- committed revision 1050   by wesley johnson
When there are no secrets, no possible kills, or no items on a level,
then draw a dash (minus) instead of 0%.

*** W94_mousemenu
patchfile = w94_2_mousemenu.patch
- committed revision 1051   by wesley johnson
Fix FR 3427586.
The mouse may move the menu ptr while using the keyboard.
The fix disables menu movement from the mouse for a short interval
(about 4 seconds) after each key press.  After the interval the mouse
can be used to move in the menus again.  Does not affect mouse clicks.

*** W94_soundeffect
patchfile = w94_3_soundeffect.patch
- committed revision 1052   by wesley johnson
Fix sound bugs in hth2.wad.
Read sound lump using plain name too, because hth2.wad does not have ds on
their amb sfx names.  The result was to fail and default to pistol.
Playing hth2.wad has the background ambiance sounds now.
Fixed crash due to using a lump for more than one sfx.  When one was freed
it would corrupt the data of the other.  Had to copy the sound data,
which for some ports is now copied three times.
Fix AddSound to only remove a sound when sfx is full, and to use a
usefulness test.  The newsounds array is removed because it could not
be kept consistant with sfx existance.

*** W94_spritedraw_3dflr
patchfile = w94_4_spritedraw_3dflr.patch
- committed revision 1053   by wesley johnson
Fix problem with sprite ordering to 3d floors, where sprite on 3d
floor would be drawn under the floor.  This changes plane test to use
middle of sprite instead of toe and head, so that minor overlaps with
adjacent planes do not affect whole sprite.
It does not cure problem with railings, which are higher than dead
objects.

*** W94_demo144
patchfile = w94_5_demo144.patch
- committed revision 1054   by wesley johnson
Make 144 DL the demo format, with demoversion 144.
Add some fields, and a sync byte.  Fix the playback so that it now
plays our own demos correctly.

*** W94_b_random
patchfile = w94_6_b_random.patch
- committed revision 1055   by wesley johnson
Create separate random number generators for ambience, bots, and misc.
so that P_Random is not affected by every odd change.
A_Random for ambience, which was using M_Random.  This change should not
affect any demo playback that was working.
B_Random for bots and any other automation.  This was using P_Random
which strongly affects demos.  There should be no existing demos with bots.
New uses should use A_Random and B_Random.

*** W94_infight
patchfile = w94_7_infight.patch
- committed revision 1056   by wesley johnson
Fix conflict between infight and cv_monbehavior vars.
Include them in demo playing.

*** W94_Boom_demo
patchfile = w94_8_boom_demo.patch
- committed revision 1057   by wesley johnson
Add some more fixes for playing boom demos.  This fixes some segfault,
and incompatibilities but it still does not sync.
Added Boom stuckdoor code, but only enabled for Boom demo.

*** W95_Boom_MIDI
patchfile = w95_1_boom_midi.patch
- committed revision 1059   by wesley johnson
Fix playing Boom MIDI lumps on older SDL library.
Also cleaned up and commented the qmus2midi functions and qmus2midi.h.
OS2 was using a file to file version of qmus2midi, which does not seem to
be compiled.  Reconnected buffer to buffer version in OS2.
OS2 needs to be debugged.

*** W95_menu_sounds
patchfile = w95_2_menusounds.patch
- committed revision 1060   by wesley johnson
Add menu sounds to legacy.wad, and up legacywad version to 1.44.1.
Add menu sounds effects option and cvar.
Adapts menu sounds to game type, such as doom2 and heretic.
Updated legacy.wad from menu.wad.
New Legacy menu sounds are quieter than pistol shot used by Doom2.

*** W95_messages
patchfile = w95_3_messages.patch
- committed revision 1061   by wesley johnson
Reorganized the printing of messages to the console, stderr, log, and screen.
Created EMSG_flags to select destinations for messages.
There are EMSG selections for stderr text, error, console, log, verbose,
debug, and devparm.
These can be customized by port, and active destinations, without
changing all the print statements.
CONS_Printf and I_SoftError route messages according to the EMSG_flags state
Created GenPrintf() to route verbose and devparm messages to selected
destinations, replacing most uses of fprintf(stderr...).
Verbose and debug messages can now also go to the log and console.

*** W95_find_legacywad
patchfile = w95_4_find_legacywad.patch
- committed revision 1062   by wesley johnson
Search LEGACYWADDIR, default dir, and doomwaddir for legacy.wad.
Make MAC search of locations more like Linux.
Make access checks easier to maintain.
Simplify the DEFAULTDIR defines, easier to maintain, and all in one place.
Simplify function to create title line.

*** W95_mixer_file
patchfile = w95_5_mixer_file.patch
- committed revision 1063   by wesley johnson
Using music files with the old mixer has a problem with not being able
to read the file when executing doomlegacy when not in the executable
directory.  This only affects SDL_mixer version < 1.2.7, where the
current is 1.2.11.
Direct reads of the file will succeed, but SDL_LoadMUS() will fail, with
file or directory not found.
Add messages to report the cause of the problem.

*** W95_font1
patchfile = w95_6_font1.patch
- committed revision 1064   by wesley johnson
Added font1, a fixed width bit mapped font with a default palette,
that can be drawn before loading wads, and without font graphics or
palette from any wads. It is only for software render.

*** W95_early_graphics
patchfile = w95_7_early_graphics.patch
- committed revision 1065   by wesley johnson
Move the startup of Graphics to as early as possible.
This is to provide an error message screen and menu capability earlier
than before.
Also move Z_Init and COM_Init to be early to allow CV_RegisterVar,
and COM_AddCommand calls.
Fix I_StartupGraphics in all ports to allow calling more than once.
Provide a mode_fullscreen global to the port drivers to isolate them
from any cv_fullscreen setting, that is only used later in the startup
sequence.
Replaced many fprintf(stderr) calls in the port video files, with calls
to GenPrintf.

*** W95_menu
patchfile = w95_8_menu.patch
- committed revision 1066   by wesley johnson
Fix use of alphaKey field in menus for three conflicting things.
Converted the IT_ defines to an enum.
Added:
  IT_OPTION  = 0x3000,    // field
  IT_YOFFSET = 0x1000,    // alphaKey is offset
  IT_KEYID   = 0x2000,    // alphaKey is id
Changed the control menus to actually use the IT_CONTROL that is defined,
so the tests against IT_CONTROL now make sense.
Added using font1 for printing menu strings when use_font1 is set.

*** W95_linux_x11
patchfile = w95_9_linux_x11.patch
- committed revision 1067   by wesley johnson
Fix OpenGL failure for X11 video port.
Had to remove some changes made in w71_linux_x because that code is
part of a dll library (r_opengl.so), and the effect was to create two copies
of some variables.
Also, the dll library would not load because it tried to access some
variables in the main code (which it could not link to).
General revision of much of r_opengl dll and i_video_xshm.
Fixed compile of r_opengl dll due to variables, and made its log file
work (it cannot access any main program functions or variables).

*** W95_startscreen
patchfile = w95_10_startscreen.patch
- committed revision 1068   by wesley johnson
Reorganize the video startup.
I_StartGraphics makes a basic window that can display error messages.
I_RequestFullGraphics makes the transition to fullscreen, hardware modes,
opengl, and video depth selected by command line switches.
Introduce INITIAL_WINDOW size (800x600), which can be selected in doomdef.h.
This usually is large enough to actually read error messages.

*** W95_vidmode
patchfile = w95_11_vidmode.patch
- committed revision 1069   by wesley johnson
Convert port video function interfaces to use modenum_t, which records the
context of the mode number as well as the index.
Mode indexes have a range, usually 1..n.
Update all the ports to use this interface, although some are
incomplete and would not compile due to other missing functions.
This has changed the video code in many ports which have not been tested
for a long time.

*** W95_launcher
patchfile = w95_12_launcher.patch
- committed revision 1070   by wesley johnson
Introduce a built-in launcher so DoomLegacy can be started from an icon,
or start menu entry.
If there is an error during wad detection, or if the command line is
empty, the launcher will activate.
It puts up a screen that allows setting most of the command line switches.
The launcher will cycle until the settings do not result in a fatal error.
Once the launcher has accepted the settings, any further errors will
invoke I_Error.
There are a few switches, like -mb, that have already been processed
before the launcher executes.

*** W95_gltranswall
patchfile = w95_13_gltranswall.patch
- committed revision 1071   by wesley johnson
A negative distance test has been culling visible left walls (chain link).
The test is increased to -2000.0 to eliminate this with known walls.
Walls should not be longer than 1000.

*** W96_gcc4
patchfile = w96_1_gcc4.patch
- committed revision 1072   by wesley johnson
Compile fixes for gcc4.x complaints.

*** W95_savegamemenu
patchfile = w96_2_savegamemenu.patch
- committed revision 1073   by wesley johnson
Changes to menu constants in w95_8 exposed a misuse of the menu status field.
The misuse has been fixed with the actual constants the field should have.

*** W96_con_printf
patchfile = w96_3_con_printf.patch
- committed revision 1074   by wesley johnson
Fix CONS_printf to print on screen during after graphics started and
before entering main loop.
Add EMSG_now, to handle messages that need screen update immediately.
Change some Linux messages to also go to CONS.
Move some hardware messages to use Gen_Printf instead of doing their own
screen update.

*** W96_hw_poly
patchfile = w96_4_hardware_poly.patch
- committed revision 1075   by wesley johnson
Fix opengl render error that causes some texture draws to be missed.
Not all linesegs are getting into the sector polygons.  Added comments
to polygon code and cleaned up some routines.
Gave poly-vertex their own ptr in the segs, so are never confused with
fixed point vertex.
Added loop to check all segs for having poly-vertex, and add those
that do not so they also render.

Add file: hardware/hw_poly.h

*** W96_win32_native
patchfile = w96_5_win32_native.patch
- committed revision 1076   by wesley johnson
Updates to win32 native port code so that it compiles.
Fixes code so that it compiles, but execution on my machine is
crashing, which may be due to MinGW and library issues.

*** W96_stuckdoor
patchfile = w96_6_stuckdoor.patch
- committed revision 1079   by wesley johnson
Enable Monster stuck in door fixes from MBF and Boom.
Adv. Menu gets the stuckdoor control.
Saved to demo header and config.

*** W96_hw_misc
patchfile = w96_7_hw_misc.patch
- committed revision 1080   by wesley johnson
Change tests against -1 to < 0 or >= 0, to be more robust.
Fix Loading percentage box by setting Draw options properly.

*** W96_gdesc
patchfile = w96_8_gdesc.patch
- committed revision 1081   by wesley johnson
Update wad recognition
FreeDoom:
  file = "freedoom2.wad", "freedoom.wad", "doom2.wad"
Ultimate Freedoom:
  file = "freedoom1.wad", "freedu.wad", "doomu.wad"
Blasphemer:
  file = "BLASPHEM.WAD", "blasphem.wad", "heretic.wad"
Ultimate mode:
  mode = ultdoom_retail

*** W96_docs
patchfile = w96_9_docs.patch
- committed revision 1082   by wesley johnson
Update docs for revsion 1.45.

*** W96_cleardisplay
patchfile = w96_10_cleardisplay.patch
- committed revision 1083   by wesley johnson
Add V_ClearDisplay function to give decent display clear for OpenGL.
Fixes ghosting during CONS print scrolling.

*** W96_SoftError_text
patchfile = w96_11_softerror_text.patch
- committed revision 1084   by wesley johnson
Have CONS_Print do all of SoftError printing, so only stderr and stdout
only get one copy of the error message.

*** W96_OpenGL_func
patchfile = w96_12_opengl_func.patch
- committed revision 1085   by wesley johnson
Renamed some r_opengl funcs to VIDGL_xxx, so to identify them.
Renamed DL_SET_PALETTECOLOR to DL_SET_TINT_COLOR, to identify it as
the tint applied to opengl to imitate the palette flash.
Improved the efficiency of some r_opengl functions.
Separated DEBUG_SDL from DEBUG_MAC.

*** W96_win_sdl
patchfile = w96_13_win_sdl.patch
- committed revision 1086   by wesley johnson
Fixes several problems with SDL on win32 machine.
Fade of menu background is problem on Matrox.
Fixes to little white texture, which Linux does not seem to need.
Use glGenTextures, because the first texture id returned by it changes
on the second call.
OpenGL drawing everything in Red and Yellow was only fixed by
disabling Matrox polygon accell.
May still be an open issue, so some DEBUG_WIN code is still present.

*** W96_linux_event
patchfile = w96_14_linux_event.patch
- committed revision 1087   by wesley johnson
Update Linux event loop to be same as in SDL, to eliminate compiler
complaints.

*** W96_alpha5
patchfile = w96_15_alpha5.patch
- committed revision 1088   by wesley johnson
Revert VERSION and docs to 1.44 alpha5.
Fix check on legacy wadversion to accept 1.44 and 1.45.
The legacy.wad remains at 1.45.

*** W96_verbose
patchfile = w96_13c_verbose.patch
- committed revision 1089   by wesley johnson
Part of w96_win_sdl that did not get committed properly.
Removes use of verbose in opengl, because Linux_X will make a dll, and
the verbose will not be resolved at run-time.

*** W97_savegame_menu
patchfile = w97_1_savegame_menu.patch
- committed revision 1092   by wesley johnson
Fix several problems with savegame menu behavior.
Savegame menus will no longer wrap to top of menu.
They will return to the current scroll position when the menu is used
again.
Cleared status on unused savegame slots to prevent loading from them.
Added some SAVEGAME defined names to replace constants, and used them
throughout the savegame menu code.  This removed some latent bugs in places
where the code was not properly accounting for SAVEGAME compile options.
Clarified some of the names, organization, and use different names for
menu slots and savegame slots.

*** W97_fineangle
patchfile = w97_2_fineangle.patch
- committed revision 1093   by wesley johnson
The use of the sine, cosine, and tangent tables is complicated by
requiring several constants and a shift.  This has been encapsulated
in some macros that apply the FINESHIFT.
There also are some inline functions, but using them proved to be
inefficient, based on the increase in the file size.
The usages of FINESHIFT have been converted to use the new macros where
possible. Many usages use the fine angle table indexes more than once
(sine and cosine) and it proved to be difficult to hide the workings.
The most efficient code was favored which restricted the usage of the
new macros in many places.

*** W97_distance_angle
patchfile = w97_3_distangle.patch
- committed revision 1094   by wesley johnson
Fix some of the rendering errors with distant walls.  This was due to
errors in the angles to the wall end points.  The vanilla PointToAngle function
is so inaccurate that it hardly has any valid bits (5 out of 32 bits).
At that distance the error causes the left and right angle values to
have the wrong magnitude order (non-monotonic).  This causes some far walls to
be drawn over nearer walls, but not correctly, many times with HOM.
A more accurate function, SlopeDive_64, has been introduced, which
brings the accuracy up to 13 bits out of 32 bits (when compared to atan2).
This fixes most of the render errors on Europe.wad and longdays.wad.
There are still some walls not rendered due to distance, but they do not
occlude the nearer walls.

*** W97_hw_fineangle
patchfile = w97_4_hw_fineangle.patch
- committed revision 1095   by wesley johnson
Extend the FINEANGLE patches to the hardware code.

*** W97_hw_distance_angle
patchfile = w97_5_hw_distangle.patch
- committed revision 1096   by wesley johnson
Extend the distangle patches to the hardware code.
This does not have much effect because the OpenGL renderer has another
distance limit.  It does not draw the far distant walls at all.

*** W97_morphmobj
patchfile = w97_6_morphmobj.patch
- committed revision 1097   by wesley johnson
Change Heretic chicken to use a MorphMobj function that preserves the
current player mobj.  Fixes the Chicken and SkullPop functions to not
change the player mobj.  They would do so during Line attacks and
Damage.  This makes it safe for functions to keep a ptr to the player mobj.
Fix the Chicken attack to set the PuffType.  This stops the chicken
attack from creating a bogus player mobj on top of the attacked monster.

*** W97_playermobj
patchfile = w97_7_playermobj.patch
- committed revision 1098   by wesley johnson
Have many functions keep a variable to the player mobj (pmo).
This improves readability and reduces size a bit.
Cleanup some of the heretic code.  This is mostly indenting.
This does not change functionality.

*** W97_cleanup_indent
patchfile = w97_8_cleanup.patch
- committed revision 1099   by wesley johnson
Cleanup arrangement of many functions.
This is mostly line organization and indenting.
Some extern are moved to headers.  Some variables are renamed.
Some more uses of ANGLEFINESHIFT are changed to use ANGLE_TO_FINE().
This does not change functionality.

*** W97_bot
patchfile = w97_9_bot.patch
- committed revision 1100   by wesley johnson
Cleanup the bot code.  This is mostly indenting.
Some function sections were altered to use tables.
Some variables were added to share common calculations and remove
duplicate code.
This does not change functionality.

*** W97_quicksave
patchfile = w97_10_quicksave.patch
- committed revision 1101   by wesley johnson
The quicksave has been saving its descriptor one beyond the end of the
save descriptor array, overwriting several quicksave and save variables.
Every once and a while this causes a segfault, due to a corrupted slotindex.
This patch fixes the QUICKSAVE_INDEX, so it actually uses the last entry in
the array now.

*** W97_large_dist
patchfile = w97_11_large_dist.patch
- committed revision 1102   by wesley johnson
The previous patch, W97_distance_angle, did not completely fix
occurances of bad angles.  This patch has large distances ( x or y > 1/4 MAX)
use the atan2 function to calculate the angle, a fix from PrBoom.
It is slower but accurate.

*** W97_version145
patchfile = w97_12_version145.patch
- committed revision 1103   by wesley johnson
Update docs and version numbers for 1.45.

*** W97_patch_segfault
patchfile = w97_13_patch_sf.patch
- committed revision 1104   by wesley johnson
Legacy demo segfaults because a colormap is getting used as a patch in
a texture.  They both have the same name, BLUMAP.
This patch stops the segfault by detecting when a patch offset will
overrun the patch size.

*** W97_lumpnum
patchfile = w97_14_lumpnum.patch
- committed revision 1105   by wesley johnson
Cleanup some lump numbering to use an existing macros.
Some comments.

*** W97_lump_namespace
patchfile = w97_15_lump_namespace.patch
- committed revision 1106   by wesley johnson
Implement tracking of the wad namespace in the lump info.
A patch lump will be searched for within the PATCH namespace first,
and if not found then any lump of that name will be used.
This fixes the Legacy demo wad so the BLUMAP colormap and BLUMAP patch
occupy different namespaces.  The texture using the BLUMAP patch now
finds the correct lump and does not need to be rejected.

*** W97_wi_stats
patchfile = w97_16_wi_stats.patch
- committed revision 1107   by wesley johnson
Some player stats use a division by the total.  In wads where the
total was 0, there would be a division by zero.  There was inadequate
protection.  The protecting tests were expanded to protect all
divisions by the total.
Update docs to latest patches.

*** W100_savegame144
patchfile = w100_1_savegame144.patch
- committed revision 1115   by wesley johnson
The savegame format is the same in 1.45 as it is in 1.44, so allow it
to read 1.44 version savegames too.  Version 1.44 savegames may be
readable for many versions because of the coded modular nature of additions
to the format.

*** W100_DEH_Boss_death
patchfile = w100_2_DEH_Boss_death.patch
- committed revision 1116   by wesley johnson
DEH modified monsters should be able to trigger the Boss_death function
by using the Keen_death. This will trigger tag=666 sectors.
This restores the ability that was present in Vanilla Doom.

*** W100_infight
patchfile = w100_3_infight.patch
- committed revision 1117   by wesley johnson
Changes the way the menu infight control interacts with demo infight
settings and DEH infight selections.  The previous coop and infight
settings are defaults that can be overridden by DEH infight settings.
This is similar to other ports, and seems to be the expected behavior.
Added separate "Force Coop" and "Force Infight" menu control settings
that will override any DEH infight settings.  This allows the user to
still modify the infight behavior when they want.

*** W100_nomonsters
patchfile = w100_4_nomonsters.patch
- committed revision 1118   by wesley johnson
Restore the -nomonsters switch that got lost in the w95_startscreen patch.
Had intended to move it and lost it entirely instead.
There is no equivalent menu control.

*** W100_spawnfly
patchfile = w100_5_spawnfly.patch
- committed revision 1119   by wesley johnson
If a savegame has a flying cube, there may be a segfault.  The savegame
does not handle saving a braintarget as a mobj.  This fixes the SpawnFly
to get the previous braintarget when mobj->target is NULL.
This protects the flying cube code, and perhaps the savegame can be fixed
later too.

*** W100_docs
patchfile = w100_6_docs.patch
- committed revision 1120   by wesley johnson
Update docs for 1.45.1 bug fixes.

*** W100_stuck_3dfloor
patchfile = w100_7_stuck_3dfloor.patch
- commit revision 1121
Fix things collision check to ignore things on other 3dfloors.
The allows monsters placed on upper and lower floors to not get stuck
to each other.
Also make the things collision check not block for NOCLIP and not SOLID,
same as in prboom and compatible with boom demo.

*** W100_memtag
patchfile = w100_8_memtag.patch
- commit revision 1122
Change z_zone memory block tag to be named memtag, so that it does not
get confused with the linedef tag.

*** W100_flush
patchfile = w100_9_flush.patch
- commit revision 1123
Flush messages so the appear sooner.

*** W100_opengl_menu
patchfile = w100_10_opengl_menu.patch
- commit revision 1124
Straighten out some positioning in the opengl menu options, and gamma.

*** W100_opengl_tnt_doors
patchfile = w100_11_opengl_tntdoors.patch
- commit revision 1125
Fix the OpenGL rendering of the transparent doors in TNT Map21.
They need to be rendered full height when the middle texture is transparent
and the door is closed.

*** W100_makefile
patchfile = w100_12_makefile.patch
- commit revision 1126
Modify makefile for development work in the new directory structure.
It needed to support more options for compiling from alternative
working directories.

*** W100_docs2
patchfile = w100_13_docs2.patch
- commit revision 1129
Update docs for latest patches.

*** W100_sight_ffloor
patchfile = w100_14_sight_ffloor.patch
- commit revision 1127
Add function to check 3dfloors for sight lines.  This will prevent
monsters from trying to shoot the player through 3dfloors.

*** W100_greybox
patchfile = w100_15_greybox.patch
- commit revision 1128
They grey background text box is positioned and sized wrong when using font1,
as in the launcher menu, and the quit message from it.
There are several assumptions made by menu functions and conflicting
requirements, so have to correct the positioning in the few places where
the font1 and the grey box have unique code.

*** W100_swap
patchfile = w100_16_swap.patch
- commit revision 1130
For big endian machines, was missing in two places the reference to
include m_swap.h.
Fixes bug 617 as suggested by Alexey Dokuchaev.

*** W100_loadfail
patchfile = w100_17_loadfail.patch
- commit revision 1131
I got tired of starting Doom Legacy and finding some mistyped PWAD
file had not been loaded.  The default now is for Doom Legacy to ERROR
when a file does not load.
This can be overridden by the -noloadfail switch.

*** W100_version1451
patchfile = w100_18_version1451.patch
- commit revision 1132
Update version numbers for 1.45.1.

*** W100_docs3
patchfile = w100_19_docs3.patch
- commit revision 1133
Update docs for latest patches and version 1.45.1.

*** W101_chex_draw
patchfile = w101_1_chex.patch
- commit revision 1134
Chexquest Newmaps specific fixes.
Fix segfault when drawing black bars and crosshairs in software rendering.
These graphics were meant for OpenGL where they would be stretched.
Fixed the software rendering of V_DrawScaledPatch to stretch these specific
Pics to screen width.
Fixed names and comments of draw to reflect true nature of the centering.
Changed selection names to V_CENTERMENU and V_CENTERHORZ.
Fixed HU Pic allocation, support functions, and added accurate comments.

*** W101_clang_compile
patchfile = w101_2_clang.patch
- commit revision 1135
Fix Makefile for compiling using the clang compiler.
  CC_CLANG=1
Add options for specifying CC.
  CC_EXPLICT=clang,  explicitly specifies the CC command.
  CC_ENVIRONMENT  uses  CC ?= gcc  to give environment CC preference.
Fix the Makefile dependency building to not visit files that are foreign
to the selected port.
The select SMIF port selects the proper dependency additions.
  DEP_HARD
  DEP_X11
  DEP_DD
  DEP_OPENGL
  DEP_MINIGL
This eliminates the problem clang has when encountering includes of windows.h
while compiling from a Linux/BSD environment.
Fixes bug #607.

Added detection of the wrong port for port specific hardware files,
with #error lines to inform the developer of the required port.

The Makefile specifies a default SRC and BUILD directories.
This Makefile can be used from outside the src directory, or by setting
the MAKE_IN_SRC variable, it can be used from within the src directory.
Running Make from within the source directories is prefered during
program development because it is easy to compile one of the many source
directories, using canned scripts.  The current directory is compiled.
Running the Makefile from outside the src puts the src directory name in the
dependency files, which is inconvienent when compiling sequential updates
kept in separate src directories.

*** W101_command_buffer
patchfile = w101_3_command.patch
- commit revision 1136
Fixes bug #619, where Chexquest Newmaps command keys that run scripts for
the book are not getting executed.
There was a latent bug in the VS_Print function that is used to append text
to the command buffer.  With each append it accumulated an extra character
of length in the buffer.  This affected the positioning of the next append.
After two appends, it would be leaving some of the previous garbage in the
buffer between the commands, which could be 0.  This made it erratic when
there were more than two commands in one tic.
This fix removes the term 0 from the command string before appending.

*** W101_legacy_error
patchfile = w101_4_legacy_err.patch
- commit revision 1137
If there is a -game error then legacy.wad did not get loaded, which
triggered additional error messages.  Fixed to load legacy.wad even
when there is an error.

*** W101_mouse_release
patchfile = w101_5_mouse_release.patch
- commit revision 1138
When the game is paused, or a menu is opened, the mouse containment is
released so that other windows can be visited.

*** W101_version1452
patchfile = w101_6_version1452.patch
- commit revision 1139
Update version numbers for 1.45.2.
Update docs for latest patches and version 1.45.2.

*** W102_network_rename
patchfile = w102_1_network_rename.patch
- commit revision 1140
Rename vars and functions to be more readable and reflect what they do.
Fix spelling and syntax of comments, messages, and error messages.
Add comments.

*** W102_clisrv_cleanup
patchfile = w102_2_clisrv_cleanup.patch
- commit revision 1141
Cleanup of client/server code.  Add comments, simplify redundant
expressions, use some macros, more renaming.
Change to use a textbuf struct, textlen, and appropriate ptrs.
Use ptrs instead of repeated indexing.

*** W102_clisrv_rewrite
patchfile = w102_3_clisrv_rewrite.patch
- commit revision 1142
Rewrite of parts of client/server code.
Net node numbers are byte.
Breakup 300 line packet handler function into smaller functions.
Add comments.

*** W102_clisrv_type
patchfile = w102_4_clisrv_type.patch
- commit revision 1143
Change types, use byte, stdint instead of short, ULONG, USHORT.
Change some types to unsigned.  Change unused from -1 to 255 unsigned.
This makes for easier tests, no sign problems, and larger range.

*** W102_clisrv_func
patchfile = w102_5_clisrv_func.patch
- commit revision 1144
More cleanup of vars. Change type servernode to byte.
Make some errors use I_SoftError.
Simplify NetXCmd, Send_Tics.

*** W102_net_cleanup
patchfile = w102_6_net_cleanup.patch
- commit revision 1145
Cleanup of network packet functions.
Find unused vars in network packet header.
Change short to stdint types in packet header.  This should help with
64bit and 32bit machines playing together.

*** W102_net_ack
patchfile = w102_7_net_ack.patch
- commit revision 1146
Rename of network types, fields, macros, vars to be more readable, meaningful.
Cleanup of packet ack functions.
Comments.
Fix a bug in cancel ack function.

*** W102_netfile
patchfile = w102_8_netfile.patch
- commit revision 1147
Cleanup of file download functions.
Convert some I_Error to I_SoftError.
Make messages more understandable.
Use of ptrs makes for much smaller code.
Remove unused code.

*** W102_sayto
patchfile = w102_9_sayto.patch
- commit revision 1148
Talk network had broken code.  Cannot make work with old network code.
Used 0 broadcast, and for player[0], and -(0) for team of player[0].
Change talk packet to coding where:
0..127 = talk to player
0x80 | (0..127) = broadcast to player's team
255 = broadcast
Cleanup code for talk.

*** W102_net_error
patchfile = w102_10_net_error.patch
- commit revision 1149
Create net_error to return useful error codes from the Net functions.
Return boolean from I_NetGet and I_NetSend, so that network situations
can be handled without crashing the program.
Reorganize some of the low level network functions.
Comment the OS variations, network tests, and calls.

*** W102_console_open
patchfile = w102_11_console_open.patch
- commit revision 1150
Add a console_open state var.  Test it so that demos do not startup
and steal the display when the console is open.

*** W102_netnodes
patchfile = w102_12_netnodes.patch
- commit revision 1151
The player netnodes and utility netnodes are differentiated.
Provision is made for additional utility netnodes.
Network Ack is limited to player netnodes.  Tests are included to insure
that only player netnodes are used to index the Ack structures.
Comment the TCP network variations, and network node ranges.

*** W102_netcansend
patchfile = w102_13_netcansend.patch
- commit revision 1152
Allow Linux to use the I_NetCanSend test.  Linux select calls can alter the
timeval field value and write_set values.  They cannot be static,
must be init on each call.
Fix some error messages.  Add some comments.
Change some ipx socket address fields to stdint types.

*** W102_mserv
patchfile = w102_14_mserv.patch
- commit revision 1153
Cleanup MasterServer code.
Convert some MasterServer message fields to stdint types.
Fix bug in select call, Linux select modifies the parameters.

*** W102_ms_ping
patchfile = w102_15_ms_ping.patch
- commit revision 1154
The MasterServer code was using a player node to ping the MasterServer
with time packets.
New code, enabled with UDP_PING_SPECIAL, uses a utility net node, MS_PINGNODE,
for this pinging.  This allows 32 players.
A new function, UDP_Bind_Node, has been created to enable this.

*** W102_search_server
patchfile = w102_16_search_server.patch
- commit revision 1155
Fix the code to search for a server on the network.
Added config vars  server1, server2, server3, so the user can save
their server settings.  They can hold a server IP address such as
"192.168.1.1", or a network broadcast address such as "192.168.1.255.
The previous used broadcast address "255.255.255.255" was incorrect.
That only returns "network unreachable" messages, because the network
"255.255.255.0" is not known.
Fix the network IPX address print and bind functions.
Fix the network shutdown to not loop in error messages when the
network fails.

*** W102_filetx
patchfile = w102_17_filetx.patch
- commit revision 1156
Cleanup the code for server file transfer.
Cleanup code for client connect to server.
Use some meaningful return codes, so errors are propagated to the caller.
Use Filetx_file_cnt as enable, to reduce cache pollution from loading
the function just to find out there are no files.
Added config variable for download file disable, as a command line
switch was the only control.

*** W102_net_menu
patchfile = w102_18_net_menu.patch
- commit revision 1157
Create connect options menu.
Create multiplayer options menu.
Multiplayer menu can start server, or start dedicated server.
Create wait_players variable, which can be selected by the Start Server menu,
and the command line -server switch.
Create wait_tics variable, which can be selected by the Start Server menu.
Move connect, server, dedicated determinations to D_Startup_NetGame.
Cleanup functions affected.
Cleanup code around these changes.

*** W102_makefile
patchfile = w102_19_makefile.patch
- commit revision 1158
Fix problems with directories when compiling in Win32.
Fix some debugging of inline functions reported.

*** W102_wait_player
patchfile = w102_20_wait_player.patch
- commit revision 1159
Add menu to start network games while waiting for players with timeout.
The server command line options for start and connect can now be
done using the start server menu.
Add wait for player net nodes, add timeout for waiting.
Add display box for displaying the wait.
Add a net communication command to pass the current waiting state
to other waiting players.

*** W102_legacywad_error
patchfile = w102_21_legacywad_error.patch
- commit revision 1160
In patch  W101_legacy_error, a fix was made to stop a -game error from causing
a missing legacy wad.  That has caused a new error, when legacy wad itself
is not found.
Fix AddFile to not segfault when filename is NULL.
Fix previous patch to check for legacywad before trying to add it.

*** W102_macos_tcp
patchfile = w102_22_macos_tcp.patch
- commit revision 1161, 1162
Merged macos/i_tcp.c file into main i_tcp.c file.  There were very few
differences and I do not know if they were significant, or just old.
They have been recorded in i_tcp.c now, and the macos/i_tcp.c file deleted.

*** W102_mobj_return
patchfile = w102_23_mobj_return.patch
- commit revision 1163
Fix some mobj functions to have a final return stmt.

*** W102_cv_inc
patchfile = w102_24_cv_inc.patch
- commit revision 1164
Give the CV_Possible_t system an INC option.  This is used to increment the
wait time in 5 second increments.

*** W103_wadtool
zipfile = w103_1_wadtool.zip
- commit revision 1165
Wadtool has been missing from the legacy 1.45 build.
Copied and revised wadtool from legacy2.
Added directory switch to wadtool, to make it much easier to use in Makefile.
Added reading lump by file name or lump name, so that an extracted wad
can be rebuilt without having to change file names of the lumps.
New files: tools/wadtool.cc

*** W103_fixdep
zipfile = w103_2_fixdep.zip
- commit revision 1166
Windows and DOS do not have sed, which is used to add the obj/
directory to the dep file entries.
The tool, fixdep, will do the same operation, making the dep files work
on Windows and DOS.
New files: tools/fixdep.c

*** W103_makefile
zipfile = w103_3_makefile.zip
- commit revision 1167
Heavily rewrote all Makefiles to reduce user errors and miss-information.
Added Makefile to resources.
Added error detections, error messages.
Changed syntax of make_options.
Now uses OS= for operating systems.
Now uses CC_SELECT= for compiler select.
Main Makefile now invokes sub-makefiles.
Src makefile still has capability of being run directly, but other
sub-Makefiles must be run from Main Makefile, as they use exported vars.
Initial creation of make_options is now smarter and provides more informative.
Created initial make_options for the various port targets.
New files: make_options_nix, make_options_win, make_options_os2,
make_options_dos, make_options_mac, tools/Makefile, resources/Makefile.

*** W103_doomdir
patchfile = w103_4_doomdir.patch
- commit revision 1168
Increased the number of directories searched to 24.
These directories are set in doomdef.h, according to the OS,
and are searched for legacy.wad, and the IWAD.
On failure, will print out the directories searched, as an aid to the
player to setup the game.
Implement I_Get_Prog_Dir, for all ports, so can reliably get legacy.wad.
On some ports this can use special system calls.  The fallback code
looks at argv[0] and extracts the directory.

Under Win32, will also check the environment variable "UserProfile"
as a home directory.

*** W103_install_docs
zipfile = w103_5_install_docs.zip
- commit revision 1169
Create a separate install document with the comprehensive information
on installing.  This is more visible for someone looking for install
information than having the information buried in legacy.html.
New files: doc/INSTALL.html

*** W103_quit
patchfile = w103_6_quit.patch
- commit revision 1170
There is now a port independent video status, which also serves during
shutdown to prevent quit looping on errors.  When legacy.wad was not
found, a quit loop was triggered due to more errors on shutdown.
Shutdown is now handled by D_Quit_Save, which has complete sequencing
of the shutdown, even with multiple errors retriggering the Quit.
This simplifies the port code, and only one copy needs to be maintained.
The header for endtext printing is now port independent, removing a
header file from every port. The endtext code has been given a proper
copyright and credit.

- commit revision 1171
Files removed: macos/endtxt.h sdl/endtxt.h linux_x/endtxt.h

*** W103_heretic_status
patchfile = w103_7_heretic_status.patch
- commit revision 1172
Cleanup of the Heretic status code.  Rename many functions to make it
more clear that they are the Heretic versions of the status bar functions.
Renames some Heretic status bar vars as stbar_xxx, to more readily
identify them as Heretic status bar variables.
The draw of the Heretic status bar has a darkening of the chain on the
ends (shadow).  This code was 8 bit palette draw only, which left
draw artifacts for other draw modes.  This draw has been updated to
correctly draw shading for the other draw modes too.

*** W103_filesearch
patchfile = w103_8_filesearch.patch
- commit revision 1173
Add directory depth search to doomwaddir search.
IWAD search will now search 3 or 5 deep in the doomwaddir directories.
Rewrite filesearch function in sdl, to add tests for malloc fail, tests
for open fail, and to reorder some operations.

*** W103_tools makefile
- commit revision 1174
Remove file: tools/makefile  (was replaced by tools/Makefile)

*** W104_src_makefile
patchfile = w104_1_src_makefile.zip
- commit revision 1175
Add file: src/Makefile
This is a re-submit of the Makefile from W103_makefile, which seems
to be missing in the svn.

*** W104_inline
patchfile = w104_2_inline.patch
- commit revision 1176
The inline keyword is causing some problems with some compilers.
Remove it and let compiler do any inlines it can.

*** W104_misc
patchfile = w104_3_misc.patch
- commit revision 1177
Remove some extraneous extern from p_local.h.
Add a blank line to clisrv.c.
Add a comment to linux_x/i_video_shm.c.

*** W104_untab1
patchfile = w104_4_untab1.patch
- commit revision 1178
Remove leading tabs from lines.
dehacked.c
p_chex.c
r_defs.h
r_things.c
t_func.c
t_parse.c
t_prepro.c
t_spec.c

*** W104_untab2
patchfile = w104_5_untab2.patch
- commit revision 1179
Remove leading tabs from lines.
p_floor.c
p_genlin.c
p_setup.c
p_spec.c

*** W104_splash_sec_change
patchfile = w104_6_splash_sec_change.patch
- commit revision 1180
On a sector change, the flat can be changed.
DoomLegacy identifies the flat picture to enable splash sounds.
Boom did not have water splash sounds, and the splash sound
remains when the flat changes.  When the sector flat picture
changes, the sector floortype must be copied from the model sector too.
Fixed bug 0319.

*** W104_untab3
patchfile = w104_7_untab3.patch
- commit revision 1181
Remove leading tabs from lines.
hardware/hw_light.c
hardware/hw_main.c
hardware/hw_main.h

*** W104_devgame
patchfile = w104_8_devgame.patch
- commit revision 1182
Checking of devgame switch was hiding value of devparm switch.
Fixed so they use independent vars, but devgame will set devparm.

*** W104_deh_myfile
patchfile = w104_9_myfile.patch
- commit revision 1183
Change naming MYFILE to myfile_t to follow project rules, less confusion.

*** W104_deh_list
patchfile = w104_10_deh_list.patch
- commit revision 1184
Disable a dugging printf.
Show a readable listing of DEH text replacement, for (devparm && verbose).
( -devparm -v )
Make the deh_error function show DEH errors for any of
devgame, devparm, or v (verbose) switches.

*** W104_deh_text
patchfile = w104_11_deh_text.patch
- commit revision 1185
Text replacement failed when string was 6 chars long because the
search name str1 corrupted the stack, hitting the deh line buffer.
Made search name longer to include term 0.

*** W104_splgt
patchfile = w104_12_splgt.patch
- commit revision 1186
Make sprite dynamic light enum, sprite_light_e, with values SPLGT_xxx.
Define the sprite light xxx_SPR types as a combination of the flags.
Use the enum flags for type bit testing.
Remove dynamic light macros, putting the dynamic light structure access
in the program code.  Use a structure ptr to access fields, instead of
repeated indexing.

*** W104_corona_func
patchfile = w104_13_corona_func.patch
- commit revision 1187
Rewrite parts of fragglescript corona function to fix Chex newmaps bugs.
Rewrite func as String_to_RGBA func to handle any length hex value string.

Chex newmaps does not turn on the corona type flags for the
fireflies.  To make the fireflies work, the corona is turned on if it is
0 when a write to the corona color is made.
The code for Doomu has the tall-torch corona turned on, but
the Chex1 patch turns it off.
This fixes the Chex newmaps fireflies, as far as I know.

*** W104_deh_comment
patchfile = w104_14_deh_comment.patch
- commit revision 1188
Catch some BEX comments so they do not cause error messages.
Fixes messages in toxdm1.wad.

*** W104_teamname
patchfile = w104_15_teamname.patch
- commit revision 1189
Initialize team names to NULL upon creation.
Fix segfault in set_team_name, when setting teamplay from console.

*** W104_untab4
patchfile = w104_16_untab4.patch
- commit revision 1190
Remove leading tabs from lines.
g_game.c
g_input.c
hu_stuff.c

*** W104_hexen_err
patchfile = w104_17_hexen_err.patch
- commit revision 1191
Give hexen unsupported error message on -game switch.

*** W104_map_command
patchfile = w104_18_map_command.patch
- commit revision 1192
Fix map command level setup to set the gameepisode and gamemap correctly.
This also caused the wrong music to be played and the wrong level setups
to be used.
This would also lead to corrupted savegames, saving the wrong map number.
During savegame loading, it would use the wrong map to size the level
structures, which would lead to the save game restoring
some structure changes outside of the structure boundaries (overwriting
something else).  Added some checks to the savegame restore to detect
sector or linedef numbers that exceed the established structures.
This will detect some existing savegames as corrupted.  They could be
fixed by correcting the map number in the savegame.

*** W104_misc
patchfile = w104_19_misc.patch
- commit revision 1193
Make fogcolor default assign to work for any endian.
Some misc indent alignments and spacing.
Remove some extern from the code, and into header files.

*** W104_mapwad
patchfile = w104_20_mapwad.patch
- commit revision 1194
Give the console map command a file search like the command line.
The command line has more privileges, the map command is more
restricted.
The map command, as a network command, is restricted to ".DEH",
".BEX", and ".WAD" files, and within public doomwaddir directories.
The previous search of 10 directories deep is removed as a security risk.
Now it searches the doomwaddir list, to 4 subdirectories deep.

*** W104_ticrate
patchfile = w104_21_ticrate.patch
- commit revision 1195
Put a ticrate display control in the video menu.
Give the ticrate display a numeric FPS display, in addition
to the graphical display.
Cleanup old code and remove other old options.

*** W104_untab5
patchfile = w104_22_untab5.patch
- commit revision 1196
Remove leading tabs from lines.
am_map.c
m_menu.c
p_mobj.c
p_mobj.h
p_pspr.c
t_array.c
t_script.c
t_script.h
t_vari.c
v_video.h

*** W104_bob
patchfile = w104_23_bob.patch
- commit revision 1197
Make BOB_MOM code a standard feature, remove compile tests.
Make VOODOO_DOLL code a standard feature, remove compile tests.
Make GAMMA_FUNCS code a standard feature, remove compile tests.

*** W104_funcnull
patchfile = w104_24_funcnull.patch
- commit revision 1198
Give the thinker funcs a proper name for remove thinker, instead of -1.
Create a remove thinker action function.  Simplify some of the thinker code.
Still has NULL as no action, but do not delete thinker.

*** W104_gamma
patchfile = w104_25_gamma.patch
- commit revision 1199
Rename gamma_bright_black choice to be gamma_full, so it fits in the menu.
Make it the default choice, which will minimize problems with
existing config files.

*** W104_dark
patchfile = w104_26_dark.patch
- commit revision 1200
Create menu control with 3 darkness settings of the background and console.
The dark setting darkens the background so the menu are easier to
read against the background.  It also darkens the console background to
make console text easier to read.
Simplify the hardware background fade function, make it reliable.
Implement a common Fade function that is used for background fade,
console fade, and FS screen fade.  This fade function can fade with any
alpha value and apply a low value color tint (but not high color values).
Its 8bit palette draw is color limited to the only console green tint.
FS screen fade now applies to software draw too (but no color with 8bit).
Cleanup the FS fade function, and FS fade variables.

*** W104_drawinfo
patchfile = w104_27_drawinfo.patch
- commit revision 1201
Change V_drawinfo, to just drawinfo.  It appears everywhere in v_video.c,
and very little anywhere else.

*** W104_patch_offset
patchfile = w104_28_patch_offset.patch
- commit revision 1202
The topoffset and leftoffset were calculated wrong for patch draws when
SCALEPATCH, but not SCALESTART.  The offsets must have SCALEPATCH
scaling applied, not SCALESTART scaling.  This did not happen in
vanilla code, but occurs in new applications of scaling, such as font size.

*** W104_fontsize
patchfile = w104_29_fontsize.patch
- commit revision 1203
Add menu entries to control the console font size and the message font size.
The small font size is the unscaled draw.
The med font sizes are use the FINESCALE drawing.
The large font size is a scaled draw.
Removed the V_NOSCALESTART and V_NOSCALEPATCH options, in favor of
V_SCALESTART, V_SCALEPATCH, V_FINESCALEPATCH, and V_NOSCALE options.
The flag V_NOSCALE is 0, not tested, and is only a visual placeholder.
Created a V_SetupFont, that controls font size for drawing.
It uses V_FINESCALEPATCH and V_SetupDraw to control font size.
V_DrawString has to honor SCALESTART in positioning the string, but
also needs to position characters drawn by V_DrawScaledPatch and V_DrawMappedPatch.
This code could not handle all situations.
Have created two functions that turn off SCALESTART and restore it, and
these are used by V_DrawString so it can use unscaled character positioning.
Cleaned up the console draw code, adjusting the indent to make the
console text more readable.
Gave console and hud text proportional font drawing.
Fixes Bug 0532.

*** W105_ver
patchfile = w105_1_ver.patch
- commit revision 1204
Change to version 145.3, in preparation for 145.4 release.

*** W105_ztag
patchfile = w105_2_ztag.patch
- commit revision 1205
The tag in ZAlloc will be known as ztag in user code, to differentiate it
from Doom tags.

*** W105_untab6
patchfile = w105_3_untab6.patch
- commit revision 1206
Remove leading tabs from lines.
d_net.c
d_netcmd.c
d_netfil.c
d_netfil.h
hardware/hw_bsp.c
hardware/hw_draw.c
r_bsp.c
w_wad.c
wi_stuff.c

*** W105_findfile
patchfile = w105_4_findfile.patch
- commit revision 1207
Some changes to file searches to handle absolute and relative files.
Doomwaddir searches only look for a simple filename in a directory.
Make net access to file system more secure, with explicit checks for
complex filenames, and only allowing doomwaddir searches with simple
file names.

*** W105_asm
patchfile = w105_5_asm_cc.patch
- commit revision 1208
In asm, Clang does not accept "%cc", as it is not a register.
Gcc used to accept "%cc", and probably still does.
In the asm clobbered section, cc and memory should not use %.
Fixes bug #0620.

*** W105_bad_sidedef
patchfile = w105_6_bad_sidedef.patch
- commit revision 1209
The wad 2002ado.wad has many sidedef with bad sector numbers, but they
are also unused.  They were left by the editor.
Fixed the error reporting to ignore those with sector number = 65535
unless verbose is ON.  Also to report if any line is using the sidedef.

*** W105_untab7
patchfile = w105_7_untab7.patch
- commit revision 1210
Remove leading tabs from lines.
p_enemy.c
p_henemy.c
p_inter.c
p_local.h
p_map.c
p_switch.c
p_telept.c
p_user.c

*** W105_corpse
patchfile = w105_8_corpse.patch
- commit revision 1211
Fix BossDeath failure.
It was due to A_Fall setting health for solid corpse damage.
Corpse must have health < 0.  There are too many tests against health
all over the code to change them all.
Solid Corpse health is now (0 .. -spawnhealth).  Upon reaching -spawnhealth
the corpse is Killed, becoming gibs.
In DamageMobj, the corpse handling is intercepted earlier and handled
separately.
Removed the extraneous tests against MF_CORPSE.
Fixed the health when restoring old savegames.

*** W105_give_health
patchfile = w105_9_givehealth.patch
- commit revision 1212
Change P_GiveBody to P_GiveHealth.

*** W105_bsp
patchfile = w105_10_bsp.patch
- commit revision 1213
Some cleanup of the software bsp, doorclosed flag.
Removed some stuff that was commented out.

*** W105_hardware
patchfile = w105_11_hardware.patch
- commit revision 1214
Cleanup naming, syntax, and parameters in hardware files.
Preparation for fixing the hardware draw problems.
Removed some old code that was commented out.
Removed old poly allocation.
Removed extraneous parameters.
Separated out loading_status as separate function.
Made BSP poly statistics conditional on DEBUG_HWBSP.
Many comments added.
Choose the SPRITE_LIGHTLEVEL conditional selection, removing the alterative.
Removed some dup_view variables, because they did nothing special.
Chose the PLANE_MERGE_SORT conditional selection, removing the old sort code.

*** W105_hwbsp
patchfile = w105_12_hwbsp.patch
- commit revision 1215
Rewrite of hardware draw polygon creation.  This uses a wpoly_t structure
with vertex pointers that makes it much easier to maintain common vertexes.
The final polygons are converted to the current polygon structure so
the drawing code is not affected.

Fixes some polygon errors in wads such as BOOMEDIT.WAD, and phobiata.wad,
using OpenGL.

The BSP walk procedure gives the subsector convex polygon, and a list
of segs.  Cutting the subsector polygon with the segs introduces errors,
and the result might not be convex.
Example: BOOMEDIT.WAD, map01, subsector 206, has segs from linedef 104
and linedef 110, that meet in the subsector making it non-convex.
The void space behind linedefs 104 and 110 cannot be eliminated easily.

Added a control to select polygon shape options. The default is Trim.
Subsector: Disables cutting with segs.
Fat : Ignores any seg that does not cross the subsector polygon entirely.
Trim: Chains together the segs, and applies those chains that cross the
  subsector polygon.  It might create a non-convex polygon, so a check removes
  the center vertex where sides meet at an interior angle
  greater than 180 degrees.
NonConvex : Leaves the non-convex polygons.  My nVidia supplied
  OpenGL library seems to tolerate the non-convex polygons.

*** W105_hwpoly
patchfile = w105_13_hwpoly.patch
- commit revision 1216
Expanded use of wpoly to rest of polygon building code.
Change to drawing poly is now done in finalize_polygons().

*** W105_crack1
patchfile = w105_14_crack1.patch
- commit revision 1217
Apply some hw draw crack remedies.
Check the cross product, so an added vertex does not make the crack worse.
Fix a bug when a seg-chain cut only cuts one side of the polygon.
Add some comments.

*** W105_bsp_sector
patchfile = w105_15_bsp_sector.patch
- commit revision 1218
The bsp in the wad file has errors.  One error is that sometimes it has
the wrong sector number for a subsector.  This results in drawing the
wrong sector.
Try to dectect some of these.
Created a routine to find the correct sector by finding the closest
facing linedef to a point within the subsector.
This fixes one of the missing sector draws for a sign in BOOMEDIT.WAD.

*** W105_hwsky
patchfile = w105_16_hwsky.patch
- commit revision 1219
Fix the hardware render sky drawing to block walls and flats drawn
inside buildings.  Sky sectors are supposed draw sky over the walls,
which blocks the view of any taller sectors behind the wall.
Draw these sky walls invisible to set the z-buffer to block draws behind
the wall.  The sky is already drawn as a background, and will show through.

*** W105_crack2
patchfile = w105_17_crack2.patch
- commit revision 1220
The polytile remedy.
It enters the same vertex in adjacent poly when splitting a poly at an angle
that may cause crack errors.  This should prevent cracks before they start.
In the existing routines, it is hard to find these poly points after other
poly splitting has taken place.  It was going to get very complex to fix it.
This can eventually replace that search.
There is some conflict with some existing crack repair routines,
so it is made optional.  It does not seem to do harm, but its effect is
not yet obvious.
A control,  gr_polytile, can turn it off and on.

*** W105_bsp_clean
patchfile = w105_18_bsp_clean.patch
- commit revision 1221
Cleanup some bsp and segs drawn code.
Indent fixes, line rearrangement.
Add comments.
Make some I_Error into I_SoftError, so user can save the game at least.
Rearrange logic of doorclosed.
Comment out some unused struct fields (waterclip, scaleseg).
Rename some vars to avoid C++ keywords.

*** W105_crack3
patchfile = w105_19_crack3.patch
- commit revision 1222
Fix the indenting in the polytile code.
Add handling of a seg cutting that hits only one vertex.
Remove some older unused box code.

*** W105_spawn
patchfile = w105_20_spawn.patch
- commit revision 1223
Rewrite of spawning code.  It could not handle more multiple players
than spawning spots, and network join spawning was suspect.

Converted G_CheckSpot, to G_Player_SpawnSpot, which now
does the collision check, the spawn fog, and the player spawn.
Added check of objects and players using a static mobj, so as to not
depend upon any player mobj.  This eliminates the need for the
spawn without a check from the original Doom code.

The Coop spawning now tries to spawn at 255 locations around the spawn
spot, to handle collisions, and to allow more players than spawn spots.
Deathmatch spawn will also try Coop spawning if it needs to.
Coop spawn will try Deathmatch spawn locations (last) if it needs to.

*** W105_gstate
patchfile = w105_21_gstate.patch
- commit revision 1224
Remove files g_state.h  g_state.c.
They only declared a few variables, and do not exist in legacy 2.
The file doomstat.h already exists to declare such state variables.
Add GS_FORCEWIPE, to avoid storing -1 in an enum variable.
Clean up some other extern, and some enum type names.

*** W105_playermsg
patchfile = w105_22_playermsg.patch
- commit revision 1225
Expand the show messages option to (Off, minimal, play, verbose, diag).
This control now affects all messages displayed during play.
If the player sets to minimal, they will not get messages for minor
object pickups like ammo, but will get messages for important things,
like the BFG.
Each player message now calls P_SetMessage, with a level value.
Calling P_SetMessage is now required, to process cv_showmessages, so
direct setting of player->message is no longer allowed.
Replace the Heretic ultimatemsg boolean, with priority tests derived from the
message level.
The memory expansion message can now be blocked.  The EMSG categories
are now explicit in the enum code, so that GenPrintf info, warnings, debug,
and other print categories are properly tested during playing.

*** W105_sorted_sprite
patchfile = w105_23_sortedsprite.patch
- commit revision 1226
Remove old code (DRAW_UNSORTED) and choice code (DRAW_CHOICE) in
hardware renderer.  The new code (DRAW_SORTED) of w89_draw_sorted
is used, which sorts transparent walls and sprites.

*** W105_spritedist
patchfile = w105_24_spritedist.patch
- commit revision 1227
Improve the handling of drawing an excessive numbers of sprites.
The closest sprites are always drawn.
The farther sprites depend upon the distance from the viewer and priority.
The priority takes into consideration the object height, and if it is a
corpse, missile, or monster.

*** W105_untab8
patchfile = w105_25_untab8.patch
- commit revision 1228
Remove leading tabs from lines.
p_fab.c
p_heretic.c
p_hpspr.c
p_hsight.c
p_info.c
p_lights.c
p_maputl.c
p_saveg.c
p_spec.h
p_tick.c
sb_bar.c
st_stuff.c

*** W105_pickupflash
patchfile = w105_26_pickupflash.patch
- commit revision 1229
Create a control for pickup flash.
  off : no flash
  status : parts of the status bar flash color
  half : the palette flash is half intensity
  vanilla : the Vanilla Doom palette flash
The status bar pickup flash applies to the status bar and overlay
status. The appropriate box is flashed with a color.
Heretic is also affected, but uses different flash colors.

Made a DrawVidFill function that accepts screen scaled parameters.
Improved the hardware draw version by using precaluclated vid fields.
These precalculate some of the multiplies by 2.0 and divisions by
vid.width and vid.height.
(fx_center, fy_center, fx_scale2, fy_scale2)

*** W105_dck
patchfile = w105_27_dck.patch
- commit revision 1230
Removed (with #ifdef) some code for testing water planes using DCK work-around.
DCK is an obsolete wad editor for DOS and Win95, that only allowed
linedefs 0..255.  It could not create some Boom and DoomLegacy water
sectors, so they were using negative tag values.

*** W105_waterplane
patchfile = w105_28_waterplane.patch
- commit revision 1231
When a water surface is close to eye level, the water plane is not
drawn completely.  This was showing HOM or sky.
Move clip plane closer to the player.
Detect when player has water surface near eye level and draw both above
and below the water until eye level is cleanly above or below the
water level.  When the eye level is exactly level with the water surface
the player can see both above and below the water.
There are still some sky flashing for OpenGL, but it is due to
something else.

*** W105_netwait
patchfile = w105_29_netwait.patch
- commit revision 1232
Change the net wait to count players instead of nodes.
This allows machines with split screen players to be handled cleanly.
Playing with only split players will now start cleanly without
having to fiddle the wait parameters.
Clean up the wait message box.
Add a hint line to the wait box for the start and quit keys.

Remove leading tabs from lines.
  d_clisrv.c

*** W105_untab9
patchfile = w105_30_untab9.patch
- commit revision 1233
Remove leading tabs from lines.
doomstat.h
f_finale.c
g_game.c
hw_cache.c
hw_trick.c
p_inter.c
r_draw.c
r_main.c
st_stuff.c
wi_stuff.c

*** W105_heretic_server
patchfile = w105_31_heretic_server.patch
- commit revision 1234
Change variables like raven, to raven_heretic_hexen, so they are self
explanatory without having to know Doom history.
Fix the start server so it also works for Heretic and UltDoom.
The start server menu now changes to give selection of the episode style
of map naming when appropriate.
When a player becomes a chicken, clear the skins setting in the mobj
so the other players can see a chicken.  Otherwise the skins overrides
the chicken sprite.  Restore the skin upon un-chicken-ing.
If the player dies while a chicken, they leave a chicken corpse.

*** W105_statusbar
patchfile = w105_32_statusbar.patch
- commit revision 1235
Rewrite of all the status bar, overlay status, and status palette
flash routines, so they work cleanly with splitscreen.
For all draw modes except 8bit palette draw, each split screen can now
palette flash individually.
Move the status palette flash to the RenderPlayer code so the correct palette
is always used when drawing a splitscreen.
The status draw routines now used plyr as a parameter that is passed in,
so that each splitscreen reflects the status of that player.  Use of the
global single player ( st_plyr ) has been minimized, mostly used in the
single player only status bar code sections.
Splitscreen only can use overlay status, as the status bar saves state
to speed up drawing, and it only saves for the one player.  This is now
much more extensively commented, denoting exactly which functions are affected.
Provide for some state saving according to the splitscreen view position
for hardware draw.  For example, this requires the sky draw variable to
be saved for each screen position.
The Heretic status bar code has been updated the same as the Doom
status bar code, and now shares some of the same tables and variables.
Move the hardware palette flash to the hardware code, and enable
it from a hardware code determined setting.
Rewrote the stlib for the status bar drawing to remove unnecessary
parameters.  Moved the minus sign and percent to be part of the number
font passed to the stlib.  Made refresh and erase into global control vars
so they can be setup once.

*** W105_flatsize
patchfile = w105_33_flatsize.patch
- commit revision 1236
Move the switch tests in the flat rendering to the setup phase by
saving a flat size_index in the levelflat structure.
Retrieve pre-calculated values for each flat size from tables indexed
by the size_index.
Pass the picnum to the plane render functions instead of the lumpnum.
Save the picnum instead of the lumpnum for planes.

*** W105_flatsize_b
patchfile = w105_33b_flatsize.patch
- commit revision 1237
Fixed a lumpnum field that was made too small.
Error showed up with phobiata.wad, or probably any wad with animated flats.

*** W105_printf
patchfile = w105_34_printf.patch
- commit revision 1238
Modified the CONS_Printf functions to better handle categories.
This fixes the console help function, whose output was blocked when
game playing.

Output routing flags are now separate from category flags, as EOUT.
The output routing is no longer encoded into the EMSG flags.
The hud output is now more independent of the console output.

The GenPrint EMSG parameter now selects a category, and has only a
couple special flags (EMSG_now, EMSG_all).
This is now directly passed to the CONS_Printf_va function so that the
global default flags do not need to be temporarily modified.
Many message categories now directly modify output routing in CONS_Printf_va.
There is a category that outputs only to the console (EMSG_console), and one
that only outputs to the log and stderr (EMSG_errlog).

Changed the gameplay message selections to:
Off, minimal, play, verbose, debug, dev.
This controls which messages are seen on the hud and the console
during gameplay.

Created a direct debug printf function (debug_Printf) that makes
debug printing simpler.

Fixed the font1 output so that spaces appear in the printed line.

*** W105_autorepeat
patchfile = w105_35_autorepeat.patch
- commit revision 1239
Add autorepeat to the console scrolling page-up and page-down keys.
This is done in software, so that the keyboard setup remains the same.

*** W105_info_flags
patchfile = w105_36_info_flags.patch
- commit revision 1240
All the info fields are now mostly stdint, with a few fixed_t, instead
of all using the default int (which could be 64 bits).
This alone reduced the program size by 10K.
Moved activesound to after the seesound field.
Moved raisestate to after the xdeathstate field.
Fixed some other anomolies in the info declarations, such as using
sfx_None instead of 0.
Added a missing deathstate field in MT_SPIRIT.
Changed the flags in info to uint32_t.
Changed the flags in mobj_t to uint32_t also.
Changed some flag vars in the code to uint32_t also.

*** W105_spawn_fog
patchfile = w105_37_spawn_fog.patch
- commit revision 1241
Move the spawn fog over the spawned monster and spawned object.

*** W105_fixdep
patchfile = w105_38_fixdep.patch
- commit revision 1242
Fix a sizeof() compile issue in fixdep.

*** W105_sound
patchfile = w105_39_sound.patch
- commit revision 1243
Restructure the sound info table, and sound priority system.
Created new types to regularize the sfx parameters.

Fix Heretic sounds.  The channels were saturated with copies
of the same sound, which was a faint low priority sound.

Heretic uses ascending priority, while Doom and the code used
descending priority.  The Heretic priority system is more capable,
and Heretic handles more types of sound, so switched everything to using
signed ascending priorities in the range -10..2560.

The priority is also altered for distance, so faint sounds can get replaced.
This required that priority be passed as a parameter, replacing any
reference to the priority in the sfx info tables.

Made the Doom sound priorities get used, instead of mostly ignored.
The Doom priorities from the info tables are converted to ascending at
the time they are read, which now is in only one place.
Dehacked changes to info for Doom and Heretic should function as before.

Changed code so all sounds go through S_StartSoundAtVolume,
which now is the only function that calls  HW3D_I_StartSound functions.
The complications for Heretic, priority, skin sounds, and linked sounds,
are now only handled in this one place.
Moved the sound functions for attack, scream, and ambience, out of
HW3D_ to s_sound.c, and they now only call S_StartSoundAtVolume, with
a new ct_type parameter.

The linked sounds in the sound info are strange, and mostly non-functional.
Heretic and Doom are no better.
Doom only has one linked sound, sfx_chgun, and it does not actually modify
the pitch or volume, even though fields and code were dedicated to doing that.
Heretic did not keep that aspect of the sound info tables.
Removed the link parameters from the sound info tables, and substituted
an index to another small table.  Fixed the altered param to make more sense.

Added a field to the sound info tables for the Heretic limit channels.
This limits how many channels can have the same sfx.
Checks this limit when trying to get a channel.

*** W105_fix_svn
patchfile = w105_40_fix_svn.patch
- commit revision 1244
Somehow got two copies of a palette patch in the hardware/hw_cache.c file.

*** W105_gcc
patchfile = w105_41_gcc.patch
- commit revision 1245
Fix problems caused by use of gcc 4.8.
The SDL defined, as set by "-DSDL", is not recognized by the
command line of gcc 4.8, for reasons unknown.
This define has been changed to SMIF_SDL, which does work.
The other SMIF determined defines were also changed from using VID_ to:
SMIF_WIN_NATIVE, SMIF_OS2_NATIVE, SMIF_X11, SMIF_X11_GGI, SMIF_PC_DOS.
This makes this more obvious that this is a user selected option (SMIF),
and not a detection of the OS.

Gcc 4.8 detects variables that are set but not used, and issues many
warning messages.  Many of these are left over from the original Doom
source code.  Have hunted each down and fixed each, by deleting the
dangling variable, commenting it out, or in one case making use of it.

*** W105_msys
patchfile = w105_42_msys_A.patch, w105_42_msys_B.patch
- commit revision 1246
Concerning compiling and running on a Win32 XP machine.
On a computer with MSYS installed, it has caused some strange problems.
It provides a HOME environment variable, for its own use.  The code
now detects when HOME is from MSYS and ignores it so it can get to
the XP home directory.

MSYS also provides a RM command, but the shell does not recognize the
DEL command when used from mingw32-make,
which is causing problems with Makefile cleanup.

MSYS shell will not execute DOS commands, so MSYS commands and MSYS
legal directory specifications have to be substituted everywhere.

*** W105_flash_opengl
patchfile = w105_43_flash_opengl.patch
- commit revision 1247
Fix the pickup flash for OpenGL, and for small status bar.
Make a V_DrawScaledFill that matches the other scaled draws.

*** W105_dirent
patchfile = w105_44_dirent.patch
- commit revision 1248
Systems that do not have ftw.h have to use dirent.h, and that code was
not finished.  Have finished it, along with stat code to identify
directories for systems that do not have dirent D_TYPE either.
Rearranged the code to only have one function that is customized for dirent.

*** W105_pal_gamma
patchfile = w105_45_pal_gamma.patch
- commit revision 1249
Fix palette problems on Windows systems.
A gamma function was putting a 0 in gammatable[ 0x82 ], on Windows, but
not on Linux.  This would zero any color component that happened to be 0x82.
It was caused by (0.0 / 0.0) in the gamma-bright-black gamma function.
It is curious that the floating point NaN would not affect the gamma
table generated on Linux.
I remember someone informing me about a gamma problem some time ago,
but I could not find the fault using Linux.
It had to wait until extensive testing on a Windows system.

Fixed some other suspect code in the palette and colormaps.

*** W105_cv_string
patchfile = w105_46_cvstring.patch
- commit revision 1250
When a cv var set value exceeds the bounds, the code attempts to rewrite
the value string.  The string could be a const string such as during init,
which segfaults on modern systems like Linux.
Fix the code to write a buffer instead.

*** W105_heretic_flash
patchfile = w105_47_heretic_flash.patch
- commit revision 1251
Fix the pickup flash for unscaled status bar in heretic.

*** W105_flatfill
patchfile = w105_48_flatfill.patch
- commit revision 1252
Fixes segfaults caused by flatfill draw writing out-of-buffer.
Added comments in all affected areas.
Added Function V_ScreenFlatFill, to flat fill the screen.

Rewrote FlatFill functions.
- Added detection of scaling in option, so can handle both vid coordinates
used when filling entire screen, and base coordinates used for menus.
Other automated methods had failures, the caller must set the option correctly.
- Removed dependence upon drawinfo for vid coordinate drawing.
It is usally setup for scaled drawing, but might not.
- Converted test on flat size to used flat size indexing, like the other
flat drawing functions.
- Stabilized the edge matching of tiling used for HWR_DrawViewBorder.
- Added a fill scale so that Doom background flats can be scaled down.
This makes it easier to read menu and message text, such as the Quit box.

Rewrote DrawPatch function.
- Added detection of scaling in option, so can handle both vid coordinates
used when drawing entire screen, and base coordinates used for menus.
Other automated methods had failures, the caller must set the option correctly.

Rewrote DrawViewBorder functions.
- Fix HWR draw to also draw heretic alignments and use heretic offsets.
- Fix HWR draw and software draw to align last edge patch. The edge patch
size does not divide evenly into the viewport size.
- HWR_DrawViewBorder draws in vid coordinates now instead of base coordinates.
This does not suffer from misalignment and math errors.

*** W105_bug0626
patchfile = w105_49_bug0626.patch
- commit revision 1253
Fix bug 0626, submitted by Ryan.
Change memcpy to memmove in command.c because it overlaps dest.
Reported that it was causing segfaults.

*** W105_linux_make
patchfile = w105_50_linux_make.patch
- commit revision 1254
Fixes some problems with clean and distclean in the linux port Makefiles.

*** W105_mussrv
patchfile = w105_51_mussrv.patch
- commit revision 1255
Rewrite of most of the musserver for linux_x.  Now it has music again.
Changed the music server interface to s_sound.  The other ports with
musservers will have to be updated to the new interface.

Rewrote the musserver, especially the IPC message formats.
The musserver no longer searches the doom wad.  It is sent the exact wad
file and lump to read using IPC messages.
The sound device to use can be changed using a menu option.
The preferred sound device is sent to the musserver using an IPC command.
This allows the sound device setup to be performed while there is some
music playing.
Added FluidSynth to the device selection.
Rewrote the musserver command line switches entirely.
  see "  >> musserver -h " for details

Fixed many problems with the musserver code.
Starting the musserver using system causes it to have Init as a parent.
This makes watching for the parent to die, useless.
The correct process id is sent to the musserver using an IPC message.

Added code to throttle the Midi commands, so it does not get so far
ahead in the song.  There is no way to shut off the music that has
already been sent to the Midi device, or TiMidity.
Added code to kill drone notes (that did not get shut off).
In spite of redundant attempts to shut them off, sometimes the current
notes of a song will still drone on until the song loops.  Something causes
all the Midi commands to shut off those notes to get ignored.

*** W105_state_null
patchfile = w105_52_state_null.patch
- commit revision 1256
During debugging some segfaults were coming from dereferencing an mobj
mobj->state->nextstate, after it had been removed.
Setting mobj->state to an invalid integer did not work.  The segfault was
difficult to track down, so causing a segfault was just a distraction.
It has been changed to  &states[S_NULL]  when removed, which will not segfault.
Also, a test for this value was added to the state transition code
that was segfaulting, to block the dereference.

*** W105_misc
patchfile = w105_53_misc.patch
- commit revision 1257
Update copyright dates and comments.

*** W105_hwsky
patchfile = w105_54_hwsky.patch
- commit revision 1258
Commit some parts of the hardware draw sky work.

*** W105_extmidi
patchfile = w105_55_extmidi.patch
- commit revision 1259
Include the external midi in the control to select a midi player.

*** W105_hw_ticrate
patchfile = w105_56_hw_ticrate.patch
- commit revision 1260
Fix the draw scaling for the hardware ticrate display.
It was drawing an unscaled graph on a scaled grid.

*** W105_heretic_switches
patchfile = w105_57_heretic_switches.patch
- commit revision 1261
Fix the switches array and SWITCHES lump processing lump.
Heretic was trying to process Doom switch names, giving many error messages.
The w85_heretic_SWITCHES SVN966 patch, removed the (episode==4) test to
allow Heretic/Blasphemer gamemode to process the Boom SWITCHES lump.
The same test also distinguished Heretic switch names from Doom switch names
which were just stuck on the end of the same list.
Made a separate Heretic switch name list, removing them from the Boom switch
names list.  Cleanup of other strange coding vestiges in the switches.
Fixed the test of switch textures so the local messages and texture fixes
are used, instead of using a texture check that has automatic warning messages.

*** W105_win98
patchfile = w105_58_win98.patch
- commit revision 1262
Make conditional one of the Makefile changes for WinXP.
On Win98 using DOS commands, the output redirection of the dep output must
use DOS file name conventions.
On WinXP which has MSYS 1.0.17, they must be unix file name conventions.

*** W105_tcp_err
patchfile = w105_59_tcp_err.patch
- commit revision 1263
Reorganize network error codes.
Add handling of TCP connection reset and connection aborted errors
that were transient errors with WinXP.

*** W105_printf
patchfile = w105_60_printf.patch
- commit revision 1264
Adjust the printf functions to get some missing messages on the console.
Create a EMSG_hud for messages that should appear on the hud during play.

Convert some CONS_Printf calls to use the more specialized printf functions,
like debug_Printf.
Fixed the CONS_Printf execution so that the messages alway show on the
console.

Add DEBUG_MESSAGE_ON to doomdef.h, which disables blocking of
debug_Printf messages in the released version, during normal play.
The debug_Printf are enabled if verbose is on, or if Options message is
at debug or higher level.

*** W105_playmsg
patchfile = w105_61_playmsg.patch
- commit revision 1265
Fix some play messages that were not being seen,
Death messages, secret sector.
The death messages and fragglescript print are fixed for splitscreen.

*** W105_chat
patchfile = w105_62_chat.patch
- commit revision 1266
Fix the netplay chat so that it appears on the HUD.
Display of the chat message works for splitscreen.
Choose the new chat network coding, and removed the old code.
Optimized the functions better.

This will be for Version 1.46 and is not compatible with older DoomLegacy.

*** W105_error
patchfile = w105_63_error.patch
- commit revision 1267
Converted some run-time I_Error, to I_SoftError with a recovery fix.
This allows the player to save the game, or to see the effects of
a wad development error.
Converted I_Error in r_data.c colormap loading, r_things.c sprite
loading, and a skins memory alloc error.

When a sprite does not have all the rotations present, it will no longer
I_Error, but will substitute another sprite frame for the missing one,
with an error message.

*** W105_netdef
patchfile = w105_64_netdef.patch
- commit revision 1268
Changed to use stdint types in the network tic packet, to standardize
the tic packet for both 32 bit and 64 bit machines.

*** W105_netstr
patchfile = w105_65_netstr.patch
- commit revision 1269
Hardened the network XCmd code against malicious packets.
Changed the network XCmd code to use a structure parameter with enough
buffer information to limit string operations that do not find the 0 term.
Removed some of the Macros that the previous code was using in favor of
local customized and hardened string handling code.

Bumped the network version number to 22.
The differences in the packet are slight, but this is done mostly to eliminate
the older code from usage for security reasons.

*** W105_version1461
patchfile = w105_66_version1461.patch
- commit revision 1270
Update version numbers for 1.46.1.
Still uses legacy.wad 145, no need to change that.

*** W105_docs
patchfile = w105_67_docs.patch
- commit revision 1271
Update the docs for Release Version 1.46.

*** W105_home
patchfile = w105_68_home.patch
- commit revision 1272
Add some verbose messages to diagnose problems with video startup and
finding home directory.
Add tests for HOME environment string NULL before using it.
This would crash DoomLegacy on Windows, where HOME is not usually set
(when do not have MSYS).
Thanks to testing by Eckehardt Luhm.

*** W105_rankings
patchfile = w105_69_rankings.patch
- commit revision 1273
Thanks to testing by Eckehardt Luhm.
Fix color bars in deathmatch rankings in OpenGL.
Limit names to column widths in the rankings.
Fix DrawFill for opengl so that positions match other draws.
Some fixes to status bar usage of the draw fill.

*** W105_bot_respawn
patchfile = w105_70_bot_respawn.patch
- commit revision 1274
Delay the bot respawn by 6 seconds, so they are not so overwhelming.

*** W105_docs2
patchfile = w105_71_docs2.patch
- commit revision 1275
Update some more docs and README for Release Version 1.46.

*** W105_vidbytes
patchfile = w105_72_vidbytes.patch
- commit revision 1277
On 64 bit machines, the multiply of a patch offset (signed short)
and the ybytes (unsigned int) is treated as unsigned.
When the offset is negative, a large number is added to the screen
address leading to segfault.
Because there are multiplies like this throughout the video code,
it is safer to keep several unsigned values, like ybytes, in signed vars,
so the multiply is handled correctly by the compiler.

*** W105_offset
patchfile = w105_73_offset.patch
- commit revision 1278
Sprite load for hardware render had a patch offset stored in an uint16_t.
It looks like a negative offset would not work as in the original version
1.42 code.  It is a temp var introduced as part of the SWAP code update,
and has no explanation.  Fixed it to be signed.

*** W106_savegame
patchfile = w106_1_savegame.patch
- commit revision 1279
The W105_netstr patch changed some function interfaces, to provide buffer
limits so as to prevent buffer overrun.  A few calls in the savegame code
were updated, but one did not update the current savegame ptr.
As a result the Net variables saved in the savegame got overwritten.
The savegame read code correctly recognized that the savegame was
missing too many Net variables, and issued a corrupted savegame message.
Added the missing line to update the savegame position.
Testing should have caught this, and it may have been noticed.
But other bugs being fixed at the same time may have confused things.
It did not affect reading an old savegame.

*** W106_netfile
patchfile = w106_2_netfile.patch
- commit revision 1280
Fix some network file download problems.

A network game would display different textures when it downloaded the
wad file, than if it loaded the wad file from the command line.  The
routine for adding a wad file tried to find and update textures, which
did not work.  Any texture or patch change by the loaded file would
affect textures, so it is safer to just clear the cache and rebuild all
textures.

Gave the network download a display of file download activity, in
a box with speed and file size.  This replaced some of the existing hud
messages, and others were updated to be more helpful and informative.
Gave it a background draw so the background does not flicker due to
hardware double buffer swaps.

Used LE_SWAP32 instead of LE_SWAP32_FAST in the one time network code,
as speed is not an issue there.

Init the command line file load list properly.

*** W106_netrepair
patchfile = w106_3_netrepair.patch
- commit revision 1281
Fix some network consistency check problems.
The network version has been incremented to 23, which makes this version
incompatible with any previous DoomLegacy.  Some command enumeration
has moved, due to the priority implied in the command ordering.

Sometimes there will be a consistent consistency check failure, for
unknown reasons.
The server now has the ability to fix the player, instead of just kick
them from the game.
Added an PT_REPAIR network command to allow the server to repair the player
position, the random number index, and the gametic.

A count of recent consistency failures is kept so that an escalating
series of actions can be taken.
1. Repair the player position.
2. Repair the node with a savegame, which will maintain the
player at their current position.
3. The Kick command will be issued.

*** W106_docs4
patchfile = w106_4_docs.patch
- commit revision 1282
Update the docs for 1.46.2.

*** W106_net
patchfile = w106_5_version1462.patch
- commit revision 1283
Update the version to 1.46.2.

*** W106_shadechain
patchfile = w106_6_shadechain.patch
- commit revision 1284
Heretic shade chain draw procedure is drawing outside the display
buffer.  This corrupts other memory blocks.
Restore the line with the correct scaling.
This had been changed during diagnosis of drawing errors, but should
not have been committed to the code base.
This has been latent for around a year because, for some unknown reason,
the SDL version does not show symptoms, unlike the X11 version which
will segfault after 2 or 3 level maps.

*** W106_zzone
patchfile = w106_7_zzone.patch
- commit revision 1285
Some fixes to the alternative zone memory system, used for debugging.

*** W106_x11_sound
patchfile = w106_8_x11_sound.patch
- commit revision 1286
Rewrite of X11 sound server.  Much of the code was not used, being
blindly copied into the sound server because some other sound system had it.
Disabled the unused code for several kinds of alternative sound systems that
were not selected.
Remove redundant files:
  linux_x/sndserv/sounds.c
  linux_x/sndserv/sounds.h

*** W106_version1462_1287_docs
patchfile = w106_9_version1462_1287_docs.patch
- commit revision 1287
Release 1.46.2 again, due to finding another bug before making the release.
Update Release docs and VER.

*** W106_messagebox
patchfile = w106_10_messagebox.patch
- commit revision 1288
The text in the message box is not in the box.
Setup the message box position for non-menu message boxes.

The Message box is positioned badly for video modes other than 800x600.
This is due to menu centering Setup that differs from message box setup.
Make the caller do the Setup to make it consistent for menus.

Adjust connect menu position to give more room to the boxes.

Fix the menu centering for video modes that pad the video lines.

Fixes bug 629.

*** W106_linux_sound
patchfile = w106_11_linux_sound.patch
- commit revision 1294
Another attempt to fix drone notes in the X11 music server.
This time it uses the ioctl to reset the sequencer, which reacts much
faster.  Remove most of previous fixes, which did not work well.
Mostly, the notes can be turned off, but if the mixer controls are
touched too soon the drone notes will turn back on.  This requires some
delays during the midi reset.

The selected device in the sound menu now does not search when a
specific device is selected.  The Midi, Synth, and Search selections
will search the devices.  The default device is a preset of the musserver.
The default selection is SEARCH1.
For future expansion and to easily allow user modifications,
have added SEARCH2, SEARCH3, Dev6, Dev7, Dev8, Dev9.

*** W106_video
patchfile = w106_12_video.patch
- commit revision 1295
Video modes switches can cause segfault if a print stmt reaches the
console output.  This was occuring in the linux_x xshm video when
verbose was enabled.
Changes to the video status indication are made to prevent print
statements in the video mode switch from causing a console update.
A variable, vid.draw_ready, is added.  It is not enabled until the vid
and screen structures are updated by SCR_SetMode, and V_Setup_VideoDraw().
Some previous video print outputs are restored.

*** W106_cdrom
patchfile = w106_13_cdrom.patch
- commit revision 1296
CDROM music has not worked in Linux.  It has problems in SDL, even in
windows.  The plan was to disable it, as SDL 2 is not going to support
CDROM music anyway.
However, it showed signs of working, and after some effort, it now works.
This is likely the last version that will have CDROM music support.
Checking the CDROM status, in Linux, is a blocking IO call that stops
all action in the game for 1/4 second, which is very noticable.
Getting the estimated play time and using that for loop timing
eliminates all but one status check.
There were many other changes to fix logical mistakes.

*** W106_shotgun_position
patchfile = w106_14_shotgun_pos.patch
- commit revision 1297
The shotgun and other player weapons are a pixel too high, which leaves
a visible scanline below them.  This is likely due to freelook, that
heretic sprite is compatible with, but the Doom sprite is too small.
For Doom (but not Heretic) move the weapon down 1 pixel.
The position was checked against prboom and looks to be the same now.
Fixes bug 0455 (from 2004).

*** W106_shadow
patchfile = w106_15_shadow.patch
- commit revision 1298
Control variables for translucency and fuzzy mode were confused together,
and confused with smoke draw.
Separated fuzzy shadow draw from translucency.  Put fuzzy shadow draw
control in effects menu.
Expanded translucency control in effects menu.
Fixed Smoke draw function assign.
Fixes bug 0631.

*** W106_connect
patchfile = w106_16_connect.patch
- commit revision 1299
The -connect command line switch was not working due to multiple
tests of the switch, and multiple enablings, triggering an error message.
Setting of the critical variable, netgame, is reduced to one location
for connect, the indirect connect command issued during init of TCP.
This is the wrong place for testing the connect switch, but TCP is using
information in the connect parameter to set its own parameters.

*** W106_autoexec
patchfile = w106_17_autoexec.patch
- commit revision 1300
Test for existance of the autoexec.cfg file before issuing an exec upon it.
This eliminates the extraneous error message about autoexec.cfg.

*** W106_version1463_1301_docs
patchfile = w106_18_version1463_1301_docs.patch
- commit revision 1301
Update the docs for Release 1.46.3.
Update the version to 1.46.3.
