Commit Graph
56 Commits
Author SHA1 Message Date
Glenn Maynard be7cf3d347 FOREACH_ENUM2 2006-09-27 05:25:22 +00:00
Glenn Maynard 1641aec026 InputDevice_Invalid 2006-09-26 21:10:47 +00:00
Glenn Maynard 361f8f4e01 NUM_InputDevice 2006-09-26 21:08:50 +00:00
Steve Checkoway b30cc9d9d1 IsPump(). 2006-09-14 06:06:04 +00:00
Glenn Maynard ed0746a166 typedef (this one is typedefed just because it's used a lot) 2006-09-08 04:20:47 +00:00
Glenn Maynard 3c9897989c GetDeviceSpecificInputString and DeviceInputToLocalizedString are
the same: "a string suitable for display", but just formatted slightly
differently.  Handle these the same way (so hopefully a way to merge
them will become visible).

This also fixes the RageInputDevice dependency on RageInput.
2006-06-15 06:07:45 +00:00
Glenn Maynard 80c3beccb6 DeviceInputToLocalizedAndTranslatedString -> DeviceInputToLocalizedString
(translation is a part of localization)
2006-06-15 04:12:30 +00:00
Glenn Maynard c65580fed2 We have at least 7 functions to "turn a DeviceInput/Button into a string";
trying to simplify:
merge DeviceInputToTranslatedString into DeviceInputToLocalizedAndTranslatedString
2006-06-15 04:09:57 +00:00
Glenn Maynard 179c00cf40 DeviceButtonToLocalizedAndTranslatedString -> DeviceInputToTranslatedString
DeviceInputToTranslatedString -> DeviceInputToLocalizedAndTranslatedString
2006-06-15 03:39:25 +00:00
Chris Danford 8c4cedf63f let OS handle key modifers (fixes number buttons w/ French keyboard) 2006-06-10 20:33:56 +00:00
Chris Danford dce168b0c2 international keyboard support 2006-06-10 06:50:50 +00:00
Chris Danford 8c31297dac 32 joysticks 2006-04-21 00:13:46 +00:00
Chris Danford c2946d8342 localize DeviceButton names 2006-03-16 20:57:10 +00:00
Chris Danford bf0cc13a47 Change GetDevicesAndDescriptions to fill in one vector instead of 2
Ignore changes in non-joystick devices when automapping
2006-02-27 17:51:27 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 87dc61af3e operator< for use in maps 2005-12-28 20:53:42 +00:00
Glenn Maynard 4631c30ca7 remove unused 2005-12-28 19:16:17 +00:00
Glenn Maynard 841bbf4c1f remove GetNumDeviceButtons 2005-12-28 09:48:32 +00:00
Glenn Maynard 2d1ad839fa remove old 2005-12-28 09:32:31 +00:00
Glenn Maynard 7039cafa9a Merge input symbols: any device can have any input key.
- This reduces the number of types associated with input; adding a
   distinct input type doesn't introduce a whole new enumerated type
   and related functions.
 - Special handling for different devices is needed less often.  If you
   want to respond to an F1 press, simply check for KEY_F1; the device
   type doesn't really matter (though it'll usually be a keyboard).
 - This allows cleaner support for generalized USB devices.  While they're
   usually of the traditional classes (keyboard, joystick) with associated
   inputs, they don't have to be.
 - Forced casts between parallel types can be removed, and weakly-specified
   variables (ints instead of the enum type) can be fixed.

Some things that might have been merged havn't; for example, arrow keys
on a keyboard (KEY_UP) are still distinct from axes on a joystick (JOY_UP).
These may or may not be merged in the future.

