setup: Show error when server address not entered.

Don't launch the game if a server address has not been entered; show a
message to the user instead. This fixes #121.
pcsound: Fix resouce leak with speaker_handle.

speaker_handle should be close()d after forking the separate sound
server. This fixes #192 (thanks Edward-san).
sound: Fix crash with large values of snd_channels.

Sanity check the handles passed to the i_sdlsound.c API functions and
ignore requests that involve channel numbers higher than 15. This
fixes a crash if the user sets the snd_channels config variable is set
to a high value. This fixes #149 (thanks Alexandre Xavier).
midifile: Fix portability issue with malloc(0).

In the C standards, malloc(0) may return NULL without indicating a
failure to allocate. As values read from the MIDI file may be
arbitrary, add one to the allocated length so that we always allocated
a positive value. This fixes #165 (thanks nmain).
doom: Allow warp up to MAP40 to match Vanilla.

Vanilla Doom allows warp with the IDCLEV cheat up to MAP40, though it
normally crashes. Match this behavior and set MAP40 as the maximum
rather than MAP34. This fixes #181 (thanks Alexandre Xavier).
setup: Save selected game when browsing menus.

Once a game type (IWAD) has been selected, remember that selection
rather than resetting to the first item in the list when the window is
closed and reopened. This fixes #169 (thanks Alexandre Xavier).
textscreen: Init screen at native bit depth.

Always call SDL_SetVideoMode with bpp=0 to use the desktop's native
bit depth, and instead draw into an intermediate 8-bit screenbuffer
surface. This ensures that we do not encounter any palette mess-ups
as on some systems true 8-bit screen modes are poorly supported.
hexen: Create HR (startup) screen at native bpp.

Always call SDL_SetVideoMode() with bpp=0 to use the native pixel
depth of the display. This avoids problems with some systems that
don't properly support 8-bit screen modes any more. Draw into an
intermediate buffer and let SDL take care of the pixel depth
conversion for us.
net: Add -nodes command line argument.

This matches the -nodes parameter that ipxsetup has; interpret it as
an "auto-start" parameter that launches the game when the intended
number of clients have joined the server.
video: Change default for screen_bpp to 0.

Some machines don't work well with 8-bit screen depths any more. It's
better to default to just using the machine's native color depth
instead. Change the default to 0 (for SDL_SetVideoMode this means "use
native color depth"), auto-adjust to native color depth on startup if
screen_bpp=0 (so that debug messages at least make sense) and document
for the config file value that a value of zero means "use native".
music: Fix -dumpsubstconfig for Heretic/Hexen.

The config dumping command line option assumed that music lumps were
named like D_MYLUMP, but this is not the case for Heretic and Hexen,
where there is no D_ prefix and music lumps can have any name.

Change the logic to instead look at the contents of lumps and identify
music lumps from the MUS / MIDI header.
setup: Call TXT_Shutdown on exit.

Some systems (fbcon SDL driver) get messed up if not cleanly shut
down. Make sure that we call SDL_QuitSubsystem on shutdown.
Add first version of philosophy document.
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
joystick: Add an axis to allow strafing.

Modern gamepads typically have 2-3 D-pads and joysticks. This means
that it's desirable to be able to use one joystick for turning and
another for strafing. Add another axis in addition to the current X
and y axes that performs strafe movement.
joystick: Add joystick button to toggle menu.

When using a joystick or gamepad it's nice to be able to bring up the
menu without having to reach for the keyboard. This makes modern
gamepads more useful/usable.
setup: Change labelling to clarify gamepad support.

Vanilla Doom's setup.exe only made reference to "joysticks" as back
then gamepads were relatively uncommon for PCs and ports for game
controllers canonically known as "joystick ports". Nowadays it's far
more likely (and ergonomic) that the player will be using a gamepad
than a joystick. Change the labelling to refer to "Gamepad/Joystick"
or "controller" instead.
Exit with error on startup if using the wrong IWAD.

Having multiple binaries can cause some confusion - some users try to
run chocolate-doom with hexen.wad, thinking it is supported. Add a
startup check that makes sure the user is not trying to start the game
using the wrong IWAD file for the binary being run.

This fixes #382.
setup: Make iwad_t pointers const.

The table of IWAD data is stored in const memory, so make all iwad_t
pointers const to fix compiler warnings.
server: Fix sending of WAD/DEH checksums to clients.

Clients receive the WAD and dehacked checksums of the controlling
player and are supposed to display a warning at the startup screen if
they do not match. However, reversed logic in the code that sends the
waiting data to clients meant that they were always sent their own
checksums, so the error message was never displayed.

This fixes #384.