Commit graph

120 commits

Author SHA1 Message Date
toaster
db95e3144d Re-add mid-game rankings
- gc_rankings, bound to TAB by default
- Now a toggle, rather than a hold behaviour
- Rearrange HU_Drawer to have chat (and cecho/music credits) render over everything else (like, say, tab rankings)
- Update PROFILEVER to 2 so we can add the new control to old profiles
2022-11-25 17:59:18 +00:00
X.organic
902fcfa569 Miscellaneous memory bug fixes to make AddressSanitizer happy
# Conflicts:
#	src/d_clisrv.c
#	src/dehacked.c
#	src/hardware/hw_cache.c
#	src/hardware/hw_md2.c
#	src/http-mserv.c
#	src/lua_hudlib_drawlist.c
2022-09-12 16:49:18 +01:00
Eidolon
85a132c149 Port Ediolon's SDL GameController work
Basically instantly solved all of the issues that made this branch completely unusable
2022-08-27 08:20:52 -04:00
SinnamonLat
c8c07aacc8 Add hardcoded keyboard defaults for menu navigation 2022-05-21 12:32:38 +02:00
SinnamonLat
26199dc284 Add enter and esc for menu navigation on default profile 2022-05-20 01:28:09 +02:00
SinnamonLat
1d4ee40758 Remove unecessary button associations in menu. X is now Back 2022-04-12 11:46:50 +02:00
SinnamonLat
6db54f77d8 Force menus to use default controls for now. Update device in realtime in control setup menu 2022-04-11 14:50:51 +02:00
toaster
ff5992e3c4 Rework the entire G_PlayerInputAnalog system.
* Previous control checking flow:
    * Current controller/keyboard (userbound controls).
    * If on a menu:
        * Current controller/keyboard (default controls).
        * All controllers not in use by a player (default controls).
* New control checking flow:
    * Current controller/keyboard (userbound controls).
    * If player 0 and just checked a controller, check keyboard (userbound controls).
    * If on a menu:
        * Check all controllers not in use by a player (userbound controls).
        * If keys are inaccessible/unbound and keybind is necessary to navigate menus, repeat eveyrhting with default controls.
* Instead of duplicated code, control the flow in a finer fashion.
* Now able to detect if gamepad inputs are possible to recieve (via checking deviceID), instead of assuming they are.
* If a keybind is set but inaccessible by the above metric, make it flash on the Profile Controls screen.
* Fix out-of-order key mappings for a given bind being invisible on the Profile Controls menu.
2022-04-01 20:51:37 +01:00
Sally Coolatta
d3f8e61591 In-game control shenanigans
- Fix gamekeydown using FRACUNIT instead of JOYAXISRANGE
- Re-add spindash button functionality
- I put custom buttons back ... but they're now called "Lua" buttons A thru C because Custom was a dumb misleading name
2021-12-28 12:49:33 -05:00
Sally Coolatta
0f218b285e Fix menu multiplayer breaking again 2021-12-28 09:02:46 -05:00
Sally Coolatta
b1d36496b2 Properly implement joystick axes
NOW it's fully navigable with controller
2021-12-28 08:44:20 -05:00
Sally Coolatta
f0a3dc74bb Fix control saving 2021-12-28 06:48:53 -05:00
Sally Coolatta
746f112bf7 Fix gamepad joystick handling 2021-12-28 05:31:14 -05:00
Sally Coolatta
7684f5980a Almost multiplayer char select
For some reason gamepads have not been registering buttons for a while, which makes this pretty hard to continue. Not sure if it's to do with how the menu cmd is generated, or something deeper in the SDL code.
2021-12-25 08:58:21 -05:00
Sally Coolatta
d067c1ddef First pass on character select device select
Ultra mega hacked in, by saving all "discarded" joysticks to an array so they don't get totally closed & we can still poll them. Events now properly send the device number instead of the player number, which means we can store all controllers pressing buttons, and thus, can detect when ANY controller is pressing anything, and THUS we can make the character select work like we wanted to :V

Did not bother fixing any of the bugs, however. First of all, the opening menus do not properly fallback to default controls. Yet again, we may need a more robust system -- storing all keys from gamekeydown separately? Additionally it seems like when I input gamepad it makes me use keyboard anyway, so I think something fishy is up.
2021-12-06 17:43:52 -05:00
Sally Coolatta
f17b948491 Update how input is handled in menus to use key bindings
VERY broken right now, it lost the delay between key presses. Kinda already sick of the reorganization needed though
2021-11-29 12:02:56 -05:00
Sally Coolatta
cd8862f0bc New input handling
Events have a player ID instead of adding billions of keys for separate gamepads. Axis movement (mouse movement, analog sticks) now are counted as keys, so axes don't need to be separately implemented for all controls. Game controls emulate a Saturn controller (some of the external functions like screenshot / gif should be readded, but I got lazy)

