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