Skip to content

Commit

Permalink
Limit keys that can call the menu from the titlepic (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro-Beirao authored Dec 7, 2024
1 parent 22a5e97 commit b1cb132
Showing 1 changed file with 56 additions and 54 deletions.
110 changes: 56 additions & 54 deletions prboom2/src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5088,32 +5088,6 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
return true;
}

// Pop-up Main menu?
if ((!in_game && ch > -1) || ch == KEYD_ESCAPE || action == MENU_ESCAPE) // phares
{
M_StartControlPanel();
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_console))
{
if (dsda_OpenConsole())
S_StartVoidSound(g_sfx_swtchn);
return true;
}

{
int i;

for (i = 0; i < CONSOLE_SCRIPT_COUNT; ++i)
if (dsda_InputActivated(dsda_input_script_0 + i)) {
dsda_ExecuteConsoleScript(i);

return true;
}
}

// Toggle gamma
if (dsda_InputActivated(dsda_input_gamma))
{
Expand All @@ -5127,22 +5101,20 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
return true;
}

if (dsda_InputActivated(dsda_input_zoomout))
if (dsda_InputActivated(dsda_input_cycle_profile))
{
if (automap_active)
return false;
M_SizeDisplay(0);
S_StartVoidSound(g_sfx_stnmov);
int value = dsda_CycleConfig(dsda_config_input_profile, true);
doom_printf("Input Profile %d", value);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_zoomin))
{ // jff 2/23/98
if (automap_active) // allow
return false; // key_hud==key_zoomin
M_SizeDisplay(1); // ^
S_StartVoidSound(g_sfx_stnmov); // |
return true; // phares
if (dsda_InputActivated(dsda_input_cycle_palette))
{
dsda_CyclePlayPal();
doom_printf("Palette %s", dsda_PlayPalData()->lump_name);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

//e6y
Expand Down Expand Up @@ -5173,6 +5145,52 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
// return true;
}

// Pop-up Main menu?
if (ch == KEYD_ESCAPE || action == MENU_ESCAPE ||
(!in_game && (ch == KEYD_ENTER || ch == KEYD_SPACEBAR ||
dsda_InputActivated(dsda_input_fire) || dsda_InputActivated(dsda_input_use) || dsda_InputActivated(dsda_input_menu_enter)))) // phares
{
M_StartControlPanel();
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_console))
{
if (dsda_OpenConsole())
S_StartVoidSound(g_sfx_swtchn);
return true;
}

{
int i;

for (i = 0; i < CONSOLE_SCRIPT_COUNT; ++i)
if (dsda_InputActivated(dsda_input_script_0 + i)) {
dsda_ExecuteConsoleScript(i);

return true;
}
}

if (dsda_InputActivated(dsda_input_zoomout))
{
if (automap_active)
return false;
M_SizeDisplay(0);
S_StartVoidSound(g_sfx_stnmov);
return true;
}

if (dsda_InputActivated(dsda_input_zoomin))
{ // jff 2/23/98
if (automap_active) // allow
return false; // key_hud==key_zoomin
M_SizeDisplay(1); // ^
S_StartVoidSound(g_sfx_stnmov); // |
return true; // phares
}

if (dsda_InputActivated(dsda_input_nextlevel))
{
if (userplayback && !dsda_SkipMode())
Expand Down Expand Up @@ -5239,22 +5257,6 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
return true;
}

if (dsda_InputActivated(dsda_input_cycle_profile))
{
int value = dsda_CycleConfig(dsda_config_input_profile, true);
doom_printf("Input Profile %d", value);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_cycle_palette))
{
dsda_CyclePlayPal();
doom_printf("Palette %s", dsda_PlayPalData()->lump_name);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_walkcamera))
{
if (demoplayback && gamestate == GS_LEVEL)
Expand Down

0 comments on commit b1cb132

Please sign in to comment.