Allow changing controls during wipes

This commit is contained in:
GenericHeroGuy 2025-08-10 00:46:24 +02:00
parent 9a3a4cfc78
commit d2fd5dc09b
4 changed files with 12 additions and 23 deletions

View file

@ -86,8 +86,8 @@
#define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291
#define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b
#define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9
#define ASSET_HASH_MAIN_PK3 0xf713c1778319b856
#define ASSET_HASH_MAPPATCH_PK3 0xced9ac5d605e3308
#define ASSET_HASH_MAIN_PK3 0xf39a203d62c3ff24
#define ASSET_HASH_MAPPATCH_PK3 0xdc8d4b2c318697b1
#define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461
#ifdef USE_PATCH_FILE
#define ASSET_HASH_PATCH_PK3 0x0000000000000000

View file

@ -700,7 +700,6 @@ struct menu_routine_s const MENU_ROUTINES[] = {
{ "CONNECTMENUMODCHECKS", &MR_ConnectMenuModChecks },
{ "CANCELCONNECT", &MR_CancelConnect },
{ "SETUPCONTROLSMENU", &MR_SetupControlsMenu },
{ "HANDLECONTROLSMENU", &MR_HandleControlsMenu },
{ "REFRESH", &MR_Refresh },
{ "CONNECT", &MR_Connect },
{ "VIDEOMODEMENU", &MR_VideoModeMenu },

View file

@ -1269,6 +1269,8 @@ static boolean M_WipeBuffer(INT32 ch, menufunc_f *routine)
|| (routine == MR_SelectableClearMenus && !currentMenu->quitroutine)
|| routine == MR_Options
|| routine == MR_SetupMultiPlayer
|| routine == MR_SetupControlsMenu
|| routine == MR_ChangeControl
)
return false;
@ -1697,6 +1699,14 @@ boolean M_Responder(event_t *ev)
return true;
case KEY_BACKSPACE:
// detach any keys associated with the game control
if (item && item->routine == MR_ChangeControl)
{
G_ClearControlKeys(setupcontrols, item->argument);
S_StartSound(NULL, sfx_shldls);
return true;
}
if (!item || !item->cvar
|| item->cvar == &cv_chooseskin
|| item->cvar == &cv_dummystaff
@ -7404,7 +7414,6 @@ INT32 MR_SetupControlsMenu(INT32 arg)
setupcontrolplayer = arg + 1;
setupcontrols = gamecontrol[arg]; // was called from main Options (for console player, then)
currentMenu->lastOn = itemOn;
// Set proper gamepad options
M_SetItemArgument(MN_OP_CHANGECONTROLS, "SETJOY", arg);
@ -7432,24 +7441,6 @@ INT32 MR_SetupControlsMenu(INT32 arg)
return true;
}
INT32 MR_HandleControlsMenu(INT32 ch)
{
if (currentMenu->menuitems[itemOn].routine != MR_ChangeControl)
return false;
switch (ch)
{
case KEY_BACKSPACE:
// detach any keys associated with the game control
G_ClearControlKeys(setupcontrols, currentMenu->menuitems[itemOn].argument);
S_StartSound(NULL, sfx_shldls);
break;
default:
return false;
}
return true;
}
static INT32 controltochange;
static char controltochangetext[33];

View file

@ -272,7 +272,6 @@ INT32 MR_StartServer(INT32 choice);
INT32 MR_ConnectMenuModChecks(INT32 choice);
INT32 MR_CancelConnect(INT32 choice);
INT32 MR_SetupControlsMenu(INT32 arg);
INT32 MR_HandleControlsMenu(INT32 ch);
INT32 MR_Refresh(INT32 choice);
INT32 MR_Connect(INT32 arg);
INT32 MR_VideoModeMenu(INT32 choice);