Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 1a90d3c57e unused 2006-09-13 02:08:54 +00:00
Glenn Maynard b53c99f406 remove InputMapper::StyleToGame(StyleI). InputMapper no longer knows about StyleInputs, putting them at the level of abstraction they belong: above the game-neutral support classes like InputMapper. 2006-09-13 01:55:39 +00:00
Glenn Maynard d7e4bf7817 remove InputMapper::StyleToGame(StyleI) 2006-09-13 01:54:16 +00:00
Glenn Maynard 51220acce2 remove unused 2006-09-13 01:46:14 +00:00
Glenn Maynard d6ad18f73e remove InputMapper::IsBeingPressed(StyleI) 2006-09-13 01:45:10 +00:00
Glenn Maynard 9f54f1b248 remove InputMapper::GetSecsHeld(StyleI) 2006-09-13 01:38:10 +00:00
Glenn Maynard 7da7f3af18 remove unused 2006-09-13 01:33:04 +00:00
Glenn Maynard 6d24d2f0b4 remove InputEventPlus::StyleI 2006-09-13 01:30:57 +00:00
Glenn Maynard e4d0b41da1 Stop using Input.StyleI. Just convert it when needed; the vast majority
of screens don't.
2006-09-13 01:29:33 +00:00
Glenn Maynard 9139883e64 simplify 2006-09-13 01:18:11 +00:00
Glenn Maynard 6aec914bfc simplify 2006-09-13 01:18:10 +00:00
Glenn Maynard ea10bd4422 simplify 2006-09-13 01:00:08 +00:00
Glenn Maynard 2faf8f9135 simplify
I'd prefer to get rid of the StyleInput versions of INPUTMAPPER
calls, and just pass in GameInputs and leave conversion to the
users (which aren't many).  The MultiPlayer hack makes this
hard, though, where we pass in the MultiPlayer to check; that
affects the underlying DeviceInput that's constructed.
2006-09-13 00:59:44 +00:00
Glenn Maynard 2f6aaf940f ctor 2006-09-13 00:48:56 +00:00
Glenn Maynard 1ca5c9a4b7 reduce StyleInput to an int 2006-09-13 00:46:21 +00:00
Glenn Maynard 6a80311172 phase out StyleI.player 2006-09-13 00:16:23 +00:00
Glenn Maynard 5be4331e71 phase out StyleI.player 2006-09-13 00:09:00 +00:00
Glenn Maynard 6e40d3e5ef oops, fix 2006-09-13 00:05:43 +00:00
Glenn Maynard 10c6320d18 getting rid of StyleI.player 2006-09-13 00:05:01 +00:00
Glenn Maynard 87bb92451b StyleI.player duplicates MenuI.player when the style is set. It's
essentially being used as a hack to see if the style is set, and
as a shortcut for converting from StyleInput back to GameInput,
complicating InputEventPlus in the process.  Remove it, and just
pass along the PlayerNumber when it's actually needed.

(incremental commit)
2006-09-13 00:02:23 +00:00
Glenn Maynard c419567b23 simplify 2006-09-12 23:57:56 +00:00
Glenn Maynard 2fa74742c0 remove unused 2006-09-12 23:47:55 +00:00
Glenn Maynard 7bab74efab As far as I can tell, StyleI.player is always the
same as MenuI.player if the style is set.  Phase
it out.
2006-09-12 23:29:08 +00:00
Glenn Maynard 8a6f490c80 simplify. (If you're not a screen that deals with StyleI.col, you probably shouldn't be using StyleI at all.) 2006-09-12 23:21:14 +00:00
Glenn Maynard ba1daf8183 annoying log 2006-09-12 22:01:59 +00:00
Glenn Maynard 231171a7f8 cleanup 2006-09-10 08:37:10 +00:00
Glenn Maynard 1f471f511b reset settings which are set every frame or every actor
in SetDefaultRenderStates; fixes centering
2006-09-10 08:36:31 +00:00
Glenn Maynard dda0e12deb init centering matrix with identity by default; reinit other stacks, too, so
we're consistent if DISPLAY is recreated
2006-09-10 08:34:50 +00:00
Glenn Maynard c374b10233 fix strange init 2006-09-10 07:56:06 +00:00
Glenn Maynard c628676660 use g_ButtonStates instead of GetPressedButtons; GetPressedButtons returns the last reported input, not the immediate state 2006-09-08 19:02:11 +00:00
Glenn Maynard 897c1c9057 revert "simplify"; this removed an API call 2006-09-08 18:59:57 +00:00
Glenn Maynard 9e3f9f6fb3 const 2006-09-08 18:54:01 +00:00
Glenn Maynard 3fc0d75570 remove IET_LEVEL_CHANGED 2006-09-08 18:51:12 +00:00
Glenn Maynard 83e010a63e remove IET_LEVEL_CHANGED. I didn't end up using it, and it's a clumsy way of handling analog inputs. 2006-09-08 18:49:14 +00:00
Glenn Maynard 3deda620b9 const
simplify InputFilter::GetPressedButtons
2006-09-08 04:26:23 +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 6c24615123 fix "Right-Left" hold_and_press code triggering when left is pressed
first
2006-09-08 04:19:42 +00:00
Glenn Maynard 4b26951f0a split InputQueue::WasPressedRecently from AllWerePressedRecently.
This simplifies AllWerePressedRecently, and makes the input state
at the time of the press available.
2006-09-08 04:18:01 +00:00
Glenn Maynard a2923556c9 alt-enter, etc. check modifier state at the time of the press 2006-09-08 04:16:10 +00:00
Glenn Maynard 99f9d8d33c add operator<, -, -= 2006-09-08 04:08:05 +00:00
Glenn Maynard d93a57c841 add DeviceInputList * 2006-09-08 04:04:40 +00:00
Glenn Maynard be6d3d4043 Include the complete input state with each input report.
This only deals with buttons being held, so won't cause
performance issues.

This deals with a general problem of the input layer:
you can query the current state of the inputs, but inputs
are received in a queue, causing inconsistencies.

This is why pressing enter during a load, then holding Alt
after pressing it, causes the game to switch fullscreen
after the load finishes; checking for "alt-enter" should
be checking if Alt was pressed when Enter was pressed,
not whether it's pressed right now.

Similarly, CodeDetector has difficulty handling a "Right-Left"
and a "Left-Right" code simultaneously.  If both buttons
are pressed quickly, it needs to check whether Right was
pressed at the time Left was reported, not at the time
EnteredCode was called.
2006-09-08 04:03:14 +00:00
Glenn Maynard 6daf49eac6 fix excessive Ago() calls 2006-09-08 03:44:14 +00:00
Glenn Maynard 518ac3307b unused headers 2006-09-08 03:17:24 +00:00
Glenn Maynard 4da8857f1d Simplify InputQueue: use InputEventPlus. This has the
timestamp it needs, and we can match MenuI from it without
doing extra conversions.
2006-09-08 03:16:35 +00:00
Glenn Maynard 8ebab0dde7 cleanup 2006-09-08 02:59:53 +00:00
Glenn Maynard 16e6219b70 unused headers 2006-09-08 02:58:56 +00:00
Glenn Maynard c4c73b5179 remove transition 2006-09-08 02:13:54 +00:00
Glenn Maynard ec3b9382d2 InputMapper::IsButtonDown -> IsBeingPressed, to match InputFilter::IsBeingPressed 2006-09-08 02:12:30 +00:00
Glenn Maynard 29ba3d052b use m_LastInputTime in GetSecsHeld 2006-09-08 01:41:06 +00:00
Glenn Maynard 618d0ced95 m_BeingHeldTime is the timestamp of the last input change,
not the time corresponding to the current input state.  (If
debouncing delays reporting an input, m_BeingHeldTime
refers to the time of the delayed input.)  Add m_LastInputTime,
which remembers the timestamp of the last reported input.
2006-09-08 01:39:32 +00:00
Glenn Maynard 90f15660b8 InputFilter::ReportButtonChange 2006-09-08 01:11:57 +00:00
Glenn Maynard dc531b59e4 don't derive InputEvent from DeviceInput 2006-09-08 01:11:18 +00:00
Glenn Maynard 2fa3dd658a don't bother typedefing this 2006-09-07 23:58:46 +00:00
Glenn Maynard fb99227ff1 don't bother typedefing this
no static
2006-09-07 23:57:24 +00:00
Glenn Maynard 969efc7f0f fix GetTotalSeconds 2006-09-07 22:11:54 +00:00
Glenn Maynard 45e5f76af0 when there's a sensible error handling path, prefer to use it instead of asserting 2006-09-07 04:26:59 +00:00
Glenn Maynard 57e544385d remove comment about code that's not there anymore 2006-09-07 03:52:10 +00:00
Glenn Maynard 9f1cd1e458 fix operator= 2006-09-02 00:24:40 +00:00
Glenn Maynard 6d829011a3 bind 2006-09-01 23:21:19 +00:00
Glenn Maynard 685e2e7412 Split part of OptionRow::GetThemedItemText into OptionRowHandler::GetThemedItemText.
(OptionRowHandler handles low-level option sets, including row and option
titles; OptionRow handles ScreenOption-specific parts, like "NextRow".)
2006-09-01 04:54:15 +00:00
Glenn Maynard 8983d620c6 PrepareItemText -> GetThemedItemText 2006-09-01 04:44:30 +00:00
Glenn Maynard e6d1712c27 move OptionRowDefinition into OptionRowHandler
(want OptionRowHandler to be easily usable without OptionRow; ORH is
really part of ORD, not OptionRow)
2006-09-01 04:37:39 +00:00
Glenn Maynard 3f468cb30a move OptionTitle into OptionRowHandler 2006-09-01 04:29:24 +00:00
Glenn Maynard 1a42ad7d4e simplify 2006-08-31 23:06:22 +00:00
Glenn Maynard 70f3c3e6a1 simplify 2006-08-31 20:56:11 +00:00
Glenn Maynard 4e89ac8131 reoad from the bottom screen, not the top 2006-08-31 20:49:39 +00:00
Glenn Maynard b33e00d00f ScreenManager::GetScreen 2006-08-31 20:46:58 +00:00
Glenn Maynard 30b6f2cdfc Prefer a->PlayCommand(b) to COMMAND(a,b). COMMAND tries
to load commands from metrics if they don't exist.  That's
a leftover from older code, before we could load all commands
at load time.  Now it's a bit confusing, causes us to
spend time loading things after we're already rendering,
and causes error dialogs that should happen during load
to happen later.
2006-08-31 19:47:56 +00:00
Glenn Maynard 2e9376d574 assert 2006-08-31 19:30:14 +00:00
Glenn Maynard 073bfeade6 Fix a confusing case: if eg. both "My Docs\StepMania\Save\Preferences.ini"
and "Program Files\StepMania\Save\Preferences.ini" exist, we'll read and
write the PF one consistently.  However, if the PF one is read-only, we'll read
the one in PF and write the one in Docs, which is useless and confusing.  Only
write to files if we'll read them, too.
2006-08-31 19:28:12 +00:00
Glenn Maynard 62201740fa cleanup 2006-08-31 18:48:44 +00:00
Glenn Maynard 4f54909b25 remove unused 2006-08-31 18:48:14 +00:00
Glenn Maynard fb6384e955 don't store value that's used only once 2006-08-31 08:10:12 +00:00
Glenn Maynard d37371d101 simplify 2006-08-31 08:03:56 +00:00
Glenn Maynard 0da0a11ef6 simplify 2006-08-31 08:03:07 +00:00
Glenn Maynard 5a121012f8 cleanup 2006-08-31 07:05:27 +00:00
Glenn Maynard 1623138ca5 remove unused 2006-08-31 07:03:10 +00:00
Glenn Maynard b2a585cb3b empty 2006-08-31 06:58:51 +00:00
Glenn Maynard ac3abd1ca4 cleanup 2006-08-31 06:58:04 +00:00
Glenn Maynard 6c7649d8a4 simplify 2006-08-31 06:55:49 +00:00
Glenn Maynard 334a0ec26d cleanup, simplify 2006-08-31 06:53:25 +00:00
Glenn Maynard b4edcdb7dd NULL 2006-08-31 06:51:23 +00:00
Glenn Maynard eb9a278c3e simplify 2006-08-31 06:50:33 +00:00
Glenn Maynard 21454207d6 unindent 2006-08-31 06:47:59 +00:00
Glenn Maynard 0f5e5c5122 store bone rotations as quats; more common than HPR, and we don't
have to convert constantly
2006-08-31 06:47:05 +00:00
Glenn Maynard b3eaa7a1ad avoid global ThemeMetric<apActorCommands>
(note: we won't have a dozen copies of these functions in memory;
we make one and copy it, so we'll just make Lua references)
2006-08-21 21:49:11 +00:00
Glenn Maynard 1ac2e7a351 avoid global ThemeMetric<apActorCommands> 2006-08-21 21:42:41 +00:00
Glenn Maynard 74e9540ce7 avoid global ThemeMetric<apActorCommands> 2006-08-21 21:33:00 +00:00
Glenn Maynard 0c975dd32f avoid global ThemeMetric<apActorCommands> 2006-08-21 21:26:32 +00:00
Glenn Maynard c819c74ce6 avoid global ThemeMetric<apActorCommands> 2006-08-21 21:26:02 +00:00
Glenn Maynard 2b879ed23a unused 2006-08-21 20:31:27 +00:00
Glenn Maynard 348f5ab34f avoid global ThemeMetric<apActorCommands>; unneeded include 2006-08-21 20:30:36 +00:00
Glenn Maynard 98240c49d4 update metrics 2006-08-21 20:28:36 +00:00
Glenn Maynard 2eca0cff5e avoid global ThemeMetric<apActorCommands>; we should be able
to delete all references into lua
2006-08-21 19:54:33 +00:00
Glenn Maynard 6e67bff7b8 fix stale statics
comments
2006-08-21 18:45:34 +00:00
Glenn Maynard 8980bd6a27 remove param 2006-08-21 00:20:14 +00:00
Glenn Maynard 62c114b49e remove param 2006-08-21 00:20:13 +00:00
Glenn Maynard d463f2d1f5 unused 2006-08-20 22:39:27 +00:00
Glenn Maynard afb69ddb7b remove aliases, header 2006-08-20 22:29:49 +00:00