WHAT IS IT?
-----------

If you play Sun DOOM and like to use the mouse, then this fix will
make your day.  This directory contains a patch that adds mouse
support to Sun DOOM.  The patch uses a library preloading feature of
Solaris 2 to modify the behavior of Xlib to enable mouse events.


HOW TO USE
----------

The "doom1" script contains an example of how to set LD_PRELOAD
properly in order for the mouse patch to be dynamically loaded into
DOOM.  This script also sets up DOOM so that save games are stored in
$HOME/.doom1save.

To enable the mouse, make sure that $HOME/.doomrc contains the
following line:

use_mouse		1

If the mouse is enabled in the .doomrc file and the mouse patch is
working, then the pointer will be grabbed automatically when it first
enters the DOOM window.  The "Scroll Lock" key is used to toggle the
pointer grab.  Do NOT use the -grabmouse flag because it messes things
up.


USEFUL FEATURES
---------------

* Pausing single player or network game

The mouse patch includes a pause feature where the "Pause" key can be
used to pause the game.  Pressing any subsequent key will resume the
game.  If the mouse is grabbed, it will be released for the duration
of the pause and will be automatically re-grabbed when the game is
resumed.  A watch cursor will appear while the pause is in effect.
When the game is paused, DOOM's CPU usage will drop to zero.  This is
better than just hitting Esc because Esc does not free up the CPU.

The pause feature also works for a networked games.  Pressing "Pause"
will cause all the players' games to freeze until the player that
initiated the pause chooses to release it.  Unfortunately, the other
players do not get the watch cursor feedback.

The pause is implemented by blocking the thread of execution in the
DOOM process.  XNextEvent is called repeatedly until a KeyPress event
is received, after which the game proceeds.  Blocking the DOOM process
in a networked game causes all the other DOOM players to freeze
temporarily.


* Disabling Vertical Mouse Motion

Included in this patch is the ability to disable vertical mouse
movement.  Using the mouse is annoying when walking along narrow
ledges.  The slight vertical movement that inadvertently occurs while
making a turn often causes the DOOM marine to fall into the muck.

To get around this problem, I've added a way to temporarily disable
vertical mouse motion.  You can toggle vertical mouse motion on and
off by double-clicking the mouse strafe button.  The strafe button is
button 2 by default.

I tend to leave the vertical motion enabled until I come to a narrow
ledge.  Then I double-click to disable vertical mouse motion, start
walking across the ledge (or running like mad if playing deathmatch),
and double-click again when I'm back on solid ground to enable the
vertical mouse motion.


Comments are welcome, but I do not promise any support whatsoever
(see copyright notice in mouse.c).

Author:  Douglas R. Stein
         dstein@sun.com
