Merge branch 'intro-sound-fuck' into 'master'

Sounds + intro polish

See merge request KartKrew/Kart!2162
This commit is contained in:
Oni 2024-03-27 22:41:59 +00:00
commit b85d9d0017
5 changed files with 38 additions and 50 deletions

View file

@ -530,7 +530,6 @@ static boolean dc_ticking = false;
static UINT8 dc_bluesegafade = 0; static UINT8 dc_bluesegafade = 0;
static UINT8 dc_textfade = 9; static UINT8 dc_textfade = 9;
static UINT8 dc_subtextfade = 9; static UINT8 dc_subtextfade = 9;
static UINT8 dc_screenfade = 9;
static void F_DisclaimerAdvanceState(void) static void F_DisclaimerAdvanceState(void)
{ {
@ -562,7 +561,6 @@ static void F_DisclaimerDrawScene(void)
dc_segaframe = 1; dc_segaframe = 1;
dc_textfade = 9; dc_textfade = 9;
dc_subtextfade = 9; dc_subtextfade = 9;
dc_screenfade = 9;
dc_lasttime = intro_curtime; dc_lasttime = intro_curtime;
} }
@ -692,17 +690,6 @@ static void F_DisclaimerDrawScene(void)
Z_Free(newText); Z_Free(newText);
} }
// Fade out (would love to use a wipe here, but lmao how the fuck do wipes work)
if (dc_state >= DISCLAIMER_OUT)
{
UINT32 screenalpha = 0;
if (dc_screenfade > 0)
screenalpha = dc_screenfade << V_ALPHASHIFT;
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31|screenalpha);
}
// ================================= STATE LOGIC // ================================= STATE LOGIC
if (!dc_ticking) if (!dc_ticking)
@ -738,15 +725,6 @@ static void F_DisclaimerDrawScene(void)
dc_subtextfade--; dc_subtextfade--;
} }
// Fade out screen
if (dc_state == DISCLAIMER_OUT)
{
if (dc_screenfade > 0)
{
dc_screenfade--;
}
}
// ================================= STATE TRANSITIONS // ================================= STATE TRANSITIONS
dc_tics++; dc_tics++;
@ -771,6 +749,30 @@ static void F_DisclaimerDrawScene(void)
if (dc_state == DISCLAIMER_FINAL && timetonext < TICRATE/2) if (dc_state == DISCLAIMER_FINAL && timetonext < TICRATE/2)
F_DisclaimerAdvanceState(); F_DisclaimerAdvanceState();
if (dc_state == DISCLAIMER_OUT)
{
F_WipeStartScreen();
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
F_WipeEndScreen();
F_RunWipe(wipe_level_toblack, wipedefs[wipe_level_toblack], false, "FADEMAP0", false, false);
if (M_GameTrulyStarted() == false)
{
D_StartTitle();
return;
}
intro_scenenum++;
timetonext = introscenetime[intro_scenenum];
animtimer = stoptimer = 0;
intro_curtime = 0;
F_WipeStartScreen();
F_IntroDrawScene();
F_WipeEndScreen();
F_RunWipe(wipe_level_toblack, wipedefs[wipe_level_toblack], false, "FADEMAP0", true, false);
}
} }
// //
@ -844,16 +846,21 @@ void F_IntroTicker(void)
{ {
dc_state = DISCLAIMER_OUT; dc_state = DISCLAIMER_OUT;
dc_tics = 0; dc_tics = 0;
timetonext = 10;
} }
else if (doskip || timetonext <= 0) else if (doskip || timetonext <= 0)
{ {
intro_scenenum++; intro_scenenum++;
INT32 destscenenum = NUMINTROSCENES-1; INT32 destscenenum = NUMINTROSCENES-1;
if (M_GameTrulyStarted() == false) if (M_GameTrulyStarted() == false)
{
destscenenum = INTROSCENE_DISCLAIMER; destscenenum = INTROSCENE_DISCLAIMER;
}
else if (doskip) else if (doskip)
{
destscenenum = INTROSCENE_KREW; destscenenum = INTROSCENE_KREW;
}
if (intro_scenenum > destscenenum) if (intro_scenenum > destscenenum)
{ {
D_StartTitle(); D_StartTitle();
@ -861,9 +868,11 @@ void F_IntroTicker(void)
//wipetypepre = INT16_MAX; -- however, this breaks the title screen cacheing and I don't know why and I'm tired of fighting it. //wipetypepre = INT16_MAX; -- however, this breaks the title screen cacheing and I don't know why and I'm tired of fighting it.
return; return;
} }
//F_NewCutscene(introtext[intro_scenenum]); //F_NewCutscene(introtext[intro_scenenum]);
timetonext = introscenetime[intro_scenenum]; timetonext = introscenetime[intro_scenenum];
animtimer = stoptimer = 0; animtimer = stoptimer = 0;
if ( if (
doskip doskip
|| intro_scenenum == INTROSCENE_DISCLAIMER || intro_scenenum == INTROSCENE_DISCLAIMER
@ -874,36 +883,17 @@ void F_IntroTicker(void)
} }
} }
intro_curtime = introscenetime[intro_scenenum] - timetonext;
if (intro_scenenum == INTROSCENE_KREW) if (intro_scenenum == INTROSCENE_KREW)
{ {
if (intro_curtime == TICRATE/2) if (intro_curtime == TICRATE/2)
S_StartSound(NULL, sfx_kc5e); S_StartSound(NULL, sfx_kc5e);
if (timetonext == 5) if (timetonext == 24)
S_StartSound(NULL, sfx_vroom); S_StartSound(NULL, sfx_vroom);
else if (timetonext == 24)
{
// Need to use M_Random otherwise it always uses the same sound
UINT32 rskin;
UINT8 rtaunt;
if (skippableallowed)
{
rskin = R_GetLocalRandomSkin();
rtaunt = M_RandomKey(2);
}
else
{
rskin = R_SkinAvailableEx("eggman", false);
rtaunt = 1;
}
sfxenum_t rsound = skins[rskin].soundsid[SKSKBST1+rtaunt];
S_StartSound(NULL, rsound);
}
} }
intro_curtime = introscenetime[intro_scenenum] - timetonext;
F_WriteText(); F_WriteText();
if (animtimer > 0) if (animtimer > 0)

