From 6cb0c347d7cc679010208873c17bd6882842afbe Mon Sep 17 00:00:00 2001 From: NepDisk Date: Thu, 2 Jan 2025 23:12:00 -0500 Subject: [PATCH] Remove Ending gamestate and code --- src/d_main.cpp | 6 - src/deh_tables.c | 2 - src/f_finale.c | 717 +---------------------------------------------- src/f_finale.h | 2 - src/g_game.c | 29 +- src/g_state.h | 1 - src/hu_stuff.c | 2 +- 7 files changed, 8 insertions(+), 751 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 30e0e65b5..87ed27e4c 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -407,12 +407,6 @@ static bool D_Display(void) } break; - case GS_ENDING: - F_EndingDrawer(); - HU_Erase(); - HU_Drawer(); - break; - case GS_CUTSCENE: F_CutsceneDrawer(); HU_Erase(); diff --git a/src/deh_tables.c b/src/deh_tables.c index 3e92fe18d..e507274ed 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -6968,8 +6968,6 @@ struct int_const_s const INT_CONST[] = { {"GS_CREDITS",GS_CREDITS}, {"GS_EVALUATION",GS_EVALUATION}, {"GS_GAMEEND",GS_GAMEEND}, - {"GS_INTRO",GS_INTRO}, - {"GS_ENDING",GS_ENDING}, {"GS_CUTSCENE",GS_CUTSCENE}, {"GS_DEDICATEDSERVER",GS_DEDICATEDSERVER}, {"GS_WAITINGPLAYERS",GS_WAITINGPLAYERS}, diff --git a/src/f_finale.c b/src/f_finale.c index 4e55986df..aed4fe0f8 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -117,18 +117,6 @@ static UINT8 *waitcolormap; // colormap for the spinning character static patch_t *ttuser[TTMAX_USER]; static INT32 ttuser_count = 0; -static boolean goodending; -static patch_t *endbrdr[2]; // border - blue, white, pink - where have i seen those colours before? -static patch_t *endbgsp[3]; // nebula, sun, planet -static patch_t *endegrk[2]; // eggrock - replaced midway through good ending -static patch_t *endfwrk[3]; // firework - replaced with skin when good ending -static patch_t *endspkl[3]; // sparkle -static patch_t *endglow[2]; // glow aura - replaced with black rock's midway through good ending -static patch_t *endxpld[4]; // mini explosion -static patch_t *endescp[5]; // escape pod + flame -static INT32 sparkloffs[3][2]; // eggrock explosions/blackrock sparkles -static INT32 sparklloop; - // // PROMPT STATE // @@ -873,182 +861,30 @@ boolean F_CreditResponder(event_t *event) // EVALUATION // ============ -#define SPARKLLOOPTIME 7 // must be odd - void F_StartGameEvaluation(void) { - // Credits option in extras menu - if (cursaveslot == -1) + // Credits option in secrets menu + if (cursaveslot == -2) { - S_FadeOutStopMusic(2*MUSICRATE); F_StartGameEnd(); return; } - S_FadeOutStopMusic(5*MUSICRATE); - G_SetGamestate(GS_EVALUATION); // Just in case they're open ... somehow M_ClearMenus(true); - goodending = (ALL7EMERALDS(emeralds)); - gameaction = ga_nothing; paused = false; CON_ToggleOff(); - finalecount = -1; - sparklloop = 0; + finalecount = 0; } void F_GameEvaluationDrawer(void) { - INT32 x, y, i; - angle_t fa; - INT32 eemeralds_cur; - char patchname[7] = "CEMGx0"; - const char* endingtext; - - if (marathonmode) - endingtext = "THANKS FOR THE RUN!"; - else if (goodending) - endingtext = "CONGRATULATIONS!"; - else - endingtext = "TRY AGAIN..."; - - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); - - // Draw all the good crap here. - - if (finalecount > 0 && useBlackRock) - { - INT32 scale = FRACUNIT; - patch_t *rockpat; - UINT8 *colormap[2] = {NULL, NULL}; - patch_t *glow; - INT32 trans = 0; - - x = (((BASEVIDWIDTH-82)/2)+11)<= 5) - trans = (finalecount-5)>>1; - if (trans < 10) - V_DrawFixedPatch(x, y, scale, trans< (finalecount/SPARKLLOOPTIME)) - j = (finalecount/SPARKLLOOPTIME); - while (j) - { - if (j > 1 || sparklloop >= 2) - { - // if j == 0 - alternate between 0 and 1 - // 1 - 1 and 2 - // 2 - 2 and not rendered - V_DrawFixedPatch(x+sparkloffs[j-1][0], y+sparkloffs[j-1][1], FRACUNIT, 0, - W_CachePatchName(va("ENDSPKL%.1d", (j - ((sparklloop & 1) ? 0 : 1))), PU_PATCH), - R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_ULTRAMARINE, GTC_CACHE)); - } - j--; - } - } - else - { - patch_t *eggrock = W_CachePatchName("ENDEGRK5", PU_PATCH_LOWPRIORITY); - V_DrawFixedPatch(x, y, scale, 0, eggrock, colormap[0]); - if (trans < 10) - V_DrawFixedPatch(x, y, scale, trans<>ANGLETOFINESHIFT) & FINEMASK; - x = (BASEVIDWIDTH<<(FRACBITS-1)) + (60*FINECOSINE(fa)); - y = ((BASEVIDHEIGHT+16)<<(FRACBITS-1)) + (60*FINESINE(fa)); - eemeralds_cur += (360<= 5*TICRATE) - { - V_DrawString(8, 16, V_YELLOWMAP, "Unlocked:"); - - if (!(netgame) && (!modifiedgame || savemoddata)) - { - INT32 startcoord = 32; - - for (i = 0; i < MAXUNLOCKABLES; i++) - { - if (unlockables[i].conditionset && unlockables[i].conditionset < MAXCONDITIONSETS - && unlockables[i].type && !unlockables[i].nocecho) - { - if (unlockables[i].unlocked) - V_DrawString(8, startcoord, 0, unlockables[i].name); - startcoord += 8; - } - } - } - else if (netgame) - V_DrawString(8, 96, V_YELLOWMAP, "Multiplayer games\ncan't unlock\nextras!"); - else - V_DrawString(8, 96, V_YELLOWMAP, "Modified games\ncan't unlock\nextras!"); - } -#endif - - if (marathonmode) - { - const char *rtatext, *cuttext; - rtatext = (marathonmode & MA_INGAME) ? "In-game timer" : "RTA timer"; - cuttext = (marathonmode & MA_NOCUTSCENES) ? "" : " w/ cutscenes"; - endingtext = va("%s, %s%s", skins[players[consoleplayer].skin].realname, rtatext, cuttext); - V_DrawCenteredString(BASEVIDWIDTH/2, 182, V_SNAPTOBOTTOM|(ultimatemode ? V_REDMAP : V_YELLOWMAP), endingtext); - } + // This does nothing lololol } void F_GameEvaluationTicker(void) @@ -1059,36 +895,6 @@ void F_GameEvaluationTicker(void) return; } - if (!useBlackRock) - ; - else if (!goodending) - { - if (sparklloop) - sparklloop--; - - if (finalecount == (5*TICRATE)/2 - || finalecount == (7*TICRATE)/2 - || finalecount == ((7*TICRATE)/2)+5) - { - S_StartSound(NULL, sfx_s3k5c); - sparklloop = 10; - } - } - else if (++sparklloop == SPARKLLOOPTIME) // time to roll the randomisation again - { - angle_t workingangle = FixedAngle((M_RandomKey(360))<>ANGLETOFINESHIFT; - fixed_t workingradius = M_RandomKey(26); - - sparkloffs[2][0] = sparkloffs[1][0]; - sparkloffs[2][1] = sparkloffs[1][1]; - sparkloffs[1][0] = sparkloffs[0][0]; - sparkloffs[1][1] = sparkloffs[0][1]; - - sparkloffs[0][0] = (30< STOPPINGPOINT) - { - F_StartCredits(); - wipetypepre = INT16_MAX; - return; - } - - if (finalecount == -8) - S_ChangeMusicInternal((goodending ? "_endg" : "_endb"), false); - - if (goodending && finalecount == INFLECTIONPOINT) // time to swap some assets - F_CacheGoodEnding(); - - if (++sparklloop == SPARKLLOOPTIME) // time to roll the randomisation again - { - angle_t workingangle = FixedAngle((M_RandomRange(-170, 80))<>ANGLETOFINESHIFT; - fixed_t workingradius = M_RandomKey(26); - - sparkloffs[0][0] = (30< -19) - { - INT32 trans = (-parallaxticker)>>1; - if (trans < 0) - trans = 0; - V_DrawFixedPatch((200< 0) // gunchedrock - { - INT32 scale = FRACUNIT + ((parallaxticker-10)<<7); - INT32 trans = parallaxticker>>2; - UINT8 *colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_JET, GTC_CACHE); - - if (parallaxticker < 10) - { - tweakx = parallaxticker< 0) - { - i -= (3+(tweakx<<1)); - j += tweaky<<2; - } - - if (parallaxticker <= 70) // eggrock/blackrock - { - INT32 trans; - fixed_t scale = FRACUNIT; - UINT8 *colormap[2] = {NULL, NULL}; - - x += i; - y += j; - - if (parallaxticker > 66) - { - scale = ((70 - parallaxticker)<<(FRACBITS-2)); - x += (30*(FRACUNIT-scale)); - y += (30*(FRACUNIT-scale)); - } - else if ((parallaxticker > 60) || (goodending && parallaxticker > 0)) - ; - else - { - doexplosions = true; - if (!sparklloop) - { - x += ((sparkloffs[0][0] < 30< INFLECTIONPOINT) - parallaxticker -= 40; - - if ((-parallaxticker/4) < 5) - { - trans = (-parallaxticker/4) + 5; - if (trans < 0) - trans = 0; - V_DrawFixedPatch(x, y, scale, trans< INFLECTIONPOINT) - { - if (finalecount < INFLECTIONPOINT+10) - V_DrawFadeFill(24, 24, BASEVIDWIDTH-48, BASEVIDHEIGHT-48, 0, 0, INFLECTIONPOINT+10-finalecount); - parallaxticker -= 30; - } - - if ((parallaxticker/2) > -15) - colormap[0] = R_GetTranslationColormap(TC_ALLWHITE, 0, GTC_CACHE); - V_DrawFixedPatch(x, y, scale, 0, rockpat, colormap[0]); - if ((parallaxticker/2) > -25) - { - trans = (parallaxticker/2) + 15; - if (trans < 0) - trans = -trans; - if (trans < 10) - V_DrawFixedPatch(x, y, scale, trans< INFLECTIONPOINT) - { - if (finalecount < INFLECTIONPOINT+10) - V_DrawFixedPatch(x, y, scale, (finalecount-INFLECTIONPOINT)<= 3 && doexplosions) - { - INT32 boomtime = parallaxticker - sparklloop; - - x = ((((BASEVIDWIDTH-82)/2)+11)< INFLECTIONPOINT && finalecount < INFLECTIONPOINT+10) - V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, (finalecount-INFLECTIONPOINT)<= TICRATE && finalecount < INFLECTIONPOINT) - { - INT32 workingtime = finalecount - TICRATE; - fixed_t radius = ((vid.width/vid.dupx)*(INFLECTIONPOINT - TICRATE - workingtime))/(INFLECTIONPOINT - TICRATE); - angle_t fa; - INT32 eemeralds_cur[4]; - char patchname[7] = "CEMGx0"; - - radius <<= FRACBITS; - - for (i = 0; i < 4; ++i) - { - if (i == 1) - workingtime -= sparklloop; - else if (i) - workingtime -= SPARKLLOOPTIME; - eemeralds_cur[i] = (workingtime % 360)<>ANGLETOFINESHIFT) & FINEMASK; - x = (BASEVIDWIDTH<<(FRACBITS-1)) + FixedMul(FINECOSINE(fa),radius); - y = (BASEVIDHEIGHT<<(FRACBITS-1)) + FixedMul(FINESINE(fa),radius); - eemeralds_cur[j] += (360<>ANGLETOFINESHIFT) & FINEMASK; - x = (BASEVIDWIDTH<<(FRACBITS-1)) + FixedMul(FINECOSINE(fa),radius); - y = ((BASEVIDHEIGHT+16)<<(FRACBITS-1)) + FixedMul(FINESINE(fa),radius); - eemeralds_cur[0] += (360< 20) - - // look, i make an ending for you last-minute, the least you could do is let me have this - if (cv_soundtest.value == 413) - { - INT32 trans = 0; - boolean donttouch = false; - const char *str; - if (goodending) - str = va("[S] %s: Engage.", skins[players[consoleplayer].skin].realname); - else - str = "[S] Eggman: Abscond."; - - if (finalecount < 10) - trans = (10-finalecount)/2; - else if (finalecount > STOPPINGPOINT - 20) - { - trans = 10 + (finalecount - STOPPINGPOINT)/2; - donttouch = true; - } - - if (trans < 10) - { - //colset(linkmap, 164, 165, 169); -- the ideal purple colour to represent a clicked in-game link, but not worth it just for a soundtest-controlled secret - V_DrawCenteredString(BASEVIDWIDTH/2, 8, V_ALLOWLOWERCASE|(trans<'|(trans<= STOPPINGPOINT-TICRATE) ? V_PURPLEMAP : V_BLUEMAP)|(trans<"); - } - - if (finalecount > STOPPINGPOINT-(20+(2*TICRATE))) - { - INT32 trans2 = abs((5*FINECOSINE((FixedAngle((finalecount*5)<>ANGLETOFINESHIFT & FINEMASK)))>>FRACBITS)+2; - if (!donttouch) - { - trans = 10 + (STOPPINGPOINT-(20+(2*TICRATE))) - finalecount; - if (trans > trans2) - trans2 = trans; - } - else - trans2 += 2*trans; - if (trans2 < 10) - V_DrawCharacter(26, BASEVIDHEIGHT-33, '\x1C'|(trans2<