Commit graph

405 commits

Author SHA1 Message Date
Sally Coolatta
a7022af93f Fix cup select & level select to both use the new input handling systems 2021-12-28 12:27:59 -05:00
Sally Coolatta
0179466107 Finalize char select multiplayer
- Add menu control fallbacks.
    - If it could not find a bind using your existing keys, then it looks at default controls.
    - If it could not find it then, and you're P1, then it looks through gamepads, and then lastly settles for keyboard.
    - Changed around the order of operations on the character select menu, to accommodate for this change.
- Added initroutine to menu_t, which is called every time without question when going to a new menu. This solves many, many minor bugs you could experience in the character select menu when changing between menus, due to things only being properly reset when selecting the character select menu option.
2021-12-28 12:02:31 -05:00
Sally Coolatta
3890c06a4d Fix number of players counter breaking when entering as player 1 & then exiting 2021-12-28 08:54:23 -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
92aff0b57c Finish some unused SDL hat input support to use events rather than polling all of the time 2021-12-28 08:02:32 -05:00
Sally Coolatta
f0a3dc74bb Fix control saving 2021-12-28 06:48:53 -05:00
Sally Coolatta
25342af17f Slight adjustments to cause less misclicks 2021-12-28 05:48:17 -05:00
Sally Coolatta
c49a5dd0cf Properly only accept menu controls when its active 2021-12-28 05:19:04 -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
d6d561f0e8 Unset delay when not pressing anything
Allows for mashing a button to be just as responsive as before
2021-12-25 07:10:56 -05:00
Sally Coolatta
e53ad4edf4 Char select fixes
- Allow input for multiplayer now
- Unset all devices in this menu
2021-12-25 07:02:07 -05:00
Sally Coolatta
e628894b47 Merge branch 'new-menus' into profiles 2021-12-25 06:09:53 -05:00
SinnamonLat
813b2da065 Fix the host menu re-folding on itself if you backed out of difficulty selection 2021-12-11 18:32:50 +01:00
SinnamonLat
cdb3b1ca98 Difficulty select before GP, match race & netgames 2021-12-11 18:22:56 +01:00
SinnamonLat
f093d5783f Put back the transition for addons screen after all... 2021-12-10 20:31:07 +01:00
SinnamonLat
9de737682d extras: replay hut 2021-12-10 20:30:09 +01:00
SinnamonLat
75df86da2f extras menu: addons 2021-12-10 16:15:54 +01:00
SinnamonLat
2e79d84f4a Extras menu barebones start, it does nothing 2021-12-10 16:07:36 +01: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
ecffa90949 Add menucmd system
Allows menu input delays to feel sorta similar to how they did before ... maybe  could be adjusted further, since it feels just a tad bit touchy to me, but it's much better than before when it was a static value.
2021-12-06 14:53:30 -05:00
Sally Coolatta
d2e26bbc86 Finish menu input for char select
TODO:
- Menu delay shouldn't be a static value and work closer to how it did before (likely requires a more complicated system than just calling G_PlayerInputDown ... menu ticcmds? lol)
- Create a sdl function to determine if any of the possible joysticks' buttons are being pressed & return the joystick number & set usejoystick to that number ... for the PRESS START prompt.

Already tired of this code, I'm good
2021-12-04 17:58:23 -05:00
Sally Coolatta
58d5d1759b Set menu delay between menus 2021-12-04 17:34:34 -05:00
Sally Coolatta
4cef6ee0df More menu inputting (delays + partial support for character select)
Suddenly stopped compiling as I was working on this, with the same error it gave when before james merged the makefile changes, even though it was fine a minute ago and those changes are distinctly in here, so I guess it ends here.
2021-12-04 16:23:21 -05:00
Sally Coolatta
8cbaad4e4f Merge branch 'new-menus' into profiles 2021-12-04 15:47:11 -05:00
James R
74288a4de1 Fix compiling errors
- Replace itoa with sprintf (itoa is a nonstandard
function).
- Guard one instance of Discord Rich Presence.
2021-12-03 14:59:22 -08: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
SinnamonLat
2e875eb3f0 Options menu background + sounds 2021-11-27 21:11:00 +01: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
SinnamonLat
c377ea1186 options: data & manual 2021-11-26 16:36:15 +01:00
SinnamonLat
76bba0fc9c options: gameplay 2021-11-26 10:18:50 +01:00
SinnamonLat
3449064b8b options menu + video options (res & ogl) 2021-11-25 23:36:42 +01:00
SinnamonLat
17e45d92c5 Pause: addons menu 2021-11-19 23:58:35 +01:00
SinnamonLat
685868edf5 Pause: Player setup 2021-11-19 22:08:17 +01:00
SinnamonLat
a64f97da7b Tiny prep work for splitscreen spectate/join to implement later 2021-11-18 22:05:22 +01:00
SinnamonLat
55b9489af0 pause menu: spectate + exit game 2021-11-18 20:47:52 +01:00
SinnamonLat
e560bffcf7 Pause menu start + map switching 2021-11-18 15:19:25 +01:00
SinnamonLat
b750ef11dd Make sure we don't save IPs when hosting games... 2021-11-17 14:21:29 +01:00
SinnamonLat
1412b96b20 EXPERIMENTAL: Save last 3 IPs manually joined to allow rejoining them later 2021-11-16 23:03:46 +01:00
SinnamonLat
fdf778c72f Allow hosting and joining by IP 2021-11-14 21:24:09 +01:00
SinnamonLat
feb0868292 Small continuation of the MP menus, this allows us to reach CORE/MODDED split 2021-11-13 19:32:12 +01:00
SinnamonLat
04bd3efd5b First attempt at multiplayer menus 2021-11-13 18:08:34 +01:00
toaster
b4af07ffed Merge branch 'master' into new-menus
# Conflicts:
#	src/d_main.c
#	src/dehacked.c
#	src/m_menu.c
#	src/v_video.c
#	src/y_inter.c
2021-10-18 01:18:37 +01:00
Sally Coolatta
8289bf252f Chengi's menu selectors
- Menu BG image is defined by menu option
- Menu BG image slides in
- Gamemode menu options are now like Chengi's mockup
2021-01-13 01:16:14 -05:00
Sally Coolatta
2af75a2bd1 Fix merge conflicts 2021-01-11 00:06:34 -05:00
Sally Coolatta
6c0b30ad40 Use SV_StartSinglePlayerServer for GP instead of G_DeferedInitNew
multiplayer should always = true in kart anyway (should make a branch to remove the variable tbh)
2020-06-09 16:49:39 -04:00
Sally Coolatta
09bebbc558 You can start GP from the new menu 2020-06-08 01:03:20 -04:00
Sally Coolatta
15a243db09 Fix other merge errors 2020-05-16 04:58:52 -04:00
TehRealSalt
64a3d133b4 Cleanup & bug-fixin 2019-10-15 20:56:28 -04:00
TehRealSalt
cf8a77cfd6 Cup icon drawing 2019-10-05 23:11:31 -04:00
TehRealSalt
32bdd10dbf Cup definitions, updated menu to use them 2019-10-04 22:44:19 -04:00