Some were: removed PUMP_ symbols.  Treat them as generic buttons, and just
give them names with GetDeviceSpecificInputString.  It's not worth
introducing more special names for something only used in one place.
2005-12-28 08:52:20 +00:00
Glenn Maynard d4db7a0dd0 uncomment 2005-12-09 02:04:22 +00:00
Glenn Maynard cfe76dd96e cleanup 2005-12-09 01:48:20 +00:00
Chris Danford bad83b38b3 remove Para InputDevice. The controller appears as a Joystick. 2005-12-08 05:28:40 +00:00
Steve Checkoway 1150c33a57 Cleanup. 2005-10-14 07:20:14 +00:00
Chris Danford 6c2233fd03 JOY_1 -> JOY_BUTTON_1. I've confused DEVICE_JOY1 with JOY_1 many times. 2005-09-12 08:48:16 +00:00
Chris Danford 5351df6586 query for InputDeviceState 2005-08-20 22:49:25 +00:00
Chris Danford 4567cd0601 add assert message to GetNumDeviceButtons 2005-08-16 08:03:57 +00:00
Chris Danford c5d16a2ce8 make toString const 2005-08-15 16:03:00 +00:00
Charles Lohr 8e74fab0c1 Add: Win32 MIDI Support 2005-05-25 21:58:56 +00:00
Chris Danford e389ba6191 convert the rest to use Preference 2005-05-16 09:36:32 +00:00
Chris Danford f46f9d70d7 human readable Keymaps.ini 2005-04-24 02:15:41 +00:00
Glenn Maynard 0e8b4b8371 comments, cleanup 2005-02-13 03:21:22 +00:00
Chris Danford 28e4249b34 increase NUM_JOYSTICKS 2004-12-22 08:01:21 +00:00
Glenn Maynard f9bd7e3829 remove NUM_JOYSTICK_HATS 2004-09-28 05:52:03 +00:00
Glenn Maynard b89e424951 cleanup 2004-09-17 05:38:56 +00:00
Glenn Maynard 846c8d7e34 fix warnings? 2004-09-10 08:43:40 +00:00
Glenn Maynard 60e1cc4ada fix warnings 2004-09-10 08:19:48 +00:00
Glenn Maynard a643146a54 Okay, the SDL input driver changing display preferences finally got to
me, so I'm cleaning it up.

Add "level" parameter to DeviceInput, indicating the degree the axis
or button is depressed.  If it's < 0, it's not an analog input; otherwise,
IET_LEVEL_CHANGED events will come in when the level changes.

Add secondary stick axis inputs, so there's a correct place to put them.

Handle these inputs in ScreenCenterImage.  Inputs mapped to gameplay
inputs are always a primary input; otherwise, the first stick is translate
and the secondary is scale.  Input is analog when possible; holding shift
reverses the map, so keyboard input works roughly the same as before.

Do away with the special Xbox-specific centering code; use the standard
centering matrix.  If this doesn't work, any special cases to fix it should be
hidden away in RageDisplay_D3D.

The input maps are likely to work on the Xbox as is, since the SDL driver
maps axes in order, but I can't test it.

This won't work with PS2 converters, since #1: those things map the
secondary axis to seemingly random places (on mine, JOY_Z_UP,
JOY_Z_DOWN, JOY_ROT_Z_UP, JOY_ROT_Z_DOWN), and #2: they
don't identify themselves uniquely.  Unless there's a pattern in how they're
mapping that I can't see (since I don't have many converters), this just
can't be done reliably.  (No big deal; PCs have keyboards.)
2004-09-09 22:10:21 +00:00
Glenn Maynard aee0166436 remove COMPAT_KEYSYMS 2004-09-09 17:58:52 +00:00
Glenn Maynard 2852b1e6ed cleanup 2004-06-20 01:30:27 +00:00
Glenn Maynard d89d883e9f KEY_KP_EQUAL 2004-06-16 20:33:10 +00:00
Glenn Maynard 98ecd82db5 phasing out SDL_keysym.h 2004-06-16 20:26:45 +00:00
Glenn Maynard f9f10e2372 more license updates 2004-05-06 02:40:33 +00:00
Chris Danford 945441d0f8 add Para input handler (not quite working yet) 2003-12-17 09:33:39 +00:00
Glenn Maynard 9cf3f9b331 support 6 joysticks 2003-10-11 00:16:32 +00:00
Chris Danford 8c3db31ba7 optimize InputFilter::Update 2003-10-07 05:59:58 +00:00
Glenn Maynard 65e44b1f86 Optimize: remove spurious RageTimer construction 2003-09-07 22:39:04 +00:00
Glenn Maynard 315d225724 Add DeviceInput::IsJoystick. 2003-09-03 22:28:46 +00:00
Glenn Maynard 7483a249b4 add a ctor 2003-07-14 06:21:30 +00:00
Glenn Maynard 58847998a6 Zero out DeviceInput timestamps by default. 2003-07-13 01:34:57 +00:00