Fixed build, minor fixes
This commit is contained in:
parent
4f4ac0a66e
commit
1314e4a9b6
|
@ -1,9 +1,27 @@
|
|||
SUBDIRS = linux
|
||||
|
||||
noinst_LIBRARIES = libinput.a
|
||||
INCLUDES = -I$(top_srcdir)/includes -I$(top_srcdir)/main -I$(top_srcdir)/arch/include
|
||||
|
||||
libinput_a_SOURCES = \
|
||||
noinst_LIBRARIES = libinput.a
|
||||
|
||||
if ENV_DJGPP
|
||||
libinput_a_SOURCES = dos_key.c dos_joyc.c dos_joydefs.c dos_mouse.c
|
||||
else
|
||||
if USE_GGI
|
||||
libinput_a_SOURCES = linux_joydefs.c linux_joystick.c \
|
||||
ggi_event.c ggi_key.c ggi_mouse.c
|
||||
else
|
||||
if USE_SVGALIB
|
||||
libinput_a_SOURCES = linux_joydefs.c linux_joystick.c \
|
||||
svgalib_event.c svgalib_key.c svgalib_mouse.c svgalib_init.c
|
||||
else
|
||||
libinput_a_SOURCES = linux_joydefs.c linux_joystick.c \
|
||||
sdl_event.c sdl_key.c sdl_mouse.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_libinput_a_SOURCES = \
|
||||
dos_key.c dos_joyc.c dos_joydefs.c dos_mouse.c \
|
||||
ggi_event.c ggi_key.c ggi_mouse.c \
|
||||
linux_joydefs.c linux_joystick.c \
|
||||
|
|
156
input/dos_joyc.c
156
input/dos_joyc.c
|
@ -11,9 +11,159 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|||
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||
*/
|
||||
|
||||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/dos_joyc.c,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:56 $
|
||||
*
|
||||
* Routines for joystick reading.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.2 2001/01/24 04:29:45 bradleyb
|
||||
* changed args_find to FindArg
|
||||
*
|
||||
* Revision 1.1.1.2 2001/01/19 03:33:52 bradleyb
|
||||
* Import of d2x-0.0.9-pre1
|
||||
*
|
||||
* Revision 1.1.1.1 1999/06/14 21:58:26 donut
|
||||
* Import of d1x 1.37 source.
|
||||
*
|
||||
* Revision 1.37 1995/10/07 13:22:31 john
|
||||
* Added new method of reading joystick that allows higher-priority
|
||||
* interrupts to go off.
|
||||
*
|
||||
* Revision 1.36 1995/03/30 11:03:40 john
|
||||
* Made -JoyBios read buttons using BIOS.
|
||||
*
|
||||
* Revision 1.35 1995/02/14 11:39:25 john
|
||||
* Added polled/bios joystick readers..
|
||||
*
|
||||
* Revision 1.34 1995/02/10 17:06:12 john
|
||||
* Fixed bug with plugging in a joystick not getting detected.
|
||||
*
|
||||
* Revision 1.33 1995/01/27 16:39:42 john
|
||||
* Made so that if no joystick detected, it wont't
|
||||
* read buttons.
|
||||
*
|
||||
* Revision 1.32 1995/01/12 13:16:40 john
|
||||
* Made it so that joystick can't lose an axis
|
||||
* by 1 weird reading. Reading has to occurr during
|
||||
* calibration for this to happen.
|
||||
*
|
||||
* Revision 1.31 1994/12/28 15:56:03 john
|
||||
* Fixed bug that refused to read joysticks whose
|
||||
* min,cen,max were less than 100 apart.
|
||||
*
|
||||
* Revision 1.30 1994/12/28 15:31:53 john
|
||||
* Added code to read joystick axis not all at one time.
|
||||
*
|
||||
* Revision 1.29 1994/12/27 15:44:36 john
|
||||
* Made the joystick timeout be at 1/100th of a second,
|
||||
* regardless of CPU speed.
|
||||
*
|
||||
* Revision 1.28 1994/12/04 11:54:54 john
|
||||
* Made stick read at whatever rate the clock is at, not
|
||||
* at 18.2 times/second.
|
||||
*
|
||||
* Revision 1.27 1994/11/29 02:25:40 john
|
||||
* Made it so that the scaled reading returns 0
|
||||
* if the calibration factors look funny..
|
||||
*
|
||||
* Revision 1.26 1994/11/22 11:08:07 john
|
||||
* Commented out the ARCADE joystick.
|
||||
*
|
||||
* Revision 1.25 1994/11/14 19:40:26 john
|
||||
* Fixed bug with no joystick being detected.
|
||||
*
|
||||
* Revision 1.24 1994/11/14 19:36:40 john
|
||||
* Took out initial cheapy calibration.
|
||||
*
|
||||
* Revision 1.23 1994/11/14 19:13:27 john
|
||||
* Took out the calibration in joy_init
|
||||
*
|
||||
* Revision 1.22 1994/10/17 10:09:57 john
|
||||
* Made the state look at last_State, so that a joy_flush
|
||||
* doesn't cause a new down state to be added next reading.
|
||||
*
|
||||
* Revision 1.21 1994/10/13 11:36:23 john
|
||||
* Made joy_down_time be kept track of in fixed seconds,
|
||||
* not ticks.
|
||||
*
|
||||
* Revision 1.20 1994/10/12 16:58:50 john
|
||||
* Fixed bug w/ previous comment.
|
||||
*
|
||||
* Revision 1.19 1994/10/12 16:57:44 john
|
||||
* Added function to set a joystick button's state.
|
||||
*
|
||||
* Revision 1.18 1994/10/11 10:20:13 john
|
||||
* Fixed Flightstick Pro/
|
||||
* ..
|
||||
*
|
||||
* Revision 1.17 1994/09/29 18:29:20 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.16 1994/09/27 19:17:23 john
|
||||
* Added code so that is joy_init is never called, joystick is not
|
||||
* used at all.
|
||||
*
|
||||
* Revision 1.15 1994/09/22 16:09:23 john
|
||||
* Fixed some virtual memory lockdown problems with timer and
|
||||
* joystick.
|
||||
*
|
||||
* Revision 1.14 1994/09/16 11:44:42 john
|
||||
* Fixed bug with slow joystick.
|
||||
*
|
||||
* Revision 1.13 1994/09/16 11:36:15 john
|
||||
* Fixed bug with reading non-present channels.
|
||||
*
|
||||
* Revision 1.12 1994/09/15 20:52:48 john
|
||||
* rme john
|
||||
* Added support for the Arcade style joystick.
|
||||
*
|
||||
* Revision 1.11 1994/09/13 20:04:49 john
|
||||
* Fixed bug with joystick button down_time.
|
||||
*
|
||||
* Revision 1.10 1994/09/10 13:48:07 john
|
||||
* Made all 20 buttons read.
|
||||
*
|
||||
* Revision 1.9 1994/08/31 09:55:02 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.8 1994/08/29 21:02:14 john
|
||||
* Added joy_set_cal_values...
|
||||
*
|
||||
* Revision 1.7 1994/08/29 20:52:17 john
|
||||
* Added better cyberman support; also, joystick calibration
|
||||
* value return funcctiionn,
|
||||
*
|
||||
* Revision 1.6 1994/08/24 18:53:12 john
|
||||
* Made Cyberman read like normal mouse; added dpmi module; moved
|
||||
* mouse from assembly to c. Made mouse buttons return time_down.
|
||||
*
|
||||
* Revision 1.5 1994/07/14 22:12:23 john
|
||||
* Used intrinsic forms of outp to fix vmm error.
|
||||
*
|
||||
* Revision 1.4 1994/07/07 19:52:59 matt
|
||||
* Made joy_init() return success/fail flag
|
||||
* Made joy_init() properly detect a stick if one is plugged in after joy_init()
|
||||
* was called the first time.
|
||||
*
|
||||
* Revision 1.3 1994/07/01 10:55:55 john
|
||||
* Fixed some bugs... added support for 4 axis.
|
||||
*
|
||||
* Revision 1.2 1994/06/30 20:36:55 john
|
||||
* Revamped joystick code.
|
||||
*
|
||||
* Revision 1.1 1994/06/30 15:42:15 john
|
||||
* Initial revision
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __ENV_DJGPP__
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -653,5 +803,3 @@ void joy_poll()
|
|||
if ( joystick.slow_read & JOY_BIOS_READINGS )
|
||||
joystick.last_value = joy_read_buttons_bios2();
|
||||
}
|
||||
|
||||
#endif // __ENV_DJGPP__
|
||||
|
|
|
@ -11,9 +11,272 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|||
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||
*/
|
||||
|
||||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/dos_joydefs.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* .
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.1.1.2 2001/01/19 03:33:52 bradleyb
|
||||
* Import of d2x-0.0.9-pre1
|
||||
*
|
||||
* Revision 1.1.1.1 1999/06/14 21:58:29 donut
|
||||
* Import of d1x 1.37 source.
|
||||
*
|
||||
* Revision 2.2 1995/06/30 12:30:22 john
|
||||
* Added -Xname command line.
|
||||
*
|
||||
* Revision 2.1 1995/04/06 12:13:20 john
|
||||
* Made so you can calibrate Gravis Gamepad.
|
||||
*
|
||||
* Revision 2.0 1995/02/27 11:30:27 john
|
||||
* New version 2.0, which has no anonymous unions, builds with
|
||||
* Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
|
||||
*
|
||||
* Revision 1.71 1995/02/12 02:06:10 john
|
||||
* Fixed bug with joystick incorrectly asking for
|
||||
* calibration.
|
||||
*
|
||||
* Revision 1.70 1995/01/28 15:58:07 john
|
||||
* Made joystick calibration be only when wrong detected in
|
||||
* menu or joystick axis changed.
|
||||
*
|
||||
* Revision 1.69 1995/01/25 14:37:55 john
|
||||
* Made joystick only prompt for calibration once...
|
||||
*
|
||||
* Revision 1.68 1995/01/24 16:34:29 john
|
||||
* Made so that if you reconfigure joystick and
|
||||
* add or subtract an axis, it asks for a recalibration
|
||||
* upon leaving.
|
||||
*
|
||||
* Revision 1.67 1994/12/29 11:08:51 john
|
||||
* Fixed Thrustmaster and Logitech Wingman extreme
|
||||
* Hat by reading the y2 axis during the center stage
|
||||
* of the calibration, and using 75, 50, 27, and 3 %
|
||||
* as values for the 4 positions.
|
||||
*
|
||||
* Revision 1.66 1994/12/15 18:17:39 john
|
||||
* Fixed warning with previous.
|
||||
*
|
||||
* Revision 1.65 1994/12/15 18:15:48 john
|
||||
* Made the joy cal only write the .cfg file, not
|
||||
* the player file.
|
||||
*
|
||||
* Revision 1.64 1994/12/13 14:43:35 john
|
||||
* Took out the code in kconfig to build direction array.
|
||||
* Called kc_set_controls after selecting a new control type.
|
||||
*
|
||||
* Revision 1.63 1994/12/10 12:08:47 john
|
||||
* Changed some delays to use TICKER instead of timer_get_fixed_seconds.
|
||||
*
|
||||
* Revision 1.62 1994/12/09 11:01:07 mike
|
||||
* force calibration of joystick on joystick selection from Controls... menu.
|
||||
*
|
||||
* Revision 1.61 1994/12/07 21:50:27 john
|
||||
* Put stop/start time around joystick delay.
|
||||
*
|
||||
* Revision 1.60 1994/12/07 19:34:39 john
|
||||
* Added delay.
|
||||
*
|
||||
* Revision 1.59 1994/12/07 18:12:14 john
|
||||
* NEatened up joy cal.,
|
||||
*
|
||||
* Revision 1.58 1994/12/07 17:07:51 john
|
||||
* Fixed up joy cal.
|
||||
*
|
||||
* Revision 1.57 1994/12/07 16:48:53 yuan
|
||||
* localization
|
||||
*
|
||||
* Revision 1.56 1994/12/07 16:05:55 john
|
||||
* Changed the way joystick calibration works.
|
||||
*
|
||||
* Revision 1.55 1994/12/06 20:15:22 john
|
||||
* Took out code that unpauses songs that were never paused.
|
||||
*
|
||||
* Revision 1.54 1994/12/06 15:14:09 yuan
|
||||
* Localization
|
||||
*
|
||||
* Revision 1.53 1994/12/05 16:29:16 john
|
||||
* Took out music pause around the cheat menu.
|
||||
*
|
||||
* Revision 1.52 1994/12/04 12:39:10 john
|
||||
* MAde so that FCS calibration doesn't ask for axis #2.
|
||||
*
|
||||
* Revision 1.51 1994/12/03 15:14:59 john
|
||||
* Took out the delay mentioned previosuly cause it would
|
||||
* cause bigger problems than it helps, especially with netgames.
|
||||
*
|
||||
* Revision 1.50 1994/12/03 14:16:14 john
|
||||
* Put a delay between screens in joy cal to keep Yuan from
|
||||
* double hitting.
|
||||
*
|
||||
* Revision 1.49 1994/12/03 11:04:06 john
|
||||
* Changed newmenu code a bit to fix bug with bogus
|
||||
* backgrounds occcasionally.
|
||||
*
|
||||
* Revision 1.48 1994/12/02 11:03:44 yuan
|
||||
* Localization.
|
||||
*
|
||||
* Revision 1.47 1994/12/02 10:50:33 yuan
|
||||
* Localization
|
||||
*
|
||||
* Revision 1.46 1994/12/01 12:21:59 john
|
||||
* Added code to calibrate 2 joysticks separately.
|
||||
*
|
||||
* Revision 1.45 1994/12/01 11:52:31 john
|
||||
* Added message when you select FCS to say that if
|
||||
* you have WCS, see manuel.
|
||||
*
|
||||
* Revision 1.44 1994/11/29 02:26:28 john
|
||||
* Made the prompts for upper-left, lower right for joy
|
||||
* calibration more obvious.
|
||||
*
|
||||
* Revision 1.43 1994/11/26 13:13:59 matt
|
||||
* Changed "none" option to "keyboard only"
|
||||
*
|
||||
* Revision 1.42 1994/11/21 19:35:13 john
|
||||
* Replaced calls to joy_init with if (joy_present)
|
||||
*
|
||||
* Revision 1.41 1994/11/21 19:28:34 john
|
||||
* Changed warning for no joystick to use nm_messagebox..
|
||||
*
|
||||
* Revision 1.40 1994/11/21 19:06:25 john
|
||||
* Made it so that it only stops sound when your in game mode.
|
||||
*
|
||||
* Revision 1.39 1994/11/21 11:47:18 john
|
||||
* Made sound pause during joystick calibration.
|
||||
*
|
||||
* Revision 1.38 1994/11/10 20:34:18 rob
|
||||
* Removed menu-specific network mode support in favor in new stuff
|
||||
* in newmenu.c
|
||||
*
|
||||
* Revision 1.37 1994/11/08 21:21:38 john
|
||||
* Made Esc exit joystick calibration.
|
||||
*
|
||||
* Revision 1.36 1994/11/08 15:14:42 john
|
||||
* Added more calls so net doesn't die in net game.
|
||||
*
|
||||
* Revision 1.35 1994/11/08 14:59:12 john
|
||||
* Added code to respond to network while in menus.
|
||||
*
|
||||
* Revision 1.34 1994/10/24 19:56:32 john
|
||||
* Made the new user setup prompt for config options.
|
||||
*
|
||||
* Revision 1.33 1994/10/22 14:11:52 mike
|
||||
* Suppress compiler warning message.
|
||||
*
|
||||
* Revision 1.32 1994/10/19 12:44:24 john
|
||||
* Added hours field to player structure.
|
||||
*
|
||||
* Revision 1.31 1994/10/17 13:07:13 john
|
||||
* Moved the descent.cfg info into the player config file.
|
||||
*
|
||||
* Revision 1.30 1994/10/13 21:41:12 john
|
||||
* MAde Esc exit out of joystick calibration.
|
||||
*
|
||||
* Revision 1.29 1994/10/13 19:22:27 john
|
||||
* Added separate config saves for different devices.
|
||||
* Made all the devices work together better, such as mice won't
|
||||
* get read when you're playing with the joystick.
|
||||
*
|
||||
* Revision 1.28 1994/10/13 11:40:18 john
|
||||
* Took out warnings.
|
||||
*
|
||||
* Revision 1.27 1994/10/13 11:35:23 john
|
||||
* Made Thrustmaster FCS Hat work. Put a background behind the
|
||||
* keyboard configure. Took out turn_sensitivity. Changed sound/config
|
||||
* menu to new menu. Made F6 be calibrate joystick.
|
||||
*
|
||||
* Revision 1.26 1994/10/11 21:29:03 matt
|
||||
* Made a bunch of menus have good initial selected values
|
||||
*
|
||||
* Revision 1.25 1994/10/11 17:08:39 john
|
||||
* Added sliders for volume controls.
|
||||
*
|
||||
* Revision 1.24 1994/10/10 17:59:21 john
|
||||
* Neatend previous.
|
||||
*
|
||||
* Revision 1.23 1994/10/10 17:57:59 john
|
||||
* Neatend previous.
|
||||
*
|
||||
* Revision 1.22 1994/10/10 17:56:11 john
|
||||
* Added messagebox that tells that config has been saved.
|
||||
*
|
||||
* Revision 1.21 1994/09/30 12:37:26 john
|
||||
* Added midi,digi volume to configuration.
|
||||
*
|
||||
* Revision 1.20 1994/09/22 16:14:14 john
|
||||
* Redid intro sequecing.
|
||||
*
|
||||
* Revision 1.19 1994/09/19 18:50:15 john
|
||||
* Added switch to disable joystick.
|
||||
*
|
||||
* Revision 1.18 1994/09/12 11:47:36 john
|
||||
* Made stupid cruise work better. Make kconfig values get
|
||||
* read/written to disk.
|
||||
*
|
||||
* Revision 1.17 1994/09/10 15:46:47 john
|
||||
* First version of new keyboard configuration.
|
||||
*
|
||||
* Revision 1.16 1994/09/06 19:35:44 john
|
||||
* Fixed bug that didn';t load new size .cal file.
|
||||
*
|
||||
* Revision 1.15 1994/09/06 14:51:58 john
|
||||
* Added sensitivity adjustment, fixed bug with joystick button not
|
||||
* staying down.
|
||||
*
|
||||
* Revision 1.14 1994/09/02 16:13:47 john
|
||||
* Made keys fill in position.
|
||||
*
|
||||
* Revision 1.13 1994/08/31 17:58:50 john
|
||||
* Made a bit simpler.
|
||||
*
|
||||
* Revision 1.12 1994/08/31 14:17:54 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.11 1994/08/31 14:10:56 john
|
||||
* Made keys not work when KEY_DELETE pressed.
|
||||
*
|
||||
* Revision 1.10 1994/08/31 13:40:47 mike
|
||||
* Change constant
|
||||
*
|
||||
* Revision 1.9 1994/08/31 12:56:27 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.8 1994/08/30 20:38:29 john
|
||||
* Add more config stuff..
|
||||
*
|
||||
* Revision 1.7 1994/08/30 16:37:25 john
|
||||
* Added menu options to set controls.
|
||||
*
|
||||
* Revision 1.6 1994/08/30 09:27:18 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.5 1994/08/30 09:12:01 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.4 1994/08/29 21:18:32 john
|
||||
* First version of new keyboard/oystick remapping stuff.
|
||||
*
|
||||
* Revision 1.3 1994/08/24 19:00:29 john
|
||||
* Changed key_down_time to return fixed seconds instead of
|
||||
* milliseconds.
|
||||
*
|
||||
* Revision 1.2 1994/08/17 16:50:37 john
|
||||
* Added damaging fireballs, missiles.
|
||||
*
|
||||
* Revision 1.1 1994/08/17 10:07:12 john
|
||||
* Initial revision
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __ENV_DJGPP__
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -414,6 +677,3 @@ void joydefs_config()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif // __ENV_DJGPP__
|
||||
|
|
136
input/dos_key.c
136
input/dos_key.c
|
@ -11,11 +11,143 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|||
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/dos_key.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* Functions for keyboard handler.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.1.1.2 2001/01/19 03:33:52 bradleyb
|
||||
* Import of d2x-0.0.9-pre1
|
||||
*
|
||||
* Revision 1.1.1.1 1999/06/14 21:58:32 donut
|
||||
* Import of d1x 1.37 source.
|
||||
*
|
||||
* Revision 1.35 1995/01/25 20:13:30 john
|
||||
* Took out not passing keys to debugger if w10.
|
||||
*
|
||||
* Revision 1.34 1995/01/14 19:19:31 john
|
||||
* Made so when you press Shift+Baskspace, it release keys autmatically.
|
||||
*
|
||||
* Revision 1.33 1994/12/13 09:21:48 john
|
||||
* Took out keyd_editor_mode, and KEY_DEBUGGED stuff for NDEBUG versions.
|
||||
*
|
||||
* Revision 1.32 1994/11/12 13:52:01 john
|
||||
* Fixed bug with code that cleared bios buffer.
|
||||
*
|
||||
* Revision 1.31 1994/10/24 15:16:16 john
|
||||
* Added code to detect KEY_PAUSE.
|
||||
*
|
||||
* Revision 1.30 1994/10/24 13:57:53 john
|
||||
* Hacked in support for pause key onto code 0x61.
|
||||
*
|
||||
* Revision 1.29 1994/10/21 15:18:13 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.28 1994/10/21 15:17:24 john
|
||||
* Made LSHIFT+BACKSPACE do what PrtScr used to.
|
||||
*
|
||||
* Revision 1.27 1994/09/22 16:09:18 john
|
||||
* Fixed some virtual memory lockdown problems with timer and
|
||||
* joystick.
|
||||
*
|
||||
* Revision 1.26 1994/09/15 21:32:47 john
|
||||
* Added bounds checking for down_count scancode
|
||||
* parameter.
|
||||
*
|
||||
* Revision 1.25 1994/08/31 12:22:20 john
|
||||
* Added KEY_DEBUGGED
|
||||
*
|
||||
* Revision 1.24 1994/08/24 18:53:48 john
|
||||
* Made Cyberman read like normal mouse; added dpmi module; moved
|
||||
* mouse from assembly to c. Made mouse buttons return time_down.
|
||||
*
|
||||
* Revision 1.23 1994/08/18 15:17:51 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.22 1994/08/18 15:16:38 john
|
||||
* fixed some bugs with clear_key_times and then
|
||||
* removed it because i fixed key_flush to do the
|
||||
* same.
|
||||
*
|
||||
* Revision 1.21 1994/08/17 19:01:25 john
|
||||
* Attempted to fix a bug with a key being held down
|
||||
* key_flush called, then the key released having too
|
||||
* long of a time.
|
||||
*
|
||||
* Revision 1.20 1994/08/08 10:43:48 john
|
||||
* Recorded when a key was pressed for key_inkey_time.
|
||||
*
|
||||
* Revision 1.19 1994/06/22 15:00:03 john
|
||||
* Made keyboard close automatically on exit.
|
||||
*
|
||||
* Revision 1.18 1994/06/21 09:16:29 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.17 1994/06/21 09:08:23 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.16 1994/06/21 09:05:01 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.15 1994/06/21 09:04:24 john
|
||||
* Made PrtScreen do an int5
|
||||
*
|
||||
* Revision 1.14 1994/06/17 17:17:06 john
|
||||
* Added keyd_time_last_key_was_pressed or something like that.
|
||||
*
|
||||
* Revision 1.13 1994/05/14 13:55:16 matt
|
||||
* Added #define to control key passing to bios
|
||||
*
|
||||
* Revision 1.12 1994/05/05 18:09:39 john
|
||||
* Took out BIOS to prevent stuck keys.
|
||||
*
|
||||
* Revision 1.11 1994/05/03 17:39:12 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.10 1994/04/29 12:14:20 john
|
||||
* Locked all memory used during interrupts so that program
|
||||
* won't hang when using virtual memory.
|
||||
*
|
||||
* Revision 1.9 1994/04/28 23:49:41 john
|
||||
* Made key_flush flush more keys and also did something else but i forget what.
|
||||
*
|
||||
* Revision 1.8 1994/04/22 12:52:12 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.7 1994/04/01 10:44:59 mike
|
||||
* Change key_getch() to call getch() if our interrupt hasn't been installed.
|
||||
*
|
||||
* Revision 1.6 1994/03/09 10:45:48 john
|
||||
* Neatend code a bit.
|
||||
*
|
||||
* Revision 1.5 1994/02/17 17:24:16 john
|
||||
* Neatened up a bit.
|
||||
*
|
||||
* Revision 1.4 1994/02/17 16:30:29 john
|
||||
* Put in code to pass keys when in debugger.
|
||||
*
|
||||
* Revision 1.3 1994/02/17 15:57:59 john
|
||||
* Made handler not chain to BIOS handler.
|
||||
*
|
||||
* Revision 1.2 1994/02/17 15:56:06 john
|
||||
* Initial version.
|
||||
*
|
||||
* Revision 1.1 1994/02/17 15:54:07 john
|
||||
* Initial revision
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
//#define PASS_KEYS_TO_BIOS 1 //if set, bios gets keys
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __ENV_DJGPP__
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <dos.h>
|
||||
|
@ -580,5 +712,3 @@ void key_close()
|
|||
_enable();
|
||||
|
||||
}
|
||||
|
||||
#endif // __ENV_DJGPP__
|
||||
|
|
|
@ -11,9 +11,67 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|||
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||
*/
|
||||
|
||||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/dos_mouse.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* Functions to access Mouse and Cyberman...
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.1.1.2 2001/01/19 03:33:52 bradleyb
|
||||
* Import of d2x-0.0.9-pre1
|
||||
*
|
||||
* Revision 1.1.1.1 1999/06/14 21:58:38 donut
|
||||
* Import of d1x 1.37 source.
|
||||
*
|
||||
* Revision 1.11 1995/02/10 18:52:17 john
|
||||
* Fixed bug with mouse not getting closed.
|
||||
*
|
||||
* Revision 1.10 1995/02/02 11:10:33 john
|
||||
* Changed a bunch of mouse stuff around to maybe get
|
||||
* around PS/2 mouse hang.
|
||||
*
|
||||
* Revision 1.9 1995/01/14 19:19:52 john
|
||||
* Fixed signed short error cmp with -1 that caused mouse
|
||||
* to break under Watcom 10.0
|
||||
*
|
||||
* Revision 1.8 1994/12/27 12:38:23 john
|
||||
* Made mouse use temporary dos buffer instead of
|
||||
*
|
||||
* allocating its own.
|
||||
*
|
||||
*
|
||||
* Revision 1.7 1994/12/05 23:54:53 john
|
||||
* Fixed bug with mouse_get_delta only returning positive numbers..
|
||||
*
|
||||
* Revision 1.6 1994/11/18 23:18:18 john
|
||||
* Changed some shorts to ints.
|
||||
*
|
||||
* Revision 1.5 1994/09/13 12:34:02 john
|
||||
* Added functions to get down count and state.
|
||||
*
|
||||
* Revision 1.4 1994/08/29 20:52:19 john
|
||||
* Added better cyberman support; also, joystick calibration
|
||||
* value return funcctiionn,
|
||||
*
|
||||
* Revision 1.3 1994/08/24 18:54:32 john
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.2 1994/08/24 18:53:46 john
|
||||
* Made Cyberman read like normal mouse; added dpmi module; moved
|
||||
* mouse from assembly to c. Made mouse buttons return time_down.
|
||||
*
|
||||
* Revision 1.1 1994/08/24 13:56:37 john
|
||||
* Initial revision
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __ENV_DJGPP__
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __DJGPP__
|
||||
#include <dpmi.h>
|
||||
|
@ -600,5 +658,3 @@ void mouse_get_cyberman_pos( int *x, int *y )
|
|||
*x = (((ei->x+8128)*256)/(8064+8128+1)) - 127;
|
||||
*y = (((ei->y+8128)*256)/(8064+8128+1)) - 127;
|
||||
}
|
||||
|
||||
#endif // __ENV_DJGPP__
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/ggi_event.c,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* GGI Event related stuff
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef GII_INPUT
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -130,5 +141,3 @@ int event_init()
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* GII_INPUT */
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/ggi_init.c,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* GGI Initialization
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef GII_INPUT
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -12,5 +23,3 @@
|
|||
void arch_ggi_init()
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* GII_INPUT */
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/ggi_key.c,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* GGI keyboard input support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef GII_INPUT
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -475,6 +486,3 @@ unsigned int key_up_count(int scancode)
|
|||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
#endif /* GII_INPUT */
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/ggi_mouse.c,v $
|
||||
* $Revision: 1.4 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* GGI mouse support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef GII_INPUT
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -159,5 +170,3 @@ int mouse_button_state(int button)
|
|||
{
|
||||
return Mouse.buttons[button].pressed;
|
||||
}
|
||||
|
||||
#endif /* GII_INPUT */
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#define MAX_AXES 32
|
||||
|
||||
typedef struct joystick_device {
|
||||
int device_number;
|
||||
int version;
|
||||
|
|
|
@ -11,8 +11,21 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|||
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/linux_joydefs.c,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* Linux joystick support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#ifdef __ENV_LINUX__
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -238,5 +251,3 @@ void joydefs_config()
|
|||
} while(i1>-1);
|
||||
|
||||
}
|
||||
|
||||
#endif //__ENV_LINUX__
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
#include <conf.h>
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/linux_joystick.c,v $
|
||||
* $Revision: 1.4 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* Linux joystick support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __ENV_LINUX__
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <linux/joystick.h>
|
||||
|
@ -378,5 +390,3 @@ void joy_poll() {
|
|||
void joy_set_slow_reading(int flag) {
|
||||
|
||||
}
|
||||
|
||||
#endif // __ENV_LINUX__
|
||||
|
|
|
@ -1,8 +1,18 @@
|
|||
// SDL Event related stuff
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/sdl_event.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SDL Event related stuff
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#ifdef SDL_INPUT
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -54,5 +64,3 @@ int event_init()
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
// SDL keyboard input support
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/sdl_key.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SDL keyboard input support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
|
||||
#ifdef SDL_INPUT
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -617,5 +626,3 @@ unsigned int key_up_count(int scancode)
|
|||
|
||||
return n;
|
||||
}
|
||||
|
||||
#endif //SDL_INPUT
|
||||
|
|
|
@ -1,8 +1,18 @@
|
|||
// SDL mouse driver.
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/sdl_mouse.c,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SDL mouse driver.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
#endif
|
||||
|
||||
#ifdef SDL_INPUT
|
||||
#include <string.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include "fix.h"
|
||||
|
@ -233,7 +243,3 @@ int mouse_button_state(int button)
|
|||
event_poll();
|
||||
return Mouse.buttons[button].pressed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif // SDL_INPUT
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
/* SVGALib Event related stuff */
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/svgalib_event.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SVGALib Event related stuff
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
|
||||
#ifdef SVGALIB_INPUT
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -27,5 +36,3 @@ void event_poll()
|
|||
initialised = 1;
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
#endif /* SVGALIB_INPUT */
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
/* SVGALib initialization */
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/svgalib_init.c,v $
|
||||
* $Revision: 1.4 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SVGALib initialization
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
|
||||
#ifdef SVGALIB_INPUT
|
||||
#endif
|
||||
|
||||
#include "args.h"
|
||||
|
||||
|
@ -13,5 +22,3 @@ void arch_svgalib_init()
|
|||
if (!FindArg("-nomouse"))
|
||||
d_mouse_init();
|
||||
}
|
||||
|
||||
#endif /* SVGALIB_INPUT */
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
/* SVGALib keyboard input support */
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/svgalib_key.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SVGALib keyboard input support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
|
||||
#ifdef SVGALIB_INPUT
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -364,5 +373,3 @@ unsigned int key_up_count(int scancode)
|
|||
|
||||
return n;
|
||||
}
|
||||
|
||||
#endif /* SVGALIB_INPUT */
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/input/svgalib_mouse.c,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-01-28 16:09:39 $
|
||||
* $Date: 2001-01-29 14:03:57 $
|
||||
*
|
||||
* SVGALib mouse support
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.2 2001/01/28 16:09:39 bradleyb
|
||||
* Removed duplicate files, and unified input headers.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <conf.h>
|
||||
|
||||
#ifdef SVGALIB_INPUT
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <vga.h>
|
||||
|
@ -220,5 +223,3 @@ int mouse_button_state(int button)
|
|||
event_poll();
|
||||
return Mouse.buttons[button].pressed;
|
||||
}
|
||||
|
||||
#endif /* SVGALIB_INPUT */
|
||||
|
|
Loading…
Reference in a new issue