\[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_overlow_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.


