Commit Graph

52 Commits

Author SHA1 Message Date
Chris Danford ca745476c4 add InputDeviceStateToString 2007-07-12 11:02:00 +00:00
Steve Checkoway e3e5cf77e5 Don't include Foreach.h in RageUtil.h which does not use it. Instead, include it in the individual files that actually use it. 2006-11-01 11:18:46 +00:00
Steve Checkoway e87789da7c Rename XToString2 to XToString. 2006-10-15 00:09:18 +00:00
Steve Checkoway 04bff6bc1d Use XToString2. 2006-10-15 00:00: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
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 7578717a5a comment 2006-06-15 05:09:14 +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 60ba823489 cleanup odd conditional
comments
2006-06-15 04:05:59 +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 367da968f6 theme backslash to fix ugly slashes in edit help text 2006-03-27 22:54:47 +00:00
Chris Danford c2946d8342 localize DeviceButton names 2006-03-16 20:57:10 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard b52fe82827 names for stuff that's tricky for Keymaps.ini (a little nicer than using a more obscure separator). Not sure if there's any point to having full names for other keys ("at", "semicolon"). 2006-01-12 18:42:39 +00:00
Glenn Maynard 8d6a2c54dd fix loading JOY_BUTTON mappings from disk 2006-01-07 06:28:56 +00:00
Glenn Maynard b734b602d2 force TypeName arrays for XToString to be an array of const char*, not CString 2006-01-04 22:30:51 +00:00
Glenn Maynard b704036996 refactor so StringToDeviceButton doesn't iterate over every button 2005-12-29 05:10:11 +00:00
Glenn Maynard ce93d6be50 fix overlap between keyboard digits and numbered joystick buttons 2005-12-28 20:53:54 +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 31729a349c remove unused 2005-12-28 08:57:30 +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 81f38d89c3 fix DeviceInput::ToChar for delete 2005-12-09 02:17:38 +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
Chris Danford 48ebc53549 return NULL -> return CString() for clarity and efficiency 2005-09-04 16:55:21 +00:00
Chris Danford e439ae2a96 return "" -> return NULL 2005-09-02 00:14:07 +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
Glenn Maynard b8de0155be cleanup 2005-05-26 02:32:52 +00:00
Glenn Maynard a4718341d4 remove unneeded change unrelated to "Win32 MIDI Support" 2005-05-25 22:04:58 +00:00
Charles Lohr 8e74fab0c1 Add: Win32 MIDI Support 2005-05-25 21:58:56 +00:00
Chris Danford 3db3500226 remove size on statc CString arrays so that XToString can catch size differences 2005-05-05 19:55:04 +00:00
Chris Danford f46f9d70d7 human readable Keymaps.ini 2005-04-24 02:15:41 +00:00
Glenn Maynard 32f829d42c cleanup (never compare DeviceI.button against KEY_* unless you first check that it's a keyboard) 2005-02-02 05:57:26 +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 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
Glenn Maynard 9cf3f9b331 support 6 joysticks 2003-10-11 00:16:32 +00:00
Glenn Maynard b3f91f52e9 support up to 32 buttons 2003-07-08 21:13:43 +00:00
Glenn Maynard c99ef6f2b4 add aux joystick axes 2003-06-18 17:48:40 +00:00
Glenn Maynard e96cb79c5f support more axes 2003-06-17 06:05:10 +00:00
Glenn Maynard 42cfd6f98c stdafx -> global 2003-02-16 04:01:45 +00:00