Mitchell Richters
a731db95ae
- Add initial support for up/down movement within the game, either by key or joystick axis.
...
* Started with Duke's jetpack, other games to follow for swimming, etc.
2023-04-23 19:53:45 +10:00
Mitchell Richters
b9cf8a13c6
- Inline the remainder of InputState
methods.
2023-04-02 18:32:40 +10:00
Mitchell Richters
ea4e850674
- Move remaining mouse CVARs from inputstate.cpp
to gameinput.cpp
.
2023-04-02 18:32:39 +10:00
Mitchell Richters
10cd63f383
- Use an FVector2
inside HIDInput
.
2023-04-02 18:32:39 +10:00
Mitchell Richters
4387294aff
- Eliminate the duplicate mouse storage since we have things in the right spot now.
2023-04-02 18:32:39 +10:00
Mitchell Richters
eeb67a2cdd
- Move all mouse CVARs from inputstate.cpp
to gameinput.cpp
.
2023-04-02 18:32:39 +10:00
Mitchell Richters
64b05b6f06
- Move remaining CCMDs and non-inputstate related items to gameinput.cpp
.
2023-04-02 18:32:38 +10:00
Mitchell Richters
3c82014d0e
- Move ApplyGlobalInput()
into gameinput.cpp
.
...
* Doesn't really belong in inputstate.cpp, it was just placed there in 2020 for lack of a better spot at the time.
2023-04-02 18:32:38 +10:00
Mitchell Richters
9e1ca0cb8f
- Make the turbo turn functions static within gameinput.cpp
.
2023-04-02 18:32:38 +10:00
Mitchell Richters
b340807a6b
- Remove now-unneeded inline wrapper getHidInput()
.
2023-04-02 18:24:05 +10:00
Mitchell Richters
46b5977a6a
- Recover two ESyncBit
values for other uses.
...
* By masking aiming+centering, we have look bits :)
2023-04-02 18:24:05 +10:00
Mitchell Richters
daf63ce209
Revert "- InputState::ClearAllInput()
: Only clear crouch_toggle
bool if outside of a level, and resend SB_CROUCH
sync bit if inside a level and crouch_toggle
is true."
...
This reverts commit c076310e34
.
* It's no longer needed with 70706d3da8
.
2023-03-29 13:21:14 +11:00
Mitchell Richters
672c53c35c
- Move CCMD pause
to gamecontrol.cpp so it can be static.
2023-03-18 19:54:05 +11:00
Mitchell Richters
b3c27a177e
- Consolidate each game's gi-GetInput()
into a unified function.
...
* Eliminates a lot of boilerplate.
* Consolidation of input accumulation buffers discretely used in each game.
* Allows privatisation of `PlayerAngles::CameraAngles`.
2023-03-18 19:49:25 +11:00
Mitchell Richters
bd3e9b305e
- Adjust signatures of input functions slightly for consistency.
2023-03-18 19:29:29 +11:00
Mitchell Richters
5a6495956f
- Duke: Move Quick_Kick
button test into ApplyGlobalInput()
as it doesn't seem to share a bit with any other game anymore.
2023-03-18 19:17:30 +11:00
Mitchell Richters
a45890e064
- Move some Duke-specific stuff out of ApplyGlobalInput()
.
2023-03-18 09:15:15 +11:00
Mitchell Richters
eed9716d86
- Move joyaxes[]
array from getHidInput()
directly into ControlInfo
.
2023-03-17 20:58:38 +11:00
Mitchell Richters
08d22f49f4
- Negate ControlInfo::dpitch
to match data out of backend.
2023-03-17 20:58:13 +11:00
Mitchell Richters
fc069feac6
- Negate ControlInfo::dyaw
to match data out of backend.
2023-03-17 20:58:13 +11:00
Mitchell Richters
446218dd7b
- Get mouse/controller input by pointed variable and not copy on return.
2023-03-17 20:58:11 +11:00
Mitchell Richters
1f97e73501
- Rename ControlInfo joystick variables to names matching backend.
2023-03-17 20:16:58 +11:00
Mitchell Richters
3c4b4e4483
- Tidy up warptocoords
CCMD since everything is in an actor now.
...
* Now accepts floating point inputs.
* Restores lost pitch capability.
2023-03-17 17:28:04 +11:00
Mitchell Richters
9961a66a1f
- Remove inputScale
global and make static in mainloop.cpp
.
2023-02-05 08:37:37 +11:00
Mitchell Richters
5a8612110d
- Process scaled angle adjustments in each game's render function, not from the input function.
...
* Previous config had the potential to call `I_GetInputFrac()` nearly twice in a row, which would have resulted in some hitching.
* Calling from each game's render function avoids the above and means we can start applying scaled angle changes one frame faster.
2022-12-11 18:42:01 +01:00
Christoph Oelckers
c6b3cf3e0a
- Duke: fixed long standing problem that pressing Escape or walking backwards does not switch off the camera view.
2022-11-19 18:26:17 +01:00
Christoph Oelckers
6a6e9299ca
- added missing returns in the failure cases of useitem and slot CCMDs.
2022-11-10 07:41:20 +01:00
Mitchell Richters
293a71ed55
- Remove horizon from gi->WarpToCoords()
since we don't even print the horizon in our stats.
2022-10-25 07:06:54 +02:00
Mitchell Richters
8bfcb8c939
- Floatify InputPacket::fvel
and InputPacket::svel
.
...
* Since all velocities are floated, we can now take each game's keymove scaling into its ticker and use a consistent keymove size, making non-mouselook and controller input truly identical across the games without having to try and fudge any values.
2022-10-20 00:48:09 +02:00
Christoph Oelckers
f4d8ccf7b9
- floatified WarpToCoords
2022-10-13 20:58:12 +02:00
Christoph Oelckers
c1d603e1e9
- backend update from GZDoom.
2022-10-02 20:33:18 +02:00
Mitchell Richters
78fcf2b4f0
- Move invertmouse
and invertmousex
CVARs from gameinput.cpp
to inputstate.cpp
.
...
* Old setup was inverting the entire player's horz/avel, even for joystick input while not inverting `mousemovex` or `mousemovey` at all.
2022-07-23 10:37:32 +10:00
Mitch Richters
c6774d5efd
- Duke/RR: Re-add micro-movement cancellation for RR's vehicles that was dropped in 466bc84697
.
2021-12-26 23:09:50 +01:00
Christoph Oelckers
016a907c20
- replaced vec2_t with FVector2.
2021-12-14 10:07:06 +01:00
Mitch Richters
e491d15ff9
- Move InputScale()
out of inputstate.cpp and into i_time.cpp
as I_GetInputFrac()
to make it available to GZDoom for potential future requirements.
...
* As part of this, feed the output of `I_GetInputFrac()` to `gi->GetInput()` instead of having each game's virtual override calling it locally.
2021-11-29 00:55:01 +01:00
Mitch Richters
1228cb6044
- InputState::AddEvent()
: Partially revert changes performed in 4d629e7de8
that were believed not necessary. This functionality is still needed in some of Exhumed's cutscenes that are performed in-engine and not as a screenjob.
2021-11-19 08:11:32 +11:00
Mitch Richters
4d629e7de8
- Make screenjob valid keys for skipping ignore the Alt key as its used for modifiers, and special keys like the screenshot bind.
...
* Partially revert 8bb13bc4c2
as its changes are no longer needed.
* Partially revert 9e40e49c2c
as its changes are no longer needed.
* Fixes #577 .
2021-11-18 20:59:07 +11:00
Mitch Richters
6581d9d709
- InputScale()
: Tidy up some math I just put in.
...
* Time for bed... *yarns*.
2021-11-10 22:23:59 +11:00
Mitch Richters
3c4afaa6ee
- InputScale()
: Add enabled-by-default scaler to returned value from function to correct drift that occurs as the frame-rate increases, taking into account different scaling ratios needed for differing ticrates.
2021-11-10 20:27:19 +11:00
Mitch Richters
5a33caa635
- InputScale()
: Add enabled-by-default scaler to returned value from function to correct drift that occurs as the frame-rate increases, taking into account different scaling ratios needed for differing ticrates.
2021-11-10 20:13:06 +11:00
Mitchell Richters
6894be4ad1
- Use the new isSWALL()
wrapper everywhere.
2021-07-11 12:40:01 +10:00
Mitchell Richters
c076310e34
- InputState::ClearAllInput()
: Only clear crouch_toggle
bool if outside of a level, and resend SB_CROUCH
sync bit if inside a level and crouch_toggle
is true.
...
* Fixes #287 .
2021-04-01 13:46:16 +11:00
Christoph Oelckers
99f1f0952a
- little bit of engine cleanup.
2021-02-25 12:16:21 +01:00
Mitchell Richters
25eaeff0db
- Wrap all g_gameType & GAMEFLAG_BLOOD
checks into isBlood()
inline.
2021-01-02 14:46:58 +11:00
Mitchell Richters
4aae71f0ee
- InputState::ClearAllInput(): Call resetTurnHeldAmt()
when clearing input.
2021-01-02 10:00:29 +11:00
Christoph Oelckers
ae36ea88c3
- wrap all checks of cl_syncinput in an inline function.
2020-11-30 23:40:16 +01:00
Christoph Oelckers
ed8266df0b
- fixed bad args check in WarpToCoords CCMD.
2020-11-29 16:06:15 +01:00
Christoph Oelckers
a34f5debe8
- route the shared control CCMDs through the game interface instead of registering local variants for each game.
2020-11-29 13:35:09 +01:00
Mitchell Richters
f9f365a593
- Ensure crouch_toggle
bool from 6e3d414b3c
is serialised when saving game, and cleared when InputState::ClearAllInput()
is called.
2020-11-08 07:30:48 +11:00
Mitchell Richters
6e3d414b3c
- inputstate.cpp: Move checkCrouchToggle()
from gameinput.ccp into ApplyGlobalInput()
and use static bool for crouch toggling vs. game-side bool.
2020-11-07 18:16:16 +11:00