From e7bdc073ed805de68534a7c98ab9ec14369b52ad Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Mar 2024 22:10:54 +0000 Subject: [PATCH 1/7] Fix x coords of character select explosions in Profile version of the menu (resolves #1182) --- src/k_menudraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index e9407fe6a..21c2ddd4e 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -2547,7 +2547,7 @@ void M_DrawCharacterSelect(void) } // Explosions when you've made your final selection - M_DrawCharSelectExplosions(true, 82, 22); + M_DrawCharSelectExplosions(true, basex + 82, 22); for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) { From 72472d6ae17ed4dae3cec50011995d434cf27655 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Mar 2024 22:11:24 +0000 Subject: [PATCH 2/7] If the first Spray Can you pick up is in a tutorial context and your profile's skincolor is Default, set it to the Spray Can's colour! Makes Eggman's "what's your favourite colour" line even stronger. --- src/p_inter.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/p_inter.c b/src/p_inter.c index 1df6b6029..6b10a0c40 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -34,6 +34,7 @@ #include "k_battle.h" #include "k_specialstage.h" #include "k_pwrlv.h" +#include "k_profiles.h" #include "k_grandprix.h" #include "k_respawn.h" #include "p_spec.h" @@ -784,6 +785,19 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) gamedata->spraycans[can_id].map = gamemap-1; mapheaderinfo[gamemap-1]->cache_spraycan = can_id; + if (gamedata->gotspraycans == 0 + && gametype == GT_TUTORIAL + && cv_ttlprofilen.value > 0 + && cv_ttlprofilen.value < PR_GetNumProfiles()) + { + profile_t *p = PR_GetProfile(cv_ttlprofilen.value); + if (p->color == SKINCOLOR_NONE) + { + // Apply your favourite colour to the profile! + p->color = gamedata->spraycans[can_id].col; + } + } + gamedata->gotspraycans++; if (!M_UpdateUnlockablesAndExtraEmblems(true, true)) From fd2167e29c0cbc35ae76b8cbe64d966c8586e6af Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Mar 2024 22:13:07 +0000 Subject: [PATCH 3/7] Profile Edit: Make the tooltip for "Character" dependent on whether you've gotten any Spray Cans. I imagine people might have been confused by not being able to select their desired skincolour --- src/menus/options-profiles-1.c | 8 ++++++++ src/menus/options-profiles-edit-1.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/menus/options-profiles-1.c b/src/menus/options-profiles-1.c index 8a81dadfb..9a8180af5 100644 --- a/src/menus/options-profiles-1.c +++ b/src/menus/options-profiles-1.c @@ -4,6 +4,7 @@ #include "../i_time.h" #include "../k_menu.h" #include "../s_sound.h" +#include "../m_cond.h" // profile select menuitem_t OPTIONS_Profiles[] = { @@ -118,6 +119,13 @@ void M_StartEditProfile(INT32 c) OPTIONS_EditProfile[popt_char].status |= IT_TRANSTEXT; } + // Setup variable tooltips. + OPTIONS_EditProfile[popt_char].tooltip = ( + (gamedata && gamedata->numspraycans != 0 && gamedata->gotspraycans != 0) + ? "Default character and color." + : "Default character." + ); + OPTIONS_EditProfileDef.prevMenu = currentMenu; M_SetupNextMenu(&OPTIONS_EditProfileDef, false); return; diff --git a/src/menus/options-profiles-edit-1.c b/src/menus/options-profiles-edit-1.c index ef6a7212c..57724414a 100644 --- a/src/menus/options-profiles-edit-1.c +++ b/src/menus/options-profiles-edit-1.c @@ -18,7 +18,7 @@ menuitem_t OPTIONS_EditProfile[] = { {IT_STRING | IT_SUBMENU, "Accessibility", "Acccessibility and quality of life options.", NULL, {.submenu = &OPTIONS_ProfileAccessibilityDef}, 0, 91}, - {IT_STRING | IT_CALL, "Character", "Default character and color.", + {IT_STRING | IT_CALL, "Character", NULL, // tooltip set in M_StartEditProfile NULL, {.routine = M_CharacterSelect}, 0, 111}, {IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online and in replays.", From 0182d2cb43efb2c53c74cc0b0b1c026cdab3362d Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Mar 2024 22:13:56 +0000 Subject: [PATCH 4/7] Don't draw invalid Grade in Match Race Tab Rankings Here because it was extremely overt in Tutorial Challenge --- src/y_inter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/y_inter.cpp b/src/y_inter.cpp index c0122da94..32cc60368 100644 --- a/src/y_inter.cpp +++ b/src/y_inter.cpp @@ -719,6 +719,8 @@ void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 xoffset) ); } } + else if (gamestate == GS_LEVEL) + ; else if (standings->rankingsmode != 0) { char *increasenum = NULL; From 8d5ababc27d9205732e8e9c8ea67d2bd58b78c72 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Mar 2024 22:16:48 +0000 Subject: [PATCH 5/7] Skipstats teleport: Change sound behaviour - Replace with a random teleport sound from Sonic 2, because shipping with a thok between every tutorial would have made us look like clowns. - Don't play for Versus contexts. --- src/k_kart.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index f258fb334..639de37ed 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -197,22 +197,24 @@ void K_TimerInit(void) return; } + const boolean bossintro = K_CheckBossIntro(); + // Rooooooolllling staaaaaaart if ((gametyperules & (GTR_ROLLINGSTART|GTR_CIRCUIT)) == (GTR_ROLLINGSTART|GTR_CIRCUIT)) { S_StartSound(NULL, sfx_s25f); // The actual push occours in P_InitPlayers } - else if (skipstats != 0) + else if (skipstats != 0 && bossintro == false) { - S_StartSound(NULL, sfx_endwrp); + S_StartSound(NULL, sfx_s26c); //sfx_endwrp } if ((gametyperules & (GTR_CATCHER|GTR_CIRCUIT)) == (GTR_CATCHER|GTR_CIRCUIT)) { K_InitSpecialStage(); } - else if (K_CheckBossIntro() == true) + else if (bossintro == true) ; else { From aeaad8026c712feeeaf07e3d6febbf222ea4c04b Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Mar 2024 22:17:20 +0000 Subject: [PATCH 6/7] F_VersionDrawer: Fade in on titlescreen --- src/f_finale.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 78e743f2f..36dd1a3dc 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1547,10 +1547,23 @@ void F_StartTitleScreen(void) void F_VersionDrawer(void) { // An adapted thing from old menus - most games have version info on the title screen now... + INT32 texty = vid.height - 10*vid.dupy; + INT32 trans = 5; + + if (gamestate == GS_TITLESCREEN) + { + trans = 10 - (finalecount - (3*TICRATE)/2)/3; + if (trans >= 10) + return; + if (trans < 5) + trans = 5; + } + + trans = (trans< Date: Thu, 21 Mar 2024 22:18:17 +0000 Subject: [PATCH 7/7] Improved Goner titlescreen Still minimalist, but much stronger. --- src/f_finale.c | 75 ++++++++++++++++++++++++++++++++++++++++++------ src/k_menufunc.c | 9 +++++- 2 files changed, 74 insertions(+), 10 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 36dd1a3dc..52a1e6f99 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1422,6 +1422,8 @@ static void F_CacheTitleScreen(void) { UINT16 i; + kts_copyright = W_CachePatchName("KTSCR", PU_PATCH_LOWPRIORITY); + switch (curttmode) { case TTMODE_NONE: @@ -1439,7 +1441,6 @@ static void F_CacheTitleScreen(void) { kts_electricity[i] = W_CachePatchName(va("KTSELCT%.1d", i+1), PU_PATCH_LOWPRIORITY); } - kts_copyright = W_CachePatchName("KTSCR", PU_PATCH_LOWPRIORITY); break; } @@ -1602,6 +1603,9 @@ void F_VersionDrawer(void) #undef addtext } +#define GONERTYPEWRITERDURATION (5) +#define GONERTYPEWRITERWAIT (TICRATE/2) + // (no longer) De-Demo'd Title Screen void F_TitleScreenDrawer(void) { @@ -1632,7 +1636,41 @@ void F_TitleScreenDrawer(void) goto luahook; } - switch (curttmode) + if (cache_gametrulystarted == false) + { + INT32 trans; + + if (finalecount >= GONERTYPEWRITERWAIT) + { + INT32 checkcount = finalecount - GONERTYPEWRITERWAIT; + const char *typetext = "RING RACERS"; + INT32 bx = V_TitleCardStringWidth(typetext, false); + + V_DrawTitleCardString((BASEVIDWIDTH - bx)/2, 80, typetext, V_TRANSLUCENT, true, (checkcount/GONERTYPEWRITERDURATION), 0, false); + + if (checkcount > 2*TICRATE) + { + trans = 10 - (checkcount - 2*TICRATE)/4; + if (trans < 10) + { + if (trans < 0) + trans = 0; + trans <<= V_ALPHASHIFT; + V_DrawCenteredThinString(BASEVIDWIDTH/2, 80 + 32, V_AQUAMAP|trans, "Press any input to proceed."); + } + } + } + + trans = 10 - finalecount/5; + if (trans < 10) + { + if (trans < 0) + trans = 0; + trans <<= V_ALPHASHIFT; + V_DrawCenteredMenuString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - 7, trans, "Dr. Robotnik's"); + } + } + else switch (curttmode) { case TTMODE_NONE: { @@ -1641,7 +1679,7 @@ void F_TitleScreenDrawer(void) case TTMODE_RINGRACERS: { - if (cache_gametrulystarted == true) + //if (cache_gametrulystarted == true) { const char *eggName = "eggman"; INT32 eggSkin = R_SkinAvailableEx(eggName, false); @@ -1673,12 +1711,7 @@ void F_TitleScreenDrawer(void) V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_bumper, NULL); } - else - { - V_DrawCenteredString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - 4, 0, "Press any button/key to continue"); - } - V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_copyright, NULL); break; } @@ -1704,6 +1737,8 @@ void F_TitleScreenDrawer(void) } } + V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_copyright, NULL); + luahook: // The title drawer is sometimes called without first being started // In order to avoid use-before-initialization crashes, let's check and @@ -1736,7 +1771,11 @@ void F_TitleScreenTicker(boolean run) { if (finalecount == 0) { - if (cache_gametrulystarted && !Music_Playing("title")) + if (!cache_gametrulystarted) + { + S_StartSound(NULL, sfx_s3k93); + } + else if (!Music_Playing("title")) { // Now start the music Music_Loop("title", looptitle); @@ -1749,6 +1788,22 @@ void F_TitleScreenTicker(boolean run) } finalecount++; + + if (!cache_gametrulystarted && finalecount > GONERTYPEWRITERWAIT) + { + if (finalecount == GONERTYPEWRITERWAIT + 2*TICRATE + TICRATE/3) + { + S_StartSound(NULL, sfx_s3k61); + } + + if (((finalecount - GONERTYPEWRITERWAIT) % GONERTYPEWRITERDURATION) == 0) + { + // hardcoded for RING RACERS string + INT32 lettercount = (finalecount - GONERTYPEWRITERWAIT)/GONERTYPEWRITERDURATION; + if (lettercount != 5 && lettercount <= 11) + S_StartSound(NULL, sfx_typri1); + } + } } // don't trigger if doing anything besides idling on title @@ -1921,6 +1976,8 @@ loadreplay: } } +#undef GONERTYPEWRITERDURATION + void F_AttractDemoTicker(void) { keypressed = false; diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 4713d74ab..dd6c2d9a0 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -697,8 +697,15 @@ void M_StartControlPanel(void) { // No instantly skipping the titlescreen. // (We can change this timer later when extra animation is added.) - if (finalecount < 1) + if (finalecount < ( + M_GameTrulyStarted() + ? 1 + : 3*TICRATE + ) + ) + { return; + } if (menumessage.active) {