Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doom: Fix key_menu_forward in Crispness menu #1112

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/doom/m_menu.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/doom/m_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/doom/m_menu.c

File src/doom/m_menu.c does not conform to Custom style guidelines. (lines 2895)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
Expand Down Expand Up @@ -161,9 +161,9 @@
char name[10];

// choice = menu item #.
// if status = 2,
// if status = 2 or 3,
// choice=0:leftarrow,1:rightarrow
// [crispy] if status = 3,
// [crispy] if status = 4,
// choice=0:leftarrow,1:rightarrow,2:enter
void (*routine)(int choice);

Expand Down Expand Up @@ -2889,6 +2889,11 @@
currentMenu->menuitems[itemOn].routine(1); // right arrow
S_StartSoundOptional(NULL, sfx_mnusli, sfx_stnmov); // [NS] Optional menu sounds.
}
else if (currentMenu->menuitems[itemOn].status == 3)

Check warning on line 2892 in src/doom/m_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

/src/doom/m_menu.c:2892:13 [readability-misleading-indentation]

different indentation for 'if' and corresponding 'else'
{
currentMenu->menuitems[itemOn].routine(1); // right arrow
S_StartSoundOptional(NULL, sfx_mnuact, sfx_pistol); // [NS] Optional menu sounds.
}
else if (currentMenu->menuitems[itemOn].status == 4) // [crispy]
{
currentMenu->menuitems[itemOn].routine(2); // enter key
Expand Down
Loading