From 6e7605e4f3a16d35dceccaa1b73af545e8702fe5 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 21 Aug 2017 16:02:13 +0100 Subject: [PATCH] * Add new graphics for the no save and ultimate slots, and make the invalid files look a little different. * Push big endsign images downwards. * Add a way to disable the ultimate slot. * BwehHehHe() --- src/m_menu.c | 111 +++++++++++++++++++++++++++++++++------------------ src/m_menu.h | 2 + 2 files changed, 74 insertions(+), 39 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 471012b9b..480ec7ca2 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4094,6 +4094,24 @@ static boolean M_PrepareLevelPlatter(INT32 gt) mapnum++; } +#ifdef SYMMETRICAL_PLATTER + // horizontally space out rows with missing right sides + for (; row >= 0; row--) + { + if (!levelselect.rows[row].maplist[2] // no right side + && levelselect.rows[row].maplist[0] && levelselect.rows[row].maplist[1]) // all the left filled in + { + levelselect.rows[row].maplist[2] = levelselect.rows[row].maplist[1]; + STRBUFCPY(levelselect.rows[row].mapnames[2], levelselect.rows[row].mapnames[1]); + levelselect.rows[row].mapavailable[2] = levelselect.rows[row].mapavailable[1]; + + levelselect.rows[row].maplist[1] = -1; // diamond + levelselect.rows[row].mapnames[1][0] = '\0'; + levelselect.rows[row].mapavailable[1] = false; + } + } +#endif + if (levselp[0][0]) // never going to have some provided but not all, saves individually checking { W_UnlockCachedPatch(levselp[0][0]); @@ -4231,7 +4249,7 @@ static void M_HandleLevelPlatter(INT32 choice) else if (!lsoffs[0]) // prevent sound spam { lsoffs[0] = -8; - S_StartSound(NULL,sfx_s3kb2); + S_StartSound(NULL,sfx_lose); } break; @@ -4277,7 +4295,7 @@ static void M_DrawLevelPlatterWideMap(UINT8 row, UINT8 col, INT32 x, INT32 y, bo patch_t *patch; INT32 map = levelselect.rows[row].maplist[col]; - if (!map) + if (map <= 0) return; // A 564x100 image of the level as entry MAPxxW @@ -4318,7 +4336,7 @@ static void M_DrawLevelPlatterMap(UINT8 row, UINT8 col, INT32 x, INT32 y, boolea patch_t *patch; INT32 map = levelselect.rows[row].maplist[col]; - if (!map) + if (map <= 0) return; // A 160x100 image of the level as entry MAPxxP @@ -4403,7 +4421,7 @@ static void M_DrawLevelPlatterMenu(void) // draw cursor box V_DrawSmallScaledPatch(lsbasex + cursorx + lsoffs[1], lsbasey, 0, (levselp[sizeselect][((skullAnimCounter/4) ? 1 : 0)])); - if (levelselect.rows[lsrow].maplist[lscol]) + if (levelselect.rows[lsrow].maplist[lscol] > 0) V_DrawScaledPatch(lsbasex + cursorx-17, lsbasey+50+lsoffs[0], 0, W_CachePatchName("M_CURSOR", PU_CACHE)); // handle movement of cursor box @@ -6057,7 +6075,7 @@ static void M_DrawLoadGameData(void) if (savetodraw == 0) { V_DrawSmallScaledPatch(x, y, 0, - W_CachePatchName("SAVENONE", PU_CACHE)); + W_CachePatchName(((ultimate_selectable) ? "ULTIMATE" : "SAVENONE"), PU_CACHE)); x += 2; y += 1; V_DrawString(x, y, @@ -6067,7 +6085,7 @@ static void M_DrawLoadGameData(void) V_DrawFill(x, y+9, 80, 1, yellowmap[3]); y += 11; V_DrawSmallScaledPatch(x, y, V_STATIC, - W_CachePatchName("BLACKLVL", PU_CACHE)); + W_CachePatchName("BLACXLVL", PU_CACHE)); y += 41; if (ultimate_selectable) V_DrawRightAlignedThinString(x + 79, y, V_REDMAP, "ULTIMATE."); @@ -6078,25 +6096,33 @@ static void M_DrawLoadGameData(void) savetodraw--; + if (savegameinfo[savetodraw].lives > 0) + charskin = &skins[savegameinfo[savetodraw].skinnum]; + // signpost background { UINT8 col; - if (savegameinfo[savetodraw].botskin == 3) // & knuckles - col = 105; - else if (savegameinfo[savetodraw].botskin) // tailsbot or custom - col = 134; - else if (savegameinfo[savetodraw].lives == -42) - col = 26; - else if (savegameinfo[savetodraw].lives == -666) - col = 47; + if (savegameinfo[savetodraw].lives == -666) + { + V_DrawSmallScaledPatch(x+2, y+64, 0, + W_CachePatchName("BLANKLVL", PU_CACHE)); + } else { - charskin = &skins[savegameinfo[savetodraw].skinnum]; - col = (charskin->prefcolor - 1)*2; - col = Color_Index[Color_Opposite[col]-1][Color_Opposite[col+1]]; - } + if (savegameinfo[savetodraw].lives == -42) + col = 26; + else if (savegameinfo[savetodraw].botskin == 3) // & knuckles + col = 105; + else if (savegameinfo[savetodraw].botskin) // tailsbot or custom + col = 134; + else + { + col = (charskin->prefcolor - 1)*2; + col = Color_Index[Color_Opposite[col]-1][Color_Opposite[col+1]]; + } - V_DrawFill(x+6, y+64, 72, 50, col); + V_DrawFill(x+6, y+64, 72, 50, col); + } } V_DrawSmallScaledPatch(x, y, 0, @@ -6150,7 +6176,20 @@ static void M_DrawLoadGameData(void) || (savegameinfo[savetodraw].lives == -666)) continue; - y += 51; + y += 64; + + // tiny emeralds + { + INT32 j, workx = x + 6; + for (j = 0; j < 7; ++j) + { + if (savegameinfo[savetodraw].numemeralds & (1 << j)) + V_DrawScaledPatch(workx, y, 0, tinyemeraldpics[j]); + workx += 10; + } + } + + y -= 13; // character heads, lives, and continues { @@ -6159,7 +6198,7 @@ static void M_DrawLoadGameData(void) patch_t *patch; UINT8 *colormap = NULL; - INT32 tempx = (x+40)<spriteframes[0]; patch = W_CachePatchNum(sprframe->lumppat[0], PU_CACHE); + if ((calc = SHORT(patch->topoffset) - 42) > 0) + tempy += ((4+calc)<