Encore mode is shippable, if still a tad incomplete!

* Turns out the Linedef Type 606 support WAS working and I just had a bad MAP01E lump.
* Ruby fade and ambience start track.
* Fix bad phrasing.
This commit is contained in:
toaster 2018-08-08 15:03:02 +01:00
parent 6f4308905f
commit 7577d289c3
6 changed files with 78 additions and 70 deletions

View file

@ -5252,7 +5252,7 @@ static void KartEncore_OnChange(void)
CONS_Printf(M_GetText("Encore tracks will be turned %s next round.\n"), cv_kartencore.value ? M_GetText("on") : M_GetText("off")); CONS_Printf(M_GetText("Encore tracks will be turned %s next round.\n"), cv_kartencore.value ? M_GetText("on") : M_GetText("off"));
else else
{ {
CONS_Printf(M_GetText("Encore tracks has been turned %s.\n"), cv_kartencore.value ? M_GetText("on") : M_GetText("off")); CONS_Printf(M_GetText("Encore tracks have been turned %s.\n"), cv_kartencore.value ? M_GetText("on") : M_GetText("off"));
encoremode = (boolean)cv_kartencore.value; encoremode = (boolean)cv_kartencore.value;
} }
} }

View file

@ -2244,6 +2244,33 @@ static void P_LevelInitStuff(void)
// and this stupid flag as a result // and this stupid flag as a result
players[i].pflags &= ~PF_TRANSFERTOCLOSEST; players[i].pflags &= ~PF_TRANSFERTOCLOSEST;
} }
// SRB2Kart: map load variables
if (modeattacking) // Just play it safe and set everything
{
gamespeed = 2;
encoremode = false;
franticitems = false;
comeback = true;
}
else
{
if (G_BattleGametype())
{
gamespeed = 0;
encoremode = false;
}
else
{
gamespeed = (UINT8)cv_kartspeed.value;
encoremode = (boolean)cv_kartencore.value;
}
franticitems = (boolean)cv_kartfrantic.value;
comeback = (boolean)cv_kartcomeback.value;
}
for (i = 0; i < 4; i++)
battlewanted[i] = -1;
} }
// //
@ -2618,23 +2645,31 @@ boolean P_SetupLevel(boolean skipprecip)
// will be set by player think. // will be set by player think.
players[consoleplayer].viewz = 1; players[consoleplayer].viewz = 1;
// Special stage fade to white // Encore mode fade to pink to white
// This is handled BEFORE sounds are stopped. // This is handled BEFORE sounds are stopped.
/*if (rendermode != render_none && G_IsSpecialStage(gamemap)) if (rendermode != render_none && encoremode)
{ {
tic_t starttime = I_GetTime(); tic_t starttime, endtime, nowtime;
tic_t endtime = starttime + (3*TICRATE)/2;
tic_t nowtime;
S_StartSound(NULL, sfx_s3kaf); S_StopMusic(); // er, about that...
S_StartSound(NULL, sfx_ruby1);
F_WipeStartScreen(); F_WipeStartScreen();
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 0); V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 122);
F_WipeEndScreen(); F_WipeEndScreen();
F_RunWipe(wipedefs[wipe_speclevel_towhite], false); F_RunWipe(wipedefs[wipe_speclevel_towhite], false);
nowtime = lastwipetic; F_WipeStartScreen();
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
F_WipeEndScreen();
F_RunWipe(wipedefs[wipe_level_final], false);
starttime = nowtime = lastwipetic;
endtime = starttime + (3*TICRATE)/2;
// Hold on white for extra effect. // Hold on white for extra effect.
while (nowtime < endtime) while (nowtime < endtime)
{ {
@ -2647,23 +2682,22 @@ boolean P_SetupLevel(boolean skipprecip)
} }
ranspecialwipe = 1; ranspecialwipe = 1;
}*/ }
// Make sure all sounds are stopped before Z_FreeTags. // Make sure all sounds are stopped before Z_FreeTags.
S_StopSounds(); S_StopSounds();
S_ClearSfx(); S_ClearSfx();
// As oddly named as this is, this handles music only. // As oddly named as this is, this handles music only.
// We should be fine starting it here. // We should be fine starting it here.
S_Start(); S_Start();
// SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished // SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished
// but we do still need the mapmusname to be changed // but we do still need the mapmusname to be changed
if (leveltime < (starttime + (TICRATE/2))) if (leveltime < (starttime + (TICRATE/2)))
S_ChangeMusicInternal("kstart", false); //S_StopMusic(); S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
// Let's fade to black here // Let's fade to white here
// But only if we didn't do the special stage wipe // But only if we didn't do the encore wipe
if (rendermode != render_none && !ranspecialwipe) if (rendermode != render_none && !ranspecialwipe)
{ {
F_WipeStartScreen(); F_WipeStartScreen();
@ -2726,33 +2760,6 @@ boolean P_SetupLevel(boolean skipprecip)
// internal game map // internal game map
lastloadedmaplumpnum = W_GetNumForName(maplumpname = G_BuildMapName(gamemap)); lastloadedmaplumpnum = W_GetNumForName(maplumpname = G_BuildMapName(gamemap));
// SRB2Kart: map load variables
if (modeattacking) // Just play it safe and set everything
{
gamespeed = 2;
encoremode = false;
franticitems = false;
comeback = true;
}
else
{
if (G_BattleGametype())
{
gamespeed = 0;
encoremode = false;
}
else
{
gamespeed = (UINT8)cv_kartspeed.value;
encoremode = (boolean)cv_kartencore.value;
}
franticitems = (boolean)cv_kartfrantic.value;
comeback = (boolean)cv_kartcomeback.value;
}
for (i = 0; i < 4; i++)
battlewanted[i] = -1;
R_ReInitColormaps(mapheaderinfo[gamemap-1]->palette, R_ReInitColormaps(mapheaderinfo[gamemap-1]->palette,
(encoremode ? W_CheckNumForName(va("%sE", maplumpname)) : LUMPERROR)); (encoremode ? W_CheckNumForName(va("%sE", maplumpname)) : LUMPERROR));
CON_SetupBackColormap(); CON_SetupBackColormap();

View file

@ -1221,7 +1221,7 @@ void P_RestoreMusic(player_t *player)
// Event - Level Start // Event - Level Start
if (leveltime < (starttime + (TICRATE/2))) if (leveltime < (starttime + (TICRATE/2)))
S_ChangeMusicInternal("kstart", false); //S_StopMusic(); S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
else // see also where time overs are handled - search for "lives = 2" in this file else // see also where time overs are handled - search for "lives = 2" in this file
{ {
// Item - Grow // Item - Grow

View file

@ -1151,14 +1151,14 @@ INT32 R_CreateColormap(char *p1, char *p2, char *p3)
cg = ((HEX2INT(p1[3]) * 16) + HEX2INT(p1[4])); cg = ((HEX2INT(p1[3]) * 16) + HEX2INT(p1[4]));
cb = ((HEX2INT(p1[5]) * 16) + HEX2INT(p1[6])); cb = ((HEX2INT(p1[5]) * 16) + HEX2INT(p1[6]));
// i don't know why this doesn't work... if (encoremap)
/*if (encoremap)
{ {
i = NearestColor(cr, cg, cb); i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
cr = pLocalPalette[encoremap[i]].s.red; //CONS_Printf("R_CreateColormap: encoremap[%d] = %d\n", i, encoremap[i]); -- moved encoremap upwards for optimisation
cg = pLocalPalette[encoremap[i]].s.green; cr = pLocalPalette[i].s.red;
cb = pLocalPalette[encoremap[i]].s.blue; cg = pLocalPalette[i].s.green;
}*/ cb = pLocalPalette[i].s.blue;
}
cmaskr = cr; cmaskr = cr;
cmaskg = cg; cmaskg = cg;
@ -1208,14 +1208,13 @@ INT32 R_CreateColormap(char *p1, char *p2, char *p3)
cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4])); cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4]));
cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6])); cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6]));
// i don't know why this doesn't work... if (encoremap)
/*if (encoremap)
{ {
i = NearestColor(cr, cg, cb); i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
cr = pLocalPalette[encoremap[i]].s.red; cr = pLocalPalette[i].s.red;
cg = pLocalPalette[encoremap[i]].s.green; cg = pLocalPalette[i].s.green;
cb = pLocalPalette[encoremap[i]].s.blue; cb = pLocalPalette[i].s.blue;
}*/ }
cdestr = cr; cdestr = cr;
cdestg = cg; cdestg = cg;
@ -1321,14 +1320,13 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
cg = ((HEX2INT(p1[3]) * 16) + HEX2INT(p1[4])); cg = ((HEX2INT(p1[3]) * 16) + HEX2INT(p1[4]));
cb = ((HEX2INT(p1[5]) * 16) + HEX2INT(p1[6])); cb = ((HEX2INT(p1[5]) * 16) + HEX2INT(p1[6]));
// i don't know why this doesn't work... if (encoremap)
/*if (encoremap)
{ {
i = NearestColor(cr, cg, cb); i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
cr = pLocalPalette[encoremap[i]].s.red; cr = pLocalPalette[i].s.red;
cg = pLocalPalette[encoremap[i]].s.green; cg = pLocalPalette[i].s.green;
cb = pLocalPalette[encoremap[i]].s.blue; cb = pLocalPalette[i].s.blue;
}*/ }
cmaskr = cr; cmaskr = cr;
cmaskg = cg; cmaskg = cg;
@ -1378,14 +1376,13 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4])); cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4]));
cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6])); cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6]));
// i don't know why this doesn't work... if (encoremap)
/*if (encoremap)
{ {
i = NearestColor(cr, cg, cb); i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
cr = pLocalPalette[encoremap[i]].s.red; cr = pLocalPalette[i].s.red;
cg = pLocalPalette[encoremap[i]].s.green; cg = pLocalPalette[i].s.green;
cb = pLocalPalette[encoremap[i]].s.blue; cb = pLocalPalette[i].s.blue;
}*/ }
cdestr = cr; cdestr = cr;
cdestg = cg; cdestg = cg;

View file

@ -809,6 +809,8 @@ sfxinfo_t S_sfx[NUMSFX] =
{"yeeeah", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"yeeeah", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ruby1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ruby2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart - Skin sounds // SRB2kart - Skin sounds

View file

@ -881,6 +881,8 @@ typedef enum
sfx_yeeeah, sfx_yeeeah,
sfx_noooo1, sfx_noooo1,
sfx_noooo2, sfx_noooo2,
sfx_ruby1,
sfx_ruby2,
sfx_hogbom, sfx_hogbom,
sfx_kwin, sfx_kwin,