View file

@ -13205,7 +13205,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // missilestate S_NULL, // missilestate
S_NULL, // deathstate S_NULL, // deathstate
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_itpick, // deathsound sfx_mbs54, // deathsound
0, // speed 0, // speed
48*FRACUNIT, // radius 48*FRACUNIT, // radius
64*FRACUNIT, // height 64*FRACUNIT, // height
@ -13232,7 +13232,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // missilestate S_NULL, // missilestate
S_NULL, // deathstate S_NULL, // deathstate
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_itpick, // deathsound sfx_mbs54, // deathsound
0, // speed 0, // speed
48*FRACUNIT, // radius 48*FRACUNIT, // radius
64*FRACUNIT, // height 64*FRACUNIT, // height

View file

@ -80,7 +80,7 @@ bool award_target(mobj_t* mobj)
player->roundconditions.gachabom_miser = 0; player->roundconditions.gachabom_miser = 0;
//S_StartSoundAtVolume(target, sfx_grbnd3, 255/3); //S_StartSoundAtVolume(target, sfx_grbnd3, 255/3);
S_StartSound(target, sfx_itpick); S_StartSound(target, sfx_mbs54);
return true; return true;
} }

View file

@ -1047,7 +1047,6 @@ sfxinfo_t S_sfx[NUMSFX] =
{"ruburn", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Rubber-burn turn ambient {"ruburn", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Rubber-burn turn ambient
{"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Respawn Drop Dash {"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Respawn Drop Dash
{"tossed", false, 192, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Item fired {"tossed", false, 192, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Item fired
{"itpick", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Pick up HUD drop
{"peel", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Edited S25A for banana landing {"peel", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Edited S25A for banana landing
{"hogbom", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Ballhog explosions {"hogbom", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Ballhog explosions
{"zio3", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Thunder Shield use {"zio3", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Thunder Shield use

View file

@ -1115,7 +1115,6 @@ typedef enum
sfx_ruburn, sfx_ruburn,
sfx_ddash, sfx_ddash,
sfx_tossed, sfx_tossed,
sfx_itpick,
sfx_peel, sfx_peel,
sfx_hogbom, sfx_hogbom,
sfx_zio3, sfx_zio3,