From 5cf803f7d041fff3ef6c565800e8697c1ea7d810 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 25 Nov 2019 16:45:54 +0000 Subject: [PATCH 1/3] Allow character select for NiGHTS stages on the Secret Level Select now that every character has NiGHTS sprites. (think of this as the collorary to 358, not a direct change) --- src/m_menu.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 7d62514e6..44a06ca04 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -8340,10 +8340,7 @@ static void M_SetupChoosePlayer(INT32 choice) char *and; (void)choice; - if (!(mapheaderinfo[startmap-1] - && (mapheaderinfo[startmap-1]->forcecharacter[0] != '\0' - || (mapheaderinfo[startmap-1]->typeoflevel & TOL_NIGHTS)) // remove this later when everyone gets their own nights sprites, maybe - )) + if (!mapheaderinfo[startmap-1] || mapheaderinfo[startmap-1]->forcecharacter[0] == '\0') { for (i = 0; i < 32; i++) // Handle charsels, availability, and unlocks. { @@ -8406,17 +8403,16 @@ static void M_SetupChoosePlayer(INT32 choice) } } - if (firstvalid != 255) - { // One last bit of order we can't do in the iteration above. - description[firstvalid].prev = lastvalid; - description[lastvalid].next = firstvalid; - } - else // We're being forced into a specific character, so might as well just skip it. + if (firstvalid == 255) // We're being forced into a specific character, so might as well just skip it. { M_ChoosePlayer(-1); return; } + // One last bit of order we can't do in the iteration above. + description[firstvalid].prev = lastvalid; + description[lastvalid].next = firstvalid; + M_ChangeMenuMusic("_chsel", true); /* the menus suck -James */ From fc407cf6ce3c589906e76c00d275ded9d81f127e Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 25 Nov 2019 16:55:06 +0000 Subject: [PATCH 2/3] Skip tagteam characters (ie, Sonic&Tails) for NiGHTS secret map character selection. --- src/m_menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 44a06ca04..38b072870 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -8350,6 +8350,8 @@ static void M_SetupChoosePlayer(INT32 choice) if (and) { char firstskin[SKINNAMESIZE+1]; + if (mapheaderinfo[startmap-1]->typeoflevel & TOL_NIGHTS) // skip tagteam characters for NiGHTS levels + continue; strncpy(firstskin, description[i].skinname, (and - description[i].skinname)); firstskin[(and - description[i].skinname)] = '\0'; description[i].skinnum[0] = R_SkinAvailable(firstskin); From f86b46640d6d1106588c294f093f2274022ee9da Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 25 Nov 2019 17:05:58 +0000 Subject: [PATCH 3/3] Skip character select entirely if only one character is available on the list. --- src/m_menu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 38b072870..355e38ea1 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -8334,8 +8334,7 @@ static void M_SetupChoosePlayer(INT32 choice) { INT32 skinnum; UINT8 i; - UINT8 firstvalid = 255; - UINT8 lastvalid = 0; + UINT8 firstvalid = 255, lastvalid = 255; boolean allowed = false; char *and; (void)choice; @@ -8405,9 +8404,9 @@ static void M_SetupChoosePlayer(INT32 choice) } } - if (firstvalid == 255) // We're being forced into a specific character, so might as well just skip it. + if (firstvalid == lastvalid) // We're being forced into a specific character, so might as well just skip it. { - M_ChoosePlayer(-1); + M_ChoosePlayer(firstvalid); return; } @@ -8741,7 +8740,7 @@ static void M_ChoosePlayer(INT32 choice) UINT8 skinnum; // skip this if forcecharacter or no characters available - if (choice == -1) + if (choice == 255) { skinnum = botskin = 0; botingame = false;