This will allow later us to save a config for a controller that can be reused for any player slot, which is one of the main goals for profiles.

Only just enough was made to use the new input system to make it compile. Menus in this branch should aim to move to using PlayerInputDown entirely, instead of using hardcoded keys & simply remapping to those
2021-11-26 14:56:25 -05:00
James R
d6dc33e024 Add spindash to gamecontrolname 2021-04-04 22:47:57 -07:00
Sally Coolatta
0a10396c84 Spindash shortcut button 2021-03-09 17:28:20 -05:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
Sally Coolatta
9b6aa946ea Merge remote-tracking branch 'srb2/master' into the-scary-22-merge 2020-10-24 19:28:06 -04:00
James R
b7c4a82a0f Replace C90's junk with a modest macro 2020-10-06 23:04:23 -07:00
Sally Coolatta
6ef0af4ba5 g_game and g_input now compile 2020-08-13 00:05:44 -04:00
Sally Coolatta
8731c6b7a4 Another round of fixing up
- gametyperules are now fitting for kart, not applied to the whole codebase though
- a few more files compile
2020-08-11 16:13:17 -04:00
Sally Coolatta
7ac6723e46 gamecontrol has another index for player num, instead of being duplicated for players 2-4 2020-08-10 20:08:32 -04:00
Sally Coolatta
b546f7d188 Merge g_input.c/h 2020-08-04 01:41:00 -04:00
GoldenTails
7c3a565709 Use kinda counter-intuitive ternary operator to hack in a check for "use" for 2.2 compatibility 2020-07-11 21:59:54 -05:00
GoldenTails
1dd754d139 The only "use" that I had to change to "spin" after a manual half hour search 2020-07-11 21:59:54 -05:00
GoldenTails
3c4200901a Replace 'use' with 'spin' in game control constants 2020-07-11 21:59:54 -05:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
James R
128f0757b6 Semantics 2020-01-23 13:57:39 -08:00
James R
a127045d98 Don't set controls to keys out of array bounds
Shout-out to TAG's config that somehow had
`setcontrol2 "custom3" "KEY931926528"`, cuasing the game to crash only in
Splitscreen.
2020-01-22 22:19:00 -08:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
toaster
8f7a13137b Add scroll-wheel weapon changing to default controls
(resolves #248)
2019-10-13 15:19:31 +01:00
fickleheart
d22601e979 Clear P3 and P4 controls too when clearing all controls 2019-03-24 17:31:04 -05:00
Alam Arias
380bce88a0 remove whitespaces 2019-02-05 15:42:37 -05:00
wolfy852
d1bbebcbea Fix player 2 not being able to play while the chat is open
Also attempts to fix the d-pad typing characters into the chat box.
2019-01-10 06:08:12 -06:00
wolfy852
5c5e6a26dd Merge remote-tracking branch 'remotes/public/next' into gamepad-tweaks
# Conflicts:
#	CMakeLists.txt
#	appveyor.yml
#	src/command.c
#	src/command.h
#	src/d_clisrv.c
#	src/d_netcmd.c
#	src/dehacked.c
#	src/doomdef.h
#	src/hu_stuff.c
#	src/m_misc.c
2019-01-08 16:32:24 -06:00
SeventhSentinel
3fe7856ba3 Keep execversion stuff on, just dummied out
Had issues with skin values not changing from the menu, this seemed to fix it
2019-01-06 01:41:42 -05:00
SeventhSentinel
046d66d803 Fix errors from merge 2019-01-06 01:00:30 -05:00
SeventhSentinel
1d58c6b8c2 merge srb2 next 2019-01-05 15:59:23 -05:00
wolfy852
bf5d14c37f Rebind the talk key by default, but move it to D-Pad Down 2019-01-02 14:50:36 -06:00
mazmazz
81352aece1 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
wolfy852
0bd646d381 Kill default d-pad bindings aside from "Show Rankings" 2018-12-24 21:30:42 -06:00
mazmazz
c82cd78bb7 Merge remote-tracking branch 'public-gl/2122-version' into 2122-version 2018-12-23 18:09:54 -05:00
mazmazz
915c90d9f3 Merge remote-tracking branch 'public-gl/master' into 2122-version 2018-12-23 18:09:17 -05:00
Digiku
2fbb5995d8 Merge branch 'menu-mpjoy-fix' into '2122-version'
Menu: Fix joystick events causing the player to move during multiplayer system menu [2122-version]

See merge request STJr/SRB2!420
2018-12-23 18:06:27 -05:00
mazmazz
39b0a16727 Revert "Revert "Merge branch 'menu-mpjoy-fix' into 'next'""
This reverts commit ee63ed22d5.
2018-12-23 18:04:01 -05:00
mazmazz
ee63ed22d5 Revert "Merge branch 'menu-mpjoy-fix' into 'next'"
This reverts commit eaab2da100, reversing
changes made to 50710c3f10.
2018-12-23 17:57:50 -05:00