mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
Remove GS_ENDING
A whole bunch of extremely specific SRB2 material
This commit is contained in:
parent
0ecc7ccd54
commit
f15a7a946d
7 changed files with 1 additions and 555 deletions
|
|
@ -464,12 +464,6 @@ static void D_Display(void)
|
|||
}
|
||||
break;
|
||||
|
||||
case GS_ENDING:
|
||||
F_EndingDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
case GS_CUTSCENE:
|
||||
F_CutsceneDrawer();
|
||||
HU_Erase();
|
||||
|
|
|
|||
|
|
@ -6836,7 +6836,6 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"GS_CREDITS",GS_CREDITS},
|
||||
{"GS_EVALUATION",GS_EVALUATION},
|
||||
{"GS_INTRO",GS_INTRO},
|
||||
{"GS_ENDING",GS_ENDING},
|
||||
{"GS_CUTSCENE",GS_CUTSCENE},
|
||||
{"GS_DEDICATEDSERVER",GS_DEDICATEDSERVER},
|
||||
{"GS_WAITINGPLAYERS",GS_WAITINGPLAYERS},
|
||||
|
|
|
|||
521
src/f_finale.c
521
src/f_finale.c
|
|
@ -130,14 +130,6 @@ 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;
|
||||
|
||||
|
|
@ -1107,519 +1099,6 @@ void F_GameEvaluationTicker(void)
|
|||
|
||||
#undef SPARKLLOOPTIME
|
||||
|
||||
// ==========
|
||||
// ENDING
|
||||
// ==========
|
||||
|
||||
#define INFLECTIONPOINT (6*TICRATE)
|
||||
#define STOPPINGPOINT (14*TICRATE)
|
||||
#define SPARKLLOOPTIME 15 // must be odd
|
||||
|
||||
static void F_CacheEnding(void)
|
||||
{
|
||||
endbrdr[1] = W_CachePatchName("ENDBRDR1", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endegrk[0] = W_CachePatchName("ENDEGRK0", PU_PATCH_LOWPRIORITY);
|
||||
endegrk[1] = W_CachePatchName("ENDEGRK1", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endglow[0] = W_CachePatchName("ENDGLOW0", PU_PATCH_LOWPRIORITY);
|
||||
endglow[1] = W_CachePatchName("ENDGLOW1", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endbgsp[0] = W_CachePatchName("ENDBGSP0", PU_PATCH_LOWPRIORITY);
|
||||
endbgsp[1] = W_CachePatchName("ENDBGSP1", PU_PATCH_LOWPRIORITY);
|
||||
endbgsp[2] = W_CachePatchName("ENDBGSP2", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endspkl[0] = W_CachePatchName("ENDSPKL0", PU_PATCH_LOWPRIORITY);
|
||||
endspkl[1] = W_CachePatchName("ENDSPKL1", PU_PATCH_LOWPRIORITY);
|
||||
endspkl[2] = W_CachePatchName("ENDSPKL2", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endxpld[0] = W_CachePatchName("ENDXPLD0", PU_PATCH_LOWPRIORITY);
|
||||
endxpld[1] = W_CachePatchName("ENDXPLD1", PU_PATCH_LOWPRIORITY);
|
||||
endxpld[2] = W_CachePatchName("ENDXPLD2", PU_PATCH_LOWPRIORITY);
|
||||
endxpld[3] = W_CachePatchName("ENDXPLD3", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endescp[0] = W_CachePatchName("ENDESCP0", PU_PATCH_LOWPRIORITY);
|
||||
endescp[1] = W_CachePatchName("ENDESCP1", PU_PATCH_LOWPRIORITY);
|
||||
endescp[2] = W_CachePatchName("ENDESCP2", PU_PATCH_LOWPRIORITY);
|
||||
endescp[3] = W_CachePatchName("ENDESCP3", PU_PATCH_LOWPRIORITY);
|
||||
endescp[4] = W_CachePatchName("ENDESCP4", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
// so we only need to check once
|
||||
if ((goodending = ALLCHAOSEMERALDS(emeralds)))
|
||||
{
|
||||
endfwrk[0] = W_CachePatchName("ENDFWRK3", PU_PATCH);
|
||||
endfwrk[1] = W_CachePatchName("ENDFWRK4", PU_PATCH);
|
||||
endfwrk[2] = W_CachePatchName("ENDFWRK5", PU_PATCH);
|
||||
|
||||
endbrdr[0] = W_CachePatchName("ENDBRDR2", PU_PATCH_LOWPRIORITY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// eggman, skin nonspecific
|
||||
endfwrk[0] = W_CachePatchName("ENDFWRK0", PU_PATCH_LOWPRIORITY);
|
||||
endfwrk[1] = W_CachePatchName("ENDFWRK1", PU_PATCH_LOWPRIORITY);
|
||||
endfwrk[2] = W_CachePatchName("ENDFWRK2", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endbrdr[0] = W_CachePatchName("ENDBRDR0", PU_PATCH_LOWPRIORITY);
|
||||
}
|
||||
}
|
||||
|
||||
static void F_CacheGoodEnding(void)
|
||||
{
|
||||
endegrk[0] = W_CachePatchName("ENDEGRK2", PU_PATCH_LOWPRIORITY);
|
||||
endegrk[1] = W_CachePatchName("ENDEGRK3", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endglow[0] = W_CachePatchName("ENDGLOW2", PU_PATCH_LOWPRIORITY);
|
||||
endglow[1] = W_CachePatchName("ENDGLOW3", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
endxpld[0] = W_CachePatchName("ENDEGRK4", PU_PATCH_LOWPRIORITY);
|
||||
}
|
||||
|
||||
void F_StartEnding(void)
|
||||
{
|
||||
G_SetGamestate(GS_ENDING);
|
||||
wipetypepost = INT16_MAX;
|
||||
|
||||
// Just in case they're open ... somehow
|
||||
M_ClearMenus(true);
|
||||
|
||||
gameaction = ga_nothing;
|
||||
paused = false;
|
||||
CON_ToggleOff();
|
||||
S_StopMusic(); // todo: placeholder
|
||||
S_StopSounds();
|
||||
|
||||
finalecount = -10; // what? this totally isn't a hack. why are you asking?
|
||||
|
||||
memset(sparkloffs, 0, sizeof(INT32)*3*2);
|
||||
sparklloop = 0;
|
||||
|
||||
F_CacheEnding();
|
||||
}
|
||||
|
||||
void F_EndingTicker(void)
|
||||
{
|
||||
if (++finalecount > 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))<<FRACBITS)>>ANGLETOFINESHIFT;
|
||||
fixed_t workingradius = M_RandomKey(26);
|
||||
|
||||
sparkloffs[0][0] = (30<<FRACBITS) + workingradius*FINECOSINE(workingangle);
|
||||
sparkloffs[0][1] = (30<<FRACBITS) + workingradius*FINESINE(workingangle);
|
||||
|
||||
sparklloop = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void F_EndingDrawer(void)
|
||||
{
|
||||
INT32 x, y, i, j, parallaxticker;
|
||||
patch_t *rockpat;
|
||||
|
||||
if (!goodending || finalecount < INFLECTIONPOINT)
|
||||
rockpat = W_CachePatchName("ROID0000", PU_PATCH_LOWPRIORITY);
|
||||
else
|
||||
rockpat = W_CachePatchName(va("ROID00%.2d", 34 - ((finalecount - INFLECTIONPOINT) % 35)), PU_PATCH_LOWPRIORITY);
|
||||
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
parallaxticker = finalecount - INFLECTIONPOINT;
|
||||
x = -((parallaxticker*20)<<FRACBITS)/INFLECTIONPOINT;
|
||||
y = ((parallaxticker*7)<<FRACBITS)/INFLECTIONPOINT;
|
||||
i = (((BASEVIDWIDTH-82)/2)+11)<<FRACBITS;
|
||||
j = (((BASEVIDHEIGHT-82)/2)+12)<<FRACBITS;
|
||||
|
||||
if (finalecount <= -10)
|
||||
;
|
||||
else if (finalecount < 0)
|
||||
V_DrawFadeFill(24, 24, BASEVIDWIDTH-48, BASEVIDHEIGHT-48, 0, 0, 10+finalecount);
|
||||
else if (finalecount <= 20)
|
||||
{
|
||||
V_DrawFill(24, 24, BASEVIDWIDTH-48, BASEVIDHEIGHT-48, 0);
|
||||
if (finalecount && finalecount < 20)
|
||||
{
|
||||
INT32 trans = (10-finalecount);
|
||||
if (trans < 0)
|
||||
{
|
||||
trans = -trans;
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, 0, endbrdr[0]);
|
||||
}
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, trans<<V_ALPHASHIFT, endbrdr[1]);
|
||||
}
|
||||
else if (finalecount == 20)
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, 0, endbrdr[0]);
|
||||
}
|
||||
else if (goodending && (parallaxticker == -2 || !parallaxticker))
|
||||
{
|
||||
V_DrawFill(24, 24, BASEVIDWIDTH-48, BASEVIDHEIGHT-48, 0);
|
||||
V_DrawFixedPatch(x+i, y+j, FRACUNIT, 0, endegrk[0],
|
||||
R_GetTranslationColormap(TC_BLINK, SKINCOLOR_BLACK, GTC_CACHE));
|
||||
//V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, 0, endbrdr[1]);
|
||||
}
|
||||
else if (goodending && parallaxticker == -1)
|
||||
{
|
||||
V_DrawFixedPatch(x+i, y+j, FRACUNIT, 0, rockpat,
|
||||
R_GetTranslationColormap(TC_ALLWHITE, 0, GTC_CACHE));
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, 0, endbrdr[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean doexplosions = false;
|
||||
boolean borderstuff = false;
|
||||
INT32 tweakx = 0, tweaky = 0;
|
||||
|
||||
if (parallaxticker < 75) // f background's supposed to be visible
|
||||
{
|
||||
V_DrawFixedPatch(-(x/10), -(y/10), FRACUNIT, 0, endbgsp[0], NULL); // nebula
|
||||
V_DrawFixedPatch(-(x/5), -(y/5), FRACUNIT, 0, endbgsp[1], NULL); // sun
|
||||
V_DrawFixedPatch( 0, -(y/2), FRACUNIT, 0, endbgsp[2], NULL); // planet
|
||||
|
||||
// player's escape pod
|
||||
V_DrawFixedPatch((200<<FRACBITS)+(finalecount<<(FRACBITS-2)),
|
||||
(100<<FRACBITS)+(finalecount<<(FRACBITS-2)),
|
||||
FRACUNIT, 0, endescp[4], NULL);
|
||||
if (parallaxticker > -19)
|
||||
{
|
||||
INT32 trans = (-parallaxticker)>>1;
|
||||
if (trans < 0)
|
||||
trans = 0;
|
||||
V_DrawFixedPatch((200<<FRACBITS)+(finalecount<<(FRACBITS-2)),
|
||||
(100<<FRACBITS)+(finalecount<<(FRACBITS-2)),
|
||||
FRACUNIT, trans<<V_ALPHASHIFT, endescp[(finalecount/2)&3], NULL);
|
||||
}
|
||||
|
||||
if (goodending && parallaxticker > 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<<FRACBITS;
|
||||
tweaky = ((7*parallaxticker)<<(FRACBITS-2))/5;
|
||||
}
|
||||
else
|
||||
{
|
||||
tweakx = 10<<FRACBITS;
|
||||
tweaky = 7<<(FRACBITS-1);
|
||||
}
|
||||
i += tweakx;
|
||||
j -= tweaky;
|
||||
|
||||
x <<= 1;
|
||||
y <<= 1;
|
||||
|
||||
// center detritrus
|
||||
V_DrawFixedPatch(i-x, j-y, FRACUNIT, 0, endegrk[0], colormap);
|
||||
if (trans < 10)
|
||||
V_DrawFixedPatch(i-x, j-y, FRACUNIT, trans<<V_ALPHASHIFT, endegrk[0], NULL);
|
||||
|
||||
// ring detritrus
|
||||
V_DrawFixedPatch((30*(FRACUNIT-scale))+i-(2*x), (30*(FRACUNIT-scale))+j-(2*y) - ((7<<FRACBITS)/2), scale, 0, endegrk[1], colormap);
|
||||
if (trans < 10)
|
||||
V_DrawFixedPatch((30*(FRACUNIT-scale))+i-(2*x), (30*(FRACUNIT-scale))+j-(2*y), scale, trans<<V_ALPHASHIFT, endegrk[1], NULL);
|
||||
|
||||
scale += ((parallaxticker-10)<<7);
|
||||
|
||||
// shard detritrus
|
||||
V_DrawFixedPatch((30*(FRACUNIT-scale))+i-(x/2), (30*(FRACUNIT-scale))+j-(y/2) - ((7<<FRACBITS)/2), scale, 0, endxpld[0], colormap);
|
||||
if (trans < 10)
|
||||
V_DrawFixedPatch((30*(FRACUNIT-scale))+i-(x/2), (30*(FRACUNIT-scale))+j-(y/2), scale, trans<<V_ALPHASHIFT, endxpld[0], NULL);
|
||||
}
|
||||
}
|
||||
else if (goodending)
|
||||
{
|
||||
tweakx = 10<<FRACBITS;
|
||||
tweaky = 7<<(FRACBITS-1);
|
||||
i += tweakx;
|
||||
j += tweaky;
|
||||
x <<= 1;
|
||||
y <<= 1;
|
||||
}
|
||||
|
||||
if (goodending && 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<<FRACBITS) ? FRACUNIT : -FRACUNIT);
|
||||
y += ((sparkloffs[0][1] < 30<<FRACBITS) ? FRACUNIT : -FRACUNIT);
|
||||
}
|
||||
}
|
||||
|
||||
if (goodending && finalecount > INFLECTIONPOINT)
|
||||
parallaxticker -= 40;
|
||||
|
||||
if ((-parallaxticker/4) < 5)
|
||||
{
|
||||
trans = (-parallaxticker/4) + 5;
|
||||
if (trans < 0)
|
||||
trans = 0;
|
||||
V_DrawFixedPatch(x, y, scale, trans<<V_ALPHASHIFT, endglow[(finalecount & 1) ? 0 : 1], NULL);
|
||||
}
|
||||
|
||||
if (goodending && finalecount > 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<<V_ALPHASHIFT, rockpat,
|
||||
R_GetTranslationColormap(TC_BLINK, SKINCOLOR_AQUAMARINE, GTC_CACHE));
|
||||
}
|
||||
|
||||
if (goodending && finalecount > INFLECTIONPOINT)
|
||||
{
|
||||
if (finalecount < INFLECTIONPOINT+10)
|
||||
V_DrawFixedPatch(x, y, scale, (finalecount-INFLECTIONPOINT)<<V_ALPHASHIFT, rockpat,
|
||||
R_GetTranslationColormap(TC_BLINK, SKINCOLOR_BLACK, GTC_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((-parallaxticker/2) < -5)
|
||||
colormap[1] = R_GetTranslationColormap(TC_ALLWHITE, 0, GTC_CACHE);
|
||||
|
||||
V_DrawFixedPatch(x, y, scale, 0, endegrk[0], colormap[1]);
|
||||
|
||||
if ((-parallaxticker/2) < 5)
|
||||
{
|
||||
trans = (-parallaxticker/2) + 5;
|
||||
if (trans < 0)
|
||||
trans = -trans;
|
||||
if (trans < 10)
|
||||
V_DrawFixedPatch(x, y, scale, trans<<V_ALPHASHIFT, endegrk[1], NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // firework
|
||||
{
|
||||
fixed_t scale = FRACUNIT;
|
||||
INT32 frame;
|
||||
UINT8 *colormap = NULL;
|
||||
parallaxticker -= 70;
|
||||
x += ((BASEVIDWIDTH-3)<<(FRACBITS-1)) - tweakx;
|
||||
y += (BASEVIDHEIGHT<<(FRACBITS-1)) + tweaky;
|
||||
borderstuff = true;
|
||||
|
||||
if (parallaxticker < 5)
|
||||
{
|
||||
scale = (parallaxticker<<FRACBITS)/4;
|
||||
V_DrawFadeFill(24, 24, BASEVIDWIDTH-48, BASEVIDHEIGHT-48, 0, 31, parallaxticker*2);
|
||||
}
|
||||
else
|
||||
scale += (parallaxticker-4)<<5;
|
||||
|
||||
if (goodending)
|
||||
colormap = R_GetTranslationColormap(players[consoleplayer].skin, players[consoleplayer].skincolor, GTC_CACHE);
|
||||
|
||||
if ((frame = ((parallaxticker & 1) ? 1 : 0) + (parallaxticker/TICRATE)) < 3)
|
||||
V_DrawFixedPatch(x, y, scale, 0, endfwrk[frame], colormap);
|
||||
}
|
||||
|
||||
// explosions
|
||||
if (sparklloop >= 3 && doexplosions)
|
||||
{
|
||||
INT32 boomtime = parallaxticker - sparklloop;
|
||||
|
||||
x = ((((BASEVIDWIDTH-82)/2)+11)<<FRACBITS) - ((boomtime*20)<<FRACBITS)/INFLECTIONPOINT;
|
||||
y = ((((BASEVIDHEIGHT-82)/2)+12)<<FRACBITS) + ((boomtime*7)<<FRACBITS)/INFLECTIONPOINT;
|
||||
|
||||
V_DrawFixedPatch(x + sparkloffs[0][0], y + sparkloffs[0][1],
|
||||
FRACUNIT, 0, endxpld[sparklloop/4], NULL);
|
||||
}
|
||||
|
||||
// initial fade
|
||||
if (finalecount < 30)
|
||||
V_DrawFadeFill(24, 24, BASEVIDWIDTH-48, BASEVIDHEIGHT-48, 0, 0, 30-finalecount);
|
||||
|
||||
// border - only emeralds can exist outside it
|
||||
{
|
||||
INT32 trans = 0;
|
||||
if (borderstuff)
|
||||
trans = (10*parallaxticker)/(3*TICRATE);
|
||||
if (trans < 10)
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, trans<<V_ALPHASHIFT, endbrdr[0]);
|
||||
if (borderstuff && parallaxticker < 11)
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, (parallaxticker-1)<<V_ALPHASHIFT, endbrdr[1]);
|
||||
else if (goodending && finalecount > INFLECTIONPOINT && finalecount < INFLECTIONPOINT+10)
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, (finalecount-INFLECTIONPOINT)<<V_ALPHASHIFT, endbrdr[1]);
|
||||
}
|
||||
|
||||
// emeralds and emerald accessories
|
||||
if (goodending && finalecount >= 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)<<FRACBITS;
|
||||
}
|
||||
|
||||
// sparkles
|
||||
for (i = 0; i < 7; ++i)
|
||||
{
|
||||
UINT8* colormap;
|
||||
skincolornum_t col = SKINCOLOR_GREEN;
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
col = SKINCOLOR_MAGENTA;
|
||||
break;
|
||||
case 2:
|
||||
col = SKINCOLOR_BLUE;
|
||||
break;
|
||||
case 3:
|
||||
col = SKINCOLOR_CYAN;
|
||||
break;
|
||||
case 4:
|
||||
col = SKINCOLOR_ORANGE;
|
||||
break;
|
||||
case 5:
|
||||
col = SKINCOLOR_RED;
|
||||
break;
|
||||
case 6:
|
||||
col = SKINCOLOR_GREY;
|
||||
default:
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, col, GTC_CACHE);
|
||||
|
||||
j = (sparklloop & 1) ? 2 : 3;
|
||||
while (j)
|
||||
{
|
||||
fa = (FixedAngle(eemeralds_cur[j])>>ANGLETOFINESHIFT) & FINEMASK;
|
||||
x = (BASEVIDWIDTH<<(FRACBITS-1)) + FixedMul(FINECOSINE(fa),radius);
|
||||
y = (BASEVIDHEIGHT<<(FRACBITS-1)) + FixedMul(FINESINE(fa),radius);
|
||||
eemeralds_cur[j] += (360<<FRACBITS)/7;
|
||||
|
||||
// if j == 0 - alternate between 0 and 1
|
||||
// 1 - 1 and 2
|
||||
// 2 - 2 and not rendered
|
||||
V_DrawFixedPatch(x, y, FRACUNIT, 0, endspkl[(j - ((sparklloop & 1) ? 0 : 1))], colormap);
|
||||
|
||||
j--;
|
||||
}
|
||||
}
|
||||
|
||||
// ...then emeralds themselves
|
||||
for (i = 0; i < 7; ++i)
|
||||
{
|
||||
fa = (FixedAngle(eemeralds_cur[0])>>ANGLETOFINESHIFT) & FINEMASK;
|
||||
x = (BASEVIDWIDTH<<(FRACBITS-1)) + FixedMul(FINECOSINE(fa),radius);
|
||||
y = ((BASEVIDHEIGHT+16)<<(FRACBITS-1)) + FixedMul(FINESINE(fa),radius);
|
||||
eemeralds_cur[0] += (360<<FRACBITS)/7;
|
||||
|
||||
patchname[4] = 'A'+(char)i;
|
||||
V_DrawFixedPatch(x, y, FRACUNIT, 0, W_CachePatchName(patchname, PU_PATCH_LOWPRIORITY), NULL);
|
||||
}
|
||||
} // if (goodending...
|
||||
} // (finalecount > 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<<V_ALPHASHIFT), str);
|
||||
V_DrawCharacter(32, BASEVIDHEIGHT-16, '>'|(trans<<V_ALPHASHIFT), false);
|
||||
V_DrawString(40, ((finalecount == STOPPINGPOINT-(20+TICRATE)) ? 1 : 0)+BASEVIDHEIGHT-16, ((gamedata->timesBeaten || finalecount >= STOPPINGPOINT-TICRATE) ? V_PURPLEMAP : V_BLUEMAP)|(trans<<V_ALPHASHIFT), " [S] ===>");
|
||||
}
|
||||
|
||||
if (finalecount > STOPPINGPOINT-(20+(2*TICRATE)))
|
||||
{
|
||||
INT32 trans2 = abs((5*FINECOSINE((FixedAngle((finalecount*5)<<FRACBITS)>>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<<V_ALPHASHIFT), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#undef SPARKLLOOPTIME
|
||||
|
||||
// ==========
|
||||
// GAME END
|
||||
// ==========
|
||||
|
|
|
|||
|
|
@ -52,9 +52,6 @@ void F_GameEvaluationDrawer(void);
|
|||
void F_StartGameEvaluation(void);
|
||||
void F_GameEvaluationTicker(void);
|
||||
|
||||
void F_EndingTicker(void);
|
||||
void F_EndingDrawer(void);
|
||||
|
||||
void F_CreditTicker(void);
|
||||
void F_CreditDrawer(void);
|
||||
|
||||
|
|
@ -173,7 +170,6 @@ enum
|
|||
wipe_evaluation_toblack,
|
||||
wipe_ceremony_toblack,
|
||||
wipe_intro_toblack,
|
||||
wipe_ending_toblack,
|
||||
wipe_cutscene_toblack,
|
||||
|
||||
// Specialized wipes
|
||||
|
|
@ -191,7 +187,6 @@ enum
|
|||
wipe_evaluation_final,
|
||||
wipe_ceremony_final,
|
||||
wipe_intro_final,
|
||||
wipe_ending_final,
|
||||
wipe_cutscene_final,
|
||||
|
||||
// custom intermissions
|
||||
|
|
|
|||
10
src/f_wipe.c
10
src/f_wipe.c
|
|
@ -65,7 +65,6 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
0, // wipe_evaluation_toblack
|
||||
0, // wipe_ceremony_toblack
|
||||
UINT8_MAX, // wipe_intro_toblack (hardcoded)
|
||||
99, // wipe_ending_toblack (hardcoded)
|
||||
99, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
72, // wipe_encore_toinvert
|
||||
|
|
@ -81,7 +80,6 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
0, // wipe_evaluation_final
|
||||
0, // wipe_ceremony_final
|
||||
99, // wipe_intro_final (hardcoded)
|
||||
99, // wipe_ending_final (hardcoded)
|
||||
99 // wipe_cutscene_final (hardcoded)
|
||||
};
|
||||
|
||||
|
|
@ -98,7 +96,6 @@ static boolean g_wipedef_toblack[NUMWIPEDEFS] = {
|
|||
true, // wipe_evaluation_toblack
|
||||
true, // wipe_ceremony_toblack
|
||||
true, // wipe_intro_toblack (hardcoded)
|
||||
true, // wipe_ending_toblack (hardcoded)
|
||||
true, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
false, // wipe_encore_toinvert
|
||||
|
|
@ -114,7 +111,6 @@ static boolean g_wipedef_toblack[NUMWIPEDEFS] = {
|
|||
true, // wipe_evaluation_final
|
||||
true, // wipe_ceremony_final
|
||||
true, // wipe_intro_final (hardcoded)
|
||||
true, // wipe_ending_final (hardcoded)
|
||||
true // wipe_cutscene_final (hardcoded)
|
||||
};
|
||||
|
||||
|
|
@ -131,7 +127,6 @@ static boolean g_wipedef_toinvert[NUMWIPEDEFS] = {
|
|||
false, // wipe_evaluation_toblack
|
||||
false, // wipe_ceremony_toblack
|
||||
false, // wipe_intro_toblack (hardcoded)
|
||||
false, // wipe_ending_toblack (hardcoded)
|
||||
false, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
true, // wipe_encore_toinvert
|
||||
|
|
@ -147,7 +142,6 @@ static boolean g_wipedef_toinvert[NUMWIPEDEFS] = {
|
|||
false, // wipe_evaluation_final
|
||||
false, // wipe_ceremony_final
|
||||
false, // wipe_intro_final (hardcoded)
|
||||
false, // wipe_ending_final (hardcoded)
|
||||
false // wipe_cutscene_final (hardcoded)
|
||||
};
|
||||
|
||||
|
|
@ -164,7 +158,6 @@ static boolean g_wipedef_towhite[NUMWIPEDEFS] = {
|
|||
false, // wipe_evaluation_toblack
|
||||
false, // wipe_ceremony_toblack
|
||||
false, // wipe_intro_toblack (hardcoded)
|
||||
false, // wipe_ending_toblack (hardcoded)
|
||||
false, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
false, // wipe_encore_toinvert
|
||||
|
|
@ -180,7 +173,6 @@ static boolean g_wipedef_towhite[NUMWIPEDEFS] = {
|
|||
false, // wipe_evaluation_final
|
||||
false, // wipe_ceremony_final
|
||||
false, // wipe_intro_final (hardcoded)
|
||||
false, // wipe_ending_final (hardcoded)
|
||||
false // wipe_cutscene_final (hardcoded)
|
||||
};
|
||||
|
||||
|
|
@ -197,7 +189,6 @@ static boolean g_wipedef_crossfade[NUMWIPEDEFS] = {
|
|||
false, // wipe_evaluation_toblack
|
||||
false, // wipe_ceremony_toblack
|
||||
false, // wipe_intro_toblack (hardcoded)
|
||||
false, // wipe_ending_toblack (hardcoded)
|
||||
false, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
false, // wipe_encore_toinvert
|
||||
|
|
@ -213,7 +204,6 @@ static boolean g_wipedef_crossfade[NUMWIPEDEFS] = {
|
|||
true, // wipe_evaluation_final
|
||||
true, // wipe_ceremony_final
|
||||
true, // wipe_intro_final (hardcoded)
|
||||
true, // wipe_ending_final (hardcoded)
|
||||
true // wipe_cutscene_final (hardcoded)
|
||||
};
|
||||
|
||||
|
|
|
|||
12
src/g_game.c
12
src/g_game.c
|
|
@ -1785,7 +1785,7 @@ boolean G_Responder(event_t *ev)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
else if (gamestate == GS_CREDITS || gamestate == GS_ENDING) // todo: keep ending here?
|
||||
else if (gamestate == GS_CREDITS)
|
||||
{
|
||||
if (HU_Responder(ev))
|
||||
{
|
||||
|
|
@ -2327,12 +2327,6 @@ void G_Ticker(boolean run)
|
|||
F_IntroTicker();
|
||||
break;
|
||||
|
||||
case GS_ENDING:
|
||||
if (run)
|
||||
F_EndingTicker();
|
||||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_CUTSCENE:
|
||||
if (run)
|
||||
F_CutsceneTicker();
|
||||
|
|
@ -3387,10 +3381,6 @@ void G_ExitLevel(void)
|
|||
|
||||
// Don't save demos immediately here! Let standings write first
|
||||
}
|
||||
else if (gamestate == GS_ENDING)
|
||||
{
|
||||
F_StartCredits();
|
||||
}
|
||||
else if (gamestate == GS_CREDITS)
|
||||
{
|
||||
F_StartGameEvaluation();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ typedef enum
|
|||
|
||||
// Hardcoded fades or other fading methods
|
||||
GS_INTRO, // introduction
|
||||
GS_ENDING, // currently shared between bad and good endings
|
||||
GS_CUTSCENE, // custom cutscene
|
||||
|
||||
// Not fadable